@ajaxjs/ui 1.4.1 → 1.4.2

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),i={},l=(e,t)=>{const r=e.__vccOpts||e;for(const[n,o]of t)r[n]=o;return r};function s(e,t,r,n,o,c){return a.openBlock(),a.createElementBlock("button",null,"hihi")}const u=l(i,[["render",s]]);function p(e,t){const n=(t?parent.location:window.location).search.substring(1).split("&");for(let o=0;o<n.length;o++){const c=n[o].split("=");if(c[0]==e)return c[1]}return null}function d(e){if(navigator.clipboard)navigator.clipboard.writeText(e);else{const t=document.createElement("textarea");document.body.appendChild(t),t.style.position="fixed",t.style.clip="rect(0 0 0 0)",t.style.top="10px",t.value=e,t.select(),document.execCommand("copy",!0),document.body.removeChild(t)}}exports.MyButton=u;exports.copyToClipboard=d;exports.getQueryParam=p;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),u={},a=(e,r)=>{const o=e.__vccOpts||e;for(const[n,t]of r)o[n]=t;return o};function i(e,r,o,n,t,c){return s.openBlock(),s.createElementBlock("button",null,"hihi")}const l=a(u,[["render",i]]);function p(e,r){const n=(r?parent.location:window.location).search.substring(1).split("&");for(let t=0;t<n.length;t++){const c=n[t].split("=");if(c[0]==e)return c[1]}return null}exports.MyButton=l;exports.getQueryParam=p;
@@ -1,33 +1,24 @@
1
- import { openBlock as a, createElementBlock as i } from "vue";
2
- const l = {}, s = (e, t) => {
3
- const r = e.__vccOpts || e;
4
- for (const [n, o] of t)
5
- r[n] = o;
6
- return r;
1
+ import { openBlock as s, createElementBlock as i } from "vue";
2
+ const a = {}, u = (n, r) => {
3
+ const e = n.__vccOpts || n;
4
+ for (const [o, t] of r)
5
+ e[o] = t;
6
+ return e;
7
7
  };
8
- function p(e, t, r, n, o, c) {
9
- return a(), i("button", null, "hihi");
8
+ function l(n, r, e, o, t, c) {
9
+ return s(), i("button", null, "hihi");
10
10
  }
11
- const d = /* @__PURE__ */ s(l, [["render", p]]);
12
- function m(e, t) {
13
- const n = (t ? parent.location : window.location).search.substring(1).split("&");
14
- for (let o = 0; o < n.length; o++) {
15
- const c = n[o].split("=");
16
- if (c[0] == e)
11
+ const _ = /* @__PURE__ */ u(a, [["render", l]]);
12
+ function f(n, r) {
13
+ const o = (r ? parent.location : window.location).search.substring(1).split("&");
14
+ for (let t = 0; t < o.length; t++) {
15
+ const c = o[t].split("=");
16
+ if (c[0] == n)
17
17
  return c[1];
18
18
  }
19
19
  return null;
20
20
  }
21
- function f(e) {
22
- if (navigator.clipboard)
23
- navigator.clipboard.writeText(e);
24
- else {
25
- const t = document.createElement("textarea");
26
- document.body.appendChild(t), t.style.position = "fixed", t.style.clip = "rect(0 0 0 0)", t.style.top = "10px", t.value = e, t.select(), document.execCommand("copy", !0), document.body.removeChild(t);
27
- }
28
- }
29
21
  export {
30
- d as MyButton,
31
- f as copyToClipboard,
32
- m as getQueryParam
22
+ _ as MyButton,
23
+ f as getQueryParam
33
24
  };
@@ -1 +1 @@
1
- (function(t,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],n):(t=typeof globalThis<"u"?globalThis:t||self,n(t.ajaxjs_ui={},t.Vue))})(this,(function(t,n){"use strict";const a={},s=(o,e)=>{const c=o.__vccOpts||o;for(const[r,i]of e)c[r]=i;return c};function l(o,e,c,r,i,u){return n.openBlock(),n.createElementBlock("button",null,"hihi")}const d=s(a,[["render",l]]);function p(o,e){const r=(e?parent.location:window.location).search.substring(1).split("&");for(let i=0;i<r.length;i++){const u=r[i].split("=");if(u[0]==o)return u[1]}return null}function f(o){if(navigator.clipboard)navigator.clipboard.writeText(o);else{const e=document.createElement("textarea");document.body.appendChild(e),e.style.position="fixed",e.style.clip="rect(0 0 0 0)",e.style.top="10px",e.value=o,e.select(),document.execCommand("copy",!0),document.body.removeChild(e)}}t.MyButton=d,t.copyToClipboard=f,t.getQueryParam=p,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.ajaxjs_ui={},e.Vue))})(this,(function(e,t){"use strict";const c={},f=(o,i)=>{const u=o.__vccOpts||o;for(const[r,n]of i)u[r]=n;return u};function a(o,i,u,r,n,s){return t.openBlock(),t.createElementBlock("button",null,"hihi")}const l=f(c,[["render",a]]);function p(o,i){const r=(i?parent.location:window.location).search.substring(1).split("&");for(let n=0;n<r.length;n++){const s=r[n].split("=");if(s[0]==o)return s[1]}return null}e.MyButton=l,e.getQueryParam=p,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
package/dist/utils.d.ts CHANGED
@@ -6,31 +6,3 @@
6
6
  * @returns The value of the query parameter if found, otherwise null.
7
7
  */
8
8
  export declare function getQueryParam(variable: string, isParent: boolean): string | null;
9
- /**
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
- */
17
- export declare function copyToClipboard(text: string): void;
18
- /**
19
- * 通用的打开下载对话框方法,没有测试过具体兼容性
20
- * https://www.cnblogs.com/liuxianan/p/js-download.html
21
- *
22
- * ref 这应该是你见过的最全前端下载总结 https://juejin.cn/post/6844903763359039501
23
- *
24
- * @param url 下载地址,也可以是一个blob对象,必选
25
- * @param saveName 保存文件名,可选
26
- */
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
- */
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.1",
3
+ "version": "1.4.2",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -39,7 +39,7 @@
39
39
  "preview": "vite preview"
40
40
  },
41
41
  "dependencies": {
42
- "@ajaxjs/util": "^1.2.1",
42
+ "@ajaxjs/util": "^1.2.3",
43
43
  "vue": "^3.5.18"
44
44
  },
45
45
  "devDependencies": {