kwant-ui 3.20.1 → 3.21.1
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/Charts/AreaChart/AreaChartUtils.d.ts +4 -3
- package/dist/components/Charts/WorkerTimeChart/WorkTimeChartComponents.d.ts +14 -0
- package/dist/components/Charts/WorkerTimeChart/WorkerTimeChart.d.ts +3 -0
- package/dist/components/Charts/WorkerTimeChart/WorkerTimeChartData.d.ts +26 -0
- package/dist/components/Charts/WorkerTimeChart/WorkerTimeChartTypes.d.ts +49 -0
- package/dist/components/Charts/WorkerTimeChart/WorkerTimeChartUtils.d.ts +7 -0
- package/dist/components/Charts/WorkerTimeChart/index.d.ts +2 -0
- package/dist/components/Toast/Toast.types.d.ts +3 -3
- package/dist/index.es.js +44 -44
- package/dist/index.js +44 -44
- package/dist/package.json +1 -1
- package/dist/utils/formatDate.d.ts +1 -0
- package/package.json +1 -1
- package/utils/formatDate.ts +5 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { TooltipProps } from 'recharts';
|
|
2
3
|
import { NameType, ValueType } from 'recharts/types/component/DefaultTooltipContent';
|
|
3
|
-
import { data } from './AreaChartData';
|
|
4
4
|
import { IAreaChart } from './AreaChartTypes';
|
|
5
5
|
export declare const CustomLegend: (props: IAreaChart.CustomLegend) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export declare const Tick: (props: {
|
|
@@ -11,12 +11,13 @@ export declare const TickX: (props: {
|
|
|
11
11
|
x?: number;
|
|
12
12
|
y?: number;
|
|
13
13
|
payload?: any;
|
|
14
|
-
|
|
14
|
+
rotate?: number;
|
|
15
15
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
export declare const tooltipLabelFormatter: (label: string) => string;
|
|
17
|
-
export declare const TooltipItemRow: ({ color, name, value, }: {
|
|
17
|
+
export declare const TooltipItemRow: ({ color, name, value, shape, }: {
|
|
18
18
|
color?: string;
|
|
19
19
|
name?: string;
|
|
20
20
|
value?: string;
|
|
21
|
+
shape?: ReactNode;
|
|
21
22
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
22
23
|
export declare const CustomTooltip: (props: TooltipProps<ValueType, NameType>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const CheckInShape: ({ x, y }: {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const CheckOutShape: ({ x, y }: {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const BaseLine: ({ x1, x2, y1, y2, }: {
|
|
10
|
+
x1: number;
|
|
11
|
+
y1: number;
|
|
12
|
+
x2: number;
|
|
13
|
+
y2: number;
|
|
14
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const getMilliseconds: (hour: number, min: number, sec: number) => number;
|
|
2
|
+
export declare const workerTimeChartData: {
|
|
3
|
+
date: string;
|
|
4
|
+
checkIn: string;
|
|
5
|
+
checkOut: string;
|
|
6
|
+
workTime: number;
|
|
7
|
+
overTime: number;
|
|
8
|
+
}[];
|
|
9
|
+
export declare const workerTimeChartOrganizedData: {
|
|
10
|
+
date: string;
|
|
11
|
+
checkIn: string;
|
|
12
|
+
checkOut: string;
|
|
13
|
+
workTime: number;
|
|
14
|
+
overTime: number;
|
|
15
|
+
}[];
|
|
16
|
+
export declare const processDataForWorkerTimeChart: (rawData: typeof workerTimeChartData) => {
|
|
17
|
+
date: string;
|
|
18
|
+
invisibleMil: number;
|
|
19
|
+
checkIn: number;
|
|
20
|
+
checkOut: number;
|
|
21
|
+
useless: number;
|
|
22
|
+
checkInTime: string;
|
|
23
|
+
checkOutTime: string;
|
|
24
|
+
workTime: number;
|
|
25
|
+
overTime: number;
|
|
26
|
+
}[];
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { XAxisProps, YAxisProps } from 'recharts';
|
|
2
|
+
import { Props as CartesianGridProps } from 'recharts/types/cartesian/CartesianGrid';
|
|
3
|
+
import { NameType, ValueType } from 'recharts/types/component/DefaultTooltipContent';
|
|
4
|
+
import { Props as LegendProps } from 'recharts/types/component/Legend';
|
|
5
|
+
import { TooltipProps } from 'recharts/types/component/Tooltip';
|
|
6
|
+
import { IWeekwiseBarChart } from '../WeekwiseBarChart/WeekwiseBarChartTypes';
|
|
7
|
+
export declare namespace IWorkerTimeChart {
|
|
8
|
+
type Props = {
|
|
9
|
+
width: number | string;
|
|
10
|
+
height: number | string;
|
|
11
|
+
margin?: {
|
|
12
|
+
top?: number;
|
|
13
|
+
right?: number;
|
|
14
|
+
bottom?: number;
|
|
15
|
+
left?: number;
|
|
16
|
+
};
|
|
17
|
+
data?: DataObj[];
|
|
18
|
+
showLegends?: boolean;
|
|
19
|
+
showTooltip?: boolean;
|
|
20
|
+
showReferenceLine?: boolean;
|
|
21
|
+
referenceLineValue?: number;
|
|
22
|
+
referenceLineColor?: string;
|
|
23
|
+
labelX?: string;
|
|
24
|
+
labelY?: string;
|
|
25
|
+
dataKeyX: string;
|
|
26
|
+
dataKeyInvisibleLine?: string;
|
|
27
|
+
dataKeyCheckIn?: string;
|
|
28
|
+
dataKeyCheckOut?: string;
|
|
29
|
+
dataKeyWorkTime?: string;
|
|
30
|
+
dataKeyOverTime?: string;
|
|
31
|
+
legends?: IWeekwiseBarChart.CustomLegendType[];
|
|
32
|
+
tooltipProps?: TooltipProps<ValueType, NameType>;
|
|
33
|
+
cartesianGridProps?: Omit<CartesianGridProps, 'ref'>;
|
|
34
|
+
legendProps?: Omit<LegendProps, 'ref'>;
|
|
35
|
+
xAxisProps?: XAxisProps;
|
|
36
|
+
yAxisProps?: YAxisProps;
|
|
37
|
+
};
|
|
38
|
+
type DataObj = {
|
|
39
|
+
date: string;
|
|
40
|
+
invisibleMil: number;
|
|
41
|
+
checkIn: number;
|
|
42
|
+
checkOut: number;
|
|
43
|
+
useless: number;
|
|
44
|
+
checkInTime: string;
|
|
45
|
+
checkOutTime: string;
|
|
46
|
+
workTime: number;
|
|
47
|
+
overTime: number;
|
|
48
|
+
};
|
|
49
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TooltipProps } from 'recharts';
|
|
2
|
+
import { NameType, ValueType } from 'recharts/types/component/DefaultTooltipContent';
|
|
3
|
+
import { Props as LabelListContentProps } from 'recharts/types/component/Label';
|
|
4
|
+
export declare const getX: (x: number, width: number) => number;
|
|
5
|
+
export declare const Divider: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
|
+
export declare const renderCustomizedLabel: (props: LabelListContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const WorkerTimeChartTooltip: (props: TooltipProps<ValueType, NameType>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
export type GeneralToastType = 'success' | 'error' | 'warning' | 'info';
|
|
3
3
|
export type ToastType = GeneralToastType | 'promise';
|
|
4
4
|
export type XAlign = 'left' | 'center' | 'right';
|
|
@@ -13,7 +13,7 @@ export type IToastProviderConfig = {
|
|
|
13
13
|
};
|
|
14
14
|
export interface IToast {
|
|
15
15
|
id: string;
|
|
16
|
-
message: string;
|
|
16
|
+
message: string | ReactNode;
|
|
17
17
|
type: ToastType;
|
|
18
18
|
config?: {
|
|
19
19
|
timeout?: number;
|
|
@@ -30,7 +30,7 @@ export type PromiseFnOptions = {
|
|
|
30
30
|
onError?: (error: any) => void;
|
|
31
31
|
onFinally?: () => void;
|
|
32
32
|
};
|
|
33
|
-
export type GeneralToastFn = (message:
|
|
33
|
+
export type GeneralToastFn = (message: IToast['message'], config?: IToast['config']) => string;
|
|
34
34
|
export type PromiseToastFn = (promise: Promise<unknown>, options: PromiseFnOptions) => string;
|
|
35
35
|
export interface IToastContext {
|
|
36
36
|
toast: {
|