Latest updates from IceHrmPro
This commit is contained in:
4
web/node_modules/antd/es/date-picker/generatePicker/generateRangePicker.d.ts
generated
vendored
Normal file
4
web/node_modules/antd/es/date-picker/generatePicker/generateRangePicker.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import * as React from 'react';
|
||||
import { GenerateConfig } from 'rc-picker/lib/generate/index';
|
||||
import { RangePickerProps } from '.';
|
||||
export default function generateRangePicker<DateType>(generateConfig: GenerateConfig<DateType>): React.ComponentClass<RangePickerProps<DateType>>;
|
||||
172
web/node_modules/antd/es/date-picker/generatePicker/generateRangePicker.js
generated
vendored
Normal file
172
web/node_modules/antd/es/date-picker/generatePicker/generateRangePicker.js
generated
vendored
Normal file
@@ -0,0 +1,172 @@
|
||||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||||
|
||||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
|
||||
function _extends() { _extends = Object.assign || 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); }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||||
|
||||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
var __rest = this && this.__rest || function (s, e) {
|
||||
var t = {};
|
||||
|
||||
for (var p in s) {
|
||||
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
||||
}
|
||||
|
||||
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
||||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
|
||||
import * as React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import CalendarOutlined from '@ant-design/icons/CalendarOutlined';
|
||||
import ClockCircleOutlined from '@ant-design/icons/ClockCircleOutlined';
|
||||
import CloseCircleFilled from '@ant-design/icons/CloseCircleFilled';
|
||||
import SwapRightOutlined from '@ant-design/icons/SwapRightOutlined';
|
||||
import { RangePicker as RCRangePicker } from 'rc-picker';
|
||||
import enUS from '../locale/en_US';
|
||||
import { ConfigContext } from '../../config-provider';
|
||||
import SizeContext from '../../config-provider/SizeContext';
|
||||
import LocaleReceiver from '../../locale-provider/LocaleReceiver';
|
||||
import { getRangePlaceholder } from '../util';
|
||||
import { getTimeProps, Components } from '.';
|
||||
export default function generateRangePicker(generateConfig) {
|
||||
var RangePicker = /*#__PURE__*/function (_React$Component) {
|
||||
_inherits(RangePicker, _React$Component);
|
||||
|
||||
var _super = _createSuper(RangePicker);
|
||||
|
||||
function RangePicker() {
|
||||
var _this;
|
||||
|
||||
_classCallCheck(this, RangePicker);
|
||||
|
||||
_this = _super.apply(this, arguments);
|
||||
_this.pickerRef = React.createRef();
|
||||
|
||||
_this.focus = function () {
|
||||
if (_this.pickerRef.current) {
|
||||
_this.pickerRef.current.focus();
|
||||
}
|
||||
};
|
||||
|
||||
_this.blur = function () {
|
||||
if (_this.pickerRef.current) {
|
||||
_this.pickerRef.current.blur();
|
||||
}
|
||||
};
|
||||
|
||||
_this.getDefaultLocale = function () {
|
||||
var locale = _this.props.locale;
|
||||
|
||||
var result = _extends(_extends({}, enUS), locale);
|
||||
|
||||
result.lang = _extends(_extends({}, result.lang), (locale || {}).lang);
|
||||
return result;
|
||||
};
|
||||
|
||||
_this.renderPicker = function (locale) {
|
||||
var _this$context = _this.context,
|
||||
getPrefixCls = _this$context.getPrefixCls,
|
||||
direction = _this$context.direction;
|
||||
|
||||
var _a = _this.props,
|
||||
customizePrefixCls = _a.prefixCls,
|
||||
className = _a.className,
|
||||
customizeSize = _a.size,
|
||||
_a$bordered = _a.bordered,
|
||||
bordered = _a$bordered === void 0 ? true : _a$bordered,
|
||||
restProps = __rest(_a, ["prefixCls", "className", "size", "bordered"]);
|
||||
|
||||
var _this$props = _this.props,
|
||||
format = _this$props.format,
|
||||
showTime = _this$props.showTime,
|
||||
picker = _this$props.picker;
|
||||
var prefixCls = getPrefixCls('picker', customizePrefixCls);
|
||||
var additionalOverrideProps = {};
|
||||
additionalOverrideProps = _extends(_extends(_extends({}, additionalOverrideProps), showTime ? getTimeProps(_extends({
|
||||
format: format,
|
||||
picker: picker
|
||||
}, showTime)) : {}), picker === 'time' ? getTimeProps(_extends(_extends({
|
||||
format: format
|
||||
}, _this.props), {
|
||||
picker: picker
|
||||
})) : {});
|
||||
return /*#__PURE__*/React.createElement(SizeContext.Consumer, null, function (size) {
|
||||
var _classNames;
|
||||
|
||||
var mergedSize = customizeSize || size;
|
||||
return /*#__PURE__*/React.createElement(RCRangePicker, _extends({
|
||||
separator: /*#__PURE__*/React.createElement("span", {
|
||||
"aria-label": "to",
|
||||
className: "".concat(prefixCls, "-separator")
|
||||
}, /*#__PURE__*/React.createElement(SwapRightOutlined, null)),
|
||||
ref: _this.pickerRef,
|
||||
placeholder: getRangePlaceholder(picker, locale),
|
||||
suffixIcon: picker === 'time' ? /*#__PURE__*/React.createElement(ClockCircleOutlined, null) : /*#__PURE__*/React.createElement(CalendarOutlined, null),
|
||||
clearIcon: /*#__PURE__*/React.createElement(CloseCircleFilled, null),
|
||||
allowClear: true,
|
||||
transitionName: "slide-up"
|
||||
}, restProps, {
|
||||
className: classNames(className, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-").concat(mergedSize), mergedSize), _defineProperty(_classNames, "".concat(prefixCls, "-borderless"), !bordered), _classNames))
|
||||
}, additionalOverrideProps, {
|
||||
locale: locale.lang,
|
||||
prefixCls: prefixCls,
|
||||
generateConfig: generateConfig,
|
||||
prevIcon: /*#__PURE__*/React.createElement("span", {
|
||||
className: "".concat(prefixCls, "-prev-icon")
|
||||
}),
|
||||
nextIcon: /*#__PURE__*/React.createElement("span", {
|
||||
className: "".concat(prefixCls, "-next-icon")
|
||||
}),
|
||||
superPrevIcon: /*#__PURE__*/React.createElement("span", {
|
||||
className: "".concat(prefixCls, "-super-prev-icon")
|
||||
}),
|
||||
superNextIcon: /*#__PURE__*/React.createElement("span", {
|
||||
className: "".concat(prefixCls, "-super-next-icon")
|
||||
}),
|
||||
components: Components,
|
||||
direction: direction
|
||||
}));
|
||||
});
|
||||
};
|
||||
|
||||
return _this;
|
||||
}
|
||||
|
||||
_createClass(RangePicker, [{
|
||||
key: "render",
|
||||
value: function render() {
|
||||
return /*#__PURE__*/React.createElement(LocaleReceiver, {
|
||||
componentName: "DatePicker",
|
||||
defaultLocale: this.getDefaultLocale
|
||||
}, this.renderPicker);
|
||||
}
|
||||
}]);
|
||||
|
||||
return RangePicker;
|
||||
}(React.Component);
|
||||
|
||||
RangePicker.contextType = ConfigContext;
|
||||
return RangePicker;
|
||||
}
|
||||
26
web/node_modules/antd/es/date-picker/generatePicker/generateSinglePicker.d.ts
generated
vendored
Normal file
26
web/node_modules/antd/es/date-picker/generatePicker/generateSinglePicker.d.ts
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
import * as React from 'react';
|
||||
import { GenerateConfig } from 'rc-picker/lib/generate/index';
|
||||
import { PickerProps, PickerLocale } from '.';
|
||||
export default function generatePicker<DateType>(generateConfig: GenerateConfig<DateType>): {
|
||||
DatePicker: React.ComponentClass<PickerProps<DateType>, any>;
|
||||
WeekPicker: React.ComponentClass<Pick<Pick<import("rc-picker/lib/Picker").PickerDateProps<DateType>, "style" | "direction" | "prefixCls" | "className" | "disabled" | "open" | "aria-label" | "autoFocus" | "name" | "placeholder" | "value" | "defaultValue" | "tabIndex" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onFocus" | "onBlur" | "onChange" | "onClick" | "onContextMenu" | "onMouseDown" | "onMouseEnter" | "onMouseLeave" | "onMouseUp" | "onSelect" | "picker" | "mode" | "defaultPickerValue" | "disabledDate" | "dateRender" | "monthCellRender" | "renderExtraFooter" | "onPanelChange" | "onOk" | "dropdownClassName" | "dropdownAlign" | "popupStyle" | "transitionName" | "allowClear" | "defaultOpen" | "inputReadOnly" | "format" | "suffixIcon" | "clearIcon" | "getPopupContainer" | "onOpenChange" | "pickerRef" | "showToday" | "showTime" | "disabledTime"> & {
|
||||
locale?: PickerLocale | undefined;
|
||||
size?: import("../../config-provider/SizeContext").SizeType;
|
||||
bordered?: boolean | undefined;
|
||||
}, "size" | "style" | "direction" | "prefixCls" | "className" | "disabled" | "open" | "aria-label" | "autoFocus" | "name" | "placeholder" | "value" | "defaultValue" | "tabIndex" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onFocus" | "onBlur" | "onChange" | "onClick" | "onContextMenu" | "onMouseDown" | "onMouseEnter" | "onMouseLeave" | "onMouseUp" | "onSelect" | "locale" | "mode" | "defaultPickerValue" | "disabledDate" | "dateRender" | "monthCellRender" | "renderExtraFooter" | "onPanelChange" | "onOk" | "dropdownClassName" | "dropdownAlign" | "popupStyle" | "transitionName" | "allowClear" | "defaultOpen" | "inputReadOnly" | "format" | "suffixIcon" | "clearIcon" | "getPopupContainer" | "onOpenChange" | "pickerRef" | "showToday" | "showTime" | "disabledTime" | "bordered">, any>;
|
||||
MonthPicker: React.ComponentClass<Pick<Pick<import("rc-picker/lib/Picker").PickerDateProps<DateType>, "style" | "direction" | "prefixCls" | "className" | "disabled" | "open" | "aria-label" | "autoFocus" | "name" | "placeholder" | "value" | "defaultValue" | "tabIndex" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onFocus" | "onBlur" | "onChange" | "onClick" | "onContextMenu" | "onMouseDown" | "onMouseEnter" | "onMouseLeave" | "onMouseUp" | "onSelect" | "picker" | "mode" | "defaultPickerValue" | "disabledDate" | "dateRender" | "monthCellRender" | "renderExtraFooter" | "onPanelChange" | "onOk" | "dropdownClassName" | "dropdownAlign" | "popupStyle" | "transitionName" | "allowClear" | "defaultOpen" | "inputReadOnly" | "format" | "suffixIcon" | "clearIcon" | "getPopupContainer" | "onOpenChange" | "pickerRef" | "showToday" | "showTime" | "disabledTime"> & {
|
||||
locale?: PickerLocale | undefined;
|
||||
size?: import("../../config-provider/SizeContext").SizeType;
|
||||
bordered?: boolean | undefined;
|
||||
}, "size" | "style" | "direction" | "prefixCls" | "className" | "disabled" | "open" | "aria-label" | "autoFocus" | "name" | "placeholder" | "value" | "defaultValue" | "tabIndex" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onFocus" | "onBlur" | "onChange" | "onClick" | "onContextMenu" | "onMouseDown" | "onMouseEnter" | "onMouseLeave" | "onMouseUp" | "onSelect" | "locale" | "mode" | "defaultPickerValue" | "disabledDate" | "dateRender" | "monthCellRender" | "renderExtraFooter" | "onPanelChange" | "onOk" | "dropdownClassName" | "dropdownAlign" | "popupStyle" | "transitionName" | "allowClear" | "defaultOpen" | "inputReadOnly" | "format" | "suffixIcon" | "clearIcon" | "getPopupContainer" | "onOpenChange" | "pickerRef" | "showToday" | "showTime" | "disabledTime" | "bordered">, any>;
|
||||
YearPicker: React.ComponentClass<Pick<Pick<import("rc-picker/lib/Picker").PickerDateProps<DateType>, "style" | "direction" | "prefixCls" | "className" | "disabled" | "open" | "aria-label" | "autoFocus" | "name" | "placeholder" | "value" | "defaultValue" | "tabIndex" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onFocus" | "onBlur" | "onChange" | "onClick" | "onContextMenu" | "onMouseDown" | "onMouseEnter" | "onMouseLeave" | "onMouseUp" | "onSelect" | "picker" | "mode" | "defaultPickerValue" | "disabledDate" | "dateRender" | "monthCellRender" | "renderExtraFooter" | "onPanelChange" | "onOk" | "dropdownClassName" | "dropdownAlign" | "popupStyle" | "transitionName" | "allowClear" | "defaultOpen" | "inputReadOnly" | "format" | "suffixIcon" | "clearIcon" | "getPopupContainer" | "onOpenChange" | "pickerRef" | "showToday" | "showTime" | "disabledTime"> & {
|
||||
locale?: PickerLocale | undefined;
|
||||
size?: import("../../config-provider/SizeContext").SizeType;
|
||||
bordered?: boolean | undefined;
|
||||
}, "size" | "style" | "direction" | "prefixCls" | "className" | "disabled" | "open" | "aria-label" | "autoFocus" | "name" | "placeholder" | "value" | "defaultValue" | "tabIndex" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onFocus" | "onBlur" | "onChange" | "onClick" | "onContextMenu" | "onMouseDown" | "onMouseEnter" | "onMouseLeave" | "onMouseUp" | "onSelect" | "locale" | "mode" | "defaultPickerValue" | "disabledDate" | "dateRender" | "monthCellRender" | "renderExtraFooter" | "onPanelChange" | "onOk" | "dropdownClassName" | "dropdownAlign" | "popupStyle" | "transitionName" | "allowClear" | "defaultOpen" | "inputReadOnly" | "format" | "suffixIcon" | "clearIcon" | "getPopupContainer" | "onOpenChange" | "pickerRef" | "showToday" | "showTime" | "disabledTime" | "bordered">, any>;
|
||||
TimePicker: React.ComponentClass<Pick<Pick<import("rc-picker/lib/Picker").PickerTimeProps<DateType>, "style" | "direction" | "prefixCls" | "className" | "disabled" | "open" | "aria-label" | "autoFocus" | "name" | "placeholder" | "value" | "defaultValue" | "tabIndex" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onFocus" | "onBlur" | "onChange" | "onClick" | "onContextMenu" | "onMouseDown" | "onMouseEnter" | "onMouseLeave" | "onMouseUp" | "onSelect" | "picker" | "mode" | "defaultPickerValue" | "disabledDate" | "dateRender" | "monthCellRender" | "renderExtraFooter" | "onPanelChange" | "onOk" | "dropdownClassName" | "dropdownAlign" | "popupStyle" | "transitionName" | "allowClear" | "defaultOpen" | "inputReadOnly" | "format" | "suffixIcon" | "clearIcon" | "getPopupContainer" | "onOpenChange" | "pickerRef" | "showHour" | "showMinute" | "showSecond" | "use12Hours" | "hourStep" | "minuteStep" | "secondStep" | "hideDisabledOptions" | "disabledHours" | "disabledMinutes" | "disabledSeconds" | "defaultOpenValue"> & {
|
||||
locale?: PickerLocale | undefined;
|
||||
size?: import("../../config-provider/SizeContext").SizeType;
|
||||
bordered?: boolean | undefined;
|
||||
}, "size" | "style" | "direction" | "prefixCls" | "className" | "disabled" | "open" | "aria-label" | "autoFocus" | "name" | "placeholder" | "value" | "defaultValue" | "tabIndex" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onFocus" | "onBlur" | "onChange" | "onClick" | "onContextMenu" | "onMouseDown" | "onMouseEnter" | "onMouseLeave" | "onMouseUp" | "onSelect" | "locale" | "mode" | "defaultPickerValue" | "disabledDate" | "dateRender" | "monthCellRender" | "renderExtraFooter" | "onPanelChange" | "onOk" | "dropdownClassName" | "dropdownAlign" | "popupStyle" | "transitionName" | "allowClear" | "defaultOpen" | "inputReadOnly" | "format" | "suffixIcon" | "clearIcon" | "getPopupContainer" | "onOpenChange" | "pickerRef" | "showHour" | "showMinute" | "showSecond" | "use12Hours" | "hourStep" | "minuteStep" | "secondStep" | "hideDisabledOptions" | "disabledHours" | "disabledMinutes" | "disabledSeconds" | "defaultOpenValue" | "bordered">, any>;
|
||||
};
|
||||
194
web/node_modules/antd/es/date-picker/generatePicker/generateSinglePicker.js
generated
vendored
Normal file
194
web/node_modules/antd/es/date-picker/generatePicker/generateSinglePicker.js
generated
vendored
Normal file
@@ -0,0 +1,194 @@
|
||||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||||
|
||||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
|
||||
function _extends() { _extends = Object.assign || 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); }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||||
|
||||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
var __rest = this && this.__rest || function (s, e) {
|
||||
var t = {};
|
||||
|
||||
for (var p in s) {
|
||||
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
||||
}
|
||||
|
||||
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
||||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
|
||||
import * as React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import CalendarOutlined from '@ant-design/icons/CalendarOutlined';
|
||||
import ClockCircleOutlined from '@ant-design/icons/ClockCircleOutlined';
|
||||
import CloseCircleFilled from '@ant-design/icons/CloseCircleFilled';
|
||||
import RCPicker from 'rc-picker';
|
||||
import enUS from '../locale/en_US';
|
||||
import { getPlaceholder } from '../util';
|
||||
import { ConfigContext } from '../../config-provider';
|
||||
import LocaleReceiver from '../../locale-provider/LocaleReceiver';
|
||||
import SizeContext from '../../config-provider/SizeContext';
|
||||
import { getTimeProps, Components } from '.';
|
||||
export default function generatePicker(generateConfig) {
|
||||
function getPicker(picker, displayName) {
|
||||
var Picker = /*#__PURE__*/function (_React$Component) {
|
||||
_inherits(Picker, _React$Component);
|
||||
|
||||
var _super = _createSuper(Picker);
|
||||
|
||||
function Picker() {
|
||||
var _this;
|
||||
|
||||
_classCallCheck(this, Picker);
|
||||
|
||||
_this = _super.apply(this, arguments);
|
||||
_this.pickerRef = React.createRef();
|
||||
|
||||
_this.focus = function () {
|
||||
if (_this.pickerRef.current) {
|
||||
_this.pickerRef.current.focus();
|
||||
}
|
||||
};
|
||||
|
||||
_this.blur = function () {
|
||||
if (_this.pickerRef.current) {
|
||||
_this.pickerRef.current.blur();
|
||||
}
|
||||
};
|
||||
|
||||
_this.getDefaultLocale = function () {
|
||||
var locale = _this.props.locale;
|
||||
|
||||
var result = _extends(_extends({}, enUS), locale);
|
||||
|
||||
result.lang = _extends(_extends({}, result.lang), (locale || {}).lang);
|
||||
return result;
|
||||
};
|
||||
|
||||
_this.renderPicker = function (locale) {
|
||||
var _this$context = _this.context,
|
||||
getPrefixCls = _this$context.getPrefixCls,
|
||||
direction = _this$context.direction;
|
||||
|
||||
var _a = _this.props,
|
||||
customizePrefixCls = _a.prefixCls,
|
||||
className = _a.className,
|
||||
customizeSize = _a.size,
|
||||
_a$bordered = _a.bordered,
|
||||
bordered = _a$bordered === void 0 ? true : _a$bordered,
|
||||
restProps = __rest(_a, ["prefixCls", "className", "size", "bordered"]);
|
||||
|
||||
var _this$props = _this.props,
|
||||
format = _this$props.format,
|
||||
showTime = _this$props.showTime;
|
||||
var prefixCls = getPrefixCls('picker', customizePrefixCls);
|
||||
var additionalProps = {
|
||||
showToday: true
|
||||
};
|
||||
var additionalOverrideProps = {};
|
||||
|
||||
if (picker) {
|
||||
additionalOverrideProps.picker = picker;
|
||||
}
|
||||
|
||||
var mergedPicker = picker || _this.props.picker;
|
||||
additionalOverrideProps = _extends(_extends(_extends({}, additionalOverrideProps), showTime ? getTimeProps(_extends({
|
||||
format: format,
|
||||
picker: mergedPicker
|
||||
}, showTime)) : {}), mergedPicker === 'time' ? getTimeProps(_extends(_extends({
|
||||
format: format
|
||||
}, _this.props), {
|
||||
picker: mergedPicker
|
||||
})) : {});
|
||||
return /*#__PURE__*/React.createElement(SizeContext.Consumer, null, function (size) {
|
||||
var _classNames;
|
||||
|
||||
var mergedSize = customizeSize || size;
|
||||
return /*#__PURE__*/React.createElement(RCPicker, _extends({
|
||||
ref: _this.pickerRef,
|
||||
placeholder: getPlaceholder(mergedPicker, locale),
|
||||
suffixIcon: mergedPicker === 'time' ? /*#__PURE__*/React.createElement(ClockCircleOutlined, null) : /*#__PURE__*/React.createElement(CalendarOutlined, null),
|
||||
clearIcon: /*#__PURE__*/React.createElement(CloseCircleFilled, null),
|
||||
allowClear: true,
|
||||
transitionName: "slide-up"
|
||||
}, additionalProps, restProps, additionalOverrideProps, {
|
||||
locale: locale.lang,
|
||||
className: classNames(className, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-").concat(mergedSize), mergedSize), _defineProperty(_classNames, "".concat(prefixCls, "-borderless"), !bordered), _classNames)),
|
||||
prefixCls: prefixCls,
|
||||
generateConfig: generateConfig,
|
||||
prevIcon: /*#__PURE__*/React.createElement("span", {
|
||||
className: "".concat(prefixCls, "-prev-icon")
|
||||
}),
|
||||
nextIcon: /*#__PURE__*/React.createElement("span", {
|
||||
className: "".concat(prefixCls, "-next-icon")
|
||||
}),
|
||||
superPrevIcon: /*#__PURE__*/React.createElement("span", {
|
||||
className: "".concat(prefixCls, "-super-prev-icon")
|
||||
}),
|
||||
superNextIcon: /*#__PURE__*/React.createElement("span", {
|
||||
className: "".concat(prefixCls, "-super-next-icon")
|
||||
}),
|
||||
components: Components,
|
||||
direction: direction
|
||||
}));
|
||||
});
|
||||
};
|
||||
|
||||
return _this;
|
||||
}
|
||||
|
||||
_createClass(Picker, [{
|
||||
key: "render",
|
||||
value: function render() {
|
||||
return /*#__PURE__*/React.createElement(LocaleReceiver, {
|
||||
componentName: "DatePicker",
|
||||
defaultLocale: this.getDefaultLocale
|
||||
}, this.renderPicker);
|
||||
}
|
||||
}]);
|
||||
|
||||
return Picker;
|
||||
}(React.Component);
|
||||
|
||||
Picker.contextType = ConfigContext;
|
||||
|
||||
if (displayName) {
|
||||
Picker.displayName = displayName;
|
||||
}
|
||||
|
||||
return Picker;
|
||||
}
|
||||
|
||||
var DatePicker = getPicker();
|
||||
var WeekPicker = getPicker('week', 'WeekPicker');
|
||||
var MonthPicker = getPicker('month', 'MonthPicker');
|
||||
var YearPicker = getPicker('year', 'YearPicker');
|
||||
var TimePicker = getPicker('time', 'TimePicker');
|
||||
return {
|
||||
DatePicker: DatePicker,
|
||||
WeekPicker: WeekPicker,
|
||||
MonthPicker: MonthPicker,
|
||||
YearPicker: YearPicker,
|
||||
TimePicker: TimePicker
|
||||
};
|
||||
}
|
||||
62
web/node_modules/antd/es/date-picker/generatePicker/index.d.ts
generated
vendored
Normal file
62
web/node_modules/antd/es/date-picker/generatePicker/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
import * as React from 'react';
|
||||
import { GenerateConfig } from 'rc-picker/lib/generate/index';
|
||||
import { PickerBaseProps as RCPickerBaseProps, PickerDateProps as RCPickerDateProps, PickerTimeProps as RCPickerTimeProps } from 'rc-picker/lib/Picker';
|
||||
import { SharedTimeProps } from 'rc-picker/lib/panels/TimePanel';
|
||||
import { RangePickerBaseProps as RCRangePickerBaseProps, RangePickerDateProps as RCRangePickerDateProps, RangePickerTimeProps as RCRangePickerTimeProps } from 'rc-picker/lib/RangePicker';
|
||||
import { PickerMode, Locale as RcPickerLocale } from 'rc-picker/lib/interface';
|
||||
import { SizeType } from '../../config-provider/SizeContext';
|
||||
import PickerButton from '../PickerButton';
|
||||
import PickerTag from '../PickerTag';
|
||||
import { TimePickerLocale } from '../../time-picker';
|
||||
export declare const Components: {
|
||||
button: typeof PickerButton;
|
||||
rangeItem: typeof PickerTag;
|
||||
};
|
||||
export declare function getTimeProps<DateType>(props: {
|
||||
format?: string;
|
||||
picker?: PickerMode;
|
||||
} & SharedTimeProps<DateType>): SharedTimeProps<DateType> | {
|
||||
showTime: SharedTimeProps<DateType>;
|
||||
};
|
||||
declare type InjectDefaultProps<Props> = Omit<Props, 'locale' | 'generateConfig' | 'prevIcon' | 'nextIcon' | 'superPrevIcon' | 'superNextIcon' | 'hideHeader' | 'components'> & {
|
||||
locale?: PickerLocale;
|
||||
size?: SizeType;
|
||||
bordered?: boolean;
|
||||
};
|
||||
export declare type PickerLocale = {
|
||||
lang: RcPickerLocale & AdditionalPickerLocaleLangProps;
|
||||
timePickerLocale: TimePickerLocale;
|
||||
} & AdditionalPickerLocaleProps;
|
||||
export declare type AdditionalPickerLocaleProps = {
|
||||
dateFormat?: string;
|
||||
dateTimeFormat?: string;
|
||||
weekFormat?: string;
|
||||
monthFormat?: string;
|
||||
};
|
||||
export declare type AdditionalPickerLocaleLangProps = {
|
||||
placeholder: string;
|
||||
yearPlaceholder?: string;
|
||||
quarterPlaceholder?: string;
|
||||
monthPlaceholder?: string;
|
||||
weekPlaceholder?: string;
|
||||
rangeYearPlaceholder?: [string, string];
|
||||
rangeMonthPlaceholder?: [string, string];
|
||||
rangeWeekPlaceholder?: [string, string];
|
||||
rangePlaceholder?: [string, string];
|
||||
};
|
||||
export declare type PickerBaseProps<DateType> = InjectDefaultProps<RCPickerBaseProps<DateType>>;
|
||||
export declare type PickerDateProps<DateType> = InjectDefaultProps<RCPickerDateProps<DateType>>;
|
||||
export declare type PickerTimeProps<DateType> = InjectDefaultProps<RCPickerTimeProps<DateType>>;
|
||||
export declare type PickerProps<DateType> = PickerBaseProps<DateType> | PickerDateProps<DateType> | PickerTimeProps<DateType>;
|
||||
export declare type RangePickerBaseProps<DateType> = InjectDefaultProps<RCRangePickerBaseProps<DateType>>;
|
||||
export declare type RangePickerDateProps<DateType> = InjectDefaultProps<RCRangePickerDateProps<DateType>>;
|
||||
export declare type RangePickerTimeProps<DateType> = InjectDefaultProps<RCRangePickerTimeProps<DateType>>;
|
||||
export declare type RangePickerProps<DateType> = RangePickerBaseProps<DateType> | RangePickerDateProps<DateType> | RangePickerTimeProps<DateType>;
|
||||
declare function generatePicker<DateType>(generateConfig: GenerateConfig<DateType>): React.ComponentClass<PickerProps<DateType>, any> & {
|
||||
WeekPicker: React.ComponentClass<Pick<InjectDefaultProps<RCPickerDateProps<DateType>>, "size" | "style" | "direction" | "prefixCls" | "className" | "disabled" | "open" | "aria-label" | "autoFocus" | "name" | "placeholder" | "value" | "defaultValue" | "tabIndex" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onFocus" | "onBlur" | "onChange" | "onClick" | "onContextMenu" | "onMouseDown" | "onMouseEnter" | "onMouseLeave" | "onMouseUp" | "onSelect" | "locale" | "mode" | "defaultPickerValue" | "disabledDate" | "dateRender" | "monthCellRender" | "renderExtraFooter" | "onPanelChange" | "onOk" | "dropdownClassName" | "dropdownAlign" | "popupStyle" | "transitionName" | "allowClear" | "defaultOpen" | "inputReadOnly" | "format" | "suffixIcon" | "clearIcon" | "getPopupContainer" | "onOpenChange" | "pickerRef" | "showToday" | "showTime" | "disabledTime" | "bordered">, any>;
|
||||
MonthPicker: React.ComponentClass<Pick<InjectDefaultProps<RCPickerDateProps<DateType>>, "size" | "style" | "direction" | "prefixCls" | "className" | "disabled" | "open" | "aria-label" | "autoFocus" | "name" | "placeholder" | "value" | "defaultValue" | "tabIndex" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onFocus" | "onBlur" | "onChange" | "onClick" | "onContextMenu" | "onMouseDown" | "onMouseEnter" | "onMouseLeave" | "onMouseUp" | "onSelect" | "locale" | "mode" | "defaultPickerValue" | "disabledDate" | "dateRender" | "monthCellRender" | "renderExtraFooter" | "onPanelChange" | "onOk" | "dropdownClassName" | "dropdownAlign" | "popupStyle" | "transitionName" | "allowClear" | "defaultOpen" | "inputReadOnly" | "format" | "suffixIcon" | "clearIcon" | "getPopupContainer" | "onOpenChange" | "pickerRef" | "showToday" | "showTime" | "disabledTime" | "bordered">, any>;
|
||||
YearPicker: React.ComponentClass<Pick<InjectDefaultProps<RCPickerDateProps<DateType>>, "size" | "style" | "direction" | "prefixCls" | "className" | "disabled" | "open" | "aria-label" | "autoFocus" | "name" | "placeholder" | "value" | "defaultValue" | "tabIndex" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onFocus" | "onBlur" | "onChange" | "onClick" | "onContextMenu" | "onMouseDown" | "onMouseEnter" | "onMouseLeave" | "onMouseUp" | "onSelect" | "locale" | "mode" | "defaultPickerValue" | "disabledDate" | "dateRender" | "monthCellRender" | "renderExtraFooter" | "onPanelChange" | "onOk" | "dropdownClassName" | "dropdownAlign" | "popupStyle" | "transitionName" | "allowClear" | "defaultOpen" | "inputReadOnly" | "format" | "suffixIcon" | "clearIcon" | "getPopupContainer" | "onOpenChange" | "pickerRef" | "showToday" | "showTime" | "disabledTime" | "bordered">, any>;
|
||||
RangePicker: React.ComponentClass<RangePickerProps<DateType>, any>;
|
||||
TimePicker: React.ComponentClass<Pick<InjectDefaultProps<RCPickerTimeProps<DateType>>, "size" | "style" | "direction" | "prefixCls" | "className" | "disabled" | "open" | "aria-label" | "autoFocus" | "name" | "placeholder" | "value" | "defaultValue" | "tabIndex" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onFocus" | "onBlur" | "onChange" | "onClick" | "onContextMenu" | "onMouseDown" | "onMouseEnter" | "onMouseLeave" | "onMouseUp" | "onSelect" | "locale" | "mode" | "defaultPickerValue" | "disabledDate" | "dateRender" | "monthCellRender" | "renderExtraFooter" | "onPanelChange" | "onOk" | "dropdownClassName" | "dropdownAlign" | "popupStyle" | "transitionName" | "allowClear" | "defaultOpen" | "inputReadOnly" | "format" | "suffixIcon" | "clearIcon" | "getPopupContainer" | "onOpenChange" | "pickerRef" | "showHour" | "showMinute" | "showSecond" | "use12Hours" | "hourStep" | "minuteStep" | "secondStep" | "hideDisabledOptions" | "disabledHours" | "disabledMinutes" | "disabledSeconds" | "defaultOpenValue" | "bordered">, any>;
|
||||
};
|
||||
export default generatePicker;
|
||||
78
web/node_modules/antd/es/date-picker/generatePicker/index.js
generated
vendored
Normal file
78
web/node_modules/antd/es/date-picker/generatePicker/index.js
generated
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
function _extends() { _extends = Object.assign || 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); }
|
||||
|
||||
import PickerButton from '../PickerButton';
|
||||
import PickerTag from '../PickerTag';
|
||||
import generateSinglePicker from './generateSinglePicker';
|
||||
import generateRangePicker from './generateRangePicker';
|
||||
export var Components = {
|
||||
button: PickerButton,
|
||||
rangeItem: PickerTag
|
||||
};
|
||||
|
||||
function toArray(list) {
|
||||
if (!list) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return Array.isArray(list) ? list : [list];
|
||||
}
|
||||
|
||||
export function getTimeProps(props) {
|
||||
var format = props.format,
|
||||
picker = props.picker,
|
||||
showHour = props.showHour,
|
||||
showMinute = props.showMinute,
|
||||
showSecond = props.showSecond,
|
||||
use12Hours = props.use12Hours;
|
||||
var firstFormat = toArray(format)[0];
|
||||
|
||||
var showTimeObj = _extends({}, props);
|
||||
|
||||
if (firstFormat) {
|
||||
if (!firstFormat.includes('s') && showSecond === undefined) {
|
||||
showTimeObj.showSecond = false;
|
||||
}
|
||||
|
||||
if (!firstFormat.includes('m') && showMinute === undefined) {
|
||||
showTimeObj.showMinute = false;
|
||||
}
|
||||
|
||||
if (!firstFormat.includes('H') && !firstFormat.includes('h') && showHour === undefined) {
|
||||
showTimeObj.showHour = false;
|
||||
}
|
||||
|
||||
if ((firstFormat.includes('a') || firstFormat.includes('A')) && use12Hours === undefined) {
|
||||
showTimeObj.use12Hours = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (picker === 'time') {
|
||||
return showTimeObj;
|
||||
}
|
||||
|
||||
return {
|
||||
showTime: showTimeObj
|
||||
};
|
||||
}
|
||||
|
||||
function generatePicker(generateConfig) {
|
||||
// =========================== Picker ===========================
|
||||
var _generateSinglePicker = generateSinglePicker(generateConfig),
|
||||
DatePicker = _generateSinglePicker.DatePicker,
|
||||
WeekPicker = _generateSinglePicker.WeekPicker,
|
||||
MonthPicker = _generateSinglePicker.MonthPicker,
|
||||
YearPicker = _generateSinglePicker.YearPicker,
|
||||
TimePicker = _generateSinglePicker.TimePicker; // ======================== Range Picker ========================
|
||||
|
||||
|
||||
var RangePicker = generateRangePicker(generateConfig);
|
||||
var MergedDatePicker = DatePicker;
|
||||
MergedDatePicker.WeekPicker = WeekPicker;
|
||||
MergedDatePicker.MonthPicker = MonthPicker;
|
||||
MergedDatePicker.YearPicker = YearPicker;
|
||||
MergedDatePicker.RangePicker = RangePicker;
|
||||
MergedDatePicker.TimePicker = TimePicker;
|
||||
return MergedDatePicker;
|
||||
}
|
||||
|
||||
export default generatePicker;
|
||||
Reference in New Issue
Block a user