Latest updates from IceHrmPro
This commit is contained in:
13
web/node_modules/antd/lib/transfer/ListItem.d.ts
generated
vendored
Normal file
13
web/node_modules/antd/lib/transfer/ListItem.d.ts
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import * as React from 'react';
|
||||
import { TransferItem } from '.';
|
||||
declare type ListItemProps = {
|
||||
renderedText?: string | number;
|
||||
renderedEl: React.ReactNode;
|
||||
disabled?: boolean;
|
||||
checked?: boolean;
|
||||
prefixCls: string;
|
||||
onClick: (item: TransferItem) => void;
|
||||
item: TransferItem;
|
||||
};
|
||||
declare const _default: React.MemoExoticComponent<(props: ListItemProps) => JSX.Element>;
|
||||
export default _default;
|
||||
58
web/node_modules/antd/lib/transfer/ListItem.js
generated
vendored
Normal file
58
web/node_modules/antd/lib/transfer/ListItem.js
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
"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 _checkbox = _interopRequireDefault(require("../checkbox"));
|
||||
|
||||
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 _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 ListItem = function ListItem(props) {
|
||||
var _classNames;
|
||||
|
||||
var renderedText = props.renderedText,
|
||||
renderedEl = props.renderedEl,
|
||||
item = props.item,
|
||||
checked = props.checked,
|
||||
disabled = props.disabled,
|
||||
prefixCls = props.prefixCls,
|
||||
onClick = props.onClick;
|
||||
var className = (0, _classnames["default"])((_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-content-item"), true), _defineProperty(_classNames, "".concat(prefixCls, "-content-item-disabled"), disabled || item.disabled), _defineProperty(_classNames, "".concat(prefixCls, "-content-item-checked"), checked), _classNames));
|
||||
var title;
|
||||
|
||||
if (typeof renderedText === 'string' || typeof renderedText === 'number') {
|
||||
title = String(renderedText);
|
||||
}
|
||||
|
||||
var listItem = /*#__PURE__*/React.createElement("li", {
|
||||
className: className,
|
||||
title: title,
|
||||
onClick: disabled || item.disabled ? undefined : function () {
|
||||
return onClick(item);
|
||||
}
|
||||
}, /*#__PURE__*/React.createElement(_checkbox["default"], {
|
||||
checked: checked,
|
||||
disabled: disabled || item.disabled
|
||||
}), /*#__PURE__*/React.createElement("span", {
|
||||
className: "".concat(prefixCls, "-content-item-text")
|
||||
}, renderedEl));
|
||||
return listItem;
|
||||
};
|
||||
|
||||
var _default = React.memo(ListItem);
|
||||
|
||||
exports["default"] = _default;
|
||||
123
web/node_modules/antd/lib/transfer/index.d.ts
generated
vendored
Normal file
123
web/node_modules/antd/lib/transfer/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,123 @@
|
||||
import * as React from 'react';
|
||||
import List, { TransferListProps } from './list';
|
||||
import Search from './search';
|
||||
import { TransferListBodyProps } from './renderListBody';
|
||||
export { TransferListProps } from './list';
|
||||
export { TransferOperationProps } from './operation';
|
||||
export { TransferSearchProps } from './search';
|
||||
export declare type TransferDirection = 'left' | 'right';
|
||||
export interface RenderResultObject {
|
||||
label: React.ReactElement;
|
||||
value: string;
|
||||
}
|
||||
export declare type RenderResult = React.ReactElement | RenderResultObject | string | null;
|
||||
declare type TransferRender = (item: TransferItem) => RenderResult;
|
||||
export interface TransferItem {
|
||||
key: string;
|
||||
title?: string;
|
||||
description?: string;
|
||||
disabled?: boolean;
|
||||
[name: string]: any;
|
||||
}
|
||||
export interface ListStyle {
|
||||
direction: TransferDirection;
|
||||
}
|
||||
export declare type SelectAllLabel = React.ReactNode | ((info: {
|
||||
selectedCount: number;
|
||||
totalCount: number;
|
||||
}) => React.ReactNode);
|
||||
export interface TransferProps {
|
||||
prefixCls?: string;
|
||||
className?: string;
|
||||
disabled?: boolean;
|
||||
dataSource: TransferItem[];
|
||||
targetKeys?: string[];
|
||||
selectedKeys?: string[];
|
||||
render?: TransferRender;
|
||||
onChange?: (targetKeys: string[], direction: string, moveKeys: string[]) => void;
|
||||
onSelectChange?: (sourceSelectedKeys: string[], targetSelectedKeys: string[]) => void;
|
||||
style?: React.CSSProperties;
|
||||
listStyle: ((style: ListStyle) => React.CSSProperties) | React.CSSProperties;
|
||||
operationStyle?: React.CSSProperties;
|
||||
titles?: string[];
|
||||
operations?: string[];
|
||||
showSearch?: boolean;
|
||||
filterOption?: (inputValue: string, item: TransferItem) => boolean;
|
||||
locale?: Partial<TransferLocale>;
|
||||
footer?: (props: TransferListProps) => React.ReactNode;
|
||||
rowKey?: (record: TransferItem) => string;
|
||||
onSearch?: (direction: TransferDirection, value: string) => void;
|
||||
onScroll?: (direction: TransferDirection, e: React.SyntheticEvent<HTMLUListElement>) => void;
|
||||
children?: (props: TransferListBodyProps) => React.ReactNode;
|
||||
showSelectAll?: boolean;
|
||||
selectAllLabels?: SelectAllLabel[];
|
||||
}
|
||||
export interface TransferLocale {
|
||||
titles: string[];
|
||||
notFoundContent?: React.ReactNode;
|
||||
searchPlaceholder: string;
|
||||
itemUnit: string;
|
||||
itemsUnit: string;
|
||||
}
|
||||
declare class Transfer extends React.Component<TransferProps, any> {
|
||||
static List: typeof List;
|
||||
static Operation: ({ disabled, moveToLeft, moveToRight, leftArrowText, rightArrowText, leftActive, rightActive, className, style, direction, }: import("./operation").TransferOperationProps) => JSX.Element;
|
||||
static Search: typeof Search;
|
||||
static defaultProps: {
|
||||
dataSource: never[];
|
||||
locale: {};
|
||||
showSearch: boolean;
|
||||
listStyle: () => void;
|
||||
};
|
||||
static getDerivedStateFromProps(nextProps: TransferProps): {
|
||||
sourceSelectedKeys: string[];
|
||||
targetSelectedKeys: string[];
|
||||
} | null;
|
||||
separatedDataSource: {
|
||||
leftDataSource: TransferItem[];
|
||||
rightDataSource: TransferItem[];
|
||||
} | null;
|
||||
constructor(props: TransferProps);
|
||||
getSelectedKeysName(direction: TransferDirection): "sourceSelectedKeys" | "targetSelectedKeys";
|
||||
getTitles(transferLocale: TransferLocale): string[];
|
||||
getLocale: (transferLocale: TransferLocale, renderEmpty: (componentName?: string | undefined) => React.ReactNode) => {
|
||||
notFoundContent: React.ReactNode;
|
||||
titles: string[];
|
||||
searchPlaceholder: string;
|
||||
itemUnit: string;
|
||||
itemsUnit: string;
|
||||
} | {
|
||||
titles: string[];
|
||||
notFoundContent: React.ReactNode;
|
||||
searchPlaceholder: string;
|
||||
itemUnit: string;
|
||||
itemsUnit: string;
|
||||
};
|
||||
moveTo: (direction: TransferDirection) => void;
|
||||
moveToLeft: () => void;
|
||||
moveToRight: () => void;
|
||||
onItemSelectAll: (direction: TransferDirection, selectedKeys: string[], checkAll: boolean) => void;
|
||||
onLeftItemSelectAll: (selectedKeys: string[], checkAll: boolean) => void;
|
||||
onRightItemSelectAll: (selectedKeys: string[], checkAll: boolean) => void;
|
||||
handleFilter: (direction: TransferDirection, e: React.ChangeEvent<HTMLInputElement>) => void;
|
||||
handleLeftFilter: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
||||
handleRightFilter: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
||||
handleClear: (direction: TransferDirection) => void;
|
||||
handleLeftClear: () => void;
|
||||
handleRightClear: () => void;
|
||||
onItemSelect: (direction: TransferDirection, selectedKey: string, checked: boolean) => void;
|
||||
onLeftItemSelect: (selectedKey: string, checked: boolean) => void;
|
||||
onRightItemSelect: (selectedKey: string, checked: boolean) => void;
|
||||
handleScroll: (direction: TransferDirection, e: React.SyntheticEvent<HTMLUListElement, Event>) => void;
|
||||
handleLeftScroll: (e: React.SyntheticEvent<HTMLUListElement, Event>) => void;
|
||||
handleRightScroll: (e: React.SyntheticEvent<HTMLUListElement, Event>) => void;
|
||||
handleSelectChange(direction: TransferDirection, holder: string[]): void;
|
||||
handleListStyle: (listStyle: React.CSSProperties | ((style: ListStyle) => React.CSSProperties), direction: TransferDirection) => React.CSSProperties;
|
||||
separateDataSource(): {
|
||||
leftDataSource: TransferItem[];
|
||||
rightDataSource: TransferItem[];
|
||||
};
|
||||
renderTransfer: (transferLocale: TransferLocale) => JSX.Element;
|
||||
render(): JSX.Element;
|
||||
}
|
||||
export default Transfer;
|
||||
466
web/node_modules/antd/lib/transfer/index.js
generated
vendored
Normal file
466
web/node_modules/antd/lib/transfer/index.js
generated
vendored
Normal file
@@ -0,0 +1,466 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports["default"] = void 0;
|
||||
|
||||
var React = _interopRequireWildcard(require("react"));
|
||||
|
||||
var _classnames = _interopRequireDefault(require("classnames"));
|
||||
|
||||
var _list = _interopRequireDefault(require("./list"));
|
||||
|
||||
var _operation = _interopRequireDefault(require("./operation"));
|
||||
|
||||
var _search = _interopRequireDefault(require("./search"));
|
||||
|
||||
var _LocaleReceiver = _interopRequireDefault(require("../locale-provider/LocaleReceiver"));
|
||||
|
||||
var _default2 = _interopRequireDefault(require("../locale/default"));
|
||||
|
||||
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 _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 _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 Transfer = /*#__PURE__*/function (_React$Component) {
|
||||
_inherits(Transfer, _React$Component);
|
||||
|
||||
var _super = _createSuper(Transfer);
|
||||
|
||||
function Transfer(props) {
|
||||
var _this;
|
||||
|
||||
_classCallCheck(this, Transfer);
|
||||
|
||||
_this = _super.call(this, props);
|
||||
_this.separatedDataSource = null;
|
||||
|
||||
_this.getLocale = function (transferLocale, renderEmpty) {
|
||||
return _extends(_extends(_extends({}, transferLocale), {
|
||||
notFoundContent: renderEmpty('Transfer')
|
||||
}), _this.props.locale);
|
||||
};
|
||||
|
||||
_this.moveTo = function (direction) {
|
||||
var _this$props = _this.props,
|
||||
_this$props$targetKey = _this$props.targetKeys,
|
||||
targetKeys = _this$props$targetKey === void 0 ? [] : _this$props$targetKey,
|
||||
_this$props$dataSourc = _this$props.dataSource,
|
||||
dataSource = _this$props$dataSourc === void 0 ? [] : _this$props$dataSourc,
|
||||
onChange = _this$props.onChange;
|
||||
var _this$state = _this.state,
|
||||
sourceSelectedKeys = _this$state.sourceSelectedKeys,
|
||||
targetSelectedKeys = _this$state.targetSelectedKeys;
|
||||
var moveKeys = direction === 'right' ? sourceSelectedKeys : targetSelectedKeys; // filter the disabled options
|
||||
|
||||
var newMoveKeys = moveKeys.filter(function (key) {
|
||||
return !dataSource.some(function (data) {
|
||||
return !!(key === data.key && data.disabled);
|
||||
});
|
||||
}); // move items to target box
|
||||
|
||||
var newTargetKeys = direction === 'right' ? newMoveKeys.concat(targetKeys) : targetKeys.filter(function (targetKey) {
|
||||
return newMoveKeys.indexOf(targetKey) === -1;
|
||||
}); // empty checked keys
|
||||
|
||||
var oppositeDirection = direction === 'right' ? 'left' : 'right';
|
||||
|
||||
_this.setState(_defineProperty({}, _this.getSelectedKeysName(oppositeDirection), []));
|
||||
|
||||
_this.handleSelectChange(oppositeDirection, []);
|
||||
|
||||
if (onChange) {
|
||||
onChange(newTargetKeys, direction, newMoveKeys);
|
||||
}
|
||||
};
|
||||
|
||||
_this.moveToLeft = function () {
|
||||
return _this.moveTo('left');
|
||||
};
|
||||
|
||||
_this.moveToRight = function () {
|
||||
return _this.moveTo('right');
|
||||
};
|
||||
|
||||
_this.onItemSelectAll = function (direction, selectedKeys, checkAll) {
|
||||
var originalSelectedKeys = _this.state[_this.getSelectedKeysName(direction)] || [];
|
||||
var mergedCheckedKeys = [];
|
||||
|
||||
if (checkAll) {
|
||||
// Merge current keys with origin key
|
||||
mergedCheckedKeys = Array.from(new Set([].concat(_toConsumableArray(originalSelectedKeys), _toConsumableArray(selectedKeys))));
|
||||
} else {
|
||||
// Remove current keys from origin keys
|
||||
mergedCheckedKeys = originalSelectedKeys.filter(function (key) {
|
||||
return selectedKeys.indexOf(key) === -1;
|
||||
});
|
||||
}
|
||||
|
||||
_this.handleSelectChange(direction, mergedCheckedKeys);
|
||||
|
||||
if (!_this.props.selectedKeys) {
|
||||
_this.setState(_defineProperty({}, _this.getSelectedKeysName(direction), mergedCheckedKeys));
|
||||
}
|
||||
};
|
||||
|
||||
_this.onLeftItemSelectAll = function (selectedKeys, checkAll) {
|
||||
return _this.onItemSelectAll('left', selectedKeys, checkAll);
|
||||
};
|
||||
|
||||
_this.onRightItemSelectAll = function (selectedKeys, checkAll) {
|
||||
return _this.onItemSelectAll('right', selectedKeys, checkAll);
|
||||
};
|
||||
|
||||
_this.handleFilter = function (direction, e) {
|
||||
var onSearch = _this.props.onSearch;
|
||||
var value = e.target.value;
|
||||
|
||||
if (onSearch) {
|
||||
onSearch(direction, value);
|
||||
}
|
||||
};
|
||||
|
||||
_this.handleLeftFilter = function (e) {
|
||||
return _this.handleFilter('left', e);
|
||||
};
|
||||
|
||||
_this.handleRightFilter = function (e) {
|
||||
return _this.handleFilter('right', e);
|
||||
};
|
||||
|
||||
_this.handleClear = function (direction) {
|
||||
var onSearch = _this.props.onSearch;
|
||||
|
||||
if (onSearch) {
|
||||
onSearch(direction, '');
|
||||
}
|
||||
};
|
||||
|
||||
_this.handleLeftClear = function () {
|
||||
return _this.handleClear('left');
|
||||
};
|
||||
|
||||
_this.handleRightClear = function () {
|
||||
return _this.handleClear('right');
|
||||
};
|
||||
|
||||
_this.onItemSelect = function (direction, selectedKey, checked) {
|
||||
var _this$state2 = _this.state,
|
||||
sourceSelectedKeys = _this$state2.sourceSelectedKeys,
|
||||
targetSelectedKeys = _this$state2.targetSelectedKeys;
|
||||
var holder = direction === 'left' ? _toConsumableArray(sourceSelectedKeys) : _toConsumableArray(targetSelectedKeys);
|
||||
var index = holder.indexOf(selectedKey);
|
||||
|
||||
if (index > -1) {
|
||||
holder.splice(index, 1);
|
||||
}
|
||||
|
||||
if (checked) {
|
||||
holder.push(selectedKey);
|
||||
}
|
||||
|
||||
_this.handleSelectChange(direction, holder);
|
||||
|
||||
if (!_this.props.selectedKeys) {
|
||||
_this.setState(_defineProperty({}, _this.getSelectedKeysName(direction), holder));
|
||||
}
|
||||
};
|
||||
|
||||
_this.onLeftItemSelect = function (selectedKey, checked) {
|
||||
return _this.onItemSelect('left', selectedKey, checked);
|
||||
};
|
||||
|
||||
_this.onRightItemSelect = function (selectedKey, checked) {
|
||||
return _this.onItemSelect('right', selectedKey, checked);
|
||||
};
|
||||
|
||||
_this.handleScroll = function (direction, e) {
|
||||
var onScroll = _this.props.onScroll;
|
||||
|
||||
if (onScroll) {
|
||||
onScroll(direction, e);
|
||||
}
|
||||
};
|
||||
|
||||
_this.handleLeftScroll = function (e) {
|
||||
return _this.handleScroll('left', e);
|
||||
};
|
||||
|
||||
_this.handleRightScroll = function (e) {
|
||||
return _this.handleScroll('right', e);
|
||||
};
|
||||
|
||||
_this.handleListStyle = function (listStyle, direction) {
|
||||
if (typeof listStyle === 'function') {
|
||||
return listStyle({
|
||||
direction: direction
|
||||
});
|
||||
}
|
||||
|
||||
return listStyle;
|
||||
};
|
||||
|
||||
_this.renderTransfer = function (transferLocale) {
|
||||
return /*#__PURE__*/React.createElement(_configProvider.ConfigConsumer, null, function (_ref) {
|
||||
var _classNames;
|
||||
|
||||
var getPrefixCls = _ref.getPrefixCls,
|
||||
renderEmpty = _ref.renderEmpty,
|
||||
direction = _ref.direction;
|
||||
var _this$props2 = _this.props,
|
||||
customizePrefixCls = _this$props2.prefixCls,
|
||||
className = _this$props2.className,
|
||||
disabled = _this$props2.disabled,
|
||||
_this$props2$operatio = _this$props2.operations,
|
||||
operations = _this$props2$operatio === void 0 ? [] : _this$props2$operatio,
|
||||
showSearch = _this$props2.showSearch,
|
||||
footer = _this$props2.footer,
|
||||
style = _this$props2.style,
|
||||
listStyle = _this$props2.listStyle,
|
||||
operationStyle = _this$props2.operationStyle,
|
||||
filterOption = _this$props2.filterOption,
|
||||
render = _this$props2.render,
|
||||
children = _this$props2.children,
|
||||
showSelectAll = _this$props2.showSelectAll;
|
||||
var prefixCls = getPrefixCls('transfer', customizePrefixCls);
|
||||
|
||||
var locale = _extends(_extends(_extends({}, transferLocale), {
|
||||
notFoundContent: renderEmpty('Transfer')
|
||||
}), _this.props.locale);
|
||||
|
||||
var _this$state3 = _this.state,
|
||||
sourceSelectedKeys = _this$state3.sourceSelectedKeys,
|
||||
targetSelectedKeys = _this$state3.targetSelectedKeys;
|
||||
|
||||
var _this$separateDataSou = _this.separateDataSource(),
|
||||
leftDataSource = _this$separateDataSou.leftDataSource,
|
||||
rightDataSource = _this$separateDataSou.rightDataSource;
|
||||
|
||||
var leftActive = targetSelectedKeys.length > 0;
|
||||
var rightActive = sourceSelectedKeys.length > 0;
|
||||
var cls = (0, _classnames["default"])(className, prefixCls, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-disabled"), disabled), _defineProperty(_classNames, "".concat(prefixCls, "-customize-list"), !!children), _defineProperty(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames));
|
||||
var titles = _this.props.titles || locale.titles;
|
||||
var selectAllLabels = _this.props.selectAllLabels || [];
|
||||
return /*#__PURE__*/React.createElement("div", {
|
||||
className: cls,
|
||||
style: style
|
||||
}, /*#__PURE__*/React.createElement(_list["default"], _extends({
|
||||
prefixCls: "".concat(prefixCls, "-list"),
|
||||
titleText: titles[0],
|
||||
dataSource: leftDataSource,
|
||||
filterOption: filterOption,
|
||||
style: _this.handleListStyle(listStyle, 'left'),
|
||||
checkedKeys: sourceSelectedKeys,
|
||||
handleFilter: _this.handleLeftFilter,
|
||||
handleClear: _this.handleLeftClear,
|
||||
onItemSelect: _this.onLeftItemSelect,
|
||||
onItemSelectAll: _this.onLeftItemSelectAll,
|
||||
render: render,
|
||||
showSearch: showSearch,
|
||||
renderList: children,
|
||||
footer: footer,
|
||||
onScroll: _this.handleLeftScroll,
|
||||
disabled: disabled,
|
||||
direction: "left",
|
||||
showSelectAll: showSelectAll,
|
||||
selectAllLabel: selectAllLabels[0]
|
||||
}, locale)), /*#__PURE__*/React.createElement(_operation["default"], {
|
||||
className: "".concat(prefixCls, "-operation"),
|
||||
rightActive: rightActive,
|
||||
rightArrowText: operations[0],
|
||||
moveToRight: _this.moveToRight,
|
||||
leftActive: leftActive,
|
||||
leftArrowText: operations[1],
|
||||
moveToLeft: _this.moveToLeft,
|
||||
style: operationStyle,
|
||||
disabled: disabled,
|
||||
direction: direction
|
||||
}), /*#__PURE__*/React.createElement(_list["default"], _extends({
|
||||
prefixCls: "".concat(prefixCls, "-list"),
|
||||
titleText: titles[1],
|
||||
dataSource: rightDataSource,
|
||||
filterOption: filterOption,
|
||||
style: _this.handleListStyle(listStyle, 'right'),
|
||||
checkedKeys: targetSelectedKeys,
|
||||
handleFilter: _this.handleRightFilter,
|
||||
handleClear: _this.handleRightClear,
|
||||
onItemSelect: _this.onRightItemSelect,
|
||||
onItemSelectAll: _this.onRightItemSelectAll,
|
||||
render: render,
|
||||
showSearch: showSearch,
|
||||
renderList: children,
|
||||
footer: footer,
|
||||
onScroll: _this.handleRightScroll,
|
||||
disabled: disabled,
|
||||
direction: "right",
|
||||
showSelectAll: showSelectAll,
|
||||
selectAllLabel: selectAllLabels[1]
|
||||
}, locale)));
|
||||
});
|
||||
};
|
||||
|
||||
var _props$selectedKeys = props.selectedKeys,
|
||||
selectedKeys = _props$selectedKeys === void 0 ? [] : _props$selectedKeys,
|
||||
_props$targetKeys = props.targetKeys,
|
||||
targetKeys = _props$targetKeys === void 0 ? [] : _props$targetKeys;
|
||||
_this.state = {
|
||||
sourceSelectedKeys: selectedKeys.filter(function (key) {
|
||||
return targetKeys.indexOf(key) === -1;
|
||||
}),
|
||||
targetSelectedKeys: selectedKeys.filter(function (key) {
|
||||
return targetKeys.indexOf(key) > -1;
|
||||
})
|
||||
};
|
||||
return _this;
|
||||
}
|
||||
|
||||
_createClass(Transfer, [{
|
||||
key: "getSelectedKeysName",
|
||||
// eslint-disable-next-line class-methods-use-this
|
||||
value: function getSelectedKeysName(direction) {
|
||||
return direction === 'left' ? 'sourceSelectedKeys' : 'targetSelectedKeys';
|
||||
}
|
||||
}, {
|
||||
key: "getTitles",
|
||||
value: function getTitles(transferLocale) {
|
||||
var props = this.props;
|
||||
|
||||
if (props.titles) {
|
||||
return props.titles;
|
||||
}
|
||||
|
||||
return transferLocale.titles;
|
||||
}
|
||||
}, {
|
||||
key: "handleSelectChange",
|
||||
value: function handleSelectChange(direction, holder) {
|
||||
var _this$state4 = this.state,
|
||||
sourceSelectedKeys = _this$state4.sourceSelectedKeys,
|
||||
targetSelectedKeys = _this$state4.targetSelectedKeys;
|
||||
var onSelectChange = this.props.onSelectChange;
|
||||
|
||||
if (!onSelectChange) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (direction === 'left') {
|
||||
onSelectChange(holder, targetSelectedKeys);
|
||||
} else {
|
||||
onSelectChange(sourceSelectedKeys, holder);
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: "separateDataSource",
|
||||
value: function separateDataSource() {
|
||||
var _this$props3 = this.props,
|
||||
dataSource = _this$props3.dataSource,
|
||||
rowKey = _this$props3.rowKey,
|
||||
_this$props3$targetKe = _this$props3.targetKeys,
|
||||
targetKeys = _this$props3$targetKe === void 0 ? [] : _this$props3$targetKe;
|
||||
var leftDataSource = [];
|
||||
var rightDataSource = new Array(targetKeys.length);
|
||||
dataSource.forEach(function (record) {
|
||||
if (rowKey) {
|
||||
record.key = rowKey(record);
|
||||
} // rightDataSource should be ordered by targetKeys
|
||||
// leftDataSource should be ordered by dataSource
|
||||
|
||||
|
||||
var indexOfKey = targetKeys.indexOf(record.key);
|
||||
|
||||
if (indexOfKey !== -1) {
|
||||
rightDataSource[indexOfKey] = record;
|
||||
} else {
|
||||
leftDataSource.push(record);
|
||||
}
|
||||
});
|
||||
return {
|
||||
leftDataSource: leftDataSource,
|
||||
rightDataSource: rightDataSource
|
||||
};
|
||||
}
|
||||
}, {
|
||||
key: "render",
|
||||
value: function render() {
|
||||
return /*#__PURE__*/React.createElement(_LocaleReceiver["default"], {
|
||||
componentName: "Transfer",
|
||||
defaultLocale: _default2["default"].Transfer
|
||||
}, this.renderTransfer);
|
||||
}
|
||||
}], [{
|
||||
key: "getDerivedStateFromProps",
|
||||
value: function getDerivedStateFromProps(nextProps) {
|
||||
if (nextProps.selectedKeys) {
|
||||
var targetKeys = nextProps.targetKeys || [];
|
||||
return {
|
||||
sourceSelectedKeys: nextProps.selectedKeys.filter(function (key) {
|
||||
return !targetKeys.includes(key);
|
||||
}),
|
||||
targetSelectedKeys: nextProps.selectedKeys.filter(function (key) {
|
||||
return targetKeys.includes(key);
|
||||
})
|
||||
};
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Transfer;
|
||||
}(React.Component); // For high-level customized Transfer @dqaria
|
||||
|
||||
|
||||
Transfer.List = _list["default"];
|
||||
Transfer.Operation = _operation["default"];
|
||||
Transfer.Search = _search["default"];
|
||||
Transfer.defaultProps = {
|
||||
dataSource: [],
|
||||
locale: {},
|
||||
showSearch: false,
|
||||
listStyle: function listStyle() {}
|
||||
};
|
||||
var _default = Transfer;
|
||||
exports["default"] = _default;
|
||||
63
web/node_modules/antd/lib/transfer/list.d.ts
generated
vendored
Normal file
63
web/node_modules/antd/lib/transfer/list.d.ts
generated
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
import * as React from 'react';
|
||||
import { TransferItem, TransferDirection, RenderResult, SelectAllLabel } from './index';
|
||||
import { TransferListBodyProps } from './renderListBody';
|
||||
export interface RenderedItem {
|
||||
renderedText: string;
|
||||
renderedEl: React.ReactNode;
|
||||
item: TransferItem;
|
||||
}
|
||||
declare type RenderListFunction = (props: TransferListBodyProps) => React.ReactNode;
|
||||
export interface TransferListProps {
|
||||
prefixCls: string;
|
||||
titleText: string;
|
||||
dataSource: TransferItem[];
|
||||
filterOption?: (filterText: string, item: TransferItem) => boolean;
|
||||
style?: React.CSSProperties;
|
||||
checkedKeys: string[];
|
||||
handleFilter: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
||||
onItemSelect: (key: string, check: boolean) => void;
|
||||
onItemSelectAll: (dataSource: string[], checkAll: boolean) => void;
|
||||
handleClear: () => void;
|
||||
render?: (item: TransferItem) => RenderResult;
|
||||
showSearch?: boolean;
|
||||
searchPlaceholder: string;
|
||||
notFoundContent: React.ReactNode;
|
||||
itemUnit: string;
|
||||
itemsUnit: string;
|
||||
renderList?: RenderListFunction;
|
||||
footer?: (props: TransferListProps) => React.ReactNode;
|
||||
onScroll: (e: React.UIEvent<HTMLUListElement>) => void;
|
||||
disabled?: boolean;
|
||||
direction: TransferDirection;
|
||||
showSelectAll?: boolean;
|
||||
selectAllLabel?: SelectAllLabel;
|
||||
}
|
||||
interface TransferListState {
|
||||
/** Filter input value */
|
||||
filterValue: string;
|
||||
}
|
||||
export default class TransferList extends React.PureComponent<TransferListProps, TransferListState> {
|
||||
static defaultProps: {
|
||||
dataSource: never[];
|
||||
titleText: string;
|
||||
showSearch: boolean;
|
||||
};
|
||||
timer: number;
|
||||
triggerScrollTimer: number;
|
||||
constructor(props: TransferListProps);
|
||||
componentWillUnmount(): void;
|
||||
getCheckStatus(filteredItems: TransferItem[]): "none" | "all" | "part";
|
||||
getFilteredItems(dataSource: TransferItem[], filterValue: string): {
|
||||
filteredItems: TransferItem[];
|
||||
filteredRenderItems: RenderedItem[];
|
||||
};
|
||||
getListBody(prefixCls: string, searchPlaceholder: string, filterValue: string, filteredItems: TransferItem[], notFoundContent: React.ReactNode, filteredRenderItems: RenderedItem[], checkedKeys: string[], renderList?: RenderListFunction, showSearch?: boolean, disabled?: boolean): React.ReactNode;
|
||||
getCheckBox(filteredItems: TransferItem[], onItemSelectAll: (dataSource: string[], checkAll: boolean) => void, showSelectAll?: boolean, disabled?: boolean): false | JSX.Element;
|
||||
handleFilter: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
||||
handleClear: () => void;
|
||||
matchFilter: (text: string, item: TransferItem) => boolean;
|
||||
renderItem: (item: TransferItem) => RenderedItem;
|
||||
getSelectAllLabel: (selectedCount: number, totalCount: number) => React.ReactNode;
|
||||
render(): JSX.Element;
|
||||
}
|
||||
export {};
|
||||
313
web/node_modules/antd/lib/transfer/list.js
generated
vendored
Normal file
313
web/node_modules/antd/lib/transfer/list.js
generated
vendored
Normal file
@@ -0,0 +1,313 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports["default"] = void 0;
|
||||
|
||||
var React = _interopRequireWildcard(require("react"));
|
||||
|
||||
var _omit = _interopRequireDefault(require("omit.js"));
|
||||
|
||||
var _classnames = _interopRequireDefault(require("classnames"));
|
||||
|
||||
var _checkbox = _interopRequireDefault(require("../checkbox"));
|
||||
|
||||
var _search = _interopRequireDefault(require("./search"));
|
||||
|
||||
var _renderListBody = _interopRequireWildcard(require("./renderListBody"));
|
||||
|
||||
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 defaultRender = function defaultRender() {
|
||||
return null;
|
||||
};
|
||||
|
||||
function isRenderResultPlainObject(result) {
|
||||
return result && !React.isValidElement(result) && Object.prototype.toString.call(result) === '[object Object]';
|
||||
}
|
||||
|
||||
function renderListNode(renderList, props) {
|
||||
var bodyContent = renderList ? renderList(props) : null;
|
||||
var customize = !!bodyContent;
|
||||
|
||||
if (!customize) {
|
||||
bodyContent = (0, _renderListBody["default"])(props);
|
||||
}
|
||||
|
||||
return {
|
||||
customize: customize,
|
||||
bodyContent: bodyContent
|
||||
};
|
||||
}
|
||||
|
||||
var TransferList = /*#__PURE__*/function (_React$PureComponent) {
|
||||
_inherits(TransferList, _React$PureComponent);
|
||||
|
||||
var _super = _createSuper(TransferList);
|
||||
|
||||
function TransferList(props) {
|
||||
var _this;
|
||||
|
||||
_classCallCheck(this, TransferList);
|
||||
|
||||
_this = _super.call(this, props);
|
||||
|
||||
_this.handleFilter = function (e) {
|
||||
var handleFilter = _this.props.handleFilter;
|
||||
var filterValue = e.target.value;
|
||||
|
||||
_this.setState({
|
||||
filterValue: filterValue
|
||||
});
|
||||
|
||||
handleFilter(e);
|
||||
};
|
||||
|
||||
_this.handleClear = function () {
|
||||
var handleClear = _this.props.handleClear;
|
||||
|
||||
_this.setState({
|
||||
filterValue: ''
|
||||
});
|
||||
|
||||
handleClear();
|
||||
};
|
||||
|
||||
_this.matchFilter = function (text, item) {
|
||||
var filterValue = _this.state.filterValue;
|
||||
var filterOption = _this.props.filterOption;
|
||||
|
||||
if (filterOption) {
|
||||
return filterOption(filterValue, item);
|
||||
}
|
||||
|
||||
return text.indexOf(filterValue) >= 0;
|
||||
};
|
||||
|
||||
_this.renderItem = function (item) {
|
||||
var _this$props$render = _this.props.render,
|
||||
render = _this$props$render === void 0 ? defaultRender : _this$props$render;
|
||||
var renderResult = render(item);
|
||||
var isRenderResultPlain = isRenderResultPlainObject(renderResult);
|
||||
return {
|
||||
renderedText: isRenderResultPlain ? renderResult.value : renderResult,
|
||||
renderedEl: isRenderResultPlain ? renderResult.label : renderResult,
|
||||
item: item
|
||||
};
|
||||
};
|
||||
|
||||
_this.getSelectAllLabel = function (selectedCount, totalCount) {
|
||||
var _this$props = _this.props,
|
||||
itemsUnit = _this$props.itemsUnit,
|
||||
itemUnit = _this$props.itemUnit,
|
||||
selectAllLabel = _this$props.selectAllLabel;
|
||||
|
||||
if (selectAllLabel) {
|
||||
return typeof selectAllLabel === 'function' ? selectAllLabel({
|
||||
selectedCount: selectedCount,
|
||||
totalCount: totalCount
|
||||
}) : selectAllLabel;
|
||||
}
|
||||
|
||||
var unit = totalCount > 1 ? itemsUnit : itemUnit;
|
||||
return /*#__PURE__*/React.createElement(React.Fragment, null, (selectedCount > 0 ? "".concat(selectedCount, "/") : '') + totalCount, " ", unit);
|
||||
};
|
||||
|
||||
_this.state = {
|
||||
filterValue: ''
|
||||
};
|
||||
return _this;
|
||||
}
|
||||
|
||||
_createClass(TransferList, [{
|
||||
key: "componentWillUnmount",
|
||||
value: function componentWillUnmount() {
|
||||
clearTimeout(this.triggerScrollTimer);
|
||||
}
|
||||
}, {
|
||||
key: "getCheckStatus",
|
||||
value: function getCheckStatus(filteredItems) {
|
||||
var checkedKeys = this.props.checkedKeys;
|
||||
|
||||
if (checkedKeys.length === 0) {
|
||||
return 'none';
|
||||
}
|
||||
|
||||
if (filteredItems.every(function (item) {
|
||||
return checkedKeys.indexOf(item.key) >= 0 || !!item.disabled;
|
||||
})) {
|
||||
return 'all';
|
||||
}
|
||||
|
||||
return 'part';
|
||||
}
|
||||
}, {
|
||||
key: "getFilteredItems",
|
||||
value: function getFilteredItems(dataSource, filterValue) {
|
||||
var _this2 = this;
|
||||
|
||||
var filteredItems = [];
|
||||
var filteredRenderItems = [];
|
||||
dataSource.forEach(function (item) {
|
||||
var renderedItem = _this2.renderItem(item);
|
||||
|
||||
var renderedText = renderedItem.renderedText; // Filter skip
|
||||
|
||||
if (filterValue && filterValue.trim() && !_this2.matchFilter(renderedText, item)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
filteredItems.push(item);
|
||||
filteredRenderItems.push(renderedItem);
|
||||
});
|
||||
return {
|
||||
filteredItems: filteredItems,
|
||||
filteredRenderItems: filteredRenderItems
|
||||
};
|
||||
}
|
||||
}, {
|
||||
key: "getListBody",
|
||||
value: function getListBody(prefixCls, searchPlaceholder, filterValue, filteredItems, notFoundContent, filteredRenderItems, checkedKeys, renderList, showSearch, disabled) {
|
||||
var search = showSearch ? /*#__PURE__*/React.createElement("div", {
|
||||
className: "".concat(prefixCls, "-body-search-wrapper")
|
||||
}, /*#__PURE__*/React.createElement(_search["default"], {
|
||||
prefixCls: "".concat(prefixCls, "-search"),
|
||||
onChange: this.handleFilter,
|
||||
handleClear: this.handleClear,
|
||||
placeholder: searchPlaceholder,
|
||||
value: filterValue,
|
||||
disabled: disabled
|
||||
})) : null;
|
||||
|
||||
var _renderListNode = renderListNode(renderList, _extends(_extends({}, (0, _omit["default"])(this.props, _renderListBody.OmitProps)), {
|
||||
filteredItems: filteredItems,
|
||||
filteredRenderItems: filteredRenderItems,
|
||||
selectedKeys: checkedKeys
|
||||
})),
|
||||
bodyContent = _renderListNode.bodyContent,
|
||||
customize = _renderListNode.customize;
|
||||
|
||||
var bodyNode; // We should wrap customize list body in a classNamed div to use flex layout.
|
||||
|
||||
if (customize) {
|
||||
bodyNode = /*#__PURE__*/React.createElement("div", {
|
||||
className: "".concat(prefixCls, "-body-customize-wrapper")
|
||||
}, bodyContent);
|
||||
} else {
|
||||
bodyNode = filteredItems.length ? bodyContent : /*#__PURE__*/React.createElement("div", {
|
||||
className: "".concat(prefixCls, "-body-not-found")
|
||||
}, notFoundContent);
|
||||
}
|
||||
|
||||
return /*#__PURE__*/React.createElement("div", {
|
||||
className: (0, _classnames["default"])(showSearch ? "".concat(prefixCls, "-body ").concat(prefixCls, "-body-with-search") : "".concat(prefixCls, "-body"))
|
||||
}, search, bodyNode);
|
||||
}
|
||||
}, {
|
||||
key: "getCheckBox",
|
||||
value: function getCheckBox(filteredItems, onItemSelectAll, showSelectAll, disabled) {
|
||||
var checkStatus = this.getCheckStatus(filteredItems);
|
||||
var checkedAll = checkStatus === 'all';
|
||||
var checkAllCheckbox = showSelectAll !== false && /*#__PURE__*/React.createElement(_checkbox["default"], {
|
||||
disabled: disabled,
|
||||
checked: checkedAll,
|
||||
indeterminate: checkStatus === 'part',
|
||||
onChange: function onChange() {
|
||||
// Only select enabled items
|
||||
onItemSelectAll(filteredItems.filter(function (item) {
|
||||
return !item.disabled;
|
||||
}).map(function (_ref) {
|
||||
var key = _ref.key;
|
||||
return key;
|
||||
}), !checkedAll);
|
||||
}
|
||||
});
|
||||
return checkAllCheckbox;
|
||||
}
|
||||
}, {
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var filterValue = this.state.filterValue;
|
||||
var _this$props2 = this.props,
|
||||
prefixCls = _this$props2.prefixCls,
|
||||
dataSource = _this$props2.dataSource,
|
||||
titleText = _this$props2.titleText,
|
||||
checkedKeys = _this$props2.checkedKeys,
|
||||
disabled = _this$props2.disabled,
|
||||
footer = _this$props2.footer,
|
||||
showSearch = _this$props2.showSearch,
|
||||
style = _this$props2.style,
|
||||
searchPlaceholder = _this$props2.searchPlaceholder,
|
||||
notFoundContent = _this$props2.notFoundContent,
|
||||
renderList = _this$props2.renderList,
|
||||
onItemSelectAll = _this$props2.onItemSelectAll,
|
||||
showSelectAll = _this$props2.showSelectAll; // Custom Layout
|
||||
|
||||
var footerDom = footer && footer(this.props);
|
||||
var listCls = (0, _classnames["default"])(prefixCls, _defineProperty({}, "".concat(prefixCls, "-with-footer"), !!footerDom)); // ====================== Get filtered, checked item list ======================
|
||||
|
||||
var _this$getFilteredItem = this.getFilteredItems(dataSource, filterValue),
|
||||
filteredItems = _this$getFilteredItem.filteredItems,
|
||||
filteredRenderItems = _this$getFilteredItem.filteredRenderItems; // ================================= List Body =================================
|
||||
|
||||
|
||||
var listBody = this.getListBody(prefixCls, searchPlaceholder, filterValue, filteredItems, notFoundContent, filteredRenderItems, checkedKeys, renderList, showSearch, disabled); // ================================ List Footer ================================
|
||||
|
||||
var listFooter = footerDom ? /*#__PURE__*/React.createElement("div", {
|
||||
className: "".concat(prefixCls, "-footer")
|
||||
}, footerDom) : null;
|
||||
var checkAllCheckbox = this.getCheckBox(filteredItems, onItemSelectAll, showSelectAll, disabled); // ================================== Render ===================================
|
||||
|
||||
return /*#__PURE__*/React.createElement("div", {
|
||||
className: listCls,
|
||||
style: style
|
||||
}, /*#__PURE__*/React.createElement("div", {
|
||||
className: "".concat(prefixCls, "-header")
|
||||
}, checkAllCheckbox, /*#__PURE__*/React.createElement("span", {
|
||||
className: "".concat(prefixCls, "-header-selected")
|
||||
}, /*#__PURE__*/React.createElement("span", null, this.getSelectAllLabel(checkedKeys.length, filteredItems.length)), /*#__PURE__*/React.createElement("span", {
|
||||
className: "".concat(prefixCls, "-header-title")
|
||||
}, titleText))), listBody, listFooter);
|
||||
}
|
||||
}]);
|
||||
|
||||
return TransferList;
|
||||
}(React.PureComponent);
|
||||
|
||||
exports["default"] = TransferList;
|
||||
TransferList.defaultProps = {
|
||||
dataSource: [],
|
||||
titleText: '',
|
||||
showSearch: false
|
||||
};
|
||||
15
web/node_modules/antd/lib/transfer/operation.d.ts
generated
vendored
Normal file
15
web/node_modules/antd/lib/transfer/operation.d.ts
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
import * as React from 'react';
|
||||
export interface TransferOperationProps {
|
||||
className?: string;
|
||||
leftArrowText?: string;
|
||||
rightArrowText?: string;
|
||||
moveToLeft?: React.MouseEventHandler<HTMLButtonElement>;
|
||||
moveToRight?: React.MouseEventHandler<HTMLButtonElement>;
|
||||
leftActive?: boolean;
|
||||
rightActive?: boolean;
|
||||
style?: React.CSSProperties;
|
||||
disabled?: boolean;
|
||||
direction?: 'ltr' | 'rtl';
|
||||
}
|
||||
declare const Operation: ({ disabled, moveToLeft, moveToRight, leftArrowText, rightArrowText, leftActive, rightActive, className, style, direction, }: TransferOperationProps) => JSX.Element;
|
||||
export default Operation;
|
||||
56
web/node_modules/antd/lib/transfer/operation.js
generated
vendored
Normal file
56
web/node_modules/antd/lib/transfer/operation.js
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
"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 _LeftOutlined = _interopRequireDefault(require("@ant-design/icons/LeftOutlined"));
|
||||
|
||||
var _RightOutlined = _interopRequireDefault(require("@ant-design/icons/RightOutlined"));
|
||||
|
||||
var _button = _interopRequireDefault(require("../button"));
|
||||
|
||||
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; }
|
||||
|
||||
var Operation = function Operation(_ref) {
|
||||
var disabled = _ref.disabled,
|
||||
moveToLeft = _ref.moveToLeft,
|
||||
moveToRight = _ref.moveToRight,
|
||||
_ref$leftArrowText = _ref.leftArrowText,
|
||||
leftArrowText = _ref$leftArrowText === void 0 ? '' : _ref$leftArrowText,
|
||||
_ref$rightArrowText = _ref.rightArrowText,
|
||||
rightArrowText = _ref$rightArrowText === void 0 ? '' : _ref$rightArrowText,
|
||||
leftActive = _ref.leftActive,
|
||||
rightActive = _ref.rightActive,
|
||||
className = _ref.className,
|
||||
style = _ref.style,
|
||||
direction = _ref.direction;
|
||||
return /*#__PURE__*/React.createElement("div", {
|
||||
className: className,
|
||||
style: style
|
||||
}, /*#__PURE__*/React.createElement(_button["default"], {
|
||||
type: "primary",
|
||||
size: "small",
|
||||
disabled: disabled || !rightActive,
|
||||
onClick: moveToRight,
|
||||
icon: direction !== 'rtl' ? /*#__PURE__*/React.createElement(_RightOutlined["default"], null) : /*#__PURE__*/React.createElement(_LeftOutlined["default"], null)
|
||||
}, rightArrowText), /*#__PURE__*/React.createElement(_button["default"], {
|
||||
type: "primary",
|
||||
size: "small",
|
||||
disabled: disabled || !leftActive,
|
||||
onClick: moveToLeft,
|
||||
icon: direction !== 'rtl' ? /*#__PURE__*/React.createElement(_LeftOutlined["default"], null) : /*#__PURE__*/React.createElement(_RightOutlined["default"], null)
|
||||
}, leftArrowText));
|
||||
};
|
||||
|
||||
var _default = Operation;
|
||||
exports["default"] = _default;
|
||||
14
web/node_modules/antd/lib/transfer/renderListBody.d.ts
generated
vendored
Normal file
14
web/node_modules/antd/lib/transfer/renderListBody.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
/// <reference types="react" />
|
||||
import { ElementOf, Omit } from '../_util/type';
|
||||
import { TransferItem } from '.';
|
||||
import { TransferListProps, RenderedItem } from './list';
|
||||
export declare const OmitProps: ["handleFilter", "handleClear", "checkedKeys"];
|
||||
export declare type OmitProp = ElementOf<typeof OmitProps>;
|
||||
declare type PartialTransferListProps = Omit<TransferListProps, OmitProp>;
|
||||
export interface TransferListBodyProps extends PartialTransferListProps {
|
||||
filteredItems: TransferItem[];
|
||||
filteredRenderItems: RenderedItem[];
|
||||
selectedKeys: string[];
|
||||
}
|
||||
declare const ListBodyWrapper: (props: TransferListBodyProps) => JSX.Element;
|
||||
export default ListBodyWrapper;
|
||||
110
web/node_modules/antd/lib/transfer/renderListBody.js
generated
vendored
Normal file
110
web/node_modules/antd/lib/transfer/renderListBody.js
generated
vendored
Normal file
@@ -0,0 +1,110 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports["default"] = exports.OmitProps = void 0;
|
||||
|
||||
var React = _interopRequireWildcard(require("react"));
|
||||
|
||||
var _type = require("../_util/type");
|
||||
|
||||
var _ListItem = _interopRequireDefault(require("./ListItem"));
|
||||
|
||||
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 _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 OmitProps = (0, _type.tuple)('handleFilter', 'handleClear', 'checkedKeys');
|
||||
exports.OmitProps = OmitProps;
|
||||
|
||||
var ListBody = /*#__PURE__*/function (_React$Component) {
|
||||
_inherits(ListBody, _React$Component);
|
||||
|
||||
var _super = _createSuper(ListBody);
|
||||
|
||||
function ListBody() {
|
||||
var _this;
|
||||
|
||||
_classCallCheck(this, ListBody);
|
||||
|
||||
_this = _super.apply(this, arguments);
|
||||
|
||||
_this.onItemSelect = function (item) {
|
||||
var _this$props = _this.props,
|
||||
onItemSelect = _this$props.onItemSelect,
|
||||
selectedKeys = _this$props.selectedKeys;
|
||||
var checked = selectedKeys.indexOf(item.key) >= 0;
|
||||
onItemSelect(item.key, !checked);
|
||||
};
|
||||
|
||||
return _this;
|
||||
}
|
||||
|
||||
_createClass(ListBody, [{
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _this2 = this;
|
||||
|
||||
var _this$props2 = this.props,
|
||||
prefixCls = _this$props2.prefixCls,
|
||||
onScroll = _this$props2.onScroll,
|
||||
filteredRenderItems = _this$props2.filteredRenderItems,
|
||||
selectedKeys = _this$props2.selectedKeys,
|
||||
globalDisabled = _this$props2.disabled;
|
||||
return /*#__PURE__*/React.createElement("ul", {
|
||||
className: "".concat(prefixCls, "-content"),
|
||||
onScroll: onScroll
|
||||
}, filteredRenderItems.map(function (_ref) {
|
||||
var renderedEl = _ref.renderedEl,
|
||||
renderedText = _ref.renderedText,
|
||||
item = _ref.item;
|
||||
var disabled = item.disabled;
|
||||
var checked = selectedKeys.indexOf(item.key) >= 0;
|
||||
return /*#__PURE__*/React.createElement(_ListItem["default"], {
|
||||
disabled: globalDisabled || disabled,
|
||||
key: item.key,
|
||||
item: item,
|
||||
renderedText: renderedText,
|
||||
renderedEl: renderedEl,
|
||||
checked: checked,
|
||||
prefixCls: prefixCls,
|
||||
onClick: _this2.onItemSelect
|
||||
});
|
||||
}));
|
||||
}
|
||||
}]);
|
||||
|
||||
return ListBody;
|
||||
}(React.Component);
|
||||
|
||||
var ListBodyWrapper = function ListBodyWrapper(props) {
|
||||
return /*#__PURE__*/React.createElement(ListBody, props);
|
||||
};
|
||||
|
||||
var _default = ListBodyWrapper;
|
||||
exports["default"] = _default;
|
||||
17
web/node_modules/antd/lib/transfer/search.d.ts
generated
vendored
Normal file
17
web/node_modules/antd/lib/transfer/search.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import * as React from 'react';
|
||||
export interface TransferSearchProps {
|
||||
prefixCls?: string;
|
||||
placeholder?: string;
|
||||
onChange?: (e: React.FormEvent<HTMLElement>) => void;
|
||||
handleClear?: (e: React.MouseEvent<HTMLElement>) => void;
|
||||
value?: string;
|
||||
disabled?: boolean;
|
||||
}
|
||||
export default class Search extends React.Component<TransferSearchProps, any> {
|
||||
static defaultProps: {
|
||||
placeholder: string;
|
||||
};
|
||||
handleChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
||||
handleClear: (e: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void;
|
||||
render(): JSX.Element;
|
||||
}
|
||||
109
web/node_modules/antd/lib/transfer/search.js
generated
vendored
Normal file
109
web/node_modules/antd/lib/transfer/search.js
generated
vendored
Normal file
@@ -0,0 +1,109 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports["default"] = void 0;
|
||||
|
||||
var React = _interopRequireWildcard(require("react"));
|
||||
|
||||
var _CloseCircleFilled = _interopRequireDefault(require("@ant-design/icons/CloseCircleFilled"));
|
||||
|
||||
var _SearchOutlined = _interopRequireDefault(require("@ant-design/icons/SearchOutlined"));
|
||||
|
||||
var _input = _interopRequireDefault(require("../input"));
|
||||
|
||||
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 _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 Search = /*#__PURE__*/function (_React$Component) {
|
||||
_inherits(Search, _React$Component);
|
||||
|
||||
var _super = _createSuper(Search);
|
||||
|
||||
function Search() {
|
||||
var _this;
|
||||
|
||||
_classCallCheck(this, Search);
|
||||
|
||||
_this = _super.apply(this, arguments);
|
||||
|
||||
_this.handleChange = function (e) {
|
||||
var onChange = _this.props.onChange;
|
||||
|
||||
if (onChange) {
|
||||
onChange(e);
|
||||
}
|
||||
};
|
||||
|
||||
_this.handleClear = function (e) {
|
||||
e.preventDefault();
|
||||
var _this$props = _this.props,
|
||||
handleClear = _this$props.handleClear,
|
||||
disabled = _this$props.disabled;
|
||||
|
||||
if (!disabled && handleClear) {
|
||||
handleClear(e);
|
||||
}
|
||||
};
|
||||
|
||||
return _this;
|
||||
}
|
||||
|
||||
_createClass(Search, [{
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _this$props2 = this.props,
|
||||
placeholder = _this$props2.placeholder,
|
||||
value = _this$props2.value,
|
||||
prefixCls = _this$props2.prefixCls,
|
||||
disabled = _this$props2.disabled;
|
||||
var icon = value && value.length > 0 ? /*#__PURE__*/React.createElement("a", {
|
||||
href: "#",
|
||||
className: "".concat(prefixCls, "-action"),
|
||||
onClick: this.handleClear
|
||||
}, /*#__PURE__*/React.createElement(_CloseCircleFilled["default"], null)) : /*#__PURE__*/React.createElement("span", {
|
||||
className: "".concat(prefixCls, "-action")
|
||||
}, /*#__PURE__*/React.createElement(_SearchOutlined["default"], null));
|
||||
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(_input["default"], {
|
||||
placeholder: placeholder,
|
||||
className: prefixCls,
|
||||
value: value,
|
||||
onChange: this.handleChange,
|
||||
disabled: disabled
|
||||
}), icon);
|
||||
}
|
||||
}]);
|
||||
|
||||
return Search;
|
||||
}(React.Component);
|
||||
|
||||
exports["default"] = Search;
|
||||
Search.defaultProps = {
|
||||
placeholder: ''
|
||||
};
|
||||
13
web/node_modules/antd/lib/transfer/style/css.js
generated
vendored
Normal file
13
web/node_modules/antd/lib/transfer/style/css.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
|
||||
require("../../style/index.css");
|
||||
|
||||
require("./index.css");
|
||||
|
||||
require("../../empty/style/css");
|
||||
|
||||
require("../../checkbox/style/css");
|
||||
|
||||
require("../../button/style/css");
|
||||
|
||||
require("../../input/style/css");
|
||||
68
web/node_modules/antd/lib/transfer/style/customize.less
generated
vendored
Normal file
68
web/node_modules/antd/lib/transfer/style/customize.less
generated
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
@import './index.less';
|
||||
|
||||
@table-prefix-cls: ~'@{ant-prefix}-table';
|
||||
@input-prefix-cls: ~'@{ant-prefix}-input';
|
||||
|
||||
.@{transfer-prefix-cls}-customize-list {
|
||||
display: flex;
|
||||
|
||||
.@{transfer-prefix-cls}-operation {
|
||||
flex: none;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.@{transfer-prefix-cls}-list {
|
||||
flex: auto;
|
||||
width: auto;
|
||||
height: auto;
|
||||
min-height: @transfer-list-height;
|
||||
|
||||
&-body {
|
||||
&-with-search {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
// Search box in customize mode do not need fix top
|
||||
&-search-wrapper {
|
||||
position: relative;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
&-customize-wrapper {
|
||||
padding: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// =================== Hook Components ===================
|
||||
.@{table-prefix-cls}-wrapper {
|
||||
.@{table-prefix-cls}-small {
|
||||
border: 0;
|
||||
border-radius: 0;
|
||||
|
||||
> .@{table-prefix-cls}-content {
|
||||
// Header background color
|
||||
> .@{table-prefix-cls}-body > table > .@{table-prefix-cls}-thead > tr > th {
|
||||
background: @table-header-bg;
|
||||
}
|
||||
|
||||
.@{table-prefix-cls}-row:last-child td {
|
||||
border-bottom: @border-width-base @border-style-base @border-color-split;
|
||||
}
|
||||
}
|
||||
|
||||
.@{table-prefix-cls}-body {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.@{table-prefix-cls}-pagination.@{ant-prefix}-pagination {
|
||||
margin: 16px 0 4px;
|
||||
}
|
||||
}
|
||||
.@{input-prefix-cls} {
|
||||
&[disabled] {
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
269
web/node_modules/antd/lib/transfer/style/index.css
generated
vendored
Normal file
269
web/node_modules/antd/lib/transfer/style/index.css
generated
vendored
Normal file
@@ -0,0 +1,269 @@
|
||||
/* 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 */
|
||||
@-webkit-keyframes antCheckboxEffect {
|
||||
0% {
|
||||
-webkit-transform: scale(1);
|
||||
transform: scale(1);
|
||||
opacity: 0.5;
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: scale(1.6);
|
||||
transform: scale(1.6);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
@keyframes antCheckboxEffect {
|
||||
0% {
|
||||
-webkit-transform: scale(1);
|
||||
transform: scale(1);
|
||||
opacity: 0.5;
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: scale(1.6);
|
||||
transform: scale(1.6);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
.ant-transfer-customize-list {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
}
|
||||
.ant-transfer-customize-list .ant-transfer-operation {
|
||||
-webkit-box-flex: 0;
|
||||
-ms-flex: none;
|
||||
flex: none;
|
||||
-ms-flex-item-align: center;
|
||||
align-self: center;
|
||||
}
|
||||
.ant-transfer-customize-list .ant-transfer-list {
|
||||
-webkit-box-flex: 1;
|
||||
-ms-flex: auto;
|
||||
flex: auto;
|
||||
width: auto;
|
||||
height: auto;
|
||||
min-height: 200px;
|
||||
}
|
||||
.ant-transfer-customize-list .ant-transfer-list-body-with-search {
|
||||
padding-top: 0;
|
||||
}
|
||||
.ant-transfer-customize-list .ant-transfer-list-body-search-wrapper {
|
||||
position: relative;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.ant-transfer-customize-list .ant-transfer-list-body-customize-wrapper {
|
||||
padding: 12px;
|
||||
}
|
||||
.ant-transfer-customize-list .ant-table-wrapper .ant-table-small {
|
||||
border: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
.ant-transfer-customize-list .ant-table-wrapper .ant-table-small > .ant-table-content > .ant-table-body > table > .ant-table-thead > tr > th {
|
||||
background: #fafafa;
|
||||
}
|
||||
.ant-transfer-customize-list .ant-table-wrapper .ant-table-small > .ant-table-content .ant-table-row:last-child td {
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
}
|
||||
.ant-transfer-customize-list .ant-table-wrapper .ant-table-small .ant-table-body {
|
||||
margin: 0;
|
||||
}
|
||||
.ant-transfer-customize-list .ant-table-wrapper .ant-table-pagination.ant-pagination {
|
||||
margin: 16px 0 4px;
|
||||
}
|
||||
.ant-transfer-customize-list .ant-input[disabled] {
|
||||
background-color: transparent;
|
||||
}
|
||||
.ant-transfer {
|
||||
-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;
|
||||
}
|
||||
.ant-transfer-disabled .ant-transfer-list {
|
||||
background: #f5f5f5;
|
||||
}
|
||||
.ant-transfer-list {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 180px;
|
||||
height: 200px;
|
||||
padding-top: 40px;
|
||||
vertical-align: middle;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.ant-transfer-list-with-footer {
|
||||
padding-bottom: 34px;
|
||||
}
|
||||
.ant-transfer-list-search {
|
||||
padding-right: 24px !important;
|
||||
padding-left: 8px;
|
||||
}
|
||||
.ant-transfer-list-search-action {
|
||||
position: absolute;
|
||||
top: 12px;
|
||||
right: 12px;
|
||||
bottom: 12px;
|
||||
width: 28px;
|
||||
color: rgba(0, 0, 0, 0.25);
|
||||
line-height: 32px;
|
||||
text-align: center;
|
||||
}
|
||||
.ant-transfer-list-search-action .anticon {
|
||||
color: rgba(0, 0, 0, 0.25);
|
||||
-webkit-transition: all 0.3s;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
.ant-transfer-list-search-action .anticon:hover {
|
||||
color: rgba(0, 0, 0, 0.45);
|
||||
}
|
||||
span.ant-transfer-list-search-action {
|
||||
pointer-events: none;
|
||||
}
|
||||
.ant-transfer-list-header {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
padding: 7.4995px 12px 8.4995px;
|
||||
overflow: hidden;
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
background: #fff;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
border-radius: 2px 2px 0 0;
|
||||
}
|
||||
.ant-transfer-list-header-title {
|
||||
position: absolute;
|
||||
right: 12px;
|
||||
}
|
||||
.ant-transfer-list-header .ant-checkbox-wrapper + span {
|
||||
padding-left: 8px;
|
||||
}
|
||||
.ant-transfer-list-body {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
font-size: 14px;
|
||||
}
|
||||
.ant-transfer-list-body-search-wrapper {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
padding: 12px;
|
||||
}
|
||||
.ant-transfer-list-body-with-search {
|
||||
padding-top: 56px;
|
||||
}
|
||||
.ant-transfer-list-content {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: auto;
|
||||
list-style: none;
|
||||
}
|
||||
.ant-transfer-list-content-item {
|
||||
min-height: 32px;
|
||||
padding: 6px 12px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
-webkit-transition: all 0.3s;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
.ant-transfer-list-content-item > span {
|
||||
padding-right: 0;
|
||||
}
|
||||
.ant-transfer-list-content-item-text {
|
||||
padding-left: 8px;
|
||||
}
|
||||
.ant-transfer-list-content-item:not(.ant-transfer-list-content-item-disabled):hover {
|
||||
background-color: #f5f5f5;
|
||||
cursor: pointer;
|
||||
}
|
||||
.ant-transfer-list-content-item-checked {
|
||||
background-color: #e6f7ff;
|
||||
}
|
||||
.ant-transfer-list-content-item-disabled {
|
||||
color: rgba(0, 0, 0, 0.25);
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.ant-transfer-list-body-not-found {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 100%;
|
||||
padding-top: 0;
|
||||
color: rgba(0, 0, 0, 0.25);
|
||||
text-align: center;
|
||||
-webkit-transform: translateY(-50%);
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
.ant-transfer-list-body-with-search .ant-transfer-list-body-not-found {
|
||||
margin-top: 16px;
|
||||
}
|
||||
.ant-transfer-list-footer {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
border-top: 1px solid #f0f0f0;
|
||||
border-radius: 0 0 2px 2px;
|
||||
}
|
||||
.ant-transfer-operation {
|
||||
display: inline-block;
|
||||
margin: 0 8px;
|
||||
overflow: hidden;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.ant-transfer-operation .ant-btn {
|
||||
display: block;
|
||||
}
|
||||
.ant-transfer-operation .ant-btn:first-child {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.ant-transfer-operation .ant-btn .anticon {
|
||||
font-size: 12px;
|
||||
}
|
||||
.ant-transfer-rtl {
|
||||
direction: rtl;
|
||||
}
|
||||
.ant-transfer-rtl .ant-transfer-list-search-action {
|
||||
right: auto;
|
||||
left: 12px;
|
||||
}
|
||||
.ant-transfer-rtl .ant-transfer-list-header {
|
||||
right: 0;
|
||||
left: auto;
|
||||
}
|
||||
.ant-transfer-rtl .ant-transfer-list-header-title {
|
||||
right: auto;
|
||||
left: 12px;
|
||||
}
|
||||
.ant-transfer-rtl .ant-transfer-list-header .ant-checkbox-wrapper + span {
|
||||
padding-right: 8px;
|
||||
padding-left: 0;
|
||||
}
|
||||
.ant-transfer-rtl .ant-transfer-list-body-search-wrapper {
|
||||
right: 0;
|
||||
left: auto;
|
||||
}
|
||||
.ant-transfer-rtl .ant-transfer-list-content-item > span {
|
||||
padding-left: 0;
|
||||
}
|
||||
.ant-transfer-rtl .ant-transfer-list-content-item-text {
|
||||
padding-right: 8px;
|
||||
padding-left: 0;
|
||||
}
|
||||
.ant-transfer-rtl .ant-transfer-list-footer {
|
||||
right: 0;
|
||||
left: auto;
|
||||
}
|
||||
6
web/node_modules/antd/lib/transfer/style/index.d.ts
generated
vendored
Normal file
6
web/node_modules/antd/lib/transfer/style/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import '../../style/index.less';
|
||||
import './index.less';
|
||||
import '../../empty/style';
|
||||
import '../../checkbox/style';
|
||||
import '../../button/style';
|
||||
import '../../input/style';
|
||||
13
web/node_modules/antd/lib/transfer/style/index.js
generated
vendored
Normal file
13
web/node_modules/antd/lib/transfer/style/index.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
|
||||
require("../../style/index.less");
|
||||
|
||||
require("./index.less");
|
||||
|
||||
require("../../empty/style");
|
||||
|
||||
require("../../checkbox/style");
|
||||
|
||||
require("../../button/style");
|
||||
|
||||
require("../../input/style");
|
||||
186
web/node_modules/antd/lib/transfer/style/index.less
generated
vendored
Normal file
186
web/node_modules/antd/lib/transfer/style/index.less
generated
vendored
Normal file
@@ -0,0 +1,186 @@
|
||||
@import '../../style/themes/index';
|
||||
@import '../../style/mixins/index';
|
||||
@import '../../checkbox/style/mixin';
|
||||
@import './customize';
|
||||
|
||||
@transfer-prefix-cls: ~'@{ant-prefix}-transfer';
|
||||
|
||||
@transfer-header-vertical-padding: (
|
||||
@transfer-header-height - 1px - @font-size-base * @line-height-base
|
||||
) / 2;
|
||||
|
||||
.@{transfer-prefix-cls} {
|
||||
.reset-component;
|
||||
|
||||
position: relative;
|
||||
|
||||
&-disabled {
|
||||
.@{transfer-prefix-cls}-list {
|
||||
background: @transfer-disabled-bg;
|
||||
}
|
||||
}
|
||||
|
||||
&-list {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 180px;
|
||||
height: @transfer-list-height;
|
||||
padding-top: @transfer-header-height;
|
||||
vertical-align: middle;
|
||||
border: @border-width-base @border-style-base @border-color-base;
|
||||
border-radius: @border-radius-base;
|
||||
|
||||
&-with-footer {
|
||||
padding-bottom: 34px;
|
||||
}
|
||||
|
||||
&-search {
|
||||
padding-right: 24px !important;
|
||||
padding-left: @control-padding-horizontal-sm;
|
||||
&-action {
|
||||
position: absolute;
|
||||
top: @transfer-list-search-icon-top;
|
||||
right: 12px;
|
||||
bottom: 12px;
|
||||
width: 28px;
|
||||
color: @disabled-color;
|
||||
line-height: @input-height-base;
|
||||
text-align: center;
|
||||
|
||||
.@{iconfont-css-prefix} {
|
||||
color: @disabled-color;
|
||||
transition: all 0.3s;
|
||||
&:hover {
|
||||
color: @text-color-secondary;
|
||||
}
|
||||
}
|
||||
span& {
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-header {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
// border-top is on the transfer dom. We should minus 1px for this
|
||||
padding: (@transfer-header-vertical-padding - 1px) @control-padding-horizontal
|
||||
@transfer-header-vertical-padding;
|
||||
overflow: hidden;
|
||||
color: @text-color;
|
||||
background: @component-background;
|
||||
border-bottom: @border-width-base @border-style-base @border-color-split;
|
||||
border-radius: @border-radius-base @border-radius-base 0 0;
|
||||
|
||||
&-title {
|
||||
position: absolute;
|
||||
right: 12px;
|
||||
}
|
||||
|
||||
.@{ant-prefix}-checkbox-wrapper + span {
|
||||
padding-left: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
&-body {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
font-size: @font-size-base;
|
||||
|
||||
&-search-wrapper {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
padding: @padding-sm;
|
||||
}
|
||||
}
|
||||
|
||||
&-body-with-search {
|
||||
padding-top: @input-height-base + @padding-sm * 2;
|
||||
}
|
||||
|
||||
&-content {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: auto;
|
||||
list-style: none;
|
||||
&-item {
|
||||
min-height: @transfer-item-height;
|
||||
padding: @transfer-item-padding-vertical @control-padding-horizontal;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
transition: all 0.3s;
|
||||
> span {
|
||||
padding-right: 0;
|
||||
}
|
||||
&-text {
|
||||
padding-left: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
&-item:not(&-item-disabled):hover {
|
||||
background-color: @transfer-item-hover-bg;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&-item-checked {
|
||||
background-color: @item-active-bg;
|
||||
}
|
||||
|
||||
&-item-disabled {
|
||||
color: @btn-disable-color;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
|
||||
&-body-not-found {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 100%;
|
||||
padding-top: 0;
|
||||
color: @disabled-color;
|
||||
text-align: center;
|
||||
transform: translateY(-50%);
|
||||
|
||||
// with filter should offset the search box height
|
||||
.@{transfer-prefix-cls}-list-body-with-search & {
|
||||
margin-top: @input-height-base / 2;
|
||||
}
|
||||
}
|
||||
|
||||
&-footer {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
border-top: @border-width-base @border-style-base @border-color-split;
|
||||
border-radius: 0 0 @border-radius-base @border-radius-base;
|
||||
}
|
||||
}
|
||||
|
||||
&-operation {
|
||||
display: inline-block;
|
||||
margin: 0 8px;
|
||||
overflow: hidden;
|
||||
vertical-align: middle;
|
||||
|
||||
.@{ant-prefix}-btn {
|
||||
display: block;
|
||||
|
||||
&:first-child {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.@{iconfont-css-prefix} {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@import './rtl';
|
||||
74
web/node_modules/antd/lib/transfer/style/rtl.less
generated
vendored
Normal file
74
web/node_modules/antd/lib/transfer/style/rtl.less
generated
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
@import '../../style/themes/index';
|
||||
@import '../../style/mixins/index';
|
||||
@import '../../checkbox/style/mixin';
|
||||
|
||||
@transfer-prefix-cls: ~'@{ant-prefix}-transfer';
|
||||
|
||||
.@{transfer-prefix-cls} {
|
||||
&-rtl {
|
||||
direction: rtl;
|
||||
}
|
||||
|
||||
&-list {
|
||||
&-search {
|
||||
&-action {
|
||||
.@{transfer-prefix-cls}-rtl & {
|
||||
right: auto;
|
||||
left: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-header {
|
||||
.@{transfer-prefix-cls}-rtl & {
|
||||
right: 0;
|
||||
left: auto;
|
||||
}
|
||||
&-title {
|
||||
.@{transfer-prefix-cls}-rtl & {
|
||||
right: auto;
|
||||
left: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.@{ant-prefix}-checkbox-wrapper + span {
|
||||
.@{transfer-prefix-cls}-rtl & {
|
||||
padding-right: 8px;
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-body {
|
||||
&-search-wrapper {
|
||||
.@{transfer-prefix-cls}-rtl & {
|
||||
right: 0;
|
||||
left: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-content {
|
||||
&-item {
|
||||
> span {
|
||||
.@{transfer-prefix-cls}-rtl & {
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
&-text {
|
||||
.@{transfer-prefix-cls}-rtl & {
|
||||
padding-right: 8px;
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-footer {
|
||||
.@{transfer-prefix-cls}-rtl & {
|
||||
right: 0;
|
||||
left: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user