@ncds/ui-admin 1.1.0 → 1.1.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.
|
@@ -21,8 +21,10 @@ var __assign = void 0 && (void 0).__assign || function () {
|
|
|
21
21
|
return __assign.apply(this, arguments);
|
|
22
22
|
};
|
|
23
23
|
var RangeDatePickerWithButtons = function (_a) {
|
|
24
|
-
var _b = _a.
|
|
25
|
-
|
|
24
|
+
var _b = _a.fixedEndDate,
|
|
25
|
+
fixedEndDate = _b === void 0 ? (0, _datePicker.getDateFormat)() : _b,
|
|
26
|
+
_c = _a.buttonGroupSize,
|
|
27
|
+
buttonGroupSize = _c === void 0 ? 'sm' : _c,
|
|
26
28
|
currentButtonId = _a.currentButtonId,
|
|
27
29
|
setCurrentButtonId = _a.setCurrentButtonId,
|
|
28
30
|
startDateOptions = _a.startDateOptions,
|
|
@@ -45,9 +47,7 @@ var RangeDatePickerWithButtons = function (_a) {
|
|
|
45
47
|
unit: currentPeriodItem.unit
|
|
46
48
|
}));
|
|
47
49
|
startDateOptions.onChangeDate(startDate);
|
|
48
|
-
|
|
49
|
-
endDateOptions.onChangeDate((0, _datePicker.getDateFormat)());
|
|
50
|
-
}
|
|
50
|
+
endDateOptions.onChangeDate(fixedEndDate);
|
|
51
51
|
};
|
|
52
52
|
var handleOnChangeDate = function (date, type) {
|
|
53
53
|
type === 'START' ? startDateOptions.onChangeDate(date) : endDateOptions.onChangeDate(date);
|
|
@@ -15,8 +15,10 @@ import { ButtonGroup } from '../button';
|
|
|
15
15
|
import { getDateFormat, getSubtractDate } from '../../utils/date-picker';
|
|
16
16
|
import { PERIOD_ITEM } from '../../constant/date-picker';
|
|
17
17
|
export var RangeDatePickerWithButtons = function (_a) {
|
|
18
|
-
var _b = _a.
|
|
19
|
-
|
|
18
|
+
var _b = _a.fixedEndDate,
|
|
19
|
+
fixedEndDate = _b === void 0 ? getDateFormat() : _b,
|
|
20
|
+
_c = _a.buttonGroupSize,
|
|
21
|
+
buttonGroupSize = _c === void 0 ? 'sm' : _c,
|
|
20
22
|
currentButtonId = _a.currentButtonId,
|
|
21
23
|
setCurrentButtonId = _a.setCurrentButtonId,
|
|
22
24
|
startDateOptions = _a.startDateOptions,
|
|
@@ -39,9 +41,7 @@ export var RangeDatePickerWithButtons = function (_a) {
|
|
|
39
41
|
unit: currentPeriodItem.unit
|
|
40
42
|
}));
|
|
41
43
|
startDateOptions.onChangeDate(startDate);
|
|
42
|
-
|
|
43
|
-
endDateOptions.onChangeDate(getDateFormat());
|
|
44
|
-
}
|
|
44
|
+
endDateOptions.onChangeDate(fixedEndDate);
|
|
45
45
|
};
|
|
46
46
|
var handleOnChangeDate = function (date, type) {
|
|
47
47
|
type === 'START' ? startDateOptions.onChangeDate(date) : endDateOptions.onChangeDate(date);
|
|
@@ -4,11 +4,12 @@ import { ButtonGroupSize } from '../button';
|
|
|
4
4
|
import { PERIOD_ITEM } from '../../constant/date-picker';
|
|
5
5
|
export type PeriodKeyType = keyof typeof PERIOD_ITEM;
|
|
6
6
|
type RangeDatePickerWithButtonsProps = {
|
|
7
|
+
fixedEndDate?: string;
|
|
7
8
|
buttonGroupSize?: ButtonGroupSize;
|
|
8
9
|
currentButtonId: PeriodKeyType;
|
|
9
10
|
setCurrentButtonId: Dispatch<SetStateAction<PeriodKeyType>>;
|
|
10
11
|
periodKeys: PeriodKeyType[];
|
|
11
12
|
} & RangeDatePickerProps;
|
|
12
|
-
export declare const RangeDatePickerWithButtons: ({ buttonGroupSize, currentButtonId, setCurrentButtonId, startDateOptions, endDateOptions, validationOption, periodKeys, onDateValidation, }: RangeDatePickerWithButtonsProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const RangeDatePickerWithButtons: ({ fixedEndDate, buttonGroupSize, currentButtonId, setCurrentButtonId, startDateOptions, endDateOptions, validationOption, periodKeys, onDateValidation, }: RangeDatePickerWithButtonsProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
export {};
|
|
14
15
|
//# sourceMappingURL=RangeDatePickerWithButtons.d.ts.map
|