@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,9 +1,9 @@
|
|
|
1
|
-
function _typeof(
|
|
2
|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
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
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
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
7
|
import useEventCallback from '@mui/utils/useEventCallback';
|
|
8
8
|
import { unstable_useTimeField as useTimeField } from '@mui/x-date-pickers/TimeField';
|
|
9
9
|
import { useLocalizationContext, useUtils, useValidation, useControlledValueWithTimezone } from '@mui/x-date-pickers/internals';
|
|
@@ -2,7 +2,7 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
|
|
|
2
2
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
3
|
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); }
|
|
4
4
|
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; }
|
|
5
|
-
function _iterableToArrayLimit(
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
import useControlled from '@mui/utils/useControlled';
|
|
@@ -33,7 +33,7 @@ export var useRangePosition = function useRangePosition(props) {
|
|
|
33
33
|
var handleRangePositionChange = useEventCallback(function (newRangePosition) {
|
|
34
34
|
var _props$onRangePositio;
|
|
35
35
|
setRangePosition(newRangePosition);
|
|
36
|
-
(_props$onRangePositio = props.onRangePositionChange) === null || _props$onRangePositio === void 0
|
|
36
|
+
(_props$onRangePositio = props.onRangePositionChange) === null || _props$onRangePositio === void 0 || _props$onRangePositio.call(props, newRangePosition);
|
|
37
37
|
syncRangePositionWithSingleInputField(newRangePosition);
|
|
38
38
|
});
|
|
39
39
|
return {
|
|
@@ -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
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _typeof(
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
2
|
var _excluded = ["props", "ref"];
|
|
3
3
|
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); }
|
|
4
4
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
@@ -7,11 +7,11 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
7
7
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
8
8
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
9
9
|
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; }
|
|
10
|
-
function ownKeys(
|
|
11
|
-
function _objectSpread(
|
|
10
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
12
|
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; }
|
|
13
|
-
function _toPropertyKey(
|
|
14
|
-
function _toPrimitive(
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
14
|
+
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); }
|
|
15
15
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
16
16
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
17
17
|
import * as React from 'react';
|
|
@@ -74,8 +74,8 @@ export var useStaticRangePicker = function useStaticRangePicker(_ref2) {
|
|
|
74
74
|
}, /*#__PURE__*/React.createElement(Layout, _extends({}, layoutProps, slotProps === null || slotProps === void 0 ? void 0 : slotProps.layout, {
|
|
75
75
|
slots: slots,
|
|
76
76
|
slotProps: slotPropsForLayout,
|
|
77
|
-
sx: [].concat(_toConsumableArray(Array.isArray(sx) ? sx : [sx]), _toConsumableArray(Array.isArray(slotProps === null || slotProps === void 0
|
|
78
|
-
className: clsx(className, slotProps === null || slotProps === void 0
|
|
77
|
+
sx: [].concat(_toConsumableArray(Array.isArray(sx) ? sx : [sx]), _toConsumableArray(Array.isArray(slotProps === null || slotProps === void 0 || (_slotProps$layout = slotProps.layout) === null || _slotProps$layout === void 0 ? void 0 : _slotProps$layout.sx) ? slotProps.layout.sx : [slotProps === null || slotProps === void 0 || (_slotProps$layout2 = slotProps.layout) === null || _slotProps$layout2 === void 0 ? void 0 : _slotProps$layout2.sx])),
|
|
78
|
+
className: clsx(className, slotProps === null || slotProps === void 0 || (_slotProps$layout3 = slotProps.layout) === null || _slotProps$layout3 === void 0 ? void 0 : _slotProps$layout3.className),
|
|
79
79
|
ref: ref
|
|
80
80
|
}), renderCurrentView()));
|
|
81
81
|
};
|
|
@@ -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;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _typeof(
|
|
2
|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
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
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
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
7
|
export var splitDateRangeSections = function splitDateRangeSections(sections) {
|
|
8
8
|
var startDateSections = [];
|
|
9
9
|
var endDateSections = [];
|
|
@@ -2,7 +2,7 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
|
|
|
2
2
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
3
|
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); }
|
|
4
4
|
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; }
|
|
5
|
-
function _iterableToArrayLimit(
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
export function calculateRangeChange(_ref) {
|
|
8
8
|
var utils = _ref.utils,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
function _typeof(
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
2
|
var _excluded = ["shouldDisableDate"];
|
|
3
|
-
function ownKeys(
|
|
4
|
-
function _objectSpread(
|
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
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(
|
|
7
|
-
function _toPrimitive(
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
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); }
|
|
8
8
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
9
9
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
10
10
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
11
11
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
12
12
|
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); }
|
|
13
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
|
-
function _iterableToArrayLimit(
|
|
14
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
15
15
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
16
|
import { validateDate } from '@mui/x-date-pickers/internals';
|
|
17
17
|
import { isRangeValid } from "../date-utils";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
function _typeof(
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
2
|
var _excluded = ["shouldDisableDate"];
|
|
3
|
-
function ownKeys(
|
|
4
|
-
function _objectSpread(
|
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
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(
|
|
7
|
-
function _toPrimitive(
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
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); }
|
|
8
8
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
9
9
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
10
10
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
11
11
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
12
12
|
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); }
|
|
13
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
|
-
function _iterableToArrayLimit(
|
|
14
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
15
15
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
16
|
import { validateDateTime } from '@mui/x-date-pickers/internals';
|
|
17
17
|
import { isRangeValid } from "../date-utils";
|
|
@@ -2,7 +2,7 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
|
|
|
2
2
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
3
|
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); }
|
|
4
4
|
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; }
|
|
5
|
-
function _iterableToArrayLimit(
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import { validateTime } from '@mui/x-date-pickers/internals';
|
|
8
8
|
import { isRangeValid } from "../date-utils";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
function _typeof(
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
2
|
var _excluded = ["value", "referenceDate"];
|
|
3
3
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
4
4
|
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."); }
|
|
5
5
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
6
6
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
7
|
-
function ownKeys(
|
|
8
|
-
function _objectSpread(
|
|
7
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9
9
|
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; }
|
|
10
|
-
function _toPropertyKey(
|
|
11
|
-
function _toPrimitive(
|
|
10
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
11
|
+
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); }
|
|
12
12
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
13
13
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
14
14
|
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); }
|
|
15
15
|
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; }
|
|
16
|
-
function _iterableToArrayLimit(
|
|
16
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
17
17
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
18
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
19
19
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
package/es/locales/index.js
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
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
8
|
"zh-CN": zhCN,
|
|
7
9
|
"en-US": enUS,
|
|
8
|
-
"zh-TW": zhTW
|
|
10
|
+
"zh-TW": zhTW,
|
|
11
|
+
"zh-HK": zhTW,
|
|
12
|
+
"ja": ja,
|
|
13
|
+
"pt": pt
|
|
9
14
|
};
|
|
10
15
|
export var pLocaleMap = {
|
|
11
16
|
"en": "en-US",
|
|
@@ -13,7 +18,10 @@ export var pLocaleMap = {
|
|
|
13
18
|
"zh-tw": "zh-TW",
|
|
14
19
|
"en-US": "en-US",
|
|
15
20
|
"zh-CN": "zh-CN",
|
|
16
|
-
"zh-TW": "zh-TW"
|
|
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) {
|
|
@@ -25,5 +33,5 @@ export var getText = function getText(id, pLocale) {
|
|
|
25
33
|
}
|
|
26
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
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";
|
|
@@ -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;
|
package/lib/ActionBar/index.js
CHANGED
|
@@ -120,8 +120,7 @@ var ActionBar = (props) => {
|
|
|
120
120
|
value: value[0],
|
|
121
121
|
popupClassName: "date-picker-action-bar-time-picker-popup",
|
|
122
122
|
onChange: handleStartChange,
|
|
123
|
-
|
|
124
|
-
// onBlur: handleStartOnBlur,
|
|
123
|
+
onBlur: handleStartOnBlur,
|
|
125
124
|
inputReadOnly: true
|
|
126
125
|
}
|
|
127
126
|
), /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -132,8 +131,7 @@ var ActionBar = (props) => {
|
|
|
132
131
|
value: value[1],
|
|
133
132
|
popupClassName: "date-picker-action-bar-time-picker-popup",
|
|
134
133
|
onChange: handleEndChange,
|
|
135
|
-
|
|
136
|
-
// onBlur: handleEndOnBlur,
|
|
134
|
+
onBlur: handleEndOnBlur,
|
|
137
135
|
inputReadOnly: true
|
|
138
136
|
}
|
|
139
137
|
)) : /* @__PURE__ */ import_react.default.createElement("div", null)),
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import { BaseToolbarProps, ExportedBaseToolbarProps } from '@mui/x-date-pickers/internals';
|
|
2
3
|
import { DateRange } from '../internals/models';
|
|
3
4
|
import { UseRangePositionResponse } from '../internals/hooks/useRangePosition';
|
|
@@ -7,5 +8,5 @@ export interface DateRangePickerToolbarProps<TDate> extends Omit<BaseToolbarProp
|
|
|
7
8
|
}
|
|
8
9
|
export interface ExportedDateRangePickerToolbarProps extends ExportedBaseToolbarProps {
|
|
9
10
|
}
|
|
10
|
-
declare const DateRangePickerToolbar:
|
|
11
|
+
declare const DateRangePickerToolbar: React.ForwardRefExoticComponent<DateRangePickerToolbarProps<unknown> & React.RefAttributes<HTMLDivElement>>;
|
|
11
12
|
export { DateRangePickerToolbar };
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface LocaleContextType {
|
|
3
|
+
locale?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const LocaleContext: import("react").Context<LocaleContextType>;
|
|
6
|
+
export declare const LocaleProvider: import("react").Provider<LocaleContextType>;
|
|
7
|
+
export {};
|
|
@@ -77,5 +77,5 @@ export interface PisellDateRangePickerProps {
|
|
|
77
77
|
/** 是否禁用 */
|
|
78
78
|
disabled?: boolean;
|
|
79
79
|
}
|
|
80
|
-
declare const PisellDateRangePicker: (props: PisellDateRangePickerProps) => JSX.Element;
|
|
80
|
+
declare const PisellDateRangePicker: (props: PisellDateRangePickerProps) => React.JSX.Element;
|
|
81
81
|
export default PisellDateRangePicker;
|
|
@@ -118,8 +118,7 @@ var PisellDateRangePicker = (props) => {
|
|
|
118
118
|
propsOnChange == null ? void 0 : propsOnChange(_value);
|
|
119
119
|
};
|
|
120
120
|
const _presets = (0, import_react.useMemo)(() => {
|
|
121
|
-
if ((0, import_utils2.isMobile)())
|
|
122
|
-
return [];
|
|
121
|
+
if ((0, import_utils2.isMobile)()) return [];
|
|
123
122
|
return presets.map((item) => {
|
|
124
123
|
const getValue = () => {
|
|
125
124
|
if (typeof item.getValue === "function") {
|
|
@@ -209,7 +208,6 @@ var PisellDateRangePicker = (props) => {
|
|
|
209
208
|
/* @__PURE__ */ import_react.default.createElement(
|
|
210
209
|
import_DateRangePicker.DateRangePicker,
|
|
211
210
|
{
|
|
212
|
-
timezone: (Intl && Intl.DateTimeFormat) ? Intl.DateTimeFormat().resolvedOptions().timeZone : "",
|
|
213
211
|
disabled,
|
|
214
212
|
desktopModeMediaQuery,
|
|
215
213
|
onMonthChange,
|
|
@@ -262,29 +260,7 @@ var PisellDateRangePicker = (props) => {
|
|
|
262
260
|
popper: {
|
|
263
261
|
className: popupClassName,
|
|
264
262
|
disablePortal,
|
|
265
|
-
placement
|
|
266
|
-
modifiers: [
|
|
267
|
-
{
|
|
268
|
-
name: 'flip',
|
|
269
|
-
enabled: false,
|
|
270
|
-
options: {
|
|
271
|
-
altBoundary: true,
|
|
272
|
-
rootBoundary: 'viewport',
|
|
273
|
-
padding: 8,
|
|
274
|
-
},
|
|
275
|
-
},
|
|
276
|
-
{
|
|
277
|
-
name: 'preventOverflow',
|
|
278
|
-
enabled: true,
|
|
279
|
-
options: {
|
|
280
|
-
altAxis: true,
|
|
281
|
-
altBoundary: false,
|
|
282
|
-
tether: true,
|
|
283
|
-
rootBoundary: 'viewport',
|
|
284
|
-
padding: 8,
|
|
285
|
-
},
|
|
286
|
-
},
|
|
287
|
-
]
|
|
263
|
+
placement
|
|
288
264
|
},
|
|
289
265
|
dialog: {
|
|
290
266
|
disablePortal
|
|
@@ -26,8 +26,7 @@ var import_react = require("react");
|
|
|
26
26
|
var useCssVariables = (props) => {
|
|
27
27
|
const { variables, dom } = props;
|
|
28
28
|
(0, import_react.useEffect)(() => {
|
|
29
|
-
if (!dom)
|
|
30
|
-
return;
|
|
29
|
+
if (!dom) return;
|
|
31
30
|
Object.entries(variables).forEach(([key, value]) => {
|
|
32
31
|
dom.style.setProperty(key, value);
|
|
33
32
|
});
|
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 = {
|
|
@@ -10,5 +11,5 @@ interface ShortcutsProps {
|
|
|
10
11
|
onChange: (day: [Dayjs, Dayjs], changeImportance?: "accept" | "set") => void;
|
|
11
12
|
changeImportance?: "accept" | "set";
|
|
12
13
|
}
|
|
13
|
-
declare const Shortcuts: (props: ShortcutsProps) => JSX.Element | null;
|
|
14
|
+
declare const Shortcuts: (props: ShortcutsProps) => React.JSX.Element | null;
|
|
14
15
|
export default Shortcuts;
|