@epam/uui 5.13.3-beta.11 → 5.13.3-beta.13
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/components/datePickers/DatePicker.d.ts +47 -3
- package/components/datePickers/DatePicker.d.ts.map +1 -1
- package/components/datePickers/RangeDatePicker.d.ts +68 -3
- package/components/datePickers/RangeDatePicker.d.ts.map +1 -1
- package/components/datePickers/RangeDatePickerInput.d.ts +2 -1
- package/components/datePickers/RangeDatePickerInput.d.ts.map +1 -1
- package/components/datePickers/index.d.ts +1 -1
- package/components/datePickers/index.d.ts.map +1 -1
- package/components/datePickers/types.d.ts +7 -107
- package/components/datePickers/types.d.ts.map +1 -1
- package/components/filters/FilterRangeDatePickerBody.d.ts +1 -1
- package/components/filters/FilterRangeDatePickerBody.d.ts.map +1 -1
- package/index.esm.js +103 -103
- package/index.esm.js.map +1 -1
- package/index.js +103 -103
- package/index.js.map +1 -1
- package/package.json +5 -5
- package/stats.html +19 -1
- package/styles.css +1001 -1001
- package/styles.css.map +1 -1
|
@@ -1,5 +1,49 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import React, { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { Overwrite, CommonDatePickerProps, ICanFocus, IEditable, IAnalyticableOnChange, IHasPlaceholder, IHasRawProps } from '@epam/uui-core';
|
|
3
|
+
import { DayProps } from '@epam/uui-components';
|
|
4
|
+
import { IHasEditMode } from '../types';
|
|
5
|
+
type DatePickerMods = {
|
|
6
|
+
/**
|
|
7
|
+
* Defines component size.
|
|
8
|
+
* @default '36'
|
|
9
|
+
*/
|
|
10
|
+
size?: '24' | '30' | '36' | '42' | '48';
|
|
11
|
+
};
|
|
12
|
+
export interface DatePickerModsOverride {
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Represents the properties of the DatePicker component
|
|
16
|
+
*/
|
|
17
|
+
export interface DatePickerProps extends Overwrite<DatePickerMods, DatePickerModsOverride>, CommonDatePickerProps, IHasEditMode, ICanFocus<HTMLInputElement>, IEditable<string | null>, IAnalyticableOnChange<string>, IHasPlaceholder {
|
|
18
|
+
/**
|
|
19
|
+
* Defines where to place calendar icon
|
|
20
|
+
*/
|
|
21
|
+
iconPosition?: 'left' | 'right';
|
|
22
|
+
/**
|
|
23
|
+
* Render prop to add a custom footer inside the DatePicker dropdown body
|
|
24
|
+
*/
|
|
25
|
+
renderFooter?(): ReactNode;
|
|
26
|
+
/**
|
|
27
|
+
* Overrides rendering of the single day. For example, to highlight certain days
|
|
28
|
+
*/
|
|
29
|
+
renderDay?: (renderProps: DayProps) => ReactElement<Element>;
|
|
30
|
+
/**
|
|
31
|
+
* Any HTML attributes (native or 'data-') to put on date picker parts
|
|
32
|
+
*/
|
|
33
|
+
rawProps?: {
|
|
34
|
+
/**
|
|
35
|
+
* Any HTML attributes (native or 'data-') to put on date picker input
|
|
36
|
+
*/
|
|
37
|
+
input?: IHasRawProps<React.HTMLAttributes<HTMLDivElement>>['rawProps'];
|
|
38
|
+
/**
|
|
39
|
+
* Any HTML attributes (native or 'data-') to put on date picker body
|
|
40
|
+
*/
|
|
41
|
+
body?: IHasRawProps<React.HTMLAttributes<HTMLDivElement>>['rawProps'];
|
|
42
|
+
};
|
|
43
|
+
}
|
|
3
44
|
export declare function DatePickerComponent(props: DatePickerProps, ref: React.ForwardedRef<HTMLElement>): JSX.Element;
|
|
4
|
-
export declare const DatePicker:
|
|
45
|
+
export declare const DatePicker: (props: DatePickerProps & {
|
|
46
|
+
ref?: React.ForwardedRef<HTMLElement>;
|
|
47
|
+
}) => ReturnType<typeof DatePickerComponent>;
|
|
48
|
+
export {};
|
|
5
49
|
//# sourceMappingURL=DatePicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../components/datePickers/DatePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":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U,CAAC,CAAC;KACzE,CAAC;CACL;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,eAAe,EAAE,GAAG,EAAE,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,eAoH/F;AAED,eAAO,MAAM,UAAU,UACX,eAAe,GAAG;IAAE,GAAG,CAAC,EAAE,MAAM,YAAY,CAAC,WAAW,CAAC,CAAA;CAAE,KAAK,WAAW,0BAA0B,CAAC,CAAC"}
|
|
@@ -1,4 +1,69 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import React, { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { CommonDatePickerProps, IAnalyticableOnChange, IEditable, IHasRawProps, Overwrite } from '@epam/uui-core';
|
|
3
|
+
import { DayProps, RangeDatePickerPresets } from '@epam/uui-components';
|
|
4
|
+
import type { RangeDatePickerInputType, RangeDatePickerValue } from './types';
|
|
5
|
+
export interface RangeDatePickerModsOverride {
|
|
6
|
+
}
|
|
7
|
+
type RangeDatePickerMods = {
|
|
8
|
+
/**
|
|
9
|
+
* Defines component size.
|
|
10
|
+
*/
|
|
11
|
+
size?: '24' | '30' | '36' | '42' | '48';
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Represents the properties of the RangeDatePicker component
|
|
15
|
+
*/
|
|
16
|
+
export interface RangeDatePickerProps extends Overwrite<RangeDatePickerMods, RangeDatePickerModsOverride>, IEditable<RangeDatePickerValue | null>, IAnalyticableOnChange<RangeDatePickerValue | null>, CommonDatePickerProps {
|
|
17
|
+
/**
|
|
18
|
+
* Range presets (like 'this week', 'this month', etc.) to display at the right of the Picker's body.
|
|
19
|
+
* UUI provides defaults in the 'rangeDatePickerPresets' exported variable - you can use it as is, or build on top of it (e.g. add your presets)
|
|
20
|
+
*/
|
|
21
|
+
presets?: RangeDatePickerPresets;
|
|
22
|
+
/**
|
|
23
|
+
* Allows to add a custom footer to the Picker's dropdown body
|
|
24
|
+
*/
|
|
25
|
+
renderFooter?(value: RangeDatePickerValue): ReactNode;
|
|
26
|
+
/**
|
|
27
|
+
* Called when component gets input focus
|
|
28
|
+
*/
|
|
29
|
+
onFocus?: (e: React.FocusEvent<HTMLInputElement>, inputType: RangeDatePickerInputType) => void;
|
|
30
|
+
/**
|
|
31
|
+
* Called when component looses input focus
|
|
32
|
+
*/
|
|
33
|
+
onBlur?: (e: React.FocusEvent<HTMLInputElement>, inputType: RangeDatePickerInputType) => void;
|
|
34
|
+
/**
|
|
35
|
+
* Called when component is opened/closed
|
|
36
|
+
*/
|
|
37
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
38
|
+
/**
|
|
39
|
+
* A pure function that gets placeholder for 'from' or 'to' input.
|
|
40
|
+
*/
|
|
41
|
+
getPlaceholder?(type: RangeDatePickerInputType): string;
|
|
42
|
+
/**
|
|
43
|
+
* Overrides rendering of the single day. For example, to highlight certain days
|
|
44
|
+
*/
|
|
45
|
+
renderDay?: (renderProps: DayProps) => ReactElement<Element>;
|
|
46
|
+
/**
|
|
47
|
+
* rawProps as HTML attributes
|
|
48
|
+
*/
|
|
49
|
+
rawProps?: {
|
|
50
|
+
/**
|
|
51
|
+
* Any HTML attributes (native or 'data-') to put on 'from' input
|
|
52
|
+
*/
|
|
53
|
+
from?: IHasRawProps<React.HTMLAttributes<HTMLDivElement>>['rawProps'];
|
|
54
|
+
/**
|
|
55
|
+
* Any HTML attributes (native or 'data-') to put on 'to' input
|
|
56
|
+
*/
|
|
57
|
+
to?: IHasRawProps<React.HTMLAttributes<HTMLDivElement>>['rawProps'];
|
|
58
|
+
/**
|
|
59
|
+
* Any HTML attributes (native or 'data-') to put on date picker body
|
|
60
|
+
*/
|
|
61
|
+
body?: IHasRawProps<React.HTMLAttributes<HTMLDivElement>>['rawProps'];
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
declare function RangeDatePickerComponent(props: RangeDatePickerProps, ref: React.ForwardedRef<HTMLElement>): JSX.Element;
|
|
65
|
+
export declare const RangeDatePicker: (props: RangeDatePickerProps & {
|
|
66
|
+
ref?: React.ForwardedRef<HTMLElement>;
|
|
67
|
+
}) => ReturnType<typeof RangeDatePickerComponent>;
|
|
68
|
+
export {};
|
|
4
69
|
//# sourceMappingURL=RangeDatePicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RangeDatePicker.d.ts","sourceRoot":"","sources":["../../../components/datePickers/RangeDatePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"RangeDatePicker.d.ts","sourceRoot":"","sources":["../../../components/datePickers/RangeDatePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,YAAY,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AAEjE,OAAO,EACH,qBAAqB,EACF,qBAAqB,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAC/E,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAY,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAKlF,OAAO,KAAK,EAER,wBAAwB,EACxB,oBAAoB,EACvB,MAAM,SAAS,CAAC;AAWjB,MAAM,WAAW,2BAA2B;CAAG;AAE/C,KAAK,mBAAmB,GAAG;IACvB;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC3C,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAClC,SAAS,CAAC,mBAAmB,EAAE,2BAA2B,CAAC,EAC3D,SAAS,CAAC,oBAAoB,GAAG,IAAI,CAAC,EACtC,qBAAqB,CAAC,oBAAoB,GAAG,IAAI,CAAC,EAClD,qBAAqB;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,sBAAsB,CAAC;IAEjC;;OAEG;IACH,YAAY,CAAC,CAAC,KAAK,EAAE,oBAAoB,GAAG,SAAS,CAAC;IAEtD;;OAEG;IACH,O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
|
2
2
|
import { IEditable, IHasCX, IClickable, IHasRawProps } from '@epam/uui-core';
|
|
3
|
-
import { RangeDatePickerInputType,
|
|
3
|
+
import type { RangeDatePickerInputType, RangeDatePickerValue } from './types';
|
|
4
|
+
import type { RangeDatePickerProps } from './RangeDatePicker';
|
|
4
5
|
/**
|
|
5
6
|
* Represents RangeDatePickerInputProps
|
|
6
7
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RangeDatePickerInput.d.ts","sourceRoot":"","sources":["../../../components/datePickers/RangeDatePickerInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAc,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAKzF,OAAO,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"RangeDatePickerInput.d.ts","sourceRoot":"","sources":["../../../components/datePickers/RangeDatePickerInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAc,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAKzF,OAAO,KAAK,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAC9E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAO9D;;GAEG;AACH,MAAM,WAAW,yBACb,SAAQ,SAAS,CAAC,oBAAoB,CAAC,EACvC,MAAM,EACN,UAAU,EACV,IAAI,CAAC,oBAAoB,EAAE,gBAAgB,GAAG,cAAc,GAAG,QAAQ,GAAG,IAAI,GAAG,QAAQ,CAAC;IAC1F;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACxC;;OAEG;IACH,QAAQ,CAAC,EAAE;QACP;;WAEG;QACH,IAAI,CAAC,EAAE,YAAY,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;QACtE;;WAEG;QACH,EAAE,CAAC,EAAE,YAAY,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;KACvE,CAAC;IACF;;OAEG;IACH,OAAO,EAAE,wBAAwB,CAAC;IAClC;;MAEE;IACF,YAAY,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE,SAAS,EAAE,wBAAwB,KAAK,IAAI,CAAC;IACvG;;KAEC;IACD,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,gBAAgB,EAAE,OAAO,CAAC,EAAE,SAAS,EAAE,wBAAwB,KAAK,IAAI,CAAC;IAEhH;;OAEG;IACH,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC;CAC5D;AAED,eAAO,MAAM,oBAAoB,kGA0H/B,CAAC"}
|
|
@@ -5,5 +5,5 @@ export * from './RangeDatePickerInput';
|
|
|
5
5
|
export * from './RangeDatePicker';
|
|
6
6
|
export * from './RangeDatePickerBody';
|
|
7
7
|
export type { DatePickerBodyProps } from './DatePickerBody';
|
|
8
|
-
export type {
|
|
8
|
+
export type { RangeDatePickerValue, RangeDatePickerBodyValue, } from './types';
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/datePickers/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrE,cAAc,YAAY,CAAC;AAC3B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AAEtC,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,YAAY,EACR,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/datePickers/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrE,cAAc,YAAY,CAAC;AAC3B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AAEtC,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,YAAY,EACR,oBAAoB,EACpB,wBAAwB,GAC3B,MAAM,SAAS,CAAC"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import { ReactElement, ReactNode } from 'react';
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IDisableable, IHasCX, IHasRawProps } from '@epam/uui-core';
|
|
4
3
|
import { DayProps, RangeDatePickerPresets } from '@epam/uui-components';
|
|
5
4
|
import type { Dayjs } from '../../helpers/dayJsHelper';
|
|
6
5
|
/**
|
|
7
6
|
* Represents RangeDatePicker value
|
|
8
7
|
*/
|
|
9
|
-
type RangeDatePickerValue = {
|
|
8
|
+
export type RangeDatePickerValue = {
|
|
10
9
|
/**
|
|
11
10
|
* Defines DatePicker value 'from'.
|
|
12
11
|
*/
|
|
@@ -16,118 +15,20 @@ type RangeDatePickerValue = {
|
|
|
16
15
|
*/
|
|
17
16
|
to: string | null;
|
|
18
17
|
};
|
|
19
|
-
export interface DatePickerModsOverride {
|
|
20
|
-
}
|
|
21
|
-
type DatePickerMods = {
|
|
22
|
-
/**
|
|
23
|
-
* Defines component size.
|
|
24
|
-
* @default '36'
|
|
25
|
-
*/
|
|
26
|
-
size?: '24' | '30' | '36' | '42' | '48';
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* Represents the properties of the DatePicker component
|
|
30
|
-
*/
|
|
31
|
-
interface DatePickerProps extends Overwrite<DatePickerMods, DatePickerModsOverride>, CommonDatePickerProps, IHasEditMode, ICanFocus<HTMLInputElement>, IEditable<string | null>, IAnalyticableOnChange<string>, IHasPlaceholder {
|
|
32
|
-
/**
|
|
33
|
-
* Defines where to place calendar icon
|
|
34
|
-
*/
|
|
35
|
-
iconPosition?: 'left' | 'right';
|
|
36
|
-
/**
|
|
37
|
-
* Render prop to add a custom footer inside the DatePicker dropdown body
|
|
38
|
-
*/
|
|
39
|
-
renderFooter?(): ReactNode;
|
|
40
|
-
/**
|
|
41
|
-
* Overrides rendering of the single day. For example, to highlight certain days
|
|
42
|
-
*/
|
|
43
|
-
renderDay?: (renderProps: DayProps) => ReactElement<Element>;
|
|
44
|
-
/**
|
|
45
|
-
* Any HTML attributes (native or 'data-') to put on date picker parts
|
|
46
|
-
*/
|
|
47
|
-
rawProps?: {
|
|
48
|
-
/**
|
|
49
|
-
* Any HTML attributes (native or 'data-') to put on date picker input
|
|
50
|
-
*/
|
|
51
|
-
input?: IHasRawProps<React.HTMLAttributes<HTMLDivElement>>['rawProps'];
|
|
52
|
-
/**
|
|
53
|
-
* Any HTML attributes (native or 'data-') to put on date picker body
|
|
54
|
-
*/
|
|
55
|
-
body?: IHasRawProps<React.HTMLAttributes<HTMLDivElement>>['rawProps'];
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
export interface RangeDatePickerModsOverride {
|
|
59
|
-
}
|
|
60
|
-
type RangeDatePickerMods = {
|
|
61
|
-
/**
|
|
62
|
-
* Defines component size.
|
|
63
|
-
*/
|
|
64
|
-
size?: '24' | '30' | '36' | '42' | '48';
|
|
65
|
-
};
|
|
66
|
-
/**
|
|
67
|
-
* Represents the properties of the RangeDatePicker component
|
|
68
|
-
*/
|
|
69
|
-
interface RangeDatePickerProps extends Overwrite<RangeDatePickerMods, RangeDatePickerModsOverride>, IEditable<RangeDatePickerValue | null>, IAnalyticableOnChange<RangeDatePickerValue | null>, CommonDatePickerProps {
|
|
70
|
-
/**
|
|
71
|
-
* Range presets (like 'this week', 'this month', etc.) to display at the right of the Picker's body.
|
|
72
|
-
* UUI provides defaults in the 'rangeDatePickerPresets' exported variable - you can use it as is, or build on top of it (e.g. add your presets)
|
|
73
|
-
*/
|
|
74
|
-
presets?: RangeDatePickerPresets;
|
|
75
|
-
/**
|
|
76
|
-
* Allows to add a custom footer to the Picker's dropdown body
|
|
77
|
-
*/
|
|
78
|
-
renderFooter?(value: RangeDatePickerValue): ReactNode;
|
|
79
|
-
/**
|
|
80
|
-
* Called when component gets input focus
|
|
81
|
-
*/
|
|
82
|
-
onFocus?: (e: React.FocusEvent<HTMLInputElement>, inputType: RangeDatePickerInputType) => void;
|
|
83
|
-
/**
|
|
84
|
-
* Called when component looses input focus
|
|
85
|
-
*/
|
|
86
|
-
onBlur?: (e: React.FocusEvent<HTMLInputElement>, inputType: RangeDatePickerInputType) => void;
|
|
87
|
-
/**
|
|
88
|
-
* Called when component is opened/closed
|
|
89
|
-
*/
|
|
90
|
-
onOpenChange?: (isOpen: boolean) => void;
|
|
91
|
-
/**
|
|
92
|
-
* A pure function that gets placeholder for 'from' or 'to' input.
|
|
93
|
-
*/
|
|
94
|
-
getPlaceholder?(type: RangeDatePickerInputType): string;
|
|
95
|
-
/**
|
|
96
|
-
* Overrides rendering of the single day. For example, to highlight certain days
|
|
97
|
-
*/
|
|
98
|
-
renderDay?: (renderProps: DayProps) => ReactElement<Element>;
|
|
99
|
-
/**
|
|
100
|
-
* rawProps as HTML attributes
|
|
101
|
-
*/
|
|
102
|
-
rawProps?: {
|
|
103
|
-
/**
|
|
104
|
-
* Any HTML attributes (native or 'data-') to put on 'from' input
|
|
105
|
-
*/
|
|
106
|
-
from?: IHasRawProps<React.HTMLAttributes<HTMLDivElement>>['rawProps'];
|
|
107
|
-
/**
|
|
108
|
-
* Any HTML attributes (native or 'data-') to put on 'to' input
|
|
109
|
-
*/
|
|
110
|
-
to?: IHasRawProps<React.HTMLAttributes<HTMLDivElement>>['rawProps'];
|
|
111
|
-
/**
|
|
112
|
-
* Any HTML attributes (native or 'data-') to put on date picker body
|
|
113
|
-
*/
|
|
114
|
-
body?: IHasRawProps<React.HTMLAttributes<HTMLDivElement>>['rawProps'];
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
18
|
/**
|
|
118
19
|
* Represents RangeDatePicker input type
|
|
119
20
|
*/
|
|
120
|
-
type RangeDatePickerInputType = 'from' | 'to' | null;
|
|
121
|
-
interface CommonDatePickerBodyProps extends IHasCX, IDisableable, IHasRawProps<React.HTMLAttributes<HTMLDivElement>> {
|
|
21
|
+
export type RangeDatePickerInputType = 'from' | 'to' | null;
|
|
22
|
+
export interface CommonDatePickerBodyProps extends IHasCX, IDisableable, IHasRawProps<React.HTMLAttributes<HTMLDivElement>> {
|
|
122
23
|
filter?(day: Dayjs): boolean;
|
|
123
24
|
presets?: RangeDatePickerPresets;
|
|
124
25
|
renderDay?: (renderProps: DayProps) => React.ReactElement<Element>;
|
|
125
26
|
}
|
|
126
|
-
type ViewType = 'DAY_SELECTION' | 'MONTH_SELECTION' | 'YEAR_SELECTION';
|
|
27
|
+
export type ViewType = 'DAY_SELECTION' | 'MONTH_SELECTION' | 'YEAR_SELECTION';
|
|
127
28
|
/**
|
|
128
29
|
* Represents date picker body value
|
|
129
30
|
*/
|
|
130
|
-
interface RangeDatePickerBodyValue<TSelection> {
|
|
31
|
+
export interface RangeDatePickerBodyValue<TSelection> {
|
|
131
32
|
/**
|
|
132
33
|
* Currently setting date
|
|
133
34
|
*/
|
|
@@ -137,5 +38,4 @@ interface RangeDatePickerBodyValue<TSelection> {
|
|
|
137
38
|
*/
|
|
138
39
|
selectedDate: TSelection;
|
|
139
40
|
}
|
|
140
|
-
export type { RangeDatePickerValue, DatePickerProps, RangeDatePickerProps, RangeDatePickerInputType, CommonDatePickerBodyProps, ViewType, RangeDatePickerBodyValue, };
|
|
141
41
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../components/datePickers/types.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../components/datePickers/types.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAEvD;;EAEE;AACF,MAAM,MAAM,oBAAoB,GAAG;IAC/B;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;OAEG;IACH,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5D,MAAM,WAAW,yBAA0B,SAAQ,MAAM,EAAE,YAAY,EAAE,YAAY,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;IACvH,MAAM,CAAC,CAAC,GAAG,EAAE,KAAK,GAAG,OAAO,CAAC;IAC7B,OAAO,CAAC,EAAE,sBAAsB,CAAC;IACjC,SAAS,CAAC,EAAE,CAAC,WAAW,EAAE,QAAQ,KAAK,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;CACtE;AAED,MAAM,MAAM,QAAQ,GAAG,eAAe,GAAG,iBAAiB,GAAG,gBAAgB,CAAC;AAE9E;;GAEG;AACH,MAAM,WAAW,wBAAwB,CAAC,UAAU;IAChD;;OAEG;IACH,OAAO,EAAE,wBAAwB,CAAC;IAClC;;OAEG;IACH,YAAY,EAAE,UAAU,CAAC;CAC5B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { IDropdownBodyProps } from '@epam/uui-core';
|
|
3
|
-
import { RangeDatePickerProps } from '../datePickers
|
|
3
|
+
import { RangeDatePickerProps } from '../datePickers';
|
|
4
4
|
export interface FilterRangeDatePickerProps extends RangeDatePickerProps, IDropdownBodyProps {
|
|
5
5
|
}
|
|
6
6
|
export declare function FilterRangeDatePickerBody(props: FilterRangeDatePickerProps): JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterRangeDatePickerBody.d.ts","sourceRoot":"","sources":["../../../components/filters/FilterRangeDatePickerBody.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,kBAAkB,EAAiB,MAAM,gBAAgB,CAAC;AAQnE,OAAO,
|
|
1
|
+
{"version":3,"file":"FilterRangeDatePickerBody.d.ts","sourceRoot":"","sources":["../../../components/filters/FilterRangeDatePickerBody.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,kBAAkB,EAAiB,MAAM,gBAAgB,CAAC;AAQnE,OAAO,EACuB,oBAAoB,EACjD,MAAM,gBAAgB,CAAC;AAIxB,MAAM,WAAW,0BAA2B,SAAQ,oBAAoB,EAAE,kBAAkB;CAAG;AAE/F,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,0BAA0B,eAmF1E"}
|