@opentiny/tiny-engine-toolbar-breadcrumb 2.1.0-rc.0 → 2.1.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/LICENSE CHANGED
@@ -1,22 +1,22 @@
1
- MIT License
2
-
3
- Copyright (c) 2023 - present TinyEngine Authors.
4
- Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd.
5
-
6
- Permission is hereby granted, free of charge, to any person obtaining a copy
7
- of this software and associated documentation files (the "Software"), to deal
8
- in the Software without restriction, including without limitation the rights
9
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- copies of the Software, and to permit persons to whom the Software is
11
- furnished to do so, subject to the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be included in all
14
- copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2023 - present TinyEngine Authors.
4
+ Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd.
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
package/dist/index.js CHANGED
@@ -1,19 +1,19 @@
1
1
  import "./style.css";
2
- import { reactive as E, computed as S, resolveComponent as c, openBlock as i, createBlock as _, withCtx as m, createElementVNode as D, normalizeClass as C, createVNode as k, createElementBlock as N, Fragment as O, renderList as I, createTextVNode as v, toDisplayString as x, createCommentVNode as A, ref as L } from "vue";
3
- import { Breadcrumb as V, BreadcrumbItem as h, Button as K } from "@opentiny/vue";
4
- import { useLayout as P, useBreadcrumb as X, HOOK_NAME as w } from "@opentiny/tiny-engine-meta-register";
5
- import { BlockDeployDialog as G, ToolbarBase as z } from "@opentiny/tiny-engine-common";
2
+ import { reactive as D, computed as h, resolveComponent as l, openBlock as i, createBlock as p, withCtx as m, createElementVNode as C, normalizeClass as v, createVNode as S, createElementBlock as E, Fragment as N, renderList as O, createTextVNode as f, toDisplayString as I, createCommentVNode as A, ref as L } from "vue";
3
+ import { Breadcrumb as K, BreadcrumbItem as P, Button as X } from "@opentiny/vue";
4
+ import { useLayout as x, useBreadcrumb as G, useBlock as B, HOOK_NAME as w } from "@opentiny/tiny-engine-meta-register";
5
+ import { BlockDeployDialog as V, ToolbarBase as z } from "@opentiny/tiny-engine-common";
6
6
  const M = (t, o) => {
7
- const n = t.__vccOpts || t;
8
- for (const [e, a] of o)
9
- n[e] = a;
10
- return n;
7
+ const r = t.__vccOpts || t;
8
+ for (const [e, c] of o)
9
+ r[e] = c;
10
+ return r;
11
11
  }, U = {
12
12
  components: {
13
- TinyBreadcrumb: V,
14
- TinyBreadcrumbItem: h,
15
- BlockDeployDialog: G,
16
- TinyButton: K,
13
+ TinyBreadcrumb: K,
14
+ TinyBreadcrumbItem: P,
15
+ BlockDeployDialog: V,
16
+ TinyButton: X,
17
17
  ToolbarBase: z
18
18
  },
19
19
  props: {
@@ -26,79 +26,82 @@ const M = (t, o) => {
26
26
  const t = {
27
27
  PAGEID: "engine.plugins.appmanage",
28
28
  BLOCKID: "engine.plugins.blockmanage"
29
- }, { layoutState: o } = P(), { plugins: n } = o || {}, e = E({
29
+ }, { layoutState: o } = x(), { plugins: r } = o || {}, e = D({
30
30
  showDeployBlock: !1
31
- }), { CONSTANTS: a, getBreadcrumbData: b } = X(), s = b(), u = () => {
31
+ }), { CONSTANTS: c, getBreadcrumbData: k } = G(), s = k(), b = () => {
32
32
  e.showDeployBlock = !0;
33
- }, d = S(() => {
34
- const p = b().value[2] || [];
35
- let r = "1.0.0", f = 0;
36
- return p.forEach((l) => {
37
- const g = new Date(l.created_at).getTime();
38
- g > f && (f = g, r = l.version);
39
- }), r.replace(/\d+$/, (l) => Number(l) + 1);
33
+ }, d = () => {
34
+ r && (r.render = s.value[0] === c.PAGETEXT ? t.PAGEID : t.BLOCKID);
35
+ }, u = h(() => {
36
+ var a, n, g;
37
+ return (g = (n = (a = B) == null ? void 0 : a()) == null ? void 0 : n.getCurrentBlock) == null ? void 0 : g.call(n);
40
38
  });
41
39
  return {
42
40
  breadcrumbData: s,
43
- publishBlock: u,
41
+ publishBlock: b,
44
42
  state: e,
45
- nextVersion: d,
46
- CONSTANTS: a,
47
- open: () => {
48
- n && (n.render = s.value[0] === a.PAGETEXT ? t.PAGEID : t.BLOCKID);
43
+ CONSTANTS: c,
44
+ open: d,
45
+ currentBlock: u,
46
+ handleChangeSchema: (a) => {
47
+ B().initBlock({ ...B().getCurrentBlock(), content: a });
49
48
  }
50
49
  };
51
50
  }
52
51
  }, j = { class: "top-panel-breadcrumb" };
53
- function F(t, o, n, e, a, b) {
54
- const s = c("tiny-breadcrumb-item"), u = c("tiny-breadcrumb"), d = c("tiny-button"), y = c("block-deploy-dialog"), p = c("toolbar-base");
55
- return i(), _(p, { options: n.options }, {
56
- default: m(() => [
57
- D("div", j, [
58
- D("div", {
59
- class: C([
60
- "top-panel-breadcrumb-title",
61
- { "top-panel-breadcrumb-title-block": e.breadcrumbData[0] === e.CONSTANTS.BLOCKTEXT }
62
- ])
63
- }, [
64
- k(u, {
65
- separator: ":",
66
- onSelect: e.open
52
+ function F(t, o, r, e, c, k) {
53
+ const s = l("tiny-breadcrumb-item"), b = l("tiny-breadcrumb"), d = l("tiny-button"), u = l("block-deploy-dialog"), T = l("toolbar-base");
54
+ return i(), p(T, { options: r.options }, {
55
+ default: m(() => {
56
+ var a;
57
+ return [
58
+ C("div", j, [
59
+ C("div", {
60
+ class: v([
61
+ "top-panel-breadcrumb-title",
62
+ { "top-panel-breadcrumb-title-block": e.breadcrumbData[0] === e.CONSTANTS.BLOCKTEXT }
63
+ ])
64
+ }, [
65
+ S(b, {
66
+ separator: ":",
67
+ onSelect: e.open
68
+ }, {
69
+ default: m(() => [
70
+ (i(!0), E(N, null, O(e.breadcrumbData.slice(0, 2), (n) => (i(), p(s, { key: n }, {
71
+ default: m(() => [
72
+ f(I(n), 1)
73
+ ]),
74
+ _: 2
75
+ }, 1024))), 128))
76
+ ]),
77
+ _: 1
78
+ }, 8, ["onSelect"])
79
+ ], 2),
80
+ e.breadcrumbData[0] === e.CONSTANTS.BLOCKTEXT && ((a = e.currentBlock) != null && a.id) ? (i(), p(d, {
81
+ key: 0,
82
+ class: "publish",
83
+ onClick: o[0] || (o[0] = (n) => e.publishBlock()),
84
+ type: "primary",
85
+ size: "small"
67
86
  }, {
68
- default: m(() => [
69
- (i(!0), N(O, null, I(e.breadcrumbData.slice(0, 2), (r) => (i(), _(s, { key: r }, {
70
- default: m(() => [
71
- v(x(r), 1)
72
- ]),
73
- _: 2
74
- }, 1024))), 128))
75
- ]),
87
+ default: m(() => o[2] || (o[2] = [
88
+ f("发布区块 ")
89
+ ])),
76
90
  _: 1
77
- }, 8, ["onSelect"])
78
- ], 2),
79
- e.breadcrumbData[0] === e.CONSTANTS.BLOCKTEXT ? (i(), _(d, {
80
- key: 0,
81
- class: "publish",
82
- onClick: o[0] || (o[0] = (r) => e.publishBlock()),
83
- type: "primary",
84
- size: "small"
85
- }, {
86
- default: m(() => [
87
- v("发布区块 ")
88
- ]),
89
- _: 1
90
- })) : A("", !0)
91
- ]),
92
- k(y, {
93
- visible: e.state.showDeployBlock,
94
- "onUpdate:visible": o[1] || (o[1] = (r) => e.state.showDeployBlock = r),
95
- nextVersion: e.nextVersion
96
- }, null, 8, ["visible", "nextVersion"])
97
- ]),
91
+ })) : A("", !0)
92
+ ]),
93
+ S(u, {
94
+ visible: e.state.showDeployBlock,
95
+ "onUpdate:visible": o[1] || (o[1] = (n) => e.state.showDeployBlock = n),
96
+ block: e.currentBlock,
97
+ onChangeSchema: e.handleChangeSchema
98
+ }, null, 8, ["visible", "block", "onChangeSchema"])
99
+ ];
100
+ }),
98
101
  _: 1
99
102
  }, 8, ["options"]);
100
103
  }
101
- const H = /* @__PURE__ */ M(U, [["render", F], ["__scopeId", "data-v-92856187"]]), q = {
104
+ const H = /* @__PURE__ */ M(U, [["render", F], ["__scopeId", "data-v-b9015c33"]]), q = {
102
105
  id: "engine.toolbars.breadcrumb",
103
106
  type: "toolbars",
104
107
  title: "breadcrumb",
@@ -109,16 +112,16 @@ const H = /* @__PURE__ */ M(U, [["render", F], ["__scopeId", "data-v-92856187"]]
109
112
  renderType: "slot"
110
113
  }
111
114
  };
112
- let B = L([]);
113
- const T = {
115
+ let _ = L([]);
116
+ const y = {
114
117
  PAGETEXT: "页面",
115
118
  BLOCKTEXT: "区块"
116
119
  }, J = (t) => {
117
- B.value = [T.PAGETEXT, ...t], sessionStorage.setItem("pageInfo", t);
118
- }, Q = (t, o = []) => {
119
- B.value = [T.BLOCKTEXT, ...t, o];
120
- }, R = () => B, W = () => ({
121
- CONSTANTS: T,
120
+ _.value = [y.PAGETEXT, ...t], sessionStorage.setItem("pageInfo", t);
121
+ }, Q = (t) => {
122
+ _.value = [y.BLOCKTEXT, ...t];
123
+ }, R = () => _, W = () => ({
124
+ CONSTANTS: y,
122
125
  setBreadcrumbPage: J,
123
126
  setBreadcrumbBlock: Q,
124
127
  getBreadcrumbData: R
@@ -129,12 +132,12 @@ const T = {
129
132
  composable: {
130
133
  name: w.useBreadcrumb
131
134
  }
132
- }, re = {
135
+ }, ne = {
133
136
  ...q,
134
137
  entry: H,
135
138
  metas: [Y]
136
139
  };
137
140
  export {
138
141
  Y as BreadcrumbService,
139
- re as default
142
+ ne as default
140
143
  };
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .top-panel-breadcrumb[data-v-92856187]{padding-left:12px;box-sizing:border-box;display:flex;justify-content:flex-start;align-items:center;width:auto;height:100%;margin-right:3px;cursor:pointer}.top-panel-breadcrumb-title[data-v-92856187]{height:28px;padding:0 8px;background-color:var(--ti-lowcode-toolbar-button-bg);display:flex;border-radius:4px}.top-panel-breadcrumb-title[data-v-92856187] .reference-wrapper{line-height:22px}.top-panel-breadcrumb .tiny-breadcrumb[data-v-92856187]{line-height:var(--base-top-panel-breadcrumb-line-height);padding-right:4px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:12px;cursor:inherit}.top-panel-breadcrumb .tiny-breadcrumb__item[data-v-92856187]{cursor:inherit;-webkit-user-select:none;user-select:none}.top-panel-breadcrumb .tiny-breadcrumb__item[data-v-92856187] .tiny-breadcrumb__inner{color:var(--ti-lowcode-media-popover-title-color);text-decoration:none;cursor:pointer}.top-panel-breadcrumb .tiny-breadcrumb__item[data-v-92856187] .tiny-breadcrumb__separator{padding:0;margin:0 4px 0 0}.top-panel-breadcrumb .tiny-breadcrumb__item[data-v-92856187]:last-child .tiny-breadcrumb__inner{font-weight:400;color:var(--ti-lowcode-media-popover-title-color)}.top-panel-breadcrumb-title-block[data-v-92856187]{background-color:var(--ti-lowcode-toolbar-breadcrumb-bg)}.top-panel-breadcrumb-title-block .tiny-breadcrumb__item[data-v-92856187] .tiny-breadcrumb__inner{color:var(--ti-lowcode-toolbar-breadcrumb-left-color)}.top-panel-breadcrumb-title-block .tiny-breadcrumb__item[data-v-92856187]:last-child .tiny-breadcrumb__inner{color:var(--ti-lowcode-toolbar-breadcrumb-left-color)}.top-panel-breadcrumb-title-block[data-v-92856187]:hover{background-color:var(--ti-lowcode-toolbar-breadcrumb-bg-hover)}.top-panel-breadcrumb .publish[data-v-92856187]{margin:0 8px;height:24px;line-height:24px;min-width:40px;font-size:12px}
1
+ .top-panel-breadcrumb[data-v-b9015c33]{padding-left:12px;box-sizing:border-box;display:flex;justify-content:flex-start;align-items:center;width:auto;height:100%;margin-right:3px;cursor:pointer}.top-panel-breadcrumb-title[data-v-b9015c33]{height:28px;padding:0 8px;background-color:var(--ti-lowcode-toolbar-button-bg);display:flex;border-radius:4px}.top-panel-breadcrumb-title[data-v-b9015c33] .reference-wrapper{line-height:22px}.top-panel-breadcrumb .tiny-breadcrumb[data-v-b9015c33]{line-height:var(--base-top-panel-breadcrumb-line-height);padding-right:4px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:12px;cursor:inherit}.top-panel-breadcrumb .tiny-breadcrumb__item[data-v-b9015c33]{cursor:inherit;-webkit-user-select:none;user-select:none}.top-panel-breadcrumb .tiny-breadcrumb__item[data-v-b9015c33] .tiny-breadcrumb__inner{color:var(--ti-lowcode-media-popover-title-color);text-decoration:none;cursor:pointer}.top-panel-breadcrumb .tiny-breadcrumb__item[data-v-b9015c33] .tiny-breadcrumb__separator{padding:0;margin:0 4px 0 0}.top-panel-breadcrumb .tiny-breadcrumb__item[data-v-b9015c33]:last-child .tiny-breadcrumb__inner{font-weight:400;color:var(--ti-lowcode-media-popover-title-color)}.top-panel-breadcrumb-title-block[data-v-b9015c33]{background-color:var(--ti-lowcode-toolbar-breadcrumb-bg)}.top-panel-breadcrumb-title-block .tiny-breadcrumb__item[data-v-b9015c33] .tiny-breadcrumb__inner{color:var(--ti-lowcode-toolbar-breadcrumb-left-color)}.top-panel-breadcrumb-title-block .tiny-breadcrumb__item[data-v-b9015c33]:last-child .tiny-breadcrumb__inner{color:var(--ti-lowcode-toolbar-breadcrumb-left-color)}.top-panel-breadcrumb-title-block[data-v-b9015c33]:hover{background-color:var(--ti-lowcode-toolbar-breadcrumb-bg-hover)}.top-panel-breadcrumb .publish[data-v-b9015c33]{margin:0 8px;height:24px;line-height:24px;min-width:40px;font-size:12px}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentiny/tiny-engine-toolbar-breadcrumb",
3
- "version": "2.1.0-rc.0",
3
+ "version": "2.1.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.1.0-rc.0",
29
- "@opentiny/tiny-engine-meta-register": "2.1.0-rc.0",
30
- "@opentiny/tiny-engine-utils": "2.1.0-rc.0"
28
+ "@opentiny/tiny-engine-common": "2.1.0",
29
+ "@opentiny/tiny-engine-meta-register": "2.1.0",
30
+ "@opentiny/tiny-engine-utils": "2.1.0"
31
31
  },
32
32
  "devDependencies": {
33
- "@opentiny/tiny-engine-vite-plugin-meta-comments": "2.1.0-rc.0",
33
+ "@opentiny/tiny-engine-vite-plugin-meta-comments": "2.1.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.14.0",
40
40
  "vue": "^3.4.15"
41
41
  },
42
- "gitHead": "71a3549d5f1d38d2ed3934ce83b722b11878aa7c"
42
+ "gitHead": "faf3072c75ea5024689972e2a687916e084c156f"
43
43
  }