@true-engineering/true-react-common-ui-kit 1.0.1 → 1.0.2
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 +1 -1
- package/dist/components/AccountInfo/AccountInfo.d.ts +4 -4
- package/dist/components/AccountInfo/AccountInfo.styles.d.ts +56 -60
- package/dist/components/AddButton/AddButton.d.ts +6 -6
- package/dist/components/AddButton/AddButton.styles.d.ts +23 -23
- package/dist/components/Button/Button.d.ts +33 -19
- package/dist/components/Button/Button.styles.d.ts +144 -144
- package/dist/components/Checkbox/Checkbox.d.ts +27 -16
- package/dist/components/Checkbox/Checkbox.styles.d.ts +42 -39
- package/dist/components/CloseButton/CloseButton.d.ts +4 -4
- package/dist/components/CloseButton/CloseButton.styles.d.ts +22 -22
- package/dist/components/Colors/Colors.styles.d.ts +28 -28
- package/dist/components/CssBaseline/CssBaseline.d.ts +1 -1
- package/dist/components/CssBaseline/CssBaseline.styles.d.ts +7 -7
- package/dist/components/DateInput/DateInput.d.ts +9 -8
- package/dist/components/DateInput/DateInput.styles.d.ts +7 -7
- package/dist/components/DatePicker/DatePicker.d.ts +36 -29
- package/dist/components/DatePicker/DatePicker.styles.d.ts +34 -38
- package/dist/components/DatePicker/DatePickerHeader/DatePickerHeader.d.ts +9 -9
- package/dist/components/DatePicker/DatePickerHeader/DatePickerHeader.styles.d.ts +59 -59
- package/dist/components/DatePicker/DatePickerInput/DatePickerInput.d.ts +9 -7
- package/dist/components/DatePicker/DatePickerInput/DatePickerInput.styles.d.ts +16 -16
- package/dist/components/Description/Description.d.ts +6 -6
- package/dist/components/Description/Description.styles.d.ts +18 -18
- package/dist/components/FiltersPane/FilterInterval/FilterInterval.d.ts +19 -19
- package/dist/components/FiltersPane/FilterInterval/FilterInterval.styles.d.ts +44 -44
- package/dist/components/FiltersPane/FilterMultiSelect/FilterMultiSelect.d.ts +8 -2
- package/dist/components/FiltersPane/FilterSelect/FilterSelect.d.ts +35 -17
- package/dist/components/FiltersPane/FilterSelect/FilterSelect.styles.d.ts +111 -111
- package/dist/components/FiltersPane/FilterSelect/locales.d.ts +10 -6
- package/dist/components/FiltersPane/FilterValueView/FilterValueView.d.ts +9 -1
- package/dist/components/FiltersPane/FilterValueView/FilterValueView.styles.d.ts +8 -8
- package/dist/components/FiltersPane/FilterWithDates/FilterWithDates.d.ts +21 -13
- package/dist/components/FiltersPane/FilterWithDates/FilterWithDates.styles.d.ts +41 -41
- package/dist/components/FiltersPane/FilterWithPeriod/FilterWithPeriod.d.ts +8 -8
- package/dist/components/FiltersPane/FilterWithPeriod/FilterWithPeriod.styles.d.ts +7 -7
- package/dist/components/FiltersPane/FilterWrapper/FilterWrapper.d.ts +41 -18
- package/dist/components/FiltersPane/FilterWrapper/FilterWrapper.styles.d.ts +92 -92
- package/dist/components/FiltersPane/FiltersPane.d.ts +34 -15
- package/dist/components/FiltersPane/FiltersPane.styles.d.ts +50 -50
- package/dist/components/FiltersPane/FiltersPaneSearch/FiltersPaneSearch.d.ts +37 -18
- package/dist/components/FiltersPane/FiltersPaneSearch/FiltersPaneSearch.styles.d.ts +82 -82
- package/dist/components/FiltersPane/locales.d.ts +28 -22
- package/dist/components/FiltersPane/types.d.ts +65 -38
- package/dist/components/Flag/Flag.d.ts +2 -2
- package/dist/components/Flag/Flag.styles.d.ts +8 -8
- package/dist/components/FlexibleTable/FlexibleTable.d.ts +45 -20
- package/dist/components/FlexibleTable/FlexibleTable.styles.d.ts +93 -93
- package/dist/components/FlexibleTable/TableRow.d.ts +38 -21
- package/dist/components/FlexibleTable/TableValue.d.ts +28 -16
- package/dist/components/FlexibleTable/types.d.ts +37 -31
- package/dist/components/Icon/ComplexIconBoilerplate.d.ts +1 -1
- package/dist/components/Icon/Icon.d.ts +2 -2
- package/dist/components/Icon/Icon.styles.d.ts +4 -4
- package/dist/components/Icon/IconBoilerplate.d.ts +1 -1
- package/dist/components/Icon/complexIcons/icons.d.ts +1 -1
- package/dist/components/Icon/icons/icons.d.ts +97 -5
- package/dist/components/IncrementInput/ChangeButton.d.ts +5 -5
- package/dist/components/IncrementInput/IncrementInput.d.ts +4 -3
- package/dist/components/IncrementInput/IncrementInput.styles.d.ts +52 -52
- package/dist/components/Input/Input.d.ts +48 -37
- package/dist/components/Input/Input.styles.d.ts +242 -242
- package/dist/components/List/List.d.ts +12 -12
- package/dist/components/List/List.styles.d.ts +35 -35
- package/dist/components/Modal/Modal.d.ts +19 -19
- package/dist/components/Modal/Modal.styles.d.ts +235 -235
- package/dist/components/MoreMenu/MoreMenu.d.ts +7 -7
- package/dist/components/MoreMenu/MoreMenu.styles.d.ts +45 -44
- package/dist/components/MultiSelect/MultiSelect.d.ts +28 -13
- package/dist/components/MultiSelect/MultiSelect.styles.d.ts +38 -38
- package/dist/components/MultiSelect/MultiSelectInput/MultiSelectInput.d.ts +12 -6
- package/dist/components/MultiSelect/MultiSelectInput/MultiSelectInput.styles.d.ts +58 -58
- package/dist/components/MultiSelectList/MultiSelectList.d.ts +43 -20
- package/dist/components/MultiSelectList/MultiSelectList.styles.d.ts +90 -90
- package/dist/components/MultiSelectList/locales.d.ts +10 -6
- package/dist/components/Notification/Notification.d.ts +14 -9
- package/dist/components/Notification/Notification.styles.d.ts +33 -30
- package/dist/components/NumberInput/NumberInput.d.ts +16 -10
- package/dist/components/NumberInput/helpers.d.ts +10 -2
- package/dist/components/PhoneInput/PhoneInput.d.ts +14 -7
- package/dist/components/PhoneInput/PhoneInput.styles.d.ts +60 -60
- package/dist/components/PhoneInput/PhoneInputCountryList/PhoneInputCountryList.d.ts +7 -7
- package/dist/components/PhoneInput/PhoneInputCountryList/PhoneInputCountryList.styles.d.ts +78 -74
- package/dist/components/PhoneInput/types.d.ts +11 -11
- package/dist/components/RadioButton/RadioButton.d.ts +18 -8
- package/dist/components/RadioButton/RadioButton.styles.d.ts +25 -25
- package/dist/components/ScrollIntoViewIfNeeded/ScrollIntoViewIfNeeded.d.ts +634 -374
- package/dist/components/SearchInput/SearchInput.d.ts +12 -2
- package/dist/components/SearchInput/SearchInput.styles.d.ts +32 -32
- package/dist/components/Select/Select.d.ts +50 -21
- package/dist/components/Select/Select.styles.d.ts +53 -53
- package/dist/components/Select/SelectList/SelectList.d.ts +30 -15
- package/dist/components/Select/SelectList/SelectList.styles.d.ts +37 -35
- package/dist/components/Select/helpers.d.ts +9 -2
- package/dist/components/SmartInput/SmartInput.d.ts +28 -16
- package/dist/components/SmartInput/helpers.d.ts +8 -4
- package/dist/components/Switch/Switch.d.ts +26 -13
- package/dist/components/Switch/Switch.styles.d.ts +58 -58
- package/dist/components/TextArea/TextArea.d.ts +26 -23
- package/dist/components/TextArea/TextArea.styles.d.ts +124 -124
- package/dist/components/TextWithInfo/TextWithInfo.d.ts +9 -9
- package/dist/components/TextWithInfo/TextWithInfo.styles.d.ts +40 -40
- package/dist/components/TextWithTooltip/TextWithTooltip.d.ts +12 -12
- package/dist/components/TextWithTooltip/TextWithTooltip.styles.d.ts +10 -10
- package/dist/components/ThemedPreloader/ThemedPreloader.d.ts +4 -4
- package/dist/components/ThemedPreloader/ThemedPreloader.styles.d.ts +10 -10
- package/dist/components/ThemedPreloader/components/DotsPreloader/DotsPreloader.d.ts +1 -1
- package/dist/components/ThemedPreloader/components/DotsPreloader/DotsPreloader.styles.d.ts +35 -35
- package/dist/components/ThemedPreloader/components/SvgPreloader/SvgPreloader.d.ts +2 -2
- package/dist/components/ThemedPreloader/components/SvgPreloader/SvgPreloader.styles.d.ts +5 -5
- package/dist/components/Toaster/Toaster.d.ts +16 -11
- package/dist/components/Toaster/Toaster.styles.d.ts +41 -41
- package/dist/components/Tooltip/Tooltip.d.ts +4 -4
- package/dist/components/Tooltip/Tooltip.styles.d.ts +25 -27
- package/dist/helpers/data-attributes.d.ts +11 -4
- package/dist/helpers/phone.d.ts +28 -8
- package/dist/helpers/utils.d.ts +28 -7
- package/dist/hooks/use-did-mount-effect.d.ts +4 -1
- package/dist/hooks/use-dropdown.d.ts +14 -7
- package/dist/hooks/use-is-mounted.d.ts +1 -1
- package/dist/hooks/use-on-click-outside.d.ts +25 -4
- package/dist/hooks/use-theme.d.ts +10 -5
- package/dist/hooks/use-tweak-styles.d.ts +5 -1
- package/dist/style.css +205 -90
- package/dist/theme.d.ts +51 -55
- package/dist/true-react-common-ui-kit.js +24375 -16679
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +300 -211
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/dist/types.d.ts +77 -23
- package/package.json +1 -1
- package/src/components/List/List.tsx +9 -2
- package/src/components/Modal/Modal.tsx +1 -1
- package/src/components/MoreMenu/MoreMenu.styles.ts +2 -0
- package/src/components/MoreMenu/MoreMenu.tsx +35 -24
- package/src/types.ts +1 -1
|
@@ -1,91 +1,91 @@
|
|
|
1
1
|
import { ComponentStyles } from '../../../types';
|
|
2
2
|
export declare const styles: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
selectWrapper: {
|
|
23
|
-
position: string;
|
|
24
|
-
display: string;
|
|
25
|
-
flexShrink: number;
|
|
3
|
+
root: {
|
|
4
|
+
display: string;
|
|
5
|
+
position: string;
|
|
6
|
+
backgroundColor: string;
|
|
7
|
+
border: (string | number)[];
|
|
8
|
+
borderRadius: number;
|
|
9
|
+
paddingRight: number;
|
|
10
|
+
transition: string;
|
|
11
|
+
transitionProperty: string;
|
|
12
|
+
};
|
|
13
|
+
focused: {
|
|
14
|
+
backgroundColor: '#ffffff';
|
|
15
|
+
borderColor: '#d0d6e1';
|
|
16
|
+
};
|
|
17
|
+
disabled: {
|
|
18
|
+
'& $selectBlock': {
|
|
19
|
+
cursor: string;
|
|
26
20
|
};
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
21
|
+
};
|
|
22
|
+
selectWrapper: {
|
|
23
|
+
position: string;
|
|
24
|
+
display: string;
|
|
25
|
+
flexShrink: number;
|
|
26
|
+
};
|
|
27
|
+
selectBlock: {
|
|
28
|
+
display: string;
|
|
29
|
+
alignItems: string;
|
|
30
|
+
gap: number;
|
|
31
|
+
cursor: string;
|
|
32
|
+
height: string;
|
|
33
|
+
};
|
|
34
|
+
selectLabel: {
|
|
35
|
+
flexShrink: number;
|
|
36
|
+
fontSize: number;
|
|
37
|
+
userSelect: string;
|
|
38
|
+
};
|
|
39
|
+
chevronIcon: {
|
|
40
|
+
flexShrink: number;
|
|
41
|
+
width: number;
|
|
42
|
+
height: number;
|
|
43
|
+
marginRight: number;
|
|
44
|
+
transition: string;
|
|
45
|
+
opacity: number;
|
|
46
|
+
};
|
|
47
|
+
open: {
|
|
48
|
+
transform: string;
|
|
49
|
+
};
|
|
50
|
+
dropdown: {
|
|
51
|
+
position: string;
|
|
52
|
+
top: number;
|
|
53
|
+
right: number;
|
|
54
|
+
zIndex: number;
|
|
55
|
+
minWidth: number;
|
|
56
|
+
marginTop: number;
|
|
57
|
+
borderRadius: 6;
|
|
58
|
+
backgroundColor: '#ffffff';
|
|
59
|
+
overflow: string;
|
|
60
|
+
};
|
|
61
|
+
dropdownInput: {
|
|
62
|
+
borderBottom: (string | number)[];
|
|
63
|
+
};
|
|
64
|
+
active: {
|
|
65
|
+
fontWeight: string;
|
|
66
|
+
};
|
|
67
|
+
tweakSearchInput: {
|
|
68
|
+
tweakInput: {
|
|
69
|
+
inputWrapper: {
|
|
70
|
+
backgroundColor: string;
|
|
71
|
+
border: string;
|
|
42
72
|
height: number;
|
|
43
|
-
|
|
44
|
-
transition: string;
|
|
45
|
-
opacity: number;
|
|
46
|
-
};
|
|
47
|
-
open: {
|
|
48
|
-
transform: string;
|
|
49
|
-
};
|
|
50
|
-
dropdown: {
|
|
51
|
-
position: string;
|
|
52
|
-
top: number;
|
|
53
|
-
right: number;
|
|
54
|
-
zIndex: number;
|
|
73
|
+
fontSize: number;
|
|
55
74
|
minWidth: number;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
backgroundColor:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
dropdownInput: {
|
|
62
|
-
borderBottom: (string | number)[];
|
|
63
|
-
};
|
|
64
|
-
active: {
|
|
65
|
-
fontWeight: string;
|
|
66
|
-
};
|
|
67
|
-
tweakSearchInput: {
|
|
68
|
-
tweakInput: {
|
|
69
|
-
inputWrapper: {
|
|
70
|
-
backgroundColor: string;
|
|
71
|
-
border: string;
|
|
72
|
-
height: number;
|
|
73
|
-
fontSize: number;
|
|
74
|
-
minWidth: number;
|
|
75
|
-
};
|
|
76
|
-
focused: {
|
|
77
|
-
backgroundColor: string;
|
|
78
|
-
border: string;
|
|
79
|
-
};
|
|
80
|
-
};
|
|
75
|
+
};
|
|
76
|
+
focused: {
|
|
77
|
+
backgroundColor: string;
|
|
78
|
+
border: string;
|
|
79
|
+
};
|
|
81
80
|
};
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
81
|
+
};
|
|
82
|
+
tweakSelect: {
|
|
83
|
+
root: {
|
|
84
|
+
borderRadius: number;
|
|
85
|
+
borderBottomLeftRadius: number;
|
|
86
|
+
borderBottomRightRadius: number;
|
|
87
|
+
boxShadow: string;
|
|
89
88
|
};
|
|
89
|
+
};
|
|
90
90
|
};
|
|
91
91
|
export declare type FiltersPaneSearchStyles = ComponentStyles<typeof styles>;
|
|
@@ -1,28 +1,34 @@
|
|
|
1
1
|
export interface IFilterLocale {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
2
|
+
clear: string;
|
|
3
|
+
all: string;
|
|
4
|
+
other: string;
|
|
5
|
+
chosen: string;
|
|
6
|
+
searchPlaceholder: string;
|
|
7
|
+
displayedFields: string;
|
|
8
|
+
nothingFound: string;
|
|
9
|
+
from: string;
|
|
10
|
+
to: string;
|
|
11
|
+
back: string;
|
|
12
|
+
months: string[];
|
|
13
|
+
periods: {
|
|
14
|
+
[key: string]: string;
|
|
15
|
+
THIS_MONTH: string;
|
|
16
|
+
LAST_MONTH: string;
|
|
17
|
+
THIS_YEAR: string;
|
|
18
|
+
LAST_YEAR: string;
|
|
19
|
+
CUSTOM: string;
|
|
20
|
+
};
|
|
21
21
|
}
|
|
22
|
-
export declare type IPartialFilterLocale = Partial<
|
|
23
|
-
|
|
22
|
+
export declare type IPartialFilterLocale = Partial<
|
|
23
|
+
Omit<IFilterLocale, 'periods'>
|
|
24
|
+
> & {
|
|
25
|
+
periods?: Partial<IFilterLocale['periods']>;
|
|
24
26
|
};
|
|
25
27
|
export declare const FilterLocales: Record<string, IFilterLocale>;
|
|
26
28
|
export declare type IFilterLocaleKey = keyof typeof FilterLocales;
|
|
27
29
|
export declare const DEFAULT_LOCALE: IFilterLocaleKey;
|
|
28
|
-
export declare const getLocale: (
|
|
30
|
+
export declare const getLocale: (
|
|
31
|
+
key?: IFilterLocaleKey,
|
|
32
|
+
custom?: IPartialFilterLocale,
|
|
33
|
+
custom2?: IPartialFilterLocale,
|
|
34
|
+
) => IFilterLocale;
|
|
@@ -6,72 +6,99 @@ import { IFilterWithDatesProps } from './FilterWithDates';
|
|
|
6
6
|
import { IFilterWithPeriodProps } from './FilterWithPeriod';
|
|
7
7
|
import { IFilterLocaleKey, IPartialFilterLocale } from './locales';
|
|
8
8
|
import { IMultiSelectListValues } from '../MultiSelectList';
|
|
9
|
-
export declare const PERIODS: readonly [
|
|
9
|
+
export declare const PERIODS: readonly [
|
|
10
|
+
'THIS_MONTH',
|
|
11
|
+
'LAST_MONTH',
|
|
12
|
+
'THIS_YEAR',
|
|
13
|
+
'LAST_YEAR',
|
|
14
|
+
'CUSTOM',
|
|
15
|
+
];
|
|
10
16
|
export declare type IPeriodType = (typeof PERIODS)[number];
|
|
11
|
-
export declare type IFilterMultiSelectValues<Option = string> =
|
|
17
|
+
export declare type IFilterMultiSelectValues<Option = string> =
|
|
18
|
+
IMultiSelectListValues<Option>;
|
|
12
19
|
export declare type IPeriodsList = Array<IPeriodType | [string, IPeriodGetter]>;
|
|
13
20
|
export interface IFiltersPaneSearchPayload<Value> {
|
|
14
|
-
|
|
15
|
-
|
|
21
|
+
value?: string;
|
|
22
|
+
field?: Value;
|
|
16
23
|
}
|
|
17
24
|
export interface IFilterValueViewProps<Value> {
|
|
18
|
-
|
|
19
|
-
|
|
25
|
+
value?: Value;
|
|
26
|
+
filter: ConfigItem<Value>;
|
|
20
27
|
}
|
|
21
28
|
export interface IDatePeriod {
|
|
22
|
-
|
|
23
|
-
|
|
29
|
+
from: Date | null;
|
|
30
|
+
to: Date | null;
|
|
24
31
|
}
|
|
25
32
|
export interface IPeriod extends IDatePeriod {
|
|
26
|
-
|
|
27
|
-
|
|
33
|
+
periodType: string;
|
|
34
|
+
label?: string;
|
|
28
35
|
}
|
|
29
36
|
export declare type IPeriodGetter = () => IDatePeriod;
|
|
30
37
|
export declare type IFilterWithDatesValue = IDatePeriod;
|
|
31
|
-
export declare type MultiSelectOptionType<Value> = Value | undefined extends
|
|
38
|
+
export declare type MultiSelectOptionType<Value> = Value | undefined extends
|
|
39
|
+
| IFilterMultiSelectValues<infer Option>
|
|
40
|
+
| undefined
|
|
41
|
+
? Option
|
|
42
|
+
: unknown;
|
|
32
43
|
export interface IConfigItemBasicBase<Value> {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
44
|
+
name: string;
|
|
45
|
+
isInline?: boolean;
|
|
46
|
+
requiredFilledFilters?: string[];
|
|
47
|
+
localeKey?: IFilterLocaleKey;
|
|
48
|
+
locale?: IPartialFilterLocale;
|
|
49
|
+
getSelectedValueView?: (v: Value) => ReactNode;
|
|
39
50
|
}
|
|
40
51
|
export declare type IIntervalConfigItem<Value> = IConfigItemBasicBase<Value> & {
|
|
41
|
-
|
|
52
|
+
type: 'interval';
|
|
42
53
|
} & Omit<IFilterIntervalProps, 'value' | 'onChange' | 'labelName'>;
|
|
43
54
|
export interface IBooleanConfigItem<Value> extends IConfigItemBasicBase<Value> {
|
|
44
|
-
|
|
55
|
+
type: 'boolean';
|
|
45
56
|
}
|
|
46
|
-
export declare type IMultiSelectConfigItem<Value> =
|
|
57
|
+
export declare type IMultiSelectConfigItem<Value> =
|
|
58
|
+
IConfigItemBasicBase<Value> & {
|
|
47
59
|
type: 'multiSelect';
|
|
48
|
-
} & Omit<
|
|
60
|
+
} & Omit<
|
|
61
|
+
IFilterMultiSelectProps<Value, MultiSelectOptionType<Value>>,
|
|
62
|
+
'value' | 'onChange'
|
|
63
|
+
>;
|
|
49
64
|
export declare type ISelectConfigItem<Value> = IConfigItemBasicBase<Value> & {
|
|
50
|
-
|
|
65
|
+
type: 'select';
|
|
51
66
|
} & Omit<IFilterSelectProps<Value>, 'value' | 'onChange'>;
|
|
52
|
-
export declare type IDateRangeWithoutPeriodConfigItem<Value> =
|
|
67
|
+
export declare type IDateRangeWithoutPeriodConfigItem<Value> =
|
|
68
|
+
IConfigItemBasicBase<Value> & {
|
|
53
69
|
type: 'dateRangeWithoutPeriod';
|
|
54
70
|
dateFormat?: string;
|
|
55
|
-
} & Omit<
|
|
56
|
-
|
|
71
|
+
} & Omit<
|
|
72
|
+
IFilterWithDatesProps,
|
|
73
|
+
'value' | 'onChange' | 'onStartBtnSubmit' | 'onEndBtnSubmit'
|
|
74
|
+
>;
|
|
75
|
+
export declare type IDateRangeConfigItem<Value> =
|
|
76
|
+
IConfigItemBasicBase<Value> & {
|
|
57
77
|
type: 'dateRange';
|
|
58
78
|
dateFormat?: string;
|
|
59
|
-
} & Omit<IFilterWithPeriodProps, 'value' | 'onChange' | 'setIsOpen'>;
|
|
79
|
+
} & Omit<IFilterWithPeriodProps, 'value' | 'onChange' | 'setIsOpen'>;
|
|
60
80
|
export declare type CustomComponent<Value> = FC<{
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
81
|
+
value?: Value;
|
|
82
|
+
onChange: (v?: Value) => void;
|
|
83
|
+
onClose?: () => void;
|
|
84
|
+
filter: ICustomConfigItem<Value>;
|
|
85
|
+
localeKey?: IFilterLocaleKey;
|
|
86
|
+
locale?: IPartialFilterLocale;
|
|
67
87
|
}>;
|
|
68
88
|
export interface ICustomConfigItem<Value> extends IConfigItemBasicBase<Value> {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
89
|
+
[key: string]: any;
|
|
90
|
+
type: 'custom';
|
|
91
|
+
component: CustomComponent<Value>;
|
|
92
|
+
valueViewType?: 'range' | 'multiple';
|
|
73
93
|
}
|
|
74
|
-
export declare type ConfigItem<Value> =
|
|
94
|
+
export declare type ConfigItem<Value> =
|
|
95
|
+
| ISelectConfigItem<Value>
|
|
96
|
+
| IMultiSelectConfigItem<Value>
|
|
97
|
+
| ICustomConfigItem<Value>
|
|
98
|
+
| IDateRangeWithoutPeriodConfigItem<Value>
|
|
99
|
+
| IDateRangeConfigItem<Value>
|
|
100
|
+
| IIntervalConfigItem<Value>
|
|
101
|
+
| IBooleanConfigItem<Value>;
|
|
75
102
|
export declare type ConfigType<Values> = {
|
|
76
|
-
|
|
103
|
+
[K in keyof Values]: ConfigItem<Values[K]>;
|
|
77
104
|
};
|
|
@@ -2,7 +2,7 @@ import { FC } from 'react';
|
|
|
2
2
|
import { ICommonProps } from '../../types';
|
|
3
3
|
import { FlagStyles } from './Flag.styles';
|
|
4
4
|
export interface IFlagProps extends ICommonProps {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
tweakStyles?: FlagStyles;
|
|
6
|
+
countryCode?: string;
|
|
7
7
|
}
|
|
8
8
|
export declare const Flag: FC<IFlagProps>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ComponentStyles } from '../../types';
|
|
2
2
|
export declare const styles: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
root: {
|
|
4
|
+
border: (string | number)[];
|
|
5
|
+
borderRadius: number;
|
|
6
|
+
};
|
|
7
|
+
noFlag: {
|
|
8
|
+
width: number;
|
|
9
|
+
color: '#505f79';
|
|
10
|
+
};
|
|
11
11
|
};
|
|
12
12
|
export declare type FlagStyles = ComponentStyles<typeof styles>;
|
|
@@ -2,24 +2,49 @@ import React, { RefObject } from 'react';
|
|
|
2
2
|
import { ICommonProps } from '../../types';
|
|
3
3
|
import { FlexibleTableConfigType, IInfinityScrollConfig } from './types';
|
|
4
4
|
import { FlexibleTableStyles } from './FlexibleTable.styles';
|
|
5
|
-
export interface IFlexibleTableProps<Values extends Record<string, any>>
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
5
|
+
export interface IFlexibleTableProps<Values extends Record<string, any>>
|
|
6
|
+
extends ICommonProps {
|
|
7
|
+
tweakStyles?: FlexibleTableStyles;
|
|
8
|
+
content: Values[];
|
|
9
|
+
headerContent?: Partial<Record<keyof Values, any>>;
|
|
10
|
+
enabledColumns?: Array<keyof Values>;
|
|
11
|
+
activeRows?: number[];
|
|
12
|
+
config?: FlexibleTableConfigType<Values>;
|
|
13
|
+
isHorizontallyScrollable?: boolean;
|
|
14
|
+
isFirstColumnSticky?: boolean;
|
|
15
|
+
infinityScrollConfig?: IInfinityScrollConfig;
|
|
16
|
+
uniqueField?: keyof Values;
|
|
17
|
+
onHeadClick?: (column: keyof Values) => void;
|
|
18
|
+
onRowClick?: (id: string) => void;
|
|
19
|
+
onRowHover?: (id?: string) => void;
|
|
20
|
+
rowAttributes?: Array<keyof Values>;
|
|
21
|
+
refForScroll?: RefObject<HTMLDivElement>;
|
|
22
|
+
nothingFoundContent?: React.ReactNode;
|
|
23
|
+
expandableRowComponent?: (
|
|
24
|
+
item: Values,
|
|
25
|
+
isOpen: boolean,
|
|
26
|
+
close: () => void,
|
|
27
|
+
) => React.ReactNode;
|
|
28
|
+
testId?: string;
|
|
24
29
|
}
|
|
25
|
-
export declare function FlexibleTable<Values extends Record<string, any>>({
|
|
30
|
+
export declare function FlexibleTable<Values extends Record<string, any>>({
|
|
31
|
+
data,
|
|
32
|
+
tweakStyles,
|
|
33
|
+
content,
|
|
34
|
+
headerContent,
|
|
35
|
+
config,
|
|
36
|
+
activeRows,
|
|
37
|
+
enabledColumns,
|
|
38
|
+
isHorizontallyScrollable,
|
|
39
|
+
isFirstColumnSticky,
|
|
40
|
+
infinityScrollConfig,
|
|
41
|
+
uniqueField,
|
|
42
|
+
onHeadClick,
|
|
43
|
+
onRowHover,
|
|
44
|
+
onRowClick,
|
|
45
|
+
refForScroll,
|
|
46
|
+
rowAttributes,
|
|
47
|
+
nothingFoundContent,
|
|
48
|
+
testId,
|
|
49
|
+
expandableRowComponent,
|
|
50
|
+
}: IFlexibleTableProps<Values>): JSX.Element;
|
|
@@ -1,101 +1,101 @@
|
|
|
1
1
|
import { ComponentStyles } from '../../types';
|
|
2
2
|
export declare const styles: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
root: {
|
|
4
|
+
position: string;
|
|
5
|
+
width: string;
|
|
6
|
+
borderCollapse: string;
|
|
7
|
+
borderSpacing: number;
|
|
8
|
+
};
|
|
9
|
+
row: {
|
|
10
|
+
position: string;
|
|
11
|
+
};
|
|
12
|
+
scroll: {
|
|
13
|
+
overflow: string;
|
|
14
|
+
maxHeight: string;
|
|
15
|
+
};
|
|
16
|
+
horizontallyScrolled: {
|
|
17
|
+
'& $cellSticky': {
|
|
18
|
+
boxShadow: string;
|
|
8
19
|
};
|
|
9
|
-
|
|
10
|
-
|
|
20
|
+
'& $headerSticky::before': {
|
|
21
|
+
boxShadow: string;
|
|
11
22
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
23
|
+
};
|
|
24
|
+
loader: {
|
|
25
|
+
position: string;
|
|
26
|
+
left: number;
|
|
27
|
+
maxWidth: string;
|
|
28
|
+
height: number;
|
|
29
|
+
display: string;
|
|
30
|
+
justifyContent: string;
|
|
31
|
+
alignItems: string;
|
|
32
|
+
};
|
|
33
|
+
headerRow: {
|
|
34
|
+
verticalAlign: string;
|
|
35
|
+
};
|
|
36
|
+
activeRow: {};
|
|
37
|
+
cell: {
|
|
38
|
+
position: string;
|
|
39
|
+
boxSizing: string;
|
|
40
|
+
padding: number[];
|
|
41
|
+
fontSize: number;
|
|
42
|
+
lineHeight: number;
|
|
43
|
+
zIndex: number;
|
|
44
|
+
verticalAlign: string;
|
|
45
|
+
};
|
|
46
|
+
cellSticky: {
|
|
47
|
+
zIndex: number;
|
|
48
|
+
paddingLeft: number;
|
|
49
|
+
paddingRight: number;
|
|
50
|
+
transition: string[];
|
|
51
|
+
};
|
|
52
|
+
cellSecond: {
|
|
53
|
+
paddingLeft: number;
|
|
54
|
+
};
|
|
55
|
+
header: {
|
|
56
|
+
position: string;
|
|
57
|
+
boxSizing: string;
|
|
58
|
+
top: number;
|
|
59
|
+
zIndex: number;
|
|
60
|
+
fontSize: number;
|
|
61
|
+
fontWeight: string;
|
|
62
|
+
padding: number[];
|
|
63
|
+
};
|
|
64
|
+
headerSticky: {
|
|
65
|
+
zIndex: number;
|
|
66
|
+
left: number;
|
|
67
|
+
paddingLeft: number;
|
|
68
|
+
paddingRight: number;
|
|
69
|
+
'&::before': {
|
|
70
|
+
content: string;
|
|
71
|
+
display: string;
|
|
72
|
+
width: string;
|
|
73
|
+
height: string;
|
|
74
|
+
position: string;
|
|
75
|
+
left: number;
|
|
76
|
+
top: number;
|
|
77
|
+
background: string;
|
|
78
|
+
pointerEvents: string;
|
|
79
|
+
zIndex: number;
|
|
80
|
+
transition: string[];
|
|
15
81
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
left: number;
|
|
27
|
-
maxWidth: string;
|
|
28
|
-
height: number;
|
|
29
|
-
display: string;
|
|
30
|
-
justifyContent: string;
|
|
31
|
-
alignItems: string;
|
|
32
|
-
};
|
|
33
|
-
headerRow: {
|
|
34
|
-
verticalAlign: string;
|
|
35
|
-
};
|
|
36
|
-
activeRow: {};
|
|
37
|
-
cell: {
|
|
38
|
-
position: string;
|
|
39
|
-
boxSizing: string;
|
|
40
|
-
padding: number[];
|
|
41
|
-
fontSize: number;
|
|
42
|
-
lineHeight: number;
|
|
43
|
-
zIndex: number;
|
|
44
|
-
verticalAlign: string;
|
|
45
|
-
};
|
|
46
|
-
cellSticky: {
|
|
47
|
-
zIndex: number;
|
|
48
|
-
paddingLeft: number;
|
|
49
|
-
paddingRight: number;
|
|
50
|
-
transition: string[];
|
|
51
|
-
};
|
|
52
|
-
cellSecond: {
|
|
53
|
-
paddingLeft: number;
|
|
54
|
-
};
|
|
55
|
-
header: {
|
|
56
|
-
position: string;
|
|
57
|
-
boxSizing: string;
|
|
58
|
-
top: number;
|
|
59
|
-
zIndex: number;
|
|
60
|
-
fontSize: number;
|
|
61
|
-
fontWeight: string;
|
|
62
|
-
padding: number[];
|
|
63
|
-
};
|
|
64
|
-
headerSticky: {
|
|
65
|
-
zIndex: number;
|
|
66
|
-
left: number;
|
|
67
|
-
paddingLeft: number;
|
|
68
|
-
paddingRight: number;
|
|
69
|
-
'&::before': {
|
|
70
|
-
content: string;
|
|
71
|
-
display: string;
|
|
72
|
-
width: string;
|
|
73
|
-
height: string;
|
|
74
|
-
position: string;
|
|
75
|
-
left: number;
|
|
76
|
-
top: number;
|
|
77
|
-
background: string;
|
|
78
|
-
pointerEvents: string;
|
|
79
|
-
zIndex: number;
|
|
80
|
-
transition: string[];
|
|
81
|
-
};
|
|
82
|
-
'&::after': {
|
|
83
|
-
content: string;
|
|
84
|
-
display: string;
|
|
85
|
-
width: number;
|
|
86
|
-
height: string;
|
|
87
|
-
position: string;
|
|
88
|
-
left: string;
|
|
89
|
-
top: number;
|
|
90
|
-
background: string;
|
|
91
|
-
zIndex: number;
|
|
92
|
-
};
|
|
93
|
-
};
|
|
94
|
-
headerSecond: {
|
|
95
|
-
paddingLeft: number;
|
|
96
|
-
};
|
|
97
|
-
editableRow: {
|
|
98
|
-
cursor: string;
|
|
82
|
+
'&::after': {
|
|
83
|
+
content: string;
|
|
84
|
+
display: string;
|
|
85
|
+
width: number;
|
|
86
|
+
height: string;
|
|
87
|
+
position: string;
|
|
88
|
+
left: string;
|
|
89
|
+
top: number;
|
|
90
|
+
background: string;
|
|
91
|
+
zIndex: number;
|
|
99
92
|
};
|
|
93
|
+
};
|
|
94
|
+
headerSecond: {
|
|
95
|
+
paddingLeft: number;
|
|
96
|
+
};
|
|
97
|
+
editableRow: {
|
|
98
|
+
cursor: string;
|
|
99
|
+
};
|
|
100
100
|
};
|
|
101
101
|
export declare type FlexibleTableStyles = ComponentStyles<typeof styles>;
|