@reportportal/ui-kit 0.0.1-alpha.88 → 0.0.1-alpha.89

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