@pisell/date-picker 1.0.75-7 → 1.0.75-8
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/es/ActionBar/index.d.ts +2 -1
- package/es/ActionBar/index.js +11 -13
- package/es/DateRangeCalendar/DateRangeCalendar.js +11 -12
- package/es/DateRangeCalendar/useDragRange.js +6 -6
- package/es/DateRangePicker/DateRangePickerToolbar.d.ts +2 -1
- package/es/DateRangePicker/DateRangePickerToolbar.js +1 -1
- package/es/DateRangePicker/shared.js +5 -5
- package/es/DateRangePickerDay/DateRangePickerDay.js +8 -9
- package/es/DesktopDateRangePicker/DesktopDateRangePicker.js +5 -5
- package/es/MobileDateRangePicker/MobileDateRangePicker.js +5 -5
- package/es/MultiInputDateRangeField/MultiInputDateRangeField.js +5 -5
- package/es/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +5 -5
- package/es/MultiInputTimeRangeField/MultiInputTimeRangeField.js +5 -5
- package/es/PisellDateRangePicker/CloseCircle.d.ts +2 -1
- package/es/PisellDateRangePicker/LocaleContext.d.ts +7 -2
- package/es/PisellDateRangePicker/index.d.ts +1 -1
- package/es/PisellDateRangePicker/index.js +22 -45
- package/es/PisellDateRangePicker/useCssVariables.js +1 -1
- package/es/Shortcuts/index.d.ts +2 -1
- package/es/Shortcuts/index.js +1 -1
- package/es/SingleInputDateRangeField/SingleInputDateRangeField.js +5 -5
- package/es/SingleInputDateRangeField/useSingleInputDateRangeField.js +5 -5
- package/es/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +5 -5
- package/es/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +5 -5
- package/es/SingleInputTimeRangeField/SingleInputTimeRangeField.js +5 -5
- package/es/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +5 -5
- package/es/StaticDateRangePicker/StaticDateRangePicker.js +5 -5
- package/es/dateRangeViewRenderers/dateRangeViewRenderers.d.ts +2 -1
- package/es/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.d.ts +2 -1
- package/es/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +5 -5
- package/es/internals/hooks/useEnrichedRangePickerFieldProps.js +9 -9
- package/es/internals/hooks/useMobileRangePicker/useMobileRangePicker.d.ts +2 -1
- package/es/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +6 -6
- package/es/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +5 -5
- package/es/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +5 -5
- package/es/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +5 -5
- package/es/internals/hooks/useRangePosition.js +2 -2
- package/es/internals/hooks/useStaticRangePicker/useStaticRangePicker.d.ts +2 -1
- package/es/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +7 -7
- package/es/internals/utils/date-fields-utils.d.ts +1 -1
- package/es/internals/utils/date-fields-utils.js +5 -5
- package/es/internals/utils/date-range-manager.js +1 -1
- package/es/internals/utils/validation/validateDateRange.js +6 -6
- package/es/internals/utils/validation/validateDateTimeRange.js +6 -6
- package/es/internals/utils/validation/validateTimeRange.js +1 -1
- package/es/internals/utils/valueManagers.js +6 -6
- package/es/locales/index.js +11 -3
- package/es/locales/ja.d.ts +26 -0
- package/es/locales/ja.js +25 -0
- package/es/locales/pt.d.ts +26 -0
- package/es/locales/pt.js +25 -0
- package/es/utils/index.d.ts +1 -1
- package/lib/ActionBar/index.d.ts +2 -1
- package/lib/ActionBar/index.js +2 -4
- package/lib/DateRangePicker/DateRangePickerToolbar.d.ts +2 -1
- package/lib/PisellDateRangePicker/CloseCircle.d.ts +2 -1
- package/lib/PisellDateRangePicker/LocaleContext.d.ts +7 -2
- package/lib/PisellDateRangePicker/index.d.ts +1 -1
- package/lib/PisellDateRangePicker/index.js +2 -26
- package/lib/PisellDateRangePicker/useCssVariables.js +1 -2
- package/lib/Shortcuts/index.d.ts +2 -1
- package/lib/dateRangeViewRenderers/dateRangeViewRenderers.d.ts +2 -1
- package/lib/index.d.ts +1 -5
- package/lib/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.d.ts +2 -1
- package/lib/internals/hooks/useMobileRangePicker/useMobileRangePicker.d.ts +2 -1
- package/lib/internals/hooks/useStaticRangePicker/useStaticRangePicker.d.ts +2 -1
- package/lib/internals/utils/date-fields-utils.d.ts +1 -1
- package/lib/locales/index.js +11 -3
- package/lib/locales/ja.d.ts +26 -0
- package/lib/locales/ja.js +49 -0
- package/lib/locales/pt.d.ts +26 -0
- package/lib/locales/pt.js +49 -0
- package/lib/utils/index.d.ts +1 -1
- package/package.json +1 -1
- package/es/CustomCalendarHeader/index.d.ts +0 -2
- package/es/CustomCalendarHeader/index.js +0 -53
- package/es/Dialog/index.d.ts +0 -2
- package/es/Dialog/index.js +0 -25
- package/es/Drawer/index.d.ts +0 -11
- package/es/Drawer/index.js +0 -35
- package/es/Drawer/index.less +0 -40
- package/es/OldActionBar/index.d.ts +0 -19
- package/es/OldActionBar/index.js +0 -113
- package/es/OldActionBar/index.less +0 -18
- package/es/OldPisellDateRangePicker/index.d.ts +0 -79
- package/es/OldPisellDateRangePicker/index.js +0 -264
- package/es/OldPisellDateRangePicker/index.less +0 -102
- package/es/Toolbar/index.d.ts +0 -3
- package/es/Toolbar/index.js +0 -166
- package/es/Toolbar/index.less +0 -35
- package/es/browserSelect/chevron-down.png +0 -0
- package/es/browserSelect/index.d.ts +0 -15
- package/es/browserSelect/index.js +0 -36
- package/es/browserSelect/index.less +0 -18
- package/es/constants.d.ts +0 -58
- package/es/constants.js +0 -128
- package/es/hooks/useDocumentVisibility.d.ts +0 -2
- package/es/hooks/useDocumentVisibility.js +0 -27
- package/es/hooks/useNextDay.d.ts +0 -2
- package/es/hooks/useNextDay.js +0 -15
- package/es/hooks/useUpdateEffect.d.ts +0 -2
- package/es/hooks/useUpdateEffect.js +0 -11
- package/es/icon/ChevronLeft.d.ts +0 -5
- package/es/icon/ChevronLeft.js +0 -23
- package/es/icon/ChevronLeftDouble.d.ts +0 -5
- package/es/icon/ChevronLeftDouble.js +0 -23
- package/es/icon/ChevronRight.d.ts +0 -5
- package/es/icon/ChevronRight.js +0 -23
- package/es/icon/ChevronRightDouble.d.ts +0 -5
- package/es/icon/ChevronRightDouble.js +0 -23
- package/es/icon/CloseCircle.d.ts +0 -5
- package/es/icon/CloseCircle.js +0 -26
- package/lib/CustomCalendarHeader/index.d.ts +0 -2
- package/lib/CustomCalendarHeader/index.js +0 -58
- package/lib/Dialog/index.d.ts +0 -2
- package/lib/Dialog/index.js +0 -65
- package/lib/Drawer/index.d.ts +0 -11
- package/lib/Drawer/index.js +0 -62
- package/lib/Drawer/index.less +0 -40
- package/lib/OldActionBar/index.d.ts +0 -19
- package/lib/OldActionBar/index.js +0 -129
- package/lib/OldActionBar/index.less +0 -18
- package/lib/OldPisellDateRangePicker/index.d.ts +0 -79
- package/lib/OldPisellDateRangePicker/index.js +0 -281
- package/lib/OldPisellDateRangePicker/index.less +0 -102
- package/lib/Toolbar/index.d.ts +0 -3
- package/lib/Toolbar/index.js +0 -193
- package/lib/Toolbar/index.less +0 -35
- package/lib/browserSelect/chevron-down.png +0 -0
- package/lib/browserSelect/index.d.ts +0 -15
- package/lib/browserSelect/index.js +0 -59
- package/lib/browserSelect/index.less +0 -18
- package/lib/constants.d.ts +0 -58
- package/lib/constants.js +0 -217
- package/lib/hooks/useDocumentVisibility.d.ts +0 -2
- package/lib/hooks/useDocumentVisibility.js +0 -40
- package/lib/hooks/useNextDay.d.ts +0 -2
- package/lib/hooks/useNextDay.js +0 -49
- package/lib/hooks/useUpdateEffect.d.ts +0 -2
- package/lib/hooks/useUpdateEffect.js +0 -35
- package/lib/icon/ChevronLeft.d.ts +0 -5
- package/lib/icon/ChevronLeft.js +0 -60
- package/lib/icon/ChevronLeftDouble.d.ts +0 -5
- package/lib/icon/ChevronLeftDouble.js +0 -60
- package/lib/icon/ChevronRight.d.ts +0 -5
- package/lib/icon/ChevronRight.js +0 -60
- package/lib/icon/ChevronRightDouble.d.ts +0 -5
- package/lib/icon/ChevronRightDouble.js +0 -60
- package/lib/icon/CloseCircle.d.ts +0 -5
- package/lib/icon/CloseCircle.js +0 -67
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import { DateOrTimeViewWithMeridiem } from '@mui/x-date-pickers/internals/models';
|
|
2
3
|
import { DateRangeCalendarProps } from '../DateRangeCalendar';
|
|
3
4
|
export interface DateRangeViewRendererProps<TDate, TView extends DateOrTimeViewWithMeridiem> extends DateRangeCalendarProps<TDate> {
|
|
@@ -9,4 +10,4 @@ export interface DateRangeViewRendererProps<TDate, TView extends DateOrTimeViewW
|
|
|
9
10
|
* We don't pass all the props down to `DateRangeCalendar`,
|
|
10
11
|
* because otherwise some unwanted props would be passed to the HTML element.
|
|
11
12
|
*/
|
|
12
|
-
export declare const renderDateRangeViewCalendar: <TDate extends unknown>({ value, defaultValue, onChange, className, classes, disableFuture, disablePast, minDate, maxDate, shouldDisableDate, reduceAnimations, onMonthChange, defaultCalendarMonth, rangePosition, defaultRangePosition, onRangePositionChange, calendars, currentMonthCalendarPosition, components, componentsProps, slots, slotProps, loading, renderLoading, disableHighlightToday, readOnly, disabled, showDaysOutsideCurrentMonth, dayOfWeekFormatter, disableAutoMonthSwitching, sx, autoFocus, fixedWeekNumber, disableDragEditing, displayWeekNumber, timezone, }: DateRangeViewRendererProps<TDate, any>) => JSX.Element;
|
|
13
|
+
export declare const renderDateRangeViewCalendar: <TDate extends unknown>({ value, defaultValue, onChange, className, classes, disableFuture, disablePast, minDate, maxDate, shouldDisableDate, reduceAnimations, onMonthChange, defaultCalendarMonth, rangePosition, defaultRangePosition, onRangePositionChange, calendars, currentMonthCalendarPosition, components, componentsProps, slots, slotProps, loading, renderLoading, disableHighlightToday, readOnly, disabled, showDaysOutsideCurrentMonth, dayOfWeekFormatter, disableAutoMonthSwitching, sx, autoFocus, fixedWeekNumber, disableDragEditing, displayWeekNumber, timezone, }: DateRangeViewRendererProps<TDate, any>) => React.JSX.Element;
|
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { ConfigProvider } from 'antd';
|
|
2
1
|
import PisellDateRangePicker from "./PisellDateRangePicker";
|
|
3
|
-
import OldPisellDateRangePicker from "./OldPisellDateRangePicker";
|
|
4
2
|
import { LocaleContext, LocaleProvider } from "./PisellDateRangePicker/LocaleContext";
|
|
5
3
|
export * from "@mui/x-date-pickers";
|
|
6
4
|
export * from "@mui/material/styles";
|
|
@@ -20,7 +18,5 @@ export * from "./dateRangeViewRenderers";
|
|
|
20
18
|
export type { DateRange, RangePosition } from "./internals/models/range";
|
|
21
19
|
export type { UseDateRangeFieldProps } from "./internals/models/dateRange";
|
|
22
20
|
export { PisellDateRangePicker as RangePicker };
|
|
23
|
-
export {
|
|
24
|
-
export { LocaleContext, LocaleProvider, ConfigProvider };
|
|
25
|
-
export { getDatePickerValueByShortcut, formatPresets, getShortcutValue, getPresetLabel, getDatePickerValue, } from "./utils/index";
|
|
21
|
+
export { LocaleContext, LocaleProvider };
|
|
26
22
|
export * from "./models";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import { DateOrTimeViewWithMeridiem } from '@mui/x-date-pickers/internals/models';
|
|
2
3
|
import { UseDesktopRangePickerParams, UseDesktopRangePickerProps } from './useDesktopRangePicker.types';
|
|
3
4
|
export declare const useDesktopRangePicker: <TDate, TView extends DateOrTimeViewWithMeridiem, TExternalProps extends UseDesktopRangePickerProps<TDate, TView, any, TExternalProps>>({ props, ...pickerParams }: UseDesktopRangePickerParams<TDate, TView, TExternalProps>) => {
|
|
4
|
-
renderPicker: () => JSX.Element;
|
|
5
|
+
renderPicker: () => React.JSX.Element;
|
|
5
6
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import { DateOrTimeViewWithMeridiem } from '@mui/x-date-pickers/internals/models';
|
|
2
3
|
import { UseMobileRangePickerParams, UseMobileRangePickerProps } from './useMobileRangePicker.types';
|
|
3
4
|
export declare const useMobileRangePicker: <TDate, TView extends DateOrTimeViewWithMeridiem, TExternalProps extends UseMobileRangePickerProps<TDate, TView, any, TExternalProps>>({ props, ...pickerParams }: UseMobileRangePickerParams<TDate, TView, TExternalProps>) => {
|
|
4
|
-
renderPicker: () => JSX.Element;
|
|
5
|
+
renderPicker: () => React.JSX.Element;
|
|
5
6
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import { DateOrTimeViewWithMeridiem } from '@mui/x-date-pickers/internals/models';
|
|
2
3
|
import { UseStaticRangePickerParams, UseStaticRangePickerProps } from './useStaticRangePicker.types';
|
|
3
4
|
/**
|
|
@@ -5,5 +6,5 @@ import { UseStaticRangePickerParams, UseStaticRangePickerProps } from './useStat
|
|
|
5
6
|
* - StaticDateRangePicker
|
|
6
7
|
*/
|
|
7
8
|
export declare const useStaticRangePicker: <TDate, TView extends DateOrTimeViewWithMeridiem, TExternalProps extends UseStaticRangePickerProps<TDate, TView, any, TExternalProps>>({ props, ref, ...pickerParams }: UseStaticRangePickerParams<TDate, TView, TExternalProps>) => {
|
|
8
|
-
renderPicker: () => JSX.Element;
|
|
9
|
+
renderPicker: () => React.JSX.Element;
|
|
9
10
|
};
|
|
@@ -5,7 +5,7 @@ export declare const splitDateRangeSections: (sections: RangeFieldSection[]) =>
|
|
|
5
5
|
};
|
|
6
6
|
export declare const removeLastSeparator: (dateSections: RangeFieldSection[]) => (RangeFieldSection | {
|
|
7
7
|
separator: null;
|
|
8
|
-
dateName: "
|
|
8
|
+
dateName: "end" | "start";
|
|
9
9
|
value: string;
|
|
10
10
|
format: string;
|
|
11
11
|
maxLength: number | null;
|
package/lib/locales/index.js
CHANGED
|
@@ -36,11 +36,16 @@ module.exports = __toCommonJS(locales_exports);
|
|
|
36
36
|
var import_zh_CN = __toESM(require("./zh-CN"));
|
|
37
37
|
var import_en_US = __toESM(require("./en-US"));
|
|
38
38
|
var import_zh_TW = __toESM(require("./zh-TW"));
|
|
39
|
+
var import_ja = __toESM(require("./ja"));
|
|
40
|
+
var import_pt = __toESM(require("./pt"));
|
|
39
41
|
var import_utils = require("../utils");
|
|
40
42
|
var langMap = {
|
|
41
43
|
"zh-CN": import_zh_CN.default,
|
|
42
44
|
"en-US": import_en_US.default,
|
|
43
|
-
"zh-TW": import_zh_TW.default
|
|
45
|
+
"zh-TW": import_zh_TW.default,
|
|
46
|
+
"zh-HK": import_zh_TW.default,
|
|
47
|
+
"ja": import_ja.default,
|
|
48
|
+
"pt": import_pt.default
|
|
44
49
|
};
|
|
45
50
|
var pLocaleMap = {
|
|
46
51
|
"en": "en-US",
|
|
@@ -48,7 +53,10 @@ var pLocaleMap = {
|
|
|
48
53
|
"zh-tw": "zh-TW",
|
|
49
54
|
"en-US": "en-US",
|
|
50
55
|
"zh-CN": "zh-CN",
|
|
51
|
-
"zh-TW": "zh-TW"
|
|
56
|
+
"zh-TW": "zh-TW",
|
|
57
|
+
"zh-HK": "zh-TW",
|
|
58
|
+
"ja": "ja",
|
|
59
|
+
"pt": "pt"
|
|
52
60
|
};
|
|
53
61
|
var getText = (id, pLocale) => {
|
|
54
62
|
if (!id) {
|
|
@@ -58,7 +66,7 @@ var getText = (id, pLocale) => {
|
|
|
58
66
|
return langMap[pLocale][id] || id;
|
|
59
67
|
}
|
|
60
68
|
let locale = (0, import_utils.getCurrentLocale)() || "en-US";
|
|
61
|
-
return langMap[locale][id] || id;
|
|
69
|
+
return langMap[locale][id] || langMap["en-US"][id] || id;
|
|
62
70
|
};
|
|
63
71
|
// Annotate the CommonJS export names for ESM import in node:
|
|
64
72
|
0 && (module.exports = {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
'action-bar-cancel': string;
|
|
3
|
+
'action-bar-apply': string;
|
|
4
|
+
'action-bar-start.time': string;
|
|
5
|
+
'action-bar-end.time': string;
|
|
6
|
+
'toolbar-date-range-shortcut-custom': string;
|
|
7
|
+
"toolbar-date-range-shortcut-date-range": string;
|
|
8
|
+
"toolbar-date-range-shortcut-starting": string;
|
|
9
|
+
"toolbar-date-range-shortcut-ending": string;
|
|
10
|
+
"toolbar-date-range-shortcut-today": string;
|
|
11
|
+
"toolbar-date-range-shortcut-yesterday": string;
|
|
12
|
+
"toolbar-date-range-shortcut-tomorrow": string;
|
|
13
|
+
"toolbar-date-range-shortcut-last-3-days": string;
|
|
14
|
+
"toolbar-date-range-shortcut-last-7-days": string;
|
|
15
|
+
"toolbar-date-range-shortcut-last-30-days": string;
|
|
16
|
+
"toolbar-date-range-shortcut-last-90-days": string;
|
|
17
|
+
"toolbar-date-range-shortcut-last-180-days": string;
|
|
18
|
+
"toolbar-date-range-shortcut-next-3-days": string;
|
|
19
|
+
"toolbar-date-range-shortcut-next-7-days": string;
|
|
20
|
+
"toolbar-date-range-shortcut-next-30-days": string;
|
|
21
|
+
"toolbar-date-range-shortcut-next-90-days": string;
|
|
22
|
+
"toolbar-date-range-shortcut-next-180-days": string;
|
|
23
|
+
"toolbar-date-range-invalid-start-date": string;
|
|
24
|
+
"toolbar-date-range-invalid-end-date": string;
|
|
25
|
+
};
|
|
26
|
+
export default _default;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/locales/ja.ts
|
|
20
|
+
var ja_exports = {};
|
|
21
|
+
__export(ja_exports, {
|
|
22
|
+
default: () => ja_default
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(ja_exports);
|
|
25
|
+
var ja_default = {
|
|
26
|
+
"action-bar-cancel": "キャンセル",
|
|
27
|
+
"action-bar-apply": "適用",
|
|
28
|
+
"action-bar-start.time": "開始時間",
|
|
29
|
+
"action-bar-end.time": "終了時間",
|
|
30
|
+
"toolbar-date-range-shortcut-custom": "カスタム",
|
|
31
|
+
"toolbar-date-range-shortcut-date-range": "日付範囲",
|
|
32
|
+
"toolbar-date-range-shortcut-starting": "開始",
|
|
33
|
+
"toolbar-date-range-shortcut-ending": "終了",
|
|
34
|
+
"toolbar-date-range-shortcut-today": "今日",
|
|
35
|
+
"toolbar-date-range-shortcut-yesterday": "昨日",
|
|
36
|
+
"toolbar-date-range-shortcut-tomorrow": "明日",
|
|
37
|
+
"toolbar-date-range-shortcut-last-3-days": "過去3日",
|
|
38
|
+
"toolbar-date-range-shortcut-last-7-days": "過去7日",
|
|
39
|
+
"toolbar-date-range-shortcut-last-30-days": "過去30日",
|
|
40
|
+
"toolbar-date-range-shortcut-last-90-days": "過去90日",
|
|
41
|
+
"toolbar-date-range-shortcut-last-180-days": "過去180日",
|
|
42
|
+
"toolbar-date-range-shortcut-next-3-days": "今後3日",
|
|
43
|
+
"toolbar-date-range-shortcut-next-7-days": "今後7日",
|
|
44
|
+
"toolbar-date-range-shortcut-next-30-days": "今後30日",
|
|
45
|
+
"toolbar-date-range-shortcut-next-90-days": "今後90日",
|
|
46
|
+
"toolbar-date-range-shortcut-next-180-days": "今後180日",
|
|
47
|
+
"toolbar-date-range-invalid-start-date": "開始日が無効です",
|
|
48
|
+
"toolbar-date-range-invalid-end-date": "終了日が無効です"
|
|
49
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
'action-bar-cancel': string;
|
|
3
|
+
'action-bar-apply': string;
|
|
4
|
+
'action-bar-start.time': string;
|
|
5
|
+
'action-bar-end.time': string;
|
|
6
|
+
'toolbar-date-range-shortcut-custom': string;
|
|
7
|
+
"toolbar-date-range-shortcut-date-range": string;
|
|
8
|
+
"toolbar-date-range-shortcut-starting": string;
|
|
9
|
+
"toolbar-date-range-shortcut-ending": string;
|
|
10
|
+
"toolbar-date-range-shortcut-today": string;
|
|
11
|
+
"toolbar-date-range-shortcut-yesterday": string;
|
|
12
|
+
"toolbar-date-range-shortcut-tomorrow": string;
|
|
13
|
+
"toolbar-date-range-shortcut-last-3-days": string;
|
|
14
|
+
"toolbar-date-range-shortcut-last-7-days": string;
|
|
15
|
+
"toolbar-date-range-shortcut-last-30-days": string;
|
|
16
|
+
"toolbar-date-range-shortcut-last-90-days": string;
|
|
17
|
+
"toolbar-date-range-shortcut-last-180-days": string;
|
|
18
|
+
"toolbar-date-range-shortcut-next-3-days": string;
|
|
19
|
+
"toolbar-date-range-shortcut-next-7-days": string;
|
|
20
|
+
"toolbar-date-range-shortcut-next-30-days": string;
|
|
21
|
+
"toolbar-date-range-shortcut-next-90-days": string;
|
|
22
|
+
"toolbar-date-range-shortcut-next-180-days": string;
|
|
23
|
+
"toolbar-date-range-invalid-start-date": string;
|
|
24
|
+
"toolbar-date-range-invalid-end-date": string;
|
|
25
|
+
};
|
|
26
|
+
export default _default;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/locales/pt.ts
|
|
20
|
+
var pt_exports = {};
|
|
21
|
+
__export(pt_exports, {
|
|
22
|
+
default: () => pt_default
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(pt_exports);
|
|
25
|
+
var pt_default = {
|
|
26
|
+
"action-bar-cancel": "Cancelar",
|
|
27
|
+
"action-bar-apply": "Aplicar",
|
|
28
|
+
"action-bar-start.time": "Hora de início",
|
|
29
|
+
"action-bar-end.time": "Hora de término",
|
|
30
|
+
"toolbar-date-range-shortcut-custom": "Personalizado",
|
|
31
|
+
"toolbar-date-range-shortcut-date-range": "Intervalo de datas",
|
|
32
|
+
"toolbar-date-range-shortcut-starting": "Início",
|
|
33
|
+
"toolbar-date-range-shortcut-ending": "Fim",
|
|
34
|
+
"toolbar-date-range-shortcut-today": "Hoje",
|
|
35
|
+
"toolbar-date-range-shortcut-yesterday": "Ontem",
|
|
36
|
+
"toolbar-date-range-shortcut-tomorrow": "Amanhã",
|
|
37
|
+
"toolbar-date-range-shortcut-last-3-days": "Últimos 3 dias",
|
|
38
|
+
"toolbar-date-range-shortcut-last-7-days": "Últimos 7 dias",
|
|
39
|
+
"toolbar-date-range-shortcut-last-30-days": "Últimos 30 dias",
|
|
40
|
+
"toolbar-date-range-shortcut-last-90-days": "Últimos 90 dias",
|
|
41
|
+
"toolbar-date-range-shortcut-last-180-days": "Últimos 180 dias",
|
|
42
|
+
"toolbar-date-range-shortcut-next-3-days": "Próximos 3 dias",
|
|
43
|
+
"toolbar-date-range-shortcut-next-7-days": "Próximos 7 dias",
|
|
44
|
+
"toolbar-date-range-shortcut-next-30-days": "Próximos 30 dias",
|
|
45
|
+
"toolbar-date-range-shortcut-next-90-days": "Próximos 90 dias",
|
|
46
|
+
"toolbar-date-range-shortcut-next-180-days": "Próximos 180 dias",
|
|
47
|
+
"toolbar-date-range-invalid-start-date": "Data de início inválida",
|
|
48
|
+
"toolbar-date-range-invalid-end-date": "Data de término inválida"
|
|
49
|
+
};
|
package/lib/utils/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Stack from '@mui/material/Stack';
|
|
3
|
-
import IconButton from '@mui/material/IconButton';
|
|
4
|
-
import Typography from '@mui/material/Typography';
|
|
5
|
-
import { styled } from '@mui/material/styles';
|
|
6
|
-
import ChevronLeft from "../icon/ChevronLeft";
|
|
7
|
-
import ChevronLeftDouble from "../icon/ChevronLeftDouble";
|
|
8
|
-
import ChevronRight from "../icon/ChevronRight";
|
|
9
|
-
import ChevronRightDouble from "../icon/ChevronRightDouble";
|
|
10
|
-
var CustomCalendarHeaderRoot = styled('div')({
|
|
11
|
-
display: 'flex',
|
|
12
|
-
justifyContent: 'space-between',
|
|
13
|
-
padding: '8px 16px',
|
|
14
|
-
alignItems: 'center'
|
|
15
|
-
});
|
|
16
|
-
var CustomCalendarHeader = function CustomCalendarHeader(props) {
|
|
17
|
-
var currentMonth = props.currentMonth,
|
|
18
|
-
onMonthChange = props.onMonthChange;
|
|
19
|
-
var selectNextMonth = function selectNextMonth() {
|
|
20
|
-
return onMonthChange(currentMonth.add(1, 'month'), 'left');
|
|
21
|
-
};
|
|
22
|
-
var selectNextYear = function selectNextYear() {
|
|
23
|
-
return onMonthChange(currentMonth.add(1, 'year'), 'left');
|
|
24
|
-
};
|
|
25
|
-
var selectPreviousMonth = function selectPreviousMonth() {
|
|
26
|
-
return onMonthChange(currentMonth.subtract(1, 'month'), 'right');
|
|
27
|
-
};
|
|
28
|
-
var selectPreviousYear = function selectPreviousYear() {
|
|
29
|
-
return onMonthChange(currentMonth.subtract(1, 'year'), 'right');
|
|
30
|
-
};
|
|
31
|
-
return /*#__PURE__*/React.createElement(CustomCalendarHeaderRoot, null, /*#__PURE__*/React.createElement(Stack, {
|
|
32
|
-
spacing: 1,
|
|
33
|
-
direction: "row"
|
|
34
|
-
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
35
|
-
onClick: selectPreviousYear,
|
|
36
|
-
title: "Previous year"
|
|
37
|
-
}, /*#__PURE__*/React.createElement(ChevronLeftDouble, null)), /*#__PURE__*/React.createElement(IconButton, {
|
|
38
|
-
onClick: selectPreviousMonth,
|
|
39
|
-
title: "Previous month"
|
|
40
|
-
}, /*#__PURE__*/React.createElement(ChevronLeft, null))), /*#__PURE__*/React.createElement(Typography, {
|
|
41
|
-
variant: "body2"
|
|
42
|
-
}, currentMonth.format('MMMM YYYY')), /*#__PURE__*/React.createElement(Stack, {
|
|
43
|
-
spacing: 1,
|
|
44
|
-
direction: "row"
|
|
45
|
-
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
46
|
-
onClick: selectNextMonth,
|
|
47
|
-
title: "Next month"
|
|
48
|
-
}, /*#__PURE__*/React.createElement(ChevronRight, null)), /*#__PURE__*/React.createElement(IconButton, {
|
|
49
|
-
onClick: selectNextYear,
|
|
50
|
-
title: "Next year"
|
|
51
|
-
}, /*#__PURE__*/React.createElement(ChevronRightDouble, null))));
|
|
52
|
-
};
|
|
53
|
-
export default CustomCalendarHeader;
|
package/es/Dialog/index.d.ts
DELETED
package/es/Dialog/index.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import MuiDialog from '@mui/material/Dialog';
|
|
3
|
-
import Drawer from '@mui/material/Drawer';
|
|
4
|
-
var Dialog = function Dialog(props) {
|
|
5
|
-
var open = props.open,
|
|
6
|
-
onClose = props.onClose,
|
|
7
|
-
children = props.children;
|
|
8
|
-
var isMobile = window.innerWidth < 768;
|
|
9
|
-
if (isMobile) {
|
|
10
|
-
return /*#__PURE__*/React.createElement(Drawer, {
|
|
11
|
-
anchor: 'bottom',
|
|
12
|
-
open: open,
|
|
13
|
-
onClose: onClose,
|
|
14
|
-
height: 650,
|
|
15
|
-
autoFocus: true,
|
|
16
|
-
className: 'date-picker-custom-drawer'
|
|
17
|
-
}, children);
|
|
18
|
-
}
|
|
19
|
-
return /*#__PURE__*/React.createElement(MuiDialog, {
|
|
20
|
-
open: open,
|
|
21
|
-
onClose: onClose,
|
|
22
|
-
className: "date-picker-paid-drawer date-picker-custom-drawer"
|
|
23
|
-
}, children);
|
|
24
|
-
};
|
|
25
|
-
export default Dialog;
|
package/es/Drawer/index.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import "./index.less";
|
|
3
|
-
interface DrawerProps {
|
|
4
|
-
open: boolean;
|
|
5
|
-
className?: string;
|
|
6
|
-
height?: number;
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
onClose: () => void;
|
|
9
|
-
}
|
|
10
|
-
declare const Drawer: (props: DrawerProps) => JSX.Element | null;
|
|
11
|
-
export default Drawer;
|
package/es/Drawer/index.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import classNames from "classnames";
|
|
3
|
-
import "./index.less";
|
|
4
|
-
var Drawer = function Drawer(props) {
|
|
5
|
-
var open = props.open,
|
|
6
|
-
className = props.className,
|
|
7
|
-
onClose = props.onClose,
|
|
8
|
-
children = props.children,
|
|
9
|
-
_props$height = props.height,
|
|
10
|
-
height = _props$height === void 0 ? 375 : _props$height;
|
|
11
|
-
|
|
12
|
-
// return ReactDOM.createPortal(
|
|
13
|
-
// drawerElement,
|
|
14
|
-
// document.body
|
|
15
|
-
// );
|
|
16
|
-
|
|
17
|
-
if (!open) {
|
|
18
|
-
return null;
|
|
19
|
-
}
|
|
20
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, open && /*#__PURE__*/React.createElement("div", {
|
|
21
|
-
className: "date-picker-drawer-overlay",
|
|
22
|
-
onClick: onClose
|
|
23
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
24
|
-
className: classNames("date-picker-drawer", className, {
|
|
25
|
-
open: open
|
|
26
|
-
}),
|
|
27
|
-
onClick: function onClick() {}
|
|
28
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
29
|
-
className: "date-picker-drawer-content",
|
|
30
|
-
style: {
|
|
31
|
-
height: height
|
|
32
|
-
}
|
|
33
|
-
}, children)));
|
|
34
|
-
};
|
|
35
|
-
export default Drawer;
|
package/es/Drawer/index.less
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
.date-picker-drawer {
|
|
2
|
-
position: fixed;
|
|
3
|
-
bottom: 0;
|
|
4
|
-
left: 0;
|
|
5
|
-
width: 100%;
|
|
6
|
-
background-color: white;
|
|
7
|
-
box-shadow: 0px -2px 10px rgba(0, 0, 0, 0.1);
|
|
8
|
-
transform: translateY(100%);
|
|
9
|
-
transition: transform 0.3s ease-out;
|
|
10
|
-
z-index: 1000;
|
|
11
|
-
border-radius: 8px 8px 0 0;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.date-picker-drawer-content {
|
|
15
|
-
//transform: translateY(100%);
|
|
16
|
-
//transition: transform 0.3s ease-out;
|
|
17
|
-
//position: absolute;
|
|
18
|
-
//padding: 20px;
|
|
19
|
-
//bottom: 0;
|
|
20
|
-
//width: 100vw;
|
|
21
|
-
//background-color: #fff;
|
|
22
|
-
//z-index: 1000;
|
|
23
|
-
//box-shadow: 0px -2px 10px rgba(0, 0, 0, 0.1);
|
|
24
|
-
//border-radius: 8px 8px 0px 0px;
|
|
25
|
-
//height: 650px;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.date-picker-drawer.open {
|
|
29
|
-
transform: translateY(0);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.date-picker-drawer-overlay {
|
|
33
|
-
position: fixed;
|
|
34
|
-
top: 0;
|
|
35
|
-
left: 0;
|
|
36
|
-
width: 100%;
|
|
37
|
-
height: 100%;
|
|
38
|
-
background-color: rgba(0, 0, 0, 0.5);
|
|
39
|
-
z-index: 999;
|
|
40
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ButtonProps } from "antd";
|
|
3
|
-
import { Dayjs } from "dayjs";
|
|
4
|
-
import "./index.less";
|
|
5
|
-
interface ActionBarProps {
|
|
6
|
-
ownerState: any;
|
|
7
|
-
onCancel: () => void;
|
|
8
|
-
onChange: (val: any[], type?: "time") => void;
|
|
9
|
-
onOk: () => void;
|
|
10
|
-
value: any[];
|
|
11
|
-
showTime?: boolean | {
|
|
12
|
-
defaultValue: Dayjs;
|
|
13
|
-
[key: string]: any;
|
|
14
|
-
}[];
|
|
15
|
-
okButtonProps?: ButtonProps;
|
|
16
|
-
cancelButtonProps?: ButtonProps;
|
|
17
|
-
}
|
|
18
|
-
declare const ActionBar: (props: ActionBarProps) => JSX.Element;
|
|
19
|
-
export default ActionBar;
|
package/es/OldActionBar/index.js
DELETED
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
9
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
11
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
12
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
13
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
14
|
-
import React, { useMemo, useContext } from "react";
|
|
15
|
-
import classNames from "classnames";
|
|
16
|
-
import { Button, Space, TimePicker } from "antd";
|
|
17
|
-
import { MuiPickersAdapterContext } from "@mui/x-date-pickers";
|
|
18
|
-
import { isArr, isMobile } from "@pisell/utils";
|
|
19
|
-
import dayjs from "dayjs";
|
|
20
|
-
import { getText, pLocaleMap } from "../locales";
|
|
21
|
-
import "./index.less";
|
|
22
|
-
var ActionBar = function ActionBar(props) {
|
|
23
|
-
var ownerState = props.ownerState,
|
|
24
|
-
onCancel = props.onCancel,
|
|
25
|
-
onOk = props.onOk,
|
|
26
|
-
onChange = props.onChange,
|
|
27
|
-
showTime = props.showTime,
|
|
28
|
-
_props$value = props.value,
|
|
29
|
-
value = _props$value === void 0 ? [] : _props$value,
|
|
30
|
-
okButtonProps = props.okButtonProps,
|
|
31
|
-
cancelButtonProps = props.cancelButtonProps;
|
|
32
|
-
var local = useContext(MuiPickersAdapterContext);
|
|
33
|
-
var locale = useMemo(function () {
|
|
34
|
-
return local.utils.locale || "en";
|
|
35
|
-
}, [local.utils.locale]);
|
|
36
|
-
var slotProps = ownerState.slotProps;
|
|
37
|
-
var _ref = (slotProps === null || slotProps === void 0 ? void 0 : slotProps.shortcuts) || {},
|
|
38
|
-
items = _ref.items;
|
|
39
|
-
var hasShortcuts = !!items.length;
|
|
40
|
-
var handleStartChange = function handleStartChange(val) {
|
|
41
|
-
var _start$set, _start$set$set;
|
|
42
|
-
var newValue = _toConsumableArray(value);
|
|
43
|
-
var start = newValue[0] || dayjs();
|
|
44
|
-
newValue[0] = (start === null || start === void 0 ? void 0 : (_start$set = start.set("hour", (val === null || val === void 0 ? void 0 : val.get("hour")) || 0)) === null || _start$set === void 0 ? void 0 : (_start$set$set = _start$set.set("minute", (val === null || val === void 0 ? void 0 : val.get("minute")) || 0)) === null || _start$set$set === void 0 ? void 0 : _start$set$set.set("second", (val === null || val === void 0 ? void 0 : val.get("second")) || 0)) || null;
|
|
45
|
-
onChange(newValue, "time");
|
|
46
|
-
};
|
|
47
|
-
var handleEndChange = function handleEndChange(val) {
|
|
48
|
-
var _end$set, _end$set$set;
|
|
49
|
-
var newValue = _toConsumableArray(value);
|
|
50
|
-
var end = newValue[1] || dayjs();
|
|
51
|
-
newValue[1] = (end === null || end === void 0 ? void 0 : (_end$set = end.set("hour", (val === null || val === void 0 ? void 0 : val.get("hour")) || 0)) === null || _end$set === void 0 ? void 0 : (_end$set$set = _end$set.set("minute", (val === null || val === void 0 ? void 0 : val.get("minute")) || 0)) === null || _end$set$set === void 0 ? void 0 : _end$set$set.set("second", (val === null || val === void 0 ? void 0 : val.get("second")) || 0)) || null;
|
|
52
|
-
onChange(newValue, "time");
|
|
53
|
-
};
|
|
54
|
-
var spaceStyle = useMemo(function () {
|
|
55
|
-
return isMobile() ? {
|
|
56
|
-
display: "flex",
|
|
57
|
-
justifyContent: "end",
|
|
58
|
-
marginBottom: 12
|
|
59
|
-
} : {
|
|
60
|
-
display: "flex"
|
|
61
|
-
};
|
|
62
|
-
}, []);
|
|
63
|
-
var startTimeProps = useMemo(function () {
|
|
64
|
-
if (isArr(showTime) && showTime[0]) {
|
|
65
|
-
return showTime[0];
|
|
66
|
-
}
|
|
67
|
-
return {};
|
|
68
|
-
}, [showTime]);
|
|
69
|
-
var endTimeProps = useMemo(function () {
|
|
70
|
-
if (isArr(showTime) && showTime[1]) {
|
|
71
|
-
return showTime[1];
|
|
72
|
-
}
|
|
73
|
-
return {};
|
|
74
|
-
}, [showTime]);
|
|
75
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
76
|
-
className: classNames(props.className, "date-picker-action-bar")
|
|
77
|
-
}, hasShortcuts && /*#__PURE__*/React.createElement("div", {
|
|
78
|
-
className: "date-picker-action-bar-left"
|
|
79
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
80
|
-
className: "date-picker-action-bar-right",
|
|
81
|
-
style: isMobile() ? {
|
|
82
|
-
display: "block"
|
|
83
|
-
} : {}
|
|
84
|
-
}, /*#__PURE__*/React.createElement(Space, {
|
|
85
|
-
split: "-",
|
|
86
|
-
style: _objectSpread({}, spaceStyle)
|
|
87
|
-
}, showTime ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TimePicker, _extends({
|
|
88
|
-
placeholder: getText("action-bar-start.time", pLocaleMap[locale])
|
|
89
|
-
}, startTimeProps, {
|
|
90
|
-
value: value[0],
|
|
91
|
-
popupClassName: "date-picker-action-bar-time-picker-popup",
|
|
92
|
-
onChange: handleStartChange,
|
|
93
|
-
inputReadOnly: true
|
|
94
|
-
})), /*#__PURE__*/React.createElement(TimePicker, _extends({
|
|
95
|
-
placeholder: getText("action-bar-end.time", pLocaleMap[locale])
|
|
96
|
-
}, endTimeProps, {
|
|
97
|
-
value: value[1],
|
|
98
|
-
popupClassName: "date-picker-action-bar-time-picker-popup",
|
|
99
|
-
onChange: handleEndChange,
|
|
100
|
-
inputReadOnly: true
|
|
101
|
-
}))) : /*#__PURE__*/React.createElement("div", null)), /*#__PURE__*/React.createElement(Space, {
|
|
102
|
-
style: _objectSpread(_objectSpread({}, spaceStyle), {}, {
|
|
103
|
-
margin: 0
|
|
104
|
-
})
|
|
105
|
-
}, /*#__PURE__*/React.createElement(Button, _extends({}, cancelButtonProps || {}, {
|
|
106
|
-
onClick: onCancel
|
|
107
|
-
}), getText("action-bar-cancel", pLocaleMap[locale])), /*#__PURE__*/React.createElement(Button, _extends({
|
|
108
|
-
type: "primary"
|
|
109
|
-
}, okButtonProps || {}, {
|
|
110
|
-
onClick: onOk
|
|
111
|
-
}), getText("action-bar-apply", pLocaleMap[locale])))));
|
|
112
|
-
};
|
|
113
|
-
export default ActionBar;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
.date-picker-action-bar {
|
|
2
|
-
display: flex;
|
|
3
|
-
.date-picker-action-bar-left {
|
|
4
|
-
width: 192px;
|
|
5
|
-
border-right: 1px solid rgba(0, 0, 0, 0.12);
|
|
6
|
-
}
|
|
7
|
-
.date-picker-action-bar-right {
|
|
8
|
-
flex: 1;
|
|
9
|
-
display: flex;
|
|
10
|
-
justify-content: space-between;
|
|
11
|
-
padding: 16px;
|
|
12
|
-
border-top: 1px solid rgba(0, 0, 0, 0.12);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.date-picker-action-bar-time-picker-popup {
|
|
17
|
-
z-index: 1400;
|
|
18
|
-
}
|