Latest updates from IceHrmPro
This commit is contained in:
44
web/node_modules/antd/lib/message/index.d.ts
generated
vendored
Normal file
44
web/node_modules/antd/lib/message/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
import * as React from 'react';
|
||||
declare type NoticeType = 'info' | 'success' | 'error' | 'warning' | 'loading';
|
||||
export interface ThenableArgument {
|
||||
(val: any): void;
|
||||
}
|
||||
export interface MessageType {
|
||||
(): void;
|
||||
then: (fill: ThenableArgument, reject: ThenableArgument) => Promise<void>;
|
||||
promise: Promise<void>;
|
||||
}
|
||||
export interface ArgsProps {
|
||||
content: React.ReactNode;
|
||||
duration: number | null;
|
||||
type: NoticeType;
|
||||
onClose?: () => void;
|
||||
icon?: React.ReactNode;
|
||||
key?: string | number;
|
||||
}
|
||||
declare type ConfigContent = React.ReactNode | string;
|
||||
declare type ConfigDuration = number | (() => void);
|
||||
declare type JointContent = ConfigContent | ArgsProps;
|
||||
export declare type ConfigOnClose = () => void;
|
||||
export interface ConfigOptions {
|
||||
top?: number;
|
||||
duration?: number;
|
||||
prefixCls?: string;
|
||||
getContainer?: () => HTMLElement;
|
||||
transitionName?: string;
|
||||
maxCount?: number;
|
||||
rtl?: boolean;
|
||||
}
|
||||
export interface MessageApi {
|
||||
info(content: JointContent, duration?: ConfigDuration, onClose?: ConfigOnClose): MessageType;
|
||||
success(content: JointContent, duration?: ConfigDuration, onClose?: ConfigOnClose): MessageType;
|
||||
error(content: JointContent, duration?: ConfigDuration, onClose?: ConfigOnClose): MessageType;
|
||||
warn(content: JointContent, duration?: ConfigDuration, onClose?: ConfigOnClose): MessageType;
|
||||
warning(content: JointContent, duration?: ConfigDuration, onClose?: ConfigOnClose): MessageType;
|
||||
loading(content: JointContent, duration?: ConfigDuration, onClose?: ConfigOnClose): MessageType;
|
||||
open(args: ArgsProps): MessageType;
|
||||
config(options: ConfigOptions): void;
|
||||
destroy(): void;
|
||||
}
|
||||
declare const _default: MessageApi;
|
||||
export default _default;
|
||||
190
web/node_modules/antd/lib/message/index.js
generated
vendored
Normal file
190
web/node_modules/antd/lib/message/index.js
generated
vendored
Normal file
@@ -0,0 +1,190 @@
|
||||
"use strict";
|
||||
|
||||
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); }
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports["default"] = void 0;
|
||||
|
||||
var React = _interopRequireWildcard(require("react"));
|
||||
|
||||
var _classnames = _interopRequireDefault(require("classnames"));
|
||||
|
||||
var _rcNotification = _interopRequireDefault(require("rc-notification"));
|
||||
|
||||
var _LoadingOutlined = _interopRequireDefault(require("@ant-design/icons/LoadingOutlined"));
|
||||
|
||||
var _ExclamationCircleFilled = _interopRequireDefault(require("@ant-design/icons/ExclamationCircleFilled"));
|
||||
|
||||
var _CloseCircleFilled = _interopRequireDefault(require("@ant-design/icons/CloseCircleFilled"));
|
||||
|
||||
var _CheckCircleFilled = _interopRequireDefault(require("@ant-design/icons/CheckCircleFilled"));
|
||||
|
||||
var _InfoCircleFilled = _interopRequireDefault(require("@ant-design/icons/InfoCircleFilled"));
|
||||
|
||||
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 _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 _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; }
|
||||
|
||||
var defaultDuration = 3;
|
||||
var defaultTop;
|
||||
var messageInstance;
|
||||
var key = 1;
|
||||
var prefixCls = 'ant-message';
|
||||
var transitionName = 'move-up';
|
||||
var getContainer;
|
||||
var maxCount;
|
||||
var rtl = false;
|
||||
|
||||
function getMessageInstance(callback) {
|
||||
if (messageInstance) {
|
||||
callback(messageInstance);
|
||||
return;
|
||||
}
|
||||
|
||||
_rcNotification["default"].newInstance({
|
||||
prefixCls: prefixCls,
|
||||
transitionName: transitionName,
|
||||
style: {
|
||||
top: defaultTop
|
||||
},
|
||||
getContainer: getContainer,
|
||||
maxCount: maxCount
|
||||
}, function (instance) {
|
||||
if (messageInstance) {
|
||||
callback(messageInstance);
|
||||
return;
|
||||
}
|
||||
|
||||
messageInstance = instance;
|
||||
callback(instance);
|
||||
});
|
||||
}
|
||||
|
||||
var iconMap = {
|
||||
info: _InfoCircleFilled["default"],
|
||||
success: _CheckCircleFilled["default"],
|
||||
error: _CloseCircleFilled["default"],
|
||||
warning: _ExclamationCircleFilled["default"],
|
||||
loading: _LoadingOutlined["default"]
|
||||
};
|
||||
|
||||
function notice(args) {
|
||||
var _classNames;
|
||||
|
||||
var duration = args.duration !== undefined ? args.duration : defaultDuration;
|
||||
var IconComponent = iconMap[args.type];
|
||||
var messageClass = (0, _classnames["default"])("".concat(prefixCls, "-custom-content"), (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-").concat(args.type), args.type), _defineProperty(_classNames, "".concat(prefixCls, "-rtl"), rtl === true), _classNames));
|
||||
var target = args.key || key++;
|
||||
var closePromise = new Promise(function (resolve) {
|
||||
var callback = function callback() {
|
||||
if (typeof args.onClose === 'function') {
|
||||
args.onClose();
|
||||
}
|
||||
|
||||
return resolve(true);
|
||||
};
|
||||
|
||||
getMessageInstance(function (instance) {
|
||||
instance.notice({
|
||||
key: target,
|
||||
duration: duration,
|
||||
style: {},
|
||||
content: /*#__PURE__*/React.createElement("div", {
|
||||
className: messageClass
|
||||
}, args.icon || IconComponent && /*#__PURE__*/React.createElement(IconComponent, null), /*#__PURE__*/React.createElement("span", null, args.content)),
|
||||
onClose: callback
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
var result = function result() {
|
||||
if (messageInstance) {
|
||||
messageInstance.removeNotice(target);
|
||||
}
|
||||
};
|
||||
|
||||
result.then = function (filled, rejected) {
|
||||
return closePromise.then(filled, rejected);
|
||||
};
|
||||
|
||||
result.promise = closePromise;
|
||||
return result;
|
||||
}
|
||||
|
||||
function isArgsProps(content) {
|
||||
return Object.prototype.toString.call(content) === '[object Object]' && !!content.content;
|
||||
}
|
||||
|
||||
var api = {
|
||||
open: notice,
|
||||
config: function config(options) {
|
||||
if (options.top !== undefined) {
|
||||
defaultTop = options.top;
|
||||
messageInstance = null; // delete messageInstance for new defaultTop
|
||||
}
|
||||
|
||||
if (options.duration !== undefined) {
|
||||
defaultDuration = options.duration;
|
||||
}
|
||||
|
||||
if (options.prefixCls !== undefined) {
|
||||
prefixCls = options.prefixCls;
|
||||
}
|
||||
|
||||
if (options.getContainer !== undefined) {
|
||||
getContainer = options.getContainer;
|
||||
}
|
||||
|
||||
if (options.transitionName !== undefined) {
|
||||
transitionName = options.transitionName;
|
||||
messageInstance = null; // delete messageInstance for new transitionName
|
||||
}
|
||||
|
||||
if (options.maxCount !== undefined) {
|
||||
maxCount = options.maxCount;
|
||||
messageInstance = null;
|
||||
}
|
||||
|
||||
if (options.rtl !== undefined) {
|
||||
rtl = options.rtl;
|
||||
}
|
||||
},
|
||||
destroy: function destroy() {
|
||||
if (messageInstance) {
|
||||
messageInstance.destroy();
|
||||
messageInstance = null;
|
||||
}
|
||||
}
|
||||
};
|
||||
['success', 'info', 'warning', 'error', 'loading'].forEach(function (type) {
|
||||
api[type] = function (content, duration, onClose) {
|
||||
if (isArgsProps(content)) {
|
||||
return api.open(_extends(_extends({}, content), {
|
||||
type: type
|
||||
}));
|
||||
}
|
||||
|
||||
if (typeof duration === 'function') {
|
||||
onClose = duration;
|
||||
duration = undefined;
|
||||
}
|
||||
|
||||
return api.open({
|
||||
content: content,
|
||||
duration: duration,
|
||||
type: type,
|
||||
onClose: onClose
|
||||
});
|
||||
};
|
||||
});
|
||||
api.warn = api.warning;
|
||||
var _default = api;
|
||||
exports["default"] = _default;
|
||||
5
web/node_modules/antd/lib/message/style/css.js
generated
vendored
Normal file
5
web/node_modules/antd/lib/message/style/css.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
require("../../style/index.css");
|
||||
|
||||
require("./index.css");
|
||||
98
web/node_modules/antd/lib/message/style/index.css
generated
vendored
Normal file
98
web/node_modules/antd/lib/message/style/index.css
generated
vendored
Normal file
@@ -0,0 +1,98 @@
|
||||
/* 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-message {
|
||||
-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';
|
||||
position: fixed;
|
||||
top: 16px;
|
||||
left: 0;
|
||||
z-index: 1010;
|
||||
width: 100%;
|
||||
pointer-events: none;
|
||||
}
|
||||
.ant-message-notice {
|
||||
padding: 8px;
|
||||
text-align: center;
|
||||
}
|
||||
.ant-message-notice:first-child {
|
||||
margin-top: -8px;
|
||||
}
|
||||
.ant-message-notice-content {
|
||||
display: inline-block;
|
||||
padding: 10px 16px;
|
||||
background: #fff;
|
||||
border-radius: 2px;
|
||||
-webkit-box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
|
||||
box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
|
||||
pointer-events: all;
|
||||
}
|
||||
.ant-message-success .anticon {
|
||||
color: #52c41a;
|
||||
}
|
||||
.ant-message-error .anticon {
|
||||
color: #ff4d4f;
|
||||
}
|
||||
.ant-message-warning .anticon {
|
||||
color: #faad14;
|
||||
}
|
||||
.ant-message-info .anticon,
|
||||
.ant-message-loading .anticon {
|
||||
color: #1890ff;
|
||||
}
|
||||
.ant-message .anticon {
|
||||
position: relative;
|
||||
top: 1px;
|
||||
margin-right: 8px;
|
||||
font-size: 16px;
|
||||
}
|
||||
.ant-message-notice.move-up-leave.move-up-leave-active {
|
||||
-webkit-animation-name: MessageMoveOut;
|
||||
animation-name: MessageMoveOut;
|
||||
-webkit-animation-duration: 0.3s;
|
||||
animation-duration: 0.3s;
|
||||
}
|
||||
@-webkit-keyframes MessageMoveOut {
|
||||
0% {
|
||||
max-height: 150px;
|
||||
padding: 8px;
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
max-height: 0;
|
||||
padding: 0;
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
@keyframes MessageMoveOut {
|
||||
0% {
|
||||
max-height: 150px;
|
||||
padding: 8px;
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
max-height: 0;
|
||||
padding: 0;
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
.ant-message-rtl {
|
||||
direction: rtl;
|
||||
}
|
||||
.ant-message-rtl span {
|
||||
direction: rtl;
|
||||
}
|
||||
.ant-message-rtl .anticon {
|
||||
margin-right: 0;
|
||||
margin-left: 8px;
|
||||
}
|
||||
2
web/node_modules/antd/lib/message/style/index.d.ts
generated
vendored
Normal file
2
web/node_modules/antd/lib/message/style/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import '../../style/index.less';
|
||||
import './index.less';
|
||||
5
web/node_modules/antd/lib/message/style/index.js
generated
vendored
Normal file
5
web/node_modules/antd/lib/message/style/index.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
require("../../style/index.less");
|
||||
|
||||
require("./index.less");
|
||||
76
web/node_modules/antd/lib/message/style/index.less
generated
vendored
Normal file
76
web/node_modules/antd/lib/message/style/index.less
generated
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
@import '../../style/themes/index';
|
||||
@import '../../style/mixins/index';
|
||||
|
||||
@message-prefix-cls: ~'@{ant-prefix}-message';
|
||||
|
||||
.@{message-prefix-cls} {
|
||||
.reset-component;
|
||||
|
||||
position: fixed;
|
||||
top: 16px;
|
||||
left: 0;
|
||||
z-index: @zindex-message;
|
||||
width: 100%;
|
||||
pointer-events: none;
|
||||
|
||||
&-notice {
|
||||
padding: 8px;
|
||||
text-align: center;
|
||||
&:first-child {
|
||||
margin-top: -8px;
|
||||
}
|
||||
}
|
||||
|
||||
&-notice-content {
|
||||
display: inline-block;
|
||||
padding: @message-notice-content-padding;
|
||||
background: @message-notice-content-bg;
|
||||
border-radius: @border-radius-base;
|
||||
box-shadow: @shadow-2;
|
||||
pointer-events: all;
|
||||
}
|
||||
|
||||
&-success .@{iconfont-css-prefix} {
|
||||
color: @success-color;
|
||||
}
|
||||
|
||||
&-error .@{iconfont-css-prefix} {
|
||||
color: @error-color;
|
||||
}
|
||||
|
||||
&-warning .@{iconfont-css-prefix} {
|
||||
color: @warning-color;
|
||||
}
|
||||
|
||||
&-info .@{iconfont-css-prefix},
|
||||
&-loading .@{iconfont-css-prefix} {
|
||||
color: @info-color;
|
||||
}
|
||||
|
||||
.@{iconfont-css-prefix} {
|
||||
position: relative;
|
||||
top: 1px;
|
||||
margin-right: 8px;
|
||||
font-size: @font-size-lg;
|
||||
}
|
||||
|
||||
&-notice.move-up-leave.move-up-leave-active {
|
||||
animation-name: MessageMoveOut;
|
||||
animation-duration: 0.3s;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes MessageMoveOut {
|
||||
0% {
|
||||
max-height: 150px;
|
||||
padding: 8px;
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
max-height: 0;
|
||||
padding: 0;
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@import './rtl';
|
||||
17
web/node_modules/antd/lib/message/style/rtl.less
generated
vendored
Normal file
17
web/node_modules/antd/lib/message/style/rtl.less
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
@import '../../style/themes/index';
|
||||
@import '../../style/mixins/index';
|
||||
|
||||
@message-prefix-cls: ~'@{ant-prefix}-message';
|
||||
|
||||
.@{message-prefix-cls}-rtl {
|
||||
direction: rtl;
|
||||
|
||||
span {
|
||||
direction: rtl;
|
||||
}
|
||||
|
||||
.@{iconfont-css-prefix} {
|
||||
margin-right: 0;
|
||||
margin-left: 8px;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user