@opentiny/tiny-engine-toolbar-lock 2.3.0 → 2.4.0-rc.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.
Files changed (2) hide show
  1. package/dist/index.js +13 -13
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -1,13 +1,8 @@
1
- import { resolveComponent as N, createBlock as _, createCommentVNode as b, openBlock as S, reactive as T, computed as m } from "vue";
1
+ import { reactive as N, computed as m, resolveComponent as _, createBlock as b, createCommentVNode as S, openBlock as T } from "vue";
2
2
  import { getMetaApi as x, META_SERVICE as C, useCanvas as M, useLayout as $, useBlock as A, useNotify as k } from "@opentiny/tiny-engine-meta-register";
3
3
  import { constants as B } from "@opentiny/tiny-engine-utils";
4
4
  import { ToolbarBase as h } from "@opentiny/tiny-engine-common";
5
- const v = (e) => x(C.Http).get(`app-center/api/apps/canvas/lock?${e}`), E = (e, a) => {
6
- const o = e.__vccOpts || e;
7
- for (const [c, s] of a)
8
- o[c] = s;
9
- return o;
10
- }, { COMPONENT_NAME: L, PAGE_STATUS: t } = B, d = {
5
+ const v = (e) => x(C.Http).get(`app-center/api/apps/canvas/lock?${e}`), { COMPONENT_NAME: E, PAGE_STATUS: t } = B, d = {
11
6
  block: "区块",
12
7
  page: "页面"
13
8
  }, g = {
@@ -26,7 +21,7 @@ const v = (e) => x(C.Http).get(`app-center/api/apps/canvas/lock?${e}`), E = (e,
26
21
  currentOptName: "锁定",
27
22
  nextOptName: "解锁"
28
23
  }
29
- }, P = {
24
+ }, L = {
30
25
  components: {
31
26
  ToolbarBase: h
32
27
  },
@@ -37,7 +32,7 @@ const v = (e) => x(C.Http).get(`app-center/api/apps/canvas/lock?${e}`), E = (e,
37
32
  }
38
33
  },
39
34
  setup(e) {
40
- const { pageState: a } = M(), { layoutState: o } = $(), { getCurrentBlock: c } = A(), s = T({
35
+ const { pageState: a } = M(), { layoutState: o } = $(), { getCurrentBlock: c } = A(), s = N({
41
36
  status: m(() => o.pageStatus.state),
42
37
  isGuest: m(() => o.pageStatus.state === t.Guest),
43
38
  type: "",
@@ -82,18 +77,23 @@ const v = (e) => x(C.Http).get(`app-center/api/apps/canvas/lock?${e}`), E = (e,
82
77
  if (s.disabled)
83
78
  return;
84
79
  const l = s.status === t.Occupy || s.status === t.Lock ? t.Release : t.Occupy;
85
- a.currentSchema = {}, a.properties = null, s.disabled = !0, a.pageSchema.componentName !== L.Block ? p(a.currentPage.id, "page", l) : p(c().id, "block", l);
80
+ a.currentSchema = {}, a.properties = null, s.disabled = !0, a.pageSchema.componentName !== E.Block ? p(a.currentPage.id, "page", l) : p(c().id, "block", l);
86
81
  },
87
82
  PAGE_STATUS: t,
88
83
  statusMessageMap: g,
89
84
  iconName: y
90
85
  };
91
86
  }
87
+ }, P = (e, a) => {
88
+ const o = e.__vccOpts || e;
89
+ for (const [c, s] of a)
90
+ o[c] = s;
91
+ return o;
92
92
  };
93
93
  function G(e, a, o, c, s, y) {
94
94
  var u;
95
- const p = N("toolbar-base");
96
- return c.state.isGuest ? b("", !0) : (S(), _(p, {
95
+ const p = _("toolbar-base");
96
+ return c.state.isGuest ? S("", !0) : (T(), b(p, {
97
97
  key: 0,
98
98
  icon: c.iconName,
99
99
  content: (u = c.statusMessageMap[c.state.status]) == null ? void 0 : u.nextOptName,
@@ -101,7 +101,7 @@ function G(e, a, o, c, s, y) {
101
101
  onClickApi: c.lockOrUnlock
102
102
  }, null, 8, ["icon", "content", "options", "onClickApi"]));
103
103
  }
104
- const U = /* @__PURE__ */ E(P, [["render", G]]), R = {
104
+ const U = /* @__PURE__ */ P(L, [["render", G]]), R = {
105
105
  id: "engine.toolbars.lock",
106
106
  title: "lock",
107
107
  type: "toolbars",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentiny/tiny-engine-toolbar-lock",
3
- "version": "2.3.0",
3
+ "version": "2.4.0-rc.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -25,12 +25,12 @@
25
25
  "license": "MIT",
26
26
  "homepage": "https://opentiny.design/tiny-engine",
27
27
  "dependencies": {
28
- "@opentiny/tiny-engine-common": "2.3.0",
29
- "@opentiny/tiny-engine-meta-register": "2.3.0",
30
- "@opentiny/tiny-engine-utils": "2.3.0"
28
+ "@opentiny/tiny-engine-common": "2.4.0-rc.0",
29
+ "@opentiny/tiny-engine-meta-register": "2.4.0-rc.0",
30
+ "@opentiny/tiny-engine-utils": "2.4.0-rc.0"
31
31
  },
32
32
  "devDependencies": {
33
- "@opentiny/tiny-engine-vite-plugin-meta-comments": "2.3.0",
33
+ "@opentiny/tiny-engine-vite-plugin-meta-comments": "2.4.0-rc.0",
34
34
  "@vitejs/plugin-vue": "^5.1.2",
35
35
  "@vitejs/plugin-vue-jsx": "^4.0.1",
36
36
  "vite": "^5.4.2"
@@ -39,5 +39,5 @@
39
39
  "@opentiny/vue": "^3.20.0",
40
40
  "vue": "^3.4.15"
41
41
  },
42
- "gitHead": "330c4d2b319d5b5ba6ad64c270c21a7931a2e400"
42
+ "gitHead": "40df6ee51c80bf918c176f7e8ad97b6b687ddc7b"
43
43
  }