@ftlab/one-vue3 0.3.8-6 → 0.4.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 (56) hide show
  1. package/CHANGELOG.md +36 -146
  2. package/README.md +143 -61
  3. package/assets/css/index.scss +25 -25
  4. package/assets/css/mixin.scss +142 -142
  5. package/assets/css/public.scss +175 -175
  6. package/assets/img/Germany.png +0 -0
  7. package/components.d.ts +6 -3
  8. package/dist/CheckMessageDialog-DygR717d.js +78 -0
  9. package/dist/FtlEntry.js +109 -0
  10. package/dist/FtlMessage.js +186 -0
  11. package/dist/FtlMultipleChoose-D8o09guU.js +312 -0
  12. package/dist/FtlMultipleChoose.js +1 -0
  13. package/dist/FtlNavbar-SsenWatk.js +191 -0
  14. package/dist/FtlNavbar.js +1 -0
  15. package/dist/FtlPasswordDialog-Dj_vS0mC.js +188 -0
  16. package/dist/FtlPasswordDialog.js +1 -0
  17. package/dist/FtlSidebar-D5AkRjgA.js +159 -0
  18. package/dist/FtlSidebar.js +1 -0
  19. package/dist/_plugin-vue_export-helper-Djzt4Yr7.js +7 -0
  20. package/dist/asyncToGenerator-CENKRPhX.js +26 -0
  21. package/dist/configProvider-CFU3sEdy.js +6 -0
  22. package/dist/ftlOne.js +16 -13
  23. package/dist/langSelect-DdbxrMFQ.js +106 -0
  24. package/dist/objectSpread2-Bpgh6RJW.js +57 -0
  25. package/dist/storage-DBeiC15W.js +25 -0
  26. package/dist/store.js +39 -98
  27. package/dist/style.css +2 -1
  28. package/dist/utils-BuLanift.js +10 -0
  29. package/dist/utils.js +558 -475
  30. package/eslint.config.js +34 -0
  31. package/ftlab-one-vue3-0.4.0.tgz +0 -0
  32. package/global.d.ts +63 -63
  33. package/i18n/cn.json +22 -22
  34. package/i18n/de.json +23 -0
  35. package/i18n/en.json +22 -22
  36. package/i18n/es.json +23 -0
  37. package/i18n/fr.json +22 -22
  38. package/package.json +119 -74
  39. package/vitest.config.ts +8 -0
  40. package/.eslintrc.cjs +0 -24
  41. package/.prettierrc.cjs +0 -18
  42. package/dist/CheckMessageDialog-0f85dbee.js +0 -167
  43. package/dist/index-2284be94.js +0 -15036
  44. package/dist/storage-9f2ae3ed.js +0 -30
  45. package/dist/utils-0eda3e43.js +0 -17
  46. package/dist/vuex.esm-bundler-2a047356.js +0 -770
  47. package/function/index.ts +0 -4
  48. package/function/info.js +0 -17
  49. package/function/permission.js +0 -17
  50. package/store/app.js +0 -24
  51. package/store/auth.js +0 -87
  52. package/store/index.ts +0 -10
  53. package/utils/date.ts +0 -127
  54. package/utils/index.ts +0 -3
  55. package/utils/storage.js +0 -27
  56. package/utils/utils.ts +0 -10
@@ -0,0 +1 @@
1
+ export { t as default } from "./FtlMultipleChoose-D8o09guU.js";
@@ -0,0 +1,191 @@
1
+ import { t as e } from "./objectSpread2-Bpgh6RJW.js";
2
+ import { t } from "./asyncToGenerator-CENKRPhX.js";
3
+ import { t as n } from "./FtlPasswordDialog-Dj_vS0mC.js";
4
+ import { t as r } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
5
+ import { ElBreadcrumb as ee, ElBreadcrumbItem as te, ElIcon as i, ElMessage as a, ElPopover as o } from "element-plus";
6
+ import { Fragment as ne, TransitionGroup as re, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, createVNode as p, defineAsyncComponent as m, defineComponent as h, getCurrentInstance as g, mergeProps as _, normalizeProps as v, normalizeStyle as y, openBlock as b, ref as x, renderList as S, renderSlot as C, resolveDynamicComponent as ie, toDisplayString as w, unref as T, vShow as E, watch as ae, withCtx as D, withDirectives as O } from "vue";
7
+ import { useAuthStore as k, useLangStore as A } from "@ftlab/one-vue3/store";
8
+ import { ArrowDown as j, Back as M, Expand as N, Fold as P, FullScreen as F, Lock as I } from "@element-plus/icons-vue";
9
+ import { useI18n as L } from "vue-i18n";
10
+ // package/FtlNavbar/index.vue?vue&type=script&setup=true&lang.ts
11
+ var R = { class: "f-c" }, z = { class: "f-c" }, B = { class: "ml15 cp f-c" }, V = { class: "mr5" }, H = /*@__PURE__*/ h(e(e(e({}, { inheritAttrs: !1 }), { name: "FtlNavbar" }), {}, {
12
+ __name: "index",
13
+ props: {
14
+ sidebar: {
15
+ type: Boolean,
16
+ default: !0
17
+ },
18
+ isShowBreadcrumb: {
19
+ type: Boolean,
20
+ default: !0
21
+ },
22
+ isShowScreenfull: {
23
+ type: Boolean,
24
+ default: !0
25
+ },
26
+ isShowLangCode: {
27
+ type: Boolean,
28
+ default: !0
29
+ },
30
+ isShowMessage: {
31
+ type: Boolean,
32
+ default: !0
33
+ },
34
+ needChangePassword: {
35
+ type: Boolean,
36
+ default: !0
37
+ },
38
+ langCodeList: { default: () => [
39
+ "en",
40
+ "cn",
41
+ "fr",
42
+ "es",
43
+ "de",
44
+ "or"
45
+ ] },
46
+ logOutText: { default: "" }
47
+ },
48
+ emits: [
49
+ "logout",
50
+ "update:sidebar",
51
+ "changeLanguage"
52
+ ],
53
+ setup(e, { emit: r }) {
54
+ var h;
55
+ let H = m(() => import("./langSelect-DdbxrMFQ.js")), U = k(), W = A(), { locale: G } = L(), K = (h = g()) == null ? void 0 : h.appContext.config.globalProperties, q = x(null), oe = (e) => {
56
+ W.setLanguage(e), G.value = e, Q("changeLanguage"), K.$bus && K.$bus.emit("languageChange");
57
+ }, J = x([]), se = (e) => {
58
+ let t = U.resources.find((t) => t.name === e);
59
+ t && (J.value.unshift(t), Y(t));
60
+ }, Y = (e) => {
61
+ if (e && e.parentId) {
62
+ let t = U.resources.find((t) => t.id === e.parentId);
63
+ t && (J.value.unshift(t), Y(t));
64
+ }
65
+ };
66
+ ae(() => K.$route.name, (e) => {
67
+ J.value = [], e && se(e);
68
+ }, { immediate: !0 });
69
+ let X = e, Z = s(() => X.isShowMessage ? m(() => import("./FtlMessage.js")) : null), Q = r, ce = () => {
70
+ Q("update:sidebar", !X.sidebar), K.$bus && K.$bus.emit("toggleChange");
71
+ }, le = () => {
72
+ U.logout(), Q("logout");
73
+ }, $ = function() {
74
+ var e = t(function* () {
75
+ let e = yield import("screenfull"), t = e.default || e;
76
+ if (!t.isEnabled) return a.warning("you browser can not work");
77
+ t.toggle();
78
+ });
79
+ return function() {
80
+ return e.apply(this, arguments);
81
+ };
82
+ }(), ue = () => {
83
+ q.value.openDialog();
84
+ };
85
+ return (t, r) => {
86
+ let a = i, s = te, m = ee, h = o;
87
+ return b(), u("div", {
88
+ class: "f-s-c navbar-box",
89
+ style: y(`width:calc(100vw - ${e.sidebar ? "248px" : "72px"})`)
90
+ }, [
91
+ d("div", R, [
92
+ C(t.$slots, "tabsMenu-l", {}, void 0, !0),
93
+ d("div", {
94
+ class: "level-bar-toggle-button mr20",
95
+ onClick: ce
96
+ }, [O(p(a, { size: 20 }, {
97
+ default: D(() => [p(T(N))]),
98
+ _: 1
99
+ }, 512), [[E, !e.sidebar]]), O(p(a, { size: 20 }, {
100
+ default: D(() => [p(T(P))]),
101
+ _: 1
102
+ }, 512), [[E, e.sidebar]])]),
103
+ C(t.$slots, "tabsMenu-c", {}, void 0, !0),
104
+ e.isShowBreadcrumb ? (b(), c(m, {
105
+ key: 0,
106
+ separator: "/"
107
+ }, {
108
+ default: D(() => [p(re, { name: "breadcrumb" }, {
109
+ default: D(() => [(b(!0), u(ne, null, S(T(J), (e) => (b(), c(s, { key: e.id }, {
110
+ default: D(() => [f(w(e[T(W).language]), 1)]),
111
+ _: 2
112
+ }, 1024))), 128))]),
113
+ _: 1
114
+ })]),
115
+ _: 1
116
+ })) : l("", !0),
117
+ C(t.$slots, "tabsMenu-r", {}, void 0, !0)
118
+ ]),
119
+ d("div", z, [
120
+ C(t.$slots, "default", {}, void 0, !0),
121
+ C(t.$slots, "message-l", {}, void 0, !0),
122
+ T(Z) ? (b(), c(ie(T(Z)), v(_({ key: 0 }, t.$attrs)), null, 16)) : l("", !0),
123
+ C(t.$slots, "message-r", {}, void 0, !0),
124
+ e.isShowScreenfull ? (b(), c(a, {
125
+ key: 1,
126
+ size: 20,
127
+ onClick: $,
128
+ class: "cp mr15"
129
+ }, {
130
+ default: D(() => [p(T(F))]),
131
+ _: 1
132
+ })) : l("", !0),
133
+ C(t.$slots, "right-l", {}, void 0, !0),
134
+ e.isShowLangCode ? (b(), c(T(H), {
135
+ key: 2,
136
+ "lang-code-list": e.langCodeList,
137
+ language: T(W).language,
138
+ onSelect: oe
139
+ }, null, 8, ["lang-code-list", "language"])) : l("", !0),
140
+ C(t.$slots, "right-c", {}, void 0, !0),
141
+ p(h, {
142
+ placement: "bottom",
143
+ trigger: "click"
144
+ }, {
145
+ reference: D(() => [d("div", B, [d("span", V, w(T(U).username), 1), p(a, { size: 16 }, {
146
+ default: D(() => [p(T(j))]),
147
+ _: 1
148
+ })])]),
149
+ default: D(() => [
150
+ C(t.$slots, "userMenu", {}, void 0, !0),
151
+ e.needChangePassword ? (b(), u("div", {
152
+ key: 0,
153
+ class: "cp mb5",
154
+ onClick: ue
155
+ }, [p(a, {
156
+ size: 16,
157
+ style: {
158
+ width: "25px",
159
+ "vertical-align": "sub"
160
+ }
161
+ }, {
162
+ default: D(() => [p(T(I))]),
163
+ _: 1
164
+ }), f(" " + w(t.$t("ftlOne.changePassword")), 1)])) : l("", !0),
165
+ d("div", {
166
+ class: "cp",
167
+ onClick: le
168
+ }, [p(a, {
169
+ size: 16,
170
+ style: {
171
+ width: "25px",
172
+ "vertical-align": "sub"
173
+ }
174
+ }, {
175
+ default: D(() => [p(T(M))]),
176
+ _: 1
177
+ }), f(" " + w(t.$t("ftlOne.exit")), 1)])
178
+ ]),
179
+ _: 3
180
+ }),
181
+ C(t.$slots, "right-r", {}, void 0, !0)
182
+ ]),
183
+ p(n, _({
184
+ ref_key: "ftlPasswordDialogRef",
185
+ ref: q
186
+ }, t.$attrs), null, 16)
187
+ ], 4);
188
+ };
189
+ }
190
+ })), U = /*#__PURE__*/ r(H, [["__scopeId", "data-v-76ec61cd"]]);
191
+ export { U as t };
@@ -0,0 +1 @@
1
+ export { t as default } from "./FtlNavbar-SsenWatk.js";
@@ -0,0 +1,188 @@
1
+ import { t as e } from "./objectSpread2-Bpgh6RJW.js";
2
+ import { t } from "./asyncToGenerator-CENKRPhX.js";
3
+ import { t as n } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
4
+ import { ElButton as r, ElDialog as i, ElForm as a, ElFormItem as o, ElInput as s, ElLoading as c } from "element-plus";
5
+ import { createBlock as l, createCommentVNode as u, createElementVNode as d, createTextVNode as f, createVNode as p, defineComponent as m, getCurrentInstance as h, isRef as g, nextTick as _, onBeforeUnmount as v, onMounted as y, openBlock as b, reactive as x, ref as S, toDisplayString as C, unref as w, withCtx as T } from "vue";
6
+ import { useAuthStore as E } from "@ftlab/one-vue3/store";
7
+ // package/FtlPasswordDialog/index.vue?vue&type=script&setup=true&lang.ts
8
+ var D = { class: "ftlOne-changePasswordDialog" }, O = { style: {
9
+ "margin-left": "60px",
10
+ "margin-bottom": "20px"
11
+ } }, k = { class: "require_label" }, A = { class: "mt15 tr" }, j = /*@__PURE__*/ m(e(e({}, { name: "FtlPasswordDialog" }), {}, {
12
+ __name: "index",
13
+ setup(e, { expose: n }) {
14
+ var m;
15
+ let j = (m = h()) == null ? void 0 : m.appContext.config.globalProperties, M = E(), N = S(), P = S(!1), F = S(!1), I = x({
16
+ oldPassword: "",
17
+ newPassword: "",
18
+ confirmPassword: ""
19
+ }), L = (e, t, n) => {
20
+ t === "" ? n(Error(j.$t("ftlOne.changePassword.confirmPassword.placeholder"))) : t === I.newPassword ? n() : n(Error(j.$t("ftlOne.changePassword.confirmPassword.error1")));
21
+ }, R = () => {
22
+ F.value = !0, P.value = !0;
23
+ }, z = function() {
24
+ var e = t(function* () {
25
+ let { default: e } = yield import("axios"), t = yield e({
26
+ url: "/api/accounts/me",
27
+ method: "get",
28
+ headers: { Authorization: localStorage.getItem("token") || "" }
29
+ });
30
+ F.value = t.data.passwordExpirationFlag, F.value && (P.value = !0);
31
+ });
32
+ return function() {
33
+ return e.apply(this, arguments);
34
+ };
35
+ }(), B = () => {
36
+ P.value = !1, I.oldPassword = "", I.newPassword = "", I.confirmPassword = "", F.value = !1, _(() => {
37
+ var e;
38
+ (e = N.value) == null || e.clearValidate();
39
+ });
40
+ }, V = function() {
41
+ var e = t(function* () {
42
+ if (!N.value) return;
43
+ let { default: e } = yield import("axios");
44
+ yield N.value.validate(function() {
45
+ var n = t(function* (t) {
46
+ if (t) {
47
+ let t = c.service({ target: document.querySelector(".ftlOne-changePasswordDialog") }), o = localStorage.getItem("token") || "";
48
+ try {
49
+ var n;
50
+ yield e({
51
+ url: "/api/accounts/me/changePassword",
52
+ method: "post",
53
+ headers: { Authorization: o },
54
+ data: I
55
+ }), window.$message.success("success"), t.close(), B(), (n = j.$bus) == null || n.emit("changeWordSuccess");
56
+ } catch (e) {
57
+ var r, i, a;
58
+ t.close(), (r = window) == null || r.$message.error((e == null || (i = e.response) == null || (i = i.data) == null ? void 0 : i.i18n) || (e == null || (a = e.response) == null || (a = a.data) == null ? void 0 : a.message));
59
+ }
60
+ }
61
+ });
62
+ return function(e) {
63
+ return n.apply(this, arguments);
64
+ };
65
+ }());
66
+ });
67
+ return function() {
68
+ return e.apply(this, arguments);
69
+ };
70
+ }();
71
+ return y(() => {
72
+ var e, t;
73
+ (e = j.$bus) == null || e.on("getFlag", z), (t = j.$bus) == null || t.on("setFlag", R);
74
+ }), v(() => {
75
+ var e, t;
76
+ (e = j.$bus) == null || e.off("toGetFlag"), (t = j.$bus) == null || t.off("setFlag");
77
+ }), n({ openDialog: () => {
78
+ P.value = !0;
79
+ } }), (e, t) => {
80
+ let n = s, c = o, m = r, h = a, _ = i;
81
+ return b(), l(_, {
82
+ modelValue: w(P),
83
+ "onUpdate:modelValue": t[3] || (t[3] = (e) => g(P) ? P.value = e : null),
84
+ title: e.$t("ftlOne.changePassword"),
85
+ width: "40%",
86
+ "append-to-body": "",
87
+ "close-on-click-modal": !1,
88
+ "show-close": !w(F),
89
+ "close-on-press-escape": !w(F),
90
+ onClose: B
91
+ }, {
92
+ default: T(() => [d("div", D, [d("div", O, [d("h3", null, C(w(M).username) + ", " + C(w(F) ? e.$t("ftlOne.changePassword.holder1") : e.$t("ftlOne.changePassword.holder2")), 1)]), p(h, {
93
+ ref_key: "passwordRef",
94
+ ref: N,
95
+ model: w(I),
96
+ "label-width": "145px"
97
+ }, {
98
+ default: T(() => [
99
+ p(c, {
100
+ label: e.$t("ftlOne.changePassword.oldPassword"),
101
+ prop: "oldPassword",
102
+ rules: [{
103
+ required: !0,
104
+ message: e.$t("ftlOne.changePassword.oldPassword.placeholder"),
105
+ trigger: "blur"
106
+ }]
107
+ }, {
108
+ default: T(() => [p(n, {
109
+ modelValue: w(I).oldPassword,
110
+ "onUpdate:modelValue": t[0] || (t[0] = (e) => w(I).oldPassword = e),
111
+ "show-password": "",
112
+ placeholder: e.$t("ftlOne.changePassword.oldPassword.placeholder")
113
+ }, null, 8, ["modelValue", "placeholder"])]),
114
+ _: 1
115
+ }, 8, ["label", "rules"]),
116
+ p(c, {
117
+ label: e.$t("ftlOne.changePassword.newPassword"),
118
+ prop: "newPassword",
119
+ rules: [
120
+ {
121
+ required: !0,
122
+ message: e.$t("ftlOne.changePassword.newPassword.placeholder"),
123
+ trigger: "blur"
124
+ },
125
+ {
126
+ pattern: /^(?=.*?[a-z])(?=.*?[A-Z])(?!\D+$)/,
127
+ message: e.$t("ftlOne.changePassword.newPassword.error1"),
128
+ trigger: "blur"
129
+ },
130
+ {
131
+ min: 8,
132
+ max: 16,
133
+ message: e.$t("ftlOne.changePassword.newPassword.error2"),
134
+ trigger: "blur"
135
+ }
136
+ ]
137
+ }, {
138
+ default: T(() => [p(n, {
139
+ modelValue: w(I).newPassword,
140
+ "onUpdate:modelValue": t[1] || (t[1] = (e) => w(I).newPassword = e),
141
+ "show-password": "",
142
+ placeholder: e.$t("ftlOne.changePassword.newPassword.placeholder")
143
+ }, null, 8, ["modelValue", "placeholder"])]),
144
+ _: 1
145
+ }, 8, ["label", "rules"]),
146
+ p(c, {
147
+ prop: "confirmPassword",
148
+ rules: [{
149
+ validator: L,
150
+ trigger: "blur"
151
+ }]
152
+ }, {
153
+ label: T(() => [d("div", k, C(e.$t("ftlOne.changePassword.confirmPassword")), 1)]),
154
+ default: T(() => [p(n, {
155
+ modelValue: w(I).confirmPassword,
156
+ "onUpdate:modelValue": t[2] || (t[2] = (e) => w(I).confirmPassword = e),
157
+ "show-password": "",
158
+ placeholder: e.$t("ftlOne.changePassword.confirmPassword.placeholder")
159
+ }, null, 8, ["modelValue", "placeholder"])]),
160
+ _: 1
161
+ }, 8, ["rules"]),
162
+ d("div", A, [w(F) ? u("", !0) : (b(), l(m, {
163
+ key: 0,
164
+ onClick: B
165
+ }, {
166
+ default: T(() => [f(C(e.$t("ftlOne.changePassword.cancel")), 1)]),
167
+ _: 1
168
+ })), p(m, {
169
+ type: "primary",
170
+ onClick: V
171
+ }, {
172
+ default: T(() => [f(C(e.$t("ftlOne.changePassword.save")), 1)]),
173
+ _: 1
174
+ })])
175
+ ]),
176
+ _: 1
177
+ }, 8, ["model"])])]),
178
+ _: 1
179
+ }, 8, [
180
+ "modelValue",
181
+ "title",
182
+ "show-close",
183
+ "close-on-press-escape"
184
+ ]);
185
+ };
186
+ }
187
+ })), M = /*#__PURE__*/ n(j, [["__scopeId", "data-v-6006d849"]]);
188
+ export { M as t };
@@ -0,0 +1 @@
1
+ export { t as default } from "./FtlPasswordDialog-Dj_vS0mC.js";
@@ -0,0 +1,159 @@
1
+ import { t as e } from "./objectSpread2-Bpgh6RJW.js";
2
+ import { t } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
3
+ import { ElMenu as n, ElMenuItem as r, ElSubMenu as i } from "element-plus";
4
+ import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineAsyncComponent as p, defineComponent as m, getCurrentInstance as h, inject as g, mergeProps as _, normalizeClass as v, normalizeProps as y, normalizeStyle as b, openBlock as x, provide as S, renderList as C, renderSlot as w, resolveComponent as T, toDisplayString as E, unref as D, withCtx as O } from "vue";
5
+ import { useAuthStore as k, useLangStore as A } from "@ftlab/one-vue3/store";
6
+ // package/FtlSidebar/components/sideMenus.vue
7
+ var j = /*#__PURE__*/ t(/* @__PURE__ */ m({
8
+ __name: "sideMenus",
9
+ props: {
10
+ menus: { default: () => [] },
11
+ useIconPark: {
12
+ type: Boolean,
13
+ default: !1
14
+ },
15
+ useIconFont: {
16
+ type: Boolean,
17
+ default: !1
18
+ },
19
+ i18n: {
20
+ type: Boolean,
21
+ default: !1
22
+ }
23
+ },
24
+ setup(e) {
25
+ let t = A(), n = (e) => !!e.find((e) => e.type === "MENU"), o = g("collapse");
26
+ return (d, p) => {
27
+ let m = T("icon-park"), h = i, g = r;
28
+ return x(!0), l(a, null, C(e.menus, (r) => (x(), l(a, null, [r.children && r.children.length && n(r.children) && r.type === "MENU" ? (x(), s(h, {
29
+ key: r.id,
30
+ index: r.name
31
+ }, {
32
+ title: O(() => [e.useIconFont && r.iconFont ? (x(), l("i", {
33
+ key: 0,
34
+ class: v(["iconfont fs20 mr15", r.iconFont])
35
+ }, null, 2)) : e.useIconPark && r.iconPark ? (x(), s(m, {
36
+ key: 1,
37
+ type: r.iconPark,
38
+ style: b({
39
+ marginRight: D(o) ? "15px" : "",
40
+ marginTop: "-2px"
41
+ }),
42
+ class: "fs19 one-sidebar__iconPark f-s-c"
43
+ }, null, 8, ["type", "style"])) : !e.useIconFont && !e.useIconPark && r.icon ? (x(), l("i", {
44
+ key: 2,
45
+ class: v([r.icon, "fs16 mr15"])
46
+ }, null, 2)) : c("", !0), u("span", null, E(e.i18n ? d.$t(r.name) : r[D(t).language]), 1)]),
47
+ default: O(() => [f(j, {
48
+ menus: r.children,
49
+ "use-icon-park": e.useIconPark,
50
+ "use-icon-font": e.useIconFont,
51
+ i18n: e.i18n
52
+ }, null, 8, [
53
+ "menus",
54
+ "use-icon-park",
55
+ "use-icon-font",
56
+ "i18n"
57
+ ])]),
58
+ _: 2
59
+ }, 1032, ["index"])) : r.type === "MENU" ? (x(), s(g, {
60
+ key: r.id + 100,
61
+ index: r.name,
62
+ class: "custom-menu-item"
63
+ }, {
64
+ title: O(() => [u("span", null, E(e.i18n ? d.$t(r.name) : r[D(t).language]), 1)]),
65
+ default: O(() => [e.useIconFont && r.iconFont ? (x(), l("i", {
66
+ key: 0,
67
+ class: v(["iconfont fs20 mr15", r.iconFont])
68
+ }, null, 2)) : e.useIconPark && r.iconPark ? (x(), s(m, {
69
+ key: 1,
70
+ type: r.iconPark,
71
+ class: "fs19 f-s-c mr15"
72
+ }, null, 8, ["type"])) : !e.useIconFont && !e.useIconPark && r.icon ? (x(), l("i", {
73
+ key: 2,
74
+ class: v([r.icon, "fs16 mr15"])
75
+ }, null, 2)) : c("", !0)]),
76
+ _: 2
77
+ }, 1032, ["index"])) : c("", !0)], 64))), 256);
78
+ };
79
+ }
80
+ }), [["__scopeId", "data-v-4680c4dc"]]), M = { class: "sidebar-container" }, N = { class: "sidebar-container-header" }, P = { class: "sidebar-container-header-title" }, F = ["src"], I = {
81
+ key: 3,
82
+ class: "sidebar-container-header-title-right"
83
+ }, L = /*@__PURE__*/ m(e(e(e({}, { inheritAttrs: !1 }), { name: "FtlSidebar" }), {}, {
84
+ __name: "index",
85
+ props: {
86
+ sideBarParams: { default: () => ({}) },
87
+ collapse: {
88
+ type: Boolean,
89
+ default: !0
90
+ },
91
+ needLogo: {
92
+ type: Boolean,
93
+ default: !0
94
+ }
95
+ },
96
+ setup(e) {
97
+ var t;
98
+ let r = p(() => import("./FtlEntry.js")), i = k(), a = (t = h()) == null ? void 0 : t.appContext.config.globalProperties, m = e, g = o(() => i.menus), v = (e) => {
99
+ a.$router.push({ name: e });
100
+ };
101
+ return S("collapse", o(() => m.collapse)), (t, i) => {
102
+ let a = n;
103
+ return x(), l("div", M, [
104
+ u("div", N, [u("div", P, [
105
+ e.sideBarParams.logoSrc && e.sideBarParams.needLogo ? (x(), l("div", {
106
+ key: 0,
107
+ class: "pic-box cp",
108
+ onClick: i[0] || (i[0] = (n) => t.$router.push(e.sideBarParams.logoLink || "/"))
109
+ }, [u("img", {
110
+ src: e.sideBarParams.logoSrc || "https://eufly-wms.s3.eu-west-1.amazonaws.com/production/static/eufly-icon.svg",
111
+ alt: "",
112
+ class: "logo"
113
+ }, null, 8, F)])) : c("", !0),
114
+ !e.sideBarParams.logoSrc && e.sideBarParams.needLogo ? (x(), l("div", {
115
+ key: 1,
116
+ class: "ftl-pic-box cp",
117
+ onClick: i[1] || (i[1] = (n) => t.$router.push(e.sideBarParams.logoLink || "/"))
118
+ }, [...i[3] || (i[3] = [u("img", {
119
+ src: "https://eufly-wms.s3.eu-west-1.amazonaws.com/production/static/eufly-icon.svg",
120
+ alt: "",
121
+ class: "logo"
122
+ }, null, -1)])])) : c("", !0),
123
+ e.collapse ? (x(), l("span", {
124
+ key: 2,
125
+ class: "title cp",
126
+ onClick: i[2] || (i[2] = (n) => t.$router.push(e.sideBarParams.logoLink || "/"))
127
+ }, [w(t.$slots, "logoName", {}, () => [d(E(e.sideBarParams.logoName), 1)], !0)])) : c("", !0),
128
+ e.collapse ? (x(), l("div", I, [e.sideBarParams.isProd ? c("", !0) : (x(), l("div", {
129
+ key: 0,
130
+ class: "environment",
131
+ style: b(`margin-top:${e.sideBarParams.projectEntry ? 0 : -20}px`)
132
+ }, " STAGING ", 4)), e.sideBarParams.projectEntry ? (x(), s(D(r), y(_({ key: 1 }, t.$attrs)), null, 16)) : c("", !0)])) : c("", !0)
133
+ ])]),
134
+ w(t.$slots, "default", {}, void 0, !0),
135
+ f(a, {
136
+ class: "el-menu-vertical-demo",
137
+ collapse: !e.collapse,
138
+ onSelect: v,
139
+ "default-active": t.$route.meta.parentName ? t.$route.meta.parentName : t.$route.name
140
+ }, {
141
+ default: O(() => [D(g) && D(g).length ? (x(), s(j, {
142
+ key: 0,
143
+ menus: D(g),
144
+ "use-icon-park": e.sideBarParams.useIconPark,
145
+ "use-icon-font": e.sideBarParams.useIconFont,
146
+ i18n: e.sideBarParams.i18n
147
+ }, null, 8, [
148
+ "menus",
149
+ "use-icon-park",
150
+ "use-icon-font",
151
+ "i18n"
152
+ ])) : c("", !0)]),
153
+ _: 1
154
+ }, 8, ["collapse", "default-active"])
155
+ ]);
156
+ };
157
+ }
158
+ })), R = /*#__PURE__*/ t(L, [["__scopeId", "data-v-c082122d"]]);
159
+ export { R as t };
@@ -0,0 +1 @@
1
+ export { t as default } from "./FtlSidebar-D5AkRjgA.js";
@@ -0,0 +1,7 @@
1
+ // \0plugin-vue:export-helper
2
+ var e = (e, t) => {
3
+ let n = e.__vccOpts || e;
4
+ for (let [e, r] of t) n[e] = r;
5
+ return n;
6
+ };
7
+ export { e as t };
@@ -0,0 +1,26 @@
1
+ // \0@oxc-project+runtime@0.156.0/helpers/esm/asyncToGenerator.js
2
+ function e(e, t, n, r, i, a, o) {
3
+ try {
4
+ var s = e[a](o), c = s.value;
5
+ } catch (e) {
6
+ n(e);
7
+ return;
8
+ }
9
+ s.done ? t(c) : Promise.resolve(c).then(r, i);
10
+ }
11
+ function t(t) {
12
+ return function() {
13
+ var n = this, r = arguments;
14
+ return new Promise(function(i, a) {
15
+ var o = t.apply(n, r);
16
+ function s(t) {
17
+ e(o, i, a, s, c, "next", t);
18
+ }
19
+ function c(t) {
20
+ e(o, i, a, s, c, "throw", t);
21
+ }
22
+ s(void 0);
23
+ });
24
+ };
25
+ }
26
+ export { t };
@@ -0,0 +1,6 @@
1
+ // package/configProvider.ts
2
+ var e = { authBaseUrl: "" }, t = { authBaseUrl: !1 }, n = new Proxy(e, { set(e, n, r) {
3
+ if (!t[n]) return e[n] = r, t[n] = !0, !0;
4
+ throw Error("Config can not be changed");
5
+ } });
6
+ export { n as t };
package/dist/ftlOne.js CHANGED
@@ -1,13 +1,16 @@
1
- import { j as r, l as e, n as F, F as i, m, k as p, o as d } from "./index-2284be94.js";
2
- import "vue";
3
- import "./utils-0eda3e43.js";
4
- import "./vuex.esm-bundler-2a047356.js";
5
- export {
6
- r as FtlEntry,
7
- e as FtlMessage,
8
- F as FtlMultipleChoose,
9
- i as FtlNavbar,
10
- m as FtlPasswordDialog,
11
- p as FtlSidebar,
12
- d as default
13
- };
1
+ import { t as e } from "./FtlNavbar-SsenWatk.js";
2
+ import { t } from "./FtlSidebar-D5AkRjgA.js";
3
+ import { t as n } from "./FtlPasswordDialog-Dj_vS0mC.js";
4
+ import { t as r } from "./FtlMultipleChoose-D8o09guU.js";
5
+ // package/index.ts
6
+ var i = [
7
+ e,
8
+ t,
9
+ n,
10
+ r
11
+ ], a = { install(e) {
12
+ i.forEach((t) => {
13
+ e.component(t.name, t);
14
+ });
15
+ } };
16
+ export { r as FtlMultipleChoose, e as FtlNavbar, n as FtlPasswordDialog, t as FtlSidebar, a as default };