@ajaxjs/ui 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/utils.d.ts +22 -4
- package/package.json +4 -3
package/README.md
CHANGED
package/dist/utils.d.ts
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gets a query parameter value from the URL search string.
|
|
3
|
+
*
|
|
4
|
+
* @param variable - The name of the query parameter to retrieve.
|
|
5
|
+
* @param isParent - Whether to get the parameter from the parent window's URL (true) or current window's URL (false).
|
|
6
|
+
* @returns The value of the query parameter if found, otherwise null.
|
|
7
|
+
*/
|
|
1
8
|
export declare function getQueryParam(variable: string, isParent: boolean): string | null;
|
|
2
9
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* @param
|
|
6
|
-
|
|
10
|
+
* Copies text to the clipboard using the modern Clipboard API if available, or a fallback method.
|
|
11
|
+
*
|
|
12
|
+
* @param text - The text to copy to the clipboard.
|
|
13
|
+
* @returns void
|
|
14
|
+
* @description Uses navigator.clipboard.writeText() for modern browsers, and falls back to creating a temporary textarea element
|
|
15
|
+
* for older browsers that don't support the Clipboard API.
|
|
16
|
+
*/
|
|
7
17
|
export declare function copyToClipboard(text: string): void;
|
|
8
18
|
/**
|
|
9
19
|
* 通用的打开下载对话框方法,没有测试过具体兼容性
|
|
@@ -15,4 +25,12 @@ export declare function copyToClipboard(text: string): void;
|
|
|
15
25
|
* @param saveName 保存文件名,可选
|
|
16
26
|
*/
|
|
17
27
|
export declare function openDownloadDialog(url: string | Blob, saveName: string): void;
|
|
28
|
+
/**
|
|
29
|
+
* Processes elements with the "w3-include-html" attribute by fetching and including the specified HTML content.
|
|
30
|
+
* This function recursively processes elements to handle any newly added content that also has the attribute.
|
|
31
|
+
*
|
|
32
|
+
* @description Iterates through all elements in the document, finds those with the "w3-include-html" attribute,
|
|
33
|
+
* fetches the HTML content from the specified file using a synchronous XMLHttpRequest, replaces the element with
|
|
34
|
+
* the fetched content, and then calls itself recursively to process any new elements that might have been added.
|
|
35
|
+
*/
|
|
18
36
|
export declare function myHTMLInclude(): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ajaxjs/ui",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"description": "Widgets based on iView.js",
|
|
15
15
|
"repository": {
|
|
16
16
|
"type": "git",
|
|
17
|
-
"url": "https://github.com/lightweight-component/js/tree/main/ui"
|
|
17
|
+
"url": "https://github.com/lightweight-component/js/tree/main/aj-common-ui"
|
|
18
18
|
},
|
|
19
19
|
"bugs": {
|
|
20
20
|
"url": "https://github.com/lightweight-component/js/issues"
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"preview": "vite preview"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
+
"@ajaxjs/util": "^1.2.1",
|
|
42
43
|
"vue": "^3.5.18"
|
|
43
44
|
},
|
|
44
45
|
"devDependencies": {
|
|
@@ -51,4 +52,4 @@
|
|
|
51
52
|
"vite-plugin-dts": "^4.5.4",
|
|
52
53
|
"vue-tsc": "^3.0.5"
|
|
53
54
|
}
|
|
54
|
-
}
|
|
55
|
+
}
|