@danikokonn/yarik-frontend-lib 2.0.2-test3
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/LICENSE +201 -0
- package/README.md +1 -0
- package/dist/components/ActionDialog/ActionDialog.d.ts +23 -0
- package/dist/components/ActionDialog/ActionDialog.d.ts.map +1 -0
- package/dist/components/ActionDialog/ActionDialog.js +48 -0
- package/dist/components/ActionDialog/ActionDialogProps.d.ts +32 -0
- package/dist/components/ActionDialog/ActionDialogProps.d.ts.map +1 -0
- package/dist/components/ActionDialog/ActionDialogProps.js +1 -0
- package/dist/components/ActionDialog/index.d.ts +5 -0
- package/dist/components/ActionDialog/index.d.ts.map +1 -0
- package/dist/components/ActionDialog/index.js +3 -0
- package/dist/components/ColumnSearchInput/ColumnSearchInput.d.ts +16 -0
- package/dist/components/ColumnSearchInput/ColumnSearchInput.d.ts.map +1 -0
- package/dist/components/ColumnSearchInput/ColumnSearchInput.js +30 -0
- package/dist/components/ColumnSearchInput/ColumnSearchInputProps.d.ts +18 -0
- package/dist/components/ColumnSearchInput/ColumnSearchInputProps.d.ts.map +1 -0
- package/dist/components/ColumnSearchInput/ColumnSearchInputProps.js +1 -0
- package/dist/components/ColumnSearchInput/index.d.ts +5 -0
- package/dist/components/ColumnSearchInput/index.d.ts.map +1 -0
- package/dist/components/ColumnSearchInput/index.js +3 -0
- package/dist/components/DateTimeRangePicker/DateTimeRangePicker.d.ts +5 -0
- package/dist/components/DateTimeRangePicker/DateTimeRangePicker.d.ts.map +1 -0
- package/dist/components/DateTimeRangePicker/DateTimeRangePicker.js +51 -0
- package/dist/components/DateTimeRangePicker/DateTimeRangePickerProps.d.ts +11 -0
- package/dist/components/DateTimeRangePicker/DateTimeRangePickerProps.d.ts.map +1 -0
- package/dist/components/DateTimeRangePicker/DateTimeRangePickerProps.js +1 -0
- package/dist/components/DateTimeRangePicker/index.d.ts +5 -0
- package/dist/components/DateTimeRangePicker/index.d.ts.map +1 -0
- package/dist/components/DateTimeRangePicker/index.js +3 -0
- package/dist/components/DatetimeRangeInput/DatetimeRangeInput.d.ts +23 -0
- package/dist/components/DatetimeRangeInput/DatetimeRangeInput.d.ts.map +1 -0
- package/dist/components/DatetimeRangeInput/DatetimeRangeInput.js +80 -0
- package/dist/components/DatetimeRangeInput/DatetimeRangeInputProps.d.ts +43 -0
- package/dist/components/DatetimeRangeInput/DatetimeRangeInputProps.d.ts.map +1 -0
- package/dist/components/DatetimeRangeInput/DatetimeRangeInputProps.js +1 -0
- package/dist/components/DatetimeRangeInput/index.d.ts +5 -0
- package/dist/components/DatetimeRangeInput/index.d.ts.map +1 -0
- package/dist/components/DatetimeRangeInput/index.js +3 -0
- package/dist/components/Footer/Footer.d.ts +7 -0
- package/dist/components/Footer/Footer.d.ts.map +1 -0
- package/dist/components/Footer/Footer.js +22 -0
- package/dist/components/Footer/index.d.ts +3 -0
- package/dist/components/Footer/index.d.ts.map +1 -0
- package/dist/components/Footer/index.js +2 -0
- package/dist/components/IpAddressInput/IpAddressInput.d.ts +5 -0
- package/dist/components/IpAddressInput/IpAddressInput.d.ts.map +1 -0
- package/dist/components/IpAddressInput/IpAddressInput.js +21 -0
- package/dist/components/IpAddressInput/IpAddressInputProps.d.ts +13 -0
- package/dist/components/IpAddressInput/IpAddressInputProps.d.ts.map +1 -0
- package/dist/components/IpAddressInput/IpAddressInputProps.js +1 -0
- package/dist/components/IpAddressInput/index.d.ts +5 -0
- package/dist/components/IpAddressInput/index.d.ts.map +1 -0
- package/dist/components/IpAddressInput/index.js +3 -0
- package/dist/components/IpAddressSwitchableInput/IpAddressSwitchableInput.d.ts +5 -0
- package/dist/components/IpAddressSwitchableInput/IpAddressSwitchableInput.d.ts.map +1 -0
- package/dist/components/IpAddressSwitchableInput/IpAddressSwitchableInput.js +11 -0
- package/dist/components/IpAddressSwitchableInput/IpAddressSwitchableInputProps.d.ts +10 -0
- package/dist/components/IpAddressSwitchableInput/IpAddressSwitchableInputProps.d.ts.map +1 -0
- package/dist/components/IpAddressSwitchableInput/IpAddressSwitchableInputProps.js +1 -0
- package/dist/components/IpAddressSwitchableInput/index.d.ts +5 -0
- package/dist/components/IpAddressSwitchableInput/index.d.ts.map +1 -0
- package/dist/components/IpAddressSwitchableInput/index.js +3 -0
- package/dist/components/LocalizedDatetimePicker/LocalizedDatetimePicker.d.ts +5 -0
- package/dist/components/LocalizedDatetimePicker/LocalizedDatetimePicker.d.ts.map +1 -0
- package/dist/components/LocalizedDatetimePicker/LocalizedDatetimePicker.js +29 -0
- package/dist/components/LocalizedDatetimePicker/LocalizedDatetimePickerProps.d.ts +10 -0
- package/dist/components/LocalizedDatetimePicker/LocalizedDatetimePickerProps.d.ts.map +1 -0
- package/dist/components/LocalizedDatetimePicker/LocalizedDatetimePickerProps.js +1 -0
- package/dist/components/LocalizedDatetimePicker/index.d.ts +5 -0
- package/dist/components/LocalizedDatetimePicker/index.d.ts.map +1 -0
- package/dist/components/LocalizedDatetimePicker/index.js +3 -0
- package/dist/components/Navigation/NavMenu.d.ts +19 -0
- package/dist/components/Navigation/NavMenu.d.ts.map +1 -0
- package/dist/components/Navigation/NavMenu.js +44 -0
- package/dist/components/Navigation/Navigation.d.ts +4 -0
- package/dist/components/Navigation/Navigation.d.ts.map +1 -0
- package/dist/components/Navigation/Navigation.js +188 -0
- package/dist/components/Navigation/NavigationProps.d.ts +30 -0
- package/dist/components/Navigation/NavigationProps.d.ts.map +1 -0
- package/dist/components/Navigation/NavigationProps.js +1 -0
- package/dist/components/Navigation/index.d.ts +5 -0
- package/dist/components/Navigation/index.d.ts.map +1 -0
- package/dist/components/Navigation/index.js +3 -0
- package/dist/components/NumberRangeInput/NumberRangeInput.d.ts +5 -0
- package/dist/components/NumberRangeInput/NumberRangeInput.d.ts.map +1 -0
- package/dist/components/NumberRangeInput/NumberRangeInput.js +51 -0
- package/dist/components/NumberRangeInput/NumberRangeInputProps.d.ts +11 -0
- package/dist/components/NumberRangeInput/NumberRangeInputProps.d.ts.map +1 -0
- package/dist/components/NumberRangeInput/NumberRangeInputProps.js +1 -0
- package/dist/components/NumberRangeInput/index.d.ts +5 -0
- package/dist/components/NumberRangeInput/index.d.ts.map +1 -0
- package/dist/components/NumberRangeInput/index.js +3 -0
- package/dist/components/PageWrapper/PageWrapper.d.ts +4 -0
- package/dist/components/PageWrapper/PageWrapper.d.ts.map +1 -0
- package/dist/components/PageWrapper/PageWrapper.js +16 -0
- package/dist/components/PageWrapper/PageWrapperProps.d.ts +10 -0
- package/dist/components/PageWrapper/PageWrapperProps.d.ts.map +1 -0
- package/dist/components/PageWrapper/PageWrapperProps.js +1 -0
- package/dist/components/PageWrapper/index.d.ts +5 -0
- package/dist/components/PageWrapper/index.d.ts.map +1 -0
- package/dist/components/PageWrapper/index.js +3 -0
- package/dist/components/RichFilterTextField/FilterHistoryMenu.d.ts +8 -0
- package/dist/components/RichFilterTextField/FilterHistoryMenu.d.ts.map +1 -0
- package/dist/components/RichFilterTextField/FilterHistoryMenu.js +43 -0
- package/dist/components/RichFilterTextField/HintOptionsMenu.d.ts +12 -0
- package/dist/components/RichFilterTextField/HintOptionsMenu.d.ts.map +1 -0
- package/dist/components/RichFilterTextField/HintOptionsMenu.js +50 -0
- package/dist/components/RichFilterTextField/RichFilterTextField.d.ts +5 -0
- package/dist/components/RichFilterTextField/RichFilterTextField.d.ts.map +1 -0
- package/dist/components/RichFilterTextField/RichFilterTextField.js +177 -0
- package/dist/components/RichFilterTextField/RichFilterTextFieldProps.d.ts +71 -0
- package/dist/components/RichFilterTextField/RichFilterTextFieldProps.d.ts.map +1 -0
- package/dist/components/RichFilterTextField/RichFilterTextFieldProps.js +1 -0
- package/dist/components/RichFilterTextField/index.d.ts +5 -0
- package/dist/components/RichFilterTextField/index.d.ts.map +1 -0
- package/dist/components/RichFilterTextField/index.js +3 -0
- package/dist/components/RichFilterTextField/utils.d.ts +7 -0
- package/dist/components/RichFilterTextField/utils.d.ts.map +1 -0
- package/dist/components/RichFilterTextField/utils.js +131 -0
- package/dist/components/SmartTable/RowContent.d.ts +14 -0
- package/dist/components/SmartTable/RowContent.d.ts.map +1 -0
- package/dist/components/SmartTable/RowContent.js +29 -0
- package/dist/components/SmartTable/RuleRow.d.ts +22 -0
- package/dist/components/SmartTable/RuleRow.d.ts.map +1 -0
- package/dist/components/SmartTable/RuleRow.js +35 -0
- package/dist/components/SmartTable/SmartTable.d.ts +4 -0
- package/dist/components/SmartTable/SmartTable.d.ts.map +1 -0
- package/dist/components/SmartTable/SmartTable.js +175 -0
- package/dist/components/SmartTable/SmartTableProps.d.ts +40 -0
- package/dist/components/SmartTable/SmartTableProps.d.ts.map +1 -0
- package/dist/components/SmartTable/SmartTableProps.js +1 -0
- package/dist/components/SmartTable/TableHeader.d.ts +5 -0
- package/dist/components/SmartTable/TableHeader.d.ts.map +1 -0
- package/dist/components/SmartTable/TableHeader.js +13 -0
- package/dist/components/SmartTable/index.d.ts +5 -0
- package/dist/components/SmartTable/index.d.ts.map +1 -0
- package/dist/components/SmartTable/index.js +3 -0
- package/dist/components/SortBtn/SortBtn.d.ts +4 -0
- package/dist/components/SortBtn/SortBtn.d.ts.map +1 -0
- package/dist/components/SortBtn/SortBtn.js +23 -0
- package/dist/components/SortBtn/SortBtnProps.d.ts +7 -0
- package/dist/components/SortBtn/SortBtnProps.d.ts.map +1 -0
- package/dist/components/SortBtn/SortBtnProps.js +1 -0
- package/dist/components/SortBtn/index.d.ts +5 -0
- package/dist/components/SortBtn/index.d.ts.map +1 -0
- package/dist/components/SortBtn/index.js +3 -0
- package/dist/components/SubtaskItem/SubtaskItem.d.ts +4 -0
- package/dist/components/SubtaskItem/SubtaskItem.d.ts.map +1 -0
- package/dist/components/SubtaskItem/SubtaskItem.js +66 -0
- package/dist/components/SubtaskItem/SubtaskItemProps.d.ts +10 -0
- package/dist/components/SubtaskItem/SubtaskItemProps.d.ts.map +1 -0
- package/dist/components/SubtaskItem/SubtaskItemProps.js +1 -0
- package/dist/components/SubtaskItem/index.d.ts +5 -0
- package/dist/components/SubtaskItem/index.d.ts.map +1 -0
- package/dist/components/SubtaskItem/index.js +3 -0
- package/dist/components/TaskLoader/TaskLoader.d.ts +4 -0
- package/dist/components/TaskLoader/TaskLoader.d.ts.map +1 -0
- package/dist/components/TaskLoader/TaskLoader.js +333 -0
- package/dist/components/TaskLoader/TaskLoaderProps.d.ts +5 -0
- package/dist/components/TaskLoader/TaskLoaderProps.d.ts.map +1 -0
- package/dist/components/TaskLoader/TaskLoaderProps.js +1 -0
- package/dist/components/TaskLoader/index.d.ts +5 -0
- package/dist/components/TaskLoader/index.d.ts.map +1 -0
- package/dist/components/TaskLoader/index.js +3 -0
- package/dist/components/TaskStateDialog/TaskStateDialog.d.ts +4 -0
- package/dist/components/TaskStateDialog/TaskStateDialog.d.ts.map +1 -0
- package/dist/components/TaskStateDialog/TaskStateDialog.js +106 -0
- package/dist/components/TaskStateDialog/TaskStateDialogProps.d.ts +18 -0
- package/dist/components/TaskStateDialog/TaskStateDialogProps.d.ts.map +1 -0
- package/dist/components/TaskStateDialog/TaskStateDialogProps.js +1 -0
- package/dist/components/TaskStateDialog/index.d.ts +5 -0
- package/dist/components/TaskStateDialog/index.d.ts.map +1 -0
- package/dist/components/TaskStateDialog/index.js +3 -0
- package/dist/components/icons/GenerateAndRunIcon.d.ts +8 -0
- package/dist/components/icons/GenerateAndRunIcon.d.ts.map +1 -0
- package/dist/components/icons/GenerateAndRunIcon.js +29 -0
- package/dist/components/icons/GenerateIcon.d.ts +8 -0
- package/dist/components/icons/GenerateIcon.d.ts.map +1 -0
- package/dist/components/icons/GenerateIcon.js +27 -0
- package/dist/components/icons/IntegerIcon.d.ts +8 -0
- package/dist/components/icons/IntegerIcon.d.ts.map +1 -0
- package/dist/components/icons/IntegerIcon.js +15 -0
- package/dist/components/icons/ProcessingIcon.d.ts +3 -0
- package/dist/components/icons/ProcessingIcon.d.ts.map +1 -0
- package/dist/components/icons/ProcessingIcon.js +15 -0
- package/dist/components/icons/QueueIcon.d.ts +8 -0
- package/dist/components/icons/QueueIcon.d.ts.map +1 -0
- package/dist/components/icons/QueueIcon.js +15 -0
- package/dist/components/icons/RangeIcon.d.ts +8 -0
- package/dist/components/icons/RangeIcon.d.ts.map +1 -0
- package/dist/components/icons/RangeIcon.js +15 -0
- package/dist/components/icons/RunIcon.d.ts +8 -0
- package/dist/components/icons/RunIcon.d.ts.map +1 -0
- package/dist/components/icons/RunIcon.js +18 -0
- package/dist/components/icons/TextModeIcon.d.ts +5 -0
- package/dist/components/icons/TextModeIcon.d.ts.map +1 -0
- package/dist/components/icons/TextModeIcon.js +8 -0
- package/dist/components/icons/TreeModeIcon.d.ts +5 -0
- package/dist/components/icons/TreeModeIcon.d.ts.map +1 -0
- package/dist/components/icons/TreeModeIcon.js +8 -0
- package/dist/components/icons/index.d.ts +10 -0
- package/dist/components/icons/index.d.ts.map +1 -0
- package/dist/components/icons/index.js +9 -0
- package/dist/components/index.d.ts +36 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +35 -0
- package/dist/http.d.ts +25 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +101 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/providers/AirflowProvider.d.ts +14 -0
- package/dist/providers/AirflowProvider.d.ts.map +1 -0
- package/dist/providers/AirflowProvider.js +80 -0
- package/dist/providers/DagStateProvider.d.ts +25 -0
- package/dist/providers/DagStateProvider.d.ts.map +1 -0
- package/dist/providers/DagStateProvider.js +115 -0
- package/dist/providers/SessionProvider.d.ts +11 -0
- package/dist/providers/SessionProvider.d.ts.map +1 -0
- package/dist/providers/SessionProvider.js +37 -0
- package/dist/providers/SnackBarProvider.d.ts +10 -0
- package/dist/providers/SnackBarProvider.d.ts.map +1 -0
- package/dist/providers/SnackBarProvider.js +35 -0
- package/dist/providers/index.d.ts +9 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/index.js +8 -0
- package/dist/types.d.ts +80 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +1 -0
- package/dist/utils.d.ts +26 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +193 -0
- package/package.json +94 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import React, { lazy, Suspense, useRef, useState } from "react";
|
|
2
|
+
import moment from "moment-timezone";
|
|
3
|
+
import "moment/locale/ru";
|
|
4
|
+
import IconButton from "@mui/material/IconButton";
|
|
5
|
+
import DateRangeIcon from "@mui/icons-material/DateRange";
|
|
6
|
+
import Popover from "@mui/material/Popover";
|
|
7
|
+
import TextField from "@mui/material/TextField";
|
|
8
|
+
import ClearIcon from "@mui/icons-material/Clear";
|
|
9
|
+
const DateTimeRangePicker = lazy(() => import("../DateTimeRangePicker/DateTimeRangePicker"));
|
|
10
|
+
import { prettyDatetime } from "../../utils";
|
|
11
|
+
import { Skeleton, Stack } from "@mui/material";
|
|
12
|
+
/**
|
|
13
|
+
* Компонент выбора диапазона дат и времени.
|
|
14
|
+
*
|
|
15
|
+
* Позволяет пользователю выбрать начальную и конечную дату/время с помощью всплывающего календаря.
|
|
16
|
+
* Поддерживает очистку выбранного диапазона и отображение выбранных дат в текстовом поле.
|
|
17
|
+
*
|
|
18
|
+
* @param {Object} props - Свойства компонента
|
|
19
|
+
* @param {string} [props.from] - Начальная дата диапазона
|
|
20
|
+
* @param {string} [props.to] - Конечная дата диапазона
|
|
21
|
+
* @param {SxProps} [props.sx] - Стили оформления
|
|
22
|
+
* @param {boolean} [props.required] - Обязательное ли поле
|
|
23
|
+
* @param {boolean} [props.disabled] - Отключение компонента
|
|
24
|
+
* @param {('outlined'|'standard'|'filled')} [props.variant] - Вариант оформления поля
|
|
25
|
+
* @param {string} [props.placeholder] - Текст-подсказка
|
|
26
|
+
* @param {('small'|'medium')} [props.size] - Размер поля
|
|
27
|
+
* @param {(start: string, end: string) => void} props.onDateRangeSet - Колбэк при выборе диапазона дат
|
|
28
|
+
*
|
|
29
|
+
* @returns {JSX.Element} Элемент выбора диапазона дат и времени
|
|
30
|
+
*/
|
|
31
|
+
export default function DatetimeRangeInput({ onDateRangeSet, from, to, variant, sx, placeholder, size, disabled, required, }) {
|
|
32
|
+
const [datetimeRangePickerOpen, setDatetimeRangePickerOpen] = useState(false);
|
|
33
|
+
const [fromDatetime, setFromDatetime] = useState(from || "");
|
|
34
|
+
const [toDateTime, setToDatetime] = useState(to || "");
|
|
35
|
+
const dateRangePickerAnchor = useRef(null);
|
|
36
|
+
const datetimeRangeText = (fromDatetime.length > 0 ? `${prettyDatetime(fromDatetime)}` : "") +
|
|
37
|
+
(fromDatetime.length > 0 && toDateTime.length > 0 ? " — " : "") +
|
|
38
|
+
(toDateTime.length > 0 ? `${prettyDatetime(toDateTime)}` : "");
|
|
39
|
+
const rangeValid = fromDatetime &&
|
|
40
|
+
toDateTime &&
|
|
41
|
+
fromDatetime !== toDateTime &&
|
|
42
|
+
moment(fromDatetime) < moment(toDateTime);
|
|
43
|
+
return (React.createElement(React.Fragment, null,
|
|
44
|
+
React.createElement(TextField, { size: size, variant: variant || "standard", disabled: disabled, required: required, placeholder: variant === "outlined" ? undefined : placeholder, label: variant === "outlined" ? placeholder : undefined, slotProps: {
|
|
45
|
+
input: {
|
|
46
|
+
startAdornment: React.createElement(DateRangeIcon, null),
|
|
47
|
+
readOnly: true,
|
|
48
|
+
endAdornment: datetimeRangeText.length > 0 ? (React.createElement(IconButton, { onClick: (e) => {
|
|
49
|
+
setFromDatetime("");
|
|
50
|
+
setToDatetime("");
|
|
51
|
+
onDateRangeSet("", "");
|
|
52
|
+
e.stopPropagation();
|
|
53
|
+
} },
|
|
54
|
+
React.createElement(ClearIcon, { fontSize: "small" }))) : null,
|
|
55
|
+
},
|
|
56
|
+
}, error: required ? !rangeValid : false, title: required && !rangeValid
|
|
57
|
+
? "Некорректно введён диапазон дат"
|
|
58
|
+
: datetimeRangeText, value: datetimeRangeText, ref: dateRangePickerAnchor, onClick: () => setDatetimeRangePickerOpen(true), sx: sx }),
|
|
59
|
+
React.createElement(Popover, { open: datetimeRangePickerOpen, anchorEl: dateRangePickerAnchor.current, onClose: () => setDatetimeRangePickerOpen(false), anchorOrigin: {
|
|
60
|
+
vertical: "bottom",
|
|
61
|
+
horizontal: "left",
|
|
62
|
+
}, transformOrigin: {
|
|
63
|
+
vertical: "top",
|
|
64
|
+
horizontal: "left",
|
|
65
|
+
}, slotProps: {
|
|
66
|
+
paper: {
|
|
67
|
+
sx: { minWidth: "30rem" },
|
|
68
|
+
},
|
|
69
|
+
} },
|
|
70
|
+
React.createElement(Suspense, { fallback: React.createElement(Stack, { direction: "row", spacing: 2, sx: { m: 1 } },
|
|
71
|
+
React.createElement(Skeleton, { variant: "rounded", width: 231, height: 32, animation: "wave" }),
|
|
72
|
+
React.createElement(Skeleton, { variant: "rounded", width: 231, height: 32, animation: "wave" })) },
|
|
73
|
+
React.createElement(DateTimeRangePicker, { required: required, disableFuture: true, disabled: disabled, fromDatetime: fromDatetime, toDateTime: toDateTime, onStartDateSet: (s) => {
|
|
74
|
+
setFromDatetime(s);
|
|
75
|
+
onDateRangeSet(s, toDateTime);
|
|
76
|
+
}, onEndDateSet: (e) => {
|
|
77
|
+
setToDatetime(e);
|
|
78
|
+
onDateRangeSet(fromDatetime, e);
|
|
79
|
+
} })))));
|
|
80
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { SxProps } from "@mui/material";
|
|
2
|
+
/**
|
|
3
|
+
* Интерфейс для пропсов компонента выбора диапазона дат.
|
|
4
|
+
*/
|
|
5
|
+
export default interface DatetimeRangeInputProps {
|
|
6
|
+
/**
|
|
7
|
+
* Начальная дата диапазона (опционально).
|
|
8
|
+
*/
|
|
9
|
+
from?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Конечная дата диапазона (опционально).
|
|
12
|
+
*/
|
|
13
|
+
to?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Стили оформления компонента (опционально).
|
|
16
|
+
*/
|
|
17
|
+
sx?: SxProps;
|
|
18
|
+
/**
|
|
19
|
+
* Обязательное ли заполнение поля (опционально).
|
|
20
|
+
*/
|
|
21
|
+
required?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Отключение компонента (опционально).
|
|
24
|
+
*/
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Вариант оформления поля: outlined, standard или filled (опционально).
|
|
28
|
+
*/
|
|
29
|
+
variant?: "outlined" | "standard" | "filled";
|
|
30
|
+
/**
|
|
31
|
+
* Текст-подсказка (placeholder) (опционально).
|
|
32
|
+
*/
|
|
33
|
+
placeholder?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Размер поля: small или medium (опционально).
|
|
36
|
+
*/
|
|
37
|
+
size?: "small" | "medium";
|
|
38
|
+
/**
|
|
39
|
+
* Колбэк, вызываемый при выборе диапазона дат. Принимает начальную и конечную дату.
|
|
40
|
+
*/
|
|
41
|
+
onDateRangeSet(start: string, end: string): void;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=DatetimeRangeInputProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatetimeRangeInputProps.d.ts","sourceRoot":"","sources":["../../../src/components/DatetimeRangeInput/DatetimeRangeInputProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC;;GAEG;AACH,MAAM,CAAC,OAAO,WAAW,uBAAuB;IAC9C;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,EAAE,CAAC,EAAE,OAAO,CAAC;IACb;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,QAAQ,CAAC;IAC7C;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1B;;OAEG;IACH,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CAClD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DatetimeRangeInput/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,cAAc,sBAAsB,CAAC;AAErC,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,cAAc,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Footer.d.ts","sourceRoot":"","sources":["../../../src/components/Footer/Footer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAC7B,OAAO,EACP,OAAO,EACP,IAAI,GACL,EAAE;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAG,MAAM,CAAC;CAChB,qBAsBA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Typography from "@mui/material/Typography";
|
|
3
|
+
import { useTheme } from "@mui/material";
|
|
4
|
+
export default function Footer({ version, appName, desc, }) {
|
|
5
|
+
const theme = useTheme();
|
|
6
|
+
return (React.createElement("footer", { style: {
|
|
7
|
+
padding: "0.5rem 1rem",
|
|
8
|
+
display: "flex",
|
|
9
|
+
justifyContent: "space-between",
|
|
10
|
+
alignItems: "center",
|
|
11
|
+
flexWrap: "wrap",
|
|
12
|
+
boxShadow: theme.shadows[5],
|
|
13
|
+
} },
|
|
14
|
+
React.createElement(Typography, { sx: { marginLeft: "auto", fontSize: "1rem" } },
|
|
15
|
+
"\u00A9",
|
|
16
|
+
React.createElement("a", { target: "_blank", href: "" },
|
|
17
|
+
appName,
|
|
18
|
+
" ",
|
|
19
|
+
version),
|
|
20
|
+
" ",
|
|
21
|
+
desc && `— ${desc}.`)));
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Footer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import IpAddressInputProps from "./IpAddressInputProps";
|
|
3
|
+
declare const IpAddressInput: ({ value, ipV, variant, label, size, disabled, required, startAdorment, onChange, }: IpAddressInputProps) => React.JSX.Element;
|
|
4
|
+
export default IpAddressInput;
|
|
5
|
+
//# sourceMappingURL=IpAddressInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IpAddressInput.d.ts","sourceRoot":"","sources":["../../../src/components/IpAddressInput/IpAddressInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AA8BxD,QAAA,MAAM,cAAc,GAAI,oFAUrB,mBAAmB,sBAiCrB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import FormControl from "@mui/material/FormControl";
|
|
3
|
+
import InputLabel from "@mui/material/InputLabel";
|
|
4
|
+
import OutlinedInput from "@mui/material/OutlinedInput";
|
|
5
|
+
import { IMaskInput } from "react-imask";
|
|
6
|
+
import { InputAdornment } from "@mui/material";
|
|
7
|
+
const CustomIpMask = React.forwardRef(function TextMaskCustom(props, ref) {
|
|
8
|
+
const { onChange, ipV, ...other } = props;
|
|
9
|
+
return (React.createElement(IMaskInput, { ...other, mask: ipV === "6"
|
|
10
|
+
? "#[###]:#[###]:#[###]:#[###]:#[###]:#[###]:#[###]:#[###]"
|
|
11
|
+
: "0[00].0[00].0[00].0[00]", definitions: { "#": /[0-9a-fA-F]/ }, inputRef: ref, onAccept: (value) => onChange({ target: { name: props.name, value } }), overwrite: true }));
|
|
12
|
+
});
|
|
13
|
+
const IpAddressInput = ({ value, ipV, variant, label, size, disabled, required, startAdorment, onChange, }) => {
|
|
14
|
+
const ipRegex = ipV === "6"
|
|
15
|
+
? /(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))/
|
|
16
|
+
: /^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}$/;
|
|
17
|
+
return (React.createElement(FormControl, { required: required, disabled: disabled, size: size || "medium", variant: variant || "outlined", error: !ipRegex.test(value), sx: { width: ipV === "6" ? "28rem" : "14rem" } },
|
|
18
|
+
React.createElement(InputLabel, { htmlFor: "formatted-text-mask-input" }, label),
|
|
19
|
+
React.createElement(OutlinedInput, { autoComplete: "off", title: !ipRegex.test(value) ? "IP-адрес не корректный" : "", value: value, label: label, onChange: (e) => onChange(e.target.value), name: "ipmask", id: "formatted-text-mask-input", inputComponent: CustomIpMask, inputProps: { ipV: ipV }, startAdornment: startAdorment && (React.createElement(InputAdornment, { position: "start" }, startAdorment)) })));
|
|
20
|
+
};
|
|
21
|
+
export default IpAddressInput;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export default interface IpAddressInputProps {
|
|
3
|
+
value: string;
|
|
4
|
+
variant?: "outlined" | "standard" | "filled";
|
|
5
|
+
ipV?: "4" | "6";
|
|
6
|
+
size?: "small" | "medium";
|
|
7
|
+
label?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
required?: boolean;
|
|
10
|
+
startAdorment?: React.JSX.Element;
|
|
11
|
+
onChange(value: string): void;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=IpAddressInputProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IpAddressInputProps.d.ts","sourceRoot":"","sources":["../../../src/components/IpAddressInput/IpAddressInputProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,CAAC,OAAO,WAAW,mBAAmB;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,QAAQ,CAAC;IAC7C,GAAG,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/IpAddressInput/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,cAAc,kBAAkB,CAAC;AAEjC,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACvE,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import IpAddressSwitchableInputProps from "./IpAddressSwitchableInputProps";
|
|
3
|
+
declare const IpAddressSwitchableInput: ({ ...rest }: IpAddressSwitchableInputProps) => React.JSX.Element;
|
|
4
|
+
export default IpAddressSwitchableInput;
|
|
5
|
+
//# sourceMappingURL=IpAddressSwitchableInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IpAddressSwitchableInput.d.ts","sourceRoot":"","sources":["../../../src/components/IpAddressSwitchableInput/IpAddressSwitchableInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,6BAA6B,MAAM,iCAAiC,CAAC;AAG5E,QAAA,MAAM,wBAAwB,GAAI,aAE/B,6BAA6B,sBAyB/B,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import IpAddressInput from "../IpAddressInput/IpAddressInput";
|
|
3
|
+
import { Button } from "@mui/material";
|
|
4
|
+
const IpAddressSwitchableInput = ({ ...rest }) => {
|
|
5
|
+
const bestMode = /(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))/.test(rest.value)
|
|
6
|
+
? "6"
|
|
7
|
+
: "4";
|
|
8
|
+
const [mode, setMode] = React.useState(bestMode);
|
|
9
|
+
return (React.createElement(IpAddressInput, { ...rest, ipV: mode, startAdorment: React.createElement(Button, { title: "\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0432\u0435\u0440\u0441\u0438\u044E IP-\u0430\u0434\u0440\u0435\u0441\u0430", variant: "text", sx: { textTransform: "none" }, onClick: () => setMode(mode === "6" ? "4" : "6") }, mode === "6" ? "IPv6" : "IPv4") }));
|
|
10
|
+
};
|
|
11
|
+
export default IpAddressSwitchableInput;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export default interface IpAddressSwitchableInputProps {
|
|
2
|
+
value: string;
|
|
3
|
+
variant?: "outlined" | "standard" | "filled";
|
|
4
|
+
size?: "small" | "medium";
|
|
5
|
+
label?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
onChange(value: string): void;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=IpAddressSwitchableInputProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IpAddressSwitchableInputProps.d.ts","sourceRoot":"","sources":["../../../src/components/IpAddressSwitchableInput/IpAddressSwitchableInputProps.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,WAAW,6BAA6B;IACpD,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,QAAQ,CAAC;IAC7C,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default } from "./IpAddressSwitchableInput";
|
|
2
|
+
export * from "./IpAddressSwitchableInput";
|
|
3
|
+
export { default as IpAddressSwitchableInputProps } from "./IpAddressSwitchableInputProps";
|
|
4
|
+
export * from "./IpAddressSwitchableInputProps";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/IpAddressSwitchableInput/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,cAAc,4BAA4B,CAAC;AAE3C,OAAO,EAAE,OAAO,IAAI,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAC3F,cAAc,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "moment/locale/ru";
|
|
3
|
+
import LocalizedDatetimePickerProps from "./LocalizedDatetimePickerProps";
|
|
4
|
+
export default function LocalizedDateTimePicker({ disableFuture, disabled, value, required, variant, size, onChange, }: LocalizedDatetimePickerProps): React.JSX.Element;
|
|
5
|
+
//# sourceMappingURL=LocalizedDatetimePicker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocalizedDatetimePicker.d.ts","sourceRoot":"","sources":["../../../src/components/LocalizedDatetimePicker/LocalizedDatetimePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,kBAAkB,CAAC;AAS1B,OAAO,4BAA4B,MAAM,gCAAgC,CAAC;AAE1E,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAC,EAC9C,aAAa,EACb,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,QAAQ,GACT,EAAE,4BAA4B,qBA6C9B"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import moment from "moment-timezone";
|
|
3
|
+
import "moment/locale/ru";
|
|
4
|
+
import { DesktopDateTimePicker, LocalizationProvider, } from "@mui/x-date-pickers";
|
|
5
|
+
import { AdapterMoment } from "@mui/x-date-pickers/AdapterMoment";
|
|
6
|
+
import { useDebounce } from "../../utils";
|
|
7
|
+
export default function LocalizedDateTimePicker({ disableFuture, disabled, value, required, variant, size, onChange, }) {
|
|
8
|
+
const [open, setOpen] = useState(false);
|
|
9
|
+
const datetime = value?.length > 0 ? moment(value) : null;
|
|
10
|
+
return (React.createElement(LocalizationProvider, { dateAdapter: AdapterMoment, adapterLocale: "ru", dateLibInstance: moment },
|
|
11
|
+
React.createElement(DesktopDateTimePicker, { disabled: disabled, open: open, reduceAnimations: true, onChange: useDebounce((v, _c) => {
|
|
12
|
+
onChange((v && v.toISOString(true)) || "");
|
|
13
|
+
}, 200), disableFuture: disableFuture, views: ["year", "month", "day", "hours", "minutes", "seconds"], timezone: "Europe/Moscow", ampm: false, ampmInClock: false, value: datetime, timeSteps: { hours: 1, minutes: 1, seconds: 1 }, slotProps: {
|
|
14
|
+
field: {
|
|
15
|
+
clearable: true,
|
|
16
|
+
},
|
|
17
|
+
textField: {
|
|
18
|
+
label: "Дата и время",
|
|
19
|
+
variant: variant,
|
|
20
|
+
required: required,
|
|
21
|
+
size: size,
|
|
22
|
+
error: required ? datetime == null : false,
|
|
23
|
+
},
|
|
24
|
+
inputAdornment: {
|
|
25
|
+
position: "start",
|
|
26
|
+
onClick: () => setOpen(true),
|
|
27
|
+
},
|
|
28
|
+
}, onClose: () => setOpen(false) })));
|
|
29
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export default interface LocalizedDatetimePickerProps {
|
|
2
|
+
disableFuture?: boolean;
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
value: string;
|
|
5
|
+
required?: boolean;
|
|
6
|
+
variant?: "standard" | "outlined";
|
|
7
|
+
size?: "medium" | "small";
|
|
8
|
+
onChange(value: string): void;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=LocalizedDatetimePickerProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocalizedDatetimePickerProps.d.ts","sourceRoot":"","sources":["../../../src/components/LocalizedDatetimePicker/LocalizedDatetimePickerProps.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,WAAW,4BAA4B;IACnD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;IAClC,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default } from "./LocalizedDatetimePicker";
|
|
2
|
+
export * from "./LocalizedDatetimePicker";
|
|
3
|
+
export { default as LocalizedDatetimePickerProps } from "./LocalizedDatetimePickerProps";
|
|
4
|
+
export * from "./LocalizedDatetimePickerProps";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/LocalizedDatetimePicker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACpD,cAAc,2BAA2B,CAAC;AAE1C,OAAO,EAAE,OAAO,IAAI,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AACzF,cAAc,gCAAgC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
import { PopoverOrigin } from "@mui/material/Popover";
|
|
3
|
+
import { SxProps, Theme } from "@mui/material";
|
|
4
|
+
interface NavMenuProps {
|
|
5
|
+
name: string;
|
|
6
|
+
routes: {
|
|
7
|
+
url: string;
|
|
8
|
+
name: string;
|
|
9
|
+
targetBlank?: boolean;
|
|
10
|
+
}[];
|
|
11
|
+
activeTab: string;
|
|
12
|
+
sx: SxProps<Theme>;
|
|
13
|
+
anchorOrigin: PopoverOrigin;
|
|
14
|
+
transformOrigin: PopoverOrigin;
|
|
15
|
+
endIcon: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
export default function NavMenu({ name, activeTab, routes, sx, anchorOrigin, transformOrigin, endIcon, }: NavMenuProps): React.JSX.Element;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=NavMenu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavMenu.d.ts","sourceRoot":"","sources":["../../../src/components/Navigation/NavMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMzC,OAAO,EAAkB,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE/C,UAAU,YAAY;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE;QACN,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,OAAO,CAAC;KACvB,EAAE,CAAC;IACJ,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACnB,YAAY,EAAE,aAAa,CAAC;IAC5B,eAAe,EAAE,aAAa,CAAC;IAC/B,OAAO,EAAE,SAAS,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAC9B,IAAI,EACJ,SAAS,EACT,MAAM,EACN,EAAE,EACF,YAAY,EACZ,eAAe,EACf,OAAO,GACR,EAAE,YAAY,qBA2Ed"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Button from "@mui/material/Button";
|
|
3
|
+
import Link from "@mui/material/Link";
|
|
4
|
+
import Menu from "@mui/material/Menu";
|
|
5
|
+
import MenuItem from "@mui/material/MenuItem";
|
|
6
|
+
import { popoverClasses } from "@mui/material/Popover";
|
|
7
|
+
import OpenInNewIcon from "@mui/icons-material/OpenInNew";
|
|
8
|
+
export default function NavMenu({ name, activeTab, routes, sx, anchorOrigin, transformOrigin, endIcon, }) {
|
|
9
|
+
const [anchorEl, setAnchorEl] = React.useState(null);
|
|
10
|
+
let currentlyHovering = false;
|
|
11
|
+
const open = anchorEl != null;
|
|
12
|
+
function handleCloseHover() {
|
|
13
|
+
currentlyHovering = false;
|
|
14
|
+
setTimeout(() => {
|
|
15
|
+
if (!currentlyHovering) {
|
|
16
|
+
setAnchorEl(null);
|
|
17
|
+
}
|
|
18
|
+
}, 50);
|
|
19
|
+
}
|
|
20
|
+
return (React.createElement(React.Fragment, null,
|
|
21
|
+
React.createElement(Button, { id: `navTabName-${name}`, color: "inherit", variant: "text", sx: {
|
|
22
|
+
"& .MuiButton-endIcon": {
|
|
23
|
+
ml: 0,
|
|
24
|
+
},
|
|
25
|
+
...sx,
|
|
26
|
+
}, onClick: (e) => {
|
|
27
|
+
if (anchorEl !== e.currentTarget)
|
|
28
|
+
setAnchorEl(e.currentTarget);
|
|
29
|
+
}, onMouseOver: (e) => {
|
|
30
|
+
if (anchorEl !== e.currentTarget)
|
|
31
|
+
setAnchorEl(e.currentTarget);
|
|
32
|
+
}, onMouseLeave: handleCloseHover, endIcon: endIcon }, name),
|
|
33
|
+
React.createElement(Menu, { autoFocus: false, open: open, anchorEl: anchorEl, onClose: () => setAnchorEl(null), slotProps: {
|
|
34
|
+
list: {
|
|
35
|
+
onMouseEnter: () => (currentlyHovering = true),
|
|
36
|
+
onMouseLeave: handleCloseHover,
|
|
37
|
+
style: { pointerEvents: "auto" },
|
|
38
|
+
},
|
|
39
|
+
}, sx: { [`&.${popoverClasses.root}`]: { pointerEvents: "none" } }, elevation: 0, anchorOrigin: anchorOrigin, transformOrigin: transformOrigin }, routes.map((route, idx) => (React.createElement(MenuItem, { key: idx, disabled: route.url === activeTab, sx: { p: 0 } },
|
|
40
|
+
React.createElement(Link, { href: route.url, underline: "none", color: "inherit", sx: { px: "1rem", py: "0.5rem", width: "-webkit-fill-available" }, target: route.targetBlank ? "_blank" : undefined, rel: route.targetBlank ? "noopener noreferrer" : undefined },
|
|
41
|
+
route.name,
|
|
42
|
+
" ",
|
|
43
|
+
route.targetBlank && (React.createElement(OpenInNewIcon, { fontSize: "small", color: "primary" })))))))));
|
|
44
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import NavigationProps from "./NavigationProps";
|
|
3
|
+
export default function Navigation({ activeTab, additionalControls, username, title, navLinks, logoutPageUrl, defautlUrl, appsUrl, profileUrl, }: NavigationProps): React.JSX.Element;
|
|
4
|
+
//# sourceMappingURL=Navigation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Navigation.d.ts","sourceRoot":"","sources":["../../../src/components/Navigation/Navigation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AA0BzC,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAGhD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,SAAS,EACT,kBAAkB,EAClB,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,aAAa,EACb,UAAU,EACV,OAAO,EACP,UAAU,GACX,EAAE,eAAe,qBAuUjB"}
|