@teamix/pro 1.4.0 → 1.4.3
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.css +1 -1
- package/dist/pro.js +11103 -10755
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/dist/pro.min.js.LICENSE.txt +0 -2
- package/es/actions/dialog-form.js +1 -1
- package/es/actions/dialog.js +2 -1
- package/es/actions/index.js +5 -1
- package/es/card/index.d.ts +3 -1
- package/es/card/index.js +7 -5
- package/es/card/selectable.js +2 -2
- package/es/card/utils.js +2 -2
- package/es/form/Components/Editable/index.js +14 -10
- package/es/form/Components/FormGroup/index.js +10 -6
- package/es/form/Components/LightFilter/index.js +10 -7
- package/es/form/Components/Text/index.js +2 -4
- package/es/form/Filter/AdvancedFilter.js +3 -6
- package/es/form/Filter/Layout.js +12 -13
- package/es/form/Filter/LightFilter.js +3 -6
- package/es/form/Filter/SimpleFilter.js +3 -6
- package/es/form/Filter/index.js +9 -10
- package/es/form/Filter/index2.js +5 -10
- package/es/form/ProForm/index.d.ts +3 -2
- package/es/form/ProForm/index.js +9 -20
- package/es/form/SchemaForm/initializeSelectTable.js +3 -6
- package/es/form/typing.d.ts +0 -3
- package/es/index.d.ts +1 -1
- package/es/index.js +2 -3
- package/es/info/components/InfoValueItem/index.js +2 -2
- package/es/info/components/ProInfoItem/index.js +3 -2
- package/es/info/components/tableInfo/index.js +1 -1
- package/es/nocode/pages/editor.js +2 -2
- package/es/nocode/pages/playground.js +2 -2
- package/es/nocode/pages/renderer.js +2 -2
- package/es/nocode/playground.js +2 -2
- package/es/page-header/index.d.ts +2 -1
- package/es/page-header/index.js +3 -2
- package/es/sidebar/components/sidebar-container/index.js +2 -2
- package/es/sidebar/components/tree/index.js +2 -2
- package/es/sidebar/components/tree-node/components/HoverTooltip/index.js +2 -2
- package/es/sidebar/components/tree-node/components/IconAction/index.js +2 -2
- package/es/sidebar/components/tree-node/components/IconSwitch/index.js +2 -2
- package/es/sidebar/components/tree-node/index.js +3 -3
- package/es/sidebar/index.js +2 -2
- package/es/sidebar/typing.d.ts +2 -1
- package/es/table/components/Filter/index.js +2 -2
- package/es/table/components/Layout/index.js +9 -5
- package/es/table/components/Pagination/index.js +13 -9
- package/es/table/components/ToolBar/DensityIcon.js +2 -2
- package/es/table/components/ToolBar/FilterColumnIcon.js +6 -12
- package/es/table/components/ToolBar/FullScreenIcon.js +2 -2
- package/es/table/components/ToolBar/RefreshIcon.js +2 -2
- package/es/table/components/ToolBar/index.js +2 -2
- package/es/table/index.js +18 -23
- package/es/table/index.scss +7 -0
- package/es/table/typing.d.ts +5 -1
- package/es/table/utils/columnRender.d.ts +1 -1
- package/es/table/utils/columnRender.js +8 -5
- package/es/table/utils/genProColumnToColumn.d.ts +1 -1
- package/es/table/utils/genProColumnToColumn.js +2 -1
- package/es/table/utils/pureColumnRender.js +2 -2
- package/es/timeline/ProTimeLineItem/index.js +3 -3
- package/es/timeline/index.js +2 -2
- package/es/timeline/typing.d.ts +1 -1
- package/lib/actions/dialog-form.js +1 -1
- package/lib/actions/dialog.js +2 -1
- package/lib/actions/index.js +5 -1
- package/lib/card/index.d.ts +3 -1
- package/lib/card/index.js +8 -5
- package/lib/card/selectable.js +1 -1
- package/lib/card/utils.js +1 -1
- package/lib/form/Components/Editable/index.js +14 -10
- package/lib/form/Components/FormGroup/index.js +10 -6
- package/lib/form/Components/LightFilter/index.js +10 -7
- package/lib/form/Components/Text/index.js +2 -4
- package/lib/form/Filter/AdvancedFilter.js +2 -6
- package/lib/form/Filter/Layout.js +11 -13
- package/lib/form/Filter/LightFilter.js +2 -6
- package/lib/form/Filter/SimpleFilter.js +2 -6
- package/lib/form/Filter/index.js +8 -10
- package/lib/form/Filter/index2.js +4 -10
- package/lib/form/ProForm/index.d.ts +3 -2
- package/lib/form/ProForm/index.js +8 -21
- package/lib/form/SchemaForm/initializeSelectTable.js +2 -6
- package/lib/form/typing.d.ts +0 -3
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/info/components/InfoValueItem/index.js +1 -1
- package/lib/info/components/ProInfoItem/index.js +6 -4
- package/lib/info/components/tableInfo/index.js +4 -4
- package/lib/nocode/pages/editor.js +1 -1
- package/lib/nocode/pages/playground.js +1 -1
- package/lib/nocode/pages/renderer.js +1 -1
- package/lib/nocode/playground.js +1 -1
- package/lib/page-header/index.d.ts +2 -1
- package/lib/page-header/index.js +5 -3
- package/lib/sidebar/components/sidebar-container/index.js +1 -1
- package/lib/sidebar/components/tree/index.js +1 -1
- package/lib/sidebar/components/tree-node/components/HoverTooltip/index.js +1 -1
- package/lib/sidebar/components/tree-node/components/IconAction/index.js +1 -1
- package/lib/sidebar/components/tree-node/components/IconSwitch/index.js +1 -1
- package/lib/sidebar/components/tree-node/index.js +3 -3
- package/lib/sidebar/index.js +1 -1
- package/lib/sidebar/typing.d.ts +2 -1
- package/lib/table/components/Filter/index.js +1 -1
- package/lib/table/components/Layout/index.js +11 -6
- package/lib/table/components/Pagination/index.js +12 -9
- package/lib/table/components/ToolBar/DensityIcon.js +1 -1
- package/lib/table/components/ToolBar/FilterColumnIcon.js +7 -11
- package/lib/table/components/ToolBar/FullScreenIcon.js +1 -1
- package/lib/table/components/ToolBar/RefreshIcon.js +1 -1
- package/lib/table/components/ToolBar/index.js +1 -1
- package/lib/table/index.js +17 -23
- package/lib/table/index.scss +7 -0
- package/lib/table/typing.d.ts +5 -1
- package/lib/table/utils/columnRender.d.ts +1 -1
- package/lib/table/utils/columnRender.js +14 -5
- package/lib/table/utils/genProColumnToColumn.d.ts +1 -1
- package/lib/table/utils/genProColumnToColumn.js +2 -1
- package/lib/table/utils/pureColumnRender.js +8 -2
- package/lib/timeline/ProTimeLineItem/index.js +4 -2
- package/lib/timeline/index.js +1 -1
- package/lib/timeline/typing.d.ts +1 -1
- package/package.json +1 -1
- package/es/form/ProForm/useFieldSchema.d.ts +0 -7
- package/es/form/ProForm/useFieldSchema.js +0 -109
- package/lib/form/ProForm/useFieldSchema.d.ts +0 -7
- package/lib/form/ProForm/useFieldSchema.js +0 -118
package/es/form/ProForm/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
var _excluded = ["form", "initialValues", "initialRequest", "scope", "context", "components", "layout", "labelAlign", "wrapperAlign", "labelCol", "wrapperCol", "breakpoints", "onChange", "onChangeType", "onSubmit", "onSubmitFailed", "onInitialComplete", "className", "validateFirst"];
|
1
|
+
var _excluded = ["form", "initialValues", "initialRequest", "scope", "context", "components", "layout", "labelAlign", "wrapperAlign", "labelCol", "wrapperCol", "breakpoints", "onChange", "onChangeType", "onSubmit", "onSubmitFailed", "onInitialComplete", "className", "validateFirst", "schema", "children"];
|
2
2
|
|
3
3
|
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; }
|
4
4
|
|
@@ -11,8 +11,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
11
11
|
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; }
|
12
12
|
|
13
13
|
import React, { memo, useMemo } from 'react';
|
14
|
-
import cls from '
|
15
|
-
import { usePrefixCls, getLanguage, getGlobalConfig } from '@teamix/utils';
|
14
|
+
import { usePrefixCls, cls, getLanguage, getGlobalConfig } from '@teamix/utils';
|
16
15
|
import { createForm, onFieldValueChange, onFormValuesChange, registerValidateLocale, setValidateLanguage } from '@formily/core';
|
17
16
|
import { toJS } from '@formily/reactive';
|
18
17
|
import { Form, Upload, SelectTable, FormLayout, FormItem, ArrayCollapse, ArrayCards, ArrayItems, ArrayTable, Space, FormGrid, FormTab, FormCollapse, FormStep, Editable, FormDialog, FormDrawer, FormButtonGroup, Submit, Reset } from '@teamix/formily';
|
@@ -26,7 +25,6 @@ import SchemaForm from '../SchemaForm';
|
|
26
25
|
import { mergeArrayValue } from '../utils';
|
27
26
|
import useAutoSubmit from './useAutoSubmit';
|
28
27
|
import useInitialRequest from './useInitialRequest';
|
29
|
-
import useFieldSchema from './useFieldSchema';
|
30
28
|
import validateLocale from '../locales/validate';
|
31
29
|
import './index.scss';
|
32
30
|
registerValidateLocale(validateLocale);
|
@@ -78,6 +76,8 @@ var ProForm = /*#__PURE__*/memo(function (_ref) {
|
|
78
76
|
onInitialComplete = _ref.onInitialComplete,
|
79
77
|
className = _ref.className,
|
80
78
|
validateFirst = _ref.validateFirst,
|
79
|
+
schema = _ref.schema,
|
80
|
+
children = _ref.children,
|
81
81
|
otherProps = _objectWithoutProperties(_ref, _excluded);
|
82
82
|
|
83
83
|
// 获取全局配置
|
@@ -90,14 +90,11 @@ var ProForm = /*#__PURE__*/memo(function (_ref) {
|
|
90
90
|
validateFirst: validateFirst
|
91
91
|
});
|
92
92
|
}, []);
|
93
|
-
var prefixCls = usePrefixCls(''
|
94
|
-
prefix: 'teamix-pro-form'
|
95
|
-
});
|
93
|
+
var prefixCls = usePrefixCls('teamix-pro-form'); // 由于Actions需要,解构context供使用。原context键名的上下文继续保留。
|
96
94
|
|
97
|
-
var mergedScope = _objectSpread(_objectSpread(_objectSpread({}, globalScope), scope), {}, {
|
95
|
+
var mergedScope = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, context), globalScope), scope), {}, {
|
98
96
|
context: context
|
99
|
-
});
|
100
|
-
|
97
|
+
});
|
101
98
|
|
102
99
|
var mergedComponents = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, globalComponents), components), formilyComponents), ProFieldComponents);
|
103
100
|
|
@@ -120,7 +117,6 @@ var ProForm = /*#__PURE__*/memo(function (_ref) {
|
|
120
117
|
wrapperCol: mergeArrayValue([24], wrapperCol)
|
121
118
|
};
|
122
119
|
}, [breakpoints, layout, labelAlign, wrapperAlign, labelCol, wrapperCol]);
|
123
|
-
var schema = useFieldSchema(otherProps);
|
124
120
|
useMemo(function () {
|
125
121
|
// 配置表单默认值
|
126
122
|
if (initialValues) {
|
@@ -159,7 +155,7 @@ var ProForm = /*#__PURE__*/memo(function (_ref) {
|
|
159
155
|
}
|
160
156
|
}, [onChange]);
|
161
157
|
return /*#__PURE__*/React.createElement(Form, _objectSpread(_objectSpread(_objectSpread({
|
162
|
-
className: cls(prefixCls, className)
|
158
|
+
className: cls(prefixCls(), className)
|
163
159
|
}, otherProps), getTeamixLayout), {}, {
|
164
160
|
form: form,
|
165
161
|
onAutoSubmit: onAutoSubmit,
|
@@ -168,15 +164,8 @@ var ProForm = /*#__PURE__*/memo(function (_ref) {
|
|
168
164
|
schema: schema,
|
169
165
|
scope: mergedScope,
|
170
166
|
components: mergedComponents
|
171
|
-
}) : null,
|
167
|
+
}) : null, children);
|
172
168
|
});
|
173
|
-
|
174
|
-
var Field = function Field() {
|
175
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
176
|
-
};
|
177
|
-
|
178
|
-
Field.displayName = 'ProFormField';
|
179
|
-
ProForm.Field = Field;
|
180
169
|
ProForm.defaultProps = {
|
181
170
|
colon: false,
|
182
171
|
labelAlign: 'left',
|
@@ -22,8 +22,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
22
22
|
|
23
23
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
24
24
|
|
25
|
-
import cls from '
|
26
|
-
import { usePrefixCls, isStr, isPlainObj, isArr } from '@teamix/utils';
|
25
|
+
import { usePrefixCls, cls, isStr, isPlainObj, isArr } from '@teamix/utils';
|
27
26
|
import pureGenProColumnToColumn from '../../table/utils/pureGenProColumnToColumn';
|
28
27
|
/**
|
29
28
|
* 将可被 ProForm 识别的上下文转换为仅被 ProTable 识别的上下文
|
@@ -85,15 +84,13 @@ var initialize = function initialize(item) {
|
|
85
84
|
var _item$children = item.children,
|
86
85
|
children = _item$children === void 0 ? [] : _item$children,
|
87
86
|
props = item.props;
|
88
|
-
var prefixCls = usePrefixCls(''
|
89
|
-
prefix: 'teamix-pro-form-select-table-column-tree'
|
90
|
-
});
|
87
|
+
var prefixCls = usePrefixCls('teamix-pro-form-select-table-column-tree');
|
91
88
|
var columns = props === null || props === void 0 ? void 0 : (_props$columns = props.columns) === null || _props$columns === void 0 ? void 0 : _props$columns.map(function (value, index) {
|
92
89
|
var column = adapterContext(value);
|
93
90
|
|
94
91
|
if ((props === null || props === void 0 ? void 0 : props.isTree) && index === 0) {
|
95
92
|
return _objectSpread(_objectSpread({}, column), {}, {
|
96
|
-
className: cls(column.className
|
93
|
+
className: cls(prefixCls(), column.className)
|
97
94
|
});
|
98
95
|
}
|
99
96
|
|
package/es/form/typing.d.ts
CHANGED
@@ -78,9 +78,6 @@ export interface ProFormProps extends IFormLayoutProps {
|
|
78
78
|
onSubmitFailed?: (feedbacks: IFormFeedback[]) => void;
|
79
79
|
onInitialComplete?: (form: FormType) => void;
|
80
80
|
}
|
81
|
-
export declare type ComposedProForm = React.FC<ProFormProps> & {
|
82
|
-
Field?: React.FC<any>;
|
83
|
-
};
|
84
81
|
export interface FilterProps extends ProFormProps {
|
85
82
|
form: FormType;
|
86
83
|
defaultFilterValue?: string;
|
package/es/index.d.ts
CHANGED
@@ -27,5 +27,5 @@ export * from './table';
|
|
27
27
|
export * from './sidebar';
|
28
28
|
export * from './utils';
|
29
29
|
export * from './timeline';
|
30
|
-
declare const version = "1.3
|
30
|
+
declare const version = "1.4.3";
|
31
31
|
export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProSidebar, ProTimeline, hooks, nocode, templates, utils, };
|
package/es/index.js
CHANGED
@@ -29,9 +29,8 @@ export * from './page-header';
|
|
29
29
|
export * from './skeleton';
|
30
30
|
export * from './table';
|
31
31
|
export * from './sidebar';
|
32
|
-
export * from './utils';
|
33
|
-
|
32
|
+
export * from './utils';
|
34
33
|
export * from './timeline';
|
35
|
-
var version = '1.3
|
34
|
+
var version = '1.4.3';
|
36
35
|
export { version, ProAction, ProCard, ProField, ProForm, ProInfo, // ProLayout,
|
37
36
|
ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProSidebar, ProTimeline, hooks, nocode, templates, utils };
|
@@ -32,14 +32,14 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
32
32
|
|
33
33
|
import TeamixIcon from '@teamix/icon';
|
34
34
|
import ProField from '../../../field';
|
35
|
-
import {
|
35
|
+
import { usePrefixCls, getTargetValue, request } from '@teamix/utils';
|
36
36
|
import PopConfirm from '@teamix/pop-confirm';
|
37
37
|
import React, { useMemo, useState } from 'react';
|
38
38
|
import './index.scss';
|
39
39
|
import ProForm, { createForm, formilyReactive } from '../../../form';
|
40
40
|
import { Message } from '@alicloudfe/components';
|
41
41
|
import { ProActionGroup } from '../../../actions';
|
42
|
-
var cls =
|
42
|
+
var cls = usePrefixCls('teamix-pro-info');
|
43
43
|
var toJS = formilyReactive.toJS;
|
44
44
|
|
45
45
|
var InfoValueItem = function InfoValueItem(props) {
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import { Grid } from '@alicloudfe/components';
|
2
2
|
import { ProSkeletonRaw } from '../../..';
|
3
|
-
import {
|
3
|
+
import { usePrefixCls } from '@teamix/utils';
|
4
4
|
import React from 'react';
|
5
|
+
import { Ellipsis, LabelIconTip } from '../../../field';
|
5
6
|
import './index.scss';
|
6
|
-
var cls =
|
7
|
+
var cls = usePrefixCls('teamix-pro-field-info-form-item');
|
7
8
|
var Row = Grid.Row,
|
8
9
|
Col = Grid.Col;
|
9
10
|
|
@@ -20,7 +20,7 @@ import React, { useMemo } from 'react';
|
|
20
20
|
import './index.scss';
|
21
21
|
import { Table } from '@alicloudfe/components';
|
22
22
|
import './index.scss';
|
23
|
-
import { LabelIconTip } from '
|
23
|
+
import { LabelIconTip } from '../../../field';
|
24
24
|
import InfoValueItem from '../InfoValueItem';
|
25
25
|
import { ProSkeletonRaw } from '../../..';
|
26
26
|
import { getDataIndexValue } from '../../utils';
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import SVG from '@teamix/svg';
|
3
|
-
import {
|
3
|
+
import { usePrefixCls } from '@teamix/utils';
|
4
4
|
import { PagePlayground } from './playground';
|
5
5
|
import { PageMap, PageDefaultInitialValues } from '.';
|
6
|
-
var cls =
|
6
|
+
var cls = usePrefixCls('teamix-pro-pager');
|
7
7
|
export var PageEditor = function PageEditor(props) {
|
8
8
|
var type = props.type,
|
9
9
|
initialValues = props.initialValues,
|
@@ -21,12 +21,12 @@ import { Balloon } from '@alicloudfe/components';
|
|
21
21
|
import { useDebounceFn } from '@teamix/hooks';
|
22
22
|
import Icon from '@teamix/icon';
|
23
23
|
import SVG from '@teamix/svg';
|
24
|
-
import {
|
24
|
+
import { usePrefixCls } from '@teamix/utils';
|
25
25
|
import { useAction } from '../../actions';
|
26
26
|
import { initConfigurator } from '../configurators';
|
27
27
|
import { ComponentConfiguratorMap } from '../configurators/map';
|
28
28
|
import { PlayGroundLayout } from '../playground';
|
29
|
-
var cls =
|
29
|
+
var cls = usePrefixCls('teamix-nocode');
|
30
30
|
export var PagePlayground = function PagePlayground(props) {
|
31
31
|
var _useState = useState(undefined),
|
32
32
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -38,9 +38,9 @@ import SVG from '@teamix/svg';
|
|
38
38
|
import PageContainer from '../../page-container';
|
39
39
|
import PageHeader from '../../page-header';
|
40
40
|
import { ProSkeletonRaw } from '../../skeleton';
|
41
|
-
import {
|
41
|
+
import { usePrefixCls } from '@teamix/utils';
|
42
42
|
import { PageMap } from '.';
|
43
|
-
var cls =
|
43
|
+
var cls = usePrefixCls('teamix-nocode');
|
44
44
|
|
45
45
|
var Loading = function Loading(props) {
|
46
46
|
return /*#__PURE__*/React.createElement(PageContainer, _objectSpread({
|
package/es/nocode/playground.js
CHANGED
@@ -17,10 +17,10 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
17
17
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
18
18
|
|
19
19
|
import React, { useMemo } from 'react';
|
20
|
-
import {
|
20
|
+
import { usePrefixCls } from '@teamix/utils';
|
21
21
|
import { useDebounceFn } from '@teamix/hooks';
|
22
22
|
import { initConfigurator } from './configurators';
|
23
|
-
var cls =
|
23
|
+
var cls = usePrefixCls('teamix-nocode-playground');
|
24
24
|
export var PlayGroundLayout = function PlayGroundLayout(props) {
|
25
25
|
return /*#__PURE__*/React.createElement("div", {
|
26
26
|
className: cls()
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { ItemProps } from '@alicloudfe/components/types/breadcrumb';
|
3
|
-
import { LinkPath
|
3
|
+
import { LinkPath } from '@teamix/utils';
|
4
|
+
import { CapsuleTabType, ProTagItem } from '../field';
|
4
5
|
import { ProActionGroupProps } from '../actions';
|
5
6
|
import { ProInfoProps } from '../info';
|
6
7
|
import './index.scss';
|
package/es/page-header/index.js
CHANGED
@@ -17,12 +17,13 @@ import { useHistory } from 'react-router-dom';
|
|
17
17
|
import classnames from 'classnames';
|
18
18
|
import TeamixIcon from '@teamix/icon';
|
19
19
|
import { Breadcrumb, Balloon } from '@alicloudfe/components';
|
20
|
-
import {
|
20
|
+
import { usePrefixCls, goToLink, isPresetColor, getColor, getColorClassName, getBackgroundColorClassName } from '@teamix/utils';
|
21
|
+
import { CapsuleTab, renderTags } from '../field';
|
21
22
|
import { ProActionGroup } from '../actions';
|
22
23
|
import { ProSkeletonRaw } from '../skeleton';
|
23
24
|
import ProInfo from '../info';
|
24
25
|
import './index.scss';
|
25
|
-
var cls =
|
26
|
+
var cls = usePrefixCls('teamix-pro-page-header');
|
26
27
|
var Tooltip = Balloon.Tooltip;
|
27
28
|
|
28
29
|
var renderNav = function renderNav(breadcrumbs) {
|
@@ -33,11 +33,11 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
33
33
|
import { Button, MenuButton, Message } from '@alicloudfe/components';
|
34
34
|
import { ProCard } from '../../../card';
|
35
35
|
import ProField from '@teamix/pro-field';
|
36
|
-
import {
|
36
|
+
import { usePrefixCls } from '@teamix/utils';
|
37
37
|
import React, { useEffect, useRef, useState } from 'react';
|
38
38
|
import './index.scss';
|
39
39
|
import TeamixIcon from '@teamix/icon';
|
40
|
-
var cls =
|
40
|
+
var cls = usePrefixCls('teamix-pro-sidebar-container');
|
41
41
|
|
42
42
|
var ProSidebarContainer = function ProSidebarContainer(props) {
|
43
43
|
var children = props.children,
|
@@ -33,7 +33,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
33
33
|
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; }
|
34
34
|
|
35
35
|
import { Tree } from '@alicloudfe/components';
|
36
|
-
import {
|
36
|
+
import { usePrefixCls } from '@teamix/utils';
|
37
37
|
import React, { useEffect, useMemo, useState } from 'react';
|
38
38
|
import { renderTreeNode, renderTreeNodeDependenceValue } from '../tree-node';
|
39
39
|
import './index.scss';
|
@@ -42,7 +42,7 @@ import { filterTreeData, getAllNodeKey, getTreeLevelKey, loop } from '../../util
|
|
42
42
|
import { useUpdateEffect } from '@teamix/hooks';
|
43
43
|
import { useActionType } from '../../utils/action-ref';
|
44
44
|
import cloneDeep from 'lodash.clonedeep';
|
45
|
-
var cls =
|
45
|
+
var cls = usePrefixCls('teamix-pro-sidebar-tree');
|
46
46
|
|
47
47
|
var ProSidebarTree = function ProSidebarTree(props) {
|
48
48
|
var _ref;
|
@@ -17,10 +17,10 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
17
17
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
18
18
|
|
19
19
|
import { Balloon } from '@alicloudfe/components';
|
20
|
-
import {
|
20
|
+
import { usePrefixCls } from '@teamix/utils';
|
21
21
|
import React, { useEffect, useState } from 'react';
|
22
22
|
import './index.scss';
|
23
|
-
var cls =
|
23
|
+
var cls = usePrefixCls('teamix-pro-hover-tooltip');
|
24
24
|
|
25
25
|
var ProHoverTooltip = function ProHoverTooltip(props) {
|
26
26
|
var trigger = props.trigger,
|
@@ -18,11 +18,11 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
18
|
|
19
19
|
import TeamixIcon from '@teamix/icon';
|
20
20
|
import { useAction } from '../../../../..';
|
21
|
-
import {
|
21
|
+
import { usePrefixCls } from '@teamix/utils';
|
22
22
|
import React, { useState } from 'react';
|
23
23
|
import ProHoverTooltip from '../HoverTooltip';
|
24
24
|
import './index.scss';
|
25
|
-
var cls =
|
25
|
+
var cls = usePrefixCls('teamix-pro-sidebar-icon-action');
|
26
26
|
|
27
27
|
var ProIconAction = function ProIconAction(props) {
|
28
28
|
var _popupProps$wrapperCl;
|
@@ -11,11 +11,11 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
11
11
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
12
12
|
|
13
13
|
import TeamixIcon from '@teamix/icon';
|
14
|
-
import {
|
14
|
+
import { usePrefixCls } from '@teamix/utils';
|
15
15
|
import React, { isValidElement, useEffect, useState } from 'react';
|
16
16
|
import ProHoverTooltip from '../HoverTooltip';
|
17
17
|
import './index.scss';
|
18
|
-
var cls =
|
18
|
+
var cls = usePrefixCls('teamix-pro-icon-switch');
|
19
19
|
|
20
20
|
var ProIconSwitch = function ProIconSwitch(props) {
|
21
21
|
var visibleProp = props.visible,
|
@@ -26,13 +26,13 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
26
26
|
|
27
27
|
import { Tree } from '@alicloudfe/components';
|
28
28
|
import { ProActionGroup } from '../../../actions';
|
29
|
-
import {
|
29
|
+
import { usePrefixCls } from '@teamix/utils';
|
30
30
|
import React, { isValidElement, useState } from 'react';
|
31
|
-
import ProField from '@teamix/pro-field';
|
31
|
+
import ProField, { renderTags } from '@teamix/pro-field';
|
32
32
|
import ProIconAction from './components/IconAction';
|
33
33
|
import ProIconSwitch from './components/IconSwitch';
|
34
34
|
import ProHoverTooltip from './components/HoverTooltip';
|
35
|
-
var cls =
|
35
|
+
var cls = usePrefixCls('teamix-pro-sidebar-tree');
|
36
36
|
|
37
37
|
var ProSideBarTreeNode = function ProSideBarTreeNode(props) {
|
38
38
|
var tag = props.tag,
|
package/es/sidebar/index.js
CHANGED
@@ -24,7 +24,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
24
24
|
|
25
25
|
import React, { useEffect, useRef, useState } from 'react';
|
26
26
|
import './index.scss';
|
27
|
-
import {
|
27
|
+
import { usePrefixCls, doCommonRequest } from '@teamix/utils';
|
28
28
|
import ProSidebarContainer from './components/sidebar-container';
|
29
29
|
import ProSidebarTree from './components/tree';
|
30
30
|
import { getTreeLevel, ProSkeletonRaw } from '..';
|
@@ -32,7 +32,7 @@ import { useActionType } from './utils/action-ref';
|
|
32
32
|
import debounce from 'lodash.debounce';
|
33
33
|
export * from './typing';
|
34
34
|
export * from './utils';
|
35
|
-
var cls =
|
35
|
+
var cls = usePrefixCls('teamix-pro-sidebar');
|
36
36
|
|
37
37
|
var ProSidebar = function ProSidebar(props) {
|
38
38
|
var selectedKeys = props.selectedKeys,
|
package/es/sidebar/typing.d.ts
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { MessageProps } from '@alifd/next/types/message';
|
3
3
|
import { TreeProps } from '@alifd/next/types/tree';
|
4
|
-
import { CommonRequestConfig
|
4
|
+
import { CommonRequestConfig } from '@teamix/utils';
|
5
|
+
import { ProTagItem } from '../field';
|
5
6
|
import { ProActionConfig, ProCardProps, ProFieldProps, ProFieldRenderProps, ProFieldType } from '..';
|
6
7
|
/** ProSidebar 定义 */
|
7
8
|
export declare type ProSidebarProps = {
|
@@ -28,10 +28,10 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
28
28
|
import React, { useEffect, useMemo, useState } from 'react';
|
29
29
|
import TeamixIcon from '@teamix/icon';
|
30
30
|
import { Button, Dropdown, Menu } from '@alicloudfe/components';
|
31
|
-
import {
|
31
|
+
import { usePrefixCls, getMessage } from '@teamix/utils';
|
32
32
|
import './index.scss';
|
33
33
|
var CheckboxItem = Menu.CheckboxItem;
|
34
|
-
var cls =
|
34
|
+
var cls = usePrefixCls('teamix-pro-table-toolbar-filter');
|
35
35
|
var RadioItem = Menu.RadioItem;
|
36
36
|
|
37
37
|
var Filter = function Filter(props) {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
var _excluded = ["header", "mainAction", "extra", "actionRef", "dataFilter", "dataFilterFormRef", "rowSelection"];
|
1
|
+
var _excluded = ["header", "mainAction", "extra", "actionRef", "dataFilter", "dataFilterFormRef", "afterDataFilter", "rowSelection"];
|
2
2
|
|
3
3
|
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; }
|
4
4
|
|
@@ -13,13 +13,14 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
13
13
|
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; }
|
14
14
|
|
15
15
|
import React, { isValidElement } from 'react';
|
16
|
-
import {
|
16
|
+
import { usePrefixCls } from '@teamix/utils';
|
17
|
+
import { Header } from '../../../field';
|
17
18
|
import { ProActionGroup } from '../../../actions';
|
18
19
|
import { QueryFilter, QueryFilterLayout } from '../../../form';
|
19
20
|
import ToolBar from '../ToolBar';
|
20
21
|
import QuickAction from '../QuickAction';
|
21
22
|
import './index.scss';
|
22
|
-
var cls =
|
23
|
+
var cls = usePrefixCls('teamix-pro-table-layout');
|
23
24
|
|
24
25
|
var Layout = function Layout(props) {
|
25
26
|
var header = props.header,
|
@@ -28,6 +29,7 @@ var Layout = function Layout(props) {
|
|
28
29
|
actionRef = props.actionRef,
|
29
30
|
dataFilter = props.dataFilter,
|
30
31
|
dataFilterFormRef = props.dataFilterFormRef,
|
32
|
+
afterDataFilter = props.afterDataFilter,
|
31
33
|
rowSelection = props.rowSelection,
|
32
34
|
otherProps = _objectWithoutProperties(props, _excluded); // 渲染主操作区
|
33
35
|
|
@@ -99,7 +101,7 @@ var Layout = function Layout(props) {
|
|
99
101
|
addonAfter: renderAddonAfter()
|
100
102
|
}, dataFilter));
|
101
103
|
} else if ((dataFilter === null || dataFilter === void 0 ? void 0 : (_dataFilter$schema2 = dataFilter.schema) === null || _dataFilter$schema2 === void 0 ? void 0 : _dataFilter$schema2.length) >= 0) {
|
102
|
-
return /*#__PURE__*/React.createElement(QueryFilter, _objectSpread({
|
104
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(QueryFilter, _objectSpread({
|
103
105
|
formRef: dataFilterFormRef,
|
104
106
|
onExpand: function onExpand(expand) {
|
105
107
|
// 全屏模式下展开收起过滤器需要重新计算tableMaxHeight
|
@@ -116,7 +118,9 @@ var Layout = function Layout(props) {
|
|
116
118
|
},
|
117
119
|
addonBefore: renderMainAction(),
|
118
120
|
addonAfter: renderAddonAfter()
|
119
|
-
}, dataFilter))
|
121
|
+
}, dataFilter)), afterDataFilter && /*#__PURE__*/React.createElement("div", {
|
122
|
+
className: "mb8 ".concat(cls('after-data-filter-wrapper'))
|
123
|
+
}, afterDataFilter));
|
120
124
|
}
|
121
125
|
} else if (mainAction) {
|
122
126
|
// 没传 dataFilter 但是传了 mainAction
|
@@ -25,10 +25,9 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
25
25
|
// 自适应宽度的翻页器
|
26
26
|
import React, { useState, useEffect } from 'react';
|
27
27
|
import { Pagination, Balloon, Select, Button, Input, Icon } from '@alicloudfe/components';
|
28
|
-
import { getMessage,
|
28
|
+
import { getMessage, cls, usePrefixCls } from '@teamix/utils';
|
29
29
|
import { useResponsiveProps } from '@teamix/hooks';
|
30
30
|
import './index.scss';
|
31
|
-
var cls = baseClass('teamix-pro-pagination');
|
32
31
|
export default (function (props) {
|
33
32
|
var className = props.className,
|
34
33
|
propsOnChange = props.onChange,
|
@@ -42,6 +41,11 @@ export default (function (props) {
|
|
42
41
|
responsivePaginationType = props.responsivePaginationType,
|
43
42
|
otherProps = _objectWithoutProperties(props, _excluded);
|
44
43
|
|
44
|
+
var basePrefix = usePrefixCls('', {
|
45
|
+
base: true
|
46
|
+
});
|
47
|
+
var prefixCls = usePrefixCls('teamix-pro-pagination');
|
48
|
+
|
45
49
|
var _useResponsiveProps = useResponsiveProps([480, 590, 700], ['mini', 'small', 'simple', 'normal']),
|
46
50
|
responsiveProps = _useResponsiveProps.responsiveProps,
|
47
51
|
paginationWrapperRef = _useResponsiveProps.ref;
|
@@ -97,11 +101,11 @@ export default (function (props) {
|
|
97
101
|
total: total
|
98
102
|
}))
|
99
103
|
}, /*#__PURE__*/React.createElement("div", {
|
100
|
-
className:
|
104
|
+
className: prefixCls('custom-total-content')
|
101
105
|
}, /*#__PURE__*/React.createElement("div", {
|
102
106
|
className: "title"
|
103
107
|
}, getMessage('pageSize')), /*#__PURE__*/React.createElement(Select, {
|
104
|
-
className:
|
108
|
+
className: prefixCls('custom-page-size-selector'),
|
105
109
|
dataSource: pageSizeList,
|
106
110
|
defaultValue: pageSize,
|
107
111
|
followTrigger: true,
|
@@ -158,9 +162,9 @@ export default (function (props) {
|
|
158
162
|
};
|
159
163
|
|
160
164
|
return /*#__PURE__*/React.createElement("div", {
|
161
|
-
className:
|
165
|
+
className: prefixCls('custom-jumper')
|
162
166
|
}, /*#__PURE__*/React.createElement(Button, {
|
163
|
-
className:
|
167
|
+
className: basePrefix('prev', 'pagination-item'),
|
164
168
|
onClick: handlePrevClick,
|
165
169
|
disabled: Number(currentPage) <= 1
|
166
170
|
}, /*#__PURE__*/React.createElement(Icon, {
|
@@ -182,7 +186,7 @@ export default (function (props) {
|
|
182
186
|
marginRight: 4
|
183
187
|
}
|
184
188
|
}, "/"), getTotalPage(total, pageSize)), /*#__PURE__*/React.createElement(Button, {
|
185
|
-
className:
|
189
|
+
className: basePrefix('next', 'pagination-item'),
|
186
190
|
onClick: handleNextClick,
|
187
191
|
//@ts-ignore
|
188
192
|
disabled: total && Number(currentPage) >= getTotalPage(total, pageSize)
|
@@ -200,7 +204,7 @@ export default (function (props) {
|
|
200
204
|
}, otherProps));
|
201
205
|
} else {
|
202
206
|
return /*#__PURE__*/React.createElement("div", {
|
203
|
-
className:
|
207
|
+
className: cls(basePrefix('pagination'), prefixCls('custom-mini-pagination'))
|
204
208
|
}, customTotalRender(total), customJumpRender());
|
205
209
|
}
|
206
210
|
}
|
@@ -249,7 +253,7 @@ export default (function (props) {
|
|
249
253
|
// 用于获取翻页器响应式 ref
|
250
254
|
React.createElement("div", {
|
251
255
|
ref: paginationWrapperRef,
|
252
|
-
className:
|
256
|
+
className: prefixCls('wrapper')
|
253
257
|
}, renderPagination())
|
254
258
|
);
|
255
259
|
});
|
@@ -15,11 +15,11 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
15
15
|
*/
|
16
16
|
import { Button, Dropdown, Menu } from '@alicloudfe/components';
|
17
17
|
import TeamixIcon from '@teamix/icon';
|
18
|
-
import {
|
18
|
+
import { usePrefixCls, getMessage } from '@teamix/utils';
|
19
19
|
import React, { useState } from 'react';
|
20
20
|
import './index.scss';
|
21
21
|
var RadioItem = Menu.RadioItem;
|
22
|
-
var cls =
|
22
|
+
var cls = usePrefixCls('teamix-pro-table-toolbar-icon');
|
23
23
|
|
24
24
|
var DensityIcon = function DensityIcon(props) {
|
25
25
|
var _actionRef$current;
|
@@ -29,29 +29,23 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
29
29
|
*/
|
30
30
|
import { Button, Dropdown, Menu, Dialog, Grid, Checkbox } from '@alicloudfe/components';
|
31
31
|
import TeamixIcon from '@teamix/icon';
|
32
|
-
import {
|
32
|
+
import { usePrefixCls, getMessage, getGlobalConfig } from '@teamix/utils';
|
33
33
|
import React, { useState, useEffect } from 'react';
|
34
34
|
import { cloneDeep, off, on } from '../../utils';
|
35
|
+
import { Ellipsis } from '../../../field';
|
35
36
|
import './index.scss';
|
36
|
-
import { Ellipsis, getCookie } from '@teamix/utils';
|
37
37
|
var CheckboxItem = Menu.CheckboxItem;
|
38
38
|
var Row = Grid.Row,
|
39
39
|
Col = Grid.Col;
|
40
|
-
var cls =
|
41
|
-
|
42
|
-
var isRoot = getCookie('organizationId') === '1';
|
40
|
+
var cls = usePrefixCls('teamix-pro-table-toolbar-filter-column');
|
43
41
|
|
44
42
|
var processColumns = function processColumns(columns) {
|
45
|
-
|
46
|
-
// root 组织下不显示标签管理
|
47
|
-
columns = columns.filter(function (item) {
|
48
|
-
return item.valueType !== 'selectGroup';
|
49
|
-
});
|
50
|
-
} // hidden 为 true 时不展示
|
43
|
+
var _getGlobalConfig;
|
51
44
|
|
45
|
+
var globalFilterColumns = (_getGlobalConfig = getGlobalConfig('ProTable')) === null || _getGlobalConfig === void 0 ? void 0 : _getGlobalConfig.filterColumns; // hidden 为 true 时不展示
|
52
46
|
|
53
47
|
columns = columns.filter(function (item) {
|
54
|
-
return (item === null || item === void 0 ? void 0 : item.hidden) !== true;
|
48
|
+
return (item === null || item === void 0 ? void 0 : item.hidden) !== true && (!globalFilterColumns || globalFilterColumns(item));
|
55
49
|
});
|
56
50
|
return columns.map(function (item) {
|
57
51
|
if (item.columnFilters === false) {
|
@@ -15,10 +15,10 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
15
15
|
*/
|
16
16
|
import { Button } from '@alicloudfe/components';
|
17
17
|
import TeamixIcon from '@teamix/icon';
|
18
|
-
import {
|
18
|
+
import { usePrefixCls } from '@teamix/utils';
|
19
19
|
import React, { useEffect, useState } from 'react';
|
20
20
|
import './index.scss';
|
21
|
-
var cls =
|
21
|
+
var cls = usePrefixCls('teamix-pro-table-toolbar-icon');
|
22
22
|
|
23
23
|
var FullScreenIcon = function FullScreenIcon(props) {
|
24
24
|
var _actionRef$current3, _actionRef$current3$o;
|
@@ -3,10 +3,10 @@
|
|
3
3
|
*/
|
4
4
|
import { Button, Balloon } from '@alicloudfe/components';
|
5
5
|
import TeamixIcon from '@teamix/icon';
|
6
|
-
import {
|
6
|
+
import { usePrefixCls, getMessage } from '@teamix/utils';
|
7
7
|
import React from 'react';
|
8
8
|
import './index.scss';
|
9
|
-
var cls =
|
9
|
+
var cls = usePrefixCls('teamix-pro-table-toolbar-icon');
|
10
10
|
|
11
11
|
var LayoutIcon = function LayoutIcon(props) {
|
12
12
|
var actionRef = props.actionRef; // const [fullscreen, setFullscreen] = useState<boolean>(false);
|