@true-engineering/true-react-common-ui-kit 3.56.1 → 3.56.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/dist/components/FiltersPane/components/FilterInterval/FilterInterval.d.ts +3 -11
- package/dist/components/FiltersPane/types.d.ts +2 -0
- package/dist/true-react-common-ui-kit.js +4 -10
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +4 -10
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/src/components/FiltersPane/components/FilterInterval/FilterInterval.tsx +5 -17
- package/src/components/FiltersPane/types.ts +6 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { ICommonProps } from '../../../../types';
|
|
3
|
-
import { IFilterLocaleKey, IPartialFilterLocale } from '../../types';
|
|
3
|
+
import { IFilterLocaleKey, IFilterNumberInputProps, IPartialFilterLocale } from '../../types';
|
|
4
4
|
import { IFilterIntervalStyles } from './FilterInterval.styles';
|
|
5
5
|
export interface IFilterIntervalProps extends ICommonProps<IFilterIntervalStyles> {
|
|
6
6
|
value?: Array<number | undefined>;
|
|
@@ -10,15 +10,7 @@ export interface IFilterIntervalProps extends ICommonProps<IFilterIntervalStyles
|
|
|
10
10
|
locale?: IPartialFilterLocale;
|
|
11
11
|
withFieldNameInLabel?: boolean;
|
|
12
12
|
canBeFloat?: boolean;
|
|
13
|
-
fromInput?:
|
|
14
|
-
|
|
15
|
-
max?: number;
|
|
16
|
-
maxLength?: number;
|
|
17
|
-
};
|
|
18
|
-
toInput?: {
|
|
19
|
-
min?: number;
|
|
20
|
-
max?: number;
|
|
21
|
-
maxLength?: number;
|
|
22
|
-
};
|
|
13
|
+
fromInput?: IFilterNumberInputProps;
|
|
14
|
+
toInput?: IFilterNumberInputProps;
|
|
23
15
|
}
|
|
24
16
|
export declare const FilterInterval: FC<IFilterIntervalProps>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
2
|
import { IDatePickerProps } from '../DatePicker';
|
|
3
3
|
import { IMultiSelectListValues } from '../MultiSelectList';
|
|
4
|
+
import { INumberInputProps } from '../NumberInput';
|
|
4
5
|
import type { IFilterIntervalProps, IFilterMultiSelectProps, IFilterSelectProps, IFilterWithDatesProps, IFilterWithPeriodProps } from './components';
|
|
5
6
|
import { FilterLocales, PERIODS, SelectLocales } from './constants';
|
|
6
7
|
export type IPeriodType = (typeof PERIODS)[number];
|
|
@@ -116,3 +117,4 @@ export interface ISelectLocale {
|
|
|
116
117
|
}
|
|
117
118
|
export type ISelectLocaleKey = keyof typeof SelectLocales;
|
|
118
119
|
export type IFilterWithDateDatePickerProps = Omit<IDatePickerProps, 'onChange' | 'value' | 'locale' | 'months' | 'selectedDate' | 'tweakStyles'>;
|
|
120
|
+
export type IFilterNumberInputProps = Omit<INumberInputProps, 'onChange' | 'value' | 'label' | 'testId' | 'tweakStyles'>;
|
|
@@ -17037,19 +17037,16 @@ var FilterInterval = function(param) {
|
|
|
17037
17037
|
children: [
|
|
17038
17038
|
/* @__PURE__ */ jsxs("div", {
|
|
17039
17039
|
children: [
|
|
17040
|
-
/* @__PURE__ */ jsx(NumberInput, {
|
|
17040
|
+
/* @__PURE__ */ jsx(NumberInput, _object_spread$A({
|
|
17041
17041
|
onChange: handleFromChange,
|
|
17042
17042
|
value: value === null || value === void 0 ? void 0 : value[0],
|
|
17043
17043
|
label: withFieldNameInLabel ? "".concat(labelName, " ").concat(translates.from.toLocaleLowerCase()) : translates.from,
|
|
17044
17044
|
border: "bottom",
|
|
17045
17045
|
canBeFloat,
|
|
17046
17046
|
isClearable: true,
|
|
17047
|
-
min: fromInput === null || fromInput === void 0 ? void 0 : fromInput.min,
|
|
17048
|
-
max: fromInput === null || fromInput === void 0 ? void 0 : fromInput.max,
|
|
17049
|
-
maxLength: fromInput === null || fromInput === void 0 ? void 0 : fromInput.maxLength,
|
|
17050
17047
|
tweakStyles: tweakInputStyles,
|
|
17051
17048
|
testId: getTestId(testId, "start")
|
|
17052
|
-
}),
|
|
17049
|
+
}, fromInput)),
|
|
17053
17050
|
withFieldNameInLabel && /* @__PURE__ */ jsxs("div", {
|
|
17054
17051
|
className: classes.autosize,
|
|
17055
17052
|
children: [
|
|
@@ -17062,19 +17059,16 @@ var FilterInterval = function(param) {
|
|
|
17062
17059
|
}),
|
|
17063
17060
|
/* @__PURE__ */ jsxs("div", {
|
|
17064
17061
|
children: [
|
|
17065
|
-
/* @__PURE__ */ jsx(NumberInput, {
|
|
17062
|
+
/* @__PURE__ */ jsx(NumberInput, _object_spread$A({
|
|
17066
17063
|
onChange: handleToChange,
|
|
17067
17064
|
value: value === null || value === void 0 ? void 0 : value[1],
|
|
17068
17065
|
label: withFieldNameInLabel ? "".concat(labelName, " ").concat(translates.to.toLocaleLowerCase()) : translates.to,
|
|
17069
17066
|
border: "bottom",
|
|
17070
17067
|
canBeFloat,
|
|
17071
17068
|
isClearable: true,
|
|
17072
|
-
min: toInput === null || toInput === void 0 ? void 0 : toInput.min,
|
|
17073
|
-
max: toInput === null || toInput === void 0 ? void 0 : toInput.max,
|
|
17074
|
-
maxLength: toInput === null || toInput === void 0 ? void 0 : toInput.maxLength,
|
|
17075
17069
|
tweakStyles: tweakInputStyles,
|
|
17076
17070
|
testId: getTestId(testId, "end")
|
|
17077
|
-
}),
|
|
17071
|
+
}, toInput)),
|
|
17078
17072
|
withFieldNameInLabel && /* @__PURE__ */ jsxs("div", {
|
|
17079
17073
|
className: classes.autosize,
|
|
17080
17074
|
children: [
|