@reportportal/ui-kit 0.0.1-alpha.46 → 0.0.1-alpha.47
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/arrowUp-4a5caee7.js +6 -0
- package/dist/clear-53660571.js +5 -0
- package/dist/close-4b33d7c1.js +5 -0
- package/dist/common/utils/index.d.ts +1 -0
- package/dist/common/utils/isPositiveInteger.d.ts +1 -0
- package/dist/components/fieldText/fieldText.d.ts +2 -0
- package/dist/components/icons/index.d.ts +0 -1
- package/dist/components/index.d.ts +1 -3
- package/dist/{datePicker-68379fe1.js → datePicker-81d77983.js} +4 -5
- package/dist/datePicker.js +7 -4
- package/dist/dropdown-0260bb66.js +5 -0
- package/dist/dropdown-5225df5e.js +263 -0
- package/dist/dropdown.js +2 -1
- package/dist/error-4f493850.js +7 -0
- package/dist/fieldNumber-6a5fdd15.js +125 -0
- package/dist/fieldNumber.js +2 -1
- package/dist/fieldText-df070a3c.js +135 -0
- package/dist/fieldText.js +3 -2
- package/dist/icons.js +32 -0
- package/dist/index.js +72 -114
- package/dist/minus-660ea0d6.js +6 -0
- package/dist/modal.js +144 -14
- package/dist/pagination-38898dc9.js +345 -0
- package/dist/pagination.js +5 -2
- package/dist/prevChapter-ebd5a3a7.js +6 -0
- package/dist/spinLoader-c4a53718.js +11 -0
- package/dist/spinLoader.js +7 -0
- package/dist/style.css +1 -1
- package/dist/systemAlert.js +51 -0
- package/dist/table-32fc8c70.js +144 -0
- package/dist/table.js +2 -2
- package/package.json +1 -1
- package/dist/components/dataPicker2/dataPicker2/datePicker.d.ts +0 -24
- package/dist/components/dataPicker2/dataPicker2/header/datePickerHeader.d.ts +0 -15
- package/dist/components/dataPicker2/dataPicker2/header/index.d.ts +0 -3
- package/dist/components/dataPicker2/dataPicker2/index.d.ts +0 -3
- package/dist/components/dataPicker2/dataPicker2/utils.d.ts +0 -3
- package/dist/components/date2/date2.d.ts +0 -24
- package/dist/components/date2/index.d.ts +0 -3
- package/dist/components/datePicker1/datePicker.d.ts +0 -24
- package/dist/components/datePicker1/header/datePickerHeader.d.ts +0 -15
- package/dist/components/datePicker1/header/index.d.ts +0 -3
- package/dist/components/datePicker1/index.d.ts +0 -3
- package/dist/components/datePicker1/utils.d.ts +0 -3
- package/dist/components/reactDatePicker/index.d.ts +0 -3
- package/dist/components/reactDatePicker/reactDatePicker.d.ts +0 -2
- package/dist/components/reactDatePicker2/index.d.ts +0 -3
- package/dist/components/reactDatePicker2/reactDatePicker2.d.ts +0 -2
- package/dist/date2-9273411e.js +0 -46
- package/dist/date2.js +0 -7
- package/dist/datePicker-89394dc8.js +0 -194
- package/dist/datePicker1.js +0 -19
- package/dist/dropdown-b9c6dc2f.js +0 -264
- package/dist/fieldNumber-1f286b40.js +0 -127
- package/dist/fieldText-65e4c614.js +0 -134
- package/dist/index-54e3bfc2.js +0 -147
- package/dist/pagination-4ae395bd.js +0 -347
- package/dist/reactDatePicker2-a31b070e.js +0 -5
- package/dist/reactDatePicker2.js +0 -6
- package/dist/table-9bf4ddab.js +0 -147
- /package/dist/components/{icons/baseIconButton → baseIconButton}/baseIconButton.d.ts +0 -0
- /package/dist/components/{icons/baseIconButton → baseIconButton}/index.d.ts +0 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsxs as u, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect as f } from "react";
|
|
3
|
+
import { c as p } from "./bind-06a7ff84.js";
|
|
4
|
+
import { S as d } from "./close-4b33d7c1.js";
|
|
5
|
+
import { b as R, a as N, S } from "./error-4f493850.js";
|
|
6
|
+
var o = /* @__PURE__ */ ((r) => (r.INFO = "info", r.SUCCESS = "success", r.ERROR = "error", r))(o || {});
|
|
7
|
+
const v = "_error_14lm6_11", b = "_success_14lm6_14", h = "_info_14lm6_17", w = "_title_14lm6_32", E = {
|
|
8
|
+
"system-alert": "_system-alert_14lm6_1",
|
|
9
|
+
error: v,
|
|
10
|
+
success: b,
|
|
11
|
+
info: h,
|
|
12
|
+
"icon-wrapper": "_icon-wrapper_14lm6_20",
|
|
13
|
+
"content-wrapper": "_content-wrapper_14lm6_26",
|
|
14
|
+
title: w,
|
|
15
|
+
"close-button": "_close-button_14lm6_45"
|
|
16
|
+
}, e = p.bind(E), O = 7e3, I = 4e3, F = ({
|
|
17
|
+
title: r,
|
|
18
|
+
onClose: t,
|
|
19
|
+
icon: a = null,
|
|
20
|
+
type: c = o.INFO,
|
|
21
|
+
duration: l = I,
|
|
22
|
+
className: i
|
|
23
|
+
}) => {
|
|
24
|
+
const n = c === o.ERROR ? O : l;
|
|
25
|
+
f(() => {
|
|
26
|
+
const _ = setTimeout(() => {
|
|
27
|
+
t();
|
|
28
|
+
}, n);
|
|
29
|
+
return () => clearTimeout(_);
|
|
30
|
+
}, [n, t]);
|
|
31
|
+
const m = () => {
|
|
32
|
+
switch (c) {
|
|
33
|
+
case "info":
|
|
34
|
+
return /* @__PURE__ */ s(S, {});
|
|
35
|
+
case "success":
|
|
36
|
+
return /* @__PURE__ */ s(N, {});
|
|
37
|
+
case "error":
|
|
38
|
+
return /* @__PURE__ */ s(R, {});
|
|
39
|
+
default:
|
|
40
|
+
return a;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
return /* @__PURE__ */ u("div", { className: e("system-alert", c, i), children: [
|
|
44
|
+
/* @__PURE__ */ s("div", { className: e("icon-wrapper"), children: m() }),
|
|
45
|
+
/* @__PURE__ */ s("div", { className: e("content-wrapper"), children: /* @__PURE__ */ s("h2", { className: e("title"), children: r }) }),
|
|
46
|
+
/* @__PURE__ */ s("button", { className: e("close-button"), onClick: t, "aria-label": "close system alert", children: /* @__PURE__ */ s(d, {}) })
|
|
47
|
+
] });
|
|
48
|
+
};
|
|
49
|
+
export {
|
|
50
|
+
F as SystemAlert
|
|
51
|
+
};
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { jsxs as n, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { useState as S, useMemo as G } from "react";
|
|
3
|
+
import { c as J } from "./bind-06a7ff84.js";
|
|
4
|
+
import { a as f, S as K } from "./arrowUp-4a5caee7.js";
|
|
5
|
+
import { C as x } from "./checkbox-9a6c7ce1.js";
|
|
6
|
+
const O = "_table_kha9s_1", P = "_label_kha9s_87", Q = {
|
|
7
|
+
table: O,
|
|
8
|
+
"table-header": "_table-header_kha9s_9",
|
|
9
|
+
"table-row": "_table-row_kha9s_16",
|
|
10
|
+
"table-row-content": "_table-row-content_kha9s_21",
|
|
11
|
+
"size-small": "_size-small_kha9s_31",
|
|
12
|
+
"size-large": "_size-large_kha9s_34",
|
|
13
|
+
"table-body": "_table-body_kha9s_38",
|
|
14
|
+
"table-header-cell": "_table-header-cell_kha9s_45",
|
|
15
|
+
"table-cell": "_table-cell_kha9s_45",
|
|
16
|
+
"action-menu-cell": "_action-menu-cell_kha9s_50",
|
|
17
|
+
"checkbox-cell": "_checkbox-cell_kha9s_60",
|
|
18
|
+
"primary-cell": "_primary-cell_kha9s_71",
|
|
19
|
+
label: P,
|
|
20
|
+
"sortable-cell": "_sortable-cell_kha9s_91",
|
|
21
|
+
"align-right": "_align-right_kha9s_94",
|
|
22
|
+
"align-center": "_align-center_kha9s_100"
|
|
23
|
+
};
|
|
24
|
+
var k = /* @__PURE__ */ ((c) => (c.ASC = "asc", c.DESC = "desc", c))(k || {});
|
|
25
|
+
const V = (c) => c.map((t) => t.key), a = J.bind(Q), ee = ({
|
|
26
|
+
data: c,
|
|
27
|
+
primaryColumn: t,
|
|
28
|
+
fixedColumns: h,
|
|
29
|
+
renderRowActions: i,
|
|
30
|
+
className: z = "",
|
|
31
|
+
rowClassName: M = "",
|
|
32
|
+
headerClassName: m = "",
|
|
33
|
+
selectable: y = !1,
|
|
34
|
+
selectedRowIds: d = [],
|
|
35
|
+
sortingDirection: v = k.ASC,
|
|
36
|
+
sortingColumn: r = t,
|
|
37
|
+
sortableColumns: _ = V([t, ...h]),
|
|
38
|
+
onChangeSorting: u = () => {
|
|
39
|
+
},
|
|
40
|
+
onToggleRowSelection: A = () => {
|
|
41
|
+
},
|
|
42
|
+
onToggleAllRowsSelection: E = () => {
|
|
43
|
+
}
|
|
44
|
+
}) => {
|
|
45
|
+
const [C, p] = S(null), [L, N] = S(null), w = G(() => [{ ...t, primary: !0 }, ...h], [t, h]), j = (e) => {
|
|
46
|
+
_.includes(e) && u({ key: e, direction: v });
|
|
47
|
+
}, g = (e) => ({
|
|
48
|
+
width: e.width,
|
|
49
|
+
textAlign: e.align
|
|
50
|
+
}), H = (e) => {
|
|
51
|
+
p(e);
|
|
52
|
+
}, T = () => {
|
|
53
|
+
p(null);
|
|
54
|
+
}, $ = (e) => {
|
|
55
|
+
N(e);
|
|
56
|
+
}, D = () => {
|
|
57
|
+
N(null);
|
|
58
|
+
}, R = (e) => {
|
|
59
|
+
A(e);
|
|
60
|
+
}, U = () => {
|
|
61
|
+
E();
|
|
62
|
+
}, q = c.every((e) => d.includes(e.id)), o = c.some((e) => d.includes(e.id)), B = (e) => {
|
|
63
|
+
var s;
|
|
64
|
+
return `size-${((s = e.rowConfigs) == null ? void 0 : s.size) ?? "default"}`;
|
|
65
|
+
}, F = (e) => {
|
|
66
|
+
if (_.includes(e))
|
|
67
|
+
return (r == null ? void 0 : r.key) === e ? v === k.ASC ? /* @__PURE__ */ l(f, {}) : /* @__PURE__ */ l(K, {}) : /* @__PURE__ */ l(f, {});
|
|
68
|
+
};
|
|
69
|
+
return /* @__PURE__ */ n("div", { className: a("table", z), children: [
|
|
70
|
+
/* @__PURE__ */ n("div", { className: a("table-header", m), children: [
|
|
71
|
+
y && /* @__PURE__ */ l("div", { className: a("table-header-cell", "checkbox-cell"), children: o && /* @__PURE__ */ l(
|
|
72
|
+
x,
|
|
73
|
+
{
|
|
74
|
+
value: q,
|
|
75
|
+
partiallyChecked: o,
|
|
76
|
+
onChange: U,
|
|
77
|
+
className: a("checkbox-cell")
|
|
78
|
+
}
|
|
79
|
+
) }),
|
|
80
|
+
w.map((e) => /* @__PURE__ */ l(
|
|
81
|
+
"button",
|
|
82
|
+
{
|
|
83
|
+
className: a("table-header-cell", {
|
|
84
|
+
[`align-${e.align}`]: "align" in e,
|
|
85
|
+
"primary-cell": "primary" in e && e.primary,
|
|
86
|
+
"sortable-cell": _.includes(e.key)
|
|
87
|
+
}),
|
|
88
|
+
style: g(e),
|
|
89
|
+
children: /* @__PURE__ */ n(
|
|
90
|
+
"div",
|
|
91
|
+
{
|
|
92
|
+
className: a("label"),
|
|
93
|
+
onClick: () => j(e.key),
|
|
94
|
+
onMouseEnter: () => H(e.key),
|
|
95
|
+
onMouseLeave: T,
|
|
96
|
+
children: [
|
|
97
|
+
/* @__PURE__ */ l("span", { children: e.header }),
|
|
98
|
+
(C === e.key || (r == null ? void 0 : r.key) === e.key) && F(e.key)
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
)
|
|
102
|
+
},
|
|
103
|
+
e.key
|
|
104
|
+
)),
|
|
105
|
+
i && /* @__PURE__ */ l("div", { className: a("table-header-cell", "action-menu-cell") })
|
|
106
|
+
] }),
|
|
107
|
+
/* @__PURE__ */ l("div", { className: a("table-body"), children: c.map((e, b) => /* @__PURE__ */ n(
|
|
108
|
+
"div",
|
|
109
|
+
{
|
|
110
|
+
className: a("table-row", B(e), M),
|
|
111
|
+
onMouseEnter: () => $(b),
|
|
112
|
+
onMouseLeave: D,
|
|
113
|
+
children: [
|
|
114
|
+
y && /* @__PURE__ */ l("div", { className: a("table-cell", "checkbox-cell"), children: (o || L === b) && /* @__PURE__ */ l(
|
|
115
|
+
x,
|
|
116
|
+
{
|
|
117
|
+
value: d.includes(e.id),
|
|
118
|
+
onChange: () => R(e.id),
|
|
119
|
+
className: a("checkbox-cell")
|
|
120
|
+
}
|
|
121
|
+
) }),
|
|
122
|
+
/* @__PURE__ */ n("div", { className: a("table-row-content"), children: [
|
|
123
|
+
w.map((s) => /* @__PURE__ */ l(
|
|
124
|
+
"div",
|
|
125
|
+
{
|
|
126
|
+
className: a("table-cell", {
|
|
127
|
+
"primary-cell": "primary" in s && s.primary
|
|
128
|
+
}),
|
|
129
|
+
style: g(s),
|
|
130
|
+
children: e[s.key].component || e[s.key].content || e[s.key]
|
|
131
|
+
},
|
|
132
|
+
s.key
|
|
133
|
+
)),
|
|
134
|
+
i && /* @__PURE__ */ l("div", { className: a("table-cell", "action-menu-cell"), children: i(e.metaData) })
|
|
135
|
+
] })
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
e.id
|
|
139
|
+
)) })
|
|
140
|
+
] });
|
|
141
|
+
};
|
|
142
|
+
export {
|
|
143
|
+
ee as T
|
|
144
|
+
};
|
package/dist/table.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { T as r } from "./table-
|
|
1
|
+
import { T as r } from "./table-32fc8c70.js";
|
|
2
2
|
import "react/jsx-runtime";
|
|
3
3
|
import "react";
|
|
4
4
|
import "./bind-06a7ff84.js";
|
|
5
|
-
import "./
|
|
5
|
+
import "./arrowUp-4a5caee7.js";
|
|
6
6
|
import "./checkbox-9a6c7ce1.js";
|
|
7
7
|
import "./keyCodes-f63c0e11.js";
|
|
8
8
|
export {
|
package/package.json
CHANGED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { FC, ReactNode, ReactElement } from 'react';
|
|
2
|
-
interface DatePickerProps {
|
|
3
|
-
onChange?: (date: Date | any) => void;
|
|
4
|
-
onBlur?: () => void;
|
|
5
|
-
onFocus?: () => void;
|
|
6
|
-
headerNodes?: ReactNode;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
shouldCloseOnSelect?: boolean;
|
|
9
|
-
fixedHeight?: boolean;
|
|
10
|
-
startDate?: Date | undefined;
|
|
11
|
-
endDate?: Date | undefined;
|
|
12
|
-
customClassName?: string;
|
|
13
|
-
popperClassName?: string;
|
|
14
|
-
calendarClassName?: string;
|
|
15
|
-
customTimeInput?: ReactElement;
|
|
16
|
-
language?: string;
|
|
17
|
-
yearsOptions?: number[];
|
|
18
|
-
placeholder?: string;
|
|
19
|
-
dateFormat?: string;
|
|
20
|
-
selects?: 'start' | 'end' | 'none';
|
|
21
|
-
value?: Date | null;
|
|
22
|
-
}
|
|
23
|
-
export declare const DatePicker2: FC<DatePickerProps>;
|
|
24
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { FC, ReactNode } from 'react';
|
|
2
|
-
export interface DatePickerHeaderProps {
|
|
3
|
-
changeYear: (year: number) => void;
|
|
4
|
-
changeMonth: (month: number) => void;
|
|
5
|
-
decreaseMonth: () => void;
|
|
6
|
-
increaseMonth: () => void;
|
|
7
|
-
headerNodes: ReactNode;
|
|
8
|
-
date: Date;
|
|
9
|
-
prevMonthButtonDisabled: boolean;
|
|
10
|
-
nextMonthButtonDisabled: boolean;
|
|
11
|
-
customClassName: string;
|
|
12
|
-
yearsOptions: number[];
|
|
13
|
-
locale: string;
|
|
14
|
-
}
|
|
15
|
-
export declare const DatePickerHeader: FC<DatePickerHeaderProps>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { FC, ReactNode, ReactElement } from 'react';
|
|
2
|
-
interface DatePickerProps {
|
|
3
|
-
onChange?: (date: Date | any) => void;
|
|
4
|
-
onBlur?: () => void;
|
|
5
|
-
onFocus?: () => void;
|
|
6
|
-
headerNodes?: ReactNode;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
shouldCloseOnSelect?: boolean;
|
|
9
|
-
fixedHeight?: boolean;
|
|
10
|
-
startDate?: Date | undefined;
|
|
11
|
-
endDate?: Date | undefined;
|
|
12
|
-
customClassName?: string;
|
|
13
|
-
popperClassName?: string;
|
|
14
|
-
calendarClassName?: string;
|
|
15
|
-
customTimeInput?: ReactElement;
|
|
16
|
-
language?: string;
|
|
17
|
-
yearsOptions?: number[];
|
|
18
|
-
placeholder?: string;
|
|
19
|
-
dateFormat?: string;
|
|
20
|
-
selects?: 'start' | 'end' | 'none';
|
|
21
|
-
value?: Date | null;
|
|
22
|
-
}
|
|
23
|
-
export declare const Date2: FC<DatePickerProps>;
|
|
24
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { FC, ReactNode, ReactElement } from 'react';
|
|
2
|
-
interface DatePickerProps {
|
|
3
|
-
onChange?: (date: Date | any) => void;
|
|
4
|
-
onBlur?: () => void;
|
|
5
|
-
onFocus?: () => void;
|
|
6
|
-
headerNodes?: ReactNode;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
shouldCloseOnSelect?: boolean;
|
|
9
|
-
fixedHeight?: boolean;
|
|
10
|
-
startDate?: Date | undefined;
|
|
11
|
-
endDate?: Date | undefined;
|
|
12
|
-
customClassName?: string;
|
|
13
|
-
popperClassName?: string;
|
|
14
|
-
calendarClassName?: string;
|
|
15
|
-
customTimeInput?: ReactElement;
|
|
16
|
-
language?: string;
|
|
17
|
-
yearsOptions?: number[];
|
|
18
|
-
placeholder?: string;
|
|
19
|
-
dateFormat?: string;
|
|
20
|
-
selects?: 'start' | 'end' | 'none';
|
|
21
|
-
value?: Date | null;
|
|
22
|
-
}
|
|
23
|
-
export declare const DatePicker1: FC<DatePickerProps>;
|
|
24
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { FC, ReactNode } from 'react';
|
|
2
|
-
export interface DatePickerHeaderProps {
|
|
3
|
-
changeYear: (year: number) => void;
|
|
4
|
-
changeMonth: (month: number) => void;
|
|
5
|
-
decreaseMonth: () => void;
|
|
6
|
-
increaseMonth: () => void;
|
|
7
|
-
headerNodes: ReactNode;
|
|
8
|
-
date: Date;
|
|
9
|
-
prevMonthButtonDisabled: boolean;
|
|
10
|
-
nextMonthButtonDisabled: boolean;
|
|
11
|
-
customClassName: string;
|
|
12
|
-
yearsOptions: number[];
|
|
13
|
-
locale: string;
|
|
14
|
-
}
|
|
15
|
-
export declare const DatePickerHeader: FC<DatePickerHeaderProps>;
|
package/dist/date2-9273411e.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { jsx as E } from "react/jsx-runtime";
|
|
2
|
-
import T from "react-datepicker";
|
|
3
|
-
const m = "en", r = "MM-dd-yyyy", U = ({
|
|
4
|
-
onChange: a = () => {
|
|
5
|
-
},
|
|
6
|
-
disabled: s = !1,
|
|
7
|
-
onBlur: d = () => {
|
|
8
|
-
},
|
|
9
|
-
onFocus: l = () => {
|
|
10
|
-
},
|
|
11
|
-
endDate: n = void 0,
|
|
12
|
-
startDate: o = void 0,
|
|
13
|
-
customTimeInput: t = void 0,
|
|
14
|
-
shouldCloseOnSelect: i = !0,
|
|
15
|
-
fixedHeight: p = !1,
|
|
16
|
-
language: c = m,
|
|
17
|
-
placeholder: A = r.toUpperCase(),
|
|
18
|
-
dateFormat: D = r,
|
|
19
|
-
selects: e = "start",
|
|
20
|
-
value: f = null
|
|
21
|
-
}) => /* @__PURE__ */ E(
|
|
22
|
-
T,
|
|
23
|
-
{
|
|
24
|
-
placeholderText: A,
|
|
25
|
-
selected: f,
|
|
26
|
-
startDate: o,
|
|
27
|
-
endDate: n,
|
|
28
|
-
minDate: e === "end" ? o : void 0,
|
|
29
|
-
disabled: s,
|
|
30
|
-
shouldCloseOnSelect: i,
|
|
31
|
-
fixedHeight: p,
|
|
32
|
-
locale: c,
|
|
33
|
-
showPopperArrow: !1,
|
|
34
|
-
onChange: a,
|
|
35
|
-
onBlur: d,
|
|
36
|
-
onFocus: l,
|
|
37
|
-
customTimeInput: t,
|
|
38
|
-
showTimeInput: !!t,
|
|
39
|
-
dateFormat: D,
|
|
40
|
-
selectsStart: e === "start",
|
|
41
|
-
selectsEnd: e === "end"
|
|
42
|
-
}
|
|
43
|
-
);
|
|
44
|
-
export {
|
|
45
|
-
U as D
|
|
46
|
-
};
|
package/dist/date2.js
DELETED
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
import { jsxs as S, Fragment as U, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import $ from "react-datepicker";
|
|
3
|
-
import { c as Y } from "./bind-06a7ff84.js";
|
|
4
|
-
import { useMemo as E, useRef as B } from "react";
|
|
5
|
-
import { F as D } from "./fieldText-65e4c614.js";
|
|
6
|
-
import "./baseIconButton-b6adc843.js";
|
|
7
|
-
import { S as T, a as G } from "./calendar-f154eb78.js";
|
|
8
|
-
import { D as P } from "./dropdown-b9c6dc2f.js";
|
|
9
|
-
const H = (a, c = 20) => {
|
|
10
|
-
const l = a + c;
|
|
11
|
-
return new Array(l - a).fill(void 0).map((g, e) => a - e);
|
|
12
|
-
}, V = "_header_a3cjx_1", O = "_disabled_a3cjx_25", W = "_dropdown_a3cjx_8", q = {
|
|
13
|
-
header: V,
|
|
14
|
-
"dropdowns-wrapper": "_dropdowns-wrapper_a3cjx_8",
|
|
15
|
-
"button-prev": "_button-prev_a3cjx_13",
|
|
16
|
-
"button-next": "_button-next_a3cjx_14",
|
|
17
|
-
disabled: O,
|
|
18
|
-
dropdown: W,
|
|
19
|
-
"month-dropdown": "_month-dropdown_a3cjx_44",
|
|
20
|
-
"toggle-button": "_toggle-button_a3cjx_47"
|
|
21
|
-
}, r = Y.bind(q), z = ({
|
|
22
|
-
date: a = /* @__PURE__ */ new Date(),
|
|
23
|
-
changeYear: c = () => {
|
|
24
|
-
},
|
|
25
|
-
changeMonth: l = () => {
|
|
26
|
-
},
|
|
27
|
-
decreaseMonth: g = () => {
|
|
28
|
-
},
|
|
29
|
-
increaseMonth: e = () => {
|
|
30
|
-
},
|
|
31
|
-
prevMonthButtonDisabled: n = !1,
|
|
32
|
-
nextMonthButtonDisabled: h = !1,
|
|
33
|
-
headerNodes: b = null,
|
|
34
|
-
customClassName: w = "",
|
|
35
|
-
yearsOptions: i = [],
|
|
36
|
-
locale: x
|
|
37
|
-
}) => {
|
|
38
|
-
const p = a.getFullYear(), C = a.getMonth(), f = E(() => {
|
|
39
|
-
const t = Array(12).keys(), s = new Intl.DateTimeFormat(x, {
|
|
40
|
-
month: "long"
|
|
41
|
-
}), d = (m) => s.format(new Date(p, m));
|
|
42
|
-
return Array.from(t, d).reduce((m, j, A) => m.concat({
|
|
43
|
-
value: A,
|
|
44
|
-
label: j
|
|
45
|
-
}), []);
|
|
46
|
-
}, []), N = E(() => (i.length > 0 ? i : H(p)).reduce(
|
|
47
|
-
(s, d) => s.concat({ value: d, label: `${d}` }),
|
|
48
|
-
[]
|
|
49
|
-
), [i]), v = (t) => {
|
|
50
|
-
l(t);
|
|
51
|
-
}, y = (t) => {
|
|
52
|
-
c(t);
|
|
53
|
-
};
|
|
54
|
-
return /* @__PURE__ */ S(U, { children: [
|
|
55
|
-
b && /* @__PURE__ */ o("div", { className: r(w), children: b }),
|
|
56
|
-
/* @__PURE__ */ S("div", { className: r("header"), children: [
|
|
57
|
-
/* @__PURE__ */ o(
|
|
58
|
-
"button",
|
|
59
|
-
{
|
|
60
|
-
"aria-label": "Previous Months",
|
|
61
|
-
disabled: n,
|
|
62
|
-
onClick: g,
|
|
63
|
-
className: r("button-prev", { disabled: n }),
|
|
64
|
-
children: /* @__PURE__ */ o(T, {})
|
|
65
|
-
}
|
|
66
|
-
),
|
|
67
|
-
/* @__PURE__ */ S("div", { className: r("dropdowns-wrapper"), children: [
|
|
68
|
-
/* @__PURE__ */ o(
|
|
69
|
-
P,
|
|
70
|
-
{
|
|
71
|
-
options: f,
|
|
72
|
-
value: C,
|
|
73
|
-
onChange: v,
|
|
74
|
-
transparentBackground: !0,
|
|
75
|
-
className: r("dropdown", "month-dropdown"),
|
|
76
|
-
toggleButtonClassName: r("toggle-button")
|
|
77
|
-
}
|
|
78
|
-
),
|
|
79
|
-
/* @__PURE__ */ o(
|
|
80
|
-
P,
|
|
81
|
-
{
|
|
82
|
-
options: N,
|
|
83
|
-
value: p,
|
|
84
|
-
onChange: y,
|
|
85
|
-
transparentBackground: !0,
|
|
86
|
-
className: r("dropdown"),
|
|
87
|
-
toggleButtonClassName: r("toggle-button")
|
|
88
|
-
}
|
|
89
|
-
)
|
|
90
|
-
] }),
|
|
91
|
-
/* @__PURE__ */ o(
|
|
92
|
-
"button",
|
|
93
|
-
{
|
|
94
|
-
"aria-label": "Next Months",
|
|
95
|
-
disabled: h,
|
|
96
|
-
onClick: e,
|
|
97
|
-
className: r("button-next", { disabled: h }),
|
|
98
|
-
children: /* @__PURE__ */ o(T, {})
|
|
99
|
-
}
|
|
100
|
-
)
|
|
101
|
-
] })
|
|
102
|
-
] });
|
|
103
|
-
}, J = "_calendar_1jr94_5", K = "_date_1jr94_90", Q = "_disabled_1jr94_202", X = "_popper_1jr94_210", Z = "_input_1jr94_214", ee = {
|
|
104
|
-
calendar: J,
|
|
105
|
-
"current-date": "_current-date_1jr94_89",
|
|
106
|
-
date: K,
|
|
107
|
-
"selected-range": "_selected-range_1jr94_119",
|
|
108
|
-
"end-date": "_end-date_1jr94_119",
|
|
109
|
-
disabled: Q,
|
|
110
|
-
popper: X,
|
|
111
|
-
input: Z
|
|
112
|
-
}, _ = Y.bind(ee), ne = "en", R = "MM-dd-yyyy", ie = ({
|
|
113
|
-
onChange: a = () => {
|
|
114
|
-
},
|
|
115
|
-
disabled: c = !1,
|
|
116
|
-
onBlur: l = () => {
|
|
117
|
-
},
|
|
118
|
-
onFocus: g = () => {
|
|
119
|
-
},
|
|
120
|
-
endDate: e = void 0,
|
|
121
|
-
startDate: n = void 0,
|
|
122
|
-
headerNodes: h = null,
|
|
123
|
-
customClassName: b = "",
|
|
124
|
-
customTimeInput: w = void 0,
|
|
125
|
-
shouldCloseOnSelect: i = !0,
|
|
126
|
-
popperClassName: x = "",
|
|
127
|
-
calendarClassName: p = "",
|
|
128
|
-
fixedHeight: C = !1,
|
|
129
|
-
language: f = ne,
|
|
130
|
-
yearsOptions: N = [],
|
|
131
|
-
placeholder: v = R.toUpperCase(),
|
|
132
|
-
dateFormat: y = R,
|
|
133
|
-
selects: t = "start",
|
|
134
|
-
value: s = null
|
|
135
|
-
}) => {
|
|
136
|
-
const d = B(null), F = n == null ? void 0 : n.toDateString(), m = e == null ? void 0 : e.toDateString(), j = e && n && e > n, A = (u) => {
|
|
137
|
-
const k = u.toDateString(), I = k === F, M = j && k === m, L = n && e && u > n && u < e;
|
|
138
|
-
return _("date", {
|
|
139
|
-
"current-date": I,
|
|
140
|
-
"selected-range": L && !M,
|
|
141
|
-
"end-date": M && j,
|
|
142
|
-
disabled: c
|
|
143
|
-
});
|
|
144
|
-
};
|
|
145
|
-
return /* @__PURE__ */ o(
|
|
146
|
-
$,
|
|
147
|
-
{
|
|
148
|
-
customInput: /* @__PURE__ */ o(
|
|
149
|
-
D,
|
|
150
|
-
{
|
|
151
|
-
className: _("input"),
|
|
152
|
-
defaultWidth: !1,
|
|
153
|
-
endIcon: /* @__PURE__ */ o(G, {}),
|
|
154
|
-
ref: d
|
|
155
|
-
}
|
|
156
|
-
),
|
|
157
|
-
placeholderText: v,
|
|
158
|
-
selected: s,
|
|
159
|
-
startDate: n,
|
|
160
|
-
endDate: e,
|
|
161
|
-
minDate: t === "end" ? n : void 0,
|
|
162
|
-
disabled: c,
|
|
163
|
-
shouldCloseOnSelect: i,
|
|
164
|
-
fixedHeight: C,
|
|
165
|
-
locale: f,
|
|
166
|
-
showPopperArrow: !1,
|
|
167
|
-
dayClassName: A,
|
|
168
|
-
calendarClassName: _(p, "calendar"),
|
|
169
|
-
renderCustomHeader: (u) => /* @__PURE__ */ o(
|
|
170
|
-
z,
|
|
171
|
-
{
|
|
172
|
-
...u,
|
|
173
|
-
headerNodes: h,
|
|
174
|
-
customClassName: b,
|
|
175
|
-
yearsOptions: N,
|
|
176
|
-
locale: f
|
|
177
|
-
}
|
|
178
|
-
),
|
|
179
|
-
onChange: a,
|
|
180
|
-
onBlur: l,
|
|
181
|
-
onFocus: g,
|
|
182
|
-
customTimeInput: w,
|
|
183
|
-
showTimeInput: !!w,
|
|
184
|
-
popperClassName: _(x, "popper"),
|
|
185
|
-
dateFormat: y,
|
|
186
|
-
selectsStart: t === "start",
|
|
187
|
-
selectsEnd: t === "end",
|
|
188
|
-
className: _("datepicker")
|
|
189
|
-
}
|
|
190
|
-
);
|
|
191
|
-
};
|
|
192
|
-
export {
|
|
193
|
-
ie as D
|
|
194
|
-
};
|
package/dist/datePicker1.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { D as t } from "./datePicker-68379fe1.js";
|
|
2
|
-
import "react/jsx-runtime";
|
|
3
|
-
import "react-datepicker";
|
|
4
|
-
import "./bind-06a7ff84.js";
|
|
5
|
-
import "react";
|
|
6
|
-
import "./fieldText-65e4c614.js";
|
|
7
|
-
import "./baseIconButton-b6adc843.js";
|
|
8
|
-
import "./calendar-f154eb78.js";
|
|
9
|
-
import "./dropdown-b9c6dc2f.js";
|
|
10
|
-
import "@floating-ui/react-dom";
|
|
11
|
-
import "downshift";
|
|
12
|
-
import "rc-scrollbars";
|
|
13
|
-
import "./useOnClickOutside-c332f7d3.js";
|
|
14
|
-
import "./keyCodes-f63c0e11.js";
|
|
15
|
-
import "./checkbox-9a6c7ce1.js";
|
|
16
|
-
export {
|
|
17
|
-
t as DatePicker1,
|
|
18
|
-
t as default
|
|
19
|
-
};
|