@reportportal/ui-kit 0.0.1-alpha.58 → 0.0.1-alpha.59
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,16 +1,16 @@
|
|
|
1
|
-
import { jsxs as S, Fragment as U, jsx as
|
|
1
|
+
import { jsxs as S, Fragment as U, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import $ from "react-datepicker/dist/es/index.js";
|
|
3
3
|
import { c as R } from "./bind-06a7ff84.js";
|
|
4
|
-
import { useMemo as
|
|
4
|
+
import { useMemo as P, useRef as B } from "react";
|
|
5
5
|
import { F as D } from "./fieldText-10046ca8.js";
|
|
6
|
-
import { a as
|
|
7
|
-
import { D as
|
|
6
|
+
import { a as E, S as G } from "./calendarArrow-3e1339ea.js";
|
|
7
|
+
import { D as T } from "./dropdown-937ba0eb.js";
|
|
8
8
|
import { registerLocale as H } from "react-datepicker";
|
|
9
9
|
const pe = (r, s) => {
|
|
10
10
|
H(r, s);
|
|
11
11
|
}, V = (r, s = 20) => {
|
|
12
12
|
const l = r + s;
|
|
13
|
-
return new Array(l - r).fill(void 0).map((g,
|
|
13
|
+
return new Array(l - r).fill(void 0).map((g, o) => r - o);
|
|
14
14
|
}, O = "_header_a3cjx_1", W = "_disabled_a3cjx_25", q = "_dropdown_a3cjx_8", z = {
|
|
15
15
|
header: O,
|
|
16
16
|
"dropdowns-wrapper": "_dropdowns-wrapper_a3cjx_8",
|
|
@@ -28,7 +28,7 @@ const pe = (r, s) => {
|
|
|
28
28
|
},
|
|
29
29
|
decreaseMonth: g = () => {
|
|
30
30
|
},
|
|
31
|
-
increaseMonth:
|
|
31
|
+
increaseMonth: o = () => {
|
|
32
32
|
},
|
|
33
33
|
prevMonthButtonDisabled: n = !1,
|
|
34
34
|
nextMonthButtonDisabled: h = !1,
|
|
@@ -37,38 +37,40 @@ const pe = (r, s) => {
|
|
|
37
37
|
yearsOptions: i = [],
|
|
38
38
|
locale: x
|
|
39
39
|
}) => {
|
|
40
|
-
const p = r.getFullYear(), C = r.getMonth(), f =
|
|
41
|
-
const
|
|
40
|
+
const p = r.getFullYear(), C = r.getMonth(), f = P(() => {
|
|
41
|
+
const e = Array(12).keys(), c = new Intl.DateTimeFormat(x, {
|
|
42
42
|
month: "long"
|
|
43
43
|
}), d = (m) => c.format(new Date(p, m));
|
|
44
|
-
return Array.from(
|
|
44
|
+
return Array.from(e, d).reduce((m, j, A) => m.concat({
|
|
45
45
|
value: A,
|
|
46
46
|
label: j
|
|
47
47
|
}), []);
|
|
48
|
-
}, []), N =
|
|
48
|
+
}, []), N = P(() => (i.length > 0 ? i : V(p)).reduce(
|
|
49
49
|
(c, d) => c.concat({ value: d, label: `${d}` }),
|
|
50
50
|
[]
|
|
51
|
-
), [i]), v = (
|
|
52
|
-
l(
|
|
53
|
-
}, y = (
|
|
54
|
-
s(
|
|
51
|
+
), [i]), v = (e) => {
|
|
52
|
+
l(e);
|
|
53
|
+
}, y = (e) => {
|
|
54
|
+
s(e);
|
|
55
55
|
};
|
|
56
56
|
return /* @__PURE__ */ S(U, { children: [
|
|
57
|
-
b && /* @__PURE__ */
|
|
57
|
+
b && /* @__PURE__ */ t("div", { className: a(w), children: b }),
|
|
58
58
|
/* @__PURE__ */ S("div", { className: a("header"), children: [
|
|
59
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ t(
|
|
60
60
|
"button",
|
|
61
61
|
{
|
|
62
62
|
"aria-label": "Previous Months",
|
|
63
63
|
disabled: n,
|
|
64
|
-
onClick:
|
|
64
|
+
onClick: (e) => {
|
|
65
|
+
e.stopPropagation(), g();
|
|
66
|
+
},
|
|
65
67
|
className: a("button-prev", { disabled: n }),
|
|
66
|
-
children: /* @__PURE__ */
|
|
68
|
+
children: /* @__PURE__ */ t(E, {})
|
|
67
69
|
}
|
|
68
70
|
),
|
|
69
71
|
/* @__PURE__ */ S("div", { className: a("dropdowns-wrapper"), children: [
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
-
|
|
72
|
+
/* @__PURE__ */ t(
|
|
73
|
+
T,
|
|
72
74
|
{
|
|
73
75
|
options: f,
|
|
74
76
|
value: C,
|
|
@@ -78,8 +80,8 @@ const pe = (r, s) => {
|
|
|
78
80
|
toggleButtonClassName: a("toggle-button")
|
|
79
81
|
}
|
|
80
82
|
),
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
-
|
|
83
|
+
/* @__PURE__ */ t(
|
|
84
|
+
T,
|
|
83
85
|
{
|
|
84
86
|
options: N,
|
|
85
87
|
value: p,
|
|
@@ -90,19 +92,21 @@ const pe = (r, s) => {
|
|
|
90
92
|
}
|
|
91
93
|
)
|
|
92
94
|
] }),
|
|
93
|
-
/* @__PURE__ */
|
|
95
|
+
/* @__PURE__ */ t(
|
|
94
96
|
"button",
|
|
95
97
|
{
|
|
96
98
|
"aria-label": "Next Months",
|
|
97
99
|
disabled: h,
|
|
98
|
-
onClick: e
|
|
100
|
+
onClick: (e) => {
|
|
101
|
+
e.stopPropagation(), o();
|
|
102
|
+
},
|
|
99
103
|
className: a("button-next", { disabled: h }),
|
|
100
|
-
children: /* @__PURE__ */
|
|
104
|
+
children: /* @__PURE__ */ t(E, {})
|
|
101
105
|
}
|
|
102
106
|
)
|
|
103
107
|
] })
|
|
104
108
|
] });
|
|
105
|
-
}, K = "_calendar_1jr94_5", Q = "_date_1jr94_90", X = "_disabled_1jr94_202", Z = "_popper_1jr94_210", ee = "_input_1jr94_214",
|
|
109
|
+
}, K = "_calendar_1jr94_5", Q = "_date_1jr94_90", X = "_disabled_1jr94_202", Z = "_popper_1jr94_210", ee = "_input_1jr94_214", oe = {
|
|
106
110
|
calendar: K,
|
|
107
111
|
"current-date": "_current-date_1jr94_89",
|
|
108
112
|
date: Q,
|
|
@@ -111,7 +115,7 @@ const pe = (r, s) => {
|
|
|
111
115
|
disabled: X,
|
|
112
116
|
popper: Z,
|
|
113
117
|
input: ee
|
|
114
|
-
}, _ = R.bind(
|
|
118
|
+
}, _ = R.bind(oe), ne = "en", L = "MM-dd-yyyy", me = ({
|
|
115
119
|
onChange: r = () => {
|
|
116
120
|
},
|
|
117
121
|
disabled: s = !1,
|
|
@@ -119,7 +123,7 @@ const pe = (r, s) => {
|
|
|
119
123
|
},
|
|
120
124
|
onFocus: g = () => {
|
|
121
125
|
},
|
|
122
|
-
endDate:
|
|
126
|
+
endDate: o = void 0,
|
|
123
127
|
startDate: n = void 0,
|
|
124
128
|
headerNodes: h = null,
|
|
125
129
|
customClassName: b = "",
|
|
@@ -128,15 +132,15 @@ const pe = (r, s) => {
|
|
|
128
132
|
popperClassName: x = "",
|
|
129
133
|
calendarClassName: p = "",
|
|
130
134
|
fixedHeight: C = !1,
|
|
131
|
-
language: f =
|
|
135
|
+
language: f = ne,
|
|
132
136
|
yearsOptions: N = [],
|
|
133
|
-
placeholder: v =
|
|
134
|
-
dateFormat: y =
|
|
135
|
-
selects:
|
|
137
|
+
placeholder: v = L.toUpperCase(),
|
|
138
|
+
dateFormat: y = L,
|
|
139
|
+
selects: e = "start",
|
|
136
140
|
value: c = null
|
|
137
141
|
}) => {
|
|
138
|
-
const d = B(null), k = n == null ? void 0 : n.toDateString(), m =
|
|
139
|
-
const F = u.toDateString(), Y = F === k, M = j && F === m, I = n &&
|
|
142
|
+
const d = B(null), k = n == null ? void 0 : n.toDateString(), m = o == null ? void 0 : o.toDateString(), j = o && n && o > n, A = (u) => {
|
|
143
|
+
const F = u.toDateString(), Y = F === k, M = j && F === m, I = n && o && u > n && u < o;
|
|
140
144
|
return _("date", {
|
|
141
145
|
"current-date": Y,
|
|
142
146
|
"selected-range": I && !M,
|
|
@@ -144,23 +148,23 @@ const pe = (r, s) => {
|
|
|
144
148
|
disabled: s
|
|
145
149
|
});
|
|
146
150
|
};
|
|
147
|
-
return /* @__PURE__ */
|
|
151
|
+
return /* @__PURE__ */ t(
|
|
148
152
|
$,
|
|
149
153
|
{
|
|
150
|
-
customInput: /* @__PURE__ */
|
|
154
|
+
customInput: /* @__PURE__ */ t(
|
|
151
155
|
D,
|
|
152
156
|
{
|
|
153
157
|
className: _("input"),
|
|
154
158
|
defaultWidth: !1,
|
|
155
|
-
endIcon: /* @__PURE__ */
|
|
159
|
+
endIcon: /* @__PURE__ */ t(G, {}),
|
|
156
160
|
ref: d
|
|
157
161
|
}
|
|
158
162
|
),
|
|
159
163
|
placeholderText: v,
|
|
160
164
|
selected: c,
|
|
161
165
|
startDate: n,
|
|
162
|
-
endDate:
|
|
163
|
-
minDate:
|
|
166
|
+
endDate: o,
|
|
167
|
+
minDate: e === "end" ? n : void 0,
|
|
164
168
|
disabled: s,
|
|
165
169
|
shouldCloseOnSelect: i,
|
|
166
170
|
fixedHeight: C,
|
|
@@ -168,7 +172,7 @@ const pe = (r, s) => {
|
|
|
168
172
|
showPopperArrow: !1,
|
|
169
173
|
dayClassName: A,
|
|
170
174
|
calendarClassName: _(p, "calendar"),
|
|
171
|
-
renderCustomHeader: (u) => /* @__PURE__ */
|
|
175
|
+
renderCustomHeader: (u) => /* @__PURE__ */ t(
|
|
172
176
|
J,
|
|
173
177
|
{
|
|
174
178
|
...u,
|
|
@@ -185,8 +189,8 @@ const pe = (r, s) => {
|
|
|
185
189
|
showTimeInput: !!w,
|
|
186
190
|
popperClassName: _(x, "popper"),
|
|
187
191
|
dateFormat: y,
|
|
188
|
-
selectsStart:
|
|
189
|
-
selectsEnd:
|
|
192
|
+
selectsStart: e === "start",
|
|
193
|
+
selectsEnd: e === "end",
|
|
190
194
|
className: _("datepicker")
|
|
191
195
|
}
|
|
192
196
|
);
|
package/dist/datePicker.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as t } from "./datePicker-
|
|
2
|
-
import { r as q } from "./datePicker-
|
|
1
|
+
import { D as t } from "./datePicker-c93e0835.js";
|
|
2
|
+
import { r as q } from "./datePicker-c93e0835.js";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "react-datepicker/dist/es/index.js";
|
|
5
5
|
import "./bind-06a7ff84.js";
|
package/dist/index.js
CHANGED
|
@@ -16,7 +16,7 @@ import { Tooltip as J } from "./tooltip.js";
|
|
|
16
16
|
import { Popover as Q } from "./popover.js";
|
|
17
17
|
import { P as W } from "./pagination-2076b7b6.js";
|
|
18
18
|
import { T as Y } from "./table-32fc8c70.js";
|
|
19
|
-
import { D as _ } from "./datePicker-
|
|
19
|
+
import { D as _ } from "./datePicker-c93e0835.js";
|
|
20
20
|
import "react-datepicker";
|
|
21
21
|
import { SystemAlert as oo } from "./systemAlert.js";
|
|
22
22
|
import { S as eo, a as to } from "./arrowUp-4a5caee7.js";
|