@aplus-frontend/ui 7.19.0-beta.0 → 7.19.0-beta.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.
|
@@ -1,38 +1,37 @@
|
|
|
1
|
-
import { isObjectWithContent as
|
|
2
|
-
import { ref as
|
|
1
|
+
import { isObjectWithContent as d } from "@aplus-frontend/utils";
|
|
2
|
+
import { ref as i, onMounted as m, onUnmounted as f, computed as l } from "vue";
|
|
3
3
|
import { getUrlQuery as v, setUrlQuery as p } from "../utils/query.mjs";
|
|
4
|
-
const
|
|
5
|
-
const { saveDataSource: s, sendToUrl:
|
|
6
|
-
let
|
|
7
|
-
const
|
|
4
|
+
const S = (u) => {
|
|
5
|
+
const { saveDataSource: s, sendToUrl: c, tableKey: n } = u;
|
|
6
|
+
let o, t, r = !1;
|
|
7
|
+
const a = i({});
|
|
8
8
|
return m(() => {
|
|
9
|
-
if (
|
|
9
|
+
if (c?.value) {
|
|
10
10
|
try {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
);
|
|
11
|
+
const e = v()[n.value] ?? "";
|
|
12
|
+
a.value = e ? JSON.parse(decodeURIComponent(e)) : {};
|
|
14
13
|
} catch {
|
|
15
|
-
|
|
14
|
+
a.value = {};
|
|
16
15
|
}
|
|
17
|
-
|
|
16
|
+
o = setInterval(() => {
|
|
18
17
|
try {
|
|
19
|
-
const
|
|
18
|
+
const e = encodeURIComponent(
|
|
20
19
|
JSON.stringify(s?.getSearchFormValues?.() ?? {})
|
|
21
20
|
);
|
|
22
|
-
|
|
21
|
+
e !== t && (t = e, r = !0);
|
|
23
22
|
} catch {
|
|
24
|
-
|
|
23
|
+
t = "";
|
|
25
24
|
}
|
|
26
|
-
r && (p({ [
|
|
25
|
+
r && (p({ [n.value]: t }), r = !1);
|
|
27
26
|
}, 500);
|
|
28
27
|
}
|
|
29
28
|
}), f(() => {
|
|
30
|
-
|
|
29
|
+
o && clearInterval(o);
|
|
31
30
|
}), {
|
|
32
|
-
mountedData:
|
|
33
|
-
isValidMountedData:
|
|
31
|
+
mountedData: l(() => a.value),
|
|
32
|
+
isValidMountedData: l(() => d(a.value))
|
|
34
33
|
};
|
|
35
34
|
};
|
|
36
35
|
export {
|
|
37
|
-
|
|
36
|
+
S as useSendToUrl
|
|
38
37
|
};
|
package/es/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "7.19.0-beta.
|
|
1
|
+
declare const _default: "7.19.0-beta.1";
|
|
2
2
|
export default _default;
|
package/es/src/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@aplus-frontend/utils"),t=require("vue"),l=require("../utils/query.js"),v=s=>{const{saveDataSource:c,sendToUrl:d,tableKey:u}=s;let n,a,o=!1;const r=t.ref({});return t.onMounted(()=>{if(d?.value){try{const e=l.getUrlQuery()[u.value]??"";r.value=e?JSON.parse(decodeURIComponent(e)):{}}catch{r.value={}}n=setInterval(()=>{try{const e=encodeURIComponent(JSON.stringify(c?.getSearchFormValues?.()??{}));e!==a&&(a=e,o=!0)}catch{a=""}o&&(l.setUrlQuery({[u.value]:a}),o=!1)},500)}}),t.onUnmounted(()=>{n&&clearInterval(n)}),{mountedData:t.computed(()=>r.value),isValidMountedData:t.computed(()=>i.isObjectWithContent(r.value))}};exports.useSendToUrl=v;
|
package/lib/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "7.19.0-beta.
|
|
1
|
+
declare const _default: "7.19.0-beta.1";
|
|
2
2
|
export default _default;
|
package/lib/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="7.19.0-beta.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="7.19.0-beta.1";exports.default=e;
|