mimir-ui-kit 1.43.4 → 1.43.6
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/components/DatePicker/DatePicker.js +199 -135
- package/dist/components/DatePicker/DatePickerModal.d.ts +2 -1
- package/dist/components/DatePicker/DatePickerModal.js +75 -74
- package/dist/components/DatePicker/MonthPickerModal.d.ts +3 -1
- package/dist/components/DatePicker/MonthPickerModal.js +74 -72
- package/dist/components/DatePicker/YearPickerModal.d.ts +3 -1
- package/dist/components/DatePicker/YearPickerModal.js +73 -63
- package/dist/components/InputPassword/InputPassword.d.ts +5 -2
- package/dist/components/InputPassword/InputPassword.js +46 -35
- package/dist/icons/Icon.js +1 -1
- package/dist/icons/components/64px/AdvancePaymentDiscount64px.js +59 -0
- package/dist/icons/components/64px/AtsVendors64px.js +37 -0
- package/dist/icons/components/64px/ButtonOn64px.js +31 -0
- package/dist/icons/components/64px/BuyoutAuto64px.js +45 -0
- package/dist/icons/components/64px/CarAssistance64px.js +44 -0
- package/dist/icons/components/64px/CarDelivery64px.js +37 -0
- package/dist/icons/components/64px/CarSearchReturn64px.js +45 -0
- package/dist/icons/components/64px/CarService64px.js +37 -0
- package/dist/icons/components/64px/Case64px.js +33 -0
- package/dist/icons/components/64px/CoatOfArms64px.js +149 -0
- package/dist/icons/components/64px/CoffeeCup64px.js +44 -0
- package/dist/icons/components/64px/Cup64px.js +38 -0
- package/dist/icons/components/64px/ExpertAdvice64px.js +40 -0
- package/dist/icons/components/64px/Fines64px.js +88 -0
- package/dist/icons/components/64px/Fuel64px.js +38 -0
- package/dist/icons/components/64px/GazprombankIcon24px.js +21 -0
- package/dist/icons/components/64px/Kasko64px.js +44 -0
- package/dist/icons/components/64px/LegalSupport64px.js +58 -0
- package/dist/icons/components/64px/Microphone64px.js +37 -0
- package/dist/icons/components/64px/Money64px.js +60 -0
- package/dist/icons/components/64px/PaymentSchedule64px.js +39 -0
- package/dist/icons/components/64px/PersonalManager64px.js +100 -0
- package/dist/icons/components/64px/PreApproval64px.js +44 -0
- package/dist/icons/components/64px/Questions64px.js +37 -0
- package/dist/icons/components/64px/SupportGeography64px.js +51 -0
- package/dist/icons/components/64px/Timer64px.js +45 -0
- package/dist/icons/components/64px/Twogis64px.js +51 -0
- package/dist/icons/components/64px/Vehicles64px.js +45 -0
- package/dist/icons/components/64px/Workplace64px.js +38 -0
- package/dist/icons/components/index.js +593 -564
- package/dist/{index-__gOemjc.js → index-C2dQUuc9.js} +497 -323
- package/package.json +1 -1
@@ -1,178 +1,242 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { c as
|
3
|
-
import { memo as
|
4
|
-
import { MAX_DAY as
|
5
|
-
import { DatePickerModal as
|
6
|
-
import { MonthPickerModal as
|
7
|
-
import { c as
|
8
|
-
import { formatDatePart as
|
9
|
-
import { YearPickerModal as
|
10
|
-
import { useClickOutside as
|
11
|
-
import { Icon as
|
12
|
-
import { formating as
|
13
|
-
import { I as
|
14
|
-
import { EInputStatus as
|
15
|
-
const
|
16
|
-
|
17
|
-
months: dt,
|
18
|
-
years: yt
|
19
|
-
}, Nt = ot(
|
20
|
-
ct(
|
1
|
+
import { jsxs as Q, jsx as d } from "react/jsx-runtime";
|
2
|
+
import { c as X } from "../../index-DIxK0V-G.js";
|
3
|
+
import { memo as pt, forwardRef as dt, useState as I, useEffect as $ } from "react";
|
4
|
+
import { MAX_DAY as yt, MAX_MONTH as wt, DATE_LENGTH as lt } from "./constants.js";
|
5
|
+
import { DatePickerModal as Nt } from "./DatePickerModal.js";
|
6
|
+
import { MonthPickerModal as Tt } from "./MonthPickerModal.js";
|
7
|
+
import { c as n } from "../../styles.module-Cuqm31CO.js";
|
8
|
+
import { formatDatePart as Z } from "./utils.js";
|
9
|
+
import { YearPickerModal as Mt } from "./YearPickerModal.js";
|
10
|
+
import { useClickOutside as kt } from "../../hooks/useClickOutside/useClickOutside.js";
|
11
|
+
import { Icon as z } from "../../icons/Icon.js";
|
12
|
+
import { formating as w } from "../../utils/index.js";
|
13
|
+
import { I as At } from "../../Input-BU_6U1CW.js";
|
14
|
+
import { EInputStatus as It, EInputSize as b } from "../Input/constants.js";
|
15
|
+
const Pt = pt(
|
16
|
+
dt(
|
21
17
|
({
|
22
|
-
size:
|
23
|
-
value:
|
18
|
+
size: g,
|
19
|
+
value: l,
|
24
20
|
onChangeValue: s,
|
25
|
-
name:
|
26
|
-
before:
|
27
|
-
type:
|
21
|
+
name: y,
|
22
|
+
before: N,
|
23
|
+
type: a = "days",
|
28
24
|
error: j,
|
29
|
-
onError:
|
30
|
-
onBlur:
|
31
|
-
validateImmediately:
|
32
|
-
variant:
|
33
|
-
disabled:
|
34
|
-
editable:
|
35
|
-
openOnInput:
|
36
|
-
sendIntermediateValues:
|
37
|
-
disableFuture:
|
38
|
-
disablePast:
|
39
|
-
disabledDate:
|
40
|
-
validRange:
|
41
|
-
...
|
42
|
-
},
|
43
|
-
const [
|
44
|
-
() =>
|
45
|
-
), [
|
46
|
-
|
47
|
-
|
48
|
-
}, [j]),
|
49
|
-
|
50
|
-
|
25
|
+
onError: T,
|
26
|
+
onBlur: o,
|
27
|
+
validateImmediately: G,
|
28
|
+
variant: C,
|
29
|
+
disabled: v = !1,
|
30
|
+
editable: x = !1,
|
31
|
+
openOnInput: L = !0,
|
32
|
+
sendIntermediateValues: R = !1,
|
33
|
+
disableFuture: W = !1,
|
34
|
+
disablePast: q = !1,
|
35
|
+
disabledDate: _,
|
36
|
+
validRange: c,
|
37
|
+
...u
|
38
|
+
}, B) => {
|
39
|
+
const [h, D] = I(!1), [F, m] = I(a), [p, M] = I(
|
40
|
+
() => l && !isNaN(new Date(l).getTime()) ? new Date(l) : void 0
|
41
|
+
), [S, O] = I(j), [V, H] = I(""), [tt, k] = I();
|
42
|
+
u.status = !!S && It.Error || u.status, $(() => {
|
43
|
+
O(j);
|
44
|
+
}, [j]), $(() => {
|
45
|
+
M(
|
46
|
+
l && !isNaN(new Date(l).getTime()) ? new Date(l) : void 0
|
51
47
|
);
|
52
|
-
}, [
|
53
|
-
|
54
|
-
}, [
|
55
|
-
const
|
56
|
-
|
57
|
-
|
58
|
-
}, [
|
59
|
-
isActive:
|
48
|
+
}, [l]), $(() => {
|
49
|
+
p && typeof p != "string" && !isNaN(p == null ? void 0 : p.getTime()) ? H(w.Date(p, "dd/mm/yyyy")) : H("");
|
50
|
+
}, [p]);
|
51
|
+
const E = l && new Date(l).getTime;
|
52
|
+
$(() => {
|
53
|
+
G && (E ? (O(!1), T == null || T({ name: y, active: !1 })) : (O(!0), T == null || T({ name: y, active: !0 })));
|
54
|
+
}, [G, y, E]), kt({
|
55
|
+
isActive: h,
|
60
56
|
setActive: (t) => {
|
61
|
-
|
57
|
+
D(t), m(a), t || k(void 0);
|
62
58
|
},
|
63
|
-
className:
|
59
|
+
className: n["calendar-block"]
|
64
60
|
});
|
65
|
-
const
|
66
|
-
!
|
67
|
-
},
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
}
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
61
|
+
const et = () => {
|
62
|
+
!v && (L || !x) && D(!0);
|
63
|
+
}, J = (t) => {
|
64
|
+
const r = t.getTime();
|
65
|
+
if (t.setHours(0, 0, 0, 0), N && (typeof N == "string" ? new Date(N) : N).getTime() > r)
|
66
|
+
return !1;
|
67
|
+
if (W) {
|
68
|
+
const i = /* @__PURE__ */ new Date();
|
69
|
+
if (i.setHours(0, 0, 0, 0), t.getTime() > i.getTime()) return !1;
|
70
|
+
}
|
71
|
+
if (q) {
|
72
|
+
const i = /* @__PURE__ */ new Date();
|
73
|
+
if (i.setHours(0, 0, 0, 0), r < i.getTime()) return !1;
|
74
|
+
}
|
75
|
+
if (_ && _(t)) return !1;
|
76
|
+
if (c) {
|
77
|
+
let i;
|
78
|
+
typeof c[0] == "string" ? i = [
|
79
|
+
new Date(c[0]),
|
80
|
+
typeof c[1] == "string" ? new Date(c[1]) : c[1]
|
81
|
+
] : i = [
|
82
|
+
c[0],
|
83
|
+
typeof c[1] == "string" ? new Date(c[1]) : c[1]
|
84
|
+
];
|
85
|
+
const [f, e] = i, P = new Date(f), A = new Date(e);
|
86
|
+
if (P.setHours(0, 0, 0, 0), A.setHours(23, 59, 59, 999), t < P || t > A) return !1;
|
87
|
+
}
|
88
|
+
return !0;
|
89
|
+
}, st = (t) => {
|
90
|
+
isNaN(t.getTime()) || (M(t), k(void 0), s == null || s({
|
91
|
+
value: w.Date(t, "yyyy-mm-dd"),
|
92
|
+
name: y
|
93
|
+
})), F === "years" && (a === "years" ? (D(!1), m(a)) : m("months")), F === "months" && (a === "months" ? (D(!1), m(a)) : m("days")), M(t), s == null || s({
|
94
|
+
value: w.Date(t, "yyyy-mm-dd"),
|
95
|
+
name: y
|
96
|
+
}), o == null || o(w.Date(t, "yyyy-mm-dd"));
|
97
|
+
}, it = (t) => {
|
98
|
+
const r = p || /* @__PURE__ */ new Date(), i = r.getDate(), f = r.getMonth() + 1, e = new Date(t, f - 1, i);
|
99
|
+
if (e.getFullYear() === t && e.getMonth() === f - 1 && e.getDate() === i && J(e)) {
|
100
|
+
if (M(e), k(void 0), s == null || s({
|
101
|
+
value: w.Date(e, "yyyy-mm-dd"),
|
102
|
+
name: y
|
103
|
+
}), o == null || o(w.Date(e, "yyyy-mm-dd")), a === "years") {
|
104
|
+
D(!1), m(a);
|
105
|
+
return;
|
106
|
+
}
|
107
|
+
} else
|
108
|
+
k(new Date(t, f - 1, 1));
|
109
|
+
a === "years" ? (D(!1), m(a)) : m("months");
|
110
|
+
}, rt = (t, r) => {
|
111
|
+
const f = (p || /* @__PURE__ */ new Date()).getDate(), e = new Date(t, r - 1, f);
|
112
|
+
if (e.getFullYear() === t && e.getMonth() === r - 1 && e.getDate() === f && J(e)) {
|
113
|
+
if (M(e), k(void 0), s == null || s({
|
114
|
+
value: w.Date(e, "yyyy-mm-dd"),
|
115
|
+
name: y
|
116
|
+
}), o == null || o(w.Date(e, "yyyy-mm-dd")), a === "months") {
|
117
|
+
D(!1), m(a);
|
118
|
+
return;
|
119
|
+
}
|
120
|
+
} else
|
121
|
+
k(new Date(t, r - 1, 1));
|
122
|
+
a === "months" ? (D(!1), m(a)) : m("days");
|
123
|
+
}, ct = (t) => {
|
124
|
+
if (x) {
|
125
|
+
const r = t.target.value.replace(/[^\d]/g, "");
|
126
|
+
if (r.length === 0)
|
127
|
+
H(""), s == null || s({ value: "", name: y }), o == null || o("");
|
80
128
|
else {
|
81
|
-
const [
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
],
|
86
|
-
if (
|
87
|
-
const
|
129
|
+
const [i, f, e] = [
|
130
|
+
Z(r.substring(0, 2), yt),
|
131
|
+
Z(r.substring(2, 4), wt),
|
132
|
+
r.substring(4, 8)
|
133
|
+
], P = [i, f, e].filter(Boolean).join("/");
|
134
|
+
if (H(P), R) {
|
135
|
+
const A = e ? `${e}-${f || "00"}-${i || "00"}` : [i, f, e].filter(Boolean).join("-");
|
88
136
|
s == null || s({
|
89
|
-
value:
|
90
|
-
name:
|
137
|
+
value: A,
|
138
|
+
name: y
|
91
139
|
});
|
92
140
|
}
|
93
|
-
if (
|
94
|
-
const
|
95
|
-
`${
|
141
|
+
if (P.length === lt) {
|
142
|
+
const A = parseInt(e), Y = /* @__PURE__ */ new Date(
|
143
|
+
`${A}-${f.padStart(2, "0")}-${i.padStart(2, "0")}`
|
96
144
|
);
|
97
|
-
isNaN(
|
98
|
-
value:
|
99
|
-
name:
|
100
|
-
}),
|
145
|
+
isNaN(Y.getTime()) || (M(Y), s == null || s({
|
146
|
+
value: w.Date(Y, "yyyy-mm-dd"),
|
147
|
+
name: y
|
148
|
+
}), o == null || o(w.Date(Y, "yyyy-mm-dd")));
|
101
149
|
}
|
102
150
|
}
|
103
151
|
}
|
104
|
-
},
|
105
|
-
let
|
106
|
-
if (
|
107
|
-
let t,
|
108
|
-
typeof
|
152
|
+
}, ot = X(n.wrapper, h && n.active), at = X(n.input, n.inputBorderControl);
|
153
|
+
let K;
|
154
|
+
if (c) {
|
155
|
+
let t, r;
|
156
|
+
typeof c[0] == "string" ? t = new Date(c[0]) : t = c[0], typeof c[1] == "string" ? r = new Date(c[1]) : r = c[1], K = [t, r];
|
109
157
|
}
|
110
|
-
const
|
111
|
-
onChangeValue:
|
112
|
-
date:
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
158
|
+
const U = {
|
159
|
+
onChangeValue: st,
|
160
|
+
date: tt || p || /* @__PURE__ */ new Date(),
|
161
|
+
selectedDate: p,
|
162
|
+
before: typeof N == "string" ? new Date(N) : N,
|
163
|
+
onChangeType: m,
|
164
|
+
setIsActive: D,
|
165
|
+
disableFuture: W,
|
166
|
+
disablePast: q,
|
167
|
+
disabledDate: _,
|
168
|
+
validRange: K
|
169
|
+
}, ft = {
|
170
|
+
...U,
|
171
|
+
onChangeMonth: rt
|
172
|
+
}, mt = {
|
173
|
+
...U,
|
174
|
+
onChangeYear: it
|
175
|
+
}, nt = (() => {
|
176
|
+
switch (F) {
|
177
|
+
case "months":
|
178
|
+
return () => /* @__PURE__ */ d(Tt, { ...ft });
|
179
|
+
case "years":
|
180
|
+
return () => /* @__PURE__ */ d(Mt, { ...mt });
|
181
|
+
default:
|
182
|
+
return () => /* @__PURE__ */ d(Nt, { ...U });
|
183
|
+
}
|
184
|
+
})(), Dt = ({ isActive: t }) => /* @__PURE__ */ d("button", { onClick: (i) => {
|
185
|
+
i.stopPropagation(), v || D(!t);
|
186
|
+
}, className: n["icon-button"], children: t ? /* @__PURE__ */ d(
|
187
|
+
z,
|
124
188
|
{
|
125
|
-
iconName:
|
189
|
+
iconName: g === b.S ? "DropdownArrowUp16px" : "DropdownArrowUp24px"
|
126
190
|
}
|
127
|
-
) : /* @__PURE__ */
|
128
|
-
|
191
|
+
) : /* @__PURE__ */ d(
|
192
|
+
z,
|
129
193
|
{
|
130
|
-
iconName:
|
194
|
+
iconName: g === b.S ? "DropdownArrowBottom16px" : "DropdownArrowDown24px"
|
131
195
|
}
|
132
196
|
) });
|
133
|
-
return /* @__PURE__ */
|
134
|
-
/* @__PURE__ */
|
135
|
-
/* @__PURE__ */
|
197
|
+
return /* @__PURE__ */ Q("div", { className: n["input-field-group-datePicker"], children: [
|
198
|
+
/* @__PURE__ */ Q("div", { className: ot, "data-disabled": v, children: [
|
199
|
+
/* @__PURE__ */ d(
|
136
200
|
"div",
|
137
201
|
{
|
138
202
|
role: "button",
|
139
|
-
"data-status":
|
140
|
-
className:
|
141
|
-
[
|
203
|
+
"data-status": u.status,
|
204
|
+
className: X(n["date-wrapper"], {
|
205
|
+
[n.editable]: x
|
142
206
|
}),
|
143
|
-
onClick:
|
144
|
-
children: /* @__PURE__ */
|
145
|
-
|
207
|
+
onClick: et,
|
208
|
+
children: /* @__PURE__ */ d(
|
209
|
+
At,
|
146
210
|
{
|
147
|
-
ref:
|
148
|
-
className:
|
149
|
-
wrapperClassName:
|
150
|
-
size:
|
211
|
+
ref: B,
|
212
|
+
className: at,
|
213
|
+
wrapperClassName: n["input-wrapper"],
|
214
|
+
size: g,
|
151
215
|
type: "text",
|
152
|
-
variant:
|
153
|
-
value:
|
154
|
-
onChange:
|
216
|
+
variant: C,
|
217
|
+
value: V,
|
218
|
+
onChange: ct,
|
155
219
|
rightAddon: {
|
156
220
|
addonType: "react-node",
|
157
|
-
addonContent: /* @__PURE__ */
|
221
|
+
addonContent: /* @__PURE__ */ d(Dt, { isActive: h })
|
158
222
|
},
|
159
|
-
rightSlotClassName:
|
223
|
+
rightSlotClassName: n["right-slot"],
|
160
224
|
onFocus: () => {
|
161
|
-
|
225
|
+
L && !x && D(!0);
|
162
226
|
},
|
163
|
-
...
|
227
|
+
...u
|
164
228
|
}
|
165
229
|
)
|
166
230
|
}
|
167
231
|
),
|
168
|
-
|
232
|
+
h && /* @__PURE__ */ d(nt, {})
|
169
233
|
] }),
|
170
|
-
|
234
|
+
S && typeof S == "string" && /* @__PURE__ */ d("div", { className: n.textError, children: S })
|
171
235
|
] });
|
172
236
|
}
|
173
237
|
)
|
174
238
|
);
|
175
|
-
|
239
|
+
Pt.displayName = "DatePicker";
|
176
240
|
export {
|
177
|
-
|
241
|
+
Pt as DatePicker
|
178
242
|
};
|
@@ -1,5 +1,6 @@
|
|
1
1
|
type TProps = {
|
2
2
|
date: Date;
|
3
|
+
selectedDate?: Date;
|
3
4
|
before?: Date;
|
4
5
|
onChangeValue: (date: Date) => void;
|
5
6
|
setIsActive: (isActive: boolean) => void;
|
@@ -9,5 +10,5 @@ type TProps = {
|
|
9
10
|
disabledDate?: (date: Date) => boolean;
|
10
11
|
validRange?: [Date, Date];
|
11
12
|
};
|
12
|
-
export declare const DatePickerModal: ({ date, onChangeValue, setIsActive, before, onChangeType, disableFuture, disablePast, disabledDate, validRange }: TProps) => import("react/jsx-runtime").JSX.Element;
|
13
|
+
export declare const DatePickerModal: ({ date, selectedDate, onChangeValue, setIsActive, before, onChangeType, disableFuture, disablePast, disabledDate, validRange }: TProps) => import("react/jsx-runtime").JSX.Element;
|
13
14
|
export {};
|
@@ -1,169 +1,170 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { c as
|
3
|
-
import { useState as
|
4
|
-
import { week as
|
5
|
-
import { useDatePickerPosition as
|
1
|
+
import { jsxs as u, jsx as a } from "react/jsx-runtime";
|
2
|
+
import { c as P } from "../../index-DIxK0V-G.js";
|
3
|
+
import { useState as G } from "react";
|
4
|
+
import { week as U, COUNT_WORK_DAYS as V } from "./constants.js";
|
5
|
+
import { useDatePickerPosition as W } from "./hooks.js";
|
6
6
|
import { c as n } from "../../styles.module-Cuqm31CO.js";
|
7
|
-
import { getUpdateDate as
|
8
|
-
import { Icon as
|
7
|
+
import { getUpdateDate as A } from "./utils.js";
|
8
|
+
import { Icon as E } from "../../icons/Icon.js";
|
9
9
|
import { formating as m } from "../../utils/index.js";
|
10
|
-
import { Button as
|
11
|
-
import { parseDate as
|
12
|
-
const
|
10
|
+
import { Button as B } from "../Button/Button.js";
|
11
|
+
import { parseDate as H } from "../../utils/formating/Date.js";
|
12
|
+
const at = ({
|
13
13
|
date: i,
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
14
|
+
selectedDate: d,
|
15
|
+
onChangeValue: I,
|
16
|
+
setIsActive: O,
|
17
|
+
before: p,
|
18
|
+
onChangeType: D,
|
19
|
+
disableFuture: S = !1,
|
20
|
+
disablePast: T = !1,
|
21
|
+
disabledDate: h,
|
22
|
+
validRange: N
|
22
23
|
}) => {
|
23
|
-
var
|
24
|
+
var $;
|
24
25
|
i = isNaN(new Date(i).getTime()) ? /* @__PURE__ */ new Date() : i;
|
25
|
-
const
|
26
|
-
y:
|
27
|
-
d:
|
28
|
-
m:
|
29
|
-
},
|
30
|
-
y:
|
31
|
-
d:
|
32
|
-
m:
|
33
|
-
}, [r,
|
26
|
+
const l = H(i), f = d ? H(d) : l, y = {
|
27
|
+
y: f.getFullYear(),
|
28
|
+
d: f.getDate(),
|
29
|
+
m: f.getMonth() + 1
|
30
|
+
}, w = {
|
31
|
+
y: l.getFullYear(),
|
32
|
+
d: l.getDate(),
|
33
|
+
m: l.getMonth() + 1
|
34
|
+
}, [r, b] = G({ y: w.y, m: w.m }), _ = W([r]), j = (t) => {
|
34
35
|
let e = t.getDay();
|
35
36
|
return e === 0 && (e = 7), e - 1;
|
36
|
-
},
|
37
|
+
}, v = r.m - 1, c = new Date(r.y, v), g = [], x = (() => {
|
37
38
|
const t = new Date(c);
|
38
39
|
t.setDate(t.getDate() - 1);
|
39
40
|
const e = t.getDate(), o = [];
|
40
|
-
for (let s = 0; s <
|
41
|
+
for (let s = 0; s < j(c); s++)
|
41
42
|
o.push(e - s);
|
42
43
|
return o.reverse(), o;
|
43
44
|
})();
|
44
|
-
for (; c.getMonth() ===
|
45
|
-
|
46
|
-
const
|
47
|
-
const e = 42 - (
|
45
|
+
for (; c.getMonth() === v; )
|
46
|
+
g.push(c.getDate()), c.setDate(c.getDate() + 1);
|
47
|
+
const C = (() => {
|
48
|
+
const e = 42 - (x.length + g.length), o = [];
|
48
49
|
for (let s = 1; s <= e; s++)
|
49
50
|
o.push(s);
|
50
51
|
return o;
|
51
|
-
})(),
|
52
|
-
|
53
|
-
}, F = () => {
|
54
|
-
w(P(r.m + 1, r.y));
|
52
|
+
})(), F = () => {
|
53
|
+
O(!1);
|
55
54
|
}, L = () => {
|
56
|
-
|
57
|
-
},
|
55
|
+
b(A(r.m + 1, r.y));
|
56
|
+
}, Y = () => {
|
57
|
+
b(A(r.m - 1, r.y));
|
58
|
+
}, M = (t) => {
|
58
59
|
const e = new Date(t);
|
59
|
-
if (e.setHours(0, 0, 0, 0),
|
60
|
+
if (e.setHours(0, 0, 0, 0), p && p.getTime() > t)
|
60
61
|
return !0;
|
61
|
-
if (
|
62
|
+
if (S) {
|
62
63
|
const o = /* @__PURE__ */ new Date();
|
63
64
|
if (o.setHours(0, 0, 0, 0), e.getTime() > o.getTime()) return !0;
|
64
65
|
}
|
65
|
-
if (
|
66
|
+
if (T) {
|
66
67
|
const o = /* @__PURE__ */ new Date();
|
67
68
|
if (o.setHours(0, 0, 0, 0), t < o.getTime()) return !0;
|
68
69
|
}
|
69
|
-
if (
|
70
|
-
if (
|
71
|
-
const [o, s] =
|
72
|
-
if (o.setHours(0, 0, 0, 0), s.setHours(0, 0, 0, 0),
|
70
|
+
if (h && h(e)) return !0;
|
71
|
+
if (N) {
|
72
|
+
const [o, s] = N, k = new Date(t);
|
73
|
+
if (o.setHours(0, 0, 0, 0), s.setHours(0, 0, 0, 0), k < o || k > s) return !0;
|
73
74
|
}
|
74
75
|
return !1;
|
75
|
-
},
|
76
|
-
|
76
|
+
}, z = (t) => {
|
77
|
+
M(
|
77
78
|
(/* @__PURE__ */ new Date(
|
78
79
|
`${r.y}-${m.Number(2, r.m)}-${m.Number(2, t)}`
|
79
80
|
)).getTime()
|
80
|
-
) || (
|
81
|
+
) || (I(
|
81
82
|
/* @__PURE__ */ new Date(
|
82
83
|
`${r.y}-${m.Number(2, r.m)}-${m.Number(2, t)}`
|
83
84
|
)
|
84
|
-
),
|
85
|
+
), F());
|
85
86
|
};
|
86
|
-
return /* @__PURE__ */
|
87
|
+
return /* @__PURE__ */ u(
|
87
88
|
"div",
|
88
89
|
{
|
89
90
|
className: n["calendar-block"],
|
90
|
-
ref:
|
91
|
+
ref: _,
|
91
92
|
"data-testid": "calendar-modal",
|
92
93
|
children: [
|
93
|
-
/* @__PURE__ */
|
94
|
+
/* @__PURE__ */ u("div", { className: n.h, children: [
|
94
95
|
/* @__PURE__ */ a(
|
95
|
-
|
96
|
+
B,
|
96
97
|
{
|
97
98
|
isIconButton: !0,
|
98
99
|
iconName: "DropdownArrowLeft16px",
|
99
|
-
onClick:
|
100
|
+
onClick: Y,
|
100
101
|
variant: "secondary-gray",
|
101
102
|
size: "l"
|
102
103
|
}
|
103
104
|
),
|
104
|
-
/* @__PURE__ */
|
105
|
+
/* @__PURE__ */ u(
|
105
106
|
"button",
|
106
107
|
{
|
107
108
|
type: "button",
|
108
109
|
className: n.d,
|
109
|
-
onClick: () =>
|
110
|
+
onClick: () => D == null ? void 0 : D("months"),
|
110
111
|
"data-testid": "month-year-button",
|
111
112
|
children: [
|
112
|
-
(
|
113
|
+
($ = m.Month(r.m)) == null ? void 0 : $.name,
|
113
114
|
"’",
|
114
115
|
r.y.toString().slice(-2),
|
115
|
-
/* @__PURE__ */ a(
|
116
|
+
/* @__PURE__ */ a(E, { iconName: "DropdownArrowBottom16px" })
|
116
117
|
]
|
117
118
|
}
|
118
119
|
),
|
119
120
|
/* @__PURE__ */ a(
|
120
|
-
|
121
|
+
B,
|
121
122
|
{
|
122
123
|
isIconButton: !0,
|
123
124
|
iconName: "DropdownArrowRight16px",
|
124
|
-
onClick:
|
125
|
+
onClick: L,
|
125
126
|
variant: "secondary-gray",
|
126
127
|
size: "l"
|
127
128
|
}
|
128
129
|
)
|
129
130
|
] }),
|
130
|
-
/* @__PURE__ */
|
131
|
-
|
131
|
+
/* @__PURE__ */ u("div", { className: n.b, children: [
|
132
|
+
U.map((t, e) => /* @__PURE__ */ a(
|
132
133
|
"div",
|
133
134
|
{
|
134
|
-
className:
|
135
|
-
[n.orange]: e >
|
135
|
+
className: P(n.m, {
|
136
|
+
[n.orange]: e > V
|
136
137
|
}),
|
137
138
|
children: t
|
138
139
|
},
|
139
140
|
`v${e}`
|
140
141
|
)),
|
141
|
-
|
142
|
-
|
142
|
+
x.map((t, e) => /* @__PURE__ */ a("div", { className: n.m, children: t }, e)),
|
143
|
+
g.map((t, e) => /* @__PURE__ */ a(
|
143
144
|
"button",
|
144
145
|
{
|
145
146
|
type: "button",
|
146
|
-
onClick: () =>
|
147
|
-
className:
|
148
|
-
|
147
|
+
onClick: () => z(t),
|
148
|
+
className: P(
|
149
|
+
M(
|
149
150
|
(/* @__PURE__ */ new Date(
|
150
151
|
`${r.y}-${m.Number(2, r.m)}-${m.Number(2, t)}`
|
151
152
|
)).getTime()
|
152
153
|
) ? n.m : n.a,
|
153
154
|
{
|
154
|
-
[n.current]:
|
155
|
+
[n.current]: d && y.y === r.y && y.m === r.m && y.d === t
|
155
156
|
}
|
156
157
|
),
|
157
158
|
children: t !== 0 && t
|
158
159
|
},
|
159
160
|
e
|
160
161
|
)),
|
161
|
-
|
162
|
+
C.map((t, e) => /* @__PURE__ */ a("div", { className: n.m, children: t }, e))
|
162
163
|
] })
|
163
164
|
]
|
164
165
|
}
|
165
166
|
);
|
166
167
|
};
|
167
168
|
export {
|
168
|
-
|
169
|
+
at as DatePickerModal
|
169
170
|
};
|