@fangzhongya/utils 0.0.37 → 0.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/basic/array/index.cjs +7 -7
- package/dist/basic/array/index.js +7 -7
- package/dist/basic/index.cjs +10 -10
- package/dist/basic/index.js +9 -9
- package/dist/basic/string/index.cjs +10 -10
- package/dist/basic/string/index.js +12 -12
- package/dist/{chunk-6KVKFJFV.cjs → chunk-77ZAHOKN.cjs} +5 -5
- package/dist/{chunk-4GGVTYW6.js → chunk-BWA6OSIZ.js} +4 -4
- package/dist/chunk-CFR7GIIL.js +44 -0
- package/dist/{chunk-B4DESWHL.cjs → chunk-FA4AVVIV.cjs} +4 -4
- package/dist/{chunk-52V6AAWI.cjs → chunk-PGENJCCV.cjs} +18 -0
- package/dist/chunk-PW76Z25D.cjs +249 -0
- package/dist/{chunk-D72TRCRX.js → chunk-XOTRYNO4.js} +2 -2
- package/dist/chunk-ZLEU2YQ2.js +249 -0
- package/dist/css/index.cjs +12 -12
- package/dist/css/index.js +13 -13
- package/dist/html/index.cjs +1 -1
- package/dist/html/index.js +1 -1
- package/dist/index-9-f0oXM3.d.ts +22 -0
- package/dist/index-_GH04n6g.d.cts +22 -0
- package/dist/index.cjs +37 -36
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +37 -36
- package/dist/name/index.cjs +3 -3
- package/dist/name/index.js +4 -4
- package/dist/urls/getReplaceUrls.cjs +3 -3
- package/dist/urls/getReplaceUrls.js +2 -2
- package/dist/urls/index.cjs +8 -8
- package/dist/urls/index.js +7 -7
- package/dist/window/download.cjs +21 -0
- package/dist/window/download.d.cts +72 -0
- package/dist/window/download.d.ts +72 -0
- package/dist/window/download.js +21 -0
- package/dist/window/index.cjs +20 -2
- package/dist/window/index.d.cts +1 -0
- package/dist/window/index.d.ts +1 -0
- package/dist/window/index.js +19 -1
- package/package.json +6 -1
- package/dist/chunk-XLSPETGS.js +0 -26
- package/dist/index-DAi9PP0w.d.cts +0 -13
- package/dist/index-vCPDFXBq.d.ts +0 -13
- package/dist/{chunk-IVDRKJ33.js → chunk-BFN33JM5.js} +3 -3
- package/dist/{chunk-ZXWKQRGH.cjs → chunk-BG2YS767.cjs} +2 -2
- package/dist/{chunk-DQM6GFE7.cjs → chunk-DI5JC25H.cjs} +10 -10
- package/dist/{chunk-B6JR73IC.js → chunk-HAXXG6HP.js} +6 -6
- package/dist/{chunk-KDSELPFY.js → chunk-HKUOF43F.js} +10 -10
- package/dist/{chunk-LWMBPLWN.cjs → chunk-HPQRTXFK.cjs} +6 -6
- package/dist/{chunk-D4ROZ7CV.js → chunk-JQPUT54I.js} +11 -11
- package/dist/{chunk-HMAAC5QA.cjs → chunk-UJ6W4KCR.cjs} +3 -3
- package/dist/{chunk-3SJOLMSI.cjs → chunk-UZMD5VAA.cjs} +8 -8
- package/dist/{chunk-GHJWTV6H.js → chunk-YP4WA3PQ.js} +3 -3
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
// packages/window/download.ts
|
|
2
|
+
function downloadText(text, filename = "text.txt", mimeType = "text/plain") {
|
|
3
|
+
downloadFile(text, { filename, mimeType });
|
|
4
|
+
}
|
|
5
|
+
function downloadJSON(jsonData, filename = "data.json") {
|
|
6
|
+
downloadFile(jsonData, {
|
|
7
|
+
filename,
|
|
8
|
+
mimeType: "application/json"
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
function downloadCSV(data, filename = "data.csv", headers) {
|
|
12
|
+
let csvContent = "";
|
|
13
|
+
if (Array.isArray(data) && data.length > 0) {
|
|
14
|
+
if (Array.isArray(data[0])) {
|
|
15
|
+
const rows = data;
|
|
16
|
+
csvContent = rows.map(
|
|
17
|
+
(row) => row.map((cell) => `"${String(cell).replace(/"/g, '""')}"`).join(",")
|
|
18
|
+
).join("\n");
|
|
19
|
+
} else if (typeof data[0] === "object") {
|
|
20
|
+
const objects = data;
|
|
21
|
+
const objectHeaders = headers || Object.keys(objects[0]);
|
|
22
|
+
csvContent = objectHeaders.map((header) => `"${String(header).replace(/"/g, '""')}"`).join(",") + "\n";
|
|
23
|
+
csvContent += objects.map(
|
|
24
|
+
(obj) => objectHeaders.map(
|
|
25
|
+
(header) => `"${String(obj[header] || "").replace(
|
|
26
|
+
/"/g,
|
|
27
|
+
'""'
|
|
28
|
+
)}"`
|
|
29
|
+
).join(",")
|
|
30
|
+
).join("\n");
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
downloadFile(csvContent, {
|
|
34
|
+
filename,
|
|
35
|
+
mimeType: "text/csv"
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
async function downloadViaAJAX(url, filename, options = {}) {
|
|
39
|
+
try {
|
|
40
|
+
const response = await fetch(url, {
|
|
41
|
+
method: "GET",
|
|
42
|
+
...options
|
|
43
|
+
});
|
|
44
|
+
if (!response.ok) {
|
|
45
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
46
|
+
}
|
|
47
|
+
const blob = await response.blob();
|
|
48
|
+
let finalFilename = filename;
|
|
49
|
+
if (!finalFilename) {
|
|
50
|
+
const contentDisposition = response.headers.get(
|
|
51
|
+
"content-disposition"
|
|
52
|
+
);
|
|
53
|
+
if (contentDisposition) {
|
|
54
|
+
const filenameMatch = contentDisposition.match(/filename="?(.+?)"?$/);
|
|
55
|
+
if (filenameMatch) {
|
|
56
|
+
finalFilename = filenameMatch[1];
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
downloadFile(blob, { filename: finalFilename });
|
|
61
|
+
} catch (error) {
|
|
62
|
+
console.error("AJAX \u4E0B\u8F7D\u5931\u8D25:", error);
|
|
63
|
+
throw new Error(
|
|
64
|
+
`\u4E0B\u8F7D\u5931\u8D25: ${error instanceof Error ? error.message : "\u672A\u77E5\u9519\u8BEF"}`
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
function downloadFile(data, options = {}) {
|
|
69
|
+
const {
|
|
70
|
+
filename = "download",
|
|
71
|
+
mimeType = "application/octet-stream",
|
|
72
|
+
charset = "utf-8",
|
|
73
|
+
bom = ""
|
|
74
|
+
} = options;
|
|
75
|
+
try {
|
|
76
|
+
let blobData;
|
|
77
|
+
if (data instanceof Blob) {
|
|
78
|
+
blobData = data;
|
|
79
|
+
} else if (typeof data === "object") {
|
|
80
|
+
const jsonString = JSON.stringify(data, null, 2);
|
|
81
|
+
blobData = bom + jsonString;
|
|
82
|
+
} else if (typeof data === "string") {
|
|
83
|
+
blobData = bom + data;
|
|
84
|
+
} else {
|
|
85
|
+
blobData = data;
|
|
86
|
+
}
|
|
87
|
+
const blob = new Blob([blobData], {
|
|
88
|
+
type: `${mimeType};charset=${charset}`
|
|
89
|
+
});
|
|
90
|
+
const blobUrl = URL.createObjectURL(blob);
|
|
91
|
+
const link = document.createElement("a");
|
|
92
|
+
link.href = blobUrl;
|
|
93
|
+
link.download = filename;
|
|
94
|
+
link.style.display = "none";
|
|
95
|
+
document.body.appendChild(link);
|
|
96
|
+
link.click();
|
|
97
|
+
setTimeout(() => {
|
|
98
|
+
document.body.removeChild(link);
|
|
99
|
+
URL.revokeObjectURL(blobUrl);
|
|
100
|
+
}, 100);
|
|
101
|
+
} catch (error) {
|
|
102
|
+
console.error("\u6587\u4EF6\u4E0B\u8F7D\u5931\u8D25:", error);
|
|
103
|
+
throw new Error(
|
|
104
|
+
`\u4E0B\u8F7D\u5931\u8D25: ${error instanceof Error ? error.message : "\u672A\u77E5\u9519\u8BEF"}`
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
async function downloadFromURL(url, filename, options = {}) {
|
|
109
|
+
const {
|
|
110
|
+
useBlob = true,
|
|
111
|
+
// 默认使用 Blob 方式,确保能触发下载
|
|
112
|
+
headers = {},
|
|
113
|
+
timeout = 3e4
|
|
114
|
+
} = options;
|
|
115
|
+
try {
|
|
116
|
+
if (!useBlob) {
|
|
117
|
+
const link = document.createElement("a");
|
|
118
|
+
link.href = url;
|
|
119
|
+
link.download = filename || getFilenameFromURL(url);
|
|
120
|
+
link.style.display = "none";
|
|
121
|
+
link.target = "_blank";
|
|
122
|
+
document.body.appendChild(link);
|
|
123
|
+
link.click();
|
|
124
|
+
setTimeout(() => {
|
|
125
|
+
document.body.removeChild(link);
|
|
126
|
+
}, 100);
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
const controller = new AbortController();
|
|
130
|
+
const timeoutId = setTimeout(() => controller.abort(), timeout);
|
|
131
|
+
const response = await fetch(url, {
|
|
132
|
+
method: "GET",
|
|
133
|
+
headers,
|
|
134
|
+
signal: controller.signal
|
|
135
|
+
});
|
|
136
|
+
clearTimeout(timeoutId);
|
|
137
|
+
if (!response.ok) {
|
|
138
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
139
|
+
}
|
|
140
|
+
const blob = await response.blob();
|
|
141
|
+
let finalFilename = filename;
|
|
142
|
+
if (!finalFilename) {
|
|
143
|
+
const contentDisposition = response.headers.get(
|
|
144
|
+
"content-disposition"
|
|
145
|
+
);
|
|
146
|
+
if (contentDisposition) {
|
|
147
|
+
const filenameMatch = contentDisposition.match(
|
|
148
|
+
/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/
|
|
149
|
+
);
|
|
150
|
+
if (filenameMatch && filenameMatch[1]) {
|
|
151
|
+
finalFilename = filenameMatch[1].replace(/['"]/g, "");
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
if (!finalFilename) {
|
|
155
|
+
finalFilename = getFilenameFromURL(url);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
const mimeType = getMimeTypeFromBlob(blob, url);
|
|
159
|
+
downloadFile(blob, {
|
|
160
|
+
filename: finalFilename,
|
|
161
|
+
mimeType
|
|
162
|
+
});
|
|
163
|
+
} catch (error) {
|
|
164
|
+
console.error("URL \u4E0B\u8F7D\u5931\u8D25:", error);
|
|
165
|
+
if (error instanceof Error && error.name === "AbortError") {
|
|
166
|
+
throw new Error("\u4E0B\u8F7D\u8D85\u65F6\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u8FDE\u63A5\u6216\u6587\u4EF6\u5927\u5C0F");
|
|
167
|
+
}
|
|
168
|
+
if (useBlob) {
|
|
169
|
+
console.log("Blob \u65B9\u5F0F\u5931\u8D25\uFF0C\u5C1D\u8BD5\u76F4\u63A5\u4E0B\u8F7D...");
|
|
170
|
+
await downloadFromURL(url, filename, {
|
|
171
|
+
...options,
|
|
172
|
+
useBlob: false
|
|
173
|
+
});
|
|
174
|
+
} else {
|
|
175
|
+
throw new Error(
|
|
176
|
+
`\u4E0B\u8F7D\u5931\u8D25: ${error instanceof Error ? error.message : "\u672A\u77E5\u9519\u8BEF"}`
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
async function downloadImage(imageUrl, filename) {
|
|
182
|
+
await downloadFromURL(imageUrl, filename, {
|
|
183
|
+
useBlob: true,
|
|
184
|
+
headers: {
|
|
185
|
+
Accept: "image/*"
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
function getFilenameFromURL(url) {
|
|
190
|
+
try {
|
|
191
|
+
const urlObj = new URL(url);
|
|
192
|
+
const pathname = urlObj.pathname;
|
|
193
|
+
const filename = pathname.substring(pathname.lastIndexOf("/") + 1);
|
|
194
|
+
if (!filename || filename === "/" || !filename.includes(".")) {
|
|
195
|
+
const extension = getFileExtensionFromURL(url) || "bin";
|
|
196
|
+
return `download_${Date.now()}.${extension}`;
|
|
197
|
+
}
|
|
198
|
+
return decodeURIComponent(filename);
|
|
199
|
+
} catch {
|
|
200
|
+
const extension = getFileExtensionFromURL(url) || "bin";
|
|
201
|
+
return `download_${Date.now()}.${extension}`;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
function getFileExtensionFromURL(url) {
|
|
205
|
+
const match = url.match(/\.([a-zA-Z0-9]+)(?:[?#]|$)/);
|
|
206
|
+
return match ? match[1].toLowerCase() : null;
|
|
207
|
+
}
|
|
208
|
+
function getMimeTypeFromBlob(blob, url) {
|
|
209
|
+
if (blob.type && blob.type !== "application/octet-stream") {
|
|
210
|
+
return blob.type;
|
|
211
|
+
}
|
|
212
|
+
const extension = getFileExtensionFromURL(url);
|
|
213
|
+
const mimeTypes = {
|
|
214
|
+
jpg: "image/jpeg",
|
|
215
|
+
jpeg: "image/jpeg",
|
|
216
|
+
png: "image/png",
|
|
217
|
+
gif: "image/gif",
|
|
218
|
+
webp: "image/webp",
|
|
219
|
+
svg: "image/svg+xml",
|
|
220
|
+
pdf: "application/pdf",
|
|
221
|
+
txt: "text/plain",
|
|
222
|
+
json: "application/json",
|
|
223
|
+
csv: "text/csv",
|
|
224
|
+
xml: "application/xml",
|
|
225
|
+
zip: "application/zip",
|
|
226
|
+
mp3: "audio/mpeg",
|
|
227
|
+
mp4: "video/mp4",
|
|
228
|
+
avi: "video/x-msvideo"
|
|
229
|
+
};
|
|
230
|
+
return extension && mimeTypes[extension] ? mimeTypes[extension] : "application/octet-stream";
|
|
231
|
+
}
|
|
232
|
+
async function downloadMultipleFiles(downloads) {
|
|
233
|
+
return Promise.all(
|
|
234
|
+
downloads.map(
|
|
235
|
+
(download) => downloadFromURL(download.url, download.filename)
|
|
236
|
+
)
|
|
237
|
+
);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export {
|
|
241
|
+
downloadText,
|
|
242
|
+
downloadJSON,
|
|
243
|
+
downloadCSV,
|
|
244
|
+
downloadViaAJAX,
|
|
245
|
+
downloadFile,
|
|
246
|
+
downloadFromURL,
|
|
247
|
+
downloadImage,
|
|
248
|
+
downloadMultipleFiles
|
|
249
|
+
};
|
package/dist/css/index.cjs
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-DI5JC25H.cjs');
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
var _chunkCTLBHJGFcjs = require('../chunk-CTLBHJGF.cjs');
|
|
4
5
|
|
|
5
|
-
var _chunkHJTIJGIFcjs = require('../chunk-HJTIJGIF.cjs');
|
|
6
6
|
|
|
7
|
+
var _chunk4X7AFGTVcjs = require('../chunk-4X7AFGTV.cjs');
|
|
8
|
+
require('../chunk-LTVXRDTD.cjs');
|
|
7
9
|
|
|
8
|
-
var _chunkVY5VQ7WEcjs = require('../chunk-VY5VQ7WE.cjs');
|
|
9
10
|
|
|
10
11
|
|
|
11
|
-
var
|
|
12
|
+
var _chunkHJTIJGIFcjs = require('../chunk-HJTIJGIF.cjs');
|
|
12
13
|
|
|
13
14
|
|
|
14
|
-
var
|
|
15
|
+
var _chunkVY5VQ7WEcjs = require('../chunk-VY5VQ7WE.cjs');
|
|
15
16
|
|
|
16
17
|
|
|
17
|
-
var
|
|
18
|
+
var _chunkUGS2F6DKcjs = require('../chunk-UGS2F6DK.cjs');
|
|
18
19
|
|
|
19
20
|
|
|
20
|
-
var
|
|
21
|
+
var _chunkIFVVMDAWcjs = require('../chunk-IFVVMDAW.cjs');
|
|
21
22
|
|
|
22
23
|
|
|
23
|
-
var
|
|
24
|
+
var _chunk6TH2K7LEcjs = require('../chunk-6TH2K7LE.cjs');
|
|
24
25
|
|
|
25
26
|
|
|
26
|
-
var
|
|
27
|
-
require('../chunk-LTVXRDTD.cjs');
|
|
27
|
+
var _chunkSJPWB2OHcjs = require('../chunk-SJPWB2OH.cjs');
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var _chunkGFAUQTB2cjs = require('../chunk-GFAUQTB2.cjs');
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
var _chunkTE3XNGF4cjs = require('../chunk-TE3XNGF4.cjs');
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
var
|
|
36
|
+
var _chunkUGFSIZ5Pcjs = require('../chunk-UGFSIZ5P.cjs');
|
|
37
37
|
require('../chunk-75ZPJI57.cjs');
|
|
38
38
|
|
|
39
39
|
|
package/dist/css/index.js
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-JQPUT54I.js";
|
|
2
|
+
import {
|
|
3
|
+
setClassName
|
|
4
|
+
} from "../chunk-D3YMEKIF.js";
|
|
5
|
+
import {
|
|
6
|
+
setCss
|
|
7
|
+
} from "../chunk-XUL6LPTN.js";
|
|
8
|
+
import "../chunk-J7CICTHH.js";
|
|
2
9
|
import {
|
|
3
10
|
setObjStyle,
|
|
4
11
|
toStyleString
|
|
@@ -6,6 +13,9 @@ import {
|
|
|
6
13
|
import {
|
|
7
14
|
getPositionRelative
|
|
8
15
|
} from "../chunk-MQHLAQQA.js";
|
|
16
|
+
import {
|
|
17
|
+
getCss
|
|
18
|
+
} from "../chunk-5RZYHE3X.js";
|
|
9
19
|
import {
|
|
10
20
|
getPrentClass
|
|
11
21
|
} from "../chunk-KE77GEY2.js";
|
|
@@ -18,22 +28,12 @@ import {
|
|
|
18
28
|
import {
|
|
19
29
|
getSVG
|
|
20
30
|
} from "../chunk-WIYZQNGO.js";
|
|
21
|
-
import {
|
|
22
|
-
setClassName
|
|
23
|
-
} from "../chunk-D3YMEKIF.js";
|
|
24
|
-
import {
|
|
25
|
-
setCss
|
|
26
|
-
} from "../chunk-XUL6LPTN.js";
|
|
27
|
-
import "../chunk-J7CICTHH.js";
|
|
28
|
-
import {
|
|
29
|
-
fetchUnitValue
|
|
30
|
-
} from "../chunk-WX3JYE47.js";
|
|
31
31
|
import {
|
|
32
32
|
getAttrObj
|
|
33
33
|
} from "../chunk-N3FZ4WUI.js";
|
|
34
34
|
import {
|
|
35
|
-
|
|
36
|
-
} from "../chunk-
|
|
35
|
+
fetchUnitValue
|
|
36
|
+
} from "../chunk-WX3JYE47.js";
|
|
37
37
|
import "../chunk-MLKGABMK.js";
|
|
38
38
|
export {
|
|
39
39
|
fetchUnitValue,
|
package/dist/html/index.cjs
CHANGED
|
@@ -12,8 +12,8 @@ var _chunk6TBH7RACcjs = require('../chunk-6TBH7RAC.cjs');
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
var _chunkEWXBN4VGcjs = require('../chunk-EWXBN4VG.cjs');
|
|
15
|
-
require('../chunk-ISHLY7WM.cjs');
|
|
16
15
|
require('../chunk-TE3XNGF4.cjs');
|
|
16
|
+
require('../chunk-ISHLY7WM.cjs');
|
|
17
17
|
require('../chunk-75ZPJI57.cjs');
|
|
18
18
|
|
|
19
19
|
|
package/dist/html/index.js
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { copy } from './window/copy.js';
|
|
2
|
+
import { downloadCSV, downloadFile, downloadFromURL, downloadImage, downloadJSON, downloadMultipleFiles, downloadText, downloadViaAJAX } from './window/download.js';
|
|
3
|
+
import { getAllParams, getParam, getUrlParam, getUrlParams } from './window/getParam.js';
|
|
4
|
+
|
|
5
|
+
declare const index_copy: typeof copy;
|
|
6
|
+
declare const index_downloadCSV: typeof downloadCSV;
|
|
7
|
+
declare const index_downloadFile: typeof downloadFile;
|
|
8
|
+
declare const index_downloadFromURL: typeof downloadFromURL;
|
|
9
|
+
declare const index_downloadImage: typeof downloadImage;
|
|
10
|
+
declare const index_downloadJSON: typeof downloadJSON;
|
|
11
|
+
declare const index_downloadMultipleFiles: typeof downloadMultipleFiles;
|
|
12
|
+
declare const index_downloadText: typeof downloadText;
|
|
13
|
+
declare const index_downloadViaAJAX: typeof downloadViaAJAX;
|
|
14
|
+
declare const index_getAllParams: typeof getAllParams;
|
|
15
|
+
declare const index_getParam: typeof getParam;
|
|
16
|
+
declare const index_getUrlParam: typeof getUrlParam;
|
|
17
|
+
declare const index_getUrlParams: typeof getUrlParams;
|
|
18
|
+
declare namespace index {
|
|
19
|
+
export { index_copy as copy, index_downloadCSV as downloadCSV, index_downloadFile as downloadFile, index_downloadFromURL as downloadFromURL, index_downloadImage as downloadImage, index_downloadJSON as downloadJSON, index_downloadMultipleFiles as downloadMultipleFiles, index_downloadText as downloadText, index_downloadViaAJAX as downloadViaAJAX, index_getAllParams as getAllParams, index_getParam as getParam, index_getUrlParam as getUrlParam, index_getUrlParams as getUrlParams };
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { index as i };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { copy } from './window/copy.cjs';
|
|
2
|
+
import { downloadCSV, downloadFile, downloadFromURL, downloadImage, downloadJSON, downloadMultipleFiles, downloadText, downloadViaAJAX } from './window/download.cjs';
|
|
3
|
+
import { getAllParams, getParam, getUrlParam, getUrlParams } from './window/getParam.cjs';
|
|
4
|
+
|
|
5
|
+
declare const index_copy: typeof copy;
|
|
6
|
+
declare const index_downloadCSV: typeof downloadCSV;
|
|
7
|
+
declare const index_downloadFile: typeof downloadFile;
|
|
8
|
+
declare const index_downloadFromURL: typeof downloadFromURL;
|
|
9
|
+
declare const index_downloadImage: typeof downloadImage;
|
|
10
|
+
declare const index_downloadJSON: typeof downloadJSON;
|
|
11
|
+
declare const index_downloadMultipleFiles: typeof downloadMultipleFiles;
|
|
12
|
+
declare const index_downloadText: typeof downloadText;
|
|
13
|
+
declare const index_downloadViaAJAX: typeof downloadViaAJAX;
|
|
14
|
+
declare const index_getAllParams: typeof getAllParams;
|
|
15
|
+
declare const index_getParam: typeof getParam;
|
|
16
|
+
declare const index_getUrlParam: typeof getUrlParam;
|
|
17
|
+
declare const index_getUrlParams: typeof getUrlParams;
|
|
18
|
+
declare namespace index {
|
|
19
|
+
export { index_copy as copy, index_downloadCSV as downloadCSV, index_downloadFile as downloadFile, index_downloadFromURL as downloadFromURL, index_downloadImage as downloadImage, index_downloadJSON as downloadJSON, index_downloadMultipleFiles as downloadMultipleFiles, index_downloadText as downloadText, index_downloadViaAJAX as downloadViaAJAX, index_getAllParams as getAllParams, index_getParam as getParam, index_getUrlParam as getUrlParam, index_getUrlParams as getUrlParams };
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { index as i };
|
package/dist/index.cjs
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var _chunk77ZAHOKNcjs = require('./chunk-77ZAHOKN.cjs');
|
|
4
|
+
require('./chunk-3DD7YCN2.cjs');
|
|
5
|
+
require('./chunk-UJ6W4KCR.cjs');
|
|
5
6
|
require('./chunk-6A6EAFGL.cjs');
|
|
6
7
|
require('./chunk-CP2ZSRMU.cjs');
|
|
7
8
|
require('./chunk-3ERQHPTD.cjs');
|
|
8
9
|
require('./chunk-IKAH5YFL.cjs');
|
|
9
10
|
|
|
10
11
|
|
|
11
|
-
var
|
|
12
|
+
var _chunkPGENJCCVcjs = require('./chunk-PGENJCCV.cjs');
|
|
13
|
+
require('./chunk-PW76Z25D.cjs');
|
|
12
14
|
require('./chunk-ZRO5GHYV.cjs');
|
|
13
15
|
require('./chunk-27WA7EI2.cjs');
|
|
14
16
|
require('./chunk-IRKWYW5B.cjs');
|
|
@@ -16,15 +18,15 @@ require('./chunk-43VE3KXL.cjs');
|
|
|
16
18
|
require('./chunk-NESVPZNF.cjs');
|
|
17
19
|
require('./chunk-77SI5VSS.cjs');
|
|
18
20
|
require('./chunk-RFUD3TOQ.cjs');
|
|
19
|
-
require('./chunk-3DD7YCN2.cjs');
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
var _chunkZXWKQRGHcjs = require('./chunk-ZXWKQRGH.cjs');
|
|
23
|
-
require('./chunk-O6P3QI3B.cjs');
|
|
24
21
|
|
|
25
22
|
|
|
26
23
|
var _chunkV6PYRA4Acjs = require('./chunk-V6PYRA4A.cjs');
|
|
27
24
|
require('./chunk-FGQXKLTH.cjs');
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
var _chunkPV2N6PF2cjs = require('./chunk-PV2N6PF2.cjs');
|
|
28
|
+
require('./chunk-YAD5PHVF.cjs');
|
|
29
|
+
require('./chunk-RYBJGHXK.cjs');
|
|
28
30
|
require('./chunk-VYOTXPMM.cjs');
|
|
29
31
|
|
|
30
32
|
|
|
@@ -36,10 +38,9 @@ var _chunkHUKQYAV6cjs = require('./chunk-HUKQYAV6.cjs');
|
|
|
36
38
|
require('./chunk-5VQ4EAJZ.cjs');
|
|
37
39
|
|
|
38
40
|
|
|
39
|
-
var
|
|
40
|
-
require('./chunk-YAD5PHVF.cjs');
|
|
41
|
-
require('./chunk-RYBJGHXK.cjs');
|
|
41
|
+
var _chunkBG2YS767cjs = require('./chunk-BG2YS767.cjs');
|
|
42
42
|
require('./chunk-KRBTSMT2.cjs');
|
|
43
|
+
require('./chunk-O6P3QI3B.cjs');
|
|
43
44
|
require('./chunk-XHR36FJK.cjs');
|
|
44
45
|
require('./chunk-WI55O3IV.cjs');
|
|
45
46
|
|
|
@@ -56,10 +57,6 @@ require('./chunk-2BY5RQHU.cjs');
|
|
|
56
57
|
require('./chunk-HCEAYQHS.cjs');
|
|
57
58
|
|
|
58
59
|
|
|
59
|
-
var _chunkWCOLWI35cjs = require('./chunk-WCOLWI35.cjs');
|
|
60
|
-
require('./chunk-L2U4EVBL.cjs');
|
|
61
|
-
|
|
62
|
-
|
|
63
60
|
var _chunkQN6KZWKMcjs = require('./chunk-QN6KZWKM.cjs');
|
|
64
61
|
require('./chunk-LEPZYF2N.cjs');
|
|
65
62
|
require('./chunk-E2MM4MEC.cjs');
|
|
@@ -67,28 +64,39 @@ require('./chunk-6TBH7RAC.cjs');
|
|
|
67
64
|
require('./chunk-EWXBN4VG.cjs');
|
|
68
65
|
|
|
69
66
|
|
|
70
|
-
var
|
|
67
|
+
var _chunkDI5JC25Hcjs = require('./chunk-DI5JC25H.cjs');
|
|
68
|
+
require('./chunk-CTLBHJGF.cjs');
|
|
69
|
+
require('./chunk-4X7AFGTV.cjs');
|
|
70
|
+
require('./chunk-LTVXRDTD.cjs');
|
|
71
71
|
require('./chunk-HJTIJGIF.cjs');
|
|
72
72
|
require('./chunk-VY5VQ7WE.cjs');
|
|
73
|
+
require('./chunk-UGS2F6DK.cjs');
|
|
73
74
|
require('./chunk-IFVVMDAW.cjs');
|
|
74
75
|
require('./chunk-6TH2K7LE.cjs');
|
|
75
76
|
require('./chunk-SJPWB2OH.cjs');
|
|
76
77
|
require('./chunk-GFAUQTB2.cjs');
|
|
77
|
-
require('./chunk-
|
|
78
|
-
|
|
79
|
-
require('./chunk-LTVXRDTD.cjs');
|
|
78
|
+
require('./chunk-TE3XNGF4.cjs');
|
|
79
|
+
|
|
80
80
|
|
|
81
|
+
var _chunkZUIHJQD6cjs = require('./chunk-ZUIHJQD6.cjs');
|
|
82
|
+
require('./chunk-2OR4FUOA.cjs');
|
|
83
|
+
require('./chunk-EOJVE3HL.cjs');
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
var _chunkWCOLWI35cjs = require('./chunk-WCOLWI35.cjs');
|
|
87
|
+
require('./chunk-L2U4EVBL.cjs');
|
|
81
88
|
|
|
82
|
-
|
|
83
|
-
require('./chunk-
|
|
89
|
+
|
|
90
|
+
var _chunkFA4AVVIVcjs = require('./chunk-FA4AVVIV.cjs');
|
|
91
|
+
require('./chunk-UZMD5VAA.cjs');
|
|
92
|
+
require('./chunk-L7FSHU27.cjs');
|
|
84
93
|
require('./chunk-JHV27P2Q.cjs');
|
|
85
94
|
require('./chunk-ETMYYVQJ.cjs');
|
|
86
95
|
require('./chunk-XG44HG5N.cjs');
|
|
87
96
|
require('./chunk-QXK4IUBI.cjs');
|
|
88
97
|
require('./chunk-3GVTDRAE.cjs');
|
|
89
|
-
require('./chunk-J7S3KBHL.cjs');
|
|
90
|
-
require('./chunk-L7FSHU27.cjs');
|
|
91
98
|
require('./chunk-XWCRGY54.cjs');
|
|
99
|
+
require('./chunk-J7S3KBHL.cjs');
|
|
92
100
|
require('./chunk-UGT4QBTM.cjs');
|
|
93
101
|
require('./chunk-NRJPCN4J.cjs');
|
|
94
102
|
require('./chunk-E4WBX6J5.cjs');
|
|
@@ -100,17 +108,17 @@ require('./chunk-CDQONLGU.cjs');
|
|
|
100
108
|
require('./chunk-D3SX7OUV.cjs');
|
|
101
109
|
require('./chunk-7AIT4XSD.cjs');
|
|
102
110
|
require('./chunk-GOUC2DFA.cjs');
|
|
103
|
-
require('./chunk-
|
|
111
|
+
require('./chunk-HPQRTXFK.cjs');
|
|
112
|
+
require('./chunk-SOAKYJIG.cjs');
|
|
113
|
+
require('./chunk-TCMJPIRM.cjs');
|
|
104
114
|
require('./chunk-NDKOWDDX.cjs');
|
|
105
115
|
require('./chunk-XSQOJWXL.cjs');
|
|
106
116
|
require('./chunk-GD3OA7GU.cjs');
|
|
107
117
|
require('./chunk-MHHMXDHD.cjs');
|
|
108
|
-
require('./chunk-SOAKYJIG.cjs');
|
|
109
|
-
require('./chunk-TCMJPIRM.cjs');
|
|
110
|
-
require('./chunk-2H3KVSFA.cjs');
|
|
111
|
-
require('./chunk-ILJLXJ5O.cjs');
|
|
112
118
|
require('./chunk-OJBZ7UUC.cjs');
|
|
113
119
|
require('./chunk-JR6ZN6QD.cjs');
|
|
120
|
+
require('./chunk-2H3KVSFA.cjs');
|
|
121
|
+
require('./chunk-ILJLXJ5O.cjs');
|
|
114
122
|
require('./chunk-PW7RP73J.cjs');
|
|
115
123
|
require('./chunk-XW3XIK3D.cjs');
|
|
116
124
|
require('./chunk-UEVMS6QD.cjs');
|
|
@@ -118,14 +126,7 @@ require('./chunk-OQL4GIEJ.cjs');
|
|
|
118
126
|
require('./chunk-A5LHXE5X.cjs');
|
|
119
127
|
require('./chunk-MIC3W2VY.cjs');
|
|
120
128
|
require('./chunk-ISHLY7WM.cjs');
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
var _chunkZUIHJQD6cjs = require('./chunk-ZUIHJQD6.cjs');
|
|
124
|
-
require('./chunk-2OR4FUOA.cjs');
|
|
125
|
-
require('./chunk-EOJVE3HL.cjs');
|
|
126
129
|
require('./chunk-UGFSIZ5P.cjs');
|
|
127
|
-
require('./chunk-TE3XNGF4.cjs');
|
|
128
|
-
require('./chunk-UGS2F6DK.cjs');
|
|
129
130
|
require('./chunk-75ZPJI57.cjs');
|
|
130
131
|
|
|
131
132
|
|
|
@@ -142,4 +143,4 @@ require('./chunk-75ZPJI57.cjs');
|
|
|
142
143
|
|
|
143
144
|
|
|
144
145
|
|
|
145
|
-
exports.basic =
|
|
146
|
+
exports.basic = _chunkFA4AVVIVcjs.basic_exports; exports.css = _chunkDI5JC25Hcjs.css_exports; exports.date = _chunkWCOLWI35cjs.date_exports; exports.dom = _chunkZUIHJQD6cjs.dom_exports; exports.html = _chunkQN6KZWKMcjs.html_exports; exports.iss = _chunkIJDVZOVJcjs.iss_exports; exports.judge = _chunkUHKL2RG3cjs.judge_exports; exports.load = _chunkXXS5G6S6cjs.load_exports; exports.log = _chunkHUKQYAV6cjs.log_exports; exports.name = _chunkBG2YS767cjs.name_exports; exports.node = _chunkV6PYRA4Acjs.node_exports; exports.tree = _chunkPV2N6PF2cjs.tree_exports; exports.urls = _chunk77ZAHOKNcjs.urls_exports; exports.window = _chunkPGENJCCVcjs.window_exports;
|
package/dist/index.d.cts
CHANGED
|
@@ -11,7 +11,7 @@ export { i as name } from './index-BbrWO_KD.cjs';
|
|
|
11
11
|
export { i as node } from './index-CK2c-6vv.cjs';
|
|
12
12
|
export { i as tree } from './index-cuR7l2XV.cjs';
|
|
13
13
|
export { i as urls } from './index-CPpoPAO6.cjs';
|
|
14
|
-
export { i as window } from './index-
|
|
14
|
+
export { i as window } from './index-_GH04n6g.cjs';
|
|
15
15
|
import './index-D8_Udh46.cjs';
|
|
16
16
|
import './basic/array/asyncMergeArray.cjs';
|
|
17
17
|
import './basic/array/compareArray.cjs';
|
|
@@ -97,4 +97,5 @@ import './urls/getUrlCatalogueLast.cjs';
|
|
|
97
97
|
import './urls/getUrlCatalogueObj.cjs';
|
|
98
98
|
import './urls/toUrlParam.cjs';
|
|
99
99
|
import './window/copy.cjs';
|
|
100
|
+
import './window/download.cjs';
|
|
100
101
|
import './window/getParam.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export { i as name } from './index-CS54GrWo.js';
|
|
|
11
11
|
export { i as node } from './index-BocAlCa8.js';
|
|
12
12
|
export { i as tree } from './index-CPO1AFVg.js';
|
|
13
13
|
export { i as urls } from './index-Cgz5ZPX9.js';
|
|
14
|
-
export { i as window } from './index-
|
|
14
|
+
export { i as window } from './index-9-f0oXM3.js';
|
|
15
15
|
import './index-BYfEDFkm.js';
|
|
16
16
|
import './basic/array/asyncMergeArray.js';
|
|
17
17
|
import './basic/array/compareArray.js';
|
|
@@ -97,4 +97,5 @@ import './urls/getUrlCatalogueLast.js';
|
|
|
97
97
|
import './urls/getUrlCatalogueObj.js';
|
|
98
98
|
import './urls/toUrlParam.js';
|
|
99
99
|
import './window/copy.js';
|
|
100
|
+
import './window/download.js';
|
|
100
101
|
import './window/getParam.js';
|