@teamix/pro 1.2.13 → 1.2.17

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 (203) hide show
  1. package/dist/212.js +798 -766
  2. package/dist/pro.css +1 -1
  3. package/dist/pro.js +1668 -1751
  4. package/dist/pro.min.css +1 -1
  5. package/dist/pro.min.js +1 -1
  6. package/es/actions/dialog-component.js +2 -2
  7. package/es/actions/dialog-form.js +2 -2
  8. package/es/actions/dialog.js +5 -3
  9. package/es/actions/index.d.ts +2 -0
  10. package/es/actions/index.js +30 -16
  11. package/es/actions/link.js +2 -2
  12. package/es/actions/request.js +2 -2
  13. package/es/actions/utils.js +2 -2
  14. package/es/card/card-container.js +2 -2
  15. package/es/card/divider.js +2 -2
  16. package/es/card/index.d.ts +6 -3
  17. package/es/card/index.js +11 -6
  18. package/es/card/index.scss +4 -0
  19. package/es/card/selectable.js +2 -2
  20. package/es/card/tab.js +2 -2
  21. package/es/form/Components/Editable/index.js +2 -2
  22. package/es/form/Components/FormGroup/index.js +2 -2
  23. package/es/form/Components/LightFilter/componentMap.d.ts +2 -0
  24. package/es/form/Components/LightFilter/componentMap.js +5 -0
  25. package/es/form/Components/LightFilter/index.d.ts +15 -0
  26. package/es/form/Components/{QueryFilter → LightFilter}/index.js +45 -44
  27. package/es/form/Components/LightFilter/index.scss +74 -0
  28. package/es/form/Components/ProField/index.js +2 -2
  29. package/es/form/Components/Text/index.js +2 -2
  30. package/es/form/Filter/index.js +4 -4
  31. package/es/form/Filter/index.scss +0 -46
  32. package/es/form/Filter/index2.d.ts +1 -1
  33. package/es/form/Filter/index2.js +163 -115
  34. package/es/form/Filter/index2.scss +73 -0
  35. package/es/form/ProForm/index.js +3 -2
  36. package/es/form/ProForm/index.scss +9 -9
  37. package/es/form/ProForm/useAutoSubmit.js +2 -2
  38. package/es/form/ProForm/useFieldRequest.js +2 -2
  39. package/es/form/ProForm/useFormDisplayValues.js +46 -15
  40. package/es/form/ProForm/useInitialRequest.js +2 -2
  41. package/es/form/SchemaForm/adapterType.js +1 -0
  42. package/es/form/SchemaForm/index.js +5 -5
  43. package/es/form/SchemaForm/initializeArrayCards.js +2 -2
  44. package/es/form/SchemaForm/initializeArrayCollapse.js +2 -2
  45. package/es/form/SchemaForm/initializeArrayItems.js +2 -2
  46. package/es/form/SchemaForm/initializeArrayTable.js +2 -2
  47. package/es/form/SchemaForm/initializeFormButton.js +2 -2
  48. package/es/form/SchemaForm/initializeFormCollapse.js +2 -2
  49. package/es/form/SchemaForm/initializeFormGroup.js +2 -2
  50. package/es/form/SchemaForm/initializeFormStep.js +2 -2
  51. package/es/form/SchemaForm/initializeFormTab.js +2 -2
  52. package/es/form/SchemaForm/initializeReactions.js +2 -2
  53. package/es/form/SchemaForm/initializeRules.js +2 -2
  54. package/es/form/SchemaForm/reactions.js +4 -8
  55. package/es/form/fieldTypeMap.js +1 -0
  56. package/es/form/global.scss +1 -0
  57. package/es/form/index.d.ts +9 -9
  58. package/es/form/index.js +2 -2
  59. package/es/form/typing.d.ts +6 -0
  60. package/es/form/utils.js +2 -2
  61. package/es/form/warning.js +2 -2
  62. package/es/index.d.ts +1 -1
  63. package/es/index.js +1 -1
  64. package/es/info/components/InfoGroup/index.js +2 -2
  65. package/es/info/components/InfoValueItem/index.js +2 -2
  66. package/es/info/components/tableInfo/index.js +2 -2
  67. package/es/info/index.js +2 -2
  68. package/es/info/utils/index.js +2 -2
  69. package/es/nocode/configurators/ProTable.js +1 -0
  70. package/es/nocode/pages/playground.js +2 -2
  71. package/es/nocode/pages/renderer.js +5 -5
  72. package/es/nocode/playground.js +2 -2
  73. package/es/page-header/index.d.ts +1 -2
  74. package/es/page-header/index.js +4 -14
  75. package/es/sidebar/components/sidebar-container/index.js +2 -2
  76. package/es/sidebar/components/tree/index.js +2 -2
  77. package/es/sidebar/index.js +2 -2
  78. package/es/table/components/Filter/index.js +44 -18
  79. package/es/table/components/Layout/index.js +3 -3
  80. package/es/table/components/QuickAction/index.js +3 -3
  81. package/es/table/components/ToolBar/FilterColumnIcon.js +54 -19
  82. package/es/table/components/ToolBar/index.js +2 -2
  83. package/es/table/components/ToolBar/index.scss +1 -0
  84. package/es/table/index.js +11 -4
  85. package/es/table/typing.d.ts +6 -2
  86. package/es/table/utils/columnRender.js +29 -8
  87. package/es/table/utils/genProColumnToColumn.js +2 -2
  88. package/es/table/utils/index.js +9 -3
  89. package/es/table/utils/useTableSelection.js +2 -2
  90. package/es/templates/List/index.js +2 -2
  91. package/es/utils/message.d.ts +1 -1
  92. package/es/utils/message.js +9 -9
  93. package/lib/actions/dialog-component.js +2 -2
  94. package/lib/actions/dialog-form.js +3 -3
  95. package/lib/actions/dialog.js +6 -4
  96. package/lib/actions/index.d.ts +2 -0
  97. package/lib/actions/index.js +30 -16
  98. package/lib/actions/link.js +2 -2
  99. package/lib/actions/request.js +2 -2
  100. package/lib/actions/utils.js +2 -2
  101. package/lib/card/card-container.js +2 -2
  102. package/lib/card/divider.js +2 -2
  103. package/lib/card/index.d.ts +6 -3
  104. package/lib/card/index.js +11 -6
  105. package/lib/card/index.scss +4 -0
  106. package/lib/card/selectable.js +2 -2
  107. package/lib/card/tab.js +2 -2
  108. package/lib/field/index.js +1 -1
  109. package/lib/form/Components/Editable/index.js +3 -3
  110. package/lib/form/Components/FormGroup/index.js +2 -2
  111. package/lib/form/Components/LightFilter/componentMap.d.ts +2 -0
  112. package/lib/form/Components/LightFilter/componentMap.js +12 -0
  113. package/lib/form/Components/LightFilter/index.d.ts +15 -0
  114. package/lib/form/Components/{QueryFilter → LightFilter}/index.js +50 -44
  115. package/lib/form/Components/LightFilter/index.scss +74 -0
  116. package/lib/form/Components/ProField/index.js +2 -2
  117. package/lib/form/Components/Text/index.js +2 -2
  118. package/lib/form/Filter/index.js +5 -5
  119. package/lib/form/Filter/index.scss +0 -46
  120. package/lib/form/Filter/index2.d.ts +1 -1
  121. package/lib/form/Filter/index2.js +165 -115
  122. package/lib/form/Filter/index2.scss +73 -0
  123. package/lib/form/ProForm/index.js +4 -3
  124. package/lib/form/ProForm/index.scss +9 -9
  125. package/lib/form/ProForm/useAutoSubmit.js +2 -2
  126. package/lib/form/ProForm/useFieldRequest.js +2 -2
  127. package/lib/form/ProForm/useFormDisplayValues.js +47 -15
  128. package/lib/form/ProForm/useInitialRequest.js +2 -2
  129. package/lib/form/SchemaForm/adapterType.js +1 -0
  130. package/lib/form/SchemaForm/index.js +6 -6
  131. package/lib/form/SchemaForm/initializeArrayCards.js +2 -2
  132. package/lib/form/SchemaForm/initializeArrayCollapse.js +2 -2
  133. package/lib/form/SchemaForm/initializeArrayItems.js +2 -2
  134. package/lib/form/SchemaForm/initializeArrayTable.js +2 -2
  135. package/lib/form/SchemaForm/initializeFormButton.js +2 -2
  136. package/lib/form/SchemaForm/initializeFormCollapse.js +2 -2
  137. package/lib/form/SchemaForm/initializeFormGroup.js +2 -2
  138. package/lib/form/SchemaForm/initializeFormStep.js +2 -2
  139. package/lib/form/SchemaForm/initializeFormTab.js +2 -2
  140. package/lib/form/SchemaForm/initializeReactions.js +2 -2
  141. package/lib/form/SchemaForm/initializeRules.js +2 -2
  142. package/lib/form/SchemaForm/reactions.js +3 -7
  143. package/lib/form/fieldTypeMap.js +1 -0
  144. package/lib/form/global.scss +1 -0
  145. package/lib/form/index.d.ts +9 -9
  146. package/lib/form/index.js +3 -3
  147. package/lib/form/typing.d.ts +6 -0
  148. package/lib/form/utils.js +2 -2
  149. package/lib/form/warning.js +2 -2
  150. package/lib/hooks/index.js +1 -1
  151. package/lib/index.d.ts +1 -1
  152. package/lib/index.js +2 -2
  153. package/lib/info/components/InfoGroup/index.js +3 -3
  154. package/lib/info/components/InfoValueItem/index.js +3 -3
  155. package/lib/info/components/tableInfo/index.js +3 -3
  156. package/lib/info/index.js +3 -3
  157. package/lib/info/utils/index.js +2 -2
  158. package/lib/nocode/configurators/ProTable.js +1 -0
  159. package/lib/nocode/configurators/index.js +1 -1
  160. package/lib/nocode/pages/playground.js +3 -3
  161. package/lib/nocode/pages/renderer.js +5 -5
  162. package/lib/nocode/playground.js +3 -3
  163. package/lib/page-container/index.js +1 -1
  164. package/lib/page-header/index.d.ts +1 -2
  165. package/lib/page-header/index.js +6 -17
  166. package/lib/sidebar/components/sidebar-container/index.js +2 -2
  167. package/lib/sidebar/components/tree/index.js +3 -3
  168. package/lib/sidebar/index.js +3 -3
  169. package/lib/skeleton/index.js +1 -1
  170. package/lib/table/components/Filter/index.js +45 -19
  171. package/lib/table/components/Layout/index.js +3 -3
  172. package/lib/table/components/QuickAction/index.js +3 -3
  173. package/lib/table/components/ToolBar/DensityIcon.js +1 -1
  174. package/lib/table/components/ToolBar/FilterColumnIcon.js +55 -20
  175. package/lib/table/components/ToolBar/FullScreenIcon.js +1 -1
  176. package/lib/table/components/ToolBar/Fullscreen.js +1 -1
  177. package/lib/table/components/ToolBar/index.js +2 -2
  178. package/lib/table/components/ToolBar/index.scss +1 -0
  179. package/lib/table/index.js +11 -4
  180. package/lib/table/typing.d.ts +6 -2
  181. package/lib/table/utils/columnRender.js +29 -8
  182. package/lib/table/utils/genProColumnToColumn.js +2 -2
  183. package/lib/table/utils/index.js +9 -3
  184. package/lib/table/utils/useTableSelection.js +2 -2
  185. package/lib/templates/List/index.js +3 -3
  186. package/lib/utils/index.js +1 -1
  187. package/lib/utils/message.d.ts +1 -1
  188. package/lib/utils/message.js +9 -9
  189. package/package.json +2 -2
  190. package/es/form/Components/Query/index.d.ts +0 -4
  191. package/es/form/Components/Query/index.js +0 -70
  192. package/es/form/Components/Query/index.scss +0 -85
  193. package/es/form/Components/QueryFilter/index.d.ts +0 -3
  194. package/es/utils/components/tags/index.d.ts +0 -15
  195. package/es/utils/components/tags/index.js +0 -94
  196. package/es/utils/components/tags/index.scss +0 -12
  197. package/lib/form/Components/Query/index.d.ts +0 -4
  198. package/lib/form/Components/Query/index.js +0 -91
  199. package/lib/form/Components/Query/index.scss +0 -85
  200. package/lib/form/Components/QueryFilter/index.d.ts +0 -3
  201. package/lib/utils/components/tags/index.d.ts +0 -15
  202. package/lib/utils/components/tags/index.js +0 -114
  203. package/lib/utils/components/tags/index.scss +0 -12
@@ -1,114 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.renderTags = void 0;
9
-
10
- var _react = _interopRequireWildcard(require("react"));
11
-
12
- var _components = require("@alicloudfe/components");
13
-
14
- var _src = require("../../../../../utils/src");
15
-
16
- require("./index.scss");
17
-
18
- var _excluded = ["text", "children", "closable", "color"];
19
-
20
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
21
-
22
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
-
24
- 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; }
25
-
26
- 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; }
27
-
28
- 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; }
29
-
30
- 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; }
31
-
32
- 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; }
33
-
34
- var cls = (0, _src.baseClass)('teamix-pro-tags');
35
-
36
- var renderTags = function renderTags(tags, size) {
37
- if (!tags || Array.isArray(tags) && !tags.length) {
38
- return null;
39
- } // 获取全局 tag
40
-
41
-
42
- var getGlobalTag = function getGlobalTag() {
43
- var globalTag = (0, _src.getGlobalConfig)('tag'); // GlobalTagNodePropsItem 类型
44
-
45
- if (globalTag) {
46
- var globalTagMap = new Map(globalTag.map(function (item) {
47
- return [item.color, item];
48
- }));
49
- return globalTagMap;
50
- }
51
-
52
- return null;
53
- }; // 渲染单个 tag
54
-
55
-
56
- var renderTag = function renderTag(item, index) {
57
- // @ts-ignore
58
- var text = item.text,
59
- children = item.children,
60
- closable = item.closable,
61
- colorProps = item.color,
62
- others = _objectWithoutProperties(item, _excluded);
63
-
64
- var color = (0, _src.getTagColor)(colorProps !== null && colorProps !== void 0 ? colorProps : '', 'tag');
65
- var otherProps = {};
66
- var globalTagMap = getGlobalTag();
67
-
68
- if (globalTagMap && globalTagMap.get(color)) {
69
- var _globalTagMap$get;
70
-
71
- otherProps = (_globalTagMap$get = globalTagMap.get(color)) !== null && _globalTagMap$get !== void 0 ? _globalTagMap$get : {};
72
- }
73
-
74
- if (closable) {
75
- return /*#__PURE__*/_react.default.createElement(_components.Tag.Closeable, _objectSpread(_objectSpread({
76
- key: index,
77
- size: size,
78
- style: {
79
- marginBottom: 0
80
- },
81
- color: color
82
- }, otherProps), others), text || children);
83
- }
84
-
85
- return /*#__PURE__*/_react.default.createElement(_components.Tag, _objectSpread(_objectSpread({
86
- key: index,
87
- size: size,
88
- style: {
89
- marginBottom: 0
90
- },
91
- color: color
92
- }, otherProps), others), text || children);
93
- };
94
-
95
- if (!Array.isArray(tags)) {
96
- if ( /*#__PURE__*/(0, _react.isValidElement)(tags)) {
97
- return tags;
98
- }
99
-
100
- return renderTag(tags, 0);
101
- }
102
-
103
- return /*#__PURE__*/_react.default.createElement(_components.Tag.Group, {
104
- className: cls('')
105
- }, tags.map(function (tag, i) {
106
- if ( /*#__PURE__*/(0, _react.isValidElement)(tags)) {
107
- return tags;
108
- }
109
-
110
- return renderTag(tag, i);
111
- }));
112
- };
113
-
114
- exports.renderTags = renderTags;
@@ -1,12 +0,0 @@
1
- .teamix-pro-tags {
2
- display: inline-flex;
3
- align-items: center;
4
-
5
- & > div.next-tag {
6
- margin-right: var(--s-2, 8px);
7
-
8
- &:last-child {
9
- margin-right: 0;
10
- }
11
- }
12
- }