@teamix/pro 1.4.5 → 1.4.8

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.
Files changed (45) hide show
  1. package/dist/pro.css +1 -1
  2. package/dist/pro.js +1109 -802
  3. package/dist/pro.min.css +1 -1
  4. package/dist/pro.min.js +1 -1
  5. package/es/actions/dialog-form.js +40 -28
  6. package/es/actions/dialog.js +2 -1
  7. package/es/card/index.js +1 -2
  8. package/es/card/index.scss +2 -2
  9. package/es/form/Components/LightFilter/index.js +7 -2
  10. package/es/form/Components/LightFilter/index.scss +5 -0
  11. package/es/form/Filter/index.js +5 -4
  12. package/es/form/ProForm/index.js +1 -1
  13. package/es/form/ProForm/index.scss +5 -0
  14. package/es/form/SchemaForm/index.js +8 -4
  15. package/es/form/index.d.ts +8 -7
  16. package/es/index-without-icon.d.ts +32 -0
  17. package/es/index-without-icon.js +35 -0
  18. package/es/index.d.ts +1 -1
  19. package/es/index.js +7 -2
  20. package/es/page-header/index.js +3 -1
  21. package/es/table/components/Pagination/index.js +3 -3
  22. package/es/table/index.js +1 -1
  23. package/es/table/utils/genProColumnToColumn.d.ts +5 -1
  24. package/es/table/utils/genProColumnToColumn.js +3 -1
  25. package/lib/actions/dialog-form.js +39 -26
  26. package/lib/actions/dialog.js +2 -1
  27. package/lib/card/index.js +1 -2
  28. package/lib/card/index.scss +2 -2
  29. package/lib/form/Components/LightFilter/index.js +6 -1
  30. package/lib/form/Components/LightFilter/index.scss +5 -0
  31. package/lib/form/Filter/index.js +5 -4
  32. package/lib/form/ProForm/index.js +1 -1
  33. package/lib/form/ProForm/index.scss +5 -0
  34. package/lib/form/SchemaForm/index.js +11 -6
  35. package/lib/form/index.d.ts +8 -7
  36. package/lib/index-without-icon.d.ts +32 -0
  37. package/lib/index-without-icon.js +316 -0
  38. package/lib/index.d.ts +1 -1
  39. package/lib/index.js +6 -3
  40. package/lib/page-header/index.js +3 -1
  41. package/lib/table/components/Pagination/index.js +3 -3
  42. package/lib/table/index.js +1 -1
  43. package/lib/table/utils/genProColumnToColumn.d.ts +5 -1
  44. package/lib/table/utils/genProColumnToColumn.js +4 -1
  45. package/package.json +3 -5
@@ -29,14 +29,15 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
29
29
 
30
30
  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; }
31
31
 
32
- import React, { useState, useEffect, createRef } from 'react';
32
+ import React, { useState, useEffect, createRef, useMemo } from 'react';
33
33
  import { useHistory } from 'react-router-dom';
34
34
  import { Loading } from '@alicloudfe/components';
35
- import ProForm, { createForm } from '../form';
35
+ import ProForm, { createForm, formilyReactive } from '../form';
36
36
  import { getTargetValue, resolveMaybePromiseMethod } from '@teamix/utils';
37
37
  import { doRequest } from './request';
38
38
  import useDialogAction from './dialog';
39
39
  import { addContext } from './utils';
40
+ var toJS = formilyReactive.toJS;
40
41
 
41
42
  function getDefaultFormPropsByDialogSize(size) {
42
43
  if (size === 'small') {
@@ -93,15 +94,22 @@ var DialogForm = function DialogForm(props) {
93
94
  innerFormRef = props.innerFormRef,
94
95
  _props$validateFirst = props.validateFirst,
95
96
  validateFirst = _props$validateFirst === void 0 ? true : _props$validateFirst;
96
-
97
- var _getSchemaAndFormProp = getSchemaAndFormProps(schema, formProps),
98
- formSchema = _getSchemaAndFormProp.schema,
99
- others = _objectWithoutProperties(_getSchemaAndFormProp, _excluded);
100
-
101
- var form = createForm({
102
- initialValues: getTargetValue(initialValues, context),
103
- validateFirst: validateFirst
104
- });
97
+ var form = useMemo(function () {
98
+ return createForm({
99
+ initialValues: getTargetValue(initialValues, context),
100
+ validateFirst: validateFirst
101
+ });
102
+ }, [validateFirst, initialValues, context]);
103
+
104
+ var _useMemo = useMemo(function () {
105
+ return getSchemaAndFormProps(schema, formProps);
106
+ }, [schema, formProps]),
107
+ formSchema = _useMemo.schema,
108
+ others = _objectWithoutProperties(_useMemo, _excluded);
109
+
110
+ var otherFormProps = useMemo(function () {
111
+ return addContext(getTargetValue(others, context), context);
112
+ }, [context, JSON.stringify(others)]);
105
113
 
106
114
  var _useState = useState(false),
107
115
  _useState2 = _slicedToArray(_useState, 2),
@@ -134,7 +142,7 @@ var DialogForm = function DialogForm(props) {
134
142
  }, /*#__PURE__*/React.createElement(ProForm, _objectSpread(_objectSpread({
135
143
  form: form,
136
144
  schema: formSchema
137
- }, getDefaultFormPropsByDialogSize(size)), addContext(getTargetValue(others, context), context))));
145
+ }, getDefaultFormPropsByDialogSize(size)), otherFormProps)));
138
146
  };
139
147
 
140
148
  export function useDialogFormAction(action, context) {
@@ -177,51 +185,55 @@ export function useDialogFormAction(action, context) {
177
185
  innerFormRef.current.validate().then( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
178
186
  var _innerFormRef$current;
179
187
 
180
- var beforeRequestContext, requestContext;
188
+ var beforeRequestContext, fields, requestContext;
181
189
  return regeneratorRuntime.wrap(function _callee$(_context) {
182
190
  while (1) {
183
191
  switch (_context.prev = _context.next) {
184
192
  case 0:
193
+ fields = toJS((_innerFormRef$current = innerFormRef.current) === null || _innerFormRef$current === void 0 ? void 0 : _innerFormRef$current.values);
194
+
185
195
  if (!propsBeforeRequest) {
186
- _context.next = 13;
196
+ _context.next = 14;
187
197
  break;
188
198
  }
189
199
 
190
- _context.prev = 1;
191
- _context.next = 4;
192
- return resolveMaybePromiseMethod(propsBeforeRequest, context);
200
+ _context.prev = 2;
201
+ _context.next = 5;
202
+ return resolveMaybePromiseMethod(propsBeforeRequest, _objectSpread(_objectSpread({}, context), {}, {
203
+ fields: fields
204
+ }));
193
205
 
194
- case 4:
206
+ case 5:
195
207
  beforeRequestContext = _context.sent;
196
- _context.next = 10;
208
+ _context.next = 11;
197
209
  break;
198
210
 
199
- case 7:
200
- _context.prev = 7;
201
- _context.t0 = _context["catch"](1);
211
+ case 8:
212
+ _context.prev = 8;
213
+ _context.t0 = _context["catch"](2);
202
214
  beforeRequestContext = false;
203
215
 
204
- case 10:
216
+ case 11:
205
217
  if (!(beforeRequestContext === false)) {
206
- _context.next = 13;
218
+ _context.next = 14;
207
219
  break;
208
220
  }
209
221
 
210
222
  reject(false);
211
223
  return _context.abrupt("return");
212
224
 
213
- case 13:
225
+ case 14:
214
226
  requestContext = Object.assign({
215
- fields: (_innerFormRef$current = innerFormRef.current) === null || _innerFormRef$current === void 0 ? void 0 : _innerFormRef$current.values
227
+ fields: fields
216
228
  }, _typeof(beforeRequestContext) === 'object' ? beforeRequestContext : {});
217
229
  resolve(requestContext);
218
230
 
219
- case 15:
231
+ case 16:
220
232
  case "end":
221
233
  return _context.stop();
222
234
  }
223
235
  }
224
- }, _callee, null, [[1, 7]]);
236
+ }, _callee, null, [[2, 8]]);
225
237
  }))).catch(function () {
226
238
  resolve(false);
227
239
  });
@@ -1,4 +1,4 @@
1
- var _excluded = ["trigger", "url", "method", "params", "data", "extendParams", "successMsg", "errorMsg", "formatParams", "formatResult", "onSuccess", "onError"],
1
+ var _excluded = ["trigger", "url", "customRequest", "method", "params", "data", "extendParams", "successMsg", "errorMsg", "formatParams", "formatResult", "onSuccess", "onError"],
2
2
  _excluded2 = ["title", "content", "component", "schema", "onFinish", "dialogType", "dialogQuickShowType", "messageType", "popType", "beforeRequest", "onTrigger", "link", "beforeContent", "afterContent", "message", "footerDescription", "footerAlign", "className"];
3
3
 
4
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; }
@@ -84,6 +84,7 @@ export function useDialogAction(action, actionContext, hasForm) {
84
84
 
85
85
  var trigger = action.trigger,
86
86
  url = action.url,
87
+ customRequest = action.customRequest,
87
88
  method = action.method,
88
89
  params = action.params,
89
90
  data = action.data,
package/es/card/index.js CHANGED
@@ -226,8 +226,7 @@ export var ProCard = function ProCard(props) {
226
226
  value: description,
227
227
  type: "text",
228
228
  render: {
229
- ellipsis: true,
230
- tooltip: description
229
+ ellipsis: true
231
230
  }
232
231
  })));
233
232
  };
@@ -32,7 +32,7 @@
32
32
  $grid-columns: 24;
33
33
  @for $i from 1 through $grid-columns {
34
34
  &-#{$i} {
35
- $width: percentage($i/$grid-columns);
35
+ $width: percentage($i / $grid-columns);
36
36
  flex: 0 0 $width;
37
37
  width: $width;
38
38
  max-width: $width;
@@ -52,7 +52,7 @@
52
52
  }
53
53
  }
54
54
 
55
- &-name{
55
+ &-name {
56
56
  flex-shrink: 0;
57
57
  }
58
58
 
@@ -16,7 +16,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
16
16
 
17
17
  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; }
18
18
 
19
- import React, { useState, useCallback, useContext } from 'react';
19
+ import React, { useState, useCallback, useContext, useEffect } from 'react';
20
20
  import { observer, useFieldSchema, RecursionField, SchemaExpressionScopeContext } from '@formily/react';
21
21
  import { Select, Button } from '@alicloudfe/components';
22
22
  import TeamixIcon from '@teamix/icon';
@@ -113,6 +113,11 @@ var LightFilter = observer(function (props) {
113
113
  setActive(value);
114
114
  onFilterChange && onFilterChange(value);
115
115
  }, [onFilterChange]);
116
+ useEffect(function () {
117
+ if (!filterItems.length) {
118
+ setActive(undefined);
119
+ }
120
+ }, [filterItems.length]);
116
121
  return /*#__PURE__*/React.createElement("span", {
117
122
  className: cls(basePrefix(size), prefixCls({
118
123
  '': true,
@@ -121,7 +126,7 @@ var LightFilter = observer(function (props) {
121
126
  }, /*#__PURE__*/React.createElement("span", {
122
127
  className: prefixCls('main')
123
128
  }, /*#__PURE__*/React.createElement(Select, _objectSpread(_objectSpread({}, filterProps), {}, {
124
- className: cls(prefixCls('select'), filterProps === null || filterProps === void 0 ? void 0 : filterProps.className),
129
+ className: cls(prefixCls('select'), _defineProperty({}, prefixCls('select-none'), !content.length), filterProps === null || filterProps === void 0 ? void 0 : filterProps.className),
125
130
  dataSource: filterItems,
126
131
  onChange: onSelectChange,
127
132
  value: active
@@ -37,6 +37,11 @@ $light-filter: #{teamix-pro-form}-light-filter;
37
37
  padding-right: 0;
38
38
  }
39
39
  }
40
+ .#{$light-filter}-select-none {
41
+ .#{$css-prefix}input-control {
42
+ padding-right: var(--input-m-icon-padding-right, 8px);
43
+ }
44
+ }
40
45
  }
41
46
 
42
47
  // 按钮后缀
@@ -1,4 +1,4 @@
1
- var _excluded = ["addonAfter", "addonBefore", "mode", "purePanel", "expand", "formRef", "defaultFilterValue", "filterValues", "filterDebounce", "bindUrl", "onFilter", "onInit", "onReset", "onExpand", "onChange"];
1
+ var _excluded = ["addonAfter", "addonBefore", "mode", "purePanel", "expand", "formRef", "defaultFilterValue", "filterValues", "filterDebounce", "bindUrl", "onFilter", "onInit", "onReset", "onExpand", "onChange", "form"];
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
 
@@ -70,6 +70,7 @@ var QueryFilter = /*#__PURE__*/memo(function (props) {
70
70
  outerReset = props.onReset,
71
71
  onExpand = props.onExpand,
72
72
  onChange = props.onChange,
73
+ form = props.form,
73
74
  otherProps = _objectWithoutProperties(props, _excluded);
74
75
 
75
76
  var _useSpecialProps = useSpecialProps(props),
@@ -288,7 +289,7 @@ var QueryFilter = /*#__PURE__*/memo(function (props) {
288
289
  });
289
290
  }
290
291
  });
291
- }, []); // 创建轻量筛选表单实例
292
+ }, [form]); // 创建轻量筛选表单实例
292
293
 
293
294
  var lightForm = useMemo(function () {
294
295
  return createForm({
@@ -299,7 +300,7 @@ var QueryFilter = /*#__PURE__*/memo(function (props) {
299
300
  });
300
301
  }
301
302
  });
302
- }, []); // 创建高级筛选表单实例
303
+ }, [form]); // 创建高级筛选表单实例
303
304
 
304
305
  var advancedForm = useMemo(function () {
305
306
  return createForm({
@@ -319,7 +320,7 @@ var QueryFilter = /*#__PURE__*/memo(function (props) {
319
320
  });
320
321
  }
321
322
  });
322
- }, []);
323
+ }, [form]);
323
324
  var formMap = {
324
325
  simple: simpleForm,
325
326
  light: lightForm,
@@ -89,7 +89,7 @@ var ProForm = /*#__PURE__*/memo(function (_ref) {
89
89
  return outerForm || createForm({
90
90
  validateFirst: validateFirst
91
91
  });
92
- }, []);
92
+ }, [outerForm]);
93
93
  var prefixCls = usePrefixCls('teamix-pro-form'); // 由于Actions需要,解构context供使用。原context键名的上下文继续保留。
94
94
 
95
95
  var mergedScope = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, context), globalScope), scope), {}, {
@@ -332,6 +332,11 @@
332
332
  }
333
333
  }
334
334
 
335
+ // ArrayTable
336
+ .#{$form-array}-table-status-select {
337
+ display: none;
338
+ }
339
+
335
340
  // SelectTable
336
341
  .#{$teamix-pro-form}-select-table-column-tree
337
342
  > .#{$css-prefix}table-cell-wrapper {
@@ -32,6 +32,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
32
32
 
33
33
  import React, { memo, useCallback, useRef, useMemo } from 'react';
34
34
  import { createSchemaField } from '@formily/react';
35
+ import { isUsable } from '@teamix/utils';
35
36
  import adapterType from './adapterType';
36
37
  import adapterComponent from './adapterComponent';
37
38
  import adapterDecorator from './adapterDecorator';
@@ -135,8 +136,7 @@ export default /*#__PURE__*/memo(function (_ref) {
135
136
  var _newItem2 = newItem,
136
137
  component = _newItem2.component,
137
138
  type = _newItem2.type,
138
- _newItem2$name = _newItem2.name,
139
- name = _newItem2$name === void 0 ? getFieldName(component === null || component === void 0 ? void 0 : component.replace(/\./g, ''), suffix) : _newItem2$name,
139
+ name = _newItem2.name,
140
140
  decorator = _newItem2.decorator,
141
141
  decoratorProps = _newItem2.decoratorProps,
142
142
  dataSource = _newItem2.dataSource,
@@ -147,9 +147,11 @@ export default /*#__PURE__*/memo(function (_ref) {
147
147
  tooltip = _newItem2.tooltip,
148
148
  request = _newItem2.request,
149
149
  data = _newItem2.data,
150
- otherProps = _objectWithoutProperties(_newItem2, _excluded); // 默认类型
150
+ otherProps = _objectWithoutProperties(_newItem2, _excluded); // 默认字段名
151
151
 
152
152
 
153
+ var defaultName = !name ? getFieldName(component === null || component === void 0 ? void 0 : component.replace(/\./g, ''), suffix) : name; // 默认类型
154
+
153
155
  var defaultType = adapterType(type, originalComponent); // 默认装饰组件
154
156
 
155
157
  var defaultDecorator = adapterDecorator(decorator, originalComponent); // 默认装饰组件属性
@@ -207,7 +209,9 @@ export default /*#__PURE__*/memo(function (_ref) {
207
209
 
208
210
  var recursiveItems = items ? formatSchema([items], suffix) : {}; // 配置组件属性
209
211
 
210
- schemaProperties[name] = _objectSpread(_objectSpread(_objectSpread({}, formatParam), recursiveProperties), recursiveItems);
212
+ if (isUsable(item)) {
213
+ schemaProperties[defaultName] = _objectSpread(_objectSpread(_objectSpread({}, formatParam), recursiveProperties), recursiveItems);
214
+ }
211
215
  });
212
216
  return schemaProperties;
213
217
  }, []);
@@ -16,8 +16,8 @@ declare const formilyReact: {
16
16
  };
17
17
  useFormDisplayValues: () => any;
18
18
  Schema: typeof originalFormilyReact.Schema;
19
- FormProvider: import("react").FC<originalFormilyReact.IProviderProps>;
20
- FormConsumer: import("react").FC<originalFormilyReact.IFormSpyProps>;
19
+ FormProvider: originalFormilyReact.ReactFC<originalFormilyReact.IProviderProps>;
20
+ FormConsumer: originalFormilyReact.ReactFC<originalFormilyReact.IFormSpyProps>;
21
21
  ArrayField: {
22
22
  <D extends originalFormilyReact.JSXComponent, C extends originalFormilyReact.JSXComponent>(props: originalFormilyReact.IFieldProps<D, C, import("@formily/core").ArrayField<any, any>>): JSX.Element;
23
23
  displayName: string;
@@ -30,8 +30,8 @@ declare const formilyReact: {
30
30
  <D_2 extends originalFormilyReact.JSXComponent, C_2 extends originalFormilyReact.JSXComponent>(props: originalFormilyReact.IVoidFieldProps<D_2, C_2, import("@formily/core").VoidField<any, any, any>>): JSX.Element;
31
31
  displayName: string;
32
32
  };
33
- RecursionField: import("react").FC<originalFormilyReact.IRecursionFieldProps>;
34
- ExpressionScope: import("react").FC<originalFormilyReact.IExpressionScopeProps>;
33
+ RecursionField: originalFormilyReact.ReactFC<originalFormilyReact.IRecursionFieldProps>;
34
+ ExpressionScope: originalFormilyReact.ReactFC<originalFormilyReact.IExpressionScopeProps>;
35
35
  createSchemaField<Components extends originalFormilyReact.SchemaReactComponents>(options?: originalFormilyReact.ISchemaFieldReactFactoryOptions<Components> | undefined): {
36
36
  <Decorator extends originalFormilyReact.JSXComponent, Component extends originalFormilyReact.JSXComponent>(props: originalFormilyReact.ISchemaFieldProps<Decorator, Component, import("@formily/core").ObjectField<Decorator, Component>>): JSX.Element;
37
37
  displayName: string;
@@ -81,17 +81,18 @@ declare const formilyReact: {
81
81
  SchemaMarkupContext: import("react").Context<originalFormilyReact.Schema<any, any, any, any, any, any, any, any, any>>;
82
82
  SchemaContext: import("react").Context<originalFormilyReact.Schema<any, any, any, any, any, any, any, any, any>>;
83
83
  SchemaExpressionScopeContext: import("react").Context<any>;
84
+ SchemaComponentsContext: import("react").Context<originalFormilyReact.SchemaReactComponents>;
84
85
  SchemaOptionsContext: import("react").Context<originalFormilyReact.ISchemaFieldReactFactoryOptions<any>>;
85
86
  ContextCleaner: ({ children }: {
86
87
  children: any;
87
88
  }) => any;
88
- mapProps<T extends originalFormilyReact.JSXComponent>(...args: originalFormilyReact.IStateMapper<import("react").ComponentProps<T>>[]): (target: T) => import("react").MemoExoticComponent<import("react").FunctionComponent<any>>;
89
- mapReadPretty<T_1 extends originalFormilyReact.JSXComponent, C_4 extends originalFormilyReact.JSXComponent>(component: C_4, readPrettyProps?: import("react").ComponentProps<C_4> | undefined): (target: T_1) => import("react").MemoExoticComponent<import("react").FunctionComponent<{
89
+ mapProps<T extends originalFormilyReact.JSXComponent>(...args: originalFormilyReact.IStateMapper<import("react").ComponentProps<T>>[]): (target: T) => import("react").MemoExoticComponent<originalFormilyReact.ReactFC<any>>;
90
+ mapReadPretty<T_1 extends originalFormilyReact.JSXComponent, C_4 extends originalFormilyReact.JSXComponent>(component: C_4, readPrettyProps?: import("react").ComponentProps<C_4> | undefined): (target: T_1) => import("react").MemoExoticComponent<originalFormilyReact.ReactFC<{
90
91
  ref?: import("react").RefAttributes<any> | undefined;
91
92
  }>>;
92
93
  connect<T_2 extends originalFormilyReact.JSXComponent>(target: T_2, ...args: originalFormilyReact.IComponentMapper<T_2>[]): import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<Partial<import("react").ComponentProps<T_2>>> & import("react").RefAttributes<unknown>>;
93
94
  observer: typeof originalFormilyReact.observer;
94
- Observer: import("react").MemoExoticComponent<import("react").FunctionComponent<import("@formily/reactive-react").IObserverProps>>;
95
+ Observer: import("react").MemoExoticComponent<originalFormilyReact.ReactFC<import("@formily/reactive-react").IObserverProps>>;
95
96
  useForm: <T_3 extends object = any>() => import("@formily/core").Form<T_3>;
96
97
  useField: <T_4 = import("@formily/core").GeneralField>() => T_4;
97
98
  useParentForm: () => import("@formily/core").Form<any> | import("@formily/core").ObjectField<any, any>;
@@ -0,0 +1,32 @@
1
+ import ProAction from './actions';
2
+ import ProCard from './card';
3
+ import ProField from './field';
4
+ import ProForm from './form';
5
+ import hooks from './hooks';
6
+ import ProInfo from './info';
7
+ import ProPageContainer from './page-container';
8
+ import ProPageHeader from './page-header';
9
+ import ProTable from './table';
10
+ import ProSkeleton from './skeleton';
11
+ import utils from './utils';
12
+ import ProSidebar from './sidebar';
13
+ import { ProTimeline } from './timeline';
14
+ import * as nocode from './nocode';
15
+ import * as templates from './templates';
16
+ import TeamixIcon from '@teamix/icon';
17
+ import './global.scss';
18
+ export * from './actions';
19
+ export * from './card';
20
+ export * from './field';
21
+ export * from './form';
22
+ export * from './info';
23
+ export * from './nocode';
24
+ export * from './page-container';
25
+ export * from './page-header';
26
+ export * from './skeleton';
27
+ export * from './table';
28
+ export * from './sidebar';
29
+ export * from './utils';
30
+ export * from './timeline';
31
+ declare const version = "1.4.7";
32
+ export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProSidebar, ProTimeline, TeamixIcon, hooks, nocode, templates, utils, };
@@ -0,0 +1,35 @@
1
+ // 不带有设置图标源的入口文件
2
+ import ProAction from './actions';
3
+ import ProCard from './card';
4
+ import ProField from './field';
5
+ import ProForm from './form';
6
+ import hooks from './hooks';
7
+ import ProInfo from './info'; // import ProLayout from './layout';
8
+
9
+ import ProPageContainer from './page-container';
10
+ import ProPageHeader from './page-header';
11
+ import ProTable from './table';
12
+ import ProSkeleton from './skeleton';
13
+ import utils from './utils';
14
+ import ProSidebar from './sidebar';
15
+ import { ProTimeline } from './timeline';
16
+ import * as nocode from './nocode';
17
+ import * as templates from './templates';
18
+ import TeamixIcon from '@teamix/icon';
19
+ import './global.scss';
20
+ export * from './actions';
21
+ export * from './card';
22
+ export * from './field';
23
+ export * from './form';
24
+ export * from './info';
25
+ export * from './nocode';
26
+ export * from './page-container';
27
+ export * from './page-header';
28
+ export * from './skeleton';
29
+ export * from './table';
30
+ export * from './sidebar';
31
+ export * from './utils';
32
+ export * from './timeline';
33
+ var version = '1.4.7';
34
+ export { version, ProAction, ProCard, ProField, ProForm, ProInfo, // ProLayout,
35
+ ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProSidebar, ProTimeline, TeamixIcon, hooks, nocode, templates, utils };
package/es/index.d.ts CHANGED
@@ -28,5 +28,5 @@ export * from './table';
28
28
  export * from './sidebar';
29
29
  export * from './utils';
30
30
  export * from './timeline';
31
- declare const version = "1.4.5";
31
+ declare const version = "1.4.8";
32
32
  export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProSidebar, ProTimeline, TeamixIcon, hooks, nocode, templates, utils, };
package/es/index.js CHANGED
@@ -1,3 +1,5 @@
1
+ var _window;
2
+
1
3
  import ProAction from './actions';
2
4
  import ProCard from './card';
3
5
  import ProField from './field';
@@ -17,7 +19,10 @@ import * as templates from './templates';
17
19
  import TeamixIcon from '@teamix/icon';
18
20
  import './global.scss'; // 设置图标源
19
21
 
20
- TeamixIcon.setConfig(utils.getTeamixIconConfig());
22
+ if (!((_window = window) === null || _window === void 0 ? void 0 : _window.TEAMIXPRO_WITHOUT_ICON)) {
23
+ TeamixIcon.setConfig(utils.getTeamixIconConfig());
24
+ }
25
+
21
26
  export * from './actions';
22
27
  export * from './card';
23
28
  export * from './field';
@@ -31,6 +36,6 @@ export * from './table';
31
36
  export * from './sidebar';
32
37
  export * from './utils';
33
38
  export * from './timeline';
34
- var version = '1.4.5';
39
+ var version = '1.4.8';
35
40
  export { version, ProAction, ProCard, ProField, ProForm, ProInfo, // ProLayout,
36
41
  ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProSidebar, ProTimeline, TeamixIcon, hooks, nocode, templates, utils };
@@ -161,11 +161,13 @@ var ProPageHeader = function ProPageHeader(props) {
161
161
  var backgroundImage = image ? "url('".concat(image, "')") : undefined;
162
162
 
163
163
  var showList = function showList(list) {
164
+ var _list$actions;
165
+
164
166
  if (loading) {
165
167
  return !!list;
166
168
  }
167
169
 
168
- return list && list.length > 0;
170
+ return list && (list.length > 0 || (list === null || list === void 0 ? void 0 : (_list$actions = list.actions) === null || _list$actions === void 0 ? void 0 : _list$actions.length) > 0);
169
171
  };
170
172
 
171
173
  var renderTitle = function renderTitle() {
@@ -98,7 +98,7 @@ export default (function (props) {
98
98
  lineHeight: '18px'
99
99
  }
100
100
  }, getMessage('total', {
101
- total: total
101
+ total: new Intl.NumberFormat().format(total)
102
102
  }))
103
103
  }, /*#__PURE__*/React.createElement("div", {
104
104
  className: prefixCls('custom-total-content')
@@ -216,7 +216,7 @@ export default (function (props) {
216
216
  return /*#__PURE__*/React.createElement(Pagination, _objectSpread(_objectSpread({}, commonPaginationProps), {}, {
217
217
  totalRender: function totalRender(total) {
218
218
  return getMessage('total', {
219
- total: total
219
+ total: new Intl.NumberFormat().format(total)
220
220
  });
221
221
  }
222
222
  }, otherProps));
@@ -226,7 +226,7 @@ export default (function (props) {
226
226
  pageShowCount: 3,
227
227
  totalRender: function totalRender(total) {
228
228
  return getMessage('total', {
229
- total: total
229
+ total: new Intl.NumberFormat().format(total)
230
230
  });
231
231
  }
232
232
  }, otherProps));
package/es/table/index.js CHANGED
@@ -936,7 +936,7 @@ var ProTable = function ProTable(props) {
936
936
  // pageSizePosition="end"
937
937
  totalRender: function totalRender(total) {
938
938
  return getMessage('total', {
939
- total: total
939
+ total: new Intl.NumberFormat().format(total)
940
940
  });
941
941
  },
942
942
  pageSize: pageSize,
@@ -1,9 +1,13 @@
1
1
  import React from 'react';
2
2
  import { ProTableColumnProps, ProTableActionType } from '../typing';
3
3
  import { ColumnProps } from '@alicloudfe/components/types/table';
4
+ declare type FixedColumnProps = ColumnProps & {
5
+ wordBreak?: string;
6
+ };
4
7
  /**
5
8
  * ProColumn => Column
6
9
  */
7
10
  export default function genProColumnToColumn(columns: ProTableColumnProps[],
8
11
  /** 是否渲染骨架屏 */
9
- showSkeleton: boolean, actionRef: React.MutableRefObject<ProTableActionType | undefined>, context?: any): ColumnProps[];
12
+ showSkeleton: boolean, actionRef: React.MutableRefObject<ProTableActionType | undefined>, context?: any): FixedColumnProps[];
13
+ export {};
@@ -13,6 +13,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
13
13
  import React from 'react';
14
14
  import { renderColumnsTitle, renderCell } from './columnRender';
15
15
  import { ProSkeletonRaw as Skeleton } from '../../skeleton';
16
+ import { getLanguage } from '@teamix/utils';
16
17
  /**
17
18
  * ProColumn => Column
18
19
  */
@@ -40,7 +41,8 @@ showSkeleton, actionRef) {
40
41
 
41
42
  return _objectSpread(_objectSpread({
42
43
  // 金钱样式默认右对齐
43
- align: columnProps.valueType === 'money' ? 'right' : 'left'
44
+ align: columnProps.valueType === 'money' ? 'right' : 'left',
45
+ wordBreak: getLanguage() === 'en-us' ? 'word' : 'all'
44
46
  }, others), {}, {
45
47
  dataIndex: dataIndex === null || dataIndex === void 0 ? void 0 : dataIndex.toString(),
46
48
  title: renderColumnsTitle(columnProps, actionRef),