Latest updates from IceHrmPro
This commit is contained in:
118
web/node_modules/antd/lib/cascader/index.d.ts
generated
vendored
Normal file
118
web/node_modules/antd/lib/cascader/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,118 @@
|
||||
import * as React from 'react';
|
||||
import Input from '../input';
|
||||
import { ConfigConsumerProps, RenderEmptyHandler } from '../config-provider';
|
||||
import { SizeType } from '../config-provider/SizeContext';
|
||||
export interface CascaderOptionType {
|
||||
value?: string;
|
||||
label?: React.ReactNode;
|
||||
disabled?: boolean;
|
||||
isLeaf?: boolean;
|
||||
loading?: boolean;
|
||||
children?: Array<CascaderOptionType>;
|
||||
[key: string]: any;
|
||||
}
|
||||
export interface FieldNamesType {
|
||||
value?: string;
|
||||
label?: string;
|
||||
children?: string;
|
||||
}
|
||||
export interface FilledFieldNamesType {
|
||||
value: string;
|
||||
label: string;
|
||||
children: string;
|
||||
}
|
||||
export declare type CascaderExpandTrigger = 'click' | 'hover';
|
||||
export interface ShowSearchType {
|
||||
filter?: (inputValue: string, path: CascaderOptionType[], names: FilledFieldNamesType) => boolean;
|
||||
render?: (inputValue: string, path: CascaderOptionType[], prefixCls: string | undefined, names: FilledFieldNamesType) => React.ReactNode;
|
||||
sort?: (a: CascaderOptionType[], b: CascaderOptionType[], inputValue: string, names: FilledFieldNamesType) => number;
|
||||
matchInputWidth?: boolean;
|
||||
limit?: number | false;
|
||||
}
|
||||
export interface CascaderProps {
|
||||
/** 可选项数据源 */
|
||||
options: CascaderOptionType[];
|
||||
/** 默认的选中项 */
|
||||
defaultValue?: string[];
|
||||
/** 指定选中项 */
|
||||
value?: string[];
|
||||
/** 选择完成后的回调 */
|
||||
onChange?: (value: string[], selectedOptions?: CascaderOptionType[]) => void;
|
||||
/** 选择后展示的渲染函数 */
|
||||
displayRender?: (label: string[], selectedOptions?: CascaderOptionType[]) => React.ReactNode;
|
||||
/** 自定义样式 */
|
||||
style?: React.CSSProperties;
|
||||
/** 自定义类名 */
|
||||
className?: string;
|
||||
/** 自定义浮层类名 */
|
||||
popupClassName?: string;
|
||||
/** 浮层预设位置:`bottomLeft` `bottomRight` `topLeft` `topRight` */
|
||||
popupPlacement?: string;
|
||||
/** 输入框占位文本 */
|
||||
placeholder?: string;
|
||||
/** 输入框大小,可选 `large` `default` `small` */
|
||||
size?: SizeType;
|
||||
/** whether has border style */
|
||||
bordered?: boolean;
|
||||
/** 禁用 */
|
||||
disabled?: boolean;
|
||||
/** 是否支持清除 */
|
||||
allowClear?: boolean;
|
||||
showSearch?: boolean | ShowSearchType;
|
||||
notFoundContent?: React.ReactNode;
|
||||
loadData?: (selectedOptions?: CascaderOptionType[]) => void;
|
||||
/** 次级菜单的展开方式,可选 'click' 和 'hover' */
|
||||
expandTrigger?: CascaderExpandTrigger;
|
||||
/** 当此项为 true 时,点选每级菜单选项值都会发生变化 */
|
||||
changeOnSelect?: boolean;
|
||||
/** 浮层可见变化时回调 */
|
||||
onPopupVisibleChange?: (popupVisible: boolean) => void;
|
||||
prefixCls?: string;
|
||||
inputPrefixCls?: string;
|
||||
getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
|
||||
popupVisible?: boolean;
|
||||
/** use this after antd@3.7.0 */
|
||||
fieldNames?: FieldNamesType;
|
||||
suffixIcon?: React.ReactNode;
|
||||
}
|
||||
export interface CascaderState {
|
||||
inputFocused: boolean;
|
||||
inputValue: string;
|
||||
value: string[];
|
||||
popupVisible: boolean | undefined;
|
||||
flattenOptions: CascaderOptionType[][] | undefined;
|
||||
prevProps: CascaderProps;
|
||||
}
|
||||
interface CascaderLocale {
|
||||
placeholder?: string;
|
||||
}
|
||||
declare class Cascader extends React.Component<CascaderProps, CascaderState> {
|
||||
static defaultProps: {
|
||||
transitionName: string;
|
||||
options: never[];
|
||||
disabled: boolean;
|
||||
allowClear: boolean;
|
||||
bordered: boolean;
|
||||
};
|
||||
static getDerivedStateFromProps(nextProps: CascaderProps, { prevProps }: CascaderState): Partial<CascaderState>;
|
||||
cachedOptions: CascaderOptionType[];
|
||||
private input;
|
||||
constructor(props: CascaderProps);
|
||||
setValue: (value: string[], selectedOptions?: CascaderOptionType[]) => void;
|
||||
getLabel(): any;
|
||||
saveInput: (node: Input) => void;
|
||||
handleChange: (value: any, selectedOptions: CascaderOptionType[]) => void;
|
||||
handlePopupVisibleChange: (popupVisible: boolean) => void;
|
||||
handleInputBlur: () => void;
|
||||
handleInputClick: (e: React.MouseEvent<HTMLInputElement, MouseEvent>) => void;
|
||||
handleKeyDown: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
||||
handleInputChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
||||
clearSelection: (e: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
||||
generateFilteredOptions(prefixCls: string | undefined, renderEmpty: RenderEmptyHandler): CascaderOptionType[];
|
||||
focus(): void;
|
||||
blur(): void;
|
||||
getPopupPlacement(direction?: string): string;
|
||||
renderCascader: ({ getPopupContainer: getContextPopupContainer, getPrefixCls, renderEmpty, direction, }: ConfigConsumerProps, locale: CascaderLocale) => JSX.Element;
|
||||
render(): JSX.Element;
|
||||
}
|
||||
export default Cascader;
|
||||
596
web/node_modules/antd/lib/cascader/index.js
generated
vendored
Normal file
596
web/node_modules/antd/lib/cascader/index.js
generated
vendored
Normal file
@@ -0,0 +1,596 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports["default"] = void 0;
|
||||
|
||||
var React = _interopRequireWildcard(require("react"));
|
||||
|
||||
var _rcCascader = _interopRequireDefault(require("rc-cascader"));
|
||||
|
||||
var _arrayTreeFilter = _interopRequireDefault(require("array-tree-filter"));
|
||||
|
||||
var _classnames = _interopRequireDefault(require("classnames"));
|
||||
|
||||
var _omit = _interopRequireDefault(require("omit.js"));
|
||||
|
||||
var _isEqual = _interopRequireDefault(require("lodash/isEqual"));
|
||||
|
||||
var _KeyCode = _interopRequireDefault(require("rc-util/lib/KeyCode"));
|
||||
|
||||
var _CloseCircleFilled = _interopRequireDefault(require("@ant-design/icons/CloseCircleFilled"));
|
||||
|
||||
var _DownOutlined = _interopRequireDefault(require("@ant-design/icons/DownOutlined"));
|
||||
|
||||
var _RightOutlined = _interopRequireDefault(require("@ant-design/icons/RightOutlined"));
|
||||
|
||||
var _RedoOutlined = _interopRequireDefault(require("@ant-design/icons/RedoOutlined"));
|
||||
|
||||
var _LeftOutlined = _interopRequireDefault(require("@ant-design/icons/LeftOutlined"));
|
||||
|
||||
var _input = _interopRequireDefault(require("../input"));
|
||||
|
||||
var _configProvider = require("../config-provider");
|
||||
|
||||
var _LocaleReceiver = _interopRequireDefault(require("../locale-provider/LocaleReceiver"));
|
||||
|
||||
var _warning = _interopRequireDefault(require("../_util/warning"));
|
||||
|
||||
var _SizeContext = _interopRequireDefault(require("../config-provider/SizeContext"));
|
||||
|
||||
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 _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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||||
|
||||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
||||
var t = {};
|
||||
|
||||
for (var p in s) {
|
||||
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
||||
}
|
||||
|
||||
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
||||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
|
||||
// We limit the filtered item count by default
|
||||
var defaultLimit = 50;
|
||||
|
||||
function highlightKeyword(str, keyword, prefixCls) {
|
||||
return str.split(keyword).map(function (node, index) {
|
||||
return index === 0 ? node : [/*#__PURE__*/React.createElement("span", {
|
||||
className: "".concat(prefixCls, "-menu-item-keyword"),
|
||||
key: "seperator"
|
||||
}, keyword), node];
|
||||
});
|
||||
}
|
||||
|
||||
function defaultFilterOption(inputValue, path, names) {
|
||||
return path.some(function (option) {
|
||||
return option[names.label].indexOf(inputValue) > -1;
|
||||
});
|
||||
}
|
||||
|
||||
function defaultRenderFilteredOption(inputValue, path, prefixCls, names) {
|
||||
return path.map(function (option, index) {
|
||||
var label = option[names.label];
|
||||
var node = label.indexOf(inputValue) > -1 ? highlightKeyword(label, inputValue, prefixCls) : label;
|
||||
return index === 0 ? node : [' / ', node];
|
||||
});
|
||||
}
|
||||
|
||||
function defaultSortFilteredOption(a, b, inputValue, names) {
|
||||
function callback(elem) {
|
||||
return elem[names.label].indexOf(inputValue) > -1;
|
||||
}
|
||||
|
||||
return a.findIndex(callback) - b.findIndex(callback);
|
||||
}
|
||||
|
||||
function getFieldNames(_ref) {
|
||||
var fieldNames = _ref.fieldNames;
|
||||
return fieldNames;
|
||||
}
|
||||
|
||||
function getFilledFieldNames(props) {
|
||||
var fieldNames = getFieldNames(props) || {};
|
||||
var names = {
|
||||
children: fieldNames.children || 'children',
|
||||
label: fieldNames.label || 'label',
|
||||
value: fieldNames.value || 'value'
|
||||
};
|
||||
return names;
|
||||
}
|
||||
|
||||
function flattenTree(options, props) {
|
||||
var ancestor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
||||
var names = getFilledFieldNames(props);
|
||||
var flattenOptions = [];
|
||||
var childrenName = names.children;
|
||||
options.forEach(function (option) {
|
||||
var path = ancestor.concat(option);
|
||||
|
||||
if (props.changeOnSelect || !option[childrenName] || !option[childrenName].length) {
|
||||
flattenOptions.push(path);
|
||||
}
|
||||
|
||||
if (option[childrenName]) {
|
||||
flattenOptions = flattenOptions.concat(flattenTree(option[childrenName], props, path));
|
||||
}
|
||||
});
|
||||
return flattenOptions;
|
||||
}
|
||||
|
||||
var defaultDisplayRender = function defaultDisplayRender(label) {
|
||||
return label.join(' / ');
|
||||
};
|
||||
|
||||
function warningValueNotExist(list) {
|
||||
var fieldNames = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
(list || []).forEach(function (item) {
|
||||
var valueFieldName = fieldNames.value || 'value';
|
||||
(0, _warning["default"])(valueFieldName in item, 'Cascader', 'Not found `value` in `options`.');
|
||||
warningValueNotExist(item[fieldNames.children || 'children'], fieldNames);
|
||||
});
|
||||
}
|
||||
|
||||
var Cascader = /*#__PURE__*/function (_React$Component) {
|
||||
_inherits(Cascader, _React$Component);
|
||||
|
||||
var _super = _createSuper(Cascader);
|
||||
|
||||
function Cascader(props) {
|
||||
var _this;
|
||||
|
||||
_classCallCheck(this, Cascader);
|
||||
|
||||
_this = _super.call(this, props);
|
||||
_this.cachedOptions = [];
|
||||
|
||||
_this.setValue = function (value) {
|
||||
var selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
||||
|
||||
if (!('value' in _this.props)) {
|
||||
_this.setState({
|
||||
value: value
|
||||
});
|
||||
}
|
||||
|
||||
var onChange = _this.props.onChange;
|
||||
|
||||
if (onChange) {
|
||||
onChange(value, selectedOptions);
|
||||
}
|
||||
};
|
||||
|
||||
_this.saveInput = function (node) {
|
||||
_this.input = node;
|
||||
};
|
||||
|
||||
_this.handleChange = function (value, selectedOptions) {
|
||||
_this.setState({
|
||||
inputValue: ''
|
||||
});
|
||||
|
||||
if (selectedOptions[0].__IS_FILTERED_OPTION) {
|
||||
var unwrappedValue = value[0];
|
||||
var unwrappedSelectedOptions = selectedOptions[0].path;
|
||||
|
||||
_this.setValue(unwrappedValue, unwrappedSelectedOptions);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
_this.setValue(value, selectedOptions);
|
||||
};
|
||||
|
||||
_this.handlePopupVisibleChange = function (popupVisible) {
|
||||
if (!('popupVisible' in _this.props)) {
|
||||
_this.setState(function (state) {
|
||||
return {
|
||||
popupVisible: popupVisible,
|
||||
inputFocused: popupVisible,
|
||||
inputValue: popupVisible ? state.inputValue : ''
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
var onPopupVisibleChange = _this.props.onPopupVisibleChange;
|
||||
|
||||
if (onPopupVisibleChange) {
|
||||
onPopupVisibleChange(popupVisible);
|
||||
}
|
||||
};
|
||||
|
||||
_this.handleInputBlur = function () {
|
||||
_this.setState({
|
||||
inputFocused: false
|
||||
});
|
||||
};
|
||||
|
||||
_this.handleInputClick = function (e) {
|
||||
var _this$state = _this.state,
|
||||
inputFocused = _this$state.inputFocused,
|
||||
popupVisible = _this$state.popupVisible; // Prevent `Trigger` behaviour.
|
||||
|
||||
if (inputFocused || popupVisible) {
|
||||
e.stopPropagation();
|
||||
|
||||
if (e.nativeEvent.stopImmediatePropagation) {
|
||||
e.nativeEvent.stopImmediatePropagation();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
_this.handleKeyDown = function (e) {
|
||||
// SPACE => https://github.com/ant-design/ant-design/issues/16871
|
||||
if (e.keyCode === _KeyCode["default"].BACKSPACE || e.keyCode === _KeyCode["default"].SPACE) {
|
||||
e.stopPropagation();
|
||||
}
|
||||
};
|
||||
|
||||
_this.handleInputChange = function (e) {
|
||||
var inputValue = e.target.value;
|
||||
|
||||
_this.setState({
|
||||
inputValue: inputValue
|
||||
});
|
||||
};
|
||||
|
||||
_this.clearSelection = function (e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
if (!_this.state.inputValue) {
|
||||
_this.setValue([]);
|
||||
|
||||
_this.handlePopupVisibleChange(false);
|
||||
} else {
|
||||
_this.setState({
|
||||
inputValue: ''
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
_this.renderCascader = function (_ref2, locale) {
|
||||
var getContextPopupContainer = _ref2.getPopupContainer,
|
||||
getPrefixCls = _ref2.getPrefixCls,
|
||||
renderEmpty = _ref2.renderEmpty,
|
||||
direction = _ref2.direction;
|
||||
return /*#__PURE__*/React.createElement(_SizeContext["default"].Consumer, null, function (size) {
|
||||
var _classNames, _classNames2, _classNames3, _classNames4;
|
||||
|
||||
var _assertThisInitialize = _assertThisInitialized(_this),
|
||||
props = _assertThisInitialize.props,
|
||||
state = _assertThisInitialize.state;
|
||||
|
||||
var customizePrefixCls = props.prefixCls,
|
||||
customizeInputPrefixCls = props.inputPrefixCls,
|
||||
children = props.children,
|
||||
_props$placeholder = props.placeholder,
|
||||
placeholder = _props$placeholder === void 0 ? locale.placeholder || 'Please select' : _props$placeholder,
|
||||
customizeSize = props.size,
|
||||
disabled = props.disabled,
|
||||
className = props.className,
|
||||
style = props.style,
|
||||
allowClear = props.allowClear,
|
||||
_props$showSearch = props.showSearch,
|
||||
showSearch = _props$showSearch === void 0 ? false : _props$showSearch,
|
||||
suffixIcon = props.suffixIcon,
|
||||
notFoundContent = props.notFoundContent,
|
||||
popupClassName = props.popupClassName,
|
||||
bordered = props.bordered,
|
||||
otherProps = __rest(props, ["prefixCls", "inputPrefixCls", "children", "placeholder", "size", "disabled", "className", "style", "allowClear", "showSearch", "suffixIcon", "notFoundContent", "popupClassName", "bordered"]);
|
||||
|
||||
var mergedSize = customizeSize || size;
|
||||
var value = state.value,
|
||||
inputFocused = state.inputFocused;
|
||||
var isRtlLayout = direction === 'rtl';
|
||||
var prefixCls = getPrefixCls('cascader', customizePrefixCls);
|
||||
var inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);
|
||||
var sizeCls = (0, _classnames["default"])((_classNames = {}, _defineProperty(_classNames, "".concat(inputPrefixCls, "-lg"), mergedSize === 'large'), _defineProperty(_classNames, "".concat(inputPrefixCls, "-sm"), mergedSize === 'small'), _classNames));
|
||||
var clearIcon = allowClear && !disabled && value.length > 0 || state.inputValue ? /*#__PURE__*/React.createElement(_CloseCircleFilled["default"], {
|
||||
className: "".concat(prefixCls, "-picker-clear"),
|
||||
onClick: _this.clearSelection
|
||||
}) : null;
|
||||
var arrowCls = (0, _classnames["default"])((_classNames2 = {}, _defineProperty(_classNames2, "".concat(prefixCls, "-picker-arrow"), true), _defineProperty(_classNames2, "".concat(prefixCls, "-picker-arrow-expand"), state.popupVisible), _classNames2));
|
||||
var pickerCls = (0, _classnames["default"])(className, "".concat(prefixCls, "-picker"), (_classNames3 = {}, _defineProperty(_classNames3, "".concat(prefixCls, "-picker-rtl"), isRtlLayout), _defineProperty(_classNames3, "".concat(prefixCls, "-picker-with-value"), state.inputValue), _defineProperty(_classNames3, "".concat(prefixCls, "-picker-disabled"), disabled), _defineProperty(_classNames3, "".concat(prefixCls, "-picker-").concat(mergedSize), !!mergedSize), _defineProperty(_classNames3, "".concat(prefixCls, "-picker-show-search"), !!showSearch), _defineProperty(_classNames3, "".concat(prefixCls, "-picker-focused"), inputFocused), _defineProperty(_classNames3, "".concat(prefixCls, "-picker-borderless"), !bordered), _classNames3)); // Fix bug of https://github.com/facebook/react/pull/5004
|
||||
// and https://fb.me/react-unknown-prop
|
||||
|
||||
var inputProps = (0, _omit["default"])(otherProps, ['onChange', 'options', 'popupPlacement', 'transitionName', 'displayRender', 'onPopupVisibleChange', 'changeOnSelect', 'expandTrigger', 'popupVisible', 'getPopupContainer', 'loadData', 'popupClassName', 'filterOption', 'renderFilteredOption', 'sortFilteredOption', 'notFoundContent', 'fieldNames', 'bordered']);
|
||||
var options = props.options;
|
||||
var names = getFilledFieldNames(_this.props);
|
||||
|
||||
if (options && options.length > 0) {
|
||||
if (state.inputValue) {
|
||||
var filteredOptions = _this.generateFilteredOptions(prefixCls, renderEmpty);
|
||||
|
||||
options = (0, _isEqual["default"])(filteredOptions, _this.cachedOptions) ? _this.cachedOptions : filteredOptions;
|
||||
}
|
||||
} else {
|
||||
var _ref3;
|
||||
|
||||
options = [(_ref3 = {}, _defineProperty(_ref3, names.label, notFoundContent || renderEmpty('Cascader')), _defineProperty(_ref3, names.value, 'ANT_CASCADER_NOT_FOUND'), _defineProperty(_ref3, "disabled", true), _ref3)];
|
||||
} // Dropdown menu should keep previous status until it is fully closed.
|
||||
|
||||
|
||||
if (!state.popupVisible) {
|
||||
options = _this.cachedOptions;
|
||||
} else {
|
||||
_this.cachedOptions = options;
|
||||
}
|
||||
|
||||
var dropdownMenuColumnStyle = {};
|
||||
var isNotFound = (options || []).length === 1 && options[0].isEmptyNode;
|
||||
|
||||
if (isNotFound) {
|
||||
dropdownMenuColumnStyle.height = 'auto'; // Height of one row.
|
||||
} // The default value of `matchInputWidth` is `true`
|
||||
|
||||
|
||||
var resultListMatchInputWidth = showSearch.matchInputWidth !== false;
|
||||
|
||||
if (resultListMatchInputWidth && (state.inputValue || isNotFound) && _this.input) {
|
||||
dropdownMenuColumnStyle.width = _this.input.input.offsetWidth;
|
||||
}
|
||||
|
||||
var inputIcon = suffixIcon && (React.isValidElement(suffixIcon) ? React.cloneElement(suffixIcon, {
|
||||
className: (0, _classnames["default"])((_classNames4 = {}, _defineProperty(_classNames4, suffixIcon.props.className, suffixIcon.props.className), _defineProperty(_classNames4, "".concat(prefixCls, "-picker-arrow"), true), _classNames4))
|
||||
}) : /*#__PURE__*/React.createElement("span", {
|
||||
className: "".concat(prefixCls, "-picker-arrow")
|
||||
}, suffixIcon)) || /*#__PURE__*/React.createElement(_DownOutlined["default"], {
|
||||
className: arrowCls
|
||||
});
|
||||
var input = children || /*#__PURE__*/React.createElement("span", {
|
||||
style: style,
|
||||
className: pickerCls
|
||||
}, /*#__PURE__*/React.createElement("span", {
|
||||
className: "".concat(prefixCls, "-picker-label")
|
||||
}, _this.getLabel()), /*#__PURE__*/React.createElement(_input["default"], _extends({}, inputProps, {
|
||||
tabIndex: "-1",
|
||||
ref: _this.saveInput,
|
||||
prefixCls: inputPrefixCls,
|
||||
placeholder: value && value.length > 0 ? undefined : placeholder,
|
||||
className: "".concat(prefixCls, "-input ").concat(sizeCls),
|
||||
value: state.inputValue,
|
||||
disabled: disabled,
|
||||
readOnly: !showSearch,
|
||||
autoComplete: inputProps.autoComplete || 'off',
|
||||
onClick: showSearch ? _this.handleInputClick : undefined,
|
||||
onBlur: showSearch ? _this.handleInputBlur : undefined,
|
||||
onKeyDown: _this.handleKeyDown,
|
||||
onChange: showSearch ? _this.handleInputChange : undefined
|
||||
})), clearIcon, inputIcon);
|
||||
var expandIcon = /*#__PURE__*/React.createElement(_RightOutlined["default"], null);
|
||||
|
||||
if (isRtlLayout) {
|
||||
expandIcon = /*#__PURE__*/React.createElement(_LeftOutlined["default"], null);
|
||||
}
|
||||
|
||||
var loadingIcon = /*#__PURE__*/React.createElement("span", {
|
||||
className: "".concat(prefixCls, "-menu-item-loading-icon")
|
||||
}, /*#__PURE__*/React.createElement(_RedoOutlined["default"], {
|
||||
spin: true
|
||||
}));
|
||||
var getPopupContainer = props.getPopupContainer || getContextPopupContainer;
|
||||
var rest = (0, _omit["default"])(props, ['inputIcon', 'expandIcon', 'loadingIcon', 'bordered']);
|
||||
var rcCascaderRtlPopupClassName = (0, _classnames["default"])(popupClassName, _defineProperty({}, "".concat(prefixCls, "-menu-").concat(direction), direction === 'rtl'));
|
||||
return /*#__PURE__*/React.createElement(_rcCascader["default"], _extends({}, rest, {
|
||||
prefixCls: prefixCls,
|
||||
getPopupContainer: getPopupContainer,
|
||||
options: options,
|
||||
value: value,
|
||||
popupVisible: state.popupVisible,
|
||||
onPopupVisibleChange: _this.handlePopupVisibleChange,
|
||||
onChange: _this.handleChange,
|
||||
dropdownMenuColumnStyle: dropdownMenuColumnStyle,
|
||||
expandIcon: expandIcon,
|
||||
loadingIcon: loadingIcon,
|
||||
popupClassName: rcCascaderRtlPopupClassName,
|
||||
popupPlacement: _this.getPopupPlacement(direction)
|
||||
}), input);
|
||||
});
|
||||
};
|
||||
|
||||
_this.state = {
|
||||
value: props.value || props.defaultValue || [],
|
||||
inputValue: '',
|
||||
inputFocused: false,
|
||||
popupVisible: props.popupVisible,
|
||||
flattenOptions: props.showSearch ? flattenTree(props.options, props) : undefined,
|
||||
prevProps: props
|
||||
};
|
||||
return _this;
|
||||
}
|
||||
|
||||
_createClass(Cascader, [{
|
||||
key: "getLabel",
|
||||
value: function getLabel() {
|
||||
var _this$props = this.props,
|
||||
options = _this$props.options,
|
||||
_this$props$displayRe = _this$props.displayRender,
|
||||
displayRender = _this$props$displayRe === void 0 ? defaultDisplayRender : _this$props$displayRe;
|
||||
var names = getFilledFieldNames(this.props);
|
||||
var value = this.state.value;
|
||||
var unwrappedValue = Array.isArray(value[0]) ? value[0] : value;
|
||||
var selectedOptions = (0, _arrayTreeFilter["default"])(options, function (o, level) {
|
||||
return o[names.value] === unwrappedValue[level];
|
||||
}, {
|
||||
childrenKeyName: names.children
|
||||
});
|
||||
var label = selectedOptions.map(function (o) {
|
||||
return o[names.label];
|
||||
});
|
||||
return displayRender(label, selectedOptions);
|
||||
}
|
||||
}, {
|
||||
key: "generateFilteredOptions",
|
||||
value: function generateFilteredOptions(prefixCls, renderEmpty) {
|
||||
var _this2 = this,
|
||||
_ref5;
|
||||
|
||||
var _this$props2 = this.props,
|
||||
showSearch = _this$props2.showSearch,
|
||||
notFoundContent = _this$props2.notFoundContent;
|
||||
var names = getFilledFieldNames(this.props);
|
||||
var _showSearch$filter = showSearch.filter,
|
||||
filter = _showSearch$filter === void 0 ? defaultFilterOption : _showSearch$filter,
|
||||
_showSearch$render = showSearch.render,
|
||||
render = _showSearch$render === void 0 ? defaultRenderFilteredOption : _showSearch$render,
|
||||
_showSearch$sort = showSearch.sort,
|
||||
sort = _showSearch$sort === void 0 ? defaultSortFilteredOption : _showSearch$sort,
|
||||
_showSearch$limit = showSearch.limit,
|
||||
limit = _showSearch$limit === void 0 ? defaultLimit : _showSearch$limit;
|
||||
var _this$state2 = this.state,
|
||||
_this$state2$flattenO = _this$state2.flattenOptions,
|
||||
flattenOptions = _this$state2$flattenO === void 0 ? [] : _this$state2$flattenO,
|
||||
inputValue = _this$state2.inputValue; // Limit the filter if needed
|
||||
|
||||
var filtered;
|
||||
|
||||
if (limit > 0) {
|
||||
filtered = [];
|
||||
var matchCount = 0; // Perf optimization to filter items only below the limit
|
||||
|
||||
flattenOptions.some(function (path) {
|
||||
var match = filter(_this2.state.inputValue, path, names);
|
||||
|
||||
if (match) {
|
||||
filtered.push(path);
|
||||
matchCount += 1;
|
||||
}
|
||||
|
||||
return matchCount >= limit;
|
||||
});
|
||||
} else {
|
||||
(0, _warning["default"])(typeof limit !== 'number', 'Cascader', "'limit' of showSearch should be positive number or false.");
|
||||
filtered = flattenOptions.filter(function (path) {
|
||||
return filter(_this2.state.inputValue, path, names);
|
||||
});
|
||||
}
|
||||
|
||||
filtered.sort(function (a, b) {
|
||||
return sort(a, b, inputValue, names);
|
||||
});
|
||||
|
||||
if (filtered.length > 0) {
|
||||
return filtered.map(function (path) {
|
||||
var _ref4;
|
||||
|
||||
return _ref4 = {
|
||||
__IS_FILTERED_OPTION: true,
|
||||
path: path
|
||||
}, _defineProperty(_ref4, names.value, path.map(function (o) {
|
||||
return o[names.value];
|
||||
})), _defineProperty(_ref4, names.label, render(inputValue, path, prefixCls, names)), _defineProperty(_ref4, "disabled", path.some(function (o) {
|
||||
return !!o.disabled;
|
||||
})), _defineProperty(_ref4, "isEmptyNode", true), _ref4;
|
||||
});
|
||||
}
|
||||
|
||||
return [(_ref5 = {}, _defineProperty(_ref5, names.value, 'ANT_CASCADER_NOT_FOUND'), _defineProperty(_ref5, names.label, notFoundContent || renderEmpty('Cascader')), _defineProperty(_ref5, "disabled", true), _defineProperty(_ref5, "isEmptyNode", true), _ref5)];
|
||||
}
|
||||
}, {
|
||||
key: "focus",
|
||||
value: function focus() {
|
||||
this.input.focus();
|
||||
}
|
||||
}, {
|
||||
key: "blur",
|
||||
value: function blur() {
|
||||
this.input.blur();
|
||||
}
|
||||
}, {
|
||||
key: "getPopupPlacement",
|
||||
value: function getPopupPlacement() {
|
||||
var direction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'ltr';
|
||||
var popupPlacement = this.props.popupPlacement;
|
||||
|
||||
if (popupPlacement !== undefined) {
|
||||
return popupPlacement;
|
||||
}
|
||||
|
||||
return direction === 'rtl' ? 'bottomRight' : 'bottomLeft';
|
||||
}
|
||||
}, {
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _this3 = this;
|
||||
|
||||
return /*#__PURE__*/React.createElement(_configProvider.ConfigConsumer, null, function (configArgument) {
|
||||
return /*#__PURE__*/React.createElement(_LocaleReceiver["default"], null, function (locale) {
|
||||
return _this3.renderCascader(configArgument, locale);
|
||||
});
|
||||
});
|
||||
}
|
||||
}], [{
|
||||
key: "getDerivedStateFromProps",
|
||||
value: function getDerivedStateFromProps(nextProps, _ref6) {
|
||||
var prevProps = _ref6.prevProps;
|
||||
var newState = {
|
||||
prevProps: nextProps
|
||||
};
|
||||
|
||||
if ('value' in nextProps) {
|
||||
newState.value = nextProps.value || [];
|
||||
}
|
||||
|
||||
if ('popupVisible' in nextProps) {
|
||||
newState.popupVisible = nextProps.popupVisible;
|
||||
}
|
||||
|
||||
if (nextProps.showSearch && prevProps.options !== nextProps.options) {
|
||||
newState.flattenOptions = flattenTree(nextProps.options, nextProps);
|
||||
}
|
||||
|
||||
if (process.env.NODE_ENV !== 'production' && nextProps.options) {
|
||||
warningValueNotExist(nextProps.options, getFieldNames(nextProps));
|
||||
}
|
||||
|
||||
return newState;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Cascader;
|
||||
}(React.Component);
|
||||
|
||||
Cascader.defaultProps = {
|
||||
transitionName: 'slide-up',
|
||||
options: [],
|
||||
disabled: false,
|
||||
allowClear: true,
|
||||
bordered: true
|
||||
};
|
||||
var _default = Cascader;
|
||||
exports["default"] = _default;
|
||||
9
web/node_modules/antd/lib/cascader/style/css.js
generated
vendored
Normal file
9
web/node_modules/antd/lib/cascader/style/css.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
|
||||
require("../../style/index.css");
|
||||
|
||||
require("./index.css");
|
||||
|
||||
require("../../empty/style/css");
|
||||
|
||||
require("../../input/style/css");
|
||||
281
web/node_modules/antd/lib/cascader/style/index.css
generated
vendored
Normal file
281
web/node_modules/antd/lib/cascader/style/index.css
generated
vendored
Normal file
@@ -0,0 +1,281 @@
|
||||
/* 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-cascader {
|
||||
-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';
|
||||
}
|
||||
.ant-cascader-input.ant-input {
|
||||
position: static;
|
||||
width: 100%;
|
||||
padding-right: 24px;
|
||||
background-color: transparent !important;
|
||||
cursor: pointer;
|
||||
}
|
||||
.ant-cascader-picker-show-search .ant-cascader-input.ant-input {
|
||||
position: relative;
|
||||
}
|
||||
.ant-cascader-picker {
|
||||
-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: relative;
|
||||
display: inline-block;
|
||||
background-color: #fff;
|
||||
border-radius: 2px;
|
||||
outline: 0;
|
||||
cursor: pointer;
|
||||
-webkit-transition: color 0.3s;
|
||||
transition: color 0.3s;
|
||||
}
|
||||
.ant-cascader-picker-with-value .ant-cascader-picker-label {
|
||||
color: transparent;
|
||||
}
|
||||
.ant-cascader-picker-disabled {
|
||||
color: rgba(0, 0, 0, 0.25);
|
||||
background: #f5f5f5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.ant-cascader-picker-disabled .ant-cascader-input {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.ant-cascader-picker:focus .ant-cascader-input {
|
||||
border-color: #40a9ff;
|
||||
border-right-width: 1px !important;
|
||||
outline: 0;
|
||||
-webkit-box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
|
||||
box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
|
||||
}
|
||||
.ant-cascader-picker-borderless .ant-cascader-input {
|
||||
border-color: transparent !important;
|
||||
-webkit-box-shadow: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
.ant-cascader-picker-show-search.ant-cascader-picker-focused {
|
||||
color: rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
.ant-cascader-picker-label {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 20px;
|
||||
margin-top: -10px;
|
||||
padding: 0 20px 0 12px;
|
||||
overflow: hidden;
|
||||
line-height: 20px;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.ant-cascader-picker-clear {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 12px;
|
||||
z-index: 2;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
margin-top: -6px;
|
||||
color: rgba(0, 0, 0, 0.25);
|
||||
font-size: 12px;
|
||||
line-height: 12px;
|
||||
background: #fff;
|
||||
cursor: pointer;
|
||||
opacity: 0;
|
||||
-webkit-transition: color 0.3s ease, opacity 0.15s ease;
|
||||
transition: color 0.3s ease, opacity 0.15s ease;
|
||||
}
|
||||
.ant-cascader-picker-clear:hover {
|
||||
color: rgba(0, 0, 0, 0.45);
|
||||
}
|
||||
.ant-cascader-picker:hover .ant-cascader-picker-clear {
|
||||
opacity: 1;
|
||||
}
|
||||
.ant-cascader-picker-arrow {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 12px;
|
||||
z-index: 1;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
margin-top: -6px;
|
||||
color: rgba(0, 0, 0, 0.25);
|
||||
font-size: 12px;
|
||||
line-height: 12px;
|
||||
-webkit-transition: -webkit-transform 0.2s;
|
||||
transition: -webkit-transform 0.2s;
|
||||
transition: transform 0.2s;
|
||||
transition: transform 0.2s, -webkit-transform 0.2s;
|
||||
}
|
||||
.ant-cascader-picker-arrow.ant-cascader-picker-arrow-expand {
|
||||
-webkit-transform: rotate(180deg);
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
.ant-cascader-picker-label:hover + .ant-cascader-input {
|
||||
border-color: #40a9ff;
|
||||
border-right-width: 1px !important;
|
||||
}
|
||||
.ant-cascader-picker-small .ant-cascader-picker-clear,
|
||||
.ant-cascader-picker-small .ant-cascader-picker-arrow {
|
||||
right: 8px;
|
||||
}
|
||||
.ant-cascader-menus {
|
||||
position: absolute;
|
||||
z-index: 1050;
|
||||
font-size: 14px;
|
||||
white-space: nowrap;
|
||||
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);
|
||||
}
|
||||
.ant-cascader-menus ul,
|
||||
.ant-cascader-menus ol {
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
}
|
||||
.ant-cascader-menus-empty,
|
||||
.ant-cascader-menus-hidden {
|
||||
display: none;
|
||||
}
|
||||
.ant-cascader-menus.slide-up-enter.slide-up-enter-active.ant-cascader-menus-placement-bottomLeft,
|
||||
.ant-cascader-menus.slide-up-appear.slide-up-appear-active.ant-cascader-menus-placement-bottomLeft {
|
||||
-webkit-animation-name: antSlideUpIn;
|
||||
animation-name: antSlideUpIn;
|
||||
}
|
||||
.ant-cascader-menus.slide-up-enter.slide-up-enter-active.ant-cascader-menus-placement-topLeft,
|
||||
.ant-cascader-menus.slide-up-appear.slide-up-appear-active.ant-cascader-menus-placement-topLeft {
|
||||
-webkit-animation-name: antSlideDownIn;
|
||||
animation-name: antSlideDownIn;
|
||||
}
|
||||
.ant-cascader-menus.slide-up-leave.slide-up-leave-active.ant-cascader-menus-placement-bottomLeft {
|
||||
-webkit-animation-name: antSlideUpOut;
|
||||
animation-name: antSlideUpOut;
|
||||
}
|
||||
.ant-cascader-menus.slide-up-leave.slide-up-leave-active.ant-cascader-menus-placement-topLeft {
|
||||
-webkit-animation-name: antSlideDownOut;
|
||||
animation-name: antSlideDownOut;
|
||||
}
|
||||
.ant-cascader-menu {
|
||||
display: inline-block;
|
||||
min-width: 111px;
|
||||
height: 180px;
|
||||
margin: 0;
|
||||
padding: 4px 0;
|
||||
overflow: auto;
|
||||
vertical-align: top;
|
||||
list-style: none;
|
||||
border-right: 1px solid #f0f0f0;
|
||||
-ms-overflow-style: -ms-autohiding-scrollbar;
|
||||
}
|
||||
.ant-cascader-menu:first-child {
|
||||
border-radius: 2px 0 0 2px;
|
||||
}
|
||||
.ant-cascader-menu:last-child {
|
||||
margin-right: -1px;
|
||||
border-right-color: transparent;
|
||||
border-radius: 0 2px 2px 0;
|
||||
}
|
||||
.ant-cascader-menu:only-child {
|
||||
border-radius: 2px;
|
||||
}
|
||||
.ant-cascader-menu-item {
|
||||
padding: 5px 12px;
|
||||
line-height: 22px;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
-webkit-transition: all 0.3s;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
.ant-cascader-menu-item:hover {
|
||||
background: #f5f5f5;
|
||||
}
|
||||
.ant-cascader-menu-item-disabled {
|
||||
color: rgba(0, 0, 0, 0.25);
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.ant-cascader-menu-item-disabled:hover {
|
||||
background: transparent;
|
||||
}
|
||||
.ant-cascader-menu-item-active:not(.ant-cascader-menu-item-disabled),
|
||||
.ant-cascader-menu-item-active:not(.ant-cascader-menu-item-disabled):hover {
|
||||
font-weight: 600;
|
||||
background-color: #e6f7ff;
|
||||
}
|
||||
.ant-cascader-menu-item-expand {
|
||||
position: relative;
|
||||
padding-right: 24px;
|
||||
}
|
||||
.ant-cascader-menu-item-expand .ant-cascader-menu-item-expand-icon,
|
||||
.ant-cascader-menu-item-loading-icon {
|
||||
display: inline-block;
|
||||
font-size: 10px;
|
||||
position: absolute;
|
||||
right: 12px;
|
||||
color: rgba(0, 0, 0, 0.45);
|
||||
}
|
||||
.ant-cascader-menu-item .ant-cascader-menu-item-keyword {
|
||||
color: #ff4d4f;
|
||||
}
|
||||
.ant-cascader-picker-rtl .ant-cascader-input.ant-input {
|
||||
padding-right: 11px;
|
||||
padding-left: 24px;
|
||||
text-align: right;
|
||||
}
|
||||
.ant-cascader-picker-rtl {
|
||||
direction: rtl;
|
||||
}
|
||||
.ant-cascader-picker-rtl .ant-cascader-picker-label {
|
||||
padding: 0 12px 0 20px;
|
||||
text-align: right;
|
||||
}
|
||||
.ant-cascader-picker-rtl .ant-cascader-picker-clear {
|
||||
right: auto;
|
||||
left: 12px;
|
||||
}
|
||||
.ant-cascader-picker-rtl .ant-cascader-picker-arrow {
|
||||
right: auto;
|
||||
left: 12px;
|
||||
}
|
||||
.ant-cascader-picker-rtl.ant-cascader-picker-small .ant-cascader-picker-clear,
|
||||
.ant-cascader-picker-rtl.ant-cascader-picker-small .ant-cascader-picker-arrow {
|
||||
right: auto;
|
||||
left: 8px;
|
||||
}
|
||||
.ant-cascader-menu-rtl {
|
||||
direction: rtl;
|
||||
border-right: none;
|
||||
border-left: 1px solid #f0f0f0;
|
||||
}
|
||||
.ant-cascader-menu-rtl:last-child {
|
||||
margin-right: 0;
|
||||
margin-left: -1px;
|
||||
border-left-color: transparent;
|
||||
border-radius: 0 0 4px 4px;
|
||||
}
|
||||
.ant-cascader-menu-rtl .ant-cascader-menu-item-expand {
|
||||
padding-right: 12px;
|
||||
padding-left: 24px;
|
||||
}
|
||||
.ant-cascader-menu-rtl .ant-cascader-menu-item-expand .ant-cascader-menu-item-expand-icon,
|
||||
.ant-cascader-menu-rtl .ant-cascader-menu-item-loading-icon {
|
||||
right: auto;
|
||||
left: 12px;
|
||||
}
|
||||
4
web/node_modules/antd/lib/cascader/style/index.d.ts
generated
vendored
Normal file
4
web/node_modules/antd/lib/cascader/style/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import '../../style/index.less';
|
||||
import './index.less';
|
||||
import '../../empty/style';
|
||||
import '../../input/style';
|
||||
9
web/node_modules/antd/lib/cascader/style/index.js
generated
vendored
Normal file
9
web/node_modules/antd/lib/cascader/style/index.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
|
||||
require("../../style/index.less");
|
||||
|
||||
require("./index.less");
|
||||
|
||||
require("../../empty/style");
|
||||
|
||||
require("../../input/style");
|
||||
234
web/node_modules/antd/lib/cascader/style/index.less
generated
vendored
Normal file
234
web/node_modules/antd/lib/cascader/style/index.less
generated
vendored
Normal file
@@ -0,0 +1,234 @@
|
||||
@import '../../style/themes/index';
|
||||
@import '../../style/mixins/index';
|
||||
@import '../../input/style/mixin';
|
||||
|
||||
@cascader-prefix-cls: ~'@{ant-prefix}-cascader';
|
||||
|
||||
.@{cascader-prefix-cls} {
|
||||
.reset-component;
|
||||
|
||||
&-input.@{ant-prefix}-input {
|
||||
// Keep it static for https://github.com/ant-design/ant-design/issues/16738
|
||||
position: static;
|
||||
width: 100%;
|
||||
// https://github.com/ant-design/ant-design/issues/17582
|
||||
padding-right: 24px;
|
||||
// Add important to fix https://github.com/ant-design/ant-design/issues/5078
|
||||
// because input.less will compile after cascader.less
|
||||
background-color: transparent !important;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&-picker-show-search &-input.@{ant-prefix}-input {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
&-picker {
|
||||
.reset-component;
|
||||
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
background-color: @cascader-bg;
|
||||
border-radius: @border-radius-base;
|
||||
outline: 0;
|
||||
cursor: pointer;
|
||||
transition: color 0.3s;
|
||||
|
||||
&-with-value &-label {
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
&-disabled {
|
||||
color: @disabled-color;
|
||||
background: @input-disabled-bg;
|
||||
cursor: not-allowed;
|
||||
.@{cascader-prefix-cls}-input {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
|
||||
&:focus .@{cascader-prefix-cls}-input {
|
||||
.active;
|
||||
}
|
||||
|
||||
&-borderless .@{cascader-prefix-cls}-input {
|
||||
border-color: transparent !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
&-show-search&-focused {
|
||||
color: @disabled-color;
|
||||
}
|
||||
|
||||
&-label {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 20px;
|
||||
margin-top: -10px;
|
||||
padding: 0 20px 0 @control-padding-horizontal;
|
||||
overflow: hidden;
|
||||
line-height: 20px;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
&-clear {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: @control-padding-horizontal;
|
||||
z-index: 2;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
margin-top: -6px;
|
||||
color: @disabled-color;
|
||||
font-size: @font-size-sm;
|
||||
line-height: 12px;
|
||||
background: @component-background;
|
||||
cursor: pointer;
|
||||
opacity: 0;
|
||||
transition: color 0.3s ease, opacity 0.15s ease;
|
||||
&:hover {
|
||||
color: @text-color-secondary;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover &-clear {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
// arrow
|
||||
&-arrow {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: @control-padding-horizontal;
|
||||
z-index: 1;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
margin-top: -6px;
|
||||
color: @disabled-color;
|
||||
font-size: 12px;
|
||||
line-height: 12px;
|
||||
transition: transform 0.2s;
|
||||
&&-expand {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// https://github.com/ant-design/ant-design/pull/12407#issuecomment-424657810
|
||||
&-picker-label:hover + &-input {
|
||||
.hover;
|
||||
}
|
||||
|
||||
&-picker-small &-picker-clear,
|
||||
&-picker-small &-picker-arrow {
|
||||
right: @control-padding-horizontal-sm;
|
||||
}
|
||||
|
||||
&-menus {
|
||||
position: absolute;
|
||||
z-index: @zindex-dropdown;
|
||||
font-size: @cascader-dropdown-font-size;
|
||||
white-space: nowrap;
|
||||
background: @cascader-menu-bg;
|
||||
border-radius: @border-radius-base;
|
||||
box-shadow: @box-shadow-base;
|
||||
|
||||
ul,
|
||||
ol {
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
&-empty,
|
||||
&-hidden {
|
||||
display: none;
|
||||
}
|
||||
&.slide-up-enter.slide-up-enter-active&-placement-bottomLeft,
|
||||
&.slide-up-appear.slide-up-appear-active&-placement-bottomLeft {
|
||||
animation-name: antSlideUpIn;
|
||||
}
|
||||
|
||||
&.slide-up-enter.slide-up-enter-active&-placement-topLeft,
|
||||
&.slide-up-appear.slide-up-appear-active&-placement-topLeft {
|
||||
animation-name: antSlideDownIn;
|
||||
}
|
||||
|
||||
&.slide-up-leave.slide-up-leave-active&-placement-bottomLeft {
|
||||
animation-name: antSlideUpOut;
|
||||
}
|
||||
|
||||
&.slide-up-leave.slide-up-leave-active&-placement-topLeft {
|
||||
animation-name: antSlideDownOut;
|
||||
}
|
||||
}
|
||||
&-menu {
|
||||
display: inline-block;
|
||||
min-width: 111px;
|
||||
height: 180px;
|
||||
margin: 0;
|
||||
padding: @cascader-dropdown-edge-child-vertical-padding 0;
|
||||
overflow: auto;
|
||||
vertical-align: top;
|
||||
list-style: none;
|
||||
border-right: @border-width-base @border-style-base @cascader-menu-border-color-split;
|
||||
-ms-overflow-style: -ms-autohiding-scrollbar; // https://github.com/ant-design/ant-design/issues/11857
|
||||
|
||||
&:first-child {
|
||||
border-radius: @border-radius-base 0 0 @border-radius-base;
|
||||
}
|
||||
&:last-child {
|
||||
margin-right: -1px;
|
||||
border-right-color: transparent;
|
||||
border-radius: 0 @border-radius-base @border-radius-base 0;
|
||||
}
|
||||
&:only-child {
|
||||
border-radius: @border-radius-base;
|
||||
}
|
||||
}
|
||||
&-menu-item {
|
||||
padding: @cascader-dropdown-vertical-padding @control-padding-horizontal;
|
||||
line-height: @cascader-dropdown-line-height;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s;
|
||||
&:hover {
|
||||
background: @item-hover-bg;
|
||||
}
|
||||
&-disabled {
|
||||
color: @disabled-color;
|
||||
cursor: not-allowed;
|
||||
&:hover {
|
||||
background: transparent;
|
||||
}
|
||||
}
|
||||
&-active:not(&-disabled) {
|
||||
&,
|
||||
&:hover {
|
||||
font-weight: @select-item-selected-font-weight;
|
||||
background-color: @cascader-item-selected-bg;
|
||||
}
|
||||
}
|
||||
&-expand {
|
||||
position: relative;
|
||||
padding-right: 24px;
|
||||
}
|
||||
|
||||
&-expand &-expand-icon,
|
||||
&-loading-icon {
|
||||
.iconfont-size-under-12px(10px);
|
||||
|
||||
position: absolute;
|
||||
right: @control-padding-horizontal;
|
||||
color: @text-color-secondary;
|
||||
}
|
||||
|
||||
& &-keyword {
|
||||
color: @highlight-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@import './rtl';
|
||||
83
web/node_modules/antd/lib/cascader/style/rtl.less
generated
vendored
Normal file
83
web/node_modules/antd/lib/cascader/style/rtl.less
generated
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
@import '../../style/themes/index';
|
||||
@import '../../style/mixins/index';
|
||||
@import '../../input/style/mixin';
|
||||
|
||||
@cascader-prefix-cls: ~'@{ant-prefix}-cascader';
|
||||
@picker-rtl-cls: ~'@{cascader-prefix-cls}-picker-rtl';
|
||||
@menu-rtl-cls: ~'@{cascader-prefix-cls}-menu-rtl';
|
||||
|
||||
.@{cascader-prefix-cls} {
|
||||
&-input.@{ant-prefix}-input {
|
||||
.@{picker-rtl-cls} & {
|
||||
padding-right: @input-padding-horizontal-base;
|
||||
padding-left: 24px;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
&-picker {
|
||||
&-rtl {
|
||||
direction: rtl;
|
||||
}
|
||||
|
||||
&-label {
|
||||
.@{picker-rtl-cls} & {
|
||||
padding: 0 @control-padding-horizontal 0 20px;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
&-clear {
|
||||
.@{picker-rtl-cls} & {
|
||||
right: auto;
|
||||
left: @control-padding-horizontal;
|
||||
}
|
||||
}
|
||||
|
||||
&-arrow {
|
||||
.@{picker-rtl-cls} & {
|
||||
right: auto;
|
||||
left: @control-padding-horizontal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-picker-small &-picker-clear,
|
||||
&-picker-small &-picker-arrow {
|
||||
.@{picker-rtl-cls}& {
|
||||
right: auto;
|
||||
left: @control-padding-horizontal-sm;
|
||||
}
|
||||
}
|
||||
|
||||
&-menu {
|
||||
&-rtl {
|
||||
direction: rtl;
|
||||
border-right: none;
|
||||
border-left: @border-width-base @border-style-base @border-color-split;
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
margin-left: -1px;
|
||||
border-left-color: transparent;
|
||||
border-radius: 0 0 4px 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-menu-item {
|
||||
&-expand {
|
||||
.@{menu-rtl-cls} & {
|
||||
padding-right: @control-padding-horizontal;
|
||||
padding-left: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
&-expand &-expand-icon,
|
||||
&-loading-icon {
|
||||
.@{menu-rtl-cls} & {
|
||||
right: auto;
|
||||
left: @control-padding-horizontal;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user