@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.
- package/dist/212.js +798 -766
- package/dist/pro.css +1 -1
- package/dist/pro.js +1668 -1751
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/es/actions/dialog-component.js +2 -2
- package/es/actions/dialog-form.js +2 -2
- package/es/actions/dialog.js +5 -3
- package/es/actions/index.d.ts +2 -0
- package/es/actions/index.js +30 -16
- package/es/actions/link.js +2 -2
- package/es/actions/request.js +2 -2
- package/es/actions/utils.js +2 -2
- package/es/card/card-container.js +2 -2
- package/es/card/divider.js +2 -2
- package/es/card/index.d.ts +6 -3
- package/es/card/index.js +11 -6
- package/es/card/index.scss +4 -0
- package/es/card/selectable.js +2 -2
- package/es/card/tab.js +2 -2
- package/es/form/Components/Editable/index.js +2 -2
- package/es/form/Components/FormGroup/index.js +2 -2
- package/es/form/Components/LightFilter/componentMap.d.ts +2 -0
- package/es/form/Components/LightFilter/componentMap.js +5 -0
- package/es/form/Components/LightFilter/index.d.ts +15 -0
- package/es/form/Components/{QueryFilter → LightFilter}/index.js +45 -44
- package/es/form/Components/LightFilter/index.scss +74 -0
- package/es/form/Components/ProField/index.js +2 -2
- package/es/form/Components/Text/index.js +2 -2
- package/es/form/Filter/index.js +4 -4
- package/es/form/Filter/index.scss +0 -46
- package/es/form/Filter/index2.d.ts +1 -1
- package/es/form/Filter/index2.js +163 -115
- package/es/form/Filter/index2.scss +73 -0
- package/es/form/ProForm/index.js +3 -2
- package/es/form/ProForm/index.scss +9 -9
- package/es/form/ProForm/useAutoSubmit.js +2 -2
- package/es/form/ProForm/useFieldRequest.js +2 -2
- package/es/form/ProForm/useFormDisplayValues.js +46 -15
- package/es/form/ProForm/useInitialRequest.js +2 -2
- package/es/form/SchemaForm/adapterType.js +1 -0
- package/es/form/SchemaForm/index.js +5 -5
- package/es/form/SchemaForm/initializeArrayCards.js +2 -2
- package/es/form/SchemaForm/initializeArrayCollapse.js +2 -2
- package/es/form/SchemaForm/initializeArrayItems.js +2 -2
- package/es/form/SchemaForm/initializeArrayTable.js +2 -2
- package/es/form/SchemaForm/initializeFormButton.js +2 -2
- package/es/form/SchemaForm/initializeFormCollapse.js +2 -2
- package/es/form/SchemaForm/initializeFormGroup.js +2 -2
- package/es/form/SchemaForm/initializeFormStep.js +2 -2
- package/es/form/SchemaForm/initializeFormTab.js +2 -2
- package/es/form/SchemaForm/initializeReactions.js +2 -2
- package/es/form/SchemaForm/initializeRules.js +2 -2
- package/es/form/SchemaForm/reactions.js +4 -8
- package/es/form/fieldTypeMap.js +1 -0
- package/es/form/global.scss +1 -0
- package/es/form/index.d.ts +9 -9
- package/es/form/index.js +2 -2
- package/es/form/typing.d.ts +6 -0
- package/es/form/utils.js +2 -2
- package/es/form/warning.js +2 -2
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/info/components/InfoGroup/index.js +2 -2
- package/es/info/components/InfoValueItem/index.js +2 -2
- package/es/info/components/tableInfo/index.js +2 -2
- package/es/info/index.js +2 -2
- package/es/info/utils/index.js +2 -2
- package/es/nocode/configurators/ProTable.js +1 -0
- package/es/nocode/pages/playground.js +2 -2
- package/es/nocode/pages/renderer.js +5 -5
- package/es/nocode/playground.js +2 -2
- package/es/page-header/index.d.ts +1 -2
- package/es/page-header/index.js +4 -14
- package/es/sidebar/components/sidebar-container/index.js +2 -2
- package/es/sidebar/components/tree/index.js +2 -2
- package/es/sidebar/index.js +2 -2
- package/es/table/components/Filter/index.js +44 -18
- package/es/table/components/Layout/index.js +3 -3
- package/es/table/components/QuickAction/index.js +3 -3
- package/es/table/components/ToolBar/FilterColumnIcon.js +54 -19
- package/es/table/components/ToolBar/index.js +2 -2
- package/es/table/components/ToolBar/index.scss +1 -0
- package/es/table/index.js +11 -4
- package/es/table/typing.d.ts +6 -2
- package/es/table/utils/columnRender.js +29 -8
- package/es/table/utils/genProColumnToColumn.js +2 -2
- package/es/table/utils/index.js +9 -3
- package/es/table/utils/useTableSelection.js +2 -2
- package/es/templates/List/index.js +2 -2
- package/es/utils/message.d.ts +1 -1
- package/es/utils/message.js +9 -9
- package/lib/actions/dialog-component.js +2 -2
- package/lib/actions/dialog-form.js +3 -3
- package/lib/actions/dialog.js +6 -4
- package/lib/actions/index.d.ts +2 -0
- package/lib/actions/index.js +30 -16
- package/lib/actions/link.js +2 -2
- package/lib/actions/request.js +2 -2
- package/lib/actions/utils.js +2 -2
- package/lib/card/card-container.js +2 -2
- package/lib/card/divider.js +2 -2
- package/lib/card/index.d.ts +6 -3
- package/lib/card/index.js +11 -6
- package/lib/card/index.scss +4 -0
- package/lib/card/selectable.js +2 -2
- package/lib/card/tab.js +2 -2
- package/lib/field/index.js +1 -1
- package/lib/form/Components/Editable/index.js +3 -3
- package/lib/form/Components/FormGroup/index.js +2 -2
- package/lib/form/Components/LightFilter/componentMap.d.ts +2 -0
- package/lib/form/Components/LightFilter/componentMap.js +12 -0
- package/lib/form/Components/LightFilter/index.d.ts +15 -0
- package/lib/form/Components/{QueryFilter → LightFilter}/index.js +50 -44
- package/lib/form/Components/LightFilter/index.scss +74 -0
- package/lib/form/Components/ProField/index.js +2 -2
- package/lib/form/Components/Text/index.js +2 -2
- package/lib/form/Filter/index.js +5 -5
- package/lib/form/Filter/index.scss +0 -46
- package/lib/form/Filter/index2.d.ts +1 -1
- package/lib/form/Filter/index2.js +165 -115
- package/lib/form/Filter/index2.scss +73 -0
- package/lib/form/ProForm/index.js +4 -3
- package/lib/form/ProForm/index.scss +9 -9
- package/lib/form/ProForm/useAutoSubmit.js +2 -2
- package/lib/form/ProForm/useFieldRequest.js +2 -2
- package/lib/form/ProForm/useFormDisplayValues.js +47 -15
- package/lib/form/ProForm/useInitialRequest.js +2 -2
- package/lib/form/SchemaForm/adapterType.js +1 -0
- package/lib/form/SchemaForm/index.js +6 -6
- package/lib/form/SchemaForm/initializeArrayCards.js +2 -2
- package/lib/form/SchemaForm/initializeArrayCollapse.js +2 -2
- package/lib/form/SchemaForm/initializeArrayItems.js +2 -2
- package/lib/form/SchemaForm/initializeArrayTable.js +2 -2
- package/lib/form/SchemaForm/initializeFormButton.js +2 -2
- package/lib/form/SchemaForm/initializeFormCollapse.js +2 -2
- package/lib/form/SchemaForm/initializeFormGroup.js +2 -2
- package/lib/form/SchemaForm/initializeFormStep.js +2 -2
- package/lib/form/SchemaForm/initializeFormTab.js +2 -2
- package/lib/form/SchemaForm/initializeReactions.js +2 -2
- package/lib/form/SchemaForm/initializeRules.js +2 -2
- package/lib/form/SchemaForm/reactions.js +3 -7
- package/lib/form/fieldTypeMap.js +1 -0
- package/lib/form/global.scss +1 -0
- package/lib/form/index.d.ts +9 -9
- package/lib/form/index.js +3 -3
- package/lib/form/typing.d.ts +6 -0
- package/lib/form/utils.js +2 -2
- package/lib/form/warning.js +2 -2
- package/lib/hooks/index.js +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -2
- package/lib/info/components/InfoGroup/index.js +3 -3
- package/lib/info/components/InfoValueItem/index.js +3 -3
- package/lib/info/components/tableInfo/index.js +3 -3
- package/lib/info/index.js +3 -3
- package/lib/info/utils/index.js +2 -2
- package/lib/nocode/configurators/ProTable.js +1 -0
- package/lib/nocode/configurators/index.js +1 -1
- package/lib/nocode/pages/playground.js +3 -3
- package/lib/nocode/pages/renderer.js +5 -5
- package/lib/nocode/playground.js +3 -3
- package/lib/page-container/index.js +1 -1
- package/lib/page-header/index.d.ts +1 -2
- package/lib/page-header/index.js +6 -17
- package/lib/sidebar/components/sidebar-container/index.js +2 -2
- package/lib/sidebar/components/tree/index.js +3 -3
- package/lib/sidebar/index.js +3 -3
- package/lib/skeleton/index.js +1 -1
- package/lib/table/components/Filter/index.js +45 -19
- package/lib/table/components/Layout/index.js +3 -3
- package/lib/table/components/QuickAction/index.js +3 -3
- package/lib/table/components/ToolBar/DensityIcon.js +1 -1
- package/lib/table/components/ToolBar/FilterColumnIcon.js +55 -20
- package/lib/table/components/ToolBar/FullScreenIcon.js +1 -1
- package/lib/table/components/ToolBar/Fullscreen.js +1 -1
- package/lib/table/components/ToolBar/index.js +2 -2
- package/lib/table/components/ToolBar/index.scss +1 -0
- package/lib/table/index.js +11 -4
- package/lib/table/typing.d.ts +6 -2
- package/lib/table/utils/columnRender.js +29 -8
- package/lib/table/utils/genProColumnToColumn.js +2 -2
- package/lib/table/utils/index.js +9 -3
- package/lib/table/utils/useTableSelection.js +2 -2
- package/lib/templates/List/index.js +3 -3
- package/lib/utils/index.js +1 -1
- package/lib/utils/message.d.ts +1 -1
- package/lib/utils/message.js +9 -9
- package/package.json +2 -2
- package/es/form/Components/Query/index.d.ts +0 -4
- package/es/form/Components/Query/index.js +0 -70
- package/es/form/Components/Query/index.scss +0 -85
- package/es/form/Components/QueryFilter/index.d.ts +0 -3
- package/es/utils/components/tags/index.d.ts +0 -15
- package/es/utils/components/tags/index.js +0 -94
- package/es/utils/components/tags/index.scss +0 -12
- package/lib/form/Components/Query/index.d.ts +0 -4
- package/lib/form/Components/Query/index.js +0 -91
- package/lib/form/Components/Query/index.scss +0 -85
- package/lib/form/Components/QueryFilter/index.d.ts +0 -3
- package/lib/utils/components/tags/index.d.ts +0 -15
- package/lib/utils/components/tags/index.js +0 -114
- 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;
|