@pisell/date-picker 3.0.8 → 3.0.9
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 +17 -9
- package/es/ActionBar/index.less +31 -9
- package/es/CustomCalendarHeader/index.d.ts +2 -1
- package/es/Dialog/index.d.ts +2 -1
- package/es/Drawer/index.d.ts +1 -1
- package/es/OldActionBar/index.d.ts +2 -1
- package/es/OldPisellDateRangePicker/index.d.ts +1 -1
- package/es/PisellDateRangePicker/index.d.ts +1 -1
- package/es/PisellDateRangePicker/index.js +1 -1
- package/es/Shortcuts/index.d.ts +2 -1
- package/es/Toolbar/index.d.ts +2 -1
- package/es/browserSelect/index.d.ts +1 -1
- package/es/dateRangeViewRenderers/dateRangeViewRenderers.d.ts +2 -1
- package/es/icon/ChevronLeft.d.ts +2 -1
- package/es/icon/ChevronLeftDouble.d.ts +2 -1
- package/es/icon/ChevronRight.d.ts +2 -1
- package/es/icon/ChevronRightDouble.d.ts +2 -1
- package/es/icon/CloseCircle.d.ts +2 -1
- package/es/internals/hooks/useStaticRangePicker/useStaticRangePicker.d.ts +2 -1
- package/es/locales/index.js +19 -11
- 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 +2 -2
- package/es/utils/index.js +3 -3
- package/lib/ActionBar/index.d.ts +2 -1
- package/lib/ActionBar/index.js +9 -9
- package/lib/ActionBar/index.less +31 -9
- package/lib/CustomCalendarHeader/index.d.ts +2 -1
- package/lib/Dialog/index.d.ts +2 -1
- package/lib/Drawer/index.d.ts +1 -1
- package/lib/OldActionBar/index.d.ts +2 -1
- package/lib/OldPisellDateRangePicker/index.d.ts +1 -1
- package/lib/PisellDateRangePicker/index.d.ts +1 -1
- package/lib/PisellDateRangePicker/index.js +1 -1
- package/lib/Shortcuts/index.d.ts +2 -1
- package/lib/Toolbar/index.d.ts +2 -1
- package/lib/browserSelect/index.d.ts +1 -1
- package/lib/dateRangeViewRenderers/dateRangeViewRenderers.d.ts +2 -1
- package/lib/icon/ChevronLeft.d.ts +2 -1
- package/lib/icon/ChevronLeftDouble.d.ts +2 -1
- package/lib/icon/ChevronRight.d.ts +2 -1
- package/lib/icon/ChevronRightDouble.d.ts +2 -1
- package/lib/icon/CloseCircle.d.ts +2 -1
- package/lib/internals/hooks/useStaticRangePicker/useStaticRangePicker.d.ts +2 -1
- package/lib/locales/index.js +12 -4
- 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 +2 -2
- package/package.json +2 -2
- package/es/DateRangePickerDay/DateRangePickerDay.d.ts +0 -50
- package/es/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.d.ts +0 -5
- package/es/internals/hooks/useMobileRangePicker/useMobileRangePicker.d.ts +0 -5
- package/es/themeAugmentation/index.d.ts +0 -4
- package/lib/DateRangePickerDay/DateRangePickerDay.d.ts +0 -50
- package/lib/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.d.ts +0 -5
- package/lib/internals/hooks/useMobileRangePicker/useMobileRangePicker.d.ts +0 -5
- package/lib/themeAugmentation/index.d.ts +0 -4
package/es/ActionBar/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { ButtonProps } from 'antd';
|
|
2
3
|
import { Dayjs } from 'dayjs';
|
|
3
4
|
import './index.less';
|
|
@@ -15,5 +16,5 @@ interface ActionBarProps {
|
|
|
15
16
|
cancelButtonProps?: ButtonProps;
|
|
16
17
|
isDesktop: boolean;
|
|
17
18
|
}
|
|
18
|
-
declare const ActionBar: (props: ActionBarProps) => JSX.Element;
|
|
19
|
+
declare const ActionBar: (props: ActionBarProps) => React.JSX.Element;
|
|
19
20
|
export default ActionBar;
|
package/es/ActionBar/index.js
CHANGED
|
@@ -20,7 +20,7 @@ import dayjs from 'dayjs';
|
|
|
20
20
|
import { getText, pLocaleMap } from "../locales";
|
|
21
21
|
import "./index.less";
|
|
22
22
|
var ActionBar = function ActionBar(props) {
|
|
23
|
-
var _value$, _value$2;
|
|
23
|
+
var _value$, _value$2, _value$3, _value$4;
|
|
24
24
|
var ownerState = props.ownerState,
|
|
25
25
|
onCancel = props.onCancel,
|
|
26
26
|
onOk = props.onOk,
|
|
@@ -102,15 +102,19 @@ var ActionBar = function ActionBar(props) {
|
|
|
102
102
|
popupClassName: "date-picker-action-bar-time-picker-popup",
|
|
103
103
|
onChange: handleStartChange,
|
|
104
104
|
inputReadOnly: true
|
|
105
|
-
})) : /*#__PURE__*/React.createElement("
|
|
105
|
+
})) : /*#__PURE__*/React.createElement("div", {
|
|
106
|
+
className: "date-picker-time-wrapper"
|
|
107
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
108
|
+
className: "date-picker-time-display"
|
|
109
|
+
}, ((_value$ = value[0]) === null || _value$ === void 0 ? void 0 : _value$.format('HH:mm')) || '--:--'), /*#__PURE__*/React.createElement("input", {
|
|
106
110
|
type: "time",
|
|
107
111
|
onChange: function onChange(e) {
|
|
108
112
|
var val = e.target.value;
|
|
109
113
|
handleStartChange(dayjs(val, 'HH:mm'));
|
|
110
114
|
},
|
|
111
|
-
className: "date-picker-input-time",
|
|
112
|
-
value: (_value$ = value[0]) === null || _value$ === void 0 ? void 0 : _value
|
|
113
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
115
|
+
className: "date-picker-input-time-native",
|
|
116
|
+
value: (_value$2 = value[0]) === null || _value$2 === void 0 ? void 0 : _value$2.format('HH:mm')
|
|
117
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
114
118
|
className: "date-picker-action-time-item"
|
|
115
119
|
}, /*#__PURE__*/React.createElement("div", {
|
|
116
120
|
className: "date-picker-action-time-item-label"
|
|
@@ -123,15 +127,19 @@ var ActionBar = function ActionBar(props) {
|
|
|
123
127
|
popupClassName: "date-picker-action-bar-time-picker-popup",
|
|
124
128
|
onChange: handleEndChange,
|
|
125
129
|
inputReadOnly: true
|
|
126
|
-
})) : /*#__PURE__*/React.createElement("
|
|
130
|
+
})) : /*#__PURE__*/React.createElement("div", {
|
|
131
|
+
className: "date-picker-time-wrapper"
|
|
132
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
133
|
+
className: "date-picker-time-display"
|
|
134
|
+
}, ((_value$3 = value[1]) === null || _value$3 === void 0 ? void 0 : _value$3.format('HH:mm')) || '--:--'), /*#__PURE__*/React.createElement("input", {
|
|
127
135
|
type: "time",
|
|
128
136
|
onChange: function onChange(e) {
|
|
129
137
|
var val = e.target.value;
|
|
130
138
|
handleEndChange(dayjs(val, 'HH:mm'));
|
|
131
139
|
},
|
|
132
|
-
className: "date-picker-input-time",
|
|
133
|
-
value: (_value$
|
|
134
|
-
}))) : null, /*#__PURE__*/React.createElement("div", {
|
|
140
|
+
className: "date-picker-input-time-native",
|
|
141
|
+
value: (_value$4 = value[1]) === null || _value$4 === void 0 ? void 0 : _value$4.format('HH:mm')
|
|
142
|
+
})))) : null, /*#__PURE__*/React.createElement("div", {
|
|
135
143
|
className: classNames(props.className, 'date-picker-action-bar')
|
|
136
144
|
}, /*#__PURE__*/React.createElement("div", {
|
|
137
145
|
className: "date-picker-action-bar-right",
|
package/es/ActionBar/index.less
CHANGED
|
@@ -27,17 +27,39 @@
|
|
|
27
27
|
flex-direction: column;
|
|
28
28
|
gap: 8px;
|
|
29
29
|
flex: 1;
|
|
30
|
-
.date-picker-
|
|
31
|
-
|
|
32
|
-
background: #ffffff;
|
|
33
|
-
border: 1px solid #D0D5DD;
|
|
34
|
-
border-radius: 8px;
|
|
35
|
-
height: 40px;
|
|
36
|
-
line-height: 40px;
|
|
30
|
+
.date-picker-time-wrapper {
|
|
31
|
+
position: relative;
|
|
37
32
|
width: 100%;
|
|
38
|
-
display: block;
|
|
39
33
|
min-width: 160px;
|
|
40
|
-
|
|
34
|
+
|
|
35
|
+
.date-picker-time-display {
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
height: 40px;
|
|
39
|
+
padding: 0 11px;
|
|
40
|
+
background: #ffffff;
|
|
41
|
+
border: 1px solid #D0D5DD;
|
|
42
|
+
border-radius: 8px;
|
|
43
|
+
font-size: 16px;
|
|
44
|
+
color: rgba(0, 0, 0, 0.88);
|
|
45
|
+
pointer-events: none;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.date-picker-input-time-native {
|
|
49
|
+
position: absolute;
|
|
50
|
+
top: 0;
|
|
51
|
+
left: 0;
|
|
52
|
+
width: 100%;
|
|
53
|
+
height: 100%;
|
|
54
|
+
opacity: 0;
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
-webkit-appearance: none;
|
|
57
|
+
appearance: none;
|
|
58
|
+
border: none;
|
|
59
|
+
padding: 0;
|
|
60
|
+
margin: 0;
|
|
61
|
+
font-size: 16px; // 防止 iOS focus 时页面缩放
|
|
62
|
+
}
|
|
41
63
|
}
|
|
42
64
|
.date-picker-action-time-item-label {
|
|
43
65
|
color: var(--Gray-700, #344054);
|
package/es/Dialog/index.d.ts
CHANGED
package/es/Drawer/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { ButtonProps } from "antd";
|
|
2
3
|
import { Dayjs } from "dayjs";
|
|
3
4
|
import "./index.less";
|
|
@@ -14,5 +15,5 @@ interface ActionBarProps {
|
|
|
14
15
|
okButtonProps?: ButtonProps;
|
|
15
16
|
cancelButtonProps?: ButtonProps;
|
|
16
17
|
}
|
|
17
|
-
declare const ActionBar: (props: ActionBarProps) => JSX.Element;
|
|
18
|
+
declare const ActionBar: (props: ActionBarProps) => React.JSX.Element;
|
|
18
19
|
export default ActionBar;
|
|
@@ -75,5 +75,5 @@ export interface PisellDateRangePickerProps {
|
|
|
75
75
|
/** 输入框只读 */
|
|
76
76
|
inputReadOnly: boolean;
|
|
77
77
|
}
|
|
78
|
-
declare const PisellDateRangePicker: (props: PisellDateRangePickerProps) => JSX.Element;
|
|
78
|
+
declare const PisellDateRangePicker: (props: PisellDateRangePickerProps) => React.JSX.Element;
|
|
79
79
|
export default PisellDateRangePicker;
|
|
@@ -79,5 +79,5 @@ export interface PisellDateRangePickerProps {
|
|
|
79
79
|
isHideCustomSelect?: boolean;
|
|
80
80
|
endDateDays?: number;
|
|
81
81
|
}
|
|
82
|
-
declare const PisellDateRangePicker: (props: PisellDateRangePickerProps) => JSX.Element;
|
|
82
|
+
declare const PisellDateRangePicker: (props: PisellDateRangePickerProps) => React.JSX.Element;
|
|
83
83
|
export default PisellDateRangePicker;
|
package/es/Shortcuts/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import "./index.less";
|
|
2
3
|
import { Dayjs } from "dayjs";
|
|
3
4
|
export declare type PresetType = {
|
|
@@ -11,5 +12,5 @@ interface ShortcutsProps {
|
|
|
11
12
|
onChange: (day: [Dayjs, Dayjs], changeImportance?: "accept" | "set") => void;
|
|
12
13
|
changeImportance?: "accept" | "set";
|
|
13
14
|
}
|
|
14
|
-
declare const Shortcuts: (props: ShortcutsProps) => JSX.Element | null;
|
|
15
|
+
declare const Shortcuts: (props: ShortcutsProps) => React.JSX.Element | null;
|
|
15
16
|
export default Shortcuts;
|
package/es/Toolbar/index.d.ts
CHANGED
|
@@ -11,5 +11,5 @@ interface BrowserSelectProps extends React.DetailedHTMLProps<React.SelectHTMLAtt
|
|
|
11
11
|
* @Author: zhiwei.Wang
|
|
12
12
|
* @Date: 2024-01-30 16:43
|
|
13
13
|
*/
|
|
14
|
-
declare const BrowserSelect: (props: BrowserSelectProps) => JSX.Element;
|
|
14
|
+
declare const BrowserSelect: (props: BrowserSelectProps) => React.JSX.Element;
|
|
15
15
|
export default BrowserSelect;
|
|
@@ -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/es/icon/ChevronLeft.d.ts
CHANGED
package/es/icon/CloseCircle.d.ts
CHANGED
|
@@ -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
|
};
|
package/es/locales/index.js
CHANGED
|
@@ -1,19 +1,27 @@
|
|
|
1
1
|
import zhCN from "./zh-CN";
|
|
2
2
|
import enUS from "./en-US";
|
|
3
3
|
import zhTW from "./zh-TW";
|
|
4
|
+
import ja from "./ja";
|
|
5
|
+
import pt from "./pt";
|
|
4
6
|
import { getCurrentLocale } from "../utils";
|
|
5
7
|
var langMap = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
'zh-CN': zhCN,
|
|
9
|
+
'en-US': enUS,
|
|
10
|
+
'zh-TW': zhTW,
|
|
11
|
+
'zh-HK': zhTW,
|
|
12
|
+
ja: ja,
|
|
13
|
+
pt: pt
|
|
9
14
|
};
|
|
10
15
|
export var pLocaleMap = {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
en: 'en-US',
|
|
17
|
+
'zh-cn': 'zh-CN',
|
|
18
|
+
'zh-tw': 'zh-TW',
|
|
19
|
+
'en-US': 'en-US',
|
|
20
|
+
'zh-CN': 'zh-CN',
|
|
21
|
+
'zh-TW': 'zh-TW',
|
|
22
|
+
'zh-HK': 'zh-TW',
|
|
23
|
+
ja: 'ja',
|
|
24
|
+
pt: 'pt'
|
|
17
25
|
};
|
|
18
26
|
export var getText = function getText(id, pLocale) {
|
|
19
27
|
if (!id) {
|
|
@@ -23,7 +31,7 @@ export var getText = function getText(id, pLocale) {
|
|
|
23
31
|
//@ts-ignore
|
|
24
32
|
return langMap[pLocale][id] || id;
|
|
25
33
|
}
|
|
26
|
-
var locale = getCurrentLocale() ||
|
|
34
|
+
var locale = getCurrentLocale() || 'en-US';
|
|
27
35
|
//@ts-ignore
|
|
28
|
-
return langMap[locale][id] || id;
|
|
36
|
+
return langMap[locale][id] || langMap['en-US'][id] || id;
|
|
29
37
|
};
|
|
@@ -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;
|
package/es/locales/ja.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
'action-bar-cancel': 'キャンセル',
|
|
3
|
+
'action-bar-apply': '適用',
|
|
4
|
+
'action-bar-start.time': '開始時間',
|
|
5
|
+
'action-bar-end.time': '終了時間',
|
|
6
|
+
'toolbar-date-range-shortcut-custom': 'カスタム',
|
|
7
|
+
"toolbar-date-range-shortcut-date-range": "日付範囲",
|
|
8
|
+
"toolbar-date-range-shortcut-starting": "開始",
|
|
9
|
+
"toolbar-date-range-shortcut-ending": "終了",
|
|
10
|
+
"toolbar-date-range-shortcut-today": "今日",
|
|
11
|
+
"toolbar-date-range-shortcut-yesterday": "昨日",
|
|
12
|
+
"toolbar-date-range-shortcut-tomorrow": "明日",
|
|
13
|
+
"toolbar-date-range-shortcut-last-3-days": "過去3日",
|
|
14
|
+
"toolbar-date-range-shortcut-last-7-days": "過去7日",
|
|
15
|
+
"toolbar-date-range-shortcut-last-30-days": "過去30日",
|
|
16
|
+
"toolbar-date-range-shortcut-last-90-days": "過去90日",
|
|
17
|
+
"toolbar-date-range-shortcut-last-180-days": "過去180日",
|
|
18
|
+
"toolbar-date-range-shortcut-next-3-days": "今後3日",
|
|
19
|
+
"toolbar-date-range-shortcut-next-7-days": "今後7日",
|
|
20
|
+
"toolbar-date-range-shortcut-next-30-days": "今後30日",
|
|
21
|
+
"toolbar-date-range-shortcut-next-90-days": "今後90日",
|
|
22
|
+
"toolbar-date-range-shortcut-next-180-days": "今後180日",
|
|
23
|
+
"toolbar-date-range-invalid-start-date": "開始日が無効です",
|
|
24
|
+
"toolbar-date-range-invalid-end-date": "終了日が無効です"
|
|
25
|
+
};
|
|
@@ -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;
|
package/es/locales/pt.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
'action-bar-cancel': 'Cancelar',
|
|
3
|
+
'action-bar-apply': 'Aplicar',
|
|
4
|
+
'action-bar-start.time': 'Hora de início',
|
|
5
|
+
'action-bar-end.time': 'Hora de término',
|
|
6
|
+
'toolbar-date-range-shortcut-custom': 'Personalizado',
|
|
7
|
+
"toolbar-date-range-shortcut-date-range": "Intervalo de datas",
|
|
8
|
+
"toolbar-date-range-shortcut-starting": "Início",
|
|
9
|
+
"toolbar-date-range-shortcut-ending": "Fim",
|
|
10
|
+
"toolbar-date-range-shortcut-today": "Hoje",
|
|
11
|
+
"toolbar-date-range-shortcut-yesterday": "Ontem",
|
|
12
|
+
"toolbar-date-range-shortcut-tomorrow": "Amanhã",
|
|
13
|
+
"toolbar-date-range-shortcut-last-3-days": "Últimos 3 dias",
|
|
14
|
+
"toolbar-date-range-shortcut-last-7-days": "Últimos 7 dias",
|
|
15
|
+
"toolbar-date-range-shortcut-last-30-days": "Últimos 30 dias",
|
|
16
|
+
"toolbar-date-range-shortcut-last-90-days": "Últimos 90 dias",
|
|
17
|
+
"toolbar-date-range-shortcut-last-180-days": "Últimos 180 dias",
|
|
18
|
+
"toolbar-date-range-shortcut-next-3-days": "Próximos 3 dias",
|
|
19
|
+
"toolbar-date-range-shortcut-next-7-days": "Próximos 7 dias",
|
|
20
|
+
"toolbar-date-range-shortcut-next-30-days": "Próximos 30 dias",
|
|
21
|
+
"toolbar-date-range-shortcut-next-90-days": "Próximos 90 dias",
|
|
22
|
+
"toolbar-date-range-shortcut-next-180-days": "Próximos 180 dias",
|
|
23
|
+
"toolbar-date-range-invalid-start-date": "Data de início inválida",
|
|
24
|
+
"toolbar-date-range-invalid-end-date": "Data de término inválida"
|
|
25
|
+
};
|
package/es/utils/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PresetType } from
|
|
2
|
-
import { Dayjs } from
|
|
1
|
+
import { PresetType } from '../Shortcuts';
|
|
2
|
+
import { Dayjs } from 'dayjs';
|
|
3
3
|
export declare const getCurrentLocale: () => string;
|
|
4
4
|
export declare const isBrowser: boolean;
|
|
5
5
|
export declare const isMobile: () => boolean;
|
package/es/utils/index.js
CHANGED
|
@@ -4,14 +4,14 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
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; }
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
import { isFunction, isMobile as isMobileUtils, isString } from
|
|
7
|
+
import { isFunction, isMobile as isMobileUtils, isString } from '@pisell/utils';
|
|
8
8
|
import { defaultPresets, presetDetailMap, presetValueArr } from "../constants";
|
|
9
9
|
export var getCurrentLocale = function getCurrentLocale() {
|
|
10
|
-
var locale = localStorage.getItem(
|
|
10
|
+
var locale = localStorage.getItem('umi_locale') || 'en-US';
|
|
11
11
|
//@ts-ignore
|
|
12
12
|
return locale;
|
|
13
13
|
};
|
|
14
|
-
export var isBrowser = !!(typeof window !==
|
|
14
|
+
export var isBrowser = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
|
15
15
|
export var isMobile = function isMobile() {
|
|
16
16
|
if (isBrowser) {
|
|
17
17
|
return window.innerWidth <= 768 || isMobileUtils();
|
package/lib/ActionBar/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { ButtonProps } from 'antd';
|
|
2
3
|
import { Dayjs } from 'dayjs';
|
|
3
4
|
import './index.less';
|
|
@@ -15,5 +16,5 @@ interface ActionBarProps {
|
|
|
15
16
|
cancelButtonProps?: ButtonProps;
|
|
16
17
|
isDesktop: boolean;
|
|
17
18
|
}
|
|
18
|
-
declare const ActionBar: (props: ActionBarProps) => JSX.Element;
|
|
19
|
+
declare const ActionBar: (props: ActionBarProps) => React.JSX.Element;
|
|
19
20
|
export default ActionBar;
|
package/lib/ActionBar/index.js
CHANGED
|
@@ -41,7 +41,7 @@ var import_dayjs = __toESM(require("dayjs"));
|
|
|
41
41
|
var import_locales = require("../locales");
|
|
42
42
|
var import_index = require("./index.less");
|
|
43
43
|
var ActionBar = (props) => {
|
|
44
|
-
var _a, _b;
|
|
44
|
+
var _a, _b, _c, _d;
|
|
45
45
|
const {
|
|
46
46
|
ownerState,
|
|
47
47
|
onCancel,
|
|
@@ -123,7 +123,7 @@ var ActionBar = (props) => {
|
|
|
123
123
|
onChange: handleStartChange,
|
|
124
124
|
inputReadOnly: true
|
|
125
125
|
}
|
|
126
|
-
) : /* @__PURE__ */ import_react.default.createElement(
|
|
126
|
+
) : /* @__PURE__ */ import_react.default.createElement("div", { className: "date-picker-time-wrapper" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "date-picker-time-display" }, ((_a = value[0]) == null ? void 0 : _a.format("HH:mm")) || "--:--"), /* @__PURE__ */ import_react.default.createElement(
|
|
127
127
|
"input",
|
|
128
128
|
{
|
|
129
129
|
type: "time",
|
|
@@ -131,10 +131,10 @@ var ActionBar = (props) => {
|
|
|
131
131
|
const val = e.target.value;
|
|
132
132
|
handleStartChange((0, import_dayjs.default)(val, "HH:mm"));
|
|
133
133
|
},
|
|
134
|
-
className: "date-picker-input-time",
|
|
135
|
-
value: (
|
|
134
|
+
className: "date-picker-input-time-native",
|
|
135
|
+
value: (_b = value[0]) == null ? void 0 : _b.format("HH:mm")
|
|
136
136
|
}
|
|
137
|
-
)), /* @__PURE__ */ import_react.default.createElement("div", { className: "date-picker-action-time-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "date-picker-action-time-item-label" }, (0, import_locales.getText)("action-bar-end.time", import_locales.pLocaleMap[locale])), isDesktop ? /* @__PURE__ */ import_react.default.createElement(
|
|
137
|
+
))), /* @__PURE__ */ import_react.default.createElement("div", { className: "date-picker-action-time-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "date-picker-action-time-item-label" }, (0, import_locales.getText)("action-bar-end.time", import_locales.pLocaleMap[locale])), isDesktop ? /* @__PURE__ */ import_react.default.createElement(
|
|
138
138
|
import_antd.TimePicker,
|
|
139
139
|
{
|
|
140
140
|
placeholder: (0, import_locales.getText)("action-bar-end.time", import_locales.pLocaleMap[locale]),
|
|
@@ -146,7 +146,7 @@ var ActionBar = (props) => {
|
|
|
146
146
|
onChange: handleEndChange,
|
|
147
147
|
inputReadOnly: true
|
|
148
148
|
}
|
|
149
|
-
) : /* @__PURE__ */ import_react.default.createElement(
|
|
149
|
+
) : /* @__PURE__ */ import_react.default.createElement("div", { className: "date-picker-time-wrapper" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "date-picker-time-display" }, ((_c = value[1]) == null ? void 0 : _c.format("HH:mm")) || "--:--"), /* @__PURE__ */ import_react.default.createElement(
|
|
150
150
|
"input",
|
|
151
151
|
{
|
|
152
152
|
type: "time",
|
|
@@ -154,10 +154,10 @@ var ActionBar = (props) => {
|
|
|
154
154
|
const val = e.target.value;
|
|
155
155
|
handleEndChange((0, import_dayjs.default)(val, "HH:mm"));
|
|
156
156
|
},
|
|
157
|
-
className: "date-picker-input-time",
|
|
158
|
-
value: (
|
|
157
|
+
className: "date-picker-input-time-native",
|
|
158
|
+
value: (_d = value[1]) == null ? void 0 : _d.format("HH:mm")
|
|
159
159
|
}
|
|
160
|
-
))) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(props.className, "date-picker-action-bar") }, /* @__PURE__ */ import_react.default.createElement(
|
|
160
|
+
)))) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(props.className, "date-picker-action-bar") }, /* @__PURE__ */ import_react.default.createElement(
|
|
161
161
|
"div",
|
|
162
162
|
{
|
|
163
163
|
className: "date-picker-action-bar-right",
|
package/lib/ActionBar/index.less
CHANGED
|
@@ -27,17 +27,39 @@
|
|
|
27
27
|
flex-direction: column;
|
|
28
28
|
gap: 8px;
|
|
29
29
|
flex: 1;
|
|
30
|
-
.date-picker-
|
|
31
|
-
|
|
32
|
-
background: #ffffff;
|
|
33
|
-
border: 1px solid #D0D5DD;
|
|
34
|
-
border-radius: 8px;
|
|
35
|
-
height: 40px;
|
|
36
|
-
line-height: 40px;
|
|
30
|
+
.date-picker-time-wrapper {
|
|
31
|
+
position: relative;
|
|
37
32
|
width: 100%;
|
|
38
|
-
display: block;
|
|
39
33
|
min-width: 160px;
|
|
40
|
-
|
|
34
|
+
|
|
35
|
+
.date-picker-time-display {
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
height: 40px;
|
|
39
|
+
padding: 0 11px;
|
|
40
|
+
background: #ffffff;
|
|
41
|
+
border: 1px solid #D0D5DD;
|
|
42
|
+
border-radius: 8px;
|
|
43
|
+
font-size: 16px;
|
|
44
|
+
color: rgba(0, 0, 0, 0.88);
|
|
45
|
+
pointer-events: none;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.date-picker-input-time-native {
|
|
49
|
+
position: absolute;
|
|
50
|
+
top: 0;
|
|
51
|
+
left: 0;
|
|
52
|
+
width: 100%;
|
|
53
|
+
height: 100%;
|
|
54
|
+
opacity: 0;
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
-webkit-appearance: none;
|
|
57
|
+
appearance: none;
|
|
58
|
+
border: none;
|
|
59
|
+
padding: 0;
|
|
60
|
+
margin: 0;
|
|
61
|
+
font-size: 16px; // 防止 iOS focus 时页面缩放
|
|
62
|
+
}
|
|
41
63
|
}
|
|
42
64
|
.date-picker-action-time-item-label {
|
|
43
65
|
color: var(--Gray-700, #344054);
|
package/lib/Dialog/index.d.ts
CHANGED
package/lib/Drawer/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { ButtonProps } from "antd";
|
|
2
3
|
import { Dayjs } from "dayjs";
|
|
3
4
|
import "./index.less";
|
|
@@ -14,5 +15,5 @@ interface ActionBarProps {
|
|
|
14
15
|
okButtonProps?: ButtonProps;
|
|
15
16
|
cancelButtonProps?: ButtonProps;
|
|
16
17
|
}
|
|
17
|
-
declare const ActionBar: (props: ActionBarProps) => JSX.Element;
|
|
18
|
+
declare const ActionBar: (props: ActionBarProps) => React.JSX.Element;
|
|
18
19
|
export default ActionBar;
|
|
@@ -75,5 +75,5 @@ export interface PisellDateRangePickerProps {
|
|
|
75
75
|
/** 输入框只读 */
|
|
76
76
|
inputReadOnly: boolean;
|
|
77
77
|
}
|
|
78
|
-
declare const PisellDateRangePicker: (props: PisellDateRangePickerProps) => JSX.Element;
|
|
78
|
+
declare const PisellDateRangePicker: (props: PisellDateRangePickerProps) => React.JSX.Element;
|
|
79
79
|
export default PisellDateRangePicker;
|
|
@@ -79,5 +79,5 @@ export interface PisellDateRangePickerProps {
|
|
|
79
79
|
isHideCustomSelect?: boolean;
|
|
80
80
|
endDateDays?: number;
|
|
81
81
|
}
|
|
82
|
-
declare const PisellDateRangePicker: (props: PisellDateRangePickerProps) => JSX.Element;
|
|
82
|
+
declare const PisellDateRangePicker: (props: PisellDateRangePickerProps) => React.JSX.Element;
|
|
83
83
|
export default PisellDateRangePicker;
|
package/lib/Shortcuts/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import "./index.less";
|
|
2
3
|
import { Dayjs } from "dayjs";
|
|
3
4
|
export declare type PresetType = {
|
|
@@ -11,5 +12,5 @@ interface ShortcutsProps {
|
|
|
11
12
|
onChange: (day: [Dayjs, Dayjs], changeImportance?: "accept" | "set") => void;
|
|
12
13
|
changeImportance?: "accept" | "set";
|
|
13
14
|
}
|
|
14
|
-
declare const Shortcuts: (props: ShortcutsProps) => JSX.Element | null;
|
|
15
|
+
declare const Shortcuts: (props: ShortcutsProps) => React.JSX.Element | null;
|
|
15
16
|
export default Shortcuts;
|
package/lib/Toolbar/index.d.ts
CHANGED
|
@@ -11,5 +11,5 @@ interface BrowserSelectProps extends React.DetailedHTMLProps<React.SelectHTMLAtt
|
|
|
11
11
|
* @Author: zhiwei.Wang
|
|
12
12
|
* @Date: 2024-01-30 16:43
|
|
13
13
|
*/
|
|
14
|
-
declare const BrowserSelect: (props: BrowserSelectProps) => JSX.Element;
|
|
14
|
+
declare const BrowserSelect: (props: BrowserSelectProps) => React.JSX.Element;
|
|
15
15
|
export default BrowserSelect;
|
|
@@ -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;
|
|
@@ -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
|
};
|
package/lib/locales/index.js
CHANGED
|
@@ -36,19 +36,27 @@ 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",
|
|
47
52
|
"zh-cn": "zh-CN",
|
|
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
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PresetType } from
|
|
2
|
-
import { Dayjs } from
|
|
1
|
+
import { PresetType } from '../Shortcuts';
|
|
2
|
+
import { Dayjs } from 'dayjs';
|
|
3
3
|
export declare const getCurrentLocale: () => string;
|
|
4
4
|
export declare const isBrowser: boolean;
|
|
5
5
|
export declare const isMobile: () => boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/date-picker",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.9",
|
|
4
4
|
"sideEffects": [
|
|
5
5
|
"*.less"
|
|
6
6
|
],
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"antd": "^5.10.1",
|
|
27
27
|
"react": "^18.0.0",
|
|
28
28
|
"react-dom": "^18.0.0",
|
|
29
|
-
"@pisell/utils": "3.0.
|
|
29
|
+
"@pisell/utils": "3.0.3"
|
|
30
30
|
},
|
|
31
31
|
"files": [
|
|
32
32
|
"es",
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { PickersDayProps } from '@mui/x-date-pickers/PickersDay';
|
|
3
|
-
import { DateRangePickerDayClasses } from './dateRangePickerDayClasses';
|
|
4
|
-
export interface DateRangePickerDayProps<TDate> extends Omit<PickersDayProps<TDate>, 'classes' | 'onBlur' | 'onFocus' | 'onKeyDown'> {
|
|
5
|
-
/**
|
|
6
|
-
* Set to `true` if the `day` is in a highlighted date range.
|
|
7
|
-
*/
|
|
8
|
-
isHighlighting: boolean;
|
|
9
|
-
/**
|
|
10
|
-
* Set to `true` if the `day` is the end of a highlighted date range.
|
|
11
|
-
*/
|
|
12
|
-
isEndOfHighlighting: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Set to `true` if the `day` is the start of a highlighted date range.
|
|
15
|
-
*/
|
|
16
|
-
isStartOfHighlighting: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Set to `true` if the `day` is in a preview date range.
|
|
19
|
-
*/
|
|
20
|
-
isPreviewing: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Set to `true` if the `day` is the end of a previewing date range.
|
|
23
|
-
*/
|
|
24
|
-
isEndOfPreviewing: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Set to `true` if the `day` is the start of a previewing date range.
|
|
27
|
-
*/
|
|
28
|
-
isStartOfPreviewing: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Override or extend the styles applied to the component.
|
|
31
|
-
*/
|
|
32
|
-
classes?: Partial<DateRangePickerDayClasses>;
|
|
33
|
-
/**
|
|
34
|
-
* Indicates if the day should be visually selected.
|
|
35
|
-
*/
|
|
36
|
-
isVisuallySelected?: boolean;
|
|
37
|
-
}
|
|
38
|
-
declare type DateRangePickerDayComponent = <TDate>(props: DateRangePickerDayProps<TDate> & React.RefAttributes<HTMLButtonElement>) => JSX.Element;
|
|
39
|
-
/**
|
|
40
|
-
*
|
|
41
|
-
* Demos:
|
|
42
|
-
*
|
|
43
|
-
* - [Date Range Picker](https://mui.com/x/react-date-pickers/date-range-picker/)
|
|
44
|
-
*
|
|
45
|
-
* API:
|
|
46
|
-
*
|
|
47
|
-
* - [DateRangePickerDay API](https://mui.com/x/api/date-pickers/date-range-picker-day/)
|
|
48
|
-
*/
|
|
49
|
-
export declare const DateRangePickerDay: DateRangePickerDayComponent;
|
|
50
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { DateOrTimeViewWithMeridiem } from '@mui/x-date-pickers/internals/models';
|
|
2
|
-
import { UseDesktopRangePickerParams, UseDesktopRangePickerProps } from './useDesktopRangePicker.types';
|
|
3
|
-
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
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { DateOrTimeViewWithMeridiem } from '@mui/x-date-pickers/internals/models';
|
|
2
|
-
import { UseMobileRangePickerParams, UseMobileRangePickerProps } from './useMobileRangePicker.types';
|
|
3
|
-
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
|
-
};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { PickersDayProps } from '@mui/x-date-pickers/PickersDay';
|
|
3
|
-
import { DateRangePickerDayClasses } from './dateRangePickerDayClasses';
|
|
4
|
-
export interface DateRangePickerDayProps<TDate> extends Omit<PickersDayProps<TDate>, 'classes' | 'onBlur' | 'onFocus' | 'onKeyDown'> {
|
|
5
|
-
/**
|
|
6
|
-
* Set to `true` if the `day` is in a highlighted date range.
|
|
7
|
-
*/
|
|
8
|
-
isHighlighting: boolean;
|
|
9
|
-
/**
|
|
10
|
-
* Set to `true` if the `day` is the end of a highlighted date range.
|
|
11
|
-
*/
|
|
12
|
-
isEndOfHighlighting: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Set to `true` if the `day` is the start of a highlighted date range.
|
|
15
|
-
*/
|
|
16
|
-
isStartOfHighlighting: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Set to `true` if the `day` is in a preview date range.
|
|
19
|
-
*/
|
|
20
|
-
isPreviewing: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Set to `true` if the `day` is the end of a previewing date range.
|
|
23
|
-
*/
|
|
24
|
-
isEndOfPreviewing: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Set to `true` if the `day` is the start of a previewing date range.
|
|
27
|
-
*/
|
|
28
|
-
isStartOfPreviewing: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Override or extend the styles applied to the component.
|
|
31
|
-
*/
|
|
32
|
-
classes?: Partial<DateRangePickerDayClasses>;
|
|
33
|
-
/**
|
|
34
|
-
* Indicates if the day should be visually selected.
|
|
35
|
-
*/
|
|
36
|
-
isVisuallySelected?: boolean;
|
|
37
|
-
}
|
|
38
|
-
declare type DateRangePickerDayComponent = <TDate>(props: DateRangePickerDayProps<TDate> & React.RefAttributes<HTMLButtonElement>) => JSX.Element;
|
|
39
|
-
/**
|
|
40
|
-
*
|
|
41
|
-
* Demos:
|
|
42
|
-
*
|
|
43
|
-
* - [Date Range Picker](https://mui.com/x/react-date-pickers/date-range-picker/)
|
|
44
|
-
*
|
|
45
|
-
* API:
|
|
46
|
-
*
|
|
47
|
-
* - [DateRangePickerDay API](https://mui.com/x/api/date-pickers/date-range-picker-day/)
|
|
48
|
-
*/
|
|
49
|
-
export declare const DateRangePickerDay: DateRangePickerDayComponent;
|
|
50
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { DateOrTimeViewWithMeridiem } from '@mui/x-date-pickers/internals/models';
|
|
2
|
-
import { UseDesktopRangePickerParams, UseDesktopRangePickerProps } from './useDesktopRangePicker.types';
|
|
3
|
-
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
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { DateOrTimeViewWithMeridiem } from '@mui/x-date-pickers/internals/models';
|
|
2
|
-
import { UseMobileRangePickerParams, UseMobileRangePickerProps } from './useMobileRangePicker.types';
|
|
3
|
-
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
|
-
};
|