react-luminus-components 1.1.17 → 1.1.18
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/.vite/manifest.json +51 -51
- package/dist/{DataKey-SawjodF1.js → DataKey-Chc9JWBN.js} +1 -1
- package/dist/{DataKey-C0-5Uwn-.cjs → DataKey-dhQX8cMa.cjs} +1 -1
- package/dist/{SimpleTooltip-CLfGg88p.cjs → SimpleTooltip-CfoOF2bC.cjs} +1 -1
- package/dist/{SimpleTooltip-DV3SQ0iz.js → SimpleTooltip-Cs6KsWMk.js} +2 -2
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +4 -4
- package/dist/{hasClass-cZEMP5cn.js → hasClass-D2q3Otcv.js} +1 -1
- package/dist/{hasClass-C0uHVOLl.cjs → hasClass-Dg19NteG.cjs} +1 -1
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +4 -4
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +3 -3
- package/dist/main.cjs.js +1 -1
- package/dist/main.es.js +6 -6
- package/dist/textUtils-Bb6c2XYw.cjs +1 -0
- package/dist/textUtils-Bd2QCbzF.js +32 -0
- package/dist/{useAxios-DuhvBHuH.cjs → useAxios-Ce32mjz9.cjs} +1 -1
- package/dist/{useAxios-Co2Q-JSk.js → useAxios-D-fCu46c.js} +1 -1
- package/dist/{useConfirm-5e6ff6zl.cjs → useConfirm-BM62r8mq.cjs} +1 -1
- package/dist/{useConfirm-8RQF_FiV.js → useConfirm-CTpbtdnu.js} +1 -1
- package/dist/utils/text/textUtils.d.ts +1 -0
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +2 -1
- package/package.json +1 -1
- package/dist/textUtils-CDK5A52_.js +0 -28
- package/dist/textUtils-FVcup93t.cjs +0 -1
package/package.json
CHANGED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
const n = (r) => r == null ? !0 : !(typeof r == "object" || typeof r == "function"), a = (r) => {
|
|
2
|
-
n(r) || Object.keys(r).forEach((t) => {
|
|
3
|
-
const s = r[t];
|
|
4
|
-
if (n(s))
|
|
5
|
-
return;
|
|
6
|
-
const e = Object.keys(s);
|
|
7
|
-
e.includes("id") && e.length === 1 && s.id === null ? r[t] = null : a(s);
|
|
8
|
-
});
|
|
9
|
-
}, i = (r) => {
|
|
10
|
-
var s;
|
|
11
|
-
const t = (s = r.response) == null ? void 0 : s.data;
|
|
12
|
-
return t && t.errorFields && t.errorFields.length > 0 ? t.errorFields.map((e) => ({
|
|
13
|
-
name: e.name.split(".").map((o) => `${o.charAt(0).toLowerCase()}${o.slice(1)}`).join("."),
|
|
14
|
-
errors: e.errors
|
|
15
|
-
})) : [];
|
|
16
|
-
}, l = (r, t) => {
|
|
17
|
-
i(t).forEach((e) => {
|
|
18
|
-
r.setError(e.name, { message: e.errors, type: "server" }, { shouldFocus: !0 }), n(r.getValues(e.name)) || r.setError(`${e.name}.id`, { message: e.errors, type: "server" }, { shouldFocus: !0 });
|
|
19
|
-
});
|
|
20
|
-
}, c = (r) => r.length < 300 ? r : r.substring(0, 300) + "...", d = (r) => r < 1024 ? `${r} bytes` : r >= 1024 && r < 1048576 ? `${(r / 1024).toFixed(1)} KB` : `${(r / 1048576).toFixed(1)} MB`;
|
|
21
|
-
export {
|
|
22
|
-
a,
|
|
23
|
-
i as e,
|
|
24
|
-
d as f,
|
|
25
|
-
l as h,
|
|
26
|
-
n as i,
|
|
27
|
-
c as t
|
|
28
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const o=r=>r==null?!0:!(typeof r=="object"||typeof r=="function"),i=r=>{o(r)||Object.keys(r).forEach(t=>{const s=r[t];if(o(s))return;const e=Object.keys(s);e.includes("id")&&e.length===1&&s.id===null?r[t]=null:i(s)})},u=r=>{var s;const t=(s=r.response)==null?void 0:s.data;return t&&t.errorFields&&t.errorFields.length>0?t.errorFields.map(e=>({name:e.name.split(".").map(n=>`${n.charAt(0).toLowerCase()}${n.slice(1)}`).join("."),errors:e.errors})):[]},a=(r,t)=>{u(t).forEach(e=>{r.setError(e.name,{message:e.errors,type:"server"},{shouldFocus:!0}),o(r.getValues(e.name))||r.setError(`${e.name}.id`,{message:e.errors,type:"server"},{shouldFocus:!0})})},l=r=>r.length<300?r:r.substring(0,300)+"...",c=r=>r<1024?`${r} bytes`:r>=1024&&r<1048576?`${(r/1024).toFixed(1)} KB`:`${(r/1048576).toFixed(1)} MB`;exports.extractErrorsFromResponse=u;exports.fixNameIdNulls=i;exports.formatFileSize=c;exports.hookFormSetServerErrors=a;exports.isPrimitive=o;exports.truncateText=l;
|