kwant-ui 3.38.2 → 3.39.0
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/Calendar/CalendarComponents.d.ts +2 -7
- package/dist/components/Calendar/CalendarStyled.d.ts +4 -2
- package/dist/components/Calendar/CalendarTypes.d.ts +34 -2
- package/dist/components/Calendar/CalendarUtils.d.ts +6 -1
- package/dist/components/Datepicker/DatepickerStyled.d.ts +4 -1
- package/dist/components/Datepicker/types.d.ts +28 -0
- package/dist/components/Datepicker/utils/index.d.ts +29 -1
- package/dist/components/Dropdown/DropdownStyled.d.ts +3 -1
- package/dist/components/HorizontalStepper/index.d.ts +2 -1
- package/dist/components/Selector/Selector.d.ts +1 -1
- package/dist/components/Selector/types.d.ts +10 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useTimeBar.d.ts +29 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +300 -274
- package/dist/index.js +300 -274
- package/dist/package.json +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DateObject } from 'react-multi-date-picker';
|
|
2
|
-
import { ICalendar } from './CalendarTypes';
|
|
2
|
+
import { CalendarTimeBarProps, ICalendar } from './CalendarTypes';
|
|
3
3
|
export type SidebarOptionProps = ICalendar.SidebarOptionProps;
|
|
4
4
|
export declare const SidebarOption: ({ title, selected, onClick }: SidebarOptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export declare const CalendarSidebar: ({ options, selectedOption, onOptionClick, }: {
|
|
@@ -7,10 +7,5 @@ export declare const CalendarSidebar: ({ options, selectedOption, onOptionClick,
|
|
|
7
7
|
selectedOption: string;
|
|
8
8
|
onOptionClick?: (value: () => DateObject[], option?: Pick<SidebarOptionProps, 'title' | 'selected' | 'value'>) => void;
|
|
9
9
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export declare const CalendarTimeBar: ({ label, timeHour, timeMinute, clockType, }:
|
|
11
|
-
label?: string;
|
|
12
|
-
timeHour?: string;
|
|
13
|
-
timeMinute?: string;
|
|
14
|
-
clockType?: ICalendar.ClockType | string;
|
|
15
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const CalendarTimeBar: ({ label, timeHour, timeMinute, clockType, disabled, onClockTypeChange, onHourChange, onMinuteChange, }: CalendarTimeBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
11
|
export declare const renderDatepickerNavigationButton: (direction: ICalendar.DatpickerNavigationDirection, handleClick: (event: React.MouseEvent<HTMLButtonElement>) => void) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -30,10 +30,12 @@ export declare const StyledInput: import("styled-components").StyledComponent<im
|
|
|
30
30
|
} & import("react").RefAttributes<HTMLInputElement>>, any, {}, never>;
|
|
31
31
|
export declare const Colon: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
32
32
|
export declare const InputGroup: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
33
|
-
export declare const SelectorStyled: import("styled-components").StyledComponent<({ content, activeKey, onClick, height }: import("../Selector/types").SelectorComponent.Props) => import("react/jsx-runtime").JSX.Element, any, {}, never>;
|
|
33
|
+
export declare const SelectorStyled: import("styled-components").StyledComponent<({ content, activeKey, onClick, height, multiple, disabled, }: import("../Selector/types").SelectorComponent.Props) => import("react/jsx-runtime").JSX.Element, any, {}, never>;
|
|
34
34
|
export declare const TimeBarContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
35
35
|
export declare const TopLabel: import("styled-components").StyledComponent<"label", any, import("../Label/types").LabelComponent.Label, never>;
|
|
36
|
-
export declare const TimeBarStyled: import("styled-components").StyledComponent<"div", any, {
|
|
36
|
+
export declare const TimeBarStyled: import("styled-components").StyledComponent<"div", any, {
|
|
37
|
+
showTime?: boolean;
|
|
38
|
+
}, never>;
|
|
37
39
|
declare const DatepickerNavigationButton: import("styled-components").StyledComponent<"button", any, {}, never>;
|
|
38
40
|
declare const IconWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
39
41
|
export { DatepickerNavigationButton, IconWrapper };
|
|
@@ -6,17 +6,32 @@ export declare namespace ICalendar {
|
|
|
6
6
|
type Props = CalendarProps & {
|
|
7
7
|
range?: boolean;
|
|
8
8
|
numberOfMonths?: number;
|
|
9
|
-
timeHour?: number;
|
|
10
|
-
timeMinute?: number;
|
|
11
9
|
calenderRef?: any;
|
|
12
10
|
labels?: string;
|
|
13
11
|
showSidebar?: boolean;
|
|
14
12
|
showTime?: boolean;
|
|
13
|
+
disableTime?: boolean;
|
|
14
|
+
time?: {
|
|
15
|
+
from: {
|
|
16
|
+
hour: string;
|
|
17
|
+
minute: string;
|
|
18
|
+
clockType: ClockType;
|
|
19
|
+
};
|
|
20
|
+
to: {
|
|
21
|
+
hour: string;
|
|
22
|
+
minute: string;
|
|
23
|
+
clockType: ClockType;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
onHourChange?: (key: string, value: string) => void;
|
|
27
|
+
onMinuteChange?: (key: string, value: string) => void;
|
|
28
|
+
onClockTypeChange?: (key: string, value: string) => void;
|
|
15
29
|
sidebarOptions?: Omit<SidebarOptionProps, 'onClick'>[];
|
|
16
30
|
projectDuration?: ProjectDuration;
|
|
17
31
|
disableFutureDatesOnCustomRange?: boolean;
|
|
18
32
|
selectedSidebarOption?: string;
|
|
19
33
|
rangeDomain?: RangeDomain;
|
|
34
|
+
onSidebarOptionSelect?: (value: string) => void;
|
|
20
35
|
onChange?: (date: DateObject | DateObject[], selectedOption?: string) => void;
|
|
21
36
|
};
|
|
22
37
|
type ClockType = 'am' | 'pm';
|
|
@@ -40,4 +55,21 @@ export declare namespace ICalendar {
|
|
|
40
55
|
value?: () => DateObject[];
|
|
41
56
|
onClick?: () => void;
|
|
42
57
|
};
|
|
58
|
+
type Time = {
|
|
59
|
+
key: string;
|
|
60
|
+
label: string;
|
|
61
|
+
timeHour: string;
|
|
62
|
+
timeMinute: string;
|
|
63
|
+
clockType: string;
|
|
64
|
+
};
|
|
43
65
|
}
|
|
66
|
+
export type CalendarTimeBarProps = {
|
|
67
|
+
label?: string;
|
|
68
|
+
timeHour?: string;
|
|
69
|
+
timeMinute?: string;
|
|
70
|
+
clockType?: ICalendar.ClockType | string;
|
|
71
|
+
disabled?: boolean;
|
|
72
|
+
onHourChange: (key: string, value: string) => void;
|
|
73
|
+
onMinuteChange: (key: string, value: string) => void;
|
|
74
|
+
onClockTypeChange: (key: string, value: string) => void;
|
|
75
|
+
};
|
|
@@ -32,4 +32,9 @@ export declare const getSidebarOptions: (projectDuration?: ICalendar.ProjectDura
|
|
|
32
32
|
}[];
|
|
33
33
|
declare const getDateOffset: (valueArr: Value, domain: RangeDomain) => DateObject[];
|
|
34
34
|
declare const isNotInCurrentMonth: (date: string | DateObject) => boolean;
|
|
35
|
-
|
|
35
|
+
declare const timeSet: {
|
|
36
|
+
key: string;
|
|
37
|
+
label: string;
|
|
38
|
+
}[];
|
|
39
|
+
declare const addPadStart: (value: string) => string;
|
|
40
|
+
export { fullMonthsText, regexInputValidate, weeks, getDateOffset, isNotInCurrentMonth, timeSet, addPadStart, };
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
declare const DatepickerWrapper: import("styled-components").StyledComponent<"div", any, {
|
|
2
|
+
showTime?: boolean;
|
|
3
|
+
}, never>;
|
|
1
4
|
declare const DatepickerNavigationButton: import("styled-components").StyledComponent<"button", any, {}, never>;
|
|
2
5
|
declare const IconWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
-
export { DatepickerNavigationButton, IconWrapper };
|
|
6
|
+
export { DatepickerNavigationButton, IconWrapper, DatepickerWrapper };
|
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
import { CalendarProps, DatePickerProps } from 'react-multi-date-picker';
|
|
3
3
|
import { InputComponent } from '../Input/types';
|
|
4
4
|
export declare namespace IDatepicker {
|
|
5
|
+
type ClockType = 'am' | 'pm';
|
|
6
|
+
enum ClockTypeEnum {
|
|
7
|
+
am = "am",
|
|
8
|
+
pm = "pm"
|
|
9
|
+
}
|
|
5
10
|
type Props = CalendarProps & DatePickerProps & {
|
|
6
11
|
range?: boolean;
|
|
7
12
|
numberOfMonths?: number;
|
|
@@ -12,6 +17,9 @@ export declare namespace IDatepicker {
|
|
|
12
17
|
calendarRef?: any;
|
|
13
18
|
inputProps?: InputComponent.Props;
|
|
14
19
|
dateFormat?: string;
|
|
20
|
+
showTime?: boolean;
|
|
21
|
+
dateTimeRange?: DateRangeType;
|
|
22
|
+
onChangeDateTime?: (time: DateRangeType) => void;
|
|
15
23
|
};
|
|
16
24
|
enum DatpickerNavigationDirectionEnum {
|
|
17
25
|
right = "right",
|
|
@@ -19,4 +27,24 @@ export declare namespace IDatepicker {
|
|
|
19
27
|
}
|
|
20
28
|
type InputChangeEvent = React.ChangeEvent<HTMLInputElement>;
|
|
21
29
|
type DatpickerNavigationDirection = keyof typeof DatpickerNavigationDirectionEnum;
|
|
30
|
+
type DateRangeType = {
|
|
31
|
+
startDate: string;
|
|
32
|
+
endDate: string;
|
|
33
|
+
};
|
|
34
|
+
type TimeRangeType = {
|
|
35
|
+
from: {
|
|
36
|
+
hour: string;
|
|
37
|
+
minute: string;
|
|
38
|
+
clockType: ClockType;
|
|
39
|
+
};
|
|
40
|
+
to: {
|
|
41
|
+
hour: string;
|
|
42
|
+
minute: string;
|
|
43
|
+
clockType: ClockType;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
type DateTimeRangeType = {
|
|
47
|
+
dateRange: DateRangeType;
|
|
48
|
+
timeRange: TimeRangeType;
|
|
49
|
+
};
|
|
22
50
|
}
|
|
@@ -1,7 +1,35 @@
|
|
|
1
|
+
import { DateObject } from 'react-multi-date-picker';
|
|
1
2
|
import { IDatepicker } from '../types';
|
|
2
3
|
declare const renderDatepickerNavigationButton: (direction: IDatepicker.DatpickerNavigationDirection, handleClick: (event: React.MouseEvent<HTMLButtonElement>) => void) => import("react/jsx-runtime").JSX.Element;
|
|
3
4
|
declare const regexInputValidate: (event: IDatepicker.InputChangeEvent, onChange: (event: IDatepicker.InputChangeEvent) => void) => void;
|
|
4
5
|
declare const months: string[];
|
|
5
6
|
declare const weeks: string[];
|
|
6
7
|
declare const fullMonthsText: any;
|
|
7
|
-
|
|
8
|
+
declare const createDateTimeRangeParams: (dateTimeRange?: IDatepicker.DateTimeRangeType) => {
|
|
9
|
+
startDate: string;
|
|
10
|
+
endDate: string;
|
|
11
|
+
};
|
|
12
|
+
declare const getDateRange: (dates: DateObject[] | DateObject | null) => string;
|
|
13
|
+
declare const extractTimeFromDate: (dateTimeRange: IDatepicker.DateRangeType) => {
|
|
14
|
+
startDateOnly: string;
|
|
15
|
+
endDateOnly: string;
|
|
16
|
+
time: {
|
|
17
|
+
from: {
|
|
18
|
+
hour: string;
|
|
19
|
+
minute: string;
|
|
20
|
+
clockType: IDatepicker.ClockTypeEnum;
|
|
21
|
+
};
|
|
22
|
+
to: {
|
|
23
|
+
hour: string;
|
|
24
|
+
minute: string;
|
|
25
|
+
clockType: IDatepicker.ClockTypeEnum;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
declare const formatDateTime: (date: string | Date, format: string, timeRange: {
|
|
30
|
+
hour: string;
|
|
31
|
+
minute: string;
|
|
32
|
+
clockType: string;
|
|
33
|
+
}) => string;
|
|
34
|
+
declare const getFormattedDateTime: (dateTimeRange?: IDatepicker.DateRangeType, dateFormat?: string) => string;
|
|
35
|
+
export { renderDatepickerNavigationButton, regexInputValidate, months, weeks, fullMonthsText, createDateTimeRangeParams, getDateRange, extractTimeFromDate, formatDateTime, getFormattedDateTime, };
|
|
@@ -6,7 +6,9 @@ export declare const OptionsContainer: import("styled-components").StyledCompone
|
|
|
6
6
|
separator?: boolean;
|
|
7
7
|
showScrollbar?: boolean;
|
|
8
8
|
}, never>;
|
|
9
|
-
export declare const Option: import("styled-components").StyledComponent<"div", any, {
|
|
9
|
+
export declare const Option: import("styled-components").StyledComponent<"div", any, {
|
|
10
|
+
isSelected?: boolean;
|
|
11
|
+
}, never>;
|
|
10
12
|
export declare const CustomOption: import("styled-components").StyledComponent<"div", any, {
|
|
11
13
|
isSelected?: boolean;
|
|
12
14
|
}, never>;
|
|
@@ -7,6 +7,7 @@ type HorizontalStepperType = {
|
|
|
7
7
|
activeStep?: any;
|
|
8
8
|
setActiveStep?: any;
|
|
9
9
|
navigateOnStepClick?: boolean;
|
|
10
|
+
onStepChange?: (value: any) => void;
|
|
10
11
|
};
|
|
11
|
-
declare const HorizontalStepper: ({ activeStep, setActiveStep, navigateOnStepClick, ...props }: HorizontalStepperType) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare const HorizontalStepper: ({ activeStep, setActiveStep, navigateOnStepClick, onStepChange, ...props }: HorizontalStepperType) => import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
export { HorizontalStepper };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { SelectorComponent } from './types';
|
|
2
|
-
declare const Selector: ({ content, activeKey, onClick, height }: SelectorComponent.Props) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const Selector: ({ content, activeKey, onClick, height, multiple, disabled, }: SelectorComponent.Props) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default Selector;
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
export declare namespace SelectorComponent {
|
|
2
2
|
type Props = {
|
|
3
3
|
content: any;
|
|
4
|
-
activeKey?: string;
|
|
4
|
+
activeKey?: string | string[];
|
|
5
5
|
onClick?: any;
|
|
6
6
|
height?: string;
|
|
7
|
+
multiple?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
};
|
|
10
|
+
type ClassOptions = {
|
|
11
|
+
isFirst?: boolean;
|
|
12
|
+
isLast?: boolean;
|
|
13
|
+
isSingle?: boolean;
|
|
14
|
+
isActive?: boolean;
|
|
15
|
+
isDisabled?: boolean;
|
|
7
16
|
};
|
|
8
17
|
}
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IDatepicker } from '../components/Datepicker/types';
|
|
3
|
+
declare const useTimeBar: () => {
|
|
4
|
+
time: {
|
|
5
|
+
from: {
|
|
6
|
+
hour: string;
|
|
7
|
+
minute: string;
|
|
8
|
+
clockType: IDatepicker.ClockType;
|
|
9
|
+
};
|
|
10
|
+
to: {
|
|
11
|
+
hour: string;
|
|
12
|
+
minute: string;
|
|
13
|
+
clockType: IDatepicker.ClockType;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
setTime: import("react").Dispatch<import("react").SetStateAction<{
|
|
17
|
+
from: {
|
|
18
|
+
hour: string;
|
|
19
|
+
minute: string;
|
|
20
|
+
clockType: IDatepicker.ClockType;
|
|
21
|
+
};
|
|
22
|
+
to: {
|
|
23
|
+
hour: string;
|
|
24
|
+
minute: string;
|
|
25
|
+
clockType: IDatepicker.ClockType;
|
|
26
|
+
};
|
|
27
|
+
}>>;
|
|
28
|
+
};
|
|
29
|
+
export { useTimeBar };
|
package/dist/index.d.ts
CHANGED
|
@@ -65,3 +65,4 @@ export { CALENDAR_CONSTANTS, getDateObjectForCalendarConstants, } from './compon
|
|
|
65
65
|
export * from './components/TrendPercentage';
|
|
66
66
|
export * from './components/Charts/WorkerTimeChart';
|
|
67
67
|
export { processDataForWorkerTimeChart } from './components/Charts/WorkerTimeChart/WorkerTimeChartData';
|
|
68
|
+
export { extractTimeFromDate, createDateTimeRangeParams, formatDateTime, getFormattedDateTime, } from './components/Datepicker/utils';
|