@ncds/ui-admin 1.1.0 → 1.1.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/cjs/src/components/date-picker/RangeDatePickerWithButtons.js +5 -5
- package/dist/esm/src/components/date-picker/RangeDatePickerWithButtons.js +5 -5
- package/dist/types/src/components/date-picker/RangeDatePickerWithButtons.d.ts +2 -1
- package/dist/ui-admin/assets/styles/style.css +9 -4
- package/package.json +1 -1
|
@@ -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
|
|
@@ -2889,8 +2889,10 @@ button {
|
|
|
2889
2889
|
gap: 4px;
|
|
2890
2890
|
}
|
|
2891
2891
|
.ncua-date-picker .flatpickr-current-month .flatpickr-monthDropdown-months,
|
|
2892
|
-
.ncua-date-picker .flatpickr-current-month .cur-year
|
|
2892
|
+
.ncua-date-picker .flatpickr-current-month .cur-year,
|
|
2893
|
+
.ncua-date-picker .flatpickr-current-month .cur-year[disabled] {
|
|
2893
2894
|
font-size: var(--font-size-lg);
|
|
2895
|
+
color: inherit;
|
|
2894
2896
|
}
|
|
2895
2897
|
.ncua-date-picker .flatpickr-monthDropdown-months {
|
|
2896
2898
|
margin: 0;
|
|
@@ -2898,7 +2900,8 @@ button {
|
|
|
2898
2900
|
transform: translateY(-1px);
|
|
2899
2901
|
}
|
|
2900
2902
|
.ncua-date-picker .flatpickr-current-month .flatpickr-monthDropdown-months,
|
|
2901
|
-
.ncua-date-picker .flatpickr-current-month .cur-year
|
|
2903
|
+
.ncua-date-picker .flatpickr-current-month .cur-year,
|
|
2904
|
+
.ncua-date-picker .flatpickr-current-month .cur-year[disabled] {
|
|
2902
2905
|
font-weight: 700;
|
|
2903
2906
|
line-height: 22px;
|
|
2904
2907
|
}
|
|
@@ -2979,7 +2982,8 @@ button {
|
|
|
2979
2982
|
line-height: 32px;
|
|
2980
2983
|
}
|
|
2981
2984
|
.ncua-date-picker--xs .flatpickr-current-month .flatpickr-monthDropdown-months,
|
|
2982
|
-
.ncua-date-picker--xs .flatpickr-current-month .cur-year
|
|
2985
|
+
.ncua-date-picker--xs .flatpickr-current-month .cur-year,
|
|
2986
|
+
.ncua-date-picker--xs .flatpickr-current-month .cur-year[disabled] {
|
|
2983
2987
|
font-size: var(--font-size-xs);
|
|
2984
2988
|
}
|
|
2985
2989
|
.ncua-date-picker--sm .flatpickr-calendar {
|
|
@@ -3003,7 +3007,8 @@ button {
|
|
|
3003
3007
|
line-height: 36px;
|
|
3004
3008
|
}
|
|
3005
3009
|
.ncua-date-picker--sm .flatpickr-current-month .flatpickr-monthDropdown-months,
|
|
3006
|
-
.ncua-date-picker--sm .flatpickr-current-month .cur-year
|
|
3010
|
+
.ncua-date-picker--sm .flatpickr-current-month .cur-year,
|
|
3011
|
+
.ncua-date-picker--sm .flatpickr-current-month .cur-year[disabled] {
|
|
3007
3012
|
font-size: var(--font-size-lg);
|
|
3008
3013
|
}
|
|
3009
3014
|
.ncua-date-picker--disabled .flatpickr-wrapper,
|