@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,78 @@
1
+ import { t as e } from "./asyncToGenerator-CENKRPhX.js";
2
+ import { t } from "./configProvider-CFU3sEdy.js";
3
+ import { t as n } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
4
+ import { ElButton as r, ElDialog as i, ElDivider as a, ElDropdown as o, ElDropdownItem as s, ElDropdownMenu as c, ElLoadingDirective as l } from "element-plus";
5
+ import { Fragment as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createTextVNode as g, createVNode as _, defineComponent as v, inject as y, isRef as b, normalizeClass as x, openBlock as S, ref as C, renderList as w, toDisplayString as T, unref as E, withCtx as D, withDirectives as O } from "vue";
6
+ import k from "axios";
7
+ // package/FtlMessage/components/CheckMessageDialog.vue?vue&type=script&setup=true&lang.ts
8
+ var A = { class: "dialog__title" }, j = ["innerHTML"], M = /*#__PURE__*/ n(/* @__PURE__ */ v({
9
+ __name: "CheckMessageDialog",
10
+ emits: ["preventHiddenDropdown"],
11
+ setup(n, { expose: v, emit: M }) {
12
+ let N = C(!1), P = y("authBaseUrl"), F = y("dialogI18n"), I = localStorage.getItem("token") || "", L = C(!1), R = C({}), z = { Authorization: `Bearer ${I}` }, B = d(() => `${P || t.authBaseUrl || "https://gateway-staging.ftlapp.io"}/api/xpush/imm/userMessage/getUserMsgInfo`), V = function() {
13
+ var t = e(function* (e) {
14
+ try {
15
+ L.value = !0;
16
+ let t = yield k.get(B.value, {
17
+ headers: z,
18
+ params: { msgId: e }
19
+ });
20
+ t && t.data && (R.value = t.data);
21
+ } catch (e) {
22
+ console.log(e);
23
+ } finally {
24
+ L.value = !1;
25
+ }
26
+ });
27
+ return function(e) {
28
+ return t.apply(this, arguments);
29
+ };
30
+ }(), H = d(() => R.value.immAttachments && R.value.immAttachments.length !== 0), U = (e) => {
31
+ e && window.open(e, "_blank");
32
+ };
33
+ return v({ open: (e) => {
34
+ V(e), N.value = !0;
35
+ } }), (e, t) => {
36
+ let n = a, d = r, v = s, y = c, C = o, k = i, M = l;
37
+ return S(), f(k, {
38
+ center: "",
39
+ title: E(F).dialogTitleText,
40
+ modelValue: E(N),
41
+ "onUpdate:modelValue": t[1] || (t[1] = (e) => b(N) ? N.value = e : null),
42
+ "append-to-body": "",
43
+ model: !1,
44
+ onClosed: t[2] || (t[2] = () => {
45
+ e.$emit("preventHiddenDropdown");
46
+ })
47
+ }, {
48
+ default: D(() => [
49
+ h("header", A, T(E(R).title), 1),
50
+ _(n),
51
+ O(h("div", { innerHTML: E(R).content }, null, 8, j), [[M, E(L)]]),
52
+ h("footer", { class: x(["mt15", [E(H) ? "f-s-c" : "f-c-e"]]) }, [E(H) ? (S(), f(C, { key: 0 }, {
53
+ dropdown: D(() => [_(y, null, {
54
+ default: D(() => [(S(!0), m(u, null, w(E(R).immAttachments, (e) => (S(), f(v, {
55
+ key: e.fileDownloadUrl,
56
+ onClick: () => U(e.fileDownloadUrl)
57
+ }, {
58
+ default: D(() => [g(T(e.fileName), 1)]),
59
+ _: 2
60
+ }, 1032, ["onClick"]))), 128))]),
61
+ _: 1
62
+ })]),
63
+ default: D(() => [_(d, null, {
64
+ default: D(() => [g(T(E(F).downloadText), 1)]),
65
+ _: 1
66
+ })]),
67
+ _: 1
68
+ })) : p("", !0), _(d, { onClick: t[0] || (t[0] = (e) => N.value = !1) }, {
69
+ default: D(() => [g(T(E(F).cancelButtonText), 1)]),
70
+ _: 1
71
+ })], 2)
72
+ ]),
73
+ _: 1
74
+ }, 8, ["title", "modelValue"]);
75
+ };
76
+ }
77
+ }), [["__scopeId", "data-v-0003507a"]]);
78
+ export { M as default };
@@ -0,0 +1,109 @@
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 { ElDropdown as r, ElDropdownItem as i, ElDropdownMenu as a, ElIcon as o, ElSkeleton as s } from "element-plus";
5
+ import { Fragment as c, createBlock as l, createElementBlock as u, createElementVNode as d, createVNode as f, defineComponent as p, normalizeStyle as m, openBlock as h, ref as g, renderList as _, toDisplayString as v, unref as y, withCtx as b } from "vue";
6
+ import { ArrowDown as x, Check as S } from "@element-plus/icons-vue";
7
+ import C from "axios";
8
+ // package/FtlEntry/components/iconRedirect.vue?vue&type=script&setup=true&lang.ts
9
+ var w = {
10
+ xmlns: "http://www.w3.org/2000/svg",
11
+ viewBox: "0 0 1024 1024",
12
+ width: "18",
13
+ height: "18",
14
+ style: {
15
+ "border-color": "rgba(0, 0, 0, 0)",
16
+ "border-width": "bpx",
17
+ "border-style": "undefined"
18
+ },
19
+ filter: "none"
20
+ }, T = /* @__PURE__ */ p(e(e({}, { name: "IconRedirect" }), {}, {
21
+ __name: "iconRedirect",
22
+ setup(e) {
23
+ return (e, t) => (h(), u("svg", w, [...t[0] || (t[0] = [d("g", null, [d("path", {
24
+ d: "M155.733333 806.4H149.333333c-8.533333-2.133333-14.933333-12.8-14.933333-21.333333 0-4.266667 27.733333-362.666667 420.266667-396.8V177.066667c0-8.533333 4.266667-17.066667 12.8-19.2 8.533333-4.266667 17.066667-2.133333 23.466666 4.266666L896 465.066667c8.533333 8.533333 8.533333 21.333333 0 29.866666L590.933333 800c-6.4 6.4-14.933333 8.533333-23.466666 4.266667-8.533333-4.266667-12.8-10.666667-12.8-19.2v-206.933334c-70.4 8.533333-290.133333 51.2-381.866667 215.466667-2.133333 8.533333-10.666667 12.8-17.066667 12.8zM576 533.333333c6.4 0 10.666667 2.133333 14.933333 6.4 4.266667 4.266667 6.4 10.666667 6.4 14.933334v179.2l251.733334-251.733334L597.333333 228.266667V405.333333c0 10.666667-8.533333 21.333333-19.2 21.333334-249.6 14.933333-345.6 164.266667-379.733333 266.666666C337.066667 550.4 563.2 533.333333 576 533.333333z m0-128z",
25
+ "p-id": "3251",
26
+ fill: "rgba(16.065,16.065,16.065,1)"
27
+ })], -1)])]));
28
+ }
29
+ })), E = { key: 0 }, D = { class: "app-item" }, O = { class: "f-s-c" }, k = ["src"], A = { class: "app-item-name" }, j = {
30
+ key: 1,
31
+ style: { padding: "10px" }
32
+ }, M = /*@__PURE__*/ p(e(e({}, { name: "FtlEntry" }), {}, {
33
+ __name: "index",
34
+ props: {
35
+ width: { default: 240 },
36
+ authBaseUrl: { default: "https://gateway-staging.ftlapp.io" },
37
+ keepLeft: {
38
+ type: Boolean,
39
+ default: !0
40
+ }
41
+ },
42
+ setup(e) {
43
+ let n = g([]), p = (e) => {
44
+ e && M();
45
+ }, w = e, M = function() {
46
+ var e = t(function* () {
47
+ n.value = [];
48
+ let e = localStorage.getItem("token") || "";
49
+ if (e) {
50
+ let t = yield C.get(`${w.authBaseUrl}/api/auth/account/findAllWebAppV2`, { headers: { Authorization: e } });
51
+ n.value = t.data;
52
+ }
53
+ });
54
+ return function() {
55
+ return e.apply(this, arguments);
56
+ };
57
+ }(), N = function() {
58
+ var e = t(function* (e) {
59
+ let t = localStorage.getItem("token") || "", n = yield C.get(`${w.authBaseUrl}/api/sso/navigatorTo/${e}`, { headers: { Authorization: t } });
60
+ n.data.targetAppUrl && (n.data.targetAppToken ? window.open(`${n.data.targetAppUrl}?token=${n.data.targetAppToken}`, "_blank") : window.open(`${n.data.targetAppUrl}`, "_blank"));
61
+ });
62
+ return function(t) {
63
+ return e.apply(this, arguments);
64
+ };
65
+ }();
66
+ return (t, g) => {
67
+ let C = o, w = i, M = s, P = a, F = r;
68
+ return h(), l(F, {
69
+ trigger: "click",
70
+ "popper-class": e.keepLeft ? "system-select-dropdown keep-left" : "system-select-dropdown",
71
+ onCommand: N,
72
+ onVisibleChange: p
73
+ }, {
74
+ dropdown: b(() => [f(P, { style: m({ width: e.width + "px" }) }, {
75
+ default: b(() => [y(n).length ? (h(), u("div", E, [(h(!0), u(c, null, _(y(n), (e) => (h(), l(w, {
76
+ key: e.appId,
77
+ disabled: e.isCurrent,
78
+ command: e.appId
79
+ }, {
80
+ default: b(() => [d("div", D, [d("div", O, [d("img", {
81
+ class: "app-item-img",
82
+ src: e.iconUrl
83
+ }, null, 8, k), d("span", A, v(e.name), 1)]), e.isCurrent ? (h(), l(C, {
84
+ key: 0,
85
+ size: 16
86
+ }, {
87
+ default: b(() => [f(y(S))]),
88
+ _: 1
89
+ })) : (h(), l(T, { key: 1 }))])]),
90
+ _: 2
91
+ }, 1032, ["disabled", "command"]))), 128))])) : (h(), u("div", j, [f(M, {
92
+ rows: 4,
93
+ animated: ""
94
+ })]))]),
95
+ _: 1
96
+ }, 8, ["style"])]),
97
+ default: b(() => [f(C, {
98
+ class: "cp",
99
+ style: { color: "#fff" }
100
+ }, {
101
+ default: b(() => [f(y(x))]),
102
+ _: 1
103
+ })]),
104
+ _: 1
105
+ }, 8, ["popper-class"]);
106
+ };
107
+ }
108
+ })), N = /*#__PURE__*/ n(M, [["__scopeId", "data-v-54faffb2"]]);
109
+ export { N as default };
@@ -0,0 +1,186 @@
1
+ import { t as e } from "./asyncToGenerator-CENKRPhX.js";
2
+ import { t } from "./configProvider-CFU3sEdy.js";
3
+ import { t as n } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
4
+ import { ElCard as r, ElIcon as ee, ElLoadingDirective as i, ElPopover as a, ElScrollbar as o, ElTabPane as s, ElTabs as c } from "element-plus";
5
+ import { Fragment as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createVNode as h, defineAsyncComponent as g, defineComponent as _, isRef as v, nextTick as y, onMounted as b, openBlock as x, provide as S, ref as C, renderList as w, toDisplayString as T, unref as E, withCtx as D, withDirectives as O } from "vue";
6
+ import { Message as k } from "@element-plus/icons-vue";
7
+ // package/FtlMessage/index.vue?vue&type=script&setup=true&lang.ts
8
+ var A = {
9
+ key: 0,
10
+ class: "dot"
11
+ }, j = { class: "f-s-c" }, M = { class: "message-card__text" }, N = { class: "message-card__text" }, P = /*#__PURE__*/ n(/* @__PURE__ */ _({
12
+ __name: "index",
13
+ props: {
14
+ authBaseUrl: { default: "" },
15
+ unReadPaneText: { default: "未读消息" },
16
+ allPaneText: { default: "全部消息" },
17
+ dialogTitleText: { default: "查看通知" },
18
+ cancelButtonText: { default: "关闭" },
19
+ downloadText: { default: "下载附件" }
20
+ },
21
+ setup(n) {
22
+ let _ = n, P = g(() => import("./CheckMessageDialog-DygR717d.js")), F = localStorage.getItem("token") || "", I = { Authorization: `Bearer ${F}` }, L = u(() => `${_.authBaseUrl || t.authBaseUrl || "https://gateway-staging.ftlapp.io"}/api/xpush/imm/userMessage`), R = C(0), z = C("unread"), B = C([]), V = C(0), H = C(1), U = C(!1), W = C(null), G = C(!1), K = C(!0), q = C(null), J = function() {
23
+ var t = e(function* () {
24
+ return (yield import("axios")).default;
25
+ });
26
+ return function() {
27
+ return t.apply(this, arguments);
28
+ };
29
+ }(), Y = {
30
+ unread: function() {
31
+ var t = e(function* (e) {
32
+ return (yield J()).get(`${L.value}/get/unReadMessage`, {
33
+ headers: I,
34
+ params: {
35
+ current: e,
36
+ size: 6
37
+ }
38
+ });
39
+ });
40
+ return function(e) {
41
+ return t.apply(this, arguments);
42
+ };
43
+ }(),
44
+ all: function() {
45
+ var t = e(function* (e) {
46
+ return (yield J()).get(`${L.value}/get/allMessage`, {
47
+ headers: I,
48
+ params: {
49
+ current: e,
50
+ size: 6
51
+ }
52
+ });
53
+ });
54
+ return function(e) {
55
+ return t.apply(this, arguments);
56
+ };
57
+ }()
58
+ }, X = (e) => {
59
+ W.value && clearTimeout(W.value), W.value = setTimeout(() => {
60
+ W.value = null, e();
61
+ }, 1e3);
62
+ }, Z = () => clearTimeout(W.value), Q = function() {
63
+ var t = e(function* () {
64
+ let e = yield (yield J()).get(`${L.value}/getUserNoReadMsgCount`, { headers: I });
65
+ e && e.data && (R.value = +e.data);
66
+ });
67
+ return function() {
68
+ return t.apply(this, arguments);
69
+ };
70
+ }(), te = function() {
71
+ var t = e(function* ({ scrollTop: e }) {
72
+ if (q.value) {
73
+ let t = q.value.wrapRef.scrollHeight;
74
+ if (Math.ceil(e) >= t - 300 && B.value.length % 6 == 0 && K.value) {
75
+ H.value += 1;
76
+ try {
77
+ U.value = !0;
78
+ let e = yield Y[z.value](H.value);
79
+ e && e.data && e.data.records && (e.data.records.length === 0 && (K.value = !1), B.value = B.value.concat(e.data.records));
80
+ } catch (e) {
81
+ console.log(e);
82
+ } finally {
83
+ U.value = !1;
84
+ }
85
+ }
86
+ }
87
+ });
88
+ return function(e) {
89
+ return t.apply(this, arguments);
90
+ };
91
+ }(), ne = (e) => {
92
+ let t = (e) => e < 10 ? `0${e}` : `${e}`, n = new Date(e);
93
+ return `${n.getFullYear()}-${t(n.getMonth() + 1)}-${t(n.getDate())} ${t(n.getHours())}:${t(n.getMinutes())}:${t(n.getSeconds())}`;
94
+ }, re = function() {
95
+ var t = e(function* () {
96
+ try {
97
+ U.value = !0;
98
+ let e = yield Y[z.value](1);
99
+ e && e.data && e.data.records && (B.value = e.data.records || []), e && e.data && e.data.total && (V.value = +e.data.total);
100
+ } catch (e) {
101
+ console.log(e);
102
+ } finally {
103
+ U.value = !1;
104
+ }
105
+ });
106
+ return function() {
107
+ return t.apply(this, arguments);
108
+ };
109
+ }(), ie = () => y(() => G.value = !0), $ = () => {
110
+ H.value = 1, K.value = !0, re();
111
+ };
112
+ return S("dialogI18n", u(() => ({
113
+ dialogTitleText: _.dialogTitleText,
114
+ cancelButtonText: _.cancelButtonText,
115
+ downloadText: _.downloadText
116
+ }))), S("authBaseUrl", _.authBaseUrl), b(() => {
117
+ F && Q();
118
+ }), (e, t) => {
119
+ let u = ee, g = s, _ = r, y = o, b = c, S = a, C = i;
120
+ return x(), p(l, null, [h(S, {
121
+ width: "300",
122
+ onShow: $,
123
+ trigger: "click",
124
+ visible: E(G),
125
+ "onUpdate:visible": t[3] || (t[3] = (e) => v(G) ? G.value = e : null)
126
+ }, {
127
+ reference: D(() => [h(u, {
128
+ size: 22,
129
+ class: "mr15",
130
+ onMouseover: t[0] || (t[0] = () => X(Q)),
131
+ onMouseout: Z
132
+ }, {
133
+ default: D(() => [h(E(k)), E(R) ? (x(), p("i", A)) : f("", !0)]),
134
+ _: 1
135
+ })]),
136
+ default: D(() => [h(b, {
137
+ modelValue: E(z),
138
+ "onUpdate:modelValue": t[2] || (t[2] = (e) => v(z) ? z.value = e : null),
139
+ stretch: "",
140
+ onTabChange: $
141
+ }, {
142
+ default: D(() => [
143
+ h(g, {
144
+ label: n.unReadPaneText,
145
+ name: "unread"
146
+ }, null, 8, ["label"]),
147
+ h(g, {
148
+ label: n.allPaneText,
149
+ name: "all"
150
+ }, null, 8, ["label"]),
151
+ O((x(), d(y, {
152
+ class: "message-container pr10 ml5",
153
+ style: { "min-height": "100px" },
154
+ "max-height": "300px",
155
+ ref_key: "container",
156
+ ref: q,
157
+ onScroll: t[1] || (t[1] = (e) => X(() => te(e)))
158
+ }, {
159
+ default: D(() => [(x(!0), p(l, null, w(E(B), (t) => (x(), d(_, {
160
+ key: t.msgId,
161
+ style: {
162
+ "border-radius": "5px",
163
+ "--el-card-padding": "12px"
164
+ },
165
+ size: "mini",
166
+ class: "mb10",
167
+ shadow: "hover",
168
+ onClick: (n) => e.$refs.dialog.open(t.msgId)
169
+ }, {
170
+ default: D(() => [m("div", j, [m("span", M, T(t.title), 1), m("span", N, T(ne(t.sendTime)), 1)])]),
171
+ _: 2
172
+ }, 1032, ["onClick"]))), 128))]),
173
+ _: 1
174
+ })), [[C, E(U)]])
175
+ ]),
176
+ _: 1
177
+ }, 8, ["modelValue"])]),
178
+ _: 1
179
+ }, 8, ["visible"]), h(E(P), {
180
+ ref: "dialog",
181
+ onPreventHiddenDropdown: ie
182
+ }, null, 512)], 64);
183
+ };
184
+ }
185
+ }), [["__scopeId", "data-v-5886c311"]]);
186
+ export { P as default };
@@ -0,0 +1,312 @@
1
+ import { t as e } from "./objectSpread2-Bpgh6RJW.js";
2
+ import { t } from "./utils-BuLanift.js";
3
+ import { t as n } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
4
+ import { ElButton as r, ElIcon as i, ElInput as a } from "element-plus";
5
+ import { Fragment as o, Transition as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, getCurrentInstance as m, nextTick as h, normalizeClass as g, normalizeStyle as _, openBlock as v, ref as y, renderList as b, toDisplayString as x, unref as S, vShow as C, watch as w, withCtx as T, withDirectives as E, withKeys as D, withModifiers as O } from "vue";
6
+ import { CircleClose as k, Delete as A, DocumentCopy as j } from "@element-plus/icons-vue";
7
+ // package/FtlMultipleChoose/components/expandIcon.vue?vue&type=script&setup=true&lang.ts
8
+ var M = ["id"], N = ["fill", "id"], P = ["fill", "id"], F = ["fill", "id"], I = ["fill", "id"], L = /* @__PURE__ */ p({
9
+ __name: "expandIcon",
10
+ props: {
11
+ customsColor: { default: "79,167,142" },
12
+ iconId: { default: "iconId" }
13
+ },
14
+ setup(e) {
15
+ return (t, n) => (v(), l("svg", {
16
+ t: "1721886728873",
17
+ class: "icon",
18
+ viewBox: "0 0 1024 1024",
19
+ version: "1.1",
20
+ xmlns: "http://www.w3.org/2000/svg",
21
+ "p-id": "1757",
22
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
23
+ width: "20",
24
+ height: "20",
25
+ id: e.iconId
26
+ }, [
27
+ u("path", {
28
+ d: "M960.095933 927.91366c0-0.409313 0-0.818627 0-1.330269l0-254.286c0-32.847407-32.02878-32.847407-32.02878-32.847407s-32.02878 0-31.926451 32.847407l0 179.074648L630.803238 587.057859c-23.22854-23.22854-45.84311-0.61397-45.84311-0.61397s-22.61457 22.61457 0.61397 45.84311l265.030479 264.109523-177.642051 0c-32.847407 0-32.847407 32.02878-32.847407 32.02878s0 32.02878 32.847407 31.926451l254.183671 0c0.102328 0 0.204657 0 0.409313 0 0.306985 0 0.409313 0 0.409313 0s0.511642 0 1.432597-0.102328c10.232837-0.511642 17.088838-4.195463 21.591286-9.004897 4.707105-4.502448 8.390926-11.256121 8.902568-21.386629 0.102328-1.023284 0.102328-1.534926 0.102328-1.534926S960.095933 928.220646 960.095933 927.91366z",
29
+ fill: `rgb(${e.customsColor})`,
30
+ "p-id": "1758",
31
+ id: e.iconId
32
+ }, null, 8, N),
33
+ u("path", {
34
+ d: "M630.803238 436.737484l264.109523-265.030479 0 177.642051c0 32.847407 32.02878 32.847407 32.02878 32.847407s32.02878 0 31.926451-32.847407l0-254.183671c0-0.102328 0-0.204657 0-0.409313 0-0.306985 0-0.409313 0-0.409313s0-0.511642-0.102328-1.432597c-0.511642-10.232837-4.195463-17.088838-9.004897-21.591286-4.502448-4.707105-11.256121-8.390926-21.386629-8.902568-1.023284-0.102328-1.534926-0.102328-1.534926-0.102328s-0.204657 0-0.511642 0c-0.409313 0-0.818627 0-1.330269 0l-254.286 0c-32.847407 0-32.847407 32.02878-32.847407 32.02878s0 32.02878 32.847407 31.926451l179.074648 0L585.574098 391.508344c-23.22854 23.22854-0.61397 45.84311-0.61397 45.84311S607.677026 459.966024 630.803238 436.737484z",
35
+ fill: `rgb(${e.customsColor})`,
36
+ "p-id": "1759",
37
+ id: e.iconId
38
+ }, null, 8, P),
39
+ u("path", {
40
+ d: "M173.088438 126.784851l177.642051 0c32.847407 0 32.847407-32.02878 32.847407-32.02878s0-32.02878-32.847407-31.926451l-254.183671 0c-0.102328 0-0.204657 0-0.409313 0-0.306985 0-0.409313 0-0.409313 0s-0.511642 0-1.432597 0.102328C83.960428 63.443589 77.206755 67.127411 72.704307 71.834516c-4.707105 4.502448-8.390926 11.256121-8.902568 21.386629-0.102328 1.023284-0.102328 1.534926-0.102328 1.534926s0 0.204657 0 0.511642c0 0.409313 0 0.818627 0 1.330269l0 254.286c0 32.847407 32.02878 32.847407 32.02878 32.847407s32.02878 0 31.926451-32.847407l0-179.074648L392.992106 436.123514c23.22854 23.22854 45.84311 0.61397 45.84311 0.61397s22.61457-22.61457-0.61397-45.84311L173.088438 126.784851z",
41
+ fill: `rgb(${e.customsColor})`,
42
+ "p-id": "1760",
43
+ id: e.iconId
44
+ }, null, 8, F),
45
+ u("path", {
46
+ d: "M391.968822 586.546218l-264.109523 265.030479 0-177.642051c0-32.847407-32.02878-32.847407-32.02878-32.847407s-32.02878 0-31.926451 32.847407l0 254.183671c0 0.102328 0 0.204657 0 0.409313 0 0.306985 0 0.409313 0 0.409313s0 0.511642 0.102328 1.432597c0.511642 10.232837 4.195463 17.088838 9.004897 21.591286 4.502448 4.707105 11.256121 8.390926 21.386629 8.902568 1.023284 0.102328 1.534926 0.102328 1.534926 0.102328s0.204657 0 0.511642 0c0.409313 0 0.818627 0 1.330269 0l254.286 0c32.847407 0 32.847407-32.02878 32.847407-32.02878s0-32.02878-32.847407-31.926451l-179.074648 0 264.211852-265.235135c23.22854-23.22854 0.61397-45.84311 0.61397-45.84311S415.095033 563.317678 391.968822 586.546218z",
47
+ fill: `rgb(${e.customsColor})`,
48
+ "p-id": "1761",
49
+ id: e.iconId
50
+ }, null, 8, I)
51
+ ], 8, M));
52
+ }
53
+ }), R = { class: "show-content" }, z = { class: "number" }, B = { class: "innerInfo shrink-item" }, V = { class: "input-cotainer-tool" }, H = { class: "number" }, U = { class: "innerInfo" }, W = { class: "func-area" }, G = /*@__PURE__*/ p(e(e({}, { name: "FtlMultipleChoose" }), {}, {
54
+ __name: "index",
55
+ props: {
56
+ maxLimit: { default: 100 },
57
+ searchType: { default: "ftlOne.text.trackingNumber" },
58
+ width: { default: 300 },
59
+ modelValue: { default: () => [] },
60
+ customsColor: { default: "79,167,142" },
61
+ copyBtnType: { default: "success" },
62
+ confirmBtnType: { default: "primary" },
63
+ inputSize: { default: "small" },
64
+ buttonSize: { default: "small" },
65
+ copyBtnClass: { default: "" }
66
+ },
67
+ emits: [
68
+ "update:modelValue",
69
+ "confirmSearch",
70
+ "deleteAll",
71
+ "copyData",
72
+ "removeIndexElement"
73
+ ],
74
+ setup(e, { emit: n }) {
75
+ var p;
76
+ let M = e, N = (p = m()) == null ? void 0 : p.appContext.config.globalProperties, P = y(!1), F = y(null), I = y(null), G = n, K = (e) => {
77
+ if (I.value && !I.value.contains(e.target) && e.target.id !== `${M.searchType}iconId`) {
78
+ if (e.target.className && typeof e.target.className == "string" && e.target.className.includes("el-icon-circle-close")) return;
79
+ P.value = !1;
80
+ }
81
+ }, q = (e, t) => {
82
+ if (M.modelValue.length === M.maxLimit) return window.$message.error(N.$t("ftlOne.mutipleChoose.list.exceed", {
83
+ quantity: M.maxLimit,
84
+ number: N.$t(M.searchType)
85
+ }));
86
+ let n, r = document.getElementById(`${e}${t}`);
87
+ if (r) {
88
+ let i = r.selectionStart, a = M.modelValue[t];
89
+ if (M.modelValue.slice(0, t).includes(a)) return window.$message.error(N.$t("ftlOne.mutipleChoose.same", { number: N.$t(M.searchType) }) + " " + a);
90
+ if (i === a.length && t !== M.modelValue.length - 1) return;
91
+ if (i === a.length && t === M.modelValue.length - 1) M.modelValue.push(""), n = M.modelValue.length - 1;
92
+ else {
93
+ let e = [...M.modelValue.slice(0, t), ...M.modelValue.slice(t + 1)].filter((e) => e === a.slice(0, i) || e === a.slice(i));
94
+ a.slice(0, i) === a.slice(i) && e.push(a.slice(0, i)), e.length && window.$message({
95
+ dangerouslyUseHTMLString: !0,
96
+ message: `${N.$t("ftlOne.mutipleChoose.same", { number: N.$t(M.searchType) })}:<br/>${e.join("<br/>")}`,
97
+ type: "warning"
98
+ }), n = t + 1;
99
+ }
100
+ G("update:modelValue", Array.from(/* @__PURE__ */ new Set([
101
+ ...M.modelValue.slice(0, t),
102
+ a.slice(0, i),
103
+ a.slice(i),
104
+ ...M.modelValue.slice(t + 1)
105
+ ]))), h(() => {
106
+ F.value.scrollTop = F.value.scrollHeight;
107
+ let t = document.getElementById(`${e}${n}`);
108
+ t && t.focus();
109
+ });
110
+ }
111
+ }, J = (e, t, n = !0) => {
112
+ let r = !1, i = [], a = !1, o = [];
113
+ e.forEach((e) => {
114
+ M.modelValue.find((t) => t === e) ? e && (i.push(e), r = !0) : (t === 0 && n ? M.modelValue.length : M.modelValue.length - 1) + o.length === M.maxLimit ? a = !0 : o.push(e);
115
+ }), G("update:modelValue", [
116
+ ...M.modelValue.slice(0, t),
117
+ ...o,
118
+ ...M.modelValue.slice(t + 1)
119
+ ]), h(() => {
120
+ F.value.scrollTop = F.value.scrollHeight;
121
+ }), r && window.$message({
122
+ dangerouslyUseHTMLString: !0,
123
+ message: `${N.$t("ftlOne.mutipleChoose.same", { number: N.$t(M.searchType) })}:<br/>${i.join("<br/>")}`,
124
+ type: "warning"
125
+ }), a && window.$message.error(N.$t("ftlOne.mutipleChoose.list.exceed", {
126
+ quantity: M.maxLimit,
127
+ number: N.$t(M.searchType)
128
+ }));
129
+ }, Y = (e) => {
130
+ M.modelValue.splice(e, 1), h(() => {
131
+ M.modelValue.length === 1 && M.modelValue[0] === "" && G("update:modelValue", []), G("removeIndexElement", e);
132
+ });
133
+ }, X = () => {
134
+ P.value = !1;
135
+ }, Z = () => {
136
+ let e = M.modelValue.filter((e, t) => M.modelValue.indexOf(e) !== t && e !== "");
137
+ e.length && window.$message({
138
+ dangerouslyUseHTMLString: !0,
139
+ message: `${N.$t("ftlOne.mutipleChoose.same", { number: N.$t(M.searchType) })}:<br/>${e.join("<br/>")}`,
140
+ type: "warning"
141
+ }), G("update:modelValue", Array.from(new Set(M.modelValue)).filter((e) => e !== "")), G("confirmSearch"), P.value = !1;
142
+ }, ee = () => {
143
+ G("update:modelValue", []), G("deleteAll");
144
+ }, te = () => {
145
+ G("copyData", M.modelValue.filter((e) => e !== "").join("\n")), P.value = !0;
146
+ }, Q = (e, t) => {
147
+ let n = e.split(" ").filter((e) => e !== "");
148
+ if (n.length > 1) return J(n, 0);
149
+ e && (G("update:modelValue", [e]), h(() => {
150
+ let n = document.getElementById(`${M.searchType}${t}0`);
151
+ n && (n.setSelectionRange(e.length, e.length), n.focus());
152
+ }));
153
+ }, $ = t((e, t, n) => {
154
+ let r = e.split(" ").filter((e) => e !== "");
155
+ if (r.length > 1) return J(r, t, !1);
156
+ M.modelValue.length === 1 && M.modelValue[0] === "" && (G("update:modelValue", []), h(() => {
157
+ document.getElementById(`${M.searchType}${n}`).focus();
158
+ }));
159
+ }, 50);
160
+ return w(() => P.value, (e) => {
161
+ e ? document.addEventListener("click", K) : document.removeEventListener("click", K);
162
+ }, { immediate: !0 }), (t, n) => {
163
+ let p = i, m = a, h = r;
164
+ return v(), l("div", R, [u("div", {
165
+ class: g(["input-cotainer", `input-height-${M.inputSize}`]),
166
+ style: _(`width: ${e.width}px`)
167
+ }, [u("div", {
168
+ class: "input-cotainer-content input-shrink",
169
+ ref_key: "inputContentRef",
170
+ ref: F
171
+ }, [(v(!0), l(o, null, b(e.modelValue, (n, r) => (v(), l("div", {
172
+ key: r,
173
+ class: "showInfo shrink-item"
174
+ }, [u("div", z, x(r + 1) + ":", 1), f(m, {
175
+ style: { flex: "1" },
176
+ size: M.inputSize,
177
+ modelValue: e.modelValue[r],
178
+ "onUpdate:modelValue": (t) => e.modelValue[r] = t,
179
+ id: `${e.searchType}shrinkInputId${r}`,
180
+ onInput: (e) => S($)(e, r, "shrinkContentInput"),
181
+ placeholder: t.$t("ftlOne.mutipleChoose.list.searchText", { number: t.$t(e.searchType) }),
182
+ onKeyup: D((t) => q(`${e.searchType}shrinkInputId`, r), ["enter"])
183
+ }, {
184
+ suffix: T(() => [f(p, {
185
+ size: 14,
186
+ style: { cursor: "pointer" },
187
+ onClick: O((e) => Y(r), ["stop"])
188
+ }, {
189
+ default: T(() => [f(S(k))]),
190
+ _: 1
191
+ }, 8, ["onClick"])]),
192
+ _: 2
193
+ }, 1032, [
194
+ "size",
195
+ "modelValue",
196
+ "onUpdate:modelValue",
197
+ "id",
198
+ "onInput",
199
+ "placeholder",
200
+ "onKeyup"
201
+ ])]))), 128)), E(u("div", B, [f(m, {
202
+ placeholder: t.$t("ftlOne.mutipleChoose.searchText", { number: t.$t(e.searchType) }),
203
+ size: M.inputSize,
204
+ clearable: "",
205
+ id: `${e.searchType}shrinkContentInput`,
206
+ onInput: n[0] || (n[0] = (e) => Q(e, "shrinkInputId"))
207
+ }, null, 8, [
208
+ "placeholder",
209
+ "size",
210
+ "id"
211
+ ])], 512), [[C, e.modelValue.length <= 1 && !e.modelValue.filter((e) => e !== "").length]])], 512), u("div", V, [e.modelValue.filter((e) => e !== "").length ? (v(), l("div", {
212
+ key: 0,
213
+ class: "input-cotainer-tool-count",
214
+ style: _(`color:rgb(${e.customsColor});background: rgba(${e.customsColor},0.2)`)
215
+ }, x(e.modelValue.filter((e) => e !== "").length), 5)) : c("", !0), u("div", {
216
+ onClick: n[1] || (n[1] = (e) => P.value = !S(P)),
217
+ style: _(`color:rgb(${e.customsColor});font-size: 20px;cursor: pointer;`)
218
+ }, [f(L, {
219
+ customsColor: e.customsColor,
220
+ iconId: `${e.searchType}iconId`,
221
+ class: "input-cotainer-tool-icon"
222
+ }, null, 8, ["customsColor", "iconId"])], 4)])], 6), f(s, {
223
+ name: "el-zoom-in-top",
224
+ persisted: ""
225
+ }, {
226
+ default: T(() => [E(u("div", {
227
+ class: "show-content-popover input-expand",
228
+ ref_key: "contentPopoverRef",
229
+ ref: I
230
+ }, [u("div", {
231
+ ref: "content",
232
+ class: "show-content-popover-content",
233
+ style: _(`box-shadow: 0px 0px 3px 0px rgb(${e.customsColor});`)
234
+ }, [(v(!0), l(o, null, b(e.modelValue, (n, r) => (v(), l("div", {
235
+ key: r,
236
+ class: "showInfo"
237
+ }, [u("span", H, x(r + 1) + ":", 1), f(m, {
238
+ size: M.inputSize,
239
+ modelValue: e.modelValue[r],
240
+ "onUpdate:modelValue": (t) => e.modelValue[r] = t,
241
+ placeholder: t.$t("ftlOne.mutipleChoose.list.searchText", { number: t.$t(e.searchType) }),
242
+ onInput: (e) => S($)(e, r, "expandContentInput"),
243
+ id: `${e.searchType}expandInputId${r}`,
244
+ onKeyup: D((t) => q(`${e.searchType}expandInputId`, r), ["enter"])
245
+ }, {
246
+ suffix: T(() => [f(p, {
247
+ size: 14,
248
+ style: { cursor: "pointer" },
249
+ onClick: O((e) => Y(r), ["stop"])
250
+ }, {
251
+ default: T(() => [f(S(k))]),
252
+ _: 1
253
+ }, 8, ["onClick"])]),
254
+ _: 2
255
+ }, 1032, [
256
+ "size",
257
+ "modelValue",
258
+ "onUpdate:modelValue",
259
+ "placeholder",
260
+ "onInput",
261
+ "id",
262
+ "onKeyup"
263
+ ])]))), 128)), E(u("div", U, [n[3] || (n[3] = u("span", { class: "number" }, "1:", -1)), f(m, {
264
+ placeholder: t.$t("ftlOne.mutipleChoose.list.searchText", { number: t.$t(e.searchType) }),
265
+ size: M.inputSize,
266
+ clearable: "",
267
+ onInput: n[2] || (n[2] = (e) => Q(e, "expandInputId")),
268
+ id: `${e.searchType}expandContentInput`
269
+ }, null, 8, [
270
+ "placeholder",
271
+ "size",
272
+ "id"
273
+ ])], 512), [[C, e.modelValue.length <= 1 && !e.modelValue.filter((e) => e !== "").length]])], 4), u("div", W, [u("div", null, [f(h, {
274
+ size: M.buttonSize,
275
+ class: "copyValue",
276
+ type: e.copyBtnType,
277
+ icon: S(j),
278
+ onClick: O(te, ["stop"])
279
+ }, null, 8, [
280
+ "size",
281
+ "type",
282
+ "icon"
283
+ ]), f(h, {
284
+ size: M.buttonSize,
285
+ type: "danger",
286
+ icon: S(A),
287
+ onClick: O(ee, ["stop"])
288
+ }, null, 8, ["size", "icon"])]), u("div", null, [f(h, {
289
+ size: M.buttonSize,
290
+ onClick: O(X, ["stop"])
291
+ }, {
292
+ default: T(() => [d(x(t.$t("ftlOne.changePassword.cancel")), 1)]),
293
+ _: 1
294
+ }, 8, ["size"]), f(h, {
295
+ size: M.buttonSize,
296
+ type: e.confirmBtnType,
297
+ class: g(e.copyBtnClass),
298
+ onClick: O(Z, ["stop"])
299
+ }, {
300
+ default: T(() => [d(x(t.$t("ftlOne.findPassword.confirm.button")), 1)]),
301
+ _: 1
302
+ }, 8, [
303
+ "size",
304
+ "type",
305
+ "class"
306
+ ])])])], 512), [[C, S(P)]])]),
307
+ _: 1
308
+ })]);
309
+ };
310
+ }
311
+ })), K = /*#__PURE__*/ n(G, [["__scopeId", "data-v-45841d07"]]);
312
+ export { K as t };