@teamix/pro 1.1.39 → 1.1.40

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 (190) hide show
  1. package/README.md +14 -10
  2. package/dist/pro.css +1 -1
  3. package/dist/pro.js +2214 -4073
  4. package/dist/pro.min.css +1 -1
  5. package/dist/pro.min.js +1 -1
  6. package/es/actions/dialog-form.d.ts +5 -5
  7. package/es/actions/dialog-form.js +1 -5
  8. package/es/actions/dialog.d.ts +6 -3
  9. package/es/actions/dialog.js +12 -5
  10. package/es/actions/index.d.ts +54 -47
  11. package/es/actions/index.js +28 -22
  12. package/es/actions/index.scss +17 -2
  13. package/es/card/index.d.ts +17 -5
  14. package/es/card/index.js +16 -11
  15. package/es/form/Components/ProField/index.d.ts +1 -78
  16. package/es/form/Components/ProField/index.js +34 -40
  17. package/es/form/Filter/index.js +2 -2
  18. package/es/form/ProForm/index.d.ts +2 -2
  19. package/es/form/ProForm/index.js +1 -6
  20. package/es/form/ProForm/index.scss +19 -1
  21. package/es/form/ProForm/useFieldRequest.d.ts +5 -0
  22. package/es/form/ProForm/useFieldRequest.js +26 -0
  23. package/es/form/SchemaForm/adapterDecorator.js +2 -2
  24. package/es/form/SchemaForm/index.d.ts +2 -2
  25. package/es/form/SchemaForm/index.js +12 -21
  26. package/es/form/SchemaForm/initializeArrayCards.d.ts +2 -2
  27. package/es/form/SchemaForm/initializeArrayCollapse.d.ts +2 -2
  28. package/es/form/SchemaForm/initializeArrayItems.d.ts +2 -2
  29. package/es/form/SchemaForm/initializeArrayTable.d.ts +2 -2
  30. package/es/form/SchemaForm/initializeDataSource.d.ts +2 -2
  31. package/es/form/SchemaForm/initializeDataSource.js +2 -2
  32. package/es/form/SchemaForm/initializeFormButton.d.ts +2 -2
  33. package/es/form/SchemaForm/initializeFormCollapse.d.ts +2 -2
  34. package/es/form/SchemaForm/initializeFormGroup.d.ts +2 -2
  35. package/es/form/SchemaForm/initializeFormStep.d.ts +3 -3
  36. package/es/form/SchemaForm/initializeFormTab.d.ts +2 -2
  37. package/es/form/SchemaForm/initializeRequest.d.ts +2 -2
  38. package/es/form/SchemaForm/initializeRequest.js +2 -2
  39. package/es/form/SchemaForm/initializeRules.js +44 -16
  40. package/es/form/SchemaForm/reactions.d.ts +5 -5
  41. package/es/form/SchemaForm/reactions.js +20 -18
  42. package/es/form/fieldTypeMap.d.ts +4 -0
  43. package/es/form/fieldTypeMap.js +41 -0
  44. package/es/form/index.d.ts +92 -4
  45. package/es/form/index.js +18 -5
  46. package/es/form/schemaNameMap.js +3 -0
  47. package/es/form/typing.d.ts +44 -21
  48. package/es/form/utils.d.ts +3 -1
  49. package/es/form/utils.js +38 -1
  50. package/es/form/warning.d.ts +2 -2
  51. package/es/index.d.ts +1 -1
  52. package/es/index.js +1 -1
  53. package/es/info/components/InfoGroup/index.js +73 -15
  54. package/es/info/components/InfoGroup/index.scss +45 -3
  55. package/es/info/components/InfoValueItem/index.js +6 -4
  56. package/es/info/components/InfoValueItem/index.scss +5 -1
  57. package/es/info/components/ProInfoItem/index.js +3 -3
  58. package/es/info/components/ProInfoItem/index.scss +1 -0
  59. package/es/info/components/baseInfo/index.d.ts +2 -3
  60. package/es/info/components/headerInfo/index.d.ts +2 -3
  61. package/es/info/components/tableInfo/index.d.ts +2 -3
  62. package/es/info/components/tableInfo/index.js +2 -2
  63. package/es/info/index.js +52 -49
  64. package/es/info/typing.d.ts +52 -36
  65. package/es/info/utils/index.d.ts +2 -2
  66. package/es/info/utils/utils.d.ts +1 -1
  67. package/es/nocode/pages/renderer.js +2 -2
  68. package/es/page-header/index.d.ts +34 -21
  69. package/es/page-header/index.js +39 -30
  70. package/es/page-header/index.scss +2 -1
  71. package/es/table/components/EmptyContent/index.d.ts +2 -0
  72. package/es/table/components/EmptyContent/index.js +11 -0
  73. package/es/table/components/Filter/index.d.ts +2 -2
  74. package/es/table/components/Filter/index.js +16 -8
  75. package/es/table/components/Layout/index.js +2 -2
  76. package/es/table/components/QuickAction/index.d.ts +2 -2
  77. package/es/table/components/QuickAction/index.js +3 -3
  78. package/es/table/components/ToolBar/Fullscreen.js +1 -0
  79. package/es/table/index.js +76 -14
  80. package/es/table/index.scss +4 -0
  81. package/es/table/typing.d.ts +27 -14
  82. package/es/table/utils/columnRender.d.ts +3 -3
  83. package/es/table/utils/columnRender.js +2 -2
  84. package/es/table/utils/genProColumnToColumn.d.ts +2 -2
  85. package/es/table/utils/genProColumnToColumn.js +1 -1
  86. package/es/table/utils/index.js +33 -11
  87. package/es/templates/List/index.d.ts +2 -2
  88. package/es/utils/message.d.ts +3 -0
  89. package/es/utils/message.js +19 -0
  90. package/lib/actions/dialog-form.d.ts +5 -5
  91. package/lib/actions/dialog-form.js +1 -5
  92. package/lib/actions/dialog.d.ts +6 -3
  93. package/lib/actions/dialog.js +13 -5
  94. package/lib/actions/index.d.ts +54 -47
  95. package/lib/actions/index.js +37 -30
  96. package/lib/actions/index.scss +17 -2
  97. package/lib/card/index.d.ts +17 -5
  98. package/lib/card/index.js +18 -12
  99. package/lib/form/Components/ProField/index.d.ts +1 -78
  100. package/lib/form/Components/ProField/index.js +32 -38
  101. package/lib/form/Filter/index.js +2 -2
  102. package/lib/form/ProForm/index.d.ts +2 -2
  103. package/lib/form/ProForm/index.js +1 -7
  104. package/lib/form/ProForm/index.scss +19 -1
  105. package/lib/form/ProForm/useFieldRequest.d.ts +5 -0
  106. package/lib/form/ProForm/useFieldRequest.js +37 -0
  107. package/lib/form/SchemaForm/adapterDecorator.js +4 -2
  108. package/lib/form/SchemaForm/index.d.ts +2 -2
  109. package/lib/form/SchemaForm/index.js +11 -22
  110. package/lib/form/SchemaForm/initializeArrayCards.d.ts +2 -2
  111. package/lib/form/SchemaForm/initializeArrayCollapse.d.ts +2 -2
  112. package/lib/form/SchemaForm/initializeArrayItems.d.ts +2 -2
  113. package/lib/form/SchemaForm/initializeArrayTable.d.ts +2 -2
  114. package/lib/form/SchemaForm/initializeDataSource.d.ts +2 -2
  115. package/lib/form/SchemaForm/initializeDataSource.js +2 -2
  116. package/lib/form/SchemaForm/initializeFormButton.d.ts +2 -2
  117. package/lib/form/SchemaForm/initializeFormCollapse.d.ts +2 -2
  118. package/lib/form/SchemaForm/initializeFormGroup.d.ts +2 -2
  119. package/lib/form/SchemaForm/initializeFormStep.d.ts +3 -3
  120. package/lib/form/SchemaForm/initializeFormTab.d.ts +2 -2
  121. package/lib/form/SchemaForm/initializeRequest.d.ts +2 -2
  122. package/lib/form/SchemaForm/initializeRequest.js +1 -1
  123. package/lib/form/SchemaForm/initializeRules.js +41 -13
  124. package/lib/form/SchemaForm/reactions.d.ts +5 -5
  125. package/lib/form/SchemaForm/reactions.js +22 -20
  126. package/lib/form/fieldTypeMap.d.ts +4 -0
  127. package/lib/form/fieldTypeMap.js +48 -0
  128. package/lib/form/index.d.ts +92 -4
  129. package/lib/form/index.js +17 -31
  130. package/lib/form/schemaNameMap.js +3 -0
  131. package/lib/form/typing.d.ts +44 -21
  132. package/lib/form/utils.d.ts +3 -1
  133. package/lib/form/utils.js +43 -1
  134. package/lib/form/warning.d.ts +2 -2
  135. package/lib/index.d.ts +1 -1
  136. package/lib/index.js +1 -1
  137. package/lib/info/components/InfoGroup/index.js +76 -14
  138. package/lib/info/components/InfoGroup/index.scss +45 -3
  139. package/lib/info/components/InfoValueItem/index.js +5 -3
  140. package/lib/info/components/InfoValueItem/index.scss +5 -1
  141. package/lib/info/components/ProInfoItem/index.js +2 -2
  142. package/lib/info/components/ProInfoItem/index.scss +1 -0
  143. package/lib/info/components/baseInfo/index.d.ts +2 -3
  144. package/lib/info/components/headerInfo/index.d.ts +2 -3
  145. package/lib/info/components/tableInfo/index.d.ts +2 -3
  146. package/lib/info/components/tableInfo/index.js +1 -1
  147. package/lib/info/index.js +51 -48
  148. package/lib/info/typing.d.ts +52 -36
  149. package/lib/info/utils/index.d.ts +2 -2
  150. package/lib/info/utils/utils.d.ts +1 -1
  151. package/lib/nocode/pages/renderer.js +1 -1
  152. package/lib/page-header/index.d.ts +34 -21
  153. package/lib/page-header/index.js +37 -28
  154. package/lib/page-header/index.scss +2 -1
  155. package/lib/table/components/EmptyContent/index.d.ts +2 -0
  156. package/lib/table/components/EmptyContent/index.js +25 -0
  157. package/lib/table/components/Filter/index.d.ts +2 -2
  158. package/lib/table/components/Filter/index.js +16 -8
  159. package/lib/table/components/Layout/index.js +1 -1
  160. package/lib/table/components/QuickAction/index.d.ts +2 -2
  161. package/lib/table/components/QuickAction/index.js +1 -1
  162. package/lib/table/components/ToolBar/Fullscreen.js +1 -0
  163. package/lib/table/index.js +77 -14
  164. package/lib/table/index.scss +4 -0
  165. package/lib/table/typing.d.ts +27 -14
  166. package/lib/table/utils/columnRender.d.ts +3 -3
  167. package/lib/table/utils/columnRender.js +1 -1
  168. package/lib/table/utils/genProColumnToColumn.d.ts +2 -2
  169. package/lib/table/utils/genProColumnToColumn.js +2 -2
  170. package/lib/table/utils/index.js +33 -11
  171. package/lib/templates/List/index.d.ts +2 -2
  172. package/lib/utils/message.d.ts +3 -0
  173. package/lib/utils/message.js +32 -0
  174. package/package.json +4 -4
  175. package/es/form/Components/Search/index.d.ts +0 -11
  176. package/es/form/Components/Search/index.js +0 -89
  177. package/es/form/SchemaForm/initializeArrayIcon.d.ts +0 -3
  178. package/es/form/SchemaForm/initializeArrayIcon.js +0 -62
  179. package/es/form/SchemaForm/initializeProField.d.ts +0 -5
  180. package/es/form/SchemaForm/initializeProField.js +0 -70
  181. package/es/info/utils/useInfoRequest.d.ts +0 -14
  182. package/es/info/utils/useInfoRequest.js +0 -76
  183. package/lib/form/Components/Search/index.d.ts +0 -11
  184. package/lib/form/Components/Search/index.js +0 -103
  185. package/lib/form/SchemaForm/initializeArrayIcon.d.ts +0 -3
  186. package/lib/form/SchemaForm/initializeArrayIcon.js +0 -73
  187. package/lib/form/SchemaForm/initializeProField.d.ts +0 -5
  188. package/lib/form/SchemaForm/initializeProField.js +0 -77
  189. package/lib/info/utils/useInfoRequest.d.ts +0 -14
  190. package/lib/info/utils/useInfoRequest.js +0 -85
@@ -1,77 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.proFieldTypeMap = exports.default = void 0;
7
- var _excluded = ["component", "props"];
8
-
9
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
10
-
11
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
12
-
13
- 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; }
14
-
15
- 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; }
16
-
17
- 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; }
18
-
19
- var proFieldTypeMap = {
20
- Input: 'text',
21
- Password: 'password',
22
- TextArea: 'textArea',
23
- NumberPicker: 'number',
24
- Percent: 'percent',
25
- Money: 'money',
26
- Select: 'select',
27
- MultipleSelect: 'multipleSelect',
28
- TreeSelect: 'treeSelect',
29
- Cascader: 'cascader',
30
- MultipleCascader: 'multipleCascader',
31
- ArbitraryCascader: 'arbitraryCascader',
32
- Radio: 'radio',
33
- Checkbox: 'checkbox',
34
- Switch: 'switch',
35
- DatePicker: 'date',
36
- TimePicker: 'time',
37
- DateTimePicker: 'dateTime',
38
- WeekPicker: 'dateWeek',
39
- MonthPicker: 'dateMonth',
40
- YearPicker: 'dateYear',
41
- QuarterPicker: 'dateQuarter',
42
- DateRangePicker: 'dateRange',
43
- TimeRangePicker: 'timeRange',
44
- DateTimeRangePicker: 'dateTimeRange',
45
- WeekRangePicker: 'dateWeekRange',
46
- MonthRangePicker: 'dateMonthRange',
47
- YearRangePicker: 'dateYearRange',
48
- QuarterRangePicker: 'dateQuarterRange',
49
- Transfer: 'transfer',
50
- ColorPicker: 'color',
51
- ColorRadio: 'colorRadio',
52
- IconPicker: 'icon',
53
- JsonInput: 'json',
54
- TagPicker: 'tagPicker',
55
- MultipleTagPicker: 'multipleTagPicker',
56
- Range: 'range',
57
- Search: 'search' // Upload: 'upload',
58
-
59
- };
60
- exports.proFieldTypeMap = proFieldTypeMap;
61
-
62
- var initialize = function initialize(item) {
63
- var component = item.component,
64
- _item$props = item.props,
65
- props = _item$props === void 0 ? {} : _item$props,
66
- otherProps = _objectWithoutProperties(item, _excluded);
67
-
68
- return _objectSpread({
69
- component: 'ProField',
70
- props: _objectSpread({
71
- type: proFieldTypeMap[component]
72
- }, props)
73
- }, otherProps);
74
- };
75
-
76
- var _default = initialize;
77
- exports.default = _default;
@@ -1,14 +0,0 @@
1
- import { ProInfoBaseProps } from '../typing';
2
- interface IUseInfoRequest {
3
- url?: ProInfoBaseProps['url'];
4
- method?: ProInfoBaseProps['method'];
5
- params?: ProInfoBaseProps['params'];
6
- formatResult?: ProInfoBaseProps['formatResult'];
7
- }
8
- export declare type IUseInfoRequestResult = {
9
- loading: boolean;
10
- result: any;
11
- refresh?: () => void;
12
- };
13
- declare const useInfoRequest: (props: IUseInfoRequest) => IUseInfoRequestResult;
14
- export default useInfoRequest;
@@ -1,85 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _utils = require("@teamix/utils");
9
-
10
- var _react = require("react");
11
-
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
-
14
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
15
-
16
- 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."); }
17
-
18
- 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); }
19
-
20
- 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; }
21
-
22
- 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; }
23
-
24
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
25
-
26
- var useInfoRequest = function useInfoRequest(props) {
27
- var url = props.url,
28
- _props$method = props.method,
29
- method = _props$method === void 0 ? 'get' : _props$method,
30
- params = props.params,
31
- formatResult = props.formatResult;
32
- var requestDataKey = method.toLowerCase() === 'get' ? 'params' : 'data';
33
-
34
- var _useState = (0, _react.useState)(true),
35
- _useState2 = _slicedToArray(_useState, 2),
36
- loading = _useState2[0],
37
- setLoading = _useState2[1];
38
-
39
- var _useState3 = (0, _react.useState)({}),
40
- _useState4 = _slicedToArray(_useState3, 2),
41
- dataSource = _useState4[0],
42
- setDataSource = _useState4[1];
43
-
44
- (0, _react.useEffect)(function () {
45
- getData();
46
- }, []); // 获取数据
47
-
48
- var getData = function getData() {
49
- setLoading(true);
50
-
51
- if (url) {
52
- (0, _utils.request)(_defineProperty({
53
- url: url,
54
- method: method
55
- }, requestDataKey, params)).then(function (resp) {
56
- if (typeof formatResult === 'function') {
57
- setDataSource(formatResult === null || formatResult === void 0 ? void 0 : formatResult(resp));
58
- } else if (formatResult) {
59
- setDataSource((0, _utils.getTargetValue)("{{".concat(formatResult.data, "}}"), resp));
60
- } else {
61
- setDataSource(resp);
62
- }
63
- }).catch(function () {// TODO 待处理
64
- }).finally(function () {
65
- setLoading(false);
66
- });
67
- } else {
68
- setLoading(false);
69
- }
70
- }; // 刷新数据
71
-
72
-
73
- var refresh = function refresh() {
74
- getData();
75
- };
76
-
77
- return {
78
- loading: loading,
79
- result: dataSource,
80
- refresh: refresh
81
- };
82
- };
83
-
84
- var _default = useInfoRequest;
85
- exports.default = _default;