orion-design 0.1.12 → 0.1.14
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/Form/index.js +230 -220
- package/dist/components/Form/index.js.map +1 -1
- package/dist/components/LovTable/LovPagetable.d.ts +2 -0
- package/dist/components/LovTable/LovQuerytable.d.ts +2 -0
- package/dist/components/LovTable/index.d.ts +5 -0
- package/dist/components/LovTable/index.js +54 -0
- package/dist/components/LovTable/index.js.map +1 -0
- package/dist/components/Pagetable/Pagetable.d.ts +2 -1
- package/dist/components/Pagetable/hooks/useColumns.js +36 -35
- package/dist/components/Pagetable/hooks/useColumns.js.map +1 -1
- package/dist/components/Pagetable/index.d.ts +2 -1
- package/dist/components/Pagetable/index.js +151 -148
- package/dist/components/Pagetable/index.js.map +1 -1
- package/dist/components/Querytable/Querytable.d.ts +2 -1
- package/dist/components/Querytable/hooks/useColumns.js +16 -15
- package/dist/components/Querytable/hooks/useColumns.js.map +1 -1
- package/dist/components/Querytable/index.d.ts +2 -1
- package/dist/components/Querytable/index.js +163 -160
- package/dist/components/Querytable/index.js.map +1 -1
- package/dist/components/components.d.ts +2 -0
- package/dist/components/components.js +18 -10
- package/dist/components/components.js.map +1 -1
- package/dist/components/index.js +21 -13
- package/dist/components/index.js.map +1 -1
- package/dist/components-1bMIJYPN.js +78 -0
- package/dist/{components-OIbu7HLW.js.map → components-1bMIJYPN.js.map} +1 -1
- package/dist/index.js +24 -16
- package/dist/index.js.map +1 -1
- package/dist/request/disivion/index.d.ts +11 -12
- package/dist/request/disivion/index.js +137 -134
- package/dist/request/disivion/index.js.map +1 -1
- package/dist/request/index.d.ts +1 -1
- package/dist/request/index.js +11 -8
- package/dist/version/version.d.ts +1 -1
- package/dist/version/version.js +1 -1
- package/dist/version/version.js.map +1 -1
- package/package.json +4 -2
- package/dist/components-OIbu7HLW.js +0 -70
@@ -1,119 +1,119 @@
|
|
1
|
-
import
|
2
|
-
import { cloneDeep as
|
1
|
+
import Q from "axios";
|
2
|
+
import { cloneDeep as $ } from "lodash-es";
|
3
3
|
import "dayjs";
|
4
4
|
import "../../utils/md5.js";
|
5
5
|
import "decimal.js";
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import
|
9
|
-
import
|
10
|
-
import
|
11
|
-
import
|
12
|
-
import { ElLoading as
|
13
|
-
import
|
14
|
-
const
|
6
|
+
import G from "../ResponseParserChain.js";
|
7
|
+
import S from "../ErrorHandlerChain.js";
|
8
|
+
import K from "../RequestFilterChain.js";
|
9
|
+
import W from "./DateSerializer.js";
|
10
|
+
import X from "./DivisionResponseParser.js";
|
11
|
+
import ee from "./DivisionErrorHandler.js";
|
12
|
+
import { ElLoading as v } from "element-plus";
|
13
|
+
import te from "../error/ResponseError.js";
|
14
|
+
const O = "3.7.7", re = O, h = typeof Buffer == "function", B = typeof TextDecoder == "function" ? new TextDecoder() : void 0, E = typeof TextEncoder == "function" ? new TextEncoder() : void 0, oe = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", m = Array.prototype.slice.call(oe), x = ((e) => {
|
15
15
|
let t = {};
|
16
16
|
return e.forEach((o, r) => t[o] = r), t;
|
17
|
-
})(
|
18
|
-
let t, o, r, n,
|
17
|
+
})(m), ne = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/, a = String.fromCharCode.bind(String), R = typeof Uint8Array.from == "function" ? Uint8Array.from.bind(Uint8Array) : (e) => new Uint8Array(Array.prototype.slice.call(e, 0)), T = (e) => e.replace(/=/g, "").replace(/[+\/]/g, (t) => t == "+" ? "-" : "_"), P = (e) => e.replace(/[^A-Za-z0-9\+\/]/g, ""), k = (e) => {
|
18
|
+
let t, o, r, n, s = "";
|
19
19
|
const i = e.length % 3;
|
20
20
|
for (let l = 0; l < e.length; ) {
|
21
21
|
if ((o = e.charCodeAt(l++)) > 255 || (r = e.charCodeAt(l++)) > 255 || (n = e.charCodeAt(l++)) > 255)
|
22
22
|
throw new TypeError("invalid character found");
|
23
|
-
t = o << 16 | r << 8 | n,
|
23
|
+
t = o << 16 | r << 8 | n, s += m[t >> 18 & 63] + m[t >> 12 & 63] + m[t >> 6 & 63] + m[t & 63];
|
24
24
|
}
|
25
|
-
return i ?
|
26
|
-
},
|
25
|
+
return i ? s.slice(0, i - 3) + "===".substring(i) : s;
|
26
|
+
}, w = typeof btoa == "function" ? (e) => btoa(e) : h ? (e) => Buffer.from(e, "binary").toString("base64") : k, y = h ? (e) => Buffer.from(e).toString("base64") : (e) => {
|
27
27
|
let o = [];
|
28
28
|
for (let r = 0, n = e.length; r < n; r += 4096)
|
29
|
-
o.push(
|
30
|
-
return
|
31
|
-
},
|
29
|
+
o.push(a.apply(null, e.subarray(r, r + 4096)));
|
30
|
+
return w(o.join(""));
|
31
|
+
}, b = (e, t = !1) => t ? T(y(e)) : y(e), se = (e) => {
|
32
32
|
if (e.length < 2) {
|
33
33
|
var t = e.charCodeAt(0);
|
34
|
-
return t < 128 ? e : t < 2048 ?
|
34
|
+
return t < 128 ? e : t < 2048 ? a(192 | t >>> 6) + a(128 | t & 63) : a(224 | t >>> 12 & 15) + a(128 | t >>> 6 & 63) + a(128 | t & 63);
|
35
35
|
} else {
|
36
36
|
var t = 65536 + (e.charCodeAt(0) - 55296) * 1024 + (e.charCodeAt(1) - 56320);
|
37
|
-
return
|
37
|
+
return a(240 | t >>> 18 & 7) + a(128 | t >>> 12 & 63) + a(128 | t >>> 6 & 63) + a(128 | t & 63);
|
38
38
|
}
|
39
|
-
},
|
39
|
+
}, ae = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g, L = (e) => e.replace(ae, se), _ = h ? (e) => Buffer.from(e, "utf8").toString("base64") : E ? (e) => y(E.encode(e)) : (e) => w(L(e)), d = (e, t = !1) => t ? T(_(e)) : _(e), D = (e) => d(e, !0), ie = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g, le = (e) => {
|
40
40
|
switch (e.length) {
|
41
41
|
case 4:
|
42
42
|
var t = (7 & e.charCodeAt(0)) << 18 | (63 & e.charCodeAt(1)) << 12 | (63 & e.charCodeAt(2)) << 6 | 63 & e.charCodeAt(3), o = t - 65536;
|
43
|
-
return
|
43
|
+
return a((o >>> 10) + 55296) + a((o & 1023) + 56320);
|
44
44
|
case 3:
|
45
|
-
return
|
45
|
+
return a((15 & e.charCodeAt(0)) << 12 | (63 & e.charCodeAt(1)) << 6 | 63 & e.charCodeAt(2));
|
46
46
|
default:
|
47
|
-
return
|
47
|
+
return a((31 & e.charCodeAt(0)) << 6 | 63 & e.charCodeAt(1));
|
48
48
|
}
|
49
|
-
},
|
50
|
-
if (e = e.replace(/\s+/g, ""), !
|
49
|
+
}, j = (e) => e.replace(ie, le), q = (e) => {
|
50
|
+
if (e = e.replace(/\s+/g, ""), !ne.test(e))
|
51
51
|
throw new TypeError("malformed base64.");
|
52
52
|
e += "==".slice(2 - (e.length & 3));
|
53
53
|
let t, o = "", r, n;
|
54
|
-
for (let
|
55
|
-
t =
|
54
|
+
for (let s = 0; s < e.length; )
|
55
|
+
t = x[e.charAt(s++)] << 18 | x[e.charAt(s++)] << 12 | (r = x[e.charAt(s++)]) << 6 | (n = x[e.charAt(s++)]), o += r === 64 ? a(t >> 16 & 255) : n === 64 ? a(t >> 16 & 255, t >> 8 & 255) : a(t >> 16 & 255, t >> 8 & 255, t & 255);
|
56
56
|
return o;
|
57
|
-
},
|
57
|
+
}, U = typeof atob == "function" ? (e) => atob(P(e)) : h ? (e) => Buffer.from(e, "base64").toString("binary") : q, I = h ? (e) => R(Buffer.from(e, "base64")) : (e) => R(U(e).split("").map((t) => t.charCodeAt(0))), z = (e) => I(H(e)), fe = h ? (e) => Buffer.from(e, "base64").toString("utf8") : B ? (e) => B.decode(I(e)) : (e) => j(U(e)), H = (e) => P(e.replace(/[-_]/g, (t) => t == "-" ? "+" : "/")), A = (e) => fe(H(e)), ue = (e) => {
|
58
58
|
if (typeof e != "string")
|
59
59
|
return !1;
|
60
60
|
const t = e.replace(/\s+/g, "").replace(/={0,2}$/, "");
|
61
61
|
return !/[^\s0-9a-zA-Z\+/]/.test(t) || !/[^\s0-9a-zA-Z\-_]/.test(t);
|
62
|
-
},
|
62
|
+
}, Z = (e) => ({
|
63
63
|
value: e,
|
64
64
|
enumerable: !1,
|
65
65
|
writable: !0,
|
66
66
|
configurable: !0
|
67
|
-
}),
|
68
|
-
const e = (t, o) => Object.defineProperty(String.prototype, t,
|
67
|
+
}), N = function() {
|
68
|
+
const e = (t, o) => Object.defineProperty(String.prototype, t, Z(o));
|
69
69
|
e("fromBase64", function() {
|
70
|
-
return
|
70
|
+
return A(this);
|
71
71
|
}), e("toBase64", function(t) {
|
72
|
-
return
|
72
|
+
return d(this, t);
|
73
73
|
}), e("toBase64URI", function() {
|
74
|
-
return
|
74
|
+
return d(this, !0);
|
75
75
|
}), e("toBase64URL", function() {
|
76
|
-
return
|
76
|
+
return d(this, !0);
|
77
77
|
}), e("toUint8Array", function() {
|
78
|
-
return
|
78
|
+
return z(this);
|
79
79
|
});
|
80
|
-
},
|
81
|
-
const e = (t, o) => Object.defineProperty(Uint8Array.prototype, t,
|
80
|
+
}, V = function() {
|
81
|
+
const e = (t, o) => Object.defineProperty(Uint8Array.prototype, t, Z(o));
|
82
82
|
e("toBase64", function(t) {
|
83
|
-
return
|
83
|
+
return b(this, t);
|
84
84
|
}), e("toBase64URI", function() {
|
85
|
-
return
|
85
|
+
return b(this, !0);
|
86
86
|
}), e("toBase64URL", function() {
|
87
|
-
return
|
87
|
+
return b(this, !0);
|
88
88
|
});
|
89
|
-
},
|
90
|
-
|
91
|
-
},
|
92
|
-
version:
|
93
|
-
VERSION:
|
94
|
-
atob:
|
95
|
-
atobPolyfill:
|
96
|
-
btoa:
|
97
|
-
btoaPolyfill:
|
98
|
-
fromBase64:
|
99
|
-
toBase64:
|
100
|
-
encode:
|
101
|
-
encodeURI:
|
102
|
-
encodeURL:
|
103
|
-
utob:
|
104
|
-
btou:
|
105
|
-
decode:
|
106
|
-
isValid:
|
107
|
-
fromUint8Array:
|
108
|
-
toUint8Array:
|
109
|
-
extendString:
|
110
|
-
extendUint8Array:
|
111
|
-
extendBuiltins:
|
89
|
+
}, ce = () => {
|
90
|
+
N(), V();
|
91
|
+
}, de = {
|
92
|
+
version: O,
|
93
|
+
VERSION: re,
|
94
|
+
atob: U,
|
95
|
+
atobPolyfill: q,
|
96
|
+
btoa: w,
|
97
|
+
btoaPolyfill: k,
|
98
|
+
fromBase64: A,
|
99
|
+
toBase64: d,
|
100
|
+
encode: d,
|
101
|
+
encodeURI: D,
|
102
|
+
encodeURL: D,
|
103
|
+
utob: L,
|
104
|
+
btou: j,
|
105
|
+
decode: A,
|
106
|
+
isValid: ue,
|
107
|
+
fromUint8Array: b,
|
108
|
+
toUint8Array: z,
|
109
|
+
extendString: N,
|
110
|
+
extendUint8Array: V,
|
111
|
+
extendBuiltins: ce
|
112
112
|
};
|
113
|
-
let
|
113
|
+
let Y = () => ({}), M = [new X()], C = [new ee()], J = [
|
114
114
|
{
|
115
115
|
doFilter: (e, t) => {
|
116
|
-
const o =
|
116
|
+
const o = Y();
|
117
117
|
Object.keys(o).forEach(function(r) {
|
118
118
|
e.headers[r] = o[r];
|
119
119
|
}), t.doFilter(e, t);
|
@@ -121,127 +121,130 @@ let M = () => ({}), J = [new ee()], F = [new te()], Q = [
|
|
121
121
|
},
|
122
122
|
{
|
123
123
|
doFilter: (e) => {
|
124
|
-
new
|
124
|
+
new W("YYYYMMDDHHmmss").serialize(e.data);
|
125
125
|
}
|
126
126
|
}
|
127
|
-
],
|
128
|
-
const
|
129
|
-
|
130
|
-
const t = new
|
127
|
+
], F = "/", p = 1e3 * 30;
|
128
|
+
const g = Q.create();
|
129
|
+
g.interceptors.request.use(function(e) {
|
130
|
+
const t = new K(J);
|
131
131
|
return t.doFilter(e, t), e;
|
132
132
|
});
|
133
|
-
|
133
|
+
g.interceptors.response.use(function(e) {
|
134
134
|
try {
|
135
|
-
const t = new
|
135
|
+
const t = new G(M);
|
136
136
|
return t.doParse(e, t);
|
137
137
|
} catch (t) {
|
138
|
-
throw new
|
138
|
+
throw new te(t.message, { cause: t }, e);
|
139
139
|
}
|
140
140
|
});
|
141
|
-
function
|
141
|
+
function he(e, t = {}, o = { loading: !0, mask: !1, timeout: p }) {
|
142
142
|
let r = t;
|
143
|
-
t instanceof FormData || (r =
|
143
|
+
t instanceof FormData || (r = $(t));
|
144
144
|
let n;
|
145
|
-
return o.loading === !0 && (n =
|
146
|
-
baseURL:
|
145
|
+
return o.loading === !0 && (n = v.service({ fullscreen: !0, background: "transparent" })), g.request({
|
146
|
+
baseURL: F,
|
147
147
|
method: "POST",
|
148
|
-
timeout:
|
148
|
+
timeout: p,
|
149
149
|
withCredentials: !0,
|
150
150
|
url: e,
|
151
151
|
data: r,
|
152
152
|
responseType: "json",
|
153
153
|
...o
|
154
|
-
}).then((
|
154
|
+
}).then((s) => (n && n.close(), s)).catch(function(s) {
|
155
155
|
n && n.close();
|
156
|
-
const i = new
|
157
|
-
return i.handle(
|
156
|
+
const i = new S(C);
|
157
|
+
return i.handle(s, i);
|
158
158
|
});
|
159
159
|
}
|
160
|
-
function
|
160
|
+
function Re(e, t = {}, o = { loading: !0, mask: !1, timeout: p }) {
|
161
161
|
let r;
|
162
|
-
return o.loading === !0 && (r =
|
163
|
-
baseURL:
|
162
|
+
return o.loading === !0 && (r = v.service({ fullscreen: !0, background: "transparent" })), g.request({
|
163
|
+
baseURL: F,
|
164
164
|
method: "POST",
|
165
|
-
timeout:
|
165
|
+
timeout: p,
|
166
166
|
withCredentials: !0,
|
167
167
|
url: e,
|
168
168
|
data: t,
|
169
169
|
responseType: "blob",
|
170
170
|
...o
|
171
171
|
}).then((n) => (r && r.close(), n)).then((n) => {
|
172
|
-
const
|
172
|
+
const s = n.headers["content-disposition"], i = n.data, l = s.match(/attachment; filename=\"(.*?)\"/)[1], f = de.decode(l);
|
173
173
|
if (window.navigator && window.navigator.msSaveOrOpenBlob)
|
174
174
|
window.navigator.msSaveOrOpenBlob(i, f);
|
175
175
|
else {
|
176
|
-
const
|
177
|
-
|
176
|
+
const c = document.createElement("a"), u = URL.createObjectURL(i);
|
177
|
+
c.href = u, c.download = f, document.body.appendChild(c), c.click(), document.body.removeChild(c), URL.revokeObjectURL(u);
|
178
178
|
}
|
179
179
|
}).catch(function(n) {
|
180
180
|
r && r.close();
|
181
|
-
const
|
182
|
-
return
|
181
|
+
const s = new S(C);
|
182
|
+
return s.handle(n, s);
|
183
183
|
});
|
184
184
|
}
|
185
|
-
function
|
185
|
+
function _e(e, t, o) {
|
186
186
|
const r = new FormData();
|
187
187
|
if (t) {
|
188
|
-
const n = Object.keys(t),
|
188
|
+
const n = Object.keys(t), s = {};
|
189
189
|
for (let i = 0; i < n.length; i++) {
|
190
190
|
const l = n[i], f = t[l];
|
191
191
|
if (f instanceof File)
|
192
192
|
r.append(l, f);
|
193
193
|
else if (f instanceof Array) {
|
194
|
-
let
|
194
|
+
let c = !1;
|
195
195
|
for (let u = 0; u < f.length; u++)
|
196
196
|
if (f[u] instanceof File) {
|
197
|
-
|
197
|
+
c = !0;
|
198
198
|
break;
|
199
199
|
}
|
200
|
-
if (
|
200
|
+
if (c)
|
201
201
|
for (let u = 0; u < f.length; u++)
|
202
202
|
r.append(l, f[u]);
|
203
203
|
else
|
204
|
-
|
204
|
+
s[l] = f;
|
205
205
|
} else
|
206
|
-
|
206
|
+
s[l] = f;
|
207
207
|
}
|
208
|
-
r.append("ibayJson", JSON.stringify(
|
208
|
+
r.append("ibayJson", JSON.stringify(s));
|
209
209
|
}
|
210
|
-
return
|
210
|
+
return he(e, r, o);
|
211
211
|
}
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
212
|
+
const De = {
|
213
|
+
setBaseUrl: (e) => {
|
214
|
+
if (!e)
|
215
|
+
throw new Error("pBaseUrl is null!");
|
216
|
+
F = e;
|
217
|
+
},
|
218
|
+
setRequestTimeout: (e) => {
|
219
|
+
p = e;
|
220
|
+
},
|
221
|
+
setRequestHeaders: (e) => {
|
222
|
+
if (!e)
|
223
|
+
throw new Error("pRequestHeaders is null!");
|
224
|
+
if (!(e instanceof Function))
|
225
|
+
throw new Error("pRequestHeaders is not a function!");
|
226
|
+
Y = e;
|
227
|
+
},
|
228
|
+
setRequestFilters: (...e) => {
|
229
|
+
if (e == null)
|
230
|
+
throw new Error("filters is null!");
|
231
|
+
J = e;
|
232
|
+
},
|
233
|
+
setResponseParsers: (...e) => {
|
234
|
+
if (e == null)
|
235
|
+
throw new Error("parsers is null!");
|
236
|
+
M = e;
|
237
|
+
},
|
238
|
+
setErrorHandlers: (...e) => {
|
239
|
+
if (e == null)
|
240
|
+
throw new Error("handlers should not null!");
|
241
|
+
C = e;
|
242
|
+
}
|
243
243
|
};
|
244
244
|
export {
|
245
|
-
|
245
|
+
De as config,
|
246
|
+
Re as download,
|
247
|
+
he as request,
|
248
|
+
_e as upload
|
246
249
|
};
|
247
250
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../node_modules/js-base64/base64.mjs","../../../src/request/disivion/index.ts"],"sourcesContent":["/**\n * base64.ts\n *\n * Licensed under the BSD 3-Clause License.\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * References:\n * http://en.wikipedia.org/wiki/Base64\n *\n * @author Dan Kogai (https://github.com/dankogai)\n */\nconst version = '3.7.7';\n/**\n * @deprecated use lowercase `version`.\n */\nconst VERSION = version;\nconst _hasBuffer = typeof Buffer === 'function';\nconst _TD = typeof TextDecoder === 'function' ? new TextDecoder() : undefined;\nconst _TE = typeof TextEncoder === 'function' ? new TextEncoder() : undefined;\nconst b64ch = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\nconst b64chs = Array.prototype.slice.call(b64ch);\nconst b64tab = ((a) => {\n let tab = {};\n a.forEach((c, i) => tab[c] = i);\n return tab;\n})(b64chs);\nconst b64re = /^(?:[A-Za-z\\d+\\/]{4})*?(?:[A-Za-z\\d+\\/]{2}(?:==)?|[A-Za-z\\d+\\/]{3}=?)?$/;\nconst _fromCC = String.fromCharCode.bind(String);\nconst _U8Afrom = typeof Uint8Array.from === 'function'\n ? Uint8Array.from.bind(Uint8Array)\n : (it) => new Uint8Array(Array.prototype.slice.call(it, 0));\nconst _mkUriSafe = (src) => src\n .replace(/=/g, '').replace(/[+\\/]/g, (m0) => m0 == '+' ? '-' : '_');\nconst _tidyB64 = (s) => s.replace(/[^A-Za-z0-9\\+\\/]/g, '');\n/**\n * polyfill version of `btoa`\n */\nconst btoaPolyfill = (bin) => {\n // console.log('polyfilled');\n let u32, c0, c1, c2, asc = '';\n const pad = bin.length % 3;\n for (let i = 0; i < bin.length;) {\n if ((c0 = bin.charCodeAt(i++)) > 255 ||\n (c1 = bin.charCodeAt(i++)) > 255 ||\n (c2 = bin.charCodeAt(i++)) > 255)\n throw new TypeError('invalid character found');\n u32 = (c0 << 16) | (c1 << 8) | c2;\n asc += b64chs[u32 >> 18 & 63]\n + b64chs[u32 >> 12 & 63]\n + b64chs[u32 >> 6 & 63]\n + b64chs[u32 & 63];\n }\n return pad ? asc.slice(0, pad - 3) + \"===\".substring(pad) : asc;\n};\n/**\n * does what `window.btoa` of web browsers do.\n * @param {String} bin binary string\n * @returns {string} Base64-encoded string\n */\nconst _btoa = typeof btoa === 'function' ? (bin) => btoa(bin)\n : _hasBuffer ? (bin) => Buffer.from(bin, 'binary').toString('base64')\n : btoaPolyfill;\nconst _fromUint8Array = _hasBuffer\n ? (u8a) => Buffer.from(u8a).toString('base64')\n : (u8a) => {\n // cf. https://stackoverflow.com/questions/12710001/how-to-convert-uint8-array-to-base64-encoded-string/12713326#12713326\n const maxargs = 0x1000;\n let strs = [];\n for (let i = 0, l = u8a.length; i < l; i += maxargs) {\n strs.push(_fromCC.apply(null, u8a.subarray(i, i + maxargs)));\n }\n return _btoa(strs.join(''));\n };\n/**\n * converts a Uint8Array to a Base64 string.\n * @param {boolean} [urlsafe] URL-and-filename-safe a la RFC4648 §5\n * @returns {string} Base64 string\n */\nconst fromUint8Array = (u8a, urlsafe = false) => urlsafe ? _mkUriSafe(_fromUint8Array(u8a)) : _fromUint8Array(u8a);\n// This trick is found broken https://github.com/dankogai/js-base64/issues/130\n// const utob = (src: string) => unescape(encodeURIComponent(src));\n// reverting good old fationed regexp\nconst cb_utob = (c) => {\n if (c.length < 2) {\n var cc = c.charCodeAt(0);\n return cc < 0x80 ? c\n : cc < 0x800 ? (_fromCC(0xc0 | (cc >>> 6))\n + _fromCC(0x80 | (cc & 0x3f)))\n : (_fromCC(0xe0 | ((cc >>> 12) & 0x0f))\n + _fromCC(0x80 | ((cc >>> 6) & 0x3f))\n + _fromCC(0x80 | (cc & 0x3f)));\n }\n else {\n var cc = 0x10000\n + (c.charCodeAt(0) - 0xD800) * 0x400\n + (c.charCodeAt(1) - 0xDC00);\n return (_fromCC(0xf0 | ((cc >>> 18) & 0x07))\n + _fromCC(0x80 | ((cc >>> 12) & 0x3f))\n + _fromCC(0x80 | ((cc >>> 6) & 0x3f))\n + _fromCC(0x80 | (cc & 0x3f)));\n }\n};\nconst re_utob = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFFF]|[^\\x00-\\x7F]/g;\n/**\n * @deprecated should have been internal use only.\n * @param {string} src UTF-8 string\n * @returns {string} UTF-16 string\n */\nconst utob = (u) => u.replace(re_utob, cb_utob);\n//\nconst _encode = _hasBuffer\n ? (s) => Buffer.from(s, 'utf8').toString('base64')\n : _TE\n ? (s) => _fromUint8Array(_TE.encode(s))\n : (s) => _btoa(utob(s));\n/**\n * converts a UTF-8-encoded string to a Base64 string.\n * @param {boolean} [urlsafe] if `true` make the result URL-safe\n * @returns {string} Base64 string\n */\nconst encode = (src, urlsafe = false) => urlsafe\n ? _mkUriSafe(_encode(src))\n : _encode(src);\n/**\n * converts a UTF-8-encoded string to URL-safe Base64 RFC4648 §5.\n * @returns {string} Base64 string\n */\nconst encodeURI = (src) => encode(src, true);\n// This trick is found broken https://github.com/dankogai/js-base64/issues/130\n// const btou = (src: string) => decodeURIComponent(escape(src));\n// reverting good old fationed regexp\nconst re_btou = /[\\xC0-\\xDF][\\x80-\\xBF]|[\\xE0-\\xEF][\\x80-\\xBF]{2}|[\\xF0-\\xF7][\\x80-\\xBF]{3}/g;\nconst cb_btou = (cccc) => {\n switch (cccc.length) {\n case 4:\n var cp = ((0x07 & cccc.charCodeAt(0)) << 18)\n | ((0x3f & cccc.charCodeAt(1)) << 12)\n | ((0x3f & cccc.charCodeAt(2)) << 6)\n | (0x3f & cccc.charCodeAt(3)), offset = cp - 0x10000;\n return (_fromCC((offset >>> 10) + 0xD800)\n + _fromCC((offset & 0x3FF) + 0xDC00));\n case 3:\n return _fromCC(((0x0f & cccc.charCodeAt(0)) << 12)\n | ((0x3f & cccc.charCodeAt(1)) << 6)\n | (0x3f & cccc.charCodeAt(2)));\n default:\n return _fromCC(((0x1f & cccc.charCodeAt(0)) << 6)\n | (0x3f & cccc.charCodeAt(1)));\n }\n};\n/**\n * @deprecated should have been internal use only.\n * @param {string} src UTF-16 string\n * @returns {string} UTF-8 string\n */\nconst btou = (b) => b.replace(re_btou, cb_btou);\n/**\n * polyfill version of `atob`\n */\nconst atobPolyfill = (asc) => {\n // console.log('polyfilled');\n asc = asc.replace(/\\s+/g, '');\n if (!b64re.test(asc))\n throw new TypeError('malformed base64.');\n asc += '=='.slice(2 - (asc.length & 3));\n let u24, bin = '', r1, r2;\n for (let i = 0; i < asc.length;) {\n u24 = b64tab[asc.charAt(i++)] << 18\n | b64tab[asc.charAt(i++)] << 12\n | (r1 = b64tab[asc.charAt(i++)]) << 6\n | (r2 = b64tab[asc.charAt(i++)]);\n bin += r1 === 64 ? _fromCC(u24 >> 16 & 255)\n : r2 === 64 ? _fromCC(u24 >> 16 & 255, u24 >> 8 & 255)\n : _fromCC(u24 >> 16 & 255, u24 >> 8 & 255, u24 & 255);\n }\n return bin;\n};\n/**\n * does what `window.atob` of web browsers do.\n * @param {String} asc Base64-encoded string\n * @returns {string} binary string\n */\nconst _atob = typeof atob === 'function' ? (asc) => atob(_tidyB64(asc))\n : _hasBuffer ? (asc) => Buffer.from(asc, 'base64').toString('binary')\n : atobPolyfill;\n//\nconst _toUint8Array = _hasBuffer\n ? (a) => _U8Afrom(Buffer.from(a, 'base64'))\n : (a) => _U8Afrom(_atob(a).split('').map(c => c.charCodeAt(0)));\n/**\n * converts a Base64 string to a Uint8Array.\n */\nconst toUint8Array = (a) => _toUint8Array(_unURI(a));\n//\nconst _decode = _hasBuffer\n ? (a) => Buffer.from(a, 'base64').toString('utf8')\n : _TD\n ? (a) => _TD.decode(_toUint8Array(a))\n : (a) => btou(_atob(a));\nconst _unURI = (a) => _tidyB64(a.replace(/[-_]/g, (m0) => m0 == '-' ? '+' : '/'));\n/**\n * converts a Base64 string to a UTF-8 string.\n * @param {String} src Base64 string. Both normal and URL-safe are supported\n * @returns {string} UTF-8 string\n */\nconst decode = (src) => _decode(_unURI(src));\n/**\n * check if a value is a valid Base64 string\n * @param {String} src a value to check\n */\nconst isValid = (src) => {\n if (typeof src !== 'string')\n return false;\n const s = src.replace(/\\s+/g, '').replace(/={0,2}$/, '');\n return !/[^\\s0-9a-zA-Z\\+/]/.test(s) || !/[^\\s0-9a-zA-Z\\-_]/.test(s);\n};\n//\nconst _noEnum = (v) => {\n return {\n value: v, enumerable: false, writable: true, configurable: true\n };\n};\n/**\n * extend String.prototype with relevant methods\n */\nconst extendString = function () {\n const _add = (name, body) => Object.defineProperty(String.prototype, name, _noEnum(body));\n _add('fromBase64', function () { return decode(this); });\n _add('toBase64', function (urlsafe) { return encode(this, urlsafe); });\n _add('toBase64URI', function () { return encode(this, true); });\n _add('toBase64URL', function () { return encode(this, true); });\n _add('toUint8Array', function () { return toUint8Array(this); });\n};\n/**\n * extend Uint8Array.prototype with relevant methods\n */\nconst extendUint8Array = function () {\n const _add = (name, body) => Object.defineProperty(Uint8Array.prototype, name, _noEnum(body));\n _add('toBase64', function (urlsafe) { return fromUint8Array(this, urlsafe); });\n _add('toBase64URI', function () { return fromUint8Array(this, true); });\n _add('toBase64URL', function () { return fromUint8Array(this, true); });\n};\n/**\n * extend Builtin prototypes with relevant methods\n */\nconst extendBuiltins = () => {\n extendString();\n extendUint8Array();\n};\nconst gBase64 = {\n version: version,\n VERSION: VERSION,\n atob: _atob,\n atobPolyfill: atobPolyfill,\n btoa: _btoa,\n btoaPolyfill: btoaPolyfill,\n fromBase64: decode,\n toBase64: encode,\n encode: encode,\n encodeURI: encodeURI,\n encodeURL: encodeURI,\n utob: utob,\n btou: btou,\n decode: decode,\n isValid: isValid,\n fromUint8Array: fromUint8Array,\n toUint8Array: toUint8Array,\n extendString: extendString,\n extendUint8Array: extendUint8Array,\n extendBuiltins: extendBuiltins\n};\n// makecjs:CUT //\nexport { version };\nexport { VERSION };\nexport { _atob as atob };\nexport { atobPolyfill };\nexport { _btoa as btoa };\nexport { btoaPolyfill };\nexport { decode as fromBase64 };\nexport { encode as toBase64 };\nexport { utob };\nexport { encode };\nexport { encodeURI };\nexport { encodeURI as encodeURL };\nexport { btou };\nexport { decode };\nexport { isValid };\nexport { fromUint8Array };\nexport { toUint8Array };\nexport { extendString };\nexport { extendUint8Array };\nexport { extendBuiltins };\n// and finally,\nexport { gBase64 as Base64 };\n","import axios from 'axios'\r\nimport { Base64 } from 'js-base64'\r\nimport { cloneDeep } from '../../utils'\r\nimport ResponseParserChain, { type ResponseParser } from '../ResponseParserChain'\r\nimport ErrorHandlerChain, { type ErrorHandler } from '../ErrorHandlerChain'\r\nimport RequestFilterChain, { type RequestFilter } from '../RequestFilterChain'\r\nimport DateSerializer from './DateSerializer'\r\nimport DivisionResponseParser from './DivisionResponseParser'\r\nimport DivisionErrorHandler from './DivisionErrorHandler'\r\nimport { ElLoading } from 'element-plus'\r\n\r\nimport ResponseError from '../error/ResponseError'\r\n\r\nexport type RequestParams = Record<string, unknown>\r\n\r\nexport interface RequestOptionsI {\r\n loading?: boolean\r\n mask?: boolean\r\n timeout?: number\r\n}\r\n\r\n//////////////////////////////////// Chain\r\nlet gRequestHeaders: () => Record<string, string | null> = () => ({})\r\nlet gResponseParsers: ResponseParser[] = [new DivisionResponseParser()]\r\nlet gErrorHandlers: ErrorHandler[] = [new DivisionErrorHandler()]\r\nlet gRequestFilters: RequestFilter[] = [\r\n {\r\n doFilter: (request, chain) => {\r\n const headers = gRequestHeaders()\r\n Object.keys(headers).forEach(function (key) {\r\n request.headers![key] = headers[key]\r\n })\r\n chain.doFilter(request, chain)\r\n },\r\n },\r\n {\r\n doFilter: (request) => {\r\n new DateSerializer('YYYYMMDDHHmmss').serialize(request.data)\r\n },\r\n },\r\n]\r\n\r\n//////////////////////////////////// GLOBAL VARS\r\n\r\nlet BASE_URL = '/'\r\nlet REQUEST_TIMEOUT = 1000 * 30\r\nconst LOADING_DELAY = 1500\r\n\r\n//////////////////////////////////// AXIOS\r\n\r\nconst g_AxiosInstance = axios.create()\r\ng_AxiosInstance.interceptors.request.use(function (config) {\r\n const chain = new RequestFilterChain(gRequestFilters)\r\n chain.doFilter(config, chain)\r\n return config\r\n})\r\ng_AxiosInstance.interceptors.response.use(function (response) {\r\n try {\r\n const chain = new ResponseParserChain(gResponseParsers)\r\n return chain.doParse(response, chain)\r\n } catch (e) {\r\n throw new ResponseError((e as Error).message, { cause: e }, response)\r\n }\r\n})\r\n\r\nfunction request<T>(\r\n url: string,\r\n data: RequestParams | FormData = {},\r\n options: RequestOptionsI = { loading: true, mask: false, timeout: REQUEST_TIMEOUT }\r\n): Promise<T> {\r\n let newData = data\r\n if (!(data instanceof FormData)) {\r\n newData = cloneDeep(data)\r\n }\r\n\r\n // loading\r\n let loading: any\r\n\r\n if (options.loading === true) {\r\n loading = ElLoading.service({ fullscreen: true, background: 'transparent' })\r\n }\r\n\r\n return g_AxiosInstance\r\n .request({\r\n baseURL: BASE_URL,\r\n method: 'POST',\r\n timeout: REQUEST_TIMEOUT,\r\n withCredentials: true,\r\n url,\r\n data: newData,\r\n responseType: 'json',\r\n ...options,\r\n })\r\n .then((data) => {\r\n if (loading) {\r\n loading.close()\r\n }\r\n\r\n return data\r\n })\r\n .catch(function (error) {\r\n if (loading) {\r\n loading.close()\r\n }\r\n\r\n const chain = new ErrorHandlerChain(gErrorHandlers)\r\n return chain.handle(error, chain)\r\n }) as Promise<T>\r\n}\r\n\r\nfunction download(url: string, data: RequestParams = {}, options: RequestOptionsI = { loading: true, mask: false, timeout: REQUEST_TIMEOUT }) {\r\n let loading: any\r\n\r\n if (options.loading === true) {\r\n loading = ElLoading.service({ fullscreen: true, background: 'transparent' })\r\n }\r\n\r\n return g_AxiosInstance\r\n .request({\r\n baseURL: BASE_URL,\r\n method: 'POST',\r\n timeout: REQUEST_TIMEOUT,\r\n withCredentials: true,\r\n url,\r\n data,\r\n responseType: 'blob',\r\n ...options,\r\n })\r\n .then((data) => {\r\n if (loading) {\r\n loading.close()\r\n }\r\n\r\n return data\r\n })\r\n .then((response) => {\r\n const contentDisposition = response.headers['content-disposition']\r\n const blob = response.data\r\n\r\n const base64FileName = contentDisposition.match(/attachment; filename=\\\"(.*?)\\\"/)[1]\r\n const decodedFileName = Base64.decode(base64FileName)\r\n // for IE\r\n //@ts-ignore\r\n if (window.navigator && window.navigator.msSaveOrOpenBlob) {\r\n //@ts-ignore\r\n window.navigator.msSaveOrOpenBlob(blob, decodedFileName)\r\n } else {\r\n const a = document.createElement('a')\r\n const url = URL.createObjectURL(blob)\r\n a.href = url\r\n a.download = decodedFileName\r\n document.body.appendChild(a)\r\n a.click()\r\n document.body.removeChild(a)\r\n URL.revokeObjectURL(url)\r\n }\r\n })\r\n .catch(function (error) {\r\n if (loading) {\r\n loading.close()\r\n }\r\n\r\n const chain = new ErrorHandlerChain(gErrorHandlers)\r\n return chain.handle(error, chain)\r\n })\r\n}\r\n\r\nfunction upload(url: string, params: RequestParams, options: RequestOptionsI) {\r\n const formdata = new FormData()\r\n if (params) {\r\n const keys = Object.keys(params)\r\n const normalParams: Record<string, unknown> = {}\r\n\r\n for (let i = 0; i < keys.length; i++) {\r\n const key = keys[i]\r\n const itemValue = params[key]\r\n if (itemValue instanceof File) {\r\n formdata.append(key, itemValue)\r\n } else if (itemValue instanceof Array) {\r\n let isFile = false\r\n for (let j = 0; j < itemValue.length; j++) {\r\n if (itemValue[j] instanceof File) {\r\n isFile = true\r\n break\r\n }\r\n }\r\n if (isFile) {\r\n for (let j = 0; j < itemValue.length; j++) {\r\n formdata.append(key, itemValue[j])\r\n }\r\n } else {\r\n // formdata.append(key, JSON.stringify(itemValue));\r\n normalParams[key] = itemValue\r\n }\r\n } else {\r\n // formdata.append(key, itemValue);\r\n normalParams[key] = itemValue\r\n }\r\n }\r\n formdata.append('ibayJson', JSON.stringify(normalParams))\r\n }\r\n\r\n return request(url, formdata, options)\r\n}\r\n\r\n//////////////////////////////////// Exports\r\n\r\n// api\r\nrequest.download = download\r\nrequest.upload = upload\r\n\r\n// setters\r\nrequest.setBaseUrl = (pBaseUrl: string) => {\r\n if (!pBaseUrl) {\r\n throw new Error(`pBaseUrl is null!`)\r\n }\r\n BASE_URL = pBaseUrl\r\n}\r\nrequest.setRequestTimeout = (pTimeout: number) => {\r\n REQUEST_TIMEOUT = pTimeout\r\n}\r\nrequest.setRequestHeaders = (pRequestHeaders: () => Record<string, string | null>) => {\r\n if (!pRequestHeaders) {\r\n throw new Error(`pRequestHeaders is null!`)\r\n }\r\n\r\n if (!(pRequestHeaders instanceof Function)) {\r\n throw new Error(`pRequestHeaders is not a function!`)\r\n }\r\n\r\n gRequestHeaders = pRequestHeaders\r\n}\r\nrequest.setRequestFilters = (...filters: RequestFilter[]) => {\r\n if (filters == null) {\r\n throw new Error(`filters is null!`)\r\n }\r\n gRequestFilters = filters\r\n}\r\nrequest.setResponseParsers = (...parsers: ResponseParser[]) => {\r\n if (parsers == null) {\r\n throw new Error(`parsers is null!`)\r\n }\r\n gResponseParsers = parsers\r\n}\r\nrequest.setErrorHandlers = (...handlers: ErrorHandler[]) => {\r\n if (handlers == null) {\r\n throw new Error(`handlers should not null!`)\r\n }\r\n gErrorHandlers = handlers\r\n}\r\n\r\nexport default request\r\n"],"names":["version","VERSION","_hasBuffer","_TD","_TE","b64ch","b64chs","b64tab","a","tab","c","i","b64re","_fromCC","_U8Afrom","it","_mkUriSafe","src","m0","_tidyB64","s","btoaPolyfill","bin","u32","c0","c1","c2","asc","pad","_btoa","_fromUint8Array","u8a","strs","l","fromUint8Array","urlsafe","cb_utob","cc","re_utob","utob","u","_encode","encode","encodeURI","re_btou","cb_btou","cccc","cp","offset","btou","b","atobPolyfill","u24","r1","r2","_atob","_toUint8Array","toUint8Array","_unURI","_decode","decode","isValid","_noEnum","v","extendString","_add","name","body","extendUint8Array","extendBuiltins","gBase64","gRequestHeaders","gResponseParsers","DivisionResponseParser","gErrorHandlers","DivisionErrorHandler","gRequestFilters","request","chain","headers","key","DateSerializer","BASE_URL","REQUEST_TIMEOUT","g_AxiosInstance","axios","config","RequestFilterChain","response","ResponseParserChain","e","ResponseError","url","data","options","newData","cloneDeep","loading","ElLoading","error","ErrorHandlerChain","download","contentDisposition","blob","base64FileName","decodedFileName","Base64","upload","params","formdata","keys","normalParams","itemValue","isFile","j","pBaseUrl","pTimeout","pRequestHeaders","filters","parsers","handlers"],"mappings":";;;;;;;;;;;;;AAWA,MAAMA,IAAU,SAIVC,KAAUD,GACVE,IAAa,OAAO,UAAW,YAC/BC,IAAM,OAAO,eAAgB,aAAa,IAAI,YAAW,IAAK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AIA;AACF,mBAASC,IAAI,GAAGA,IAAIF,EAAU,QAAQE;AACpC,YAAAL,EAAS,OAAO7B,GAAKgC,EAAUE,CAAC,CAAC;AAAA;AAInC,UAAAH,EAAa/B,CAAG,IAAIgC;AAAA,MACtB;AAGA,QAAAD,EAAa/B,CAAG,IAAIgC;AAAA,IAExB;AACA,IAAAH,EAAS,OAAO,YAAY,KAAK,UAAUE,CAAY,CAAC;AAAA,EAC1D;AAEO,SAAAlC,EAAQe,GAAKiB,GAAUf,CAAO;AACvC;AAKAjB,EAAQ,WAAWwB;AACnBxB,EAAQ,SAAS8B;AAGjB9B,EAAQ,aAAa,CAACsC,MAAqB;AACzC,MAAI,CAACA;AACG,UAAA,IAAI,MAAM,mBAAmB;AAE1B,EAAAjC,IAAAiC;AACb;AACAtC,EAAQ,oBAAoB,CAACuC,MAAqB;AAC9B,EAAAjC,IAAAiC;AACpB;AACAvC,EAAQ,oBAAoB,CAACwC,MAAyD;AACpF,MAAI,CAACA;AACG,UAAA,IAAI,MAAM,0BAA0B;AAGxC,MAAA,EAAEA,aAA2B;AACzB,UAAA,IAAI,MAAM,oCAAoC;AAGpC,EAAA9C,IAAA8C;AACpB;AACAxC,EAAQ,oBAAoB,IAAIyC,MAA6B;AAC3D,MAAIA,KAAW;AACP,UAAA,IAAI,MAAM,kBAAkB;AAElB,EAAA1C,IAAA0C;AACpB;AACAzC,EAAQ,qBAAqB,IAAI0C,MAA8B;AAC7D,MAAIA,KAAW;AACP,UAAA,IAAI,MAAM,kBAAkB;AAEjB,EAAA/C,IAAA+C;AACrB;AACA1C,EAAQ,mBAAmB,IAAI2C,MAA6B;AAC1D,MAAIA,KAAY;AACR,UAAA,IAAI,MAAM,2BAA2B;AAE5B,EAAA9C,IAAA8C;AACnB;","x_google_ignoreList":[0]}
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../node_modules/js-base64/base64.mjs","../../../src/request/disivion/index.ts"],"sourcesContent":["/**\n * base64.ts\n *\n * Licensed under the BSD 3-Clause License.\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * References:\n * http://en.wikipedia.org/wiki/Base64\n *\n * @author Dan Kogai (https://github.com/dankogai)\n */\nconst version = '3.7.7';\n/**\n * @deprecated use lowercase `version`.\n */\nconst VERSION = version;\nconst _hasBuffer = typeof Buffer === 'function';\nconst _TD = typeof TextDecoder === 'function' ? new TextDecoder() : undefined;\nconst _TE = typeof TextEncoder === 'function' ? new TextEncoder() : undefined;\nconst b64ch = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\nconst b64chs = Array.prototype.slice.call(b64ch);\nconst b64tab = ((a) => {\n let tab = {};\n a.forEach((c, i) => tab[c] = i);\n return tab;\n})(b64chs);\nconst b64re = /^(?:[A-Za-z\\d+\\/]{4})*?(?:[A-Za-z\\d+\\/]{2}(?:==)?|[A-Za-z\\d+\\/]{3}=?)?$/;\nconst _fromCC = String.fromCharCode.bind(String);\nconst _U8Afrom = typeof Uint8Array.from === 'function'\n ? Uint8Array.from.bind(Uint8Array)\n : (it) => new Uint8Array(Array.prototype.slice.call(it, 0));\nconst _mkUriSafe = (src) => src\n .replace(/=/g, '').replace(/[+\\/]/g, (m0) => m0 == '+' ? '-' : '_');\nconst _tidyB64 = (s) => s.replace(/[^A-Za-z0-9\\+\\/]/g, '');\n/**\n * polyfill version of `btoa`\n */\nconst btoaPolyfill = (bin) => {\n // console.log('polyfilled');\n let u32, c0, c1, c2, asc = '';\n const pad = bin.length % 3;\n for (let i = 0; i < bin.length;) {\n if ((c0 = bin.charCodeAt(i++)) > 255 ||\n (c1 = bin.charCodeAt(i++)) > 255 ||\n (c2 = bin.charCodeAt(i++)) > 255)\n throw new TypeError('invalid character found');\n u32 = (c0 << 16) | (c1 << 8) | c2;\n asc += b64chs[u32 >> 18 & 63]\n + b64chs[u32 >> 12 & 63]\n + b64chs[u32 >> 6 & 63]\n + b64chs[u32 & 63];\n }\n return pad ? asc.slice(0, pad - 3) + \"===\".substring(pad) : asc;\n};\n/**\n * does what `window.btoa` of web browsers do.\n * @param {String} bin binary string\n * @returns {string} Base64-encoded string\n */\nconst _btoa = typeof btoa === 'function' ? (bin) => btoa(bin)\n : _hasBuffer ? (bin) => Buffer.from(bin, 'binary').toString('base64')\n : btoaPolyfill;\nconst _fromUint8Array = _hasBuffer\n ? (u8a) => Buffer.from(u8a).toString('base64')\n : (u8a) => {\n // cf. https://stackoverflow.com/questions/12710001/how-to-convert-uint8-array-to-base64-encoded-string/12713326#12713326\n const maxargs = 0x1000;\n let strs = [];\n for (let i = 0, l = u8a.length; i < l; i += maxargs) {\n strs.push(_fromCC.apply(null, u8a.subarray(i, i + maxargs)));\n }\n return _btoa(strs.join(''));\n };\n/**\n * converts a Uint8Array to a Base64 string.\n * @param {boolean} [urlsafe] URL-and-filename-safe a la RFC4648 §5\n * @returns {string} Base64 string\n */\nconst fromUint8Array = (u8a, urlsafe = false) => urlsafe ? _mkUriSafe(_fromUint8Array(u8a)) : _fromUint8Array(u8a);\n// This trick is found broken https://github.com/dankogai/js-base64/issues/130\n// const utob = (src: string) => unescape(encodeURIComponent(src));\n// reverting good old fationed regexp\nconst cb_utob = (c) => {\n if (c.length < 2) {\n var cc = c.charCodeAt(0);\n return cc < 0x80 ? c\n : cc < 0x800 ? (_fromCC(0xc0 | (cc >>> 6))\n + _fromCC(0x80 | (cc & 0x3f)))\n : (_fromCC(0xe0 | ((cc >>> 12) & 0x0f))\n + _fromCC(0x80 | ((cc >>> 6) & 0x3f))\n + _fromCC(0x80 | (cc & 0x3f)));\n }\n else {\n var cc = 0x10000\n + (c.charCodeAt(0) - 0xD800) * 0x400\n + (c.charCodeAt(1) - 0xDC00);\n return (_fromCC(0xf0 | ((cc >>> 18) & 0x07))\n + _fromCC(0x80 | ((cc >>> 12) & 0x3f))\n + _fromCC(0x80 | ((cc >>> 6) & 0x3f))\n + _fromCC(0x80 | (cc & 0x3f)));\n }\n};\nconst re_utob = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFFF]|[^\\x00-\\x7F]/g;\n/**\n * @deprecated should have been internal use only.\n * @param {string} src UTF-8 string\n * @returns {string} UTF-16 string\n */\nconst utob = (u) => u.replace(re_utob, cb_utob);\n//\nconst _encode = _hasBuffer\n ? (s) => Buffer.from(s, 'utf8').toString('base64')\n : _TE\n ? (s) => _fromUint8Array(_TE.encode(s))\n : (s) => _btoa(utob(s));\n/**\n * converts a UTF-8-encoded string to a Base64 string.\n * @param {boolean} [urlsafe] if `true` make the result URL-safe\n * @returns {string} Base64 string\n */\nconst encode = (src, urlsafe = false) => urlsafe\n ? _mkUriSafe(_encode(src))\n : _encode(src);\n/**\n * converts a UTF-8-encoded string to URL-safe Base64 RFC4648 §5.\n * @returns {string} Base64 string\n */\nconst encodeURI = (src) => encode(src, true);\n// This trick is found broken https://github.com/dankogai/js-base64/issues/130\n// const btou = (src: string) => decodeURIComponent(escape(src));\n// reverting good old fationed regexp\nconst re_btou = /[\\xC0-\\xDF][\\x80-\\xBF]|[\\xE0-\\xEF][\\x80-\\xBF]{2}|[\\xF0-\\xF7][\\x80-\\xBF]{3}/g;\nconst cb_btou = (cccc) => {\n switch (cccc.length) {\n case 4:\n var cp = ((0x07 & cccc.charCodeAt(0)) << 18)\n | ((0x3f & cccc.charCodeAt(1)) << 12)\n | ((0x3f & cccc.charCodeAt(2)) << 6)\n | (0x3f & cccc.charCodeAt(3)), offset = cp - 0x10000;\n return (_fromCC((offset >>> 10) + 0xD800)\n + _fromCC((offset & 0x3FF) + 0xDC00));\n case 3:\n return _fromCC(((0x0f & cccc.charCodeAt(0)) << 12)\n | ((0x3f & cccc.charCodeAt(1)) << 6)\n | (0x3f & cccc.charCodeAt(2)));\n default:\n return _fromCC(((0x1f & cccc.charCodeAt(0)) << 6)\n | (0x3f & cccc.charCodeAt(1)));\n }\n};\n/**\n * @deprecated should have been internal use only.\n * @param {string} src UTF-16 string\n * @returns {string} UTF-8 string\n */\nconst btou = (b) => b.replace(re_btou, cb_btou);\n/**\n * polyfill version of `atob`\n */\nconst atobPolyfill = (asc) => {\n // console.log('polyfilled');\n asc = asc.replace(/\\s+/g, '');\n if (!b64re.test(asc))\n throw new TypeError('malformed base64.');\n asc += '=='.slice(2 - (asc.length & 3));\n let u24, bin = '', r1, r2;\n for (let i = 0; i < asc.length;) {\n u24 = b64tab[asc.charAt(i++)] << 18\n | b64tab[asc.charAt(i++)] << 12\n | (r1 = b64tab[asc.charAt(i++)]) << 6\n | (r2 = b64tab[asc.charAt(i++)]);\n bin += r1 === 64 ? _fromCC(u24 >> 16 & 255)\n : r2 === 64 ? _fromCC(u24 >> 16 & 255, u24 >> 8 & 255)\n : _fromCC(u24 >> 16 & 255, u24 >> 8 & 255, u24 & 255);\n }\n return bin;\n};\n/**\n * does what `window.atob` of web browsers do.\n * @param {String} asc Base64-encoded string\n * @returns {string} binary string\n */\nconst _atob = typeof atob === 'function' ? (asc) => atob(_tidyB64(asc))\n : _hasBuffer ? (asc) => Buffer.from(asc, 'base64').toString('binary')\n : atobPolyfill;\n//\nconst _toUint8Array = _hasBuffer\n ? (a) => _U8Afrom(Buffer.from(a, 'base64'))\n : (a) => _U8Afrom(_atob(a).split('').map(c => c.charCodeAt(0)));\n/**\n * converts a Base64 string to a Uint8Array.\n */\nconst toUint8Array = (a) => _toUint8Array(_unURI(a));\n//\nconst _decode = _hasBuffer\n ? (a) => Buffer.from(a, 'base64').toString('utf8')\n : _TD\n ? (a) => _TD.decode(_toUint8Array(a))\n : (a) => btou(_atob(a));\nconst _unURI = (a) => _tidyB64(a.replace(/[-_]/g, (m0) => m0 == '-' ? '+' : '/'));\n/**\n * converts a Base64 string to a UTF-8 string.\n * @param {String} src Base64 string. Both normal and URL-safe are supported\n * @returns {string} UTF-8 string\n */\nconst decode = (src) => _decode(_unURI(src));\n/**\n * check if a value is a valid Base64 string\n * @param {String} src a value to check\n */\nconst isValid = (src) => {\n if (typeof src !== 'string')\n return false;\n const s = src.replace(/\\s+/g, '').replace(/={0,2}$/, '');\n return !/[^\\s0-9a-zA-Z\\+/]/.test(s) || !/[^\\s0-9a-zA-Z\\-_]/.test(s);\n};\n//\nconst _noEnum = (v) => {\n return {\n value: v, enumerable: false, writable: true, configurable: true\n };\n};\n/**\n * extend String.prototype with relevant methods\n */\nconst extendString = function () {\n const _add = (name, body) => Object.defineProperty(String.prototype, name, _noEnum(body));\n _add('fromBase64', function () { return decode(this); });\n _add('toBase64', function (urlsafe) { return encode(this, urlsafe); });\n _add('toBase64URI', function () { return encode(this, true); });\n _add('toBase64URL', function () { return encode(this, true); });\n _add('toUint8Array', function () { return toUint8Array(this); });\n};\n/**\n * extend Uint8Array.prototype with relevant methods\n */\nconst extendUint8Array = function () {\n const _add = (name, body) => Object.defineProperty(Uint8Array.prototype, name, _noEnum(body));\n _add('toBase64', function (urlsafe) { return fromUint8Array(this, urlsafe); });\n _add('toBase64URI', function () { return fromUint8Array(this, true); });\n _add('toBase64URL', function () { return fromUint8Array(this, true); });\n};\n/**\n * extend Builtin prototypes with relevant methods\n */\nconst extendBuiltins = () => {\n extendString();\n extendUint8Array();\n};\nconst gBase64 = {\n version: version,\n VERSION: VERSION,\n atob: _atob,\n atobPolyfill: atobPolyfill,\n btoa: _btoa,\n btoaPolyfill: btoaPolyfill,\n fromBase64: decode,\n toBase64: encode,\n encode: encode,\n encodeURI: encodeURI,\n encodeURL: encodeURI,\n utob: utob,\n btou: btou,\n decode: decode,\n isValid: isValid,\n fromUint8Array: fromUint8Array,\n toUint8Array: toUint8Array,\n extendString: extendString,\n extendUint8Array: extendUint8Array,\n extendBuiltins: extendBuiltins\n};\n// makecjs:CUT //\nexport { version };\nexport { VERSION };\nexport { _atob as atob };\nexport { atobPolyfill };\nexport { _btoa as btoa };\nexport { btoaPolyfill };\nexport { decode as fromBase64 };\nexport { encode as toBase64 };\nexport { utob };\nexport { encode };\nexport { encodeURI };\nexport { encodeURI as encodeURL };\nexport { btou };\nexport { decode };\nexport { isValid };\nexport { fromUint8Array };\nexport { toUint8Array };\nexport { extendString };\nexport { extendUint8Array };\nexport { extendBuiltins };\n// and finally,\nexport { gBase64 as Base64 };\n","import axios from 'axios'\r\nimport { Base64 } from 'js-base64'\r\nimport { cloneDeep } from '../../utils'\r\nimport ResponseParserChain, { type ResponseParser } from '../ResponseParserChain'\r\nimport ErrorHandlerChain, { type ErrorHandler } from '../ErrorHandlerChain'\r\nimport RequestFilterChain, { type RequestFilter } from '../RequestFilterChain'\r\nimport DateSerializer from './DateSerializer'\r\nimport DivisionResponseParser from './DivisionResponseParser'\r\nimport DivisionErrorHandler from './DivisionErrorHandler'\r\nimport { ElLoading } from 'element-plus'\r\n\r\nimport ResponseError from '../error/ResponseError'\r\n\r\nexport type RequestParams = Record<string, unknown>\r\n\r\nexport interface RequestOptionsI {\r\n loading?: boolean\r\n mask?: boolean\r\n timeout?: number\r\n}\r\n\r\n//////////////////////////////////// Chain\r\nlet gRequestHeaders: () => Record<string, string | null> = () => ({})\r\nlet gResponseParsers: ResponseParser[] = [new DivisionResponseParser()]\r\nlet gErrorHandlers: ErrorHandler[] = [new DivisionErrorHandler()]\r\nlet gRequestFilters: RequestFilter[] = [\r\n {\r\n doFilter: (request, chain) => {\r\n const headers = gRequestHeaders()\r\n Object.keys(headers).forEach(function (key) {\r\n request.headers![key] = headers[key]\r\n })\r\n chain.doFilter(request, chain)\r\n },\r\n },\r\n {\r\n doFilter: (request) => {\r\n new DateSerializer('YYYYMMDDHHmmss').serialize(request.data)\r\n },\r\n },\r\n]\r\n\r\n//////////////////////////////////// GLOBAL VARS\r\n\r\nlet BASE_URL = '/'\r\nlet REQUEST_TIMEOUT = 1000 * 30\r\nconst LOADING_DELAY = 1500\r\n\r\n//////////////////////////////////// AXIOS\r\n\r\nconst g_AxiosInstance = axios.create()\r\ng_AxiosInstance.interceptors.request.use(function (config) {\r\n const chain = new RequestFilterChain(gRequestFilters)\r\n chain.doFilter(config, chain)\r\n return config\r\n})\r\ng_AxiosInstance.interceptors.response.use(function (response) {\r\n try {\r\n const chain = new ResponseParserChain(gResponseParsers)\r\n return chain.doParse(response, chain)\r\n } catch (e) {\r\n throw new ResponseError((e as Error).message, { cause: e }, response)\r\n }\r\n})\r\n\r\nexport function request<T>(\r\n url: string,\r\n data: RequestParams | FormData = {},\r\n options: RequestOptionsI = { loading: true, mask: false, timeout: REQUEST_TIMEOUT }\r\n): Promise<T> {\r\n let newData = data\r\n if (!(data instanceof FormData)) {\r\n newData = cloneDeep(data)\r\n }\r\n\r\n // loading\r\n let loading: any\r\n\r\n if (options.loading === true) {\r\n loading = ElLoading.service({ fullscreen: true, background: 'transparent' })\r\n }\r\n\r\n return g_AxiosInstance\r\n .request({\r\n baseURL: BASE_URL,\r\n method: 'POST',\r\n timeout: REQUEST_TIMEOUT,\r\n withCredentials: true,\r\n url,\r\n data: newData,\r\n responseType: 'json',\r\n ...options,\r\n })\r\n .then((data) => {\r\n if (loading) {\r\n loading.close()\r\n }\r\n\r\n return data\r\n })\r\n .catch(function (error) {\r\n if (loading) {\r\n loading.close()\r\n }\r\n\r\n const chain = new ErrorHandlerChain(gErrorHandlers)\r\n return chain.handle(error, chain)\r\n }) as Promise<T>\r\n}\r\n\r\nexport function download(url: string, data: RequestParams = {}, options: RequestOptionsI = { loading: true, mask: false, timeout: REQUEST_TIMEOUT }) {\r\n let loading: any\r\n\r\n if (options.loading === true) {\r\n loading = ElLoading.service({ fullscreen: true, background: 'transparent' })\r\n }\r\n\r\n return g_AxiosInstance\r\n .request({\r\n baseURL: BASE_URL,\r\n method: 'POST',\r\n timeout: REQUEST_TIMEOUT,\r\n withCredentials: true,\r\n url,\r\n data,\r\n responseType: 'blob',\r\n ...options,\r\n })\r\n .then((data) => {\r\n if (loading) {\r\n loading.close()\r\n }\r\n\r\n return data\r\n })\r\n .then((response) => {\r\n const contentDisposition = response.headers['content-disposition']\r\n const blob = response.data\r\n\r\n const base64FileName = contentDisposition.match(/attachment; filename=\\\"(.*?)\\\"/)[1]\r\n const decodedFileName = Base64.decode(base64FileName)\r\n // for IE\r\n //@ts-ignore\r\n if (window.navigator && window.navigator.msSaveOrOpenBlob) {\r\n //@ts-ignore\r\n window.navigator.msSaveOrOpenBlob(blob, decodedFileName)\r\n } else {\r\n const a = document.createElement('a')\r\n const url = URL.createObjectURL(blob)\r\n a.href = url\r\n a.download = decodedFileName\r\n document.body.appendChild(a)\r\n a.click()\r\n document.body.removeChild(a)\r\n URL.revokeObjectURL(url)\r\n }\r\n })\r\n .catch(function (error) {\r\n if (loading) {\r\n loading.close()\r\n }\r\n\r\n const chain = new ErrorHandlerChain(gErrorHandlers)\r\n return chain.handle(error, chain)\r\n })\r\n}\r\n\r\nexport function upload(url: string, params: RequestParams, options: RequestOptionsI) {\r\n const formdata = new FormData()\r\n if (params) {\r\n const keys = Object.keys(params)\r\n const normalParams: Record<string, unknown> = {}\r\n\r\n for (let i = 0; i < keys.length; i++) {\r\n const key = keys[i]\r\n const itemValue = params[key]\r\n if (itemValue instanceof File) {\r\n formdata.append(key, itemValue)\r\n } else if (itemValue instanceof Array) {\r\n let isFile = false\r\n for (let j = 0; j < itemValue.length; j++) {\r\n if (itemValue[j] instanceof File) {\r\n isFile = true\r\n break\r\n }\r\n }\r\n if (isFile) {\r\n for (let j = 0; j < itemValue.length; j++) {\r\n formdata.append(key, itemValue[j])\r\n }\r\n } else {\r\n // formdata.append(key, JSON.stringify(itemValue));\r\n normalParams[key] = itemValue\r\n }\r\n } else {\r\n // formdata.append(key, itemValue);\r\n normalParams[key] = itemValue\r\n }\r\n }\r\n formdata.append('ibayJson', JSON.stringify(normalParams))\r\n }\r\n\r\n return request(url, formdata, options)\r\n}\r\n\r\n// config\r\nexport const config = {\r\n setBaseUrl: (pBaseUrl: string) => {\r\n if (!pBaseUrl) {\r\n throw new Error(`pBaseUrl is null!`)\r\n }\r\n BASE_URL = pBaseUrl\r\n },\r\n setRequestTimeout: (pTimeout: number) => {\r\n REQUEST_TIMEOUT = pTimeout\r\n },\r\n setRequestHeaders: (pRequestHeaders: () => Record<string, string | null>) => {\r\n if (!pRequestHeaders) {\r\n throw new Error(`pRequestHeaders is null!`)\r\n }\r\n\r\n if (!(pRequestHeaders instanceof Function)) {\r\n throw new Error(`pRequestHeaders is not a function!`)\r\n }\r\n\r\n gRequestHeaders = pRequestHeaders\r\n },\r\n setRequestFilters: (...filters: RequestFilter[]) => {\r\n if (filters == null) {\r\n throw new Error(`filters is null!`)\r\n }\r\n gRequestFilters = filters\r\n },\r\n setResponseParsers: (...parsers: ResponseParser[]) => {\r\n if (parsers == null) {\r\n throw new Error(`parsers is null!`)\r\n }\r\n gResponseParsers = parsers\r\n },\r\n setErrorHandlers: (...handlers: ErrorHandler[]) => {\r\n if (handlers == null) {\r\n throw new Error(`handlers should not null!`)\r\n }\r\n gErrorHandlers = handlers\r\n },\r\n}\r\n"],"names":["version","VERSION","_hasBuffer","_TD","_TE","b64ch","b64chs","b64tab","a","tab","c","i","b64re","_fromCC","_U8Afrom","it","_mkUriSafe","src","m0","_tidyB64","s","btoaPolyfill","bin","u32","c0","c1","c2","asc","pad","_btoa","_fromUint8Array","u8a","strs","l","fromUint8Array","urlsafe","cb_utob","cc","re_utob","utob","u","_encode","encode","encodeURI","re_btou","cb_btou","cccc","cp","offset","btou","b","atobPolyfill","u24","r1","r2","_atob","_toUint8Array","toUint8Array","_unURI","_decode","decode","isValid","_noEnum","v","extendString","_add","name","body","extendUint8Array","extendBuiltins","gBase64","gRequestHeaders","gResponseParsers","DivisionResponseParser","gErrorHandlers","DivisionErrorHandler","gRequestFilters","request","chain","headers","key","DateSerializer","BASE_URL","REQUEST_TIMEOUT","g_AxiosInstance","axios","config","RequestFilterChain","response","ResponseParserChain","e","ResponseError","url","data","options","newData","cloneDeep","loading","ElLoading","error","ErrorHandlerChain","download","contentDisposition","blob","base64FileName","decodedFileName","Base64","upload","params","formdata","keys","normalParams","itemValue","isFile","j","pBaseUrl","pTimeout","pRequestHeaders","filters","parsers","handlers"],"mappings":";;;;;;;;;;;;;AAWA,MAAMA,IAAU,SAIVC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
|
-
export {
|
1
|
+
export { request as divisionRequest, download as divisionDownload, upload as divisionUpload, config as divisionConfig } from './disivion';
|
2
2
|
export { default as BizExceptionResponseError } from './error/BizExceptionResponseError';
|
3
3
|
export { default as SessionExceptionResponseError } from './error/SessionExceptionResponseError';
|
4
4
|
export { default as ExceptionResponseError } from './error/ExceptionResponseError';
|
package/dist/request/index.js
CHANGED
@@ -1,11 +1,14 @@
|
|
1
|
-
import {
|
2
|
-
import { default as
|
3
|
-
import { default as
|
4
|
-
import { default as
|
1
|
+
import { config as s, download as i, request as r, upload as n } from "./disivion/index.js";
|
2
|
+
import { default as d } from "./error/BizExceptionResponseError.js";
|
3
|
+
import { default as t } from "./error/SessionExceptionResponseError.js";
|
4
|
+
import { default as l } from "./error/ExceptionResponseError.js";
|
5
5
|
export {
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
d as BizExceptionResponseError,
|
7
|
+
l as ExceptionResponseError,
|
8
|
+
t as SessionExceptionResponseError,
|
9
|
+
s as divisionConfig,
|
10
|
+
i as divisionDownload,
|
11
|
+
r as divisionRequest,
|
12
|
+
n as divisionUpload
|
10
13
|
};
|
11
14
|
//# sourceMappingURL=index.js.map
|
@@ -1,2 +1,2 @@
|
|
1
|
-
declare const _default: "0.1.
|
1
|
+
declare const _default: "0.1.14";
|
2
2
|
export default _default;
|
package/dist/version/version.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"version.js","sources":["../../src/version/version.ts"],"sourcesContent":["export default '0.1.
|
1
|
+
{"version":3,"file":"version.js","sources":["../../src/version/version.ts"],"sourcesContent":["export default '0.1.14';"],"names":["version"],"mappings":"AAAA,MAAAA,IAAe;"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "orion-design",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.14",
|
4
4
|
"main": "dist/index.js",
|
5
5
|
"type": "module",
|
6
6
|
"types": "dist/index.d.ts",
|
@@ -12,7 +12,8 @@
|
|
12
12
|
"dev": "vite build --mode dev --watch",
|
13
13
|
"build": "vue-tsc && vite build",
|
14
14
|
"version": "node ./scripts/generate-version.cjs",
|
15
|
-
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s"
|
15
|
+
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
|
16
|
+
"clean:dist": "rimraf ./dist"
|
16
17
|
},
|
17
18
|
"dependencies": {
|
18
19
|
"js-base64": "^3.7.7",
|
@@ -36,6 +37,7 @@
|
|
36
37
|
"element-plus": "^2.8.4",
|
37
38
|
"glob": "^11.0.0",
|
38
39
|
"lodash-es": "^4.17.21",
|
40
|
+
"rimraf": "^6.0.1",
|
39
41
|
"sass-embedded": "^1.79.4",
|
40
42
|
"type-fest": "^4.26.1",
|
41
43
|
"typescript": "^5.5.3",
|