@opentiny/tiny-engine-toolbar-breadcrumb 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 +93 -56
- package/dist/style.css +1 -1
- package/package.json +9 -6
package/dist/index.js
CHANGED
|
@@ -1,84 +1,121 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import { reactive as
|
|
3
|
-
import { Breadcrumb as
|
|
4
|
-
import { useBreadcrumb as
|
|
5
|
-
import { BlockDeployDialog as
|
|
6
|
-
const
|
|
7
|
-
const
|
|
2
|
+
import { reactive as N, computed as C, resolveComponent as l, openBlock as i, createElementBlock as f, Fragment as v, createElementVNode as D, createVNode as k, withCtx as b, renderList as x, createBlock as E, createTextVNode as S, toDisplayString as I, createCommentVNode as O, ref as A } from "vue";
|
|
3
|
+
import { Breadcrumb as L, BreadcrumbItem as V, Button as P } from "@opentiny/vue";
|
|
4
|
+
import { useLayout as h, useBreadcrumb as w, HOOK_NAME as G } from "@opentiny/tiny-engine-meta-register";
|
|
5
|
+
import { BlockDeployDialog as K } from "@opentiny/tiny-engine-common";
|
|
6
|
+
const X = (o, t) => {
|
|
7
|
+
const r = o.__vccOpts || o;
|
|
8
8
|
for (const [e, a] of t)
|
|
9
|
-
|
|
10
|
-
return
|
|
11
|
-
},
|
|
9
|
+
r[e] = a;
|
|
10
|
+
return r;
|
|
11
|
+
}, M = {
|
|
12
12
|
components: {
|
|
13
|
-
TinyBreadcrumb:
|
|
13
|
+
TinyBreadcrumb: L,
|
|
14
14
|
TinyBreadcrumbItem: V,
|
|
15
|
-
BlockDeployDialog:
|
|
16
|
-
TinyButton:
|
|
15
|
+
BlockDeployDialog: K,
|
|
16
|
+
TinyButton: P
|
|
17
17
|
},
|
|
18
18
|
setup() {
|
|
19
|
-
const
|
|
19
|
+
const o = {
|
|
20
|
+
PAGEID: "engine.plugins.appmanage",
|
|
21
|
+
BLOCKID: "engine.plugins.blockmanage"
|
|
22
|
+
}, { layoutState: t } = h(), { plugins: r } = t || {}, e = N({
|
|
20
23
|
showDeployBlock: !1
|
|
21
|
-
}), { CONSTANTS:
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
const
|
|
25
|
-
let
|
|
26
|
-
return
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
}),
|
|
24
|
+
}), { CONSTANTS: a, getBreadcrumbData: m } = w(), c = m(), u = () => {
|
|
25
|
+
e.showDeployBlock = !0;
|
|
26
|
+
}, d = C(() => {
|
|
27
|
+
const n = m().value[2] || [];
|
|
28
|
+
let y = "1.0.0", T = 0;
|
|
29
|
+
return n.forEach((s) => {
|
|
30
|
+
const g = new Date(s.created_at).getTime();
|
|
31
|
+
g > T && (T = g, y = s.version);
|
|
32
|
+
}), y.replace(/\d+$/, (s) => Number(s) + 1);
|
|
30
33
|
});
|
|
31
34
|
return {
|
|
32
|
-
breadcrumbData:
|
|
33
|
-
publishBlock:
|
|
34
|
-
state:
|
|
35
|
-
nextVersion:
|
|
36
|
-
CONSTANTS:
|
|
35
|
+
breadcrumbData: c,
|
|
36
|
+
publishBlock: u,
|
|
37
|
+
state: e,
|
|
38
|
+
nextVersion: d,
|
|
39
|
+
CONSTANTS: a,
|
|
40
|
+
open: () => {
|
|
41
|
+
r && (r.render = c.value[0] === a.PAGETEXT ? o.PAGEID : o.BLOCKID);
|
|
42
|
+
}
|
|
37
43
|
};
|
|
38
44
|
}
|
|
39
|
-
},
|
|
40
|
-
function
|
|
41
|
-
const
|
|
42
|
-
return
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
45
|
+
}, U = { class: "top-panel-breadcrumb" }, z = { class: "top-panel-breadcrumb-title" };
|
|
46
|
+
function F(o, t, r, e, a, m) {
|
|
47
|
+
const c = l("tiny-breadcrumb-item"), u = l("tiny-breadcrumb"), d = l("tiny-button"), B = l("block-deploy-dialog");
|
|
48
|
+
return i(), f(v, null, [
|
|
49
|
+
D("div", U, [
|
|
50
|
+
D("div", z, [
|
|
51
|
+
k(u, {
|
|
52
|
+
separator: ":",
|
|
53
|
+
onSelect: e.open
|
|
54
|
+
}, {
|
|
55
|
+
default: b(() => [
|
|
56
|
+
(i(!0), f(v, null, x(e.breadcrumbData.slice(0, 2), (n) => (i(), E(c, { key: n }, {
|
|
57
|
+
default: b(() => [
|
|
58
|
+
S(I(n), 1)
|
|
59
|
+
]),
|
|
60
|
+
_: 2
|
|
61
|
+
}, 1024))), 128))
|
|
62
|
+
]),
|
|
63
|
+
_: 1
|
|
64
|
+
}, 8, ["onSelect"])
|
|
65
|
+
]),
|
|
66
|
+
e.breadcrumbData[0] === e.CONSTANTS.BLOCKTEXT ? (i(), E(d, {
|
|
56
67
|
key: 0,
|
|
57
68
|
class: "publish",
|
|
58
|
-
onClick: t[0] || (t[0] = (
|
|
69
|
+
onClick: t[0] || (t[0] = (n) => e.publishBlock()),
|
|
59
70
|
type: "primary",
|
|
60
71
|
size: "small"
|
|
61
72
|
}, {
|
|
62
|
-
default:
|
|
63
|
-
|
|
64
|
-
]),
|
|
73
|
+
default: b(() => t[2] || (t[2] = [
|
|
74
|
+
S("区块")
|
|
75
|
+
])),
|
|
65
76
|
_: 1
|
|
66
|
-
})) :
|
|
77
|
+
})) : O("", !0)
|
|
67
78
|
]),
|
|
68
|
-
|
|
79
|
+
k(B, {
|
|
69
80
|
visible: e.state.showDeployBlock,
|
|
70
|
-
"onUpdate:visible": t[1] || (t[1] = (
|
|
81
|
+
"onUpdate:visible": t[1] || (t[1] = (n) => e.state.showDeployBlock = n),
|
|
71
82
|
nextVersion: e.nextVersion
|
|
72
83
|
}, null, 8, ["visible", "nextVersion"])
|
|
73
84
|
], 64);
|
|
74
85
|
}
|
|
75
|
-
const
|
|
76
|
-
id: "breadcrumb",
|
|
86
|
+
const H = /* @__PURE__ */ X(M, [["render", F], ["__scopeId", "data-v-d83c9985"]]), j = {
|
|
87
|
+
id: "engine.toolbars.breadcrumb",
|
|
88
|
+
type: "toolbars",
|
|
77
89
|
title: "breadcrumb",
|
|
78
90
|
icon: "",
|
|
79
|
-
align: "left"
|
|
80
|
-
|
|
91
|
+
align: "left"
|
|
92
|
+
};
|
|
93
|
+
let p = A([]);
|
|
94
|
+
const _ = {
|
|
95
|
+
PAGETEXT: "页面",
|
|
96
|
+
BLOCKTEXT: "区块"
|
|
97
|
+
}, q = (o) => {
|
|
98
|
+
p.value = [_.PAGETEXT, ...o], sessionStorage.setItem("pageInfo", o);
|
|
99
|
+
}, J = (o, t = []) => {
|
|
100
|
+
p.value = [_.BLOCKTEXT, ...o, t];
|
|
101
|
+
}, Q = () => p, R = () => ({
|
|
102
|
+
CONSTANTS: _,
|
|
103
|
+
setBreadcrumbPage: q,
|
|
104
|
+
setBreadcrumbBlock: J,
|
|
105
|
+
getBreadcrumbData: Q
|
|
106
|
+
}), W = {
|
|
107
|
+
id: "engine.service.breadcrumb",
|
|
108
|
+
type: "MetaService",
|
|
109
|
+
apis: R(),
|
|
110
|
+
composable: {
|
|
111
|
+
name: G.useBreadcrumb
|
|
112
|
+
}
|
|
113
|
+
}, oe = {
|
|
114
|
+
...j,
|
|
115
|
+
entry: H,
|
|
116
|
+
metas: [W]
|
|
81
117
|
};
|
|
82
118
|
export {
|
|
83
|
-
|
|
119
|
+
W as BreadcrumbService,
|
|
120
|
+
oe as default
|
|
84
121
|
};
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.top-panel-breadcrumb[data-v-
|
|
1
|
+
.top-panel-breadcrumb[data-v-d83c9985]{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-d83c9985]{height:28px;padding:0 8px;background-color:var(--ti-lowcode-toolbar-breadcrumb-bg);display:flex;border-radius:4px}.top-panel-breadcrumb-title[data-v-d83c9985] .reference-wrapper{line-height:22px}.top-panel-breadcrumb-title[data-v-d83c9985]:hover{background-color:var(--ti-lowcode-toolbar-breadcrumb-bg-hover)}.top-panel-breadcrumb .tiny-breadcrumb[data-v-d83c9985]{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-d83c9985]{cursor:inherit;-webkit-user-select:none;user-select:none}.top-panel-breadcrumb .tiny-breadcrumb__item[data-v-d83c9985] .tiny-breadcrumb__inner{color:var(--ti-lowcode-toolbar-breadcrumb-left-color);text-decoration:none;cursor:pointer}.top-panel-breadcrumb .tiny-breadcrumb__item[data-v-d83c9985] .tiny-breadcrumb__separator{padding:0;margin:0 4px 0 0}.top-panel-breadcrumb .tiny-breadcrumb__item[data-v-d83c9985]:last-child .tiny-breadcrumb__inner{font-weight:400;color:var(--ti-lowcode-toolbar-breadcrumb-left-color)}.top-panel-breadcrumb .publish[data-v-d83c9985]{margin-left:8px;height:28px;line-height:28px}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentiny/tiny-engine-toolbar-breadcrumb",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-alpha.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -24,17 +24,20 @@
|
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"homepage": "https://opentiny.design/tiny-engine",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@opentiny/tiny-engine-common": "
|
|
28
|
-
"@opentiny/tiny-engine-
|
|
29
|
-
"@opentiny/
|
|
27
|
+
"@opentiny/tiny-engine-common": "2.0.0-alpha.1",
|
|
28
|
+
"@opentiny/tiny-engine-http": "2.0.0-alpha.1",
|
|
29
|
+
"@opentiny/tiny-engine-meta-register": "2.0.0-alpha.1",
|
|
30
|
+
"@opentiny/tiny-engine-utils": "2.0.0-alpha.1"
|
|
30
31
|
},
|
|
31
32
|
"devDependencies": {
|
|
33
|
+
"@opentiny/tiny-engine-vite-plugin-meta-comments": "2.0.0-alpha.1",
|
|
32
34
|
"@vitejs/plugin-vue": "^4.2.3",
|
|
33
|
-
"@vitejs/plugin-vue-jsx": "^1.
|
|
35
|
+
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
|
34
36
|
"vite": "^4.3.7"
|
|
35
37
|
},
|
|
36
38
|
"peerDependencies": {
|
|
39
|
+
"@opentiny/vue": "^3.14.0",
|
|
37
40
|
"vue": "^3.4.15"
|
|
38
41
|
},
|
|
39
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "f15ccc5dde391288bf4297e3ffc35aab52651f3d"
|
|
40
43
|
}
|