react-luminus-components 1.2.33 → 1.2.34
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 +50 -35
- package/dist/{EventType-D1zXMD8A.js → EventType-ZylDtXuB.js} +1 -1
- package/dist/SimpleTooltip-Bp0AmtP_.js +5 -0
- package/dist/{Typography-B12JkmMC.js → Typography-DbHYaPxW.js} +4 -4
- package/dist/{UserAvatarToggle-BWDRIIXE.js → UserAvatarToggle-Dq9Xmfcp.js} +87 -87
- package/dist/contexts.es.js +96 -96
- package/dist/dateUtils-CWKBTsx7.cjs +1 -0
- package/dist/dateUtils-Crak7ii9.js +131 -0
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +7 -7
- package/dist/layout.es.js +12 -12
- package/dist/main.es.js +69 -69
- package/dist/style.css +1 -1
- package/dist/{textUtils-BLtD0zaS.js → textUtils-BbxuIsKq.js} +2 -2
- package/dist/{useConfirm-CKDkB8lL.js → useConfirm-akv7w_iA.js} +10 -10
- package/dist/{useKeyPress-DuxmarzT.js → useKeyPress-CwWcvmEW.js} +2 -2
- package/dist/{usePermissions-Cg_BMKPX.js → usePermissions-CQVgatvt.js} +1 -1
- package/dist/utils/hookForm/hookFormUtils.d.ts +2 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +13 -136
- package/package.json +1 -1
- package/dist/SimpleTooltip-cMiObSvf.js +0 -5
package/dist/utils/index.d.ts
CHANGED
package/dist/utils.cjs.js
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 e=require("./textUtils-CHVVh2oi.cjs"),o=require("./dateUtils-CWKBTsx7.cjs");function i(r,t){r.setValue(t,null)}exports.extractErrorsFromResponse=e.extractErrorsFromResponse;exports.fixNameIdNulls=e.fixNameIdNulls;exports.formatFileSize=e.formatFileSize;exports.hookFormSetServerErrors=e.hookFormSetServerErrors;exports.isPrimitive=e.isPrimitive;exports.joinStrings=e.joinStrings;exports.truncateText=e.truncateText;exports.isISODate=o.isISODate;exports.hookFormSetNull=i;
|
package/dist/utils.es.js
CHANGED
|
@@ -1,139 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
function
|
|
4
|
-
|
|
5
|
-
let a;
|
|
6
|
-
if (n.date) {
|
|
7
|
-
const i = w(n.date, 2);
|
|
8
|
-
a = x(i.restDateString, i.year);
|
|
9
|
-
}
|
|
10
|
-
if (!a || isNaN(a.getTime()))
|
|
11
|
-
return /* @__PURE__ */ new Date(NaN);
|
|
12
|
-
const s = a.getTime();
|
|
13
|
-
let o = 0, c;
|
|
14
|
-
if (n.time && (o = I(n.time), isNaN(o)))
|
|
15
|
-
return /* @__PURE__ */ new Date(NaN);
|
|
16
|
-
if (n.timezone) {
|
|
17
|
-
if (c = C(n.timezone), isNaN(c))
|
|
18
|
-
return /* @__PURE__ */ new Date(NaN);
|
|
19
|
-
} else {
|
|
20
|
-
const i = new Date(s + o), u = /* @__PURE__ */ new Date(0);
|
|
21
|
-
return u.setFullYear(
|
|
22
|
-
i.getUTCFullYear(),
|
|
23
|
-
i.getUTCMonth(),
|
|
24
|
-
i.getUTCDate()
|
|
25
|
-
), u.setHours(
|
|
26
|
-
i.getUTCHours(),
|
|
27
|
-
i.getUTCMinutes(),
|
|
28
|
-
i.getUTCSeconds(),
|
|
29
|
-
i.getUTCMilliseconds()
|
|
30
|
-
), u;
|
|
31
|
-
}
|
|
32
|
-
return new Date(s + o + c);
|
|
1
|
+
import { e as a, c as i, f as l, h as m, i as n, j as f, t as u } from "./textUtils-BbxuIsKq.js";
|
|
2
|
+
import { i as S } from "./dateUtils-Crak7ii9.js";
|
|
3
|
+
function o(r, e) {
|
|
4
|
+
r.setValue(e, null);
|
|
33
5
|
}
|
|
34
|
-
const f = {
|
|
35
|
-
dateTimeDelimiter: /[T ]/,
|
|
36
|
-
timeZoneDelimiter: /[Z ]/i,
|
|
37
|
-
timezone: /([Z+-].*)$/
|
|
38
|
-
}, g = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/, T = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/, h = /^([+-])(\d{2})(?::?(\d{2}))?$/;
|
|
39
|
-
function U(t) {
|
|
40
|
-
const e = {}, r = t.split(f.dateTimeDelimiter);
|
|
41
|
-
let n;
|
|
42
|
-
if (r.length > 2)
|
|
43
|
-
return e;
|
|
44
|
-
if (/:/.test(r[0]) ? n = r[0] : (e.date = r[0], n = r[1], f.timeZoneDelimiter.test(e.date) && (e.date = t.split(f.timeZoneDelimiter)[0], n = t.substr(
|
|
45
|
-
e.date.length,
|
|
46
|
-
t.length
|
|
47
|
-
))), n) {
|
|
48
|
-
const a = f.timezone.exec(n);
|
|
49
|
-
a ? (e.time = n.replace(a[1], ""), e.timezone = a[1]) : e.time = n;
|
|
50
|
-
}
|
|
51
|
-
return e;
|
|
52
|
-
}
|
|
53
|
-
function w(t, e) {
|
|
54
|
-
const r = new RegExp(
|
|
55
|
-
"^(?:(\\d{4}|[+-]\\d{" + (4 + e) + "})|(\\d{2}|[+-]\\d{" + (2 + e) + "})$)"
|
|
56
|
-
), n = t.match(r);
|
|
57
|
-
if (!n)
|
|
58
|
-
return { year: NaN, restDateString: "" };
|
|
59
|
-
const a = n[1] ? parseInt(n[1]) : null, s = n[2] ? parseInt(n[2]) : null;
|
|
60
|
-
return {
|
|
61
|
-
year: s === null ? a : s * 100,
|
|
62
|
-
restDateString: t.slice((n[1] || n[2]).length)
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
function x(t, e) {
|
|
66
|
-
if (e === null)
|
|
67
|
-
return /* @__PURE__ */ new Date(NaN);
|
|
68
|
-
const r = t.match(g);
|
|
69
|
-
if (!r)
|
|
70
|
-
return /* @__PURE__ */ new Date(NaN);
|
|
71
|
-
const n = !!r[4], a = l(r[1]), s = l(r[2]) - 1, o = l(r[3]), c = l(r[4]), i = l(r[5]) - 1;
|
|
72
|
-
if (n)
|
|
73
|
-
return F(e, c, i) ? S(e, c, i) : /* @__PURE__ */ new Date(NaN);
|
|
74
|
-
{
|
|
75
|
-
const u = /* @__PURE__ */ new Date(0);
|
|
76
|
-
return !y(e, s, o) || !z(e, a) ? /* @__PURE__ */ new Date(NaN) : (u.setUTCFullYear(e, s, Math.max(a, o)), u);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
function l(t) {
|
|
80
|
-
return t ? parseInt(t) : 1;
|
|
81
|
-
}
|
|
82
|
-
function I(t) {
|
|
83
|
-
const e = t.match(T);
|
|
84
|
-
if (!e)
|
|
85
|
-
return NaN;
|
|
86
|
-
const r = m(e[1]), n = m(e[2]), a = m(e[3]);
|
|
87
|
-
return O(r, n, a) ? r * d + n * D + a * 1e3 : NaN;
|
|
88
|
-
}
|
|
89
|
-
function m(t) {
|
|
90
|
-
return t && parseFloat(t.replace(",", ".")) || 0;
|
|
91
|
-
}
|
|
92
|
-
function C(t) {
|
|
93
|
-
if (t === "Z")
|
|
94
|
-
return 0;
|
|
95
|
-
const e = t.match(h);
|
|
96
|
-
if (!e)
|
|
97
|
-
return 0;
|
|
98
|
-
const r = e[1] === "+" ? -1 : 1, n = parseInt(e[2]), a = e[3] && parseInt(e[3]) || 0;
|
|
99
|
-
return k(n, a) ? r * (n * d + a * D) : NaN;
|
|
100
|
-
}
|
|
101
|
-
function S(t, e, r) {
|
|
102
|
-
const n = /* @__PURE__ */ new Date(0);
|
|
103
|
-
n.setUTCFullYear(t, 0, 4);
|
|
104
|
-
const a = n.getUTCDay() || 7, s = (e - 1) * 7 + r + 1 - a;
|
|
105
|
-
return n.setUTCDate(n.getUTCDate() + s), n;
|
|
106
|
-
}
|
|
107
|
-
const Y = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
108
|
-
function p(t) {
|
|
109
|
-
return t % 400 === 0 || t % 4 === 0 && t % 100 !== 0;
|
|
110
|
-
}
|
|
111
|
-
function y(t, e, r) {
|
|
112
|
-
return e >= 0 && e <= 11 && r >= 1 && r <= (Y[e] || (p(t) ? 29 : 28));
|
|
113
|
-
}
|
|
114
|
-
function z(t, e) {
|
|
115
|
-
return e >= 1 && e <= (p(t) ? 366 : 365);
|
|
116
|
-
}
|
|
117
|
-
function F(t, e, r) {
|
|
118
|
-
return e >= 1 && e <= 53 && r >= 0 && r <= 6;
|
|
119
|
-
}
|
|
120
|
-
function O(t, e, r) {
|
|
121
|
-
return t === 24 ? e === 0 && r === 0 : r >= 0 && r < 60 && e >= 0 && e < 60 && t >= 0 && t < 25;
|
|
122
|
-
}
|
|
123
|
-
function k(t, e) {
|
|
124
|
-
return e >= 0 && e <= 59;
|
|
125
|
-
}
|
|
126
|
-
const R = (t) => {
|
|
127
|
-
const e = N(t);
|
|
128
|
-
return !Number.isNaN(e.getTime());
|
|
129
|
-
};
|
|
130
6
|
export {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
7
|
+
a as extractErrorsFromResponse,
|
|
8
|
+
i as fixNameIdNulls,
|
|
9
|
+
l as formatFileSize,
|
|
10
|
+
o as hookFormSetNull,
|
|
11
|
+
m as hookFormSetServerErrors,
|
|
12
|
+
S as isISODate,
|
|
13
|
+
n as isPrimitive,
|
|
14
|
+
f as joinStrings,
|
|
15
|
+
u as truncateText
|
|
139
16
|
};
|
package/package.json
CHANGED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { j as o, O as e, T as i } from "./UserAvatarToggle-BWDRIIXE.js";
|
|
2
|
-
const a = ({ text: s, placement: r, children: t }) => /* @__PURE__ */ o.jsx(e, { placement: r, overlay: /* @__PURE__ */ o.jsx(i, { className: "luminus-tooltip", children: s }), children: t });
|
|
3
|
-
export {
|
|
4
|
-
a as S
|
|
5
|
-
};
|