@datawire-ai/busyfile-design-library 1.31.0 → 1.32.0
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/index100.js +10 -5
- package/dist/index101.js +216 -66
- package/dist/index102.js +13 -124
- package/dist/index103.js +30 -11
- package/dist/index104.js +3 -219
- package/dist/index105.js +46 -14
- package/dist/index106.js +16 -30
- package/dist/index107.js +135 -3
- package/dist/index108.js +10 -46
- package/dist/index109.js +4 -16
- package/dist/index110.js +48 -134
- package/dist/index111.js +9 -50
- package/dist/index112.js +650 -8
- package/dist/index113.js +13 -14
- package/dist/index114.js +226 -13
- package/dist/index115.js +14 -226
- package/dist/index116.js +10 -648
- package/dist/index117.js +12 -25
- package/dist/index118.js +205 -21
- package/dist/index119.js +21 -38
- package/dist/index12.js +150 -85
- package/dist/index120.js +399 -17
- package/dist/index121.js +25 -6
- package/dist/index122.js +22 -12
- package/dist/index123.js +39 -206
- package/dist/index124.js +18 -22
- package/dist/index125.js +6 -400
- package/dist/index126.js +25 -2
- package/dist/index127.js +29 -53
- package/dist/index128.js +5 -65
- package/dist/index129.js +2 -25
- package/dist/index130.js +53 -29
- package/dist/index131.js +65 -5
- package/dist/index132.js +525 -52
- package/dist/index133.js +127 -4
- package/dist/index134.js +133 -4
- package/dist/index135.js +52 -16
- package/dist/index136.js +4 -5
- package/dist/index137.js +4 -8
- package/dist/index138.js +13 -14
- package/dist/index139.js +5 -4
- package/dist/index140.js +8 -4
- package/dist/index141.js +16 -5
- package/dist/index142.js +4 -5
- package/dist/index143.js +4 -4
- package/dist/index144.js +5 -4
- package/dist/index145.js +5 -6
- package/dist/index146.js +4 -24
- package/dist/index147.js +4 -6
- package/dist/index148.js +5 -3
- package/dist/index149.js +24 -6
- package/dist/index150.js +6 -5
- package/dist/index151.js +4 -4
- package/dist/index152.js +6 -5
- package/dist/index153.js +5 -4
- package/dist/index154.js +4 -8
- package/dist/index155.js +2 -2
- package/dist/index156.js +1 -1
- package/dist/index157.js +8 -4
- package/dist/index158.js +4 -5
- package/dist/index159.js +4 -58
- package/dist/index160.js +4 -66
- package/dist/index161.js +6 -240
- package/dist/index162.js +56 -37
- package/dist/index163.js +66 -4
- package/dist/index164.js +240 -7
- package/dist/index165.js +38 -12
- package/dist/index166.js +4 -7
- package/dist/index167.js +7 -10
- package/dist/index168.js +12 -9
- package/dist/index169.js +7 -8
- package/dist/index170.js +9 -15
- package/dist/index171.js +11 -24
- package/dist/index172.js +9 -20
- package/dist/index173.js +15 -52
- package/dist/index174.js +24 -42
- package/dist/index175.js +20 -10
- package/dist/index176.js +51 -18
- package/dist/index177.js +40 -15
- package/dist/index178.js +9 -6
- package/dist/index179.js +20 -23
- package/dist/index180.js +16 -18
- package/dist/index181.js +7 -16
- package/dist/index182.js +23 -6
- package/dist/index183.js +19 -5
- package/dist/index184.js +16 -5
- package/dist/index185.js +6 -4
- package/dist/index186.js +4 -4
- package/dist/index187.js +4 -3
- package/dist/index188.js +4 -6
- package/dist/index189.js +4 -7
- package/dist/index190.js +3 -6
- package/dist/index191.js +6 -5
- package/dist/index192.js +7 -3
- package/dist/index193.js +6 -3
- package/dist/index194.js +5 -3
- package/dist/index195.js +3 -3
- package/dist/index196.js +3 -4
- package/dist/index197.js +3 -3
- package/dist/index198.js +3 -3
- package/dist/index199.js +4 -3
- package/dist/index200.js +4 -2
- package/dist/index201.js +4 -2
- package/dist/index202.js +3 -524
- package/dist/index203.js +2 -128
- package/dist/index204.js +2 -134
- package/dist/index208.js +1 -1
- package/dist/index209.js +1 -1
- package/dist/index212.js +1 -1
- package/dist/index228.js +1 -1
- package/dist/index248.js +3 -3
- package/dist/index259.js +1 -1
- package/dist/index26.js +31 -17
- package/dist/index262.js +1 -1
- package/dist/index264.js +1 -1
- package/dist/index265.js +1 -1
- package/dist/index266.js +3 -3
- package/dist/index267.js +2 -2
- package/dist/index268.js +1 -1
- package/dist/index30.js +52 -51
- package/dist/index42.js +5 -5
- package/dist/index44.js +7 -7
- package/dist/index46.js +6 -6
- package/dist/index48.js +1 -1
- package/dist/index49.js +11 -11
- package/dist/index50.js +1 -1
- package/dist/index52.js +9 -9
- package/dist/index53.js +17 -17
- package/dist/index54.js +1 -1
- package/dist/index55.js +1 -1
- package/dist/index56.js +1 -1
- package/dist/index57.js +1 -1
- package/dist/index59.js +4 -4
- package/dist/index61.js +1 -1
- package/dist/index62.js +1 -1
- package/dist/index63.js +1 -1
- package/dist/index65.js +1 -1
- package/dist/index66.js +1 -1
- package/dist/index67.js +1 -1
- package/dist/index68.js +1 -1
- package/dist/index70.js +1 -1
- package/dist/index71.js +1 -1
- package/dist/index73.js +1 -1
- package/dist/index74.js +1 -1
- package/dist/index75.js +6 -6
- package/dist/index78.js +1 -1
- package/dist/index79.js +1 -1
- package/dist/index80.js +2 -2
- package/dist/index81.js +1 -1
- package/dist/index82.js +18 -18
- package/dist/index84.js +1 -1
- package/dist/index85.js +12 -12
- package/dist/index86.js +3 -3
- package/dist/index87.js +5 -5
- package/dist/index88.js +1 -1
- package/dist/index90.js +6 -33
- package/dist/index92.js +51 -10
- package/dist/index93.js +6 -4
- package/dist/index94.js +24 -12
- package/dist/index95.js +33 -6
- package/dist/index96.js +7 -7
- package/dist/index97.js +7 -51
- package/dist/index98.js +69 -7
- package/dist/index99.js +124 -23
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +11 -4
- package/package.json +1 -1
package/dist/index159.js
CHANGED
|
@@ -1,61 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//#region static
|
|
5
|
-
static tz(e, ...t) {
|
|
6
|
-
return t.length ? new i(...t, e) : new i(Date.now(), e);
|
|
7
|
-
}
|
|
8
|
-
//#endregion
|
|
9
|
-
//#region representation
|
|
10
|
-
toISOString() {
|
|
11
|
-
const [e, t, n] = this.tzComponents(), r = `${e}${t}:${n}`;
|
|
12
|
-
return this.internal.toISOString().slice(0, -1) + r;
|
|
13
|
-
}
|
|
14
|
-
toString() {
|
|
15
|
-
return `${this.toDateString()} ${this.toTimeString()}`;
|
|
16
|
-
}
|
|
17
|
-
toDateString() {
|
|
18
|
-
const [e, t, n, r] = this.internal.toUTCString().split(" ");
|
|
19
|
-
return `${e == null ? void 0 : e.slice(0, -1)} ${n} ${t} ${r}`;
|
|
20
|
-
}
|
|
21
|
-
toTimeString() {
|
|
22
|
-
const e = this.internal.toUTCString().split(" ")[4], [t, n, r] = this.tzComponents();
|
|
23
|
-
return `${e} GMT${t}${n}${r} (${o(this.timeZone, this)})`;
|
|
24
|
-
}
|
|
25
|
-
toLocaleString(e, t) {
|
|
26
|
-
return Date.prototype.toLocaleString.call(this, e, {
|
|
27
|
-
...t,
|
|
28
|
-
timeZone: (t == null ? void 0 : t.timeZone) || this.timeZone
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
toLocaleDateString(e, t) {
|
|
32
|
-
return Date.prototype.toLocaleDateString.call(this, e, {
|
|
33
|
-
...t,
|
|
34
|
-
timeZone: (t == null ? void 0 : t.timeZone) || this.timeZone
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
toLocaleTimeString(e, t) {
|
|
38
|
-
return Date.prototype.toLocaleTimeString.call(this, e, {
|
|
39
|
-
...t,
|
|
40
|
-
timeZone: (t == null ? void 0 : t.timeZone) || this.timeZone
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
//#endregion
|
|
44
|
-
//#region private
|
|
45
|
-
tzComponents() {
|
|
46
|
-
const e = this.getTimezoneOffset(), t = e > 0 ? "-" : "+", n = String(Math.floor(Math.abs(e) / 60)).padStart(2, "0"), r = String(Math.abs(e) % 60).padStart(2, "0");
|
|
47
|
-
return [t, n, r];
|
|
48
|
-
}
|
|
49
|
-
//#endregion
|
|
50
|
-
withTimeZone(e) {
|
|
51
|
-
return new i(+this, e);
|
|
52
|
-
}
|
|
53
|
-
//#region date-fns integration
|
|
54
|
-
[Symbol.for("constructDateFrom")](e) {
|
|
55
|
-
return new i(+new Date(e), this.timeZone);
|
|
56
|
-
}
|
|
57
|
-
//#endregion
|
|
1
|
+
import t from "react";
|
|
2
|
+
function a(e) {
|
|
3
|
+
return t.createElement("th", { ...e });
|
|
58
4
|
}
|
|
59
5
|
export {
|
|
60
|
-
|
|
6
|
+
a as WeekNumberHeader
|
|
61
7
|
};
|
package/dist/index160.js
CHANGED
|
@@ -1,69 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
constructor(...e) {
|
|
5
|
-
super(), e.length > 1 && typeof e[e.length - 1] == "string" && (this.timeZone = e.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(s(this.timeZone, this)) ? this.setTime(NaN) : e.length ? typeof e[0] == "number" && (e.length === 1 || e.length === 2 && typeof e[1] != "number") ? this.setTime(e[0]) : typeof e[0] == "string" ? this.setTime(+new Date(e[0])) : e[0] instanceof Date ? this.setTime(+e[0]) : (this.setTime(+new Date(...e)), U(this), a(this)) : this.setTime(Date.now());
|
|
6
|
-
}
|
|
7
|
-
static tz(e, ...o) {
|
|
8
|
-
return o.length ? new n(...o, e) : new n(Date.now(), e);
|
|
9
|
-
}
|
|
10
|
-
//#endregion
|
|
11
|
-
//#region time zone
|
|
12
|
-
withTimeZone(e) {
|
|
13
|
-
return new n(+this, e);
|
|
14
|
-
}
|
|
15
|
-
getTimezoneOffset() {
|
|
16
|
-
const e = -s(this.timeZone, this);
|
|
17
|
-
return e > 0 ? Math.floor(e) : Math.ceil(e);
|
|
18
|
-
}
|
|
19
|
-
//#endregion
|
|
20
|
-
//#region time
|
|
21
|
-
setTime(e) {
|
|
22
|
-
return Date.prototype.setTime.apply(this, arguments), a(this), +this;
|
|
23
|
-
}
|
|
24
|
-
//#endregion
|
|
25
|
-
//#region date-fns integration
|
|
26
|
-
[Symbol.for("constructDateFrom")](e) {
|
|
27
|
-
return new n(+new Date(e), this.timeZone);
|
|
28
|
-
}
|
|
29
|
-
//#endregion
|
|
30
|
-
}
|
|
31
|
-
const D = /^(get|set)(?!UTC)/;
|
|
32
|
-
Object.getOwnPropertyNames(Date.prototype).forEach((t) => {
|
|
33
|
-
if (!D.test(t)) return;
|
|
34
|
-
const e = t.replace(D, "$1UTC");
|
|
35
|
-
n.prototype[e] && (t.startsWith("get") ? n.prototype[t] = function() {
|
|
36
|
-
return this.internal[e]();
|
|
37
|
-
} : (n.prototype[t] = function() {
|
|
38
|
-
return Date.prototype[e].apply(this.internal, arguments), H(this), +this;
|
|
39
|
-
}, n.prototype[e] = function() {
|
|
40
|
-
return Date.prototype[e].apply(this, arguments), a(this), +this;
|
|
41
|
-
}));
|
|
42
|
-
});
|
|
43
|
-
function a(t) {
|
|
44
|
-
t.internal.setTime(+t), t.internal.setUTCSeconds(t.internal.getUTCSeconds() - Math.round(-s(t.timeZone, t) * 60));
|
|
45
|
-
}
|
|
46
|
-
function H(t) {
|
|
47
|
-
Date.prototype.setFullYear.call(t, t.internal.getUTCFullYear(), t.internal.getUTCMonth(), t.internal.getUTCDate()), Date.prototype.setHours.call(t, t.internal.getUTCHours(), t.internal.getUTCMinutes(), t.internal.getUTCSeconds(), t.internal.getUTCMilliseconds()), U(t);
|
|
48
|
-
}
|
|
49
|
-
function U(t) {
|
|
50
|
-
const e = s(t.timeZone, t), o = e > 0 ? Math.floor(e) : Math.ceil(e), i = /* @__PURE__ */ new Date(+t);
|
|
51
|
-
i.setUTCHours(i.getUTCHours() - 1);
|
|
52
|
-
const r = -(/* @__PURE__ */ new Date(+t)).getTimezoneOffset(), g = -(/* @__PURE__ */ new Date(+i)).getTimezoneOffset(), m = r - g, M = Date.prototype.getHours.apply(t) !== t.internal.getUTCHours();
|
|
53
|
-
m && M && t.internal.setUTCMinutes(t.internal.getUTCMinutes() + m);
|
|
54
|
-
const f = r - o;
|
|
55
|
-
f && Date.prototype.setUTCMinutes.call(t, Date.prototype.getUTCMinutes.call(t) + f);
|
|
56
|
-
const l = /* @__PURE__ */ new Date(+t);
|
|
57
|
-
l.setUTCSeconds(0);
|
|
58
|
-
const y = r > 0 ? l.getSeconds() : (l.getSeconds() - 60) % 60, c = Math.round(-(s(t.timeZone, t) * 60)) % 60;
|
|
59
|
-
(c || y) && (t.internal.setUTCSeconds(t.internal.getUTCSeconds() + c), Date.prototype.setUTCSeconds.call(t, Date.prototype.getUTCSeconds.call(t) + c + y));
|
|
60
|
-
const p = s(t.timeZone, t), u = p > 0 ? Math.floor(p) : Math.ceil(p), w = -(/* @__PURE__ */ new Date(+t)).getTimezoneOffset() - u, O = u !== o, C = w - f;
|
|
61
|
-
if (O && C) {
|
|
62
|
-
Date.prototype.setUTCMinutes.call(t, Date.prototype.getUTCMinutes.call(t) + C);
|
|
63
|
-
const h = s(t.timeZone, t), S = h > 0 ? Math.floor(h) : Math.ceil(h), T = u - S;
|
|
64
|
-
T && (t.internal.setUTCMinutes(t.internal.getUTCMinutes() + T), Date.prototype.setUTCMinutes.call(t, Date.prototype.getUTCMinutes.call(t) + T));
|
|
65
|
-
}
|
|
1
|
+
import t from "react";
|
|
2
|
+
function o(e) {
|
|
3
|
+
return t.createElement("tbody", { ...e });
|
|
66
4
|
}
|
|
67
5
|
export {
|
|
68
|
-
|
|
6
|
+
o as Weeks
|
|
69
7
|
};
|
package/dist/index161.js
CHANGED
|
@@ -1,243 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "./
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { addDays as v } from "./index217.js";
|
|
7
|
-
import { addMonths as p } from "./index218.js";
|
|
8
|
-
import { addWeeks as O } from "./index219.js";
|
|
9
|
-
import { addYears as u } from "./index220.js";
|
|
10
|
-
import { differenceInCalendarDays as c } from "./index221.js";
|
|
11
|
-
import { differenceInCalendarMonths as l } from "./index222.js";
|
|
12
|
-
import { eachMonthOfInterval as M } from "./index223.js";
|
|
13
|
-
import { endOfISOWeek as k } from "./index224.js";
|
|
14
|
-
import { endOfMonth as W } from "./index225.js";
|
|
15
|
-
import { endOfWeek as D } from "./index226.js";
|
|
16
|
-
import { endOfYear as S } from "./index227.js";
|
|
17
|
-
import { formatDate as g } from "./index228.js";
|
|
18
|
-
import { getISOWeek as y } from "./index229.js";
|
|
19
|
-
import { getMonth as Y } from "./index230.js";
|
|
20
|
-
import { getYear as I } from "./index231.js";
|
|
21
|
-
import { getWeek as B } from "./index232.js";
|
|
22
|
-
import { isAfter as w } from "./index233.js";
|
|
23
|
-
import { isBefore as L } from "./index234.js";
|
|
24
|
-
import { isDate as C } from "./index235.js";
|
|
25
|
-
import { isSameDay as Z } from "./index236.js";
|
|
26
|
-
import { isSameMonth as b } from "./index237.js";
|
|
27
|
-
import { isSameYear as z } from "./index238.js";
|
|
28
|
-
import { max as F } from "./index239.js";
|
|
29
|
-
import { min as A } from "./index240.js";
|
|
30
|
-
import { setMonth as N } from "./index241.js";
|
|
31
|
-
import { setYear as _ } from "./index242.js";
|
|
32
|
-
import { startOfDay as j } from "./index243.js";
|
|
33
|
-
import { startOfISOWeek as x } from "./index244.js";
|
|
34
|
-
import { startOfMonth as H } from "./index245.js";
|
|
35
|
-
import { startOfWeek as K } from "./index246.js";
|
|
36
|
-
import { startOfYear as T } from "./index247.js";
|
|
37
|
-
class n {
|
|
38
|
-
/**
|
|
39
|
-
* Creates an instance of `DateLib`.
|
|
40
|
-
*
|
|
41
|
-
* @param options Configuration options for the date library.
|
|
42
|
-
* @param overrides Custom overrides for the date library functions.
|
|
43
|
-
*/
|
|
44
|
-
constructor(s, i) {
|
|
45
|
-
this.Date = Date, this.today = () => {
|
|
46
|
-
var r;
|
|
47
|
-
return (r = this.overrides) != null && r.today ? this.overrides.today() : this.options.timeZone ? a.tz(this.options.timeZone) : new this.Date();
|
|
48
|
-
}, this.newDate = (r, e, t) => {
|
|
49
|
-
var o;
|
|
50
|
-
return (o = this.overrides) != null && o.newDate ? this.overrides.newDate(r, e, t) : this.options.timeZone ? new a(r, e, t, this.options.timeZone) : new Date(r, e, t);
|
|
51
|
-
}, this.addDays = (r, e) => {
|
|
52
|
-
var t;
|
|
53
|
-
return (t = this.overrides) != null && t.addDays ? this.overrides.addDays(r, e) : v(r, e);
|
|
54
|
-
}, this.addMonths = (r, e) => {
|
|
55
|
-
var t;
|
|
56
|
-
return (t = this.overrides) != null && t.addMonths ? this.overrides.addMonths(r, e) : p(r, e);
|
|
57
|
-
}, this.addWeeks = (r, e) => {
|
|
58
|
-
var t;
|
|
59
|
-
return (t = this.overrides) != null && t.addWeeks ? this.overrides.addWeeks(r, e) : O(r, e);
|
|
60
|
-
}, this.addYears = (r, e) => {
|
|
61
|
-
var t;
|
|
62
|
-
return (t = this.overrides) != null && t.addYears ? this.overrides.addYears(r, e) : u(r, e);
|
|
63
|
-
}, this.differenceInCalendarDays = (r, e) => {
|
|
64
|
-
var t;
|
|
65
|
-
return (t = this.overrides) != null && t.differenceInCalendarDays ? this.overrides.differenceInCalendarDays(r, e) : c(r, e);
|
|
66
|
-
}, this.differenceInCalendarMonths = (r, e) => {
|
|
67
|
-
var t;
|
|
68
|
-
return (t = this.overrides) != null && t.differenceInCalendarMonths ? this.overrides.differenceInCalendarMonths(r, e) : l(r, e);
|
|
69
|
-
}, this.eachMonthOfInterval = (r) => {
|
|
70
|
-
var e;
|
|
71
|
-
return (e = this.overrides) != null && e.eachMonthOfInterval ? this.overrides.eachMonthOfInterval(r) : M(r);
|
|
72
|
-
}, this.endOfBroadcastWeek = (r) => {
|
|
73
|
-
var e;
|
|
74
|
-
return (e = this.overrides) != null && e.endOfBroadcastWeek ? this.overrides.endOfBroadcastWeek(r) : d(r, this);
|
|
75
|
-
}, this.endOfISOWeek = (r) => {
|
|
76
|
-
var e;
|
|
77
|
-
return (e = this.overrides) != null && e.endOfISOWeek ? this.overrides.endOfISOWeek(r) : k(r);
|
|
78
|
-
}, this.endOfMonth = (r) => {
|
|
79
|
-
var e;
|
|
80
|
-
return (e = this.overrides) != null && e.endOfMonth ? this.overrides.endOfMonth(r) : W(r);
|
|
81
|
-
}, this.endOfWeek = (r, e) => {
|
|
82
|
-
var t;
|
|
83
|
-
return (t = this.overrides) != null && t.endOfWeek ? this.overrides.endOfWeek(r, e) : D(r, this.options);
|
|
84
|
-
}, this.endOfYear = (r) => {
|
|
85
|
-
var e;
|
|
86
|
-
return (e = this.overrides) != null && e.endOfYear ? this.overrides.endOfYear(r) : S(r);
|
|
87
|
-
}, this.format = (r, e, t) => {
|
|
88
|
-
var h;
|
|
89
|
-
const o = (h = this.overrides) != null && h.format ? this.overrides.format(r, e, this.options) : g(r, e, this.options);
|
|
90
|
-
return this.options.numerals && this.options.numerals !== "latn" ? this.replaceDigits(o) : o;
|
|
91
|
-
}, this.getISOWeek = (r) => {
|
|
92
|
-
var e;
|
|
93
|
-
return (e = this.overrides) != null && e.getISOWeek ? this.overrides.getISOWeek(r) : y(r);
|
|
94
|
-
}, this.getMonth = (r, e) => {
|
|
95
|
-
var t;
|
|
96
|
-
return (t = this.overrides) != null && t.getMonth ? this.overrides.getMonth(r, this.options) : Y(r, this.options);
|
|
97
|
-
}, this.getYear = (r, e) => {
|
|
98
|
-
var t;
|
|
99
|
-
return (t = this.overrides) != null && t.getYear ? this.overrides.getYear(r, this.options) : I(r, this.options);
|
|
100
|
-
}, this.getWeek = (r, e) => {
|
|
101
|
-
var t;
|
|
102
|
-
return (t = this.overrides) != null && t.getWeek ? this.overrides.getWeek(r, this.options) : B(r, this.options);
|
|
103
|
-
}, this.isAfter = (r, e) => {
|
|
104
|
-
var t;
|
|
105
|
-
return (t = this.overrides) != null && t.isAfter ? this.overrides.isAfter(r, e) : w(r, e);
|
|
106
|
-
}, this.isBefore = (r, e) => {
|
|
107
|
-
var t;
|
|
108
|
-
return (t = this.overrides) != null && t.isBefore ? this.overrides.isBefore(r, e) : L(r, e);
|
|
109
|
-
}, this.isDate = (r) => {
|
|
110
|
-
var e;
|
|
111
|
-
return (e = this.overrides) != null && e.isDate ? this.overrides.isDate(r) : C(r);
|
|
112
|
-
}, this.isSameDay = (r, e) => {
|
|
113
|
-
var t;
|
|
114
|
-
return (t = this.overrides) != null && t.isSameDay ? this.overrides.isSameDay(r, e) : Z(r, e);
|
|
115
|
-
}, this.isSameMonth = (r, e) => {
|
|
116
|
-
var t;
|
|
117
|
-
return (t = this.overrides) != null && t.isSameMonth ? this.overrides.isSameMonth(r, e) : b(r, e);
|
|
118
|
-
}, this.isSameYear = (r, e) => {
|
|
119
|
-
var t;
|
|
120
|
-
return (t = this.overrides) != null && t.isSameYear ? this.overrides.isSameYear(r, e) : z(r, e);
|
|
121
|
-
}, this.max = (r) => {
|
|
122
|
-
var e;
|
|
123
|
-
return (e = this.overrides) != null && e.max ? this.overrides.max(r) : F(r);
|
|
124
|
-
}, this.min = (r) => {
|
|
125
|
-
var e;
|
|
126
|
-
return (e = this.overrides) != null && e.min ? this.overrides.min(r) : A(r);
|
|
127
|
-
}, this.setMonth = (r, e) => {
|
|
128
|
-
var t;
|
|
129
|
-
return (t = this.overrides) != null && t.setMonth ? this.overrides.setMonth(r, e) : N(r, e);
|
|
130
|
-
}, this.setYear = (r, e) => {
|
|
131
|
-
var t;
|
|
132
|
-
return (t = this.overrides) != null && t.setYear ? this.overrides.setYear(r, e) : _(r, e);
|
|
133
|
-
}, this.startOfBroadcastWeek = (r, e) => {
|
|
134
|
-
var t;
|
|
135
|
-
return (t = this.overrides) != null && t.startOfBroadcastWeek ? this.overrides.startOfBroadcastWeek(r, this) : m(r, this);
|
|
136
|
-
}, this.startOfDay = (r) => {
|
|
137
|
-
var e;
|
|
138
|
-
return (e = this.overrides) != null && e.startOfDay ? this.overrides.startOfDay(r) : j(r);
|
|
139
|
-
}, this.startOfISOWeek = (r) => {
|
|
140
|
-
var e;
|
|
141
|
-
return (e = this.overrides) != null && e.startOfISOWeek ? this.overrides.startOfISOWeek(r) : x(r);
|
|
142
|
-
}, this.startOfMonth = (r) => {
|
|
143
|
-
var e;
|
|
144
|
-
return (e = this.overrides) != null && e.startOfMonth ? this.overrides.startOfMonth(r) : H(r);
|
|
145
|
-
}, this.startOfWeek = (r, e) => {
|
|
146
|
-
var t;
|
|
147
|
-
return (t = this.overrides) != null && t.startOfWeek ? this.overrides.startOfWeek(r, this.options) : K(r, this.options);
|
|
148
|
-
}, this.startOfYear = (r) => {
|
|
149
|
-
var e;
|
|
150
|
-
return (e = this.overrides) != null && e.startOfYear ? this.overrides.startOfYear(r) : T(r);
|
|
151
|
-
}, this.options = { locale: f, ...s }, this.overrides = i;
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Generates a mapping of Arabic digits (0-9) to the target numbering system
|
|
155
|
-
* digits.
|
|
156
|
-
*
|
|
157
|
-
* @since 9.5.0
|
|
158
|
-
* @returns A record mapping Arabic digits to the target numerals.
|
|
159
|
-
*/
|
|
160
|
-
getDigitMap() {
|
|
161
|
-
const { numerals: s = "latn" } = this.options, i = new Intl.NumberFormat("en-US", {
|
|
162
|
-
numberingSystem: s
|
|
163
|
-
}), r = {};
|
|
164
|
-
for (let e = 0; e < 10; e++)
|
|
165
|
-
r[e.toString()] = i.format(e);
|
|
166
|
-
return r;
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* Replaces Arabic digits in a string with the target numbering system digits.
|
|
170
|
-
*
|
|
171
|
-
* @since 9.5.0
|
|
172
|
-
* @param input The string containing Arabic digits.
|
|
173
|
-
* @returns The string with digits replaced.
|
|
174
|
-
*/
|
|
175
|
-
replaceDigits(s) {
|
|
176
|
-
const i = this.getDigitMap();
|
|
177
|
-
return s.replace(/\d/g, (r) => i[r] || r);
|
|
178
|
-
}
|
|
179
|
-
/**
|
|
180
|
-
* Formats a number using the configured numbering system.
|
|
181
|
-
*
|
|
182
|
-
* @since 9.5.0
|
|
183
|
-
* @param value The number to format.
|
|
184
|
-
* @returns The formatted number as a string.
|
|
185
|
-
*/
|
|
186
|
-
formatNumber(s) {
|
|
187
|
-
return this.replaceDigits(s.toString());
|
|
188
|
-
}
|
|
189
|
-
/**
|
|
190
|
-
* Returns the preferred ordering for month and year labels for the current
|
|
191
|
-
* locale.
|
|
192
|
-
*/
|
|
193
|
-
getMonthYearOrder() {
|
|
194
|
-
var i;
|
|
195
|
-
const s = (i = this.options.locale) == null ? void 0 : i.code;
|
|
196
|
-
return s && n.yearFirstLocales.has(s) ? "year-first" : "month-first";
|
|
197
|
-
}
|
|
198
|
-
/**
|
|
199
|
-
* Formats the month/year pair respecting locale conventions.
|
|
200
|
-
*
|
|
201
|
-
* @since 9.11.0
|
|
202
|
-
*/
|
|
203
|
-
formatMonthYear(s) {
|
|
204
|
-
const { locale: i, timeZone: r, numerals: e } = this.options, t = i == null ? void 0 : i.code;
|
|
205
|
-
if (t && n.yearFirstLocales.has(t))
|
|
206
|
-
try {
|
|
207
|
-
return new Intl.DateTimeFormat(t, {
|
|
208
|
-
month: "long",
|
|
209
|
-
year: "numeric",
|
|
210
|
-
timeZone: r,
|
|
211
|
-
numberingSystem: e
|
|
212
|
-
}).format(s);
|
|
213
|
-
} catch {
|
|
214
|
-
}
|
|
215
|
-
const o = this.getMonthYearOrder() === "year-first" ? "y LLLL" : "LLLL y";
|
|
216
|
-
return this.format(s, o);
|
|
217
|
-
}
|
|
1
|
+
import r from "react";
|
|
2
|
+
import { useDayPicker as t } from "./index178.js";
|
|
3
|
+
function m(o) {
|
|
4
|
+
const { components: e } = t();
|
|
5
|
+
return r.createElement(e.Dropdown, { ...o });
|
|
218
6
|
}
|
|
219
|
-
n.yearFirstLocales = /* @__PURE__ */ new Set([
|
|
220
|
-
"eu",
|
|
221
|
-
"hu",
|
|
222
|
-
"ja",
|
|
223
|
-
"ja-Hira",
|
|
224
|
-
"ja-JP",
|
|
225
|
-
"ko",
|
|
226
|
-
"ko-KR",
|
|
227
|
-
"lt",
|
|
228
|
-
"lt-LT",
|
|
229
|
-
"lv",
|
|
230
|
-
"lv-LV",
|
|
231
|
-
"mn",
|
|
232
|
-
"mn-MN",
|
|
233
|
-
"zh",
|
|
234
|
-
"zh-CN",
|
|
235
|
-
"zh-HK",
|
|
236
|
-
"zh-TW"
|
|
237
|
-
]);
|
|
238
|
-
const Ir = new n();
|
|
239
7
|
export {
|
|
240
|
-
|
|
241
|
-
Ir as defaultDateLib,
|
|
242
|
-
f as defaultLocale
|
|
8
|
+
m as YearsDropdown
|
|
243
9
|
};
|
package/dist/index162.js
CHANGED
|
@@ -1,42 +1,61 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import { tzName as o } from "./index210.js";
|
|
2
|
+
import { TZDateMini as s } from "./index163.js";
|
|
3
|
+
class i extends s {
|
|
4
|
+
//#region static
|
|
5
|
+
static tz(e, ...t) {
|
|
6
|
+
return t.length ? new i(...t, e) : new i(Date.now(), e);
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region representation
|
|
10
|
+
toISOString() {
|
|
11
|
+
const [e, t, n] = this.tzComponents(), r = `${e}${t}:${n}`;
|
|
12
|
+
return this.internal.toISOString().slice(0, -1) + r;
|
|
13
|
+
}
|
|
14
|
+
toString() {
|
|
15
|
+
return `${this.toDateString()} ${this.toTimeString()}`;
|
|
16
|
+
}
|
|
17
|
+
toDateString() {
|
|
18
|
+
const [e, t, n, r] = this.internal.toUTCString().split(" ");
|
|
19
|
+
return `${e == null ? void 0 : e.slice(0, -1)} ${n} ${t} ${r}`;
|
|
20
|
+
}
|
|
21
|
+
toTimeString() {
|
|
22
|
+
const e = this.internal.toUTCString().split(" ")[4], [t, n, r] = this.tzComponents();
|
|
23
|
+
return `${e} GMT${t}${n}${r} (${o(this.timeZone, this)})`;
|
|
24
|
+
}
|
|
25
|
+
toLocaleString(e, t) {
|
|
26
|
+
return Date.prototype.toLocaleString.call(this, e, {
|
|
27
|
+
...t,
|
|
28
|
+
timeZone: (t == null ? void 0 : t.timeZone) || this.timeZone
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
toLocaleDateString(e, t) {
|
|
32
|
+
return Date.prototype.toLocaleDateString.call(this, e, {
|
|
33
|
+
...t,
|
|
34
|
+
timeZone: (t == null ? void 0 : t.timeZone) || this.timeZone
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
toLocaleTimeString(e, t) {
|
|
38
|
+
return Date.prototype.toLocaleTimeString.call(this, e, {
|
|
39
|
+
...t,
|
|
40
|
+
timeZone: (t == null ? void 0 : t.timeZone) || this.timeZone
|
|
17
41
|
});
|
|
18
42
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
...o,
|
|
35
|
-
// custom modifiers should override all the previous ones
|
|
36
|
-
...c
|
|
37
|
-
};
|
|
38
|
-
};
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region private
|
|
45
|
+
tzComponents() {
|
|
46
|
+
const e = this.getTimezoneOffset(), t = e > 0 ? "-" : "+", n = String(Math.floor(Math.abs(e) / 60)).padStart(2, "0"), r = String(Math.abs(e) % 60).padStart(2, "0");
|
|
47
|
+
return [t, n, r];
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
withTimeZone(e) {
|
|
51
|
+
return new i(+this, e);
|
|
52
|
+
}
|
|
53
|
+
//#region date-fns integration
|
|
54
|
+
[Symbol.for("constructDateFrom")](e) {
|
|
55
|
+
return new i(+new Date(e), this.timeZone);
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
39
58
|
}
|
|
40
59
|
export {
|
|
41
|
-
|
|
60
|
+
i as TZDate
|
|
42
61
|
};
|
package/dist/index163.js
CHANGED
|
@@ -1,7 +1,69 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { tzOffset as s } from "./index211.js";
|
|
2
|
+
class n extends Date {
|
|
3
|
+
//#region static
|
|
4
|
+
constructor(...e) {
|
|
5
|
+
super(), e.length > 1 && typeof e[e.length - 1] == "string" && (this.timeZone = e.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(s(this.timeZone, this)) ? this.setTime(NaN) : e.length ? typeof e[0] == "number" && (e.length === 1 || e.length === 2 && typeof e[1] != "number") ? this.setTime(e[0]) : typeof e[0] == "string" ? this.setTime(+new Date(e[0])) : e[0] instanceof Date ? this.setTime(+e[0]) : (this.setTime(+new Date(...e)), U(this), a(this)) : this.setTime(Date.now());
|
|
6
|
+
}
|
|
7
|
+
static tz(e, ...o) {
|
|
8
|
+
return o.length ? new n(...o, e) : new n(Date.now(), e);
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region time zone
|
|
12
|
+
withTimeZone(e) {
|
|
13
|
+
return new n(+this, e);
|
|
14
|
+
}
|
|
15
|
+
getTimezoneOffset() {
|
|
16
|
+
const e = -s(this.timeZone, this);
|
|
17
|
+
return e > 0 ? Math.floor(e) : Math.ceil(e);
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region time
|
|
21
|
+
setTime(e) {
|
|
22
|
+
return Date.prototype.setTime.apply(this, arguments), a(this), +this;
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region date-fns integration
|
|
26
|
+
[Symbol.for("constructDateFrom")](e) {
|
|
27
|
+
return new n(+new Date(e), this.timeZone);
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
}
|
|
31
|
+
const D = /^(get|set)(?!UTC)/;
|
|
32
|
+
Object.getOwnPropertyNames(Date.prototype).forEach((t) => {
|
|
33
|
+
if (!D.test(t)) return;
|
|
34
|
+
const e = t.replace(D, "$1UTC");
|
|
35
|
+
n.prototype[e] && (t.startsWith("get") ? n.prototype[t] = function() {
|
|
36
|
+
return this.internal[e]();
|
|
37
|
+
} : (n.prototype[t] = function() {
|
|
38
|
+
return Date.prototype[e].apply(this.internal, arguments), H(this), +this;
|
|
39
|
+
}, n.prototype[e] = function() {
|
|
40
|
+
return Date.prototype[e].apply(this, arguments), a(this), +this;
|
|
41
|
+
}));
|
|
42
|
+
});
|
|
43
|
+
function a(t) {
|
|
44
|
+
t.internal.setTime(+t), t.internal.setUTCSeconds(t.internal.getUTCSeconds() - Math.round(-s(t.timeZone, t) * 60));
|
|
45
|
+
}
|
|
46
|
+
function H(t) {
|
|
47
|
+
Date.prototype.setFullYear.call(t, t.internal.getUTCFullYear(), t.internal.getUTCMonth(), t.internal.getUTCDate()), Date.prototype.setHours.call(t, t.internal.getUTCHours(), t.internal.getUTCMinutes(), t.internal.getUTCSeconds(), t.internal.getUTCMilliseconds()), U(t);
|
|
48
|
+
}
|
|
49
|
+
function U(t) {
|
|
50
|
+
const e = s(t.timeZone, t), o = e > 0 ? Math.floor(e) : Math.ceil(e), i = /* @__PURE__ */ new Date(+t);
|
|
51
|
+
i.setUTCHours(i.getUTCHours() - 1);
|
|
52
|
+
const r = -(/* @__PURE__ */ new Date(+t)).getTimezoneOffset(), g = -(/* @__PURE__ */ new Date(+i)).getTimezoneOffset(), m = r - g, M = Date.prototype.getHours.apply(t) !== t.internal.getUTCHours();
|
|
53
|
+
m && M && t.internal.setUTCMinutes(t.internal.getUTCMinutes() + m);
|
|
54
|
+
const f = r - o;
|
|
55
|
+
f && Date.prototype.setUTCMinutes.call(t, Date.prototype.getUTCMinutes.call(t) + f);
|
|
56
|
+
const l = /* @__PURE__ */ new Date(+t);
|
|
57
|
+
l.setUTCSeconds(0);
|
|
58
|
+
const y = r > 0 ? l.getSeconds() : (l.getSeconds() - 60) % 60, c = Math.round(-(s(t.timeZone, t) * 60)) % 60;
|
|
59
|
+
(c || y) && (t.internal.setUTCSeconds(t.internal.getUTCSeconds() + c), Date.prototype.setUTCSeconds.call(t, Date.prototype.getUTCSeconds.call(t) + c + y));
|
|
60
|
+
const p = s(t.timeZone, t), u = p > 0 ? Math.floor(p) : Math.ceil(p), w = -(/* @__PURE__ */ new Date(+t)).getTimezoneOffset() - u, O = u !== o, C = w - f;
|
|
61
|
+
if (O && C) {
|
|
62
|
+
Date.prototype.setUTCMinutes.call(t, Date.prototype.getUTCMinutes.call(t) + C);
|
|
63
|
+
const h = s(t.timeZone, t), S = h > 0 ? Math.floor(h) : Math.ceil(h), T = u - S;
|
|
64
|
+
T && (t.internal.setUTCMinutes(t.internal.getUTCMinutes() + T), Date.prototype.setUTCMinutes.call(t, Date.prototype.getUTCMinutes.call(t) + T));
|
|
65
|
+
}
|
|
4
66
|
}
|
|
5
67
|
export {
|
|
6
|
-
|
|
68
|
+
n as TZDateMini
|
|
7
69
|
};
|