@arkyn/components 3.0.10 → 3.0.11
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
|
-
{"version":3,"file":"useAutomation.d.ts","sourceRoot":"","sources":["../../src/hooks/useAutomation.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAGH,iBAAS,aAAa,CAAC,gBAAgB,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"useAutomation.d.ts","sourceRoot":"","sources":["../../src/hooks/useAutomation.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAGH,iBAAS,aAAa,CAAC,gBAAgB,EAAE,GAAG,QAgC3C;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4715,40 +4715,39 @@ function wi() {
|
|
|
4715
4715
|
//#endregion
|
|
4716
4716
|
//#region src/hooks/useAutomation.ts
|
|
4717
4717
|
function Ti(e) {
|
|
4718
|
-
let { closeAll: t } = bi(), { showToast: n } = wi()
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4718
|
+
let { closeAll: t } = bi(), { showToast: n } = wi();
|
|
4719
|
+
o(() => {
|
|
4720
|
+
let r = e?.closeModal, i = e?.message, a = e?.name, o = e?.cause?.data?.scrollTo, s = e?.cause?.fieldErrors ? Object.values(e?.cause?.fieldErrors)[0] : null;
|
|
4721
|
+
if (r && t(), o && xe.scrollTo(o, {
|
|
4722
|
+
smooth: !0,
|
|
4723
|
+
offset: 20
|
|
4724
|
+
}), !(!i && !s)) {
|
|
4725
|
+
if (_i.includes(a)) {
|
|
4726
|
+
n({
|
|
4727
|
+
message: i,
|
|
4728
|
+
type: "success"
|
|
4728
4729
|
});
|
|
4729
|
-
|
|
4730
|
-
|
|
4730
|
+
return;
|
|
4731
|
+
}
|
|
4732
|
+
if (gi.includes(a)) {
|
|
4733
|
+
if (s) {
|
|
4734
|
+
n({
|
|
4735
|
+
message: s,
|
|
4736
|
+
type: "danger"
|
|
4737
|
+
});
|
|
4738
|
+
return;
|
|
4739
|
+
}
|
|
4740
|
+
i !== "Unprocessable entity" && n({
|
|
4741
|
+
message: i,
|
|
4731
4742
|
type: "danger"
|
|
4732
4743
|
});
|
|
4733
4744
|
}
|
|
4734
4745
|
}
|
|
4735
4746
|
}, [
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
s,
|
|
4747
|
+
e,
|
|
4748
|
+
t,
|
|
4739
4749
|
n
|
|
4740
4750
|
]);
|
|
4741
|
-
o(() => {
|
|
4742
|
-
r && t(), c && xe.scrollTo(c, {
|
|
4743
|
-
smooth: !0,
|
|
4744
|
-
offset: 20
|
|
4745
|
-
}), u();
|
|
4746
|
-
}, [
|
|
4747
|
-
r,
|
|
4748
|
-
c,
|
|
4749
|
-
u,
|
|
4750
|
-
t
|
|
4751
|
-
]);
|
|
4752
4751
|
}
|
|
4753
4752
|
//#endregion
|
|
4754
4753
|
//#region src/hooks/useCopyToClipboard.ts
|