Latest updates from IceHrmPro

This commit is contained in:
Thilina Pituwala
2020-05-20 18:47:29 +02:00
parent 60c92d7935
commit 7453a58aad
18012 changed files with 2089245 additions and 10173 deletions

8
web/node_modules/antd/lib/upload/Dragger.d.ts generated vendored Normal file
View File

@@ -0,0 +1,8 @@
import * as React from 'react';
import { UploadProps } from './interface';
export declare type DraggerProps = UploadProps & {
height?: number;
};
export default class Dragger extends React.Component<DraggerProps, any> {
render(): JSX.Element;
}

72
web/node_modules/antd/lib/upload/Dragger.js generated vendored Normal file
View File

@@ -0,0 +1,72 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(require("react"));
var _Upload = _interopRequireDefault(require("./Upload"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
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 _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); }
// stick class comoponent to avoid React ref warning inside Form
// https://github.com/ant-design/ant-design/issues/18707
// eslint-disable-next-line react/prefer-stateless-function
var Dragger = /*#__PURE__*/function (_React$Component) {
_inherits(Dragger, _React$Component);
var _super = _createSuper(Dragger);
function Dragger() {
_classCallCheck(this, Dragger);
return _super.apply(this, arguments);
}
_createClass(Dragger, [{
key: "render",
value: function render() {
var props = this.props;
return /*#__PURE__*/React.createElement(_Upload["default"], _extends({}, props, {
type: "drag",
style: _extends(_extends({}, props.style), {
height: props.height
})
}));
}
}]);
return Dragger;
}(React.Component);
exports["default"] = Dragger;

46
web/node_modules/antd/lib/upload/Upload.d.ts generated vendored Normal file
View File

@@ -0,0 +1,46 @@
import * as React from 'react';
import Dragger from './Dragger';
import { RcFile, UploadProps, UploadState, UploadFile, UploadLocale, UploadChangeParam, UploadType, UploadListType } from './interface';
import { T } from './utils';
import { ConfigConsumerProps } from '../config-provider';
export { UploadProps };
declare class Upload extends React.Component<UploadProps, UploadState> {
static Dragger: typeof Dragger;
static defaultProps: {
type: UploadType;
multiple: boolean;
action: string;
data: {};
accept: string;
beforeUpload: typeof T;
showUploadList: boolean;
listType: UploadListType;
className: string;
disabled: boolean;
supportServerRender: boolean;
};
static getDerivedStateFromProps(nextProps: UploadProps): {
fileList: UploadFile<any>[];
} | null;
recentUploadStatus: boolean | PromiseLike<any>;
progressTimer: any;
upload: any;
constructor(props: UploadProps);
componentWillUnmount(): void;
saveUpload: (node: any) => void;
onStart: (file: RcFile) => void;
onSuccess: (response: any, file: UploadFile<any>, xhr: any) => void;
onProgress: (e: {
percent: number;
}, file: UploadFile<any>) => void;
onError: (error: Error, response: any, file: UploadFile<any>) => void;
handleRemove: (file: UploadFile<any>) => void;
onChange: (info: UploadChangeParam<UploadFile<any>>) => void;
onFileDrop: (e: React.DragEvent<HTMLDivElement>) => void;
beforeUpload: (file: RcFile, fileList: RcFile[]) => boolean | PromiseLike<void>;
clearProgressTimer(): void;
renderUploadList: (locale: UploadLocale) => JSX.Element;
renderUpload: ({ getPrefixCls, direction }: ConfigConsumerProps) => JSX.Element;
render(): JSX.Element;
}
export default Upload;

427
web/node_modules/antd/lib/upload/Upload.js generated vendored Normal file
View File

@@ -0,0 +1,427 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(require("react"));
var _rcUpload = _interopRequireDefault(require("rc-upload"));
var _classnames = _interopRequireDefault(require("classnames"));
var _UploadList = _interopRequireDefault(require("./UploadList"));
var _utils = require("./utils");
var _LocaleReceiver = _interopRequireDefault(require("../locale-provider/LocaleReceiver"));
var _default2 = _interopRequireDefault(require("../locale/default"));
var _configProvider = require("../config-provider");
var _warning = _interopRequireDefault(require("../_util/warning"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
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 _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
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."); }
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(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
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; }
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 Upload = /*#__PURE__*/function (_React$Component) {
_inherits(Upload, _React$Component);
var _super = _createSuper(Upload);
function Upload(props) {
var _this;
_classCallCheck(this, Upload);
_this = _super.call(this, props);
_this.saveUpload = function (node) {
_this.upload = node;
};
_this.onStart = function (file) {
var fileList = _this.state.fileList;
var targetItem = (0, _utils.fileToObject)(file);
targetItem.status = 'uploading';
var nextFileList = fileList.concat();
var fileIndex = nextFileList.findIndex(function (_ref) {
var uid = _ref.uid;
return uid === targetItem.uid;
});
if (fileIndex === -1) {
nextFileList.push(targetItem);
} else {
nextFileList[fileIndex] = targetItem;
}
_this.onChange({
file: targetItem,
fileList: nextFileList
});
};
_this.onSuccess = function (response, file, xhr) {
_this.clearProgressTimer();
try {
if (typeof response === 'string') {
response = JSON.parse(response);
}
} catch (e) {
/* do nothing */
}
var fileList = _this.state.fileList;
var targetItem = (0, _utils.getFileItem)(file, fileList); // removed
if (!targetItem) {
return;
}
targetItem.status = 'done';
targetItem.response = response;
targetItem.xhr = xhr;
_this.onChange({
file: _extends({}, targetItem),
fileList: fileList
});
};
_this.onProgress = function (e, file) {
var fileList = _this.state.fileList;
var targetItem = (0, _utils.getFileItem)(file, fileList); // removed
if (!targetItem) {
return;
}
targetItem.percent = e.percent;
_this.onChange({
event: e,
file: _extends({}, targetItem),
fileList: fileList
});
};
_this.onError = function (error, response, file) {
_this.clearProgressTimer();
var fileList = _this.state.fileList;
var targetItem = (0, _utils.getFileItem)(file, fileList); // removed
if (!targetItem) {
return;
}
targetItem.error = error;
targetItem.response = response;
targetItem.status = 'error';
_this.onChange({
file: _extends({}, targetItem),
fileList: fileList
});
};
_this.handleRemove = function (file) {
var onRemove = _this.props.onRemove;
var fileList = _this.state.fileList;
Promise.resolve(typeof onRemove === 'function' ? onRemove(file) : onRemove).then(function (ret) {
// Prevent removing file
if (ret === false) {
return;
}
var removedFileList = (0, _utils.removeFileItem)(file, fileList);
if (removedFileList) {
file.status = 'removed';
if (_this.upload) {
_this.upload.abort(file);
}
_this.onChange({
file: file,
fileList: removedFileList
});
}
});
};
_this.onChange = function (info) {
if (!('fileList' in _this.props)) {
_this.setState({
fileList: info.fileList
});
}
var onChange = _this.props.onChange;
if (onChange) {
onChange(_extends(_extends({}, info), {
fileList: _toConsumableArray(info.fileList)
}));
}
};
_this.onFileDrop = function (e) {
_this.setState({
dragState: e.type
});
};
_this.beforeUpload = function (file, fileList) {
var beforeUpload = _this.props.beforeUpload;
var stateFileList = _this.state.fileList;
if (!beforeUpload) {
return true;
}
var result = beforeUpload(file, fileList);
if (result === false) {
// Get unique file list
var uniqueList = [];
stateFileList.concat(fileList.map(_utils.fileToObject)).forEach(function (f) {
if (uniqueList.every(function (uf) {
return uf.uid !== f.uid;
})) {
uniqueList.push(f);
}
});
_this.onChange({
file: file,
fileList: uniqueList
});
return false;
}
if (result && result.then) {
return result;
}
return true;
};
_this.renderUploadList = function (locale) {
var _this$props = _this.props,
showUploadList = _this$props.showUploadList,
listType = _this$props.listType,
onPreview = _this$props.onPreview,
onDownload = _this$props.onDownload,
previewFile = _this$props.previewFile,
disabled = _this$props.disabled,
propLocale = _this$props.locale,
iconRender = _this$props.iconRender;
var showRemoveIcon = showUploadList.showRemoveIcon,
showPreviewIcon = showUploadList.showPreviewIcon,
showDownloadIcon = showUploadList.showDownloadIcon,
removeIcon = showUploadList.removeIcon,
downloadIcon = showUploadList.downloadIcon;
var fileList = _this.state.fileList;
return /*#__PURE__*/React.createElement(_UploadList["default"], {
listType: listType,
items: fileList,
previewFile: previewFile,
onPreview: onPreview,
onDownload: onDownload,
onRemove: _this.handleRemove,
showRemoveIcon: !disabled && showRemoveIcon,
showPreviewIcon: showPreviewIcon,
showDownloadIcon: showDownloadIcon,
removeIcon: removeIcon,
downloadIcon: downloadIcon,
iconRender: iconRender,
locale: _extends(_extends({}, locale), propLocale)
});
};
_this.renderUpload = function (_ref2) {
var _classNames2;
var getPrefixCls = _ref2.getPrefixCls,
direction = _ref2.direction;
var _this$props2 = _this.props,
customizePrefixCls = _this$props2.prefixCls,
className = _this$props2.className,
showUploadList = _this$props2.showUploadList,
listType = _this$props2.listType,
type = _this$props2.type,
disabled = _this$props2.disabled,
children = _this$props2.children,
style = _this$props2.style;
var _this$state = _this.state,
fileList = _this$state.fileList,
dragState = _this$state.dragState;
var prefixCls = getPrefixCls('upload', customizePrefixCls);
var rcUploadProps = _extends(_extends({
onStart: _this.onStart,
onError: _this.onError,
onProgress: _this.onProgress,
onSuccess: _this.onSuccess
}, _this.props), {
prefixCls: prefixCls,
beforeUpload: _this.beforeUpload
});
delete rcUploadProps.className;
delete rcUploadProps.style;
var uploadList = showUploadList ? /*#__PURE__*/React.createElement(_LocaleReceiver["default"], {
componentName: "Upload",
defaultLocale: _default2["default"].Upload
}, _this.renderUploadList) : null;
if (type === 'drag') {
var _classNames;
var dragCls = (0, _classnames["default"])(prefixCls, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-drag"), true), _defineProperty(_classNames, "".concat(prefixCls, "-drag-uploading"), fileList.some(function (file) {
return file.status === 'uploading';
})), _defineProperty(_classNames, "".concat(prefixCls, "-drag-hover"), dragState === 'dragover'), _defineProperty(_classNames, "".concat(prefixCls, "-disabled"), disabled), _classNames), className);
return /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("div", {
className: dragCls,
onDrop: _this.onFileDrop,
onDragOver: _this.onFileDrop,
onDragLeave: _this.onFileDrop,
style: style
}, /*#__PURE__*/React.createElement(_rcUpload["default"], _extends({}, rcUploadProps, {
ref: _this.saveUpload,
className: "".concat(prefixCls, "-btn")
}), /*#__PURE__*/React.createElement("div", {
className: "".concat(prefixCls, "-drag-container")
}, children))), uploadList);
}
var uploadButtonCls = (0, _classnames["default"])(prefixCls, (_classNames2 = {}, _defineProperty(_classNames2, "".concat(prefixCls, "-select"), true), _defineProperty(_classNames2, "".concat(prefixCls, "-select-").concat(listType), true), _defineProperty(_classNames2, "".concat(prefixCls, "-disabled"), disabled), _defineProperty(_classNames2, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames2)); // Remove id to avoid open by label when trigger is hidden
// https://github.com/ant-design/ant-design/issues/14298
// https://github.com/ant-design/ant-design/issues/16478
if (!children || disabled) {
delete rcUploadProps.id;
}
var uploadButton = /*#__PURE__*/React.createElement("div", {
className: uploadButtonCls,
style: children ? undefined : {
display: 'none'
}
}, /*#__PURE__*/React.createElement(_rcUpload["default"], _extends({}, rcUploadProps, {
ref: _this.saveUpload
})));
if (listType === 'picture-card') {
return /*#__PURE__*/React.createElement("span", {
className: (0, _classnames["default"])(className, "".concat(prefixCls, "-picture-card-wrapper"))
}, uploadList, uploadButton);
}
return /*#__PURE__*/React.createElement("span", {
className: className
}, uploadButton, uploadList);
};
_this.state = {
fileList: props.fileList || props.defaultFileList || [],
dragState: 'drop'
};
(0, _warning["default"])('fileList' in props || !('value' in props), 'Upload', '`value` is not a valid prop, do you mean `fileList`?');
return _this;
}
_createClass(Upload, [{
key: "componentWillUnmount",
value: function componentWillUnmount() {
this.clearProgressTimer();
}
}, {
key: "clearProgressTimer",
value: function clearProgressTimer() {
clearInterval(this.progressTimer);
}
}, {
key: "render",
value: function render() {
return /*#__PURE__*/React.createElement(_configProvider.ConfigConsumer, null, this.renderUpload);
}
}], [{
key: "getDerivedStateFromProps",
value: function getDerivedStateFromProps(nextProps) {
if ('fileList' in nextProps) {
return {
fileList: nextProps.fileList || []
};
}
return null;
}
}]);
return Upload;
}(React.Component);
Upload.defaultProps = {
type: 'select',
multiple: false,
action: '',
data: {},
accept: '',
beforeUpload: _utils.T,
showUploadList: true,
listType: 'text',
className: '',
disabled: false,
supportServerRender: true
};
var _default = Upload;
exports["default"] = _default;

25
web/node_modules/antd/lib/upload/UploadList.d.ts generated vendored Normal file
View File

@@ -0,0 +1,25 @@
import * as React from 'react';
import { UploadListProps, UploadFile, UploadListType } from './interface';
import { previewImage } from './utils';
import { ConfigConsumerProps } from '../config-provider';
export default class UploadList extends React.Component<UploadListProps, any> {
static defaultProps: {
listType: UploadListType;
progressAttr: {
strokeWidth: number;
showInfo: boolean;
};
showRemoveIcon: boolean;
showDownloadIcon: boolean;
showPreviewIcon: boolean;
previewFile: typeof previewImage;
};
componentDidUpdate(): void;
handlePreview: (file: UploadFile<any>, e: React.SyntheticEvent<HTMLElement, Event>) => void;
handleDownload: (file: UploadFile<any>) => void;
handleClose: (file: UploadFile<any>) => void;
handleIconRender: (file: UploadFile<any>) => {} | null | undefined;
handleActionIconRender: (customIcon: React.ReactNode, callback: () => void, title?: string | undefined) => JSX.Element;
renderUploadList: ({ getPrefixCls, direction }: ConfigConsumerProps) => JSX.Element;
render(): JSX.Element;
}

377
web/node_modules/antd/lib/upload/UploadList.js generated vendored Normal file
View File

@@ -0,0 +1,377 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(require("react"));
var _rcAnimate = _interopRequireDefault(require("rc-animate"));
var _classnames = _interopRequireDefault(require("classnames"));
var _LoadingOutlined = _interopRequireDefault(require("@ant-design/icons/LoadingOutlined"));
var _PaperClipOutlined = _interopRequireDefault(require("@ant-design/icons/PaperClipOutlined"));
var _PictureTwoTone = _interopRequireDefault(require("@ant-design/icons/PictureTwoTone"));
var _FileTwoTone = _interopRequireDefault(require("@ant-design/icons/FileTwoTone"));
var _EyeOutlined = _interopRequireDefault(require("@ant-design/icons/EyeOutlined"));
var _DeleteOutlined = _interopRequireDefault(require("@ant-design/icons/DeleteOutlined"));
var _DownloadOutlined = _interopRequireDefault(require("@ant-design/icons/DownloadOutlined"));
var _utils = require("./utils");
var _tooltip = _interopRequireDefault(require("../tooltip"));
var _progress = _interopRequireDefault(require("../progress"));
var _configProvider = require("../config-provider");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
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 UploadList = /*#__PURE__*/function (_React$Component) {
_inherits(UploadList, _React$Component);
var _super = _createSuper(UploadList);
function UploadList() {
var _this;
_classCallCheck(this, UploadList);
_this = _super.apply(this, arguments);
_this.handlePreview = function (file, e) {
var onPreview = _this.props.onPreview;
if (!onPreview) {
return;
}
e.preventDefault();
return onPreview(file);
};
_this.handleDownload = function (file) {
var onDownload = _this.props.onDownload;
if (typeof onDownload === 'function') {
onDownload(file);
} else if (file.url) {
window.open(file.url);
}
};
_this.handleClose = function (file) {
var onRemove = _this.props.onRemove;
if (onRemove) {
onRemove(file);
}
};
_this.handleIconRender = function (file) {
var _this$props = _this.props,
listType = _this$props.listType,
locale = _this$props.locale,
iconRender = _this$props.iconRender;
if (iconRender) {
return iconRender(file, listType);
}
var isLoading = file.status === 'uploading';
var fileIcon = (0, _utils.isImageUrl)(file) ? /*#__PURE__*/React.createElement(_PictureTwoTone["default"], null) : /*#__PURE__*/React.createElement(_FileTwoTone["default"], null);
var icon = isLoading ? /*#__PURE__*/React.createElement(_LoadingOutlined["default"], null) : /*#__PURE__*/React.createElement(_PaperClipOutlined["default"], null);
if (listType === 'picture') {
icon = isLoading ? /*#__PURE__*/React.createElement(_LoadingOutlined["default"], null) : fileIcon;
} else if (listType === 'picture-card') {
icon = isLoading ? locale.uploading : fileIcon;
}
return icon;
};
_this.handleActionIconRender = function (customIcon, callback, title) {
if (React.isValidElement(customIcon)) {
return React.cloneElement(customIcon, _extends(_extends({}, customIcon.props), {
title: title,
onClick: function onClick(e) {
callback();
if (customIcon.props.onClick) {
customIcon.props.onClick(e);
}
}
}));
}
return /*#__PURE__*/React.createElement("span", {
title: title,
onClick: callback
}, customIcon);
};
_this.renderUploadList = function (_ref) {
var _classNames6;
var getPrefixCls = _ref.getPrefixCls,
direction = _ref.direction;
var _this$props2 = _this.props,
customizePrefixCls = _this$props2.prefixCls,
_this$props2$items = _this$props2.items,
items = _this$props2$items === void 0 ? [] : _this$props2$items,
listType = _this$props2.listType,
showPreviewIcon = _this$props2.showPreviewIcon,
showRemoveIcon = _this$props2.showRemoveIcon,
showDownloadIcon = _this$props2.showDownloadIcon,
customRemoveIcon = _this$props2.removeIcon,
customDownloadIcon = _this$props2.downloadIcon,
locale = _this$props2.locale,
progressAttr = _this$props2.progressAttr;
var prefixCls = getPrefixCls('upload', customizePrefixCls);
var list = items.map(function (file) {
var _classNames3, _classNames4;
var progress;
var iconNode = _this.handleIconRender(file);
var icon = /*#__PURE__*/React.createElement("div", {
className: "".concat(prefixCls, "-text-icon")
}, iconNode);
if (listType === 'picture' || listType === 'picture-card') {
if (file.status === 'uploading' || !file.thumbUrl && !file.url) {
var _classNames;
var uploadingClassName = (0, _classnames["default"])((_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-list-item-thumbnail"), true), _defineProperty(_classNames, "".concat(prefixCls, "-list-item-file"), file.status !== 'uploading'), _classNames));
icon = /*#__PURE__*/React.createElement("div", {
className: uploadingClassName
}, iconNode);
} else {
var _classNames2;
var thumbnail = (0, _utils.isImageUrl)(file) ? /*#__PURE__*/React.createElement("img", {
src: file.thumbUrl || file.url,
alt: file.name,
className: "".concat(prefixCls, "-list-item-image")
}) : iconNode;
var aClassName = (0, _classnames["default"])((_classNames2 = {}, _defineProperty(_classNames2, "".concat(prefixCls, "-list-item-thumbnail"), true), _defineProperty(_classNames2, "".concat(prefixCls, "-list-item-file"), !(0, _utils.isImageUrl)(file)), _classNames2));
icon = /*#__PURE__*/React.createElement("a", {
className: aClassName,
onClick: function onClick(e) {
return _this.handlePreview(file, e);
},
href: file.url || file.thumbUrl,
target: "_blank",
rel: "noopener noreferrer"
}, thumbnail);
}
}
if (file.status === 'uploading') {
// show loading icon if upload progress listener is disabled
var loadingProgress = 'percent' in file ? /*#__PURE__*/React.createElement(_progress["default"], _extends({
type: "line"
}, progressAttr, {
percent: file.percent
})) : null;
progress = /*#__PURE__*/React.createElement("div", {
className: "".concat(prefixCls, "-list-item-progress"),
key: "progress"
}, loadingProgress);
}
var infoUploadingClass = (0, _classnames["default"])((_classNames3 = {}, _defineProperty(_classNames3, "".concat(prefixCls, "-list-item"), true), _defineProperty(_classNames3, "".concat(prefixCls, "-list-item-").concat(file.status), true), _defineProperty(_classNames3, "".concat(prefixCls, "-list-item-list-type-").concat(listType), true), _classNames3));
var linkProps = typeof file.linkProps === 'string' ? JSON.parse(file.linkProps) : file.linkProps;
var removeIcon = showRemoveIcon ? customRemoveIcon && _this.handleActionIconRender(customRemoveIcon, function () {
return _this.handleClose(file);
}, locale.removeFile) || /*#__PURE__*/React.createElement(_DeleteOutlined["default"], {
title: locale.removeFile,
onClick: function onClick() {
return _this.handleClose(file);
}
}) : null;
var downloadIcon = showDownloadIcon && file.status === 'done' ? customDownloadIcon && _this.handleActionIconRender(customDownloadIcon, function () {
return _this.handleDownload(file);
}, locale.downloadFile) || /*#__PURE__*/React.createElement(_DownloadOutlined["default"], {
title: locale.downloadFile,
onClick: function onClick() {
return _this.handleDownload(file);
}
}) : null;
var downloadOrDelete = listType !== 'picture-card' && /*#__PURE__*/React.createElement("span", {
key: "download-delete",
className: "".concat(prefixCls, "-list-item-card-actions ").concat(listType === 'picture' ? 'picture' : '')
}, downloadIcon && /*#__PURE__*/React.createElement("a", {
title: locale.downloadFile
}, downloadIcon), removeIcon && /*#__PURE__*/React.createElement("a", {
title: locale.removeFile
}, removeIcon));
var listItemNameClass = (0, _classnames["default"])((_classNames4 = {}, _defineProperty(_classNames4, "".concat(prefixCls, "-list-item-name"), true), _defineProperty(_classNames4, "".concat(prefixCls, "-list-item-name-icon-count-").concat([downloadIcon, removeIcon].filter(function (x) {
return x;
}).length), true), _classNames4));
var preview = file.url ? [/*#__PURE__*/React.createElement("a", _extends({
key: "view",
target: "_blank",
rel: "noopener noreferrer",
className: listItemNameClass,
title: file.name
}, linkProps, {
href: file.url,
onClick: function onClick(e) {
return _this.handlePreview(file, e);
}
}), file.name), downloadOrDelete] : [/*#__PURE__*/React.createElement("span", {
key: "view",
className: listItemNameClass,
onClick: function onClick(e) {
return _this.handlePreview(file, e);
},
title: file.name
}, file.name), downloadOrDelete];
var style = {
pointerEvents: 'none',
opacity: 0.5
};
var previewIcon = showPreviewIcon ? /*#__PURE__*/React.createElement("a", {
href: file.url || file.thumbUrl,
target: "_blank",
rel: "noopener noreferrer",
style: file.url || file.thumbUrl ? undefined : style,
onClick: function onClick(e) {
return _this.handlePreview(file, e);
},
title: locale.previewFile
}, /*#__PURE__*/React.createElement(_EyeOutlined["default"], null)) : null;
var actions = listType === 'picture-card' && file.status !== 'uploading' && /*#__PURE__*/React.createElement("span", {
className: "".concat(prefixCls, "-list-item-actions")
}, previewIcon, file.status === 'done' && downloadIcon, removeIcon);
var message;
if (file.response && typeof file.response === 'string') {
message = file.response;
} else {
message = file.error && file.error.statusText || locale.uploadError;
}
var iconAndPreview = /*#__PURE__*/React.createElement("span", null, icon, preview);
var dom = /*#__PURE__*/React.createElement("div", {
className: infoUploadingClass
}, /*#__PURE__*/React.createElement("div", {
className: "".concat(prefixCls, "-list-item-info")
}, iconAndPreview), actions, /*#__PURE__*/React.createElement(_rcAnimate["default"], {
transitionName: "fade",
component: ""
}, progress));
var listContainerNameClass = (0, _classnames["default"])(_defineProperty({}, "".concat(prefixCls, "-list-picture-card-container"), listType === 'picture-card'));
return /*#__PURE__*/React.createElement("div", {
key: file.uid,
className: listContainerNameClass
}, file.status === 'error' ? /*#__PURE__*/React.createElement(_tooltip["default"], {
title: message
}, dom) : /*#__PURE__*/React.createElement("span", null, dom));
});
var listClassNames = (0, _classnames["default"])((_classNames6 = {}, _defineProperty(_classNames6, "".concat(prefixCls, "-list"), true), _defineProperty(_classNames6, "".concat(prefixCls, "-list-").concat(listType), true), _defineProperty(_classNames6, "".concat(prefixCls, "-list-rtl"), direction === 'rtl'), _classNames6));
var animationDirection = listType === 'picture-card' ? 'animate-inline' : 'animate';
return /*#__PURE__*/React.createElement(_rcAnimate["default"], {
transitionName: "".concat(prefixCls, "-").concat(animationDirection),
component: "div",
className: listClassNames
}, list);
};
return _this;
}
_createClass(UploadList, [{
key: "componentDidUpdate",
value: function componentDidUpdate() {
var _this2 = this;
var _this$props3 = this.props,
listType = _this$props3.listType,
items = _this$props3.items,
previewFile = _this$props3.previewFile;
if (listType !== 'picture' && listType !== 'picture-card') {
return;
}
(items || []).forEach(function (file) {
if (typeof document === 'undefined' || typeof window === 'undefined' || !window.FileReader || !window.File || !(file.originFileObj instanceof File || file.originFileObj instanceof Blob) || file.thumbUrl !== undefined) {
return;
}
file.thumbUrl = '';
if (previewFile) {
previewFile(file.originFileObj).then(function (previewDataUrl) {
// Need append '' to avoid dead loop
file.thumbUrl = previewDataUrl || '';
_this2.forceUpdate();
});
}
});
}
}, {
key: "render",
value: function render() {
return /*#__PURE__*/React.createElement(_configProvider.ConfigConsumer, null, this.renderUploadList);
}
}]);
return UploadList;
}(React.Component);
exports["default"] = UploadList;
UploadList.defaultProps = {
listType: 'text',
progressAttr: {
strokeWidth: 2,
showInfo: false
},
showRemoveIcon: true,
showDownloadIcon: false,
showPreviewIcon: true,
previewFile: _utils.previewImage
};

4
web/node_modules/antd/lib/upload/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,4 @@
import Upload from './Upload';
export { UploadProps, UploadListProps, UploadChangeParam, RcFile } from './interface';
export { DraggerProps } from './Dragger';
export default Upload;

16
web/node_modules/antd/lib/upload/index.js generated vendored Normal file
View File

@@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _Upload = _interopRequireDefault(require("./Upload"));
var _Dragger = _interopRequireDefault(require("./Dragger"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
_Upload["default"].Dragger = _Dragger["default"];
var _default = _Upload["default"];
exports["default"] = _default;

120
web/node_modules/antd/lib/upload/interface.d.ts generated vendored Normal file
View File

@@ -0,0 +1,120 @@
import * as React from 'react';
export declare type UploadFileStatus = 'error' | 'success' | 'done' | 'uploading' | 'removed';
export interface HttpRequestHeader {
[key: string]: string;
}
export interface RcFile extends File {
uid: string;
readonly lastModifiedDate: Date;
readonly webkitRelativePath: string;
}
export interface RcCustomRequestOptions {
onProgress: (event: {
percent: number;
}, file: File) => void;
onError: (error: Error) => void;
onSuccess: (response: object, file: File) => void;
data: object;
filename: string;
file: File;
withCredentials: boolean;
action: string;
headers: object;
}
export interface UploadFile<T = any> {
uid: string;
size: number;
name: string;
fileName?: string;
lastModified?: number;
lastModifiedDate?: Date;
url?: string;
status?: UploadFileStatus;
percent?: number;
thumbUrl?: string;
originFileObj?: File | Blob;
response?: T;
error?: any;
linkProps?: any;
type: string;
xhr?: T;
preview?: string;
}
export interface UploadChangeParam<T extends object = UploadFile> {
file: T;
fileList: Array<UploadFile>;
event?: {
percent: number;
};
}
export interface ShowUploadListInterface {
showRemoveIcon?: boolean;
showPreviewIcon?: boolean;
showDownloadIcon?: boolean;
}
export interface UploadLocale {
uploading?: string;
removeFile?: string;
downloadFile?: string;
uploadError?: string;
previewFile?: string;
}
export declare type UploadType = 'drag' | 'select';
export declare type UploadListType = 'text' | 'picture' | 'picture-card';
declare type PreviewFileHandler = (file: File | Blob) => PromiseLike<string>;
declare type TransformFileHandler = (file: RcFile) => string | Blob | File | PromiseLike<string | Blob | File>;
export interface UploadProps<T = any> {
type?: UploadType;
name?: string;
defaultFileList?: Array<UploadFile<T>>;
fileList?: Array<UploadFile<T>>;
action?: string | ((file: RcFile) => string) | ((file: RcFile) => PromiseLike<string>);
directory?: boolean;
data?: object | ((file: UploadFile<T>) => object);
method?: 'POST' | 'PUT' | 'post' | 'put';
headers?: HttpRequestHeader;
showUploadList?: boolean | ShowUploadListInterface;
multiple?: boolean;
accept?: string;
beforeUpload?: (file: RcFile, FileList: RcFile[]) => boolean | PromiseLike<void>;
onChange?: (info: UploadChangeParam) => void;
listType?: UploadListType;
className?: string;
onPreview?: (file: UploadFile<T>) => void;
onDownload?: (file: UploadFile<T>) => void;
onRemove?: (file: UploadFile<T>) => void | boolean | Promise<void | boolean>;
supportServerRender?: boolean;
style?: React.CSSProperties;
disabled?: boolean;
prefixCls?: string;
customRequest?: (options: RcCustomRequestOptions) => void;
withCredentials?: boolean;
openFileDialogOnClick?: boolean;
locale?: UploadLocale;
id?: string;
previewFile?: PreviewFileHandler;
transformFile?: TransformFileHandler;
iconRender?: (file: UploadFile<T>, listType?: UploadListType) => React.ReactNode;
}
export interface UploadState<T = any> {
fileList: UploadFile<T>[];
dragState: string;
}
export interface UploadListProps<T = any> {
listType?: UploadListType;
onPreview?: (file: UploadFile<T>) => void;
onDownload?: (file: UploadFile<T>) => void;
onRemove?: (file: UploadFile<T>) => void | boolean;
items?: Array<UploadFile<T>>;
progressAttr?: Object;
prefixCls?: string;
showRemoveIcon?: boolean;
showDownloadIcon?: boolean;
showPreviewIcon?: boolean;
removeIcon?: React.ReactNode;
downloadIcon?: React.ReactNode;
locale: UploadLocale;
previewFile?: PreviewFileHandler;
iconRender?: (file: UploadFile<T>, listType?: UploadListType) => React.ReactNode;
}
export {};

1
web/node_modules/antd/lib/upload/interface.js generated vendored Normal file
View File

@@ -0,0 +1 @@
"use strict";

9
web/node_modules/antd/lib/upload/style/css.js generated vendored Normal file
View File

@@ -0,0 +1,9 @@
"use strict";
require("../../style/index.css");
require("./index.css");
require("../../progress/style/css");
require("../../tooltip/style/css");

676
web/node_modules/antd/lib/upload/style/index.css generated vendored Normal file
View File

@@ -0,0 +1,676 @@
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */
/* stylelint-disable no-duplicate-selectors */
/* stylelint-disable */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
.ant-upload {
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin: 0;
padding: 0;
color: rgba(0, 0, 0, 0.65);
font-size: 14px;
font-variant: tabular-nums;
line-height: 1.5715;
list-style: none;
-webkit-font-feature-settings: 'tnum';
font-feature-settings: 'tnum';
outline: 0;
}
.ant-upload p {
margin: 0;
}
.ant-upload-btn {
display: block;
width: 100%;
outline: none;
}
.ant-upload input[type='file'] {
cursor: pointer;
}
.ant-upload.ant-upload-select {
display: inline-block;
}
.ant-upload.ant-upload-disabled {
cursor: not-allowed;
}
.ant-upload.ant-upload-select-picture-card {
display: table;
float: left;
width: 104px;
height: 104px;
margin-right: 8px;
margin-bottom: 8px;
text-align: center;
vertical-align: top;
background-color: #fafafa;
border: 1px dashed #d9d9d9;
border-radius: 2px;
cursor: pointer;
-webkit-transition: border-color 0.3s ease;
transition: border-color 0.3s ease;
}
.ant-upload.ant-upload-select-picture-card > .ant-upload {
display: table-cell;
width: 100%;
height: 100%;
padding: 8px;
text-align: center;
vertical-align: middle;
}
.ant-upload.ant-upload-select-picture-card:hover {
border-color: #1890ff;
}
.ant-upload.ant-upload-drag {
position: relative;
width: 100%;
height: 100%;
text-align: center;
background: #fafafa;
border: 1px dashed #d9d9d9;
border-radius: 2px;
cursor: pointer;
-webkit-transition: border-color 0.3s;
transition: border-color 0.3s;
}
.ant-upload.ant-upload-drag .ant-upload {
padding: 16px 0;
}
.ant-upload.ant-upload-drag.ant-upload-drag-hover:not(.ant-upload-disabled) {
border-color: #096dd9;
}
.ant-upload.ant-upload-drag.ant-upload-disabled {
cursor: not-allowed;
}
.ant-upload.ant-upload-drag .ant-upload-btn {
display: table;
height: 100%;
}
.ant-upload.ant-upload-drag .ant-upload-drag-container {
display: table-cell;
vertical-align: middle;
}
.ant-upload.ant-upload-drag:not(.ant-upload-disabled):hover {
border-color: #40a9ff;
}
.ant-upload.ant-upload-drag p.ant-upload-drag-icon {
margin-bottom: 20px;
}
.ant-upload.ant-upload-drag p.ant-upload-drag-icon .anticon {
color: #40a9ff;
font-size: 48px;
}
.ant-upload.ant-upload-drag p.ant-upload-text {
margin: 0 0 4px;
color: rgba(0, 0, 0, 0.85);
font-size: 16px;
}
.ant-upload.ant-upload-drag p.ant-upload-hint {
color: rgba(0, 0, 0, 0.45);
font-size: 14px;
}
.ant-upload.ant-upload-drag .anticon-plus {
color: rgba(0, 0, 0, 0.25);
font-size: 30px;
-webkit-transition: all 0.3s;
transition: all 0.3s;
}
.ant-upload.ant-upload-drag .anticon-plus:hover {
color: rgba(0, 0, 0, 0.45);
}
.ant-upload.ant-upload-drag:hover .anticon-plus {
color: rgba(0, 0, 0, 0.45);
}
.ant-upload-picture-card-wrapper {
display: inline-block;
width: 100%;
}
.ant-upload-picture-card-wrapper::before {
display: table;
content: '';
}
.ant-upload-picture-card-wrapper::after {
display: table;
clear: both;
content: '';
}
.ant-upload-list {
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin: 0;
padding: 0;
color: rgba(0, 0, 0, 0.65);
font-size: 14px;
font-variant: tabular-nums;
line-height: 1.5715;
list-style: none;
-webkit-font-feature-settings: 'tnum';
font-feature-settings: 'tnum';
line-height: 22px;
}
.ant-upload-list::before {
display: table;
content: '';
}
.ant-upload-list::after {
display: table;
clear: both;
content: '';
}
.ant-upload-list-item-list-type-text:hover .ant-upload-list-item-name-icon-count-1 {
padding-right: 14px;
}
.ant-upload-list-item-list-type-text:hover .ant-upload-list-item-name-icon-count-2 {
padding-right: 28px;
}
.ant-upload-list-item {
position: relative;
height: 22px;
margin-top: 8px;
font-size: 14px;
}
.ant-upload-list-item-name {
display: inline-block;
width: 100%;
padding-left: 22px;
overflow: hidden;
line-height: 22px;
white-space: nowrap;
text-overflow: ellipsis;
}
.ant-upload-list-item-name-icon-count-1 {
padding-right: 14px;
}
.ant-upload-list-item-card-actions {
position: absolute;
right: 0;
opacity: 0;
}
.ant-upload-list-item-card-actions.picture {
top: 25px;
line-height: 1;
opacity: 1;
}
.ant-upload-list-item-card-actions .anticon {
padding-right: 6px;
color: rgba(0, 0, 0, 0.45);
}
.ant-upload-list-item-info {
height: 100%;
padding: 0 12px 0 4px;
-webkit-transition: background-color 0.3s;
transition: background-color 0.3s;
}
.ant-upload-list-item-info > span {
display: block;
width: 100%;
height: 100%;
}
.ant-upload-list-item-info .anticon-loading .anticon,
.ant-upload-list-item-info .ant-upload-text-icon .anticon {
position: absolute;
top: 5px;
color: rgba(0, 0, 0, 0.45);
font-size: 14px;
}
.ant-upload-list-item .anticon-close {
display: inline-block;
font-size: 10px;
position: absolute;
top: 6px;
right: 4px;
color: rgba(0, 0, 0, 0.45);
line-height: 0;
cursor: pointer;
opacity: 0;
-webkit-transition: all 0.3s;
transition: all 0.3s;
}
.ant-upload-list-item .anticon-close:hover {
color: rgba(0, 0, 0, 0.65);
}
.ant-upload-list-item:hover .ant-upload-list-item-info {
background-color: #f5f5f5;
}
.ant-upload-list-item:hover .anticon-close {
opacity: 1;
}
.ant-upload-list-item:hover .ant-upload-list-item-card-actions {
opacity: 1;
}
.ant-upload-list-item-error,
.ant-upload-list-item-error .ant-upload-text-icon > .anticon,
.ant-upload-list-item-error .ant-upload-list-item-name {
color: #ff4d4f;
}
.ant-upload-list-item-error .ant-upload-list-item-card-actions {
opacity: 1;
}
.ant-upload-list-item-error .ant-upload-list-item-card-actions .anticon {
color: #ff4d4f;
}
.ant-upload-list-item-progress {
position: absolute;
bottom: -12px;
width: 100%;
padding-left: 26px;
font-size: 14px;
line-height: 0;
}
.ant-upload-list-picture .ant-upload-list-item,
.ant-upload-list-picture-card .ant-upload-list-item {
position: relative;
height: 66px;
padding: 8px;
border: 1px solid #d9d9d9;
border-radius: 2px;
}
.ant-upload-list-picture .ant-upload-list-item:hover,
.ant-upload-list-picture-card .ant-upload-list-item:hover {
background: transparent;
}
.ant-upload-list-picture .ant-upload-list-item-error,
.ant-upload-list-picture-card .ant-upload-list-item-error {
border-color: #ff4d4f;
}
.ant-upload-list-picture .ant-upload-list-item-info,
.ant-upload-list-picture-card .ant-upload-list-item-info {
padding: 0;
}
.ant-upload-list-picture .ant-upload-list-item:hover .ant-upload-list-item-info,
.ant-upload-list-picture-card .ant-upload-list-item:hover .ant-upload-list-item-info {
background: transparent;
}
.ant-upload-list-picture .ant-upload-list-item-uploading,
.ant-upload-list-picture-card .ant-upload-list-item-uploading {
border-style: dashed;
}
.ant-upload-list-picture .ant-upload-list-item-thumbnail,
.ant-upload-list-picture-card .ant-upload-list-item-thumbnail {
position: absolute;
top: 8px;
left: 8px;
width: 48px;
height: 48px;
line-height: 54px;
text-align: center;
opacity: 0.8;
}
.ant-upload-list-picture .ant-upload-list-item-thumbnail .anticon,
.ant-upload-list-picture-card .ant-upload-list-item-thumbnail .anticon {
font-size: 26px;
}
.ant-upload-list-picture .ant-upload-list-item-icon,
.ant-upload-list-picture-card .ant-upload-list-item-icon {
position: absolute;
top: 50%;
left: 50%;
font-size: 26px;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
.ant-upload-list-picture .ant-upload-list-item-icon .anticon,
.ant-upload-list-picture-card .ant-upload-list-item-icon .anticon {
font-size: 26px;
}
.ant-upload-list-picture .ant-upload-list-item-image,
.ant-upload-list-picture-card .ant-upload-list-item-image {
max-width: 100%;
}
.ant-upload-list-picture .ant-upload-list-item-thumbnail img,
.ant-upload-list-picture-card .ant-upload-list-item-thumbnail img {
display: block;
width: 48px;
height: 48px;
overflow: hidden;
}
.ant-upload-list-picture .ant-upload-list-item-name,
.ant-upload-list-picture-card .ant-upload-list-item-name {
display: inline-block;
-webkit-box-sizing: border-box;
box-sizing: border-box;
max-width: 100%;
margin: 0 0 0 8px;
padding-right: 8px;
padding-left: 48px;
overflow: hidden;
line-height: 44px;
white-space: nowrap;
text-overflow: ellipsis;
-webkit-transition: all 0.3s;
transition: all 0.3s;
}
.ant-upload-list-picture .ant-upload-list-item-name-icon-count-1,
.ant-upload-list-picture-card .ant-upload-list-item-name-icon-count-1 {
padding-right: 18px;
}
.ant-upload-list-picture .ant-upload-list-item-name-icon-count-2,
.ant-upload-list-picture-card .ant-upload-list-item-name-icon-count-2 {
padding-right: 36px;
}
.ant-upload-list-picture .ant-upload-list-item-uploading .ant-upload-list-item-name,
.ant-upload-list-picture-card .ant-upload-list-item-uploading .ant-upload-list-item-name {
line-height: 28px;
}
.ant-upload-list-picture .ant-upload-list-item-progress,
.ant-upload-list-picture-card .ant-upload-list-item-progress {
bottom: 14px;
width: calc(100% - 24px);
margin-top: 0;
padding-left: 56px;
}
.ant-upload-list-picture .anticon-close,
.ant-upload-list-picture-card .anticon-close {
position: absolute;
top: 8px;
right: 8px;
line-height: 1;
opacity: 1;
}
.ant-upload-list-picture-card.ant-upload-list::after {
display: none;
}
.ant-upload-list-picture-card-container {
float: left;
width: 104px;
height: 104px;
margin: 0 8px 8px 0;
}
.ant-upload-list-picture-card .ant-upload-list-item {
float: left;
width: 104px;
height: 104px;
margin: 0 8px 8px 0;
}
.ant-upload-list-picture-card .ant-upload-list-item-info {
position: relative;
height: 100%;
overflow: hidden;
}
.ant-upload-list-picture-card .ant-upload-list-item-info::before {
position: absolute;
z-index: 1;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
opacity: 0;
-webkit-transition: all 0.3s;
transition: all 0.3s;
content: ' ';
}
.ant-upload-list-picture-card .ant-upload-list-item:hover .ant-upload-list-item-info::before {
opacity: 1;
}
.ant-upload-list-picture-card .ant-upload-list-item-actions {
position: absolute;
top: 50%;
left: 50%;
z-index: 10;
white-space: nowrap;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
opacity: 0;
-webkit-transition: all 0.3s;
transition: all 0.3s;
}
.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-eye,
.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-download,
.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-delete {
z-index: 10;
width: 16px;
margin: 0 4px;
color: rgba(255, 255, 255, 0.85);
font-size: 16px;
cursor: pointer;
-webkit-transition: all 0.3s;
transition: all 0.3s;
}
.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-eye:hover,
.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-download:hover,
.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-delete:hover {
color: #fff;
}
.ant-upload-list-picture-card .ant-upload-list-item-info:hover + .ant-upload-list-item-actions,
.ant-upload-list-picture-card .ant-upload-list-item-actions:hover {
opacity: 1;
}
.ant-upload-list-picture-card .ant-upload-list-item-thumbnail,
.ant-upload-list-picture-card .ant-upload-list-item-thumbnail img {
position: static;
display: block;
width: 100%;
height: 100%;
-o-object-fit: cover;
object-fit: cover;
}
.ant-upload-list-picture-card .ant-upload-list-item-name {
display: none;
margin: 8px 0 0;
padding: 0;
line-height: 1.5715;
text-align: center;
}
.ant-upload-list-picture-card .ant-upload-list-item-file + .ant-upload-list-item-name {
position: absolute;
bottom: 10px;
display: block;
}
.ant-upload-list-picture-card .ant-upload-list-item-uploading.ant-upload-list-item {
background-color: #fafafa;
}
.ant-upload-list-picture-card .ant-upload-list-item-uploading .ant-upload-list-item-info {
height: auto;
}
.ant-upload-list-picture-card .ant-upload-list-item-uploading .ant-upload-list-item-info::before,
.ant-upload-list-picture-card .ant-upload-list-item-uploading .ant-upload-list-item-info .anticon-eye,
.ant-upload-list-picture-card .ant-upload-list-item-uploading .ant-upload-list-item-info .anticon-delete {
display: none;
}
.ant-upload-list-picture-card .ant-upload-list-item-progress {
bottom: 32px;
padding-left: 0;
}
.ant-upload-list .ant-upload-success-icon {
color: #52c41a;
font-weight: bold;
}
.ant-upload-list .ant-upload-animate-enter,
.ant-upload-list .ant-upload-animate-leave,
.ant-upload-list .ant-upload-animate-inline-enter,
.ant-upload-list .ant-upload-animate-inline-leave {
-webkit-animation-duration: 0.3s;
animation-duration: 0.3s;
-webkit-animation-fill-mode: cubic-bezier(0.78, 0.14, 0.15, 0.86);
animation-fill-mode: cubic-bezier(0.78, 0.14, 0.15, 0.86);
}
.ant-upload-list .ant-upload-animate-enter {
-webkit-animation-name: uploadAnimateIn;
animation-name: uploadAnimateIn;
}
.ant-upload-list .ant-upload-animate-leave {
-webkit-animation-name: uploadAnimateOut;
animation-name: uploadAnimateOut;
}
.ant-upload-list .ant-upload-animate-inline-enter {
-webkit-animation-name: uploadAnimateInlineIn;
animation-name: uploadAnimateInlineIn;
}
.ant-upload-list .ant-upload-animate-inline-leave {
-webkit-animation-name: uploadAnimateInlineOut;
animation-name: uploadAnimateInlineOut;
}
@-webkit-keyframes uploadAnimateIn {
from {
height: 0;
margin: 0;
padding: 0;
opacity: 0;
}
}
@keyframes uploadAnimateIn {
from {
height: 0;
margin: 0;
padding: 0;
opacity: 0;
}
}
@-webkit-keyframes uploadAnimateOut {
to {
height: 0;
margin: 0;
padding: 0;
opacity: 0;
}
}
@keyframes uploadAnimateOut {
to {
height: 0;
margin: 0;
padding: 0;
opacity: 0;
}
}
@-webkit-keyframes uploadAnimateInlineIn {
from {
width: 0;
height: 0;
margin: 0;
padding: 0;
opacity: 0;
}
}
@keyframes uploadAnimateInlineIn {
from {
width: 0;
height: 0;
margin: 0;
padding: 0;
opacity: 0;
}
}
@-webkit-keyframes uploadAnimateInlineOut {
to {
width: 0;
height: 0;
margin: 0;
padding: 0;
opacity: 0;
}
}
@keyframes uploadAnimateInlineOut {
to {
width: 0;
height: 0;
margin: 0;
padding: 0;
opacity: 0;
}
}
.ant-upload-rtl {
direction: rtl;
}
.ant-upload-rtl.ant-upload.ant-upload-select-picture-card {
float: right;
margin-right: 0;
margin-left: 8px;
}
.ant-upload-list-rtl {
direction: rtl;
}
.ant-upload-list-rtl .ant-upload-list-item-list-type-text:hover .ant-upload-list-item-name-icon-count-1 {
padding-right: 22px;
padding-left: 14px;
}
.ant-upload-list-rtl .ant-upload-list-item-list-type-text:hover .ant-upload-list-item-name-icon-count-2 {
padding-right: 22px;
padding-left: 28px;
}
.ant-upload-list-rtl .ant-upload-list-item-name {
padding-right: 22px;
padding-left: 0;
}
.ant-upload-list-rtl .ant-upload-list-item-name-icon-count-1 {
padding-left: 14px;
}
.ant-upload-list-rtl .ant-upload-list-item-card-actions {
right: auto;
left: 0;
}
.ant-upload-list-rtl .ant-upload-list-item-card-actions .anticon {
padding-right: 0;
padding-left: 5px;
}
.ant-upload-list-rtl .ant-upload-list-item-info {
padding: 0 4px 0 12px;
}
.ant-upload-list-rtl .ant-upload-list-item .anticon-close {
right: auto;
left: 4px;
}
.ant-upload-list-rtl .ant-upload-list-item-error .ant-upload-list-item-card-actions .anticon {
padding-right: 0;
padding-left: 5px;
}
.ant-upload-list-rtl .ant-upload-list-item-progress {
padding-right: 26px;
padding-left: 0;
}
.ant-upload-list-rtl.ant-upload-list-picture .ant-upload-list-item-thumbnail,
.ant-upload-list-rtl.ant-upload-list-picture-card .ant-upload-list-item-thumbnail {
right: 8px;
left: auto;
}
.ant-upload-list-rtl.ant-upload-list-picture .ant-upload-list-item-icon,
.ant-upload-list-rtl.ant-upload-list-picture-card .ant-upload-list-item-icon {
right: 50%;
left: auto;
-webkit-transform: translate(50%, -50%);
transform: translate(50%, -50%);
}
.ant-upload-list-rtl.ant-upload-list-picture .ant-upload-list-item-name,
.ant-upload-list-rtl.ant-upload-list-picture-card .ant-upload-list-item-name {
margin: 0 8px 0 0;
padding-right: 48px;
padding-left: 8px;
}
.ant-upload-list-rtl.ant-upload-list-picture .ant-upload-list-item-name-icon-count-1,
.ant-upload-list-rtl.ant-upload-list-picture-card .ant-upload-list-item-name-icon-count-1 {
padding-right: 48px;
padding-left: 18px;
}
.ant-upload-list-rtl.ant-upload-list-picture .ant-upload-list-item-name-icon-count-2,
.ant-upload-list-rtl.ant-upload-list-picture-card .ant-upload-list-item-name-icon-count-2 {
padding-right: 48px;
padding-left: 36px;
}
.ant-upload-list-rtl.ant-upload-list-picture .ant-upload-list-item-progress,
.ant-upload-list-rtl.ant-upload-list-picture-card .ant-upload-list-item-progress {
padding-right: 56px;
padding-left: 0;
}
.ant-upload-list-rtl.ant-upload-list-picture .anticon-close,
.ant-upload-list-rtl.ant-upload-list-picture-card .anticon-close {
right: auto;
left: 8px;
}
.ant-upload-list-rtl .ant-upload-list-picture-card-container {
float: right;
margin: 0 0 8px 8px;
}
.ant-upload-list-rtl.ant-upload-list-picture-card .ant-upload-list-item {
float: right;
margin: 0 0 8px 8px;
}
.ant-upload-list-rtl.ant-upload-list-picture-card .ant-upload-list-item-actions {
right: 50%;
left: auto;
-webkit-transform: translate(50%, -50%);
transform: translate(50%, -50%);
}
.ant-upload-list-rtl.ant-upload-list-picture-card .ant-upload-list-item-file + .ant-upload-list-item-name {
margin: 8px 0 0;
padding: 0;
}
.ant-upload-list-rtl.ant-upload-list-picture-card .ant-upload-list-item-info {
padding: 0;
}

4
web/node_modules/antd/lib/upload/style/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,4 @@
import '../../style/index.less';
import './index.less';
import '../../progress/style';
import '../../tooltip/style';

9
web/node_modules/antd/lib/upload/style/index.js generated vendored Normal file
View File

@@ -0,0 +1,9 @@
"use strict";
require("../../style/index.less");
require("./index.less");
require("../../progress/style");
require("../../tooltip/style");

552
web/node_modules/antd/lib/upload/style/index.less generated vendored Normal file
View File

@@ -0,0 +1,552 @@
@import '../../style/themes/index';
@import '../../style/mixins/index';
@upload-prefix-cls: ~'@{ant-prefix}-upload';
@upload-item: ~'@{ant-prefix}-upload-list-item';
@upload-picture-card-size: 104px;
@upload-picture-card-border-style: @border-style-base;
.@{upload-prefix-cls} {
.reset-component;
outline: 0;
p {
margin: 0;
}
&-btn {
display: block;
width: 100%;
outline: none;
}
input[type='file'] {
cursor: pointer;
}
&&-select {
display: inline-block;
}
&&-disabled {
cursor: not-allowed;
}
&&-select-picture-card {
display: table;
float: left;
width: @upload-picture-card-size;
height: @upload-picture-card-size;
margin-right: 8px;
margin-bottom: 8px;
text-align: center;
vertical-align: top;
background-color: @background-color-light;
border: @border-width-base dashed @border-color-base;
border-radius: @border-radius-base;
cursor: pointer;
transition: border-color 0.3s ease;
> .@{upload-prefix-cls} {
display: table-cell;
width: 100%;
height: 100%;
padding: @padding-xs;
text-align: center;
vertical-align: middle;
}
&:hover {
border-color: @primary-color;
}
}
&&-drag {
position: relative;
width: 100%;
height: 100%;
text-align: center;
background: @background-color-light;
border: @border-width-base dashed @border-color-base;
border-radius: @border-radius-base;
cursor: pointer;
transition: border-color 0.3s;
.@{upload-prefix-cls} {
padding: @padding-md 0;
}
&.@{upload-prefix-cls}-drag-hover:not(.@{upload-prefix-cls}-disabled) {
border-color: @primary-7;
}
&.@{upload-prefix-cls}-disabled {
cursor: not-allowed;
}
.@{upload-prefix-cls}-btn {
display: table;
height: 100%;
}
.@{upload-prefix-cls}-drag-container {
display: table-cell;
vertical-align: middle;
}
&:not(.@{upload-prefix-cls}-disabled):hover {
border-color: @primary-5;
}
p.@{upload-prefix-cls}-drag-icon {
.@{iconfont-css-prefix} {
color: @primary-5;
font-size: 48px;
}
margin-bottom: 20px;
}
p.@{upload-prefix-cls}-text {
margin: 0 0 4px;
color: @heading-color;
font-size: @font-size-lg;
}
p.@{upload-prefix-cls}-hint {
color: @text-color-secondary;
font-size: @font-size-base;
}
.@{iconfont-css-prefix}-plus {
color: @disabled-color;
font-size: 30px;
transition: all 0.3s;
&:hover {
color: @text-color-secondary;
}
}
&:hover .@{iconfont-css-prefix}-plus {
color: @text-color-secondary;
}
}
&-picture-card-wrapper {
.clearfix;
display: inline-block;
width: 100%;
}
}
.@{upload-prefix-cls}-list {
.reset-component;
.clearfix;
line-height: 22px;
&-item-list-type-text {
&:hover {
.@{upload-prefix-cls}-list-item-name-icon-count-1 {
padding-right: 14px;
}
.@{upload-prefix-cls}-list-item-name-icon-count-2 {
padding-right: 28px;
}
}
}
&-item {
position: relative;
height: 22px;
margin-top: @margin-xs;
font-size: @font-size-base;
&-name {
display: inline-block;
width: 100%;
padding-left: @font-size-base + 8px;
overflow: hidden;
line-height: 22px;
white-space: nowrap;
text-overflow: ellipsis;
}
&-name-icon-count-1 {
padding-right: 14px;
}
&-card-actions {
position: absolute;
right: 0;
opacity: 0;
&.picture {
top: 25px;
line-height: 1;
opacity: 1;
}
.@{iconfont-css-prefix} {
padding-right: 6px;
color: @upload-actions-color;
}
}
&-info {
height: 100%;
padding: 0 12px 0 4px;
transition: background-color 0.3s;
> span {
display: block;
width: 100%;
height: 100%;
}
.@{iconfont-css-prefix}-loading,
.@{upload-prefix-cls}-text-icon {
.@{iconfont-css-prefix} {
position: absolute;
top: @font-size-base / 2 - 2px;
color: @text-color-secondary;
font-size: @font-size-base;
}
}
}
.@{iconfont-css-prefix}-close {
.iconfont-size-under-12px(10px);
position: absolute;
top: 6px;
right: 4px;
color: @text-color-secondary;
line-height: 0;
cursor: pointer;
opacity: 0;
transition: all 0.3s;
&:hover {
color: @text-color;
}
}
&:hover &-info {
background-color: @item-hover-bg;
}
&:hover .@{iconfont-css-prefix}-close {
opacity: 1;
}
&:hover &-card-actions {
opacity: 1;
}
&-error,
&-error .@{upload-prefix-cls}-text-icon > .@{iconfont-css-prefix},
&-error &-name {
color: @error-color;
}
&-error &-card-actions {
.@{iconfont-css-prefix} {
color: @error-color;
}
opacity: 1;
}
&-progress {
position: absolute;
bottom: -12px;
width: 100%;
padding-left: @font-size-base + 12px;
font-size: @font-size-base;
line-height: 0;
}
}
&-picture,
&-picture-card {
.@{upload-item} {
position: relative;
height: 66px;
padding: @padding-xs;
border: @border-width-base @upload-picture-card-border-style @border-color-base;
border-radius: @border-radius-base;
&:hover {
background: transparent;
}
&-error {
border-color: @error-color;
}
}
.@{upload-item}-info {
padding: 0;
}
.@{upload-item}:hover .@{upload-item}-info {
background: transparent;
}
.@{upload-item}-uploading {
border-style: dashed;
}
.@{upload-item}-thumbnail {
position: absolute;
top: 8px;
left: 8px;
width: 48px;
height: 48px;
line-height: 54px;
text-align: center;
opacity: 0.8;
.@{iconfont-css-prefix} {
font-size: 26px;
}
}
.@{upload-item}-icon {
position: absolute;
top: 50%;
left: 50%;
font-size: 26px;
transform: translate(-50%, -50%);
.@{iconfont-css-prefix} {
font-size: 26px;
}
}
.@{upload-item}-image {
max-width: 100%;
}
.@{upload-item}-thumbnail img {
display: block;
width: 48px;
height: 48px;
overflow: hidden;
}
.@{upload-item}-name {
display: inline-block;
box-sizing: border-box;
max-width: 100%;
margin: 0 0 0 8px;
padding-right: 8px;
padding-left: 48px;
overflow: hidden;
line-height: 44px;
white-space: nowrap;
text-overflow: ellipsis;
transition: all 0.3s;
}
.@{upload-item}-name-icon-count-1 {
padding-right: 18px;
}
.@{upload-item}-name-icon-count-2 {
padding-right: 36px;
}
.@{upload-item}-uploading .@{upload-item}-name {
line-height: 28px;
}
.@{upload-item}-progress {
bottom: 14px;
width: ~'calc(100% - 24px)';
margin-top: 0;
padding-left: 56px;
}
.@{iconfont-css-prefix}-close {
position: absolute;
top: 8px;
right: 8px;
line-height: 1;
opacity: 1;
}
}
&-picture-card {
&.@{upload-prefix-cls}-list::after {
display: none;
}
&-container {
float: left;
width: @upload-picture-card-size;
height: @upload-picture-card-size;
margin: 0 @margin-xs @margin-xs 0;
}
.@{upload-item} {
float: left;
width: @upload-picture-card-size;
height: @upload-picture-card-size;
margin: 0 @margin-xs @margin-xs 0;
}
.@{upload-item}-info {
position: relative;
height: 100%;
overflow: hidden;
&::before {
position: absolute;
z-index: 1;
width: 100%;
height: 100%;
background-color: fade(@black, 50%);
opacity: 0;
transition: all 0.3s;
content: ' ';
}
}
.@{upload-item}:hover .@{upload-item}-info::before {
opacity: 1;
}
.@{upload-item}-actions {
position: absolute;
top: 50%;
left: 50%;
z-index: 10;
white-space: nowrap;
transform: translate(-50%, -50%);
opacity: 0;
transition: all 0.3s;
.@{iconfont-css-prefix}-eye,
.@{iconfont-css-prefix}-download,
.@{iconfont-css-prefix}-delete {
z-index: 10;
width: 16px;
margin: 0 4px;
color: @text-color-dark;
font-size: 16px;
cursor: pointer;
transition: all 0.3s;
&:hover {
color: @text-color-inverse;
}
}
}
.@{upload-item}-info:hover + .@{upload-item}-actions,
.@{upload-item}-actions:hover {
opacity: 1;
}
.@{upload-item}-thumbnail,
.@{upload-item}-thumbnail img {
position: static;
display: block;
width: 100%;
height: 100%;
object-fit: cover;
}
.@{upload-item}-name {
display: none;
margin: 8px 0 0;
padding: 0;
line-height: @line-height-base;
text-align: center;
}
.@{upload-item}-file + .@{upload-item}-name {
position: absolute;
bottom: 10px;
display: block;
}
.@{upload-item}-uploading {
&.@{upload-item} {
background-color: @background-color-light;
}
.@{upload-item}-info {
height: auto;
&::before,
.@{iconfont-css-prefix}-eye,
.@{iconfont-css-prefix}-delete {
display: none;
}
}
}
.@{upload-item}-progress {
bottom: 32px;
padding-left: 0;
}
}
.@{upload-prefix-cls}-success-icon {
color: @success-color;
font-weight: bold;
}
.@{upload-prefix-cls}-animate-enter,
.@{upload-prefix-cls}-animate-leave,
.@{upload-prefix-cls}-animate-inline-enter,
.@{upload-prefix-cls}-animate-inline-leave {
animation-duration: 0.3s;
animation-fill-mode: @ease-in-out-circ;
}
.@{upload-prefix-cls}-animate-enter {
animation-name: uploadAnimateIn;
}
.@{upload-prefix-cls}-animate-leave {
animation-name: uploadAnimateOut;
}
.@{upload-prefix-cls}-animate-inline-enter {
animation-name: uploadAnimateInlineIn;
}
.@{upload-prefix-cls}-animate-inline-leave {
animation-name: uploadAnimateInlineOut;
}
}
@keyframes uploadAnimateIn {
from {
height: 0;
margin: 0;
padding: 0;
opacity: 0;
}
}
@keyframes uploadAnimateOut {
to {
height: 0;
margin: 0;
padding: 0;
opacity: 0;
}
}
@keyframes uploadAnimateInlineIn {
from {
width: 0;
height: 0;
margin: 0;
padding: 0;
opacity: 0;
}
}
@keyframes uploadAnimateInlineOut {
to {
width: 0;
height: 0;
margin: 0;
padding: 0;
opacity: 0;
}
}
@import './rtl';

188
web/node_modules/antd/lib/upload/style/rtl.less generated vendored Normal file
View File

@@ -0,0 +1,188 @@
@import '../../style/themes/index';
@import '../../style/mixins/index';
@upload-prefix-cls: ~'@{ant-prefix}-upload';
@upload-item: ~'@{ant-prefix}-upload-list-item';
.@{upload-prefix-cls} {
&-rtl {
direction: rtl;
}
&&-select-picture-card {
.@{upload-prefix-cls}-rtl& {
float: right;
margin-right: 0;
margin-left: 8px;
}
}
}
.@{upload-prefix-cls}-list {
&-rtl {
direction: rtl;
}
&-item-list-type-text {
&:hover {
.@{upload-prefix-cls}-list-item-name-icon-count-1 {
.@{upload-prefix-cls}-list-rtl & {
padding-right: 22px;
padding-left: 14px;
}
}
.@{upload-prefix-cls}-list-item-name-icon-count-2 {
.@{upload-prefix-cls}-list-rtl & {
padding-right: 22px;
padding-left: 28px;
}
}
}
}
&-item {
&-name {
.@{upload-prefix-cls}-list-rtl & {
padding-right: @font-size-base + 8px;
padding-left: 0;
}
}
&-name-icon-count-1 {
.@{upload-prefix-cls}-list-rtl & {
padding-left: 14px;
}
}
&-card-actions {
.@{upload-prefix-cls}-list-rtl & {
right: auto;
left: 0;
}
.@{iconfont-css-prefix} {
.@{upload-prefix-cls}-list-rtl & {
padding-right: 0;
padding-left: 5px;
}
}
}
&-info {
.@{upload-prefix-cls}-list-rtl & {
padding: 0 4px 0 12px;
}
}
.@{iconfont-css-prefix}-close {
.@{upload-prefix-cls}-list-rtl & {
right: auto;
left: 4px;
}
}
&-error &-card-actions {
.@{iconfont-css-prefix} {
.@{upload-prefix-cls}-list-rtl & {
padding-right: 0;
padding-left: 5px;
}
}
}
&-progress {
.@{upload-prefix-cls}-list-rtl & {
padding-right: @font-size-base + 12px;
padding-left: 0;
}
}
}
&-picture,
&-picture-card {
.@{upload-item}-thumbnail {
.@{upload-prefix-cls}-list-rtl& {
right: 8px;
left: auto;
}
}
.@{upload-item}-icon {
.@{upload-prefix-cls}-list-rtl& {
right: 50%;
left: auto;
transform: translate(50%, -50%);
}
}
.@{upload-item}-name {
.@{upload-prefix-cls}-list-rtl& {
margin: 0 8px 0 0;
padding-right: 48px;
padding-left: 8px;
}
}
.@{upload-item}-name-icon-count-1 {
.@{upload-prefix-cls}-list-rtl& {
padding-right: 48px;
padding-left: 18px;
}
}
.@{upload-item}-name-icon-count-2 {
.@{upload-prefix-cls}-list-rtl& {
padding-right: 48px;
padding-left: 36px;
}
}
.@{upload-item}-progress {
.@{upload-prefix-cls}-list-rtl& {
padding-right: 56px;
padding-left: 0;
}
}
.@{iconfont-css-prefix}-close {
.@{upload-prefix-cls}-list-rtl& {
right: auto;
left: 8px;
}
}
}
&-picture-card {
&-container {
.@{upload-prefix-cls}-list-rtl & {
float: right;
margin: 0 0 8px 8px;
}
}
.@{upload-item} {
.@{upload-prefix-cls}-list-rtl& {
float: right;
margin: 0 0 8px 8px;
}
}
.@{upload-item}-actions {
.@{upload-prefix-cls}-list-rtl& {
right: 50%;
left: auto;
transform: translate(50%, -50%);
}
}
.@{upload-item}-file + .@{upload-item}-name {
.@{upload-prefix-cls}-list-rtl& {
margin: 8px 0 0;
padding: 0;
}
}
.@{upload-item}-info {
.@{upload-prefix-cls}-list-rtl& {
padding: 0;
}
}
}
}

7
web/node_modules/antd/lib/upload/utils.d.ts generated vendored Normal file
View File

@@ -0,0 +1,7 @@
import { RcFile, UploadFile } from './interface';
export declare function T(): boolean;
export declare function fileToObject(file: RcFile): UploadFile;
export declare function getFileItem(file: UploadFile, fileList: UploadFile[]): UploadFile<any>;
export declare function removeFileItem(file: UploadFile, fileList: UploadFile[]): UploadFile<any>[] | null;
export declare const isImageUrl: (file: UploadFile<any>) => boolean;
export declare function previewImage(file: File | Blob): Promise<string>;

134
web/node_modules/antd/lib/upload/utils.js generated vendored Normal file
View File

@@ -0,0 +1,134 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.T = T;
exports.fileToObject = fileToObject;
exports.getFileItem = getFileItem;
exports.removeFileItem = removeFileItem;
exports.previewImage = previewImage;
exports.isImageUrl = void 0;
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 T() {
return true;
} // Fix IE file.status problem
// via coping a new Object
function fileToObject(file) {
return _extends(_extends({}, file), {
lastModified: file.lastModified,
lastModifiedDate: file.lastModifiedDate,
name: file.name,
size: file.size,
type: file.type,
uid: file.uid,
percent: 0,
originFileObj: file
});
}
function getFileItem(file, fileList) {
var matchKey = file.uid !== undefined ? 'uid' : 'name';
return fileList.filter(function (item) {
return item[matchKey] === file[matchKey];
})[0];
}
function removeFileItem(file, fileList) {
var matchKey = file.uid !== undefined ? 'uid' : 'name';
var removed = fileList.filter(function (item) {
return item[matchKey] !== file[matchKey];
});
if (removed.length === fileList.length) {
return null;
}
return removed;
} // ==================== Default Image Preview ====================
var extname = function extname() {
var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
var temp = url.split('/');
var filename = temp[temp.length - 1];
var filenameWithoutSuffix = filename.split(/#|\?/)[0];
return (/\.[^./\\]*$/.exec(filenameWithoutSuffix) || [''])[0];
};
var isImageFileType = function isImageFileType(type) {
return type.indexOf('image/') === 0;
};
var isImageUrl = function isImageUrl(file) {
if (file.type) {
return isImageFileType(file.type);
}
var url = file.thumbUrl || file.url;
var extension = extname(url);
if (/^data:image\//.test(url) || /(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i.test(extension)) {
return true;
}
if (/^data:/.test(url)) {
// other file types of base64
return false;
}
if (extension) {
// other file types which have extension
return false;
}
return true;
};
exports.isImageUrl = isImageUrl;
var MEASURE_SIZE = 200;
function previewImage(file) {
return new Promise(function (resolve) {
if (!file.type || !isImageFileType(file.type)) {
resolve('');
return;
}
var canvas = document.createElement('canvas');
canvas.width = MEASURE_SIZE;
canvas.height = MEASURE_SIZE;
canvas.style.cssText = "position: fixed; left: 0; top: 0; width: ".concat(MEASURE_SIZE, "px; height: ").concat(MEASURE_SIZE, "px; z-index: 9999; display: none;");
document.body.appendChild(canvas);
var ctx = canvas.getContext('2d');
var img = new Image();
img.onload = function () {
var width = img.width,
height = img.height;
var drawWidth = MEASURE_SIZE;
var drawHeight = MEASURE_SIZE;
var offsetX = 0;
var offsetY = 0;
if (width < height) {
drawHeight = height * (MEASURE_SIZE / width);
offsetY = -(drawHeight - drawWidth) / 2;
} else {
drawWidth = width * (MEASURE_SIZE / height);
offsetX = -(drawWidth - drawHeight) / 2;
}
ctx.drawImage(img, offsetX, offsetY, drawWidth, drawHeight);
var dataURL = canvas.toDataURL();
document.body.removeChild(canvas);
resolve(dataURL);
};
img.src = window.URL.createObjectURL(file);
});
}