@teamix/pro 1.6.0-beta.5 → 1.6.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pro.all.min.css +1 -1
- package/dist/pro.css +1 -1
- package/dist/pro.js +15860 -11211
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/dist/pro.min.js.LICENSE.txt +9 -0
- package/dist/pro.xconsole.min.css +1 -1
- package/es/actions/index.d.ts +6 -6
- package/es/actions/index.js +18 -16
- package/es/actions/index.scss +4 -0
- package/es/form/Components/FormItem2/animation.scss +72 -0
- package/es/form/Components/FormItem2/grid.scss +173 -0
- package/es/form/Components/FormItem2/index.d.ts +41 -0
- package/es/form/Components/FormItem2/index.js +286 -0
- package/es/form/Components/FormItem2/main.scss +413 -0
- package/es/form/Components/FormItem2/scss/variable.scss +118 -0
- package/es/form/Components/FormItem2/style.d.ts +1 -0
- package/es/form/Components/FormItem2/style.js +1 -0
- package/es/form/Components/LightFilter/index.scss +4 -0
- package/es/form/Components/__builtins__/empty.d.ts +1 -0
- package/es/form/Components/__builtins__/empty.js +51 -0
- package/es/form/Components/__builtins__/hooks/index.d.ts +2 -0
- package/es/form/Components/__builtins__/hooks/index.js +2 -0
- package/es/form/Components/__builtins__/hooks/useClickAway.d.ts +5 -0
- package/es/form/Components/__builtins__/hooks/useClickAway.js +37 -0
- package/es/form/Components/__builtins__/hooks/usePrefixCls.d.ts +3 -0
- package/es/form/Components/__builtins__/hooks/usePrefixCls.js +8 -0
- package/es/form/Components/__builtins__/icons.d.ts +20 -0
- package/es/form/Components/__builtins__/icons.js +153 -0
- package/es/form/Components/__builtins__/index.d.ts +8 -0
- package/es/form/Components/__builtins__/index.js +8 -0
- package/es/form/Components/__builtins__/loading.d.ts +1 -0
- package/es/form/Components/__builtins__/loading.js +41 -0
- package/es/form/Components/__builtins__/mapSize.d.ts +1 -0
- package/es/form/Components/__builtins__/mapSize.js +13 -0
- package/es/form/Components/__builtins__/mapStatus.d.ts +2 -0
- package/es/form/Components/__builtins__/mapStatus.js +20 -0
- package/es/form/Components/__builtins__/moment.d.ts +2 -0
- package/es/form/Components/__builtins__/moment.js +47 -0
- package/es/form/Components/__builtins__/pickDataProps.d.ts +1 -0
- package/es/form/Components/__builtins__/pickDataProps.js +9 -0
- package/es/form/Components/form-layout/index.d.ts +74 -0
- package/es/form/Components/form-layout/index.js +71 -0
- package/es/form/Components/form-layout/main.scss +0 -0
- package/es/form/Components/form-layout/style.d.ts +1 -0
- package/es/form/Components/form-layout/style.js +3 -0
- package/es/form/Components/form-layout/useResponsiveFormLayout.d.ts +18 -0
- package/es/form/Components/form-layout/useResponsiveFormLayout.js +87 -0
- package/es/form/Filter/AdvancedFilter.js +2 -2
- package/es/form/Filter/index2.js +3 -3
- package/es/form/ProForm/index.js +14 -12
- package/es/info/utils/utils.d.ts +1 -1
- package/es/sidebar/utils/index.d.ts +2 -2
- package/es/table/index.d.ts +1 -1
- package/es/table/index.js +17 -17
- package/es/utils/aspect.js +5 -2
- package/es/xconsole.scss +1 -0
- package/lib/actions/index.d.ts +6 -6
- package/lib/actions/index.js +16 -14
- package/lib/actions/index.scss +4 -0
- package/lib/form/Components/FormItem2/animation.scss +72 -0
- package/lib/form/Components/FormItem2/grid.scss +173 -0
- package/lib/form/Components/FormItem2/index.d.ts +41 -0
- package/lib/form/Components/FormItem2/index.js +299 -0
- package/lib/form/Components/FormItem2/main.scss +413 -0
- package/lib/form/Components/FormItem2/scss/variable.scss +118 -0
- package/lib/form/Components/FormItem2/style.d.ts +1 -0
- package/lib/form/Components/FormItem2/style.js +3 -0
- package/lib/form/Components/LightFilter/index.scss +4 -0
- package/lib/form/Components/__builtins__/empty.d.ts +1 -0
- package/lib/form/Components/__builtins__/empty.js +59 -0
- package/lib/form/Components/__builtins__/hooks/index.d.ts +2 -0
- package/lib/form/Components/__builtins__/hooks/index.js +27 -0
- package/lib/form/Components/__builtins__/hooks/useClickAway.d.ts +5 -0
- package/lib/form/Components/__builtins__/hooks/useClickAway.js +44 -0
- package/lib/form/Components/__builtins__/hooks/usePrefixCls.d.ts +3 -0
- package/lib/form/Components/__builtins__/hooks/usePrefixCls.js +15 -0
- package/lib/form/Components/__builtins__/icons.d.ts +20 -0
- package/lib/form/Components/__builtins__/icons.js +174 -0
- package/lib/form/Components/__builtins__/index.d.ts +8 -0
- package/lib/form/Components/__builtins__/index.js +93 -0
- package/lib/form/Components/__builtins__/loading.d.ts +1 -0
- package/lib/form/Components/__builtins__/loading.js +48 -0
- package/lib/form/Components/__builtins__/mapSize.d.ts +1 -0
- package/lib/form/Components/__builtins__/mapSize.js +20 -0
- package/lib/form/Components/__builtins__/mapStatus.d.ts +2 -0
- package/lib/form/Components/__builtins__/mapStatus.js +27 -0
- package/lib/form/Components/__builtins__/moment.d.ts +2 -0
- package/lib/form/Components/__builtins__/moment.js +56 -0
- package/lib/form/Components/__builtins__/pickDataProps.d.ts +1 -0
- package/lib/form/Components/__builtins__/pickDataProps.js +16 -0
- package/lib/form/Components/form-layout/index.d.ts +74 -0
- package/lib/form/Components/form-layout/index.js +88 -0
- package/lib/form/Components/form-layout/main.scss +0 -0
- package/lib/form/Components/form-layout/style.d.ts +1 -0
- package/lib/form/Components/form-layout/style.js +3 -0
- package/lib/form/Components/form-layout/useResponsiveFormLayout.d.ts +18 -0
- package/lib/form/Components/form-layout/useResponsiveFormLayout.js +94 -0
- package/lib/form/Filter/AdvancedFilter.js +2 -2
- package/lib/form/Filter/index2.js +3 -3
- package/lib/form/ProForm/index.js +13 -11
- package/lib/info/utils/utils.d.ts +1 -1
- package/lib/sidebar/utils/index.d.ts +2 -2
- package/lib/table/index.d.ts +1 -1
- package/lib/table/index.js +16 -16
- package/lib/utils/aspect.js +5 -2
- package/lib/xconsole.scss +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export var pickDataProps = function pickDataProps() {
|
|
2
|
+
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
3
|
+
return Object.keys(props).reduce(function (buf, key) {
|
|
4
|
+
if (key.includes('data-')) {
|
|
5
|
+
buf[key] = props[key];
|
|
6
|
+
}
|
|
7
|
+
return buf;
|
|
8
|
+
}, {});
|
|
9
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface IFormLayoutProps {
|
|
3
|
+
prefix?: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: React.CSSProperties;
|
|
6
|
+
colon?: boolean;
|
|
7
|
+
labelAlign?: 'right' | 'left' | ('right' | 'left')[];
|
|
8
|
+
wrapperAlign?: 'right' | 'left' | ('right' | 'left')[];
|
|
9
|
+
labelWrap?: boolean;
|
|
10
|
+
labelWidth?: number;
|
|
11
|
+
wrapperWidth?: number;
|
|
12
|
+
wrapperWrap?: boolean;
|
|
13
|
+
labelCol?: number | number[];
|
|
14
|
+
wrapperCol?: number | number[];
|
|
15
|
+
fullness?: boolean;
|
|
16
|
+
size?: 'small' | 'default' | 'large';
|
|
17
|
+
layout?: 'vertical' | 'horizontal' | 'inline' | ('vertical' | 'horizontal' | 'inline')[];
|
|
18
|
+
direction?: 'rtl' | 'ltr';
|
|
19
|
+
inset?: boolean;
|
|
20
|
+
shallow?: boolean;
|
|
21
|
+
tooltipLayout?: 'icon' | 'text';
|
|
22
|
+
tooltipIcon?: React.ReactNode;
|
|
23
|
+
feedbackLayout?: 'loose' | 'terse' | 'popover' | 'none';
|
|
24
|
+
bordered?: boolean;
|
|
25
|
+
breakpoints?: number[];
|
|
26
|
+
gridColumnGap?: number;
|
|
27
|
+
gridRowGap?: number;
|
|
28
|
+
spaceGap?: number;
|
|
29
|
+
}
|
|
30
|
+
export interface IFormLayoutContext extends Omit<IFormLayoutProps, 'labelAlign' | 'wrapperAlign' | 'layout' | 'labelCol' | 'wrapperCol'> {
|
|
31
|
+
labelAlign?: 'right' | 'left';
|
|
32
|
+
wrapperAlign?: 'right' | 'left';
|
|
33
|
+
layout?: 'vertical' | 'horizontal' | 'inline';
|
|
34
|
+
labelCol?: number;
|
|
35
|
+
wrapperCol?: number;
|
|
36
|
+
}
|
|
37
|
+
export declare const FormLayoutDeepContext: React.Context<IFormLayoutContext>;
|
|
38
|
+
export declare const FormLayoutShallowContext: React.Context<IFormLayoutContext>;
|
|
39
|
+
export declare const useFormDeepLayout: () => IFormLayoutContext;
|
|
40
|
+
export declare const useFormShallowLayout: () => IFormLayoutContext;
|
|
41
|
+
export declare const useFormLayout: () => {
|
|
42
|
+
labelAlign?: "right" | "left" | undefined;
|
|
43
|
+
wrapperAlign?: "right" | "left" | undefined;
|
|
44
|
+
layout?: "inline" | "vertical" | "horizontal" | undefined;
|
|
45
|
+
labelCol?: number | undefined;
|
|
46
|
+
wrapperCol?: number | undefined;
|
|
47
|
+
breakpoints?: number[] | undefined;
|
|
48
|
+
prefix?: string | undefined;
|
|
49
|
+
className?: string | undefined;
|
|
50
|
+
style?: React.CSSProperties | undefined;
|
|
51
|
+
colon?: boolean | undefined;
|
|
52
|
+
labelWrap?: boolean | undefined;
|
|
53
|
+
labelWidth?: number | undefined;
|
|
54
|
+
wrapperWidth?: number | undefined;
|
|
55
|
+
wrapperWrap?: boolean | undefined;
|
|
56
|
+
fullness?: boolean | undefined;
|
|
57
|
+
size?: "default" | "large" | "small" | undefined;
|
|
58
|
+
direction?: "ltr" | "rtl" | undefined;
|
|
59
|
+
inset?: boolean | undefined;
|
|
60
|
+
shallow?: boolean | undefined;
|
|
61
|
+
tooltipLayout?: "text" | "icon" | undefined;
|
|
62
|
+
tooltipIcon?: React.ReactNode;
|
|
63
|
+
feedbackLayout?: "none" | "loose" | "terse" | "popover" | undefined;
|
|
64
|
+
bordered?: boolean | undefined;
|
|
65
|
+
gridColumnGap?: number | undefined;
|
|
66
|
+
gridRowGap?: number | undefined;
|
|
67
|
+
spaceGap?: number | undefined;
|
|
68
|
+
};
|
|
69
|
+
export declare const FormLayout: React.FC<React.PropsWithChildren<IFormLayoutProps>> & {
|
|
70
|
+
useFormLayout: () => IFormLayoutContext;
|
|
71
|
+
useFormDeepLayout: () => IFormLayoutContext;
|
|
72
|
+
useFormShallowLayout: () => IFormLayoutContext;
|
|
73
|
+
};
|
|
74
|
+
export default FormLayout;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
var _excluded = ["shallow", "children", "prefix", "className", "style"];
|
|
2
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
3
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
4
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
+
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; }
|
|
7
|
+
import cls from 'classnames';
|
|
8
|
+
import React, { createContext, useContext } from 'react';
|
|
9
|
+
import { usePrefixCls } from '../__builtins__';
|
|
10
|
+
import { useResponsiveFormLayout } from './useResponsiveFormLayout';
|
|
11
|
+
export var FormLayoutDeepContext = /*#__PURE__*/createContext({});
|
|
12
|
+
export var FormLayoutShallowContext = /*#__PURE__*/createContext({});
|
|
13
|
+
export var useFormDeepLayout = function useFormDeepLayout() {
|
|
14
|
+
return useContext(FormLayoutDeepContext);
|
|
15
|
+
};
|
|
16
|
+
export var useFormShallowLayout = function useFormShallowLayout() {
|
|
17
|
+
return useContext(FormLayoutShallowContext);
|
|
18
|
+
};
|
|
19
|
+
export var useFormLayout = function useFormLayout() {
|
|
20
|
+
return _objectSpread(_objectSpread({}, useFormDeepLayout()), useFormShallowLayout());
|
|
21
|
+
};
|
|
22
|
+
export var FormLayout = function FormLayout(_ref) {
|
|
23
|
+
var _cls;
|
|
24
|
+
var shallow = _ref.shallow,
|
|
25
|
+
children = _ref.children,
|
|
26
|
+
prefix = _ref.prefix,
|
|
27
|
+
className = _ref.className,
|
|
28
|
+
style = _ref.style,
|
|
29
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
30
|
+
var _useResponsiveFormLay = useResponsiveFormLayout(otherProps),
|
|
31
|
+
ref = _useResponsiveFormLay.ref,
|
|
32
|
+
props = _useResponsiveFormLay.props;
|
|
33
|
+
var deepLayout = useFormDeepLayout();
|
|
34
|
+
var formPrefixCls = usePrefixCls('form', {
|
|
35
|
+
prefix: prefix
|
|
36
|
+
});
|
|
37
|
+
var layoutPrefixCls = usePrefixCls('formily-layout', {
|
|
38
|
+
prefix: prefix
|
|
39
|
+
});
|
|
40
|
+
var layoutClassName = cls(layoutPrefixCls, (_cls = {}, _defineProperty(_cls, "".concat(formPrefixCls, "-").concat(props.layout), true), _defineProperty(_cls, "".concat(formPrefixCls, "-rtl"), props.direction === 'rtl'), _defineProperty(_cls, "".concat(formPrefixCls, "-").concat(props.size), props.size), _cls), className);
|
|
41
|
+
var renderChildren = function renderChildren() {
|
|
42
|
+
var newDeepLayout = _objectSpread({}, deepLayout);
|
|
43
|
+
if (!shallow) {
|
|
44
|
+
Object.assign(newDeepLayout, props);
|
|
45
|
+
} else {
|
|
46
|
+
if (props.size) {
|
|
47
|
+
newDeepLayout.size = props.size;
|
|
48
|
+
}
|
|
49
|
+
if (props.colon) {
|
|
50
|
+
newDeepLayout.colon = props.colon;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return /*#__PURE__*/React.createElement(FormLayoutDeepContext.Provider, {
|
|
54
|
+
value: newDeepLayout
|
|
55
|
+
}, /*#__PURE__*/React.createElement(FormLayoutShallowContext.Provider, {
|
|
56
|
+
value: shallow ? props : undefined
|
|
57
|
+
}, children));
|
|
58
|
+
};
|
|
59
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
60
|
+
ref: ref,
|
|
61
|
+
className: layoutClassName,
|
|
62
|
+
style: style
|
|
63
|
+
}, renderChildren());
|
|
64
|
+
};
|
|
65
|
+
FormLayout.defaultProps = {
|
|
66
|
+
shallow: true
|
|
67
|
+
};
|
|
68
|
+
FormLayout.useFormDeepLayout = useFormDeepLayout;
|
|
69
|
+
FormLayout.useFormShallowLayout = useFormShallowLayout;
|
|
70
|
+
FormLayout.useFormLayout = useFormLayout;
|
|
71
|
+
export default FormLayout;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface IProps {
|
|
3
|
+
breakpoints?: number[];
|
|
4
|
+
layout?: 'vertical' | 'horizontal' | 'inline' | ('vertical' | 'horizontal' | 'inline')[];
|
|
5
|
+
labelCol?: number | number[];
|
|
6
|
+
wrapperCol?: number | number[];
|
|
7
|
+
labelAlign?: 'right' | 'left' | ('right' | 'left')[];
|
|
8
|
+
wrapperAlign?: 'right' | 'left' | ('right' | 'left')[];
|
|
9
|
+
[props: string]: any;
|
|
10
|
+
}
|
|
11
|
+
interface IUseResponsiveFormLayout {
|
|
12
|
+
(props: IProps): {
|
|
13
|
+
ref: React.MutableRefObject<HTMLDivElement>;
|
|
14
|
+
props: any;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export declare const useResponsiveFormLayout: IUseResponsiveFormLayout;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
var _excluded = ["breakpoints", "layout", "labelAlign", "wrapperAlign", "labelCol", "wrapperCol"];
|
|
2
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
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(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
5
|
+
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; }
|
|
6
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
7
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
10
|
+
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; }
|
|
11
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
12
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
13
|
+
import { isArr, isValid } from '@formily/shared';
|
|
14
|
+
import { useEffect, useRef, useState } from 'react';
|
|
15
|
+
var calcBreakpointIndex = function calcBreakpointIndex(breakpoints, width) {
|
|
16
|
+
for (var i = 0; i < breakpoints.length; i++) {
|
|
17
|
+
if (width <= breakpoints[i]) {
|
|
18
|
+
return i;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
var calcFactor = function calcFactor(value, breakpointIndex) {
|
|
23
|
+
if (Array.isArray(value)) {
|
|
24
|
+
var _value$breakpointInde;
|
|
25
|
+
if (breakpointIndex === -1) return value[0];
|
|
26
|
+
return (_value$breakpointInde = value[breakpointIndex]) !== null && _value$breakpointInde !== void 0 ? _value$breakpointInde : value[value.length - 1];
|
|
27
|
+
} else {
|
|
28
|
+
return value;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
var factor = function factor(value, breakpointIndex) {
|
|
32
|
+
return isValid(value) ? calcFactor(value, breakpointIndex) : value;
|
|
33
|
+
};
|
|
34
|
+
var calculateProps = function calculateProps(target, props) {
|
|
35
|
+
var clientWidth = target.clientWidth;
|
|
36
|
+
var breakpoints = props.breakpoints,
|
|
37
|
+
layout = props.layout,
|
|
38
|
+
labelAlign = props.labelAlign,
|
|
39
|
+
wrapperAlign = props.wrapperAlign,
|
|
40
|
+
labelCol = props.labelCol,
|
|
41
|
+
wrapperCol = props.wrapperCol,
|
|
42
|
+
otherProps = _objectWithoutProperties(props, _excluded);
|
|
43
|
+
var breakpointIndex = calcBreakpointIndex(breakpoints, clientWidth);
|
|
44
|
+
return _objectSpread({
|
|
45
|
+
layout: factor(layout, breakpointIndex),
|
|
46
|
+
labelAlign: factor(labelAlign, breakpointIndex),
|
|
47
|
+
wrapperAlign: factor(wrapperAlign, breakpointIndex),
|
|
48
|
+
labelCol: factor(labelCol, breakpointIndex),
|
|
49
|
+
wrapperCol: factor(wrapperCol, breakpointIndex)
|
|
50
|
+
}, otherProps);
|
|
51
|
+
};
|
|
52
|
+
export var useResponsiveFormLayout = function useResponsiveFormLayout(props) {
|
|
53
|
+
var ref = useRef(null);
|
|
54
|
+
var breakpoints = props.breakpoints;
|
|
55
|
+
if (!isArr(breakpoints)) {
|
|
56
|
+
return {
|
|
57
|
+
ref: ref,
|
|
58
|
+
props: props
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
var _useState = useState(props),
|
|
62
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
63
|
+
layoutProps = _useState2[0],
|
|
64
|
+
setLayout = _useState2[1];
|
|
65
|
+
var updateUI = function updateUI() {
|
|
66
|
+
if (ref.current) {
|
|
67
|
+
setLayout(calculateProps(ref.current, props));
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
useEffect(function () {
|
|
71
|
+
var observer = function observer() {
|
|
72
|
+
updateUI();
|
|
73
|
+
};
|
|
74
|
+
var resizeObserver = new ResizeObserver(observer);
|
|
75
|
+
if (ref.current) {
|
|
76
|
+
resizeObserver.observe(ref.current);
|
|
77
|
+
}
|
|
78
|
+
updateUI();
|
|
79
|
+
return function () {
|
|
80
|
+
resizeObserver.disconnect();
|
|
81
|
+
};
|
|
82
|
+
}, []);
|
|
83
|
+
return {
|
|
84
|
+
ref: ref,
|
|
85
|
+
props: layoutProps
|
|
86
|
+
};
|
|
87
|
+
};
|
|
@@ -10,8 +10,8 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
10
10
|
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; }
|
|
11
11
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
12
12
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
13
|
+
import { cls, getMessage, isBool, usePrefixCls } from '@teamix/utils';
|
|
13
14
|
import React, { memo, useEffect, useMemo } from 'react';
|
|
14
|
-
import { usePrefixCls, getMessage, cls, isBool } from '@teamix/utils';
|
|
15
15
|
import ProForm from '../ProForm';
|
|
16
16
|
import { mergeArrayValue } from '../utils';
|
|
17
17
|
/**
|
|
@@ -64,7 +64,7 @@ var AdvancedFilter = /*#__PURE__*/memo(function (props) {
|
|
|
64
64
|
component: 'Submit',
|
|
65
65
|
props: {
|
|
66
66
|
style: {
|
|
67
|
-
marginRight: -
|
|
67
|
+
marginRight: -4
|
|
68
68
|
},
|
|
69
69
|
children: getMessage('search')
|
|
70
70
|
}
|
package/es/form/Filter/index2.js
CHANGED
|
@@ -10,9 +10,9 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
10
10
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11
11
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12
12
|
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; }
|
|
13
|
-
import React, { memo, useMemo } from 'react';
|
|
14
|
-
import { usePrefixCls, getMessage, cls } from '@teamix/utils';
|
|
15
13
|
import { createForm } from '@formily/core';
|
|
14
|
+
import { cls, getMessage, usePrefixCls } from '@teamix/utils';
|
|
15
|
+
import React, { memo, useMemo } from 'react';
|
|
16
16
|
import ProForm from '../ProForm';
|
|
17
17
|
import { mergeArrayValue } from '../utils';
|
|
18
18
|
import './index2.scss';
|
|
@@ -120,7 +120,7 @@ var AdvancedFilter = /*#__PURE__*/memo(function (props) {
|
|
|
120
120
|
component: 'Submit',
|
|
121
121
|
props: {
|
|
122
122
|
style: _objectSpread({}, triggerType === 'submit' ? {
|
|
123
|
-
marginRight: -
|
|
123
|
+
marginRight: -4
|
|
124
124
|
} : {
|
|
125
125
|
display: 'none'
|
|
126
126
|
}),
|
package/es/form/ProForm/index.js
CHANGED
|
@@ -4,26 +4,27 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
4
|
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; }
|
|
5
5
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
6
6
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
7
|
-
import
|
|
8
|
-
import { usePrefixCls, cls, getLanguage, getGlobalConfig } from '@teamix/utils';
|
|
7
|
+
import { Affix } from '@alicloudfe/components';
|
|
9
8
|
import { createForm, onFieldValueChange, onFormValuesChange, registerValidateLocale, setValidateLanguage } from '@formily/core';
|
|
10
9
|
import { toJS } from '@formily/reactive';
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import
|
|
10
|
+
import { ArrayCards, ArrayCollapse, ArrayItems, ArrayTable, Editable, Form, FormButtonGroup, FormCollapse, FormDialog, FormDrawer, FormGrid, FormItem, FormLayout, FormStep, FormTab, Reset, SelectTable, Space, Submit, Upload } from '@teamix/formily';
|
|
11
|
+
import { cls, getGlobalConfig, getLanguage, usePrefixCls } from '@teamix/utils';
|
|
12
|
+
import React, { memo, useEffect, useMemo, useRef } from 'react';
|
|
13
|
+
import { ProComponentAspect } from '../../utils/aspect';
|
|
15
14
|
import { EditableDialog, EditableDrawer, EditablePopover } from '../Components/Editable';
|
|
16
15
|
import FormGroup from '../Components/FormGroup';
|
|
16
|
+
import FormItem2 from '../Components/FormItem2';
|
|
17
17
|
import LightFilter from '../Components/LightFilter';
|
|
18
|
+
import ProFieldComponents from '../Components/ProField';
|
|
18
19
|
import Text from '../Components/Text/index';
|
|
20
|
+
import validateLocale from '../locales/validate';
|
|
19
21
|
import SchemaForm from '../SchemaForm';
|
|
20
|
-
import
|
|
22
|
+
import { parseSchema } from '../utils/parseSchema';
|
|
23
|
+
import addCascadeEffect from './addCascadeEffect';
|
|
24
|
+
import './index.scss';
|
|
21
25
|
import useAutoLayout from './useAutoLayout';
|
|
26
|
+
import useAutoSubmit from './useAutoSubmit';
|
|
22
27
|
import useInitialRequest from './useInitialRequest';
|
|
23
|
-
import validateLocale from '../locales/validate';
|
|
24
|
-
import './index.scss';
|
|
25
|
-
import { parseSchema } from '../utils/parseSchema';
|
|
26
|
-
import { ProComponentAspect } from '../../utils/aspect';
|
|
27
28
|
registerValidateLocale(validateLocale);
|
|
28
29
|
var formilyComponents = {
|
|
29
30
|
FormLayout: FormLayout,
|
|
@@ -51,7 +52,8 @@ var formilyComponents = {
|
|
|
51
52
|
SelectTable: SelectTable,
|
|
52
53
|
Affix: Affix,
|
|
53
54
|
LightFilter: LightFilter,
|
|
54
|
-
Text: Text
|
|
55
|
+
Text: Text,
|
|
56
|
+
FormItem2: FormItem2
|
|
55
57
|
};
|
|
56
58
|
var ProForm = /*#__PURE__*/memo(function (_ref) {
|
|
57
59
|
var outerForm = _ref.form,
|
package/es/info/utils/utils.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function getLayout(width: number): "
|
|
1
|
+
export declare function getLayout(width: number): "l" | "xs" | "xl" | "s" | "m";
|
|
@@ -141,7 +141,7 @@ export declare function getTreeNodeProps(item: ProSidebarDataSourceItem): {
|
|
|
141
141
|
results?: number | undefined;
|
|
142
142
|
security?: string | undefined;
|
|
143
143
|
unselectable?: "on" | "off" | undefined;
|
|
144
|
-
inputMode?: "
|
|
144
|
+
inputMode?: "none" | "url" | "text" | "search" | "tel" | "email" | "numeric" | "decimal" | undefined;
|
|
145
145
|
is?: string | undefined;
|
|
146
146
|
'aria-activedescendant'?: string | undefined;
|
|
147
147
|
'aria-atomic'?: (boolean | "false" | "true") | undefined;
|
|
@@ -156,7 +156,7 @@ export declare function getTreeNodeProps(item: ProSidebarDataSourceItem): {
|
|
|
156
156
|
'aria-describedby'?: string | undefined;
|
|
157
157
|
'aria-details'?: string | undefined;
|
|
158
158
|
'aria-disabled'?: (boolean | "false" | "true") | undefined;
|
|
159
|
-
'aria-dropeffect'?: "
|
|
159
|
+
'aria-dropeffect'?: "none" | "link" | "copy" | "move" | "execute" | "popup" | undefined;
|
|
160
160
|
'aria-errormessage'?: string | undefined;
|
|
161
161
|
'aria-expanded'?: (boolean | "false" | "true") | undefined;
|
|
162
162
|
'aria-flowto'?: string | undefined;
|
package/es/table/index.d.ts
CHANGED
package/es/table/index.js
CHANGED
|
@@ -16,28 +16,28 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
16
16
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
17
17
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
18
18
|
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; }
|
|
19
|
-
import
|
|
20
|
-
import {
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
19
|
+
import { Checkbox, Table } from '@alicloudfe/components';
|
|
20
|
+
import { useUrlState } from '@teamix/hooks';
|
|
21
|
+
import { EmptyContent } from '@teamix/pro-field';
|
|
22
|
+
import { getDeepValue, getGlobalConfig, getMessage, getTargetValue, pickProps, request as utilResquest, usePrefixCls, useRequest } from '@teamix/utils';
|
|
23
|
+
import classNames from 'classnames';
|
|
24
|
+
import debounce from 'lodash.debounce';
|
|
25
|
+
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
26
|
+
import { ProActionGroup } from '../actions';
|
|
27
|
+
import ProPageContainer from '../page-container';
|
|
24
28
|
import { ProSkeletonRaw as Skeleton } from '../skeleton';
|
|
25
|
-
import '
|
|
29
|
+
import { ProComponentAspect } from '../utils/aspect';
|
|
30
|
+
import CardView from './components/CardView';
|
|
26
31
|
import Layout from './components/Layout';
|
|
32
|
+
import Pagination from './components/Pagination';
|
|
33
|
+
import FullScreen from './components/ToolBar/Fullscreen';
|
|
34
|
+
import './index.scss';
|
|
27
35
|
import { actionRefUseStateOn, emit, initActionRef, processDefaultFilter, useActionType } from './utils';
|
|
36
|
+
import genProColumnToColumn from './utils/genProColumnToColumn';
|
|
28
37
|
import getTableProps from './utils/getTableProps';
|
|
29
38
|
import getTableSortIcons from './utils/getTableSortIcons';
|
|
30
39
|
import useTableSelection from './utils/useTableSelection';
|
|
31
|
-
import FullScreen from './components/ToolBar/Fullscreen';
|
|
32
|
-
import { EmptyContent } from '@teamix/pro-field';
|
|
33
|
-
import { ProActionGroup } from '../actions';
|
|
34
|
-
import classNames from 'classnames';
|
|
35
|
-
import ProPageContainer from '../page-container';
|
|
36
|
-
import debounce from 'lodash.debounce';
|
|
37
|
-
import CardView from './components/CardView';
|
|
38
|
-
import { useUrlState } from '@teamix/hooks';
|
|
39
40
|
import { getUrlStateFilter } from './utils/util';
|
|
40
|
-
import { ProComponentAspect } from '../utils/aspect';
|
|
41
41
|
export * from './typing';
|
|
42
42
|
var cls = usePrefixCls('teamix-pro-table');
|
|
43
43
|
/**
|
|
@@ -192,7 +192,7 @@ var ProTable = function ProTable(props) {
|
|
|
192
192
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
193
193
|
sort = _useState10[0],
|
|
194
194
|
setSort = _useState10[1];
|
|
195
|
-
var _useState11 = useState(!propsDataSource && requestWhenMount && propsShowSkeleton
|
|
195
|
+
var _useState11 = useState(!propsDataSource && requestWhenMount && propsShowSkeleton),
|
|
196
196
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
197
197
|
showSkeleton = _useState12[0],
|
|
198
198
|
setShowSkeleton = _useState12[1]; // 首次加载,渲染骨架屏
|
|
@@ -874,7 +874,7 @@ var ProTable = function ProTable(props) {
|
|
|
874
874
|
time = 60 * 1000;
|
|
875
875
|
}
|
|
876
876
|
if (autoRefresh && typeof autoRefresh !== 'boolean') {
|
|
877
|
-
time = autoRefresh ? autoRefresh(
|
|
877
|
+
time = autoRefresh ? autoRefresh(dataRes) : 0;
|
|
878
878
|
}
|
|
879
879
|
if (Number.isInteger(time) && time >= 1000) {
|
|
880
880
|
autoRefreshTimerRef.current = setTimeout(function () {
|
package/es/utils/aspect.js
CHANGED
|
@@ -33,7 +33,7 @@ export function ProComponentAspect(WrapComponent, componentName) {
|
|
|
33
33
|
key: "componentDidMount",
|
|
34
34
|
value: function componentDidMount() {
|
|
35
35
|
// @ts-ignore
|
|
36
|
-
if (!!window.
|
|
36
|
+
if (!!window.ProComponentBeforeAspectDebugger) {
|
|
37
37
|
console.log('HOC', componentName);
|
|
38
38
|
console.log('Props', this.props);
|
|
39
39
|
}
|
|
@@ -46,7 +46,10 @@ export function ProComponentAspect(WrapComponent, componentName) {
|
|
|
46
46
|
var _window$ProComponentB, _window;
|
|
47
47
|
// @ts-ignore
|
|
48
48
|
var props = (_window$ProComponentB = (_window = window).ProComponentBeforeAspect) === null || _window$ProComponentB === void 0 ? void 0 : _window$ProComponentB.call(_window, componentName, this.props);
|
|
49
|
-
|
|
49
|
+
// @ts-ignore
|
|
50
|
+
if (!!window.ProComponentBeforeAspectDebugger) {
|
|
51
|
+
console.log('NewProps', props);
|
|
52
|
+
}
|
|
50
53
|
return /*#__PURE__*/React.createElement(WrapComponent, _objectSpread({}, props));
|
|
51
54
|
}
|
|
52
55
|
return /*#__PURE__*/React.createElement(WrapComponent, _objectSpread({}, this.props));
|
package/es/xconsole.scss
CHANGED
package/lib/actions/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { TooltipProps } from '@alicloudfe/components/types/balloon';
|
|
2
2
|
import { ButtonProps } from '@alicloudfe/components/types/button';
|
|
3
3
|
import { MenuButtonProps } from '@alicloudfe/components/types/menu-button';
|
|
4
|
-
import {
|
|
5
|
-
import { LinkAction } from './link';
|
|
6
|
-
import { RequestAction } from './request';
|
|
4
|
+
import React, { ReactNode } from 'react';
|
|
7
5
|
import { DialogAction } from './dialog';
|
|
8
6
|
import { DialogFormAction } from './dialog-form';
|
|
9
|
-
import { DialogTableAction } from './dialog-table';
|
|
10
7
|
import { DialogInfoAction } from './dialog-info';
|
|
11
|
-
import {
|
|
8
|
+
import { DialogTableAction } from './dialog-table';
|
|
12
9
|
import './index.scss';
|
|
10
|
+
import { LinkAction } from './link';
|
|
11
|
+
import { PopConfirmAction } from './pop-confirm';
|
|
12
|
+
import { RequestAction } from './request';
|
|
13
13
|
export declare type ProActionConfig = ({
|
|
14
14
|
type: 'dialog-form' | 'drawer-form';
|
|
15
15
|
} & DialogFormAction) | ({
|
package/lib/actions/index.js
CHANGED
|
@@ -18,28 +18,28 @@ exports.ProActionGroup = ProActionGroup;
|
|
|
18
18
|
exports.default = exports.ProActionMenuButton = void 0;
|
|
19
19
|
exports.registerActionHandler = registerActionHandler;
|
|
20
20
|
exports.useAction = useAction;
|
|
21
|
-
var _react = _interopRequireDefault(require("react"));
|
|
22
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
23
21
|
var _components = require("@alicloudfe/components");
|
|
24
22
|
var _icon = _interopRequireDefault(require("@teamix/icon"));
|
|
25
23
|
var _utils = require("@teamix/utils");
|
|
26
|
-
var
|
|
27
|
-
var
|
|
28
|
-
var _dialog = require("./dialog");
|
|
24
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
25
|
+
var _react = _interopRequireDefault(require("react"));
|
|
29
26
|
var _confirm = require("./confirm");
|
|
30
27
|
var _dangerConfirm = require("./danger-confirm");
|
|
31
|
-
var
|
|
32
|
-
var
|
|
28
|
+
var _dangerPopConfirm = require("./danger-pop-confirm");
|
|
29
|
+
var _dialog = require("./dialog");
|
|
33
30
|
var _dialogForm = require("./dialog-form");
|
|
34
|
-
var _dialogTable = require("./dialog-table");
|
|
35
31
|
var _dialogInfo = require("./dialog-info");
|
|
32
|
+
var _dialogTable = require("./dialog-table");
|
|
36
33
|
var _drawer = require("./drawer");
|
|
37
34
|
var _drawerForm = require("./drawer-form");
|
|
38
|
-
var _drawerTable = require("./drawer-table");
|
|
39
35
|
var _drawerInfo = require("./drawer-info");
|
|
40
|
-
var
|
|
41
|
-
var
|
|
36
|
+
var _drawerTable = require("./drawer-table");
|
|
37
|
+
var _error = require("./error");
|
|
42
38
|
require("./index.scss");
|
|
39
|
+
var _link = require("./link");
|
|
40
|
+
var _notice = require("./notice");
|
|
41
|
+
var _popConfirm = require("./pop-confirm");
|
|
42
|
+
var _request = require("./request");
|
|
43
43
|
var _quick = require("./quick");
|
|
44
44
|
Object.keys(_quick).forEach(function (key) {
|
|
45
45
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -147,6 +147,7 @@ var buttonContent = function buttonContent(content, iconType, iconSize, context)
|
|
|
147
147
|
return renderedContent;
|
|
148
148
|
}
|
|
149
149
|
return [/*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
150
|
+
className: 'teamix-pro-action-prefix-icon',
|
|
150
151
|
type: iconType,
|
|
151
152
|
size: iconSize,
|
|
152
153
|
key: "teamix-button-icon"
|
|
@@ -156,7 +157,7 @@ var ProActionButton = function ProActionButton(props) {
|
|
|
156
157
|
var config = props.config,
|
|
157
158
|
icon = props.icon,
|
|
158
159
|
_props$iconSize = props.iconSize,
|
|
159
|
-
iconSize = _props$iconSize === void 0 ? '
|
|
160
|
+
iconSize = _props$iconSize === void 0 ? 'small' : _props$iconSize,
|
|
160
161
|
_props$type = props.type,
|
|
161
162
|
type = _props$type === void 0 ? 'primary' : _props$type,
|
|
162
163
|
context = props.context,
|
|
@@ -238,7 +239,7 @@ var ProActionMenuButtonItem = function ProActionMenuButtonItem(props) {
|
|
|
238
239
|
if (dataTeamixSpm) {
|
|
239
240
|
buttonProps['data-teamix-spm'] = dataTeamixSpm;
|
|
240
241
|
}
|
|
241
|
-
var content = buttonContent(children, icon,
|
|
242
|
+
var content = buttonContent(children, icon, 'small', context);
|
|
242
243
|
var baseToolTipProps = _objectSpread({
|
|
243
244
|
triggerType: 'hover',
|
|
244
245
|
align: 't',
|
|
@@ -286,7 +287,8 @@ function renderCommonActionButtonMenuItem(action, key, context, dataTeamixSpm) {
|
|
|
286
287
|
}
|
|
287
288
|
var ProActionMenuButton = function ProActionMenuButton(props) {
|
|
288
289
|
var icon = props.icon,
|
|
289
|
-
|
|
290
|
+
_props$iconSize2 = props.iconSize,
|
|
291
|
+
iconSize = _props$iconSize2 === void 0 ? 'small' : _props$iconSize2,
|
|
290
292
|
label = props.label,
|
|
291
293
|
actions = props.actions,
|
|
292
294
|
children = props.children,
|