@teamix/pro 1.2.12 → 1.2.16
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 +1851 -1863
- 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.js +11 -7
- 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.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/ProInfoItem/index.js +3 -1
- 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/pages/playground.js +2 -2
- package/es/nocode/pages/renderer.d.ts +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 +2 -2
- 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 +29 -11
- package/es/table/typing.d.ts +11 -1
- package/es/table/utils/columnRender.js +61 -3
- package/es/table/utils/genProColumnToColumn.js +2 -2
- package/es/table/utils/index.js +24 -4
- 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.js +11 -7
- 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.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/ProInfoItem/index.js +3 -1
- 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/index.js +1 -1
- package/lib/nocode/pages/playground.js +3 -3
- package/lib/nocode/pages/renderer.d.ts +2 -2
- 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 +3 -3
- 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 +29 -11
- package/lib/table/typing.d.ts +11 -1
- package/lib/table/utils/columnRender.js +61 -3
- package/lib/table/utils/genProColumnToColumn.js +2 -2
- package/lib/table/utils/index.js +24 -4
- 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 -11
- package/es/utils/components/tags/index.js +0 -50
- 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 -11
- package/lib/utils/components/tags/index.js +0 -66
- package/lib/utils/components/tags/index.scss +0 -12
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
4
4
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
6
6
|
value: true
|
@@ -11,9 +11,17 @@ var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
12
12
|
var _react2 = require("@formily/react");
|
13
13
|
|
14
|
+
var _components = require("@alicloudfe/components");
|
15
|
+
|
16
|
+
var _icon = _interopRequireDefault(require("@teamix/icon"));
|
17
|
+
|
18
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
19
|
+
|
14
20
|
var _utils = require("@teamix/utils");
|
15
21
|
|
16
|
-
var
|
22
|
+
var _componentMap = _interopRequireDefault(require("./componentMap"));
|
23
|
+
|
24
|
+
require("./index.scss");
|
17
25
|
|
18
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
19
27
|
|
@@ -33,36 +41,31 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
33
41
|
|
34
42
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
35
43
|
|
36
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
44
|
+
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; }
|
37
45
|
|
38
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
46
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
39
47
|
|
40
48
|
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; }
|
41
49
|
|
42
|
-
|
43
|
-
if ((0, _utils.isArr)(v)) {
|
44
|
-
return v.length !== 0;
|
45
|
-
}
|
46
|
-
|
47
|
-
return v !== undefined && v !== null;
|
48
|
-
}; // 主激活区
|
49
|
-
|
50
|
-
|
50
|
+
// 主激活区内容
|
51
51
|
var useMain = function useMain(active) {
|
52
52
|
var schema = (0, _react2.useFieldSchema)();
|
53
53
|
var main = [];
|
54
54
|
schema.mapProperties(function (schema, name) {
|
55
|
+
// console.log(schema.required); // 添加 *
|
56
|
+
// console.log(schema);
|
55
57
|
if (schema.name === active) {
|
56
58
|
main.push({
|
57
59
|
name: name,
|
58
60
|
schema: _objectSpread(_objectSpread({}, schema), {}, {
|
59
|
-
title: ''
|
61
|
+
title: '',
|
62
|
+
'x-component': _componentMap.default[schema['x-component']] || schema['x-component']
|
60
63
|
})
|
61
64
|
});
|
62
65
|
}
|
63
66
|
});
|
64
67
|
return main;
|
65
|
-
}; //
|
68
|
+
}; // 筛选项数据
|
66
69
|
|
67
70
|
|
68
71
|
var useFilterItems = function useFilterItems() {
|
@@ -75,38 +78,29 @@ var useFilterItems = function useFilterItems() {
|
|
75
78
|
});
|
76
79
|
});
|
77
80
|
return filterItems;
|
78
|
-
};
|
81
|
+
};
|
79
82
|
|
83
|
+
var LightFilter = (0, _react2.observer)(function (props) {
|
84
|
+
var _filterItems$;
|
80
85
|
|
81
|
-
var
|
82
|
-
var queryField = (0, _react2.useField)();
|
86
|
+
var field = (0, _react2.useField)();
|
83
87
|
var schema = (0, _react2.useFieldSchema)();
|
84
|
-
var
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
values.push({
|
90
|
-
key: schema.name,
|
91
|
-
title: schema.title,
|
92
|
-
content: field.value
|
93
|
-
});
|
94
|
-
}
|
95
|
-
});
|
96
|
-
return values;
|
97
|
-
};
|
88
|
+
var filterItems = useFilterItems();
|
89
|
+
var size = props.size,
|
90
|
+
defaultFilterValue = props.defaultFilterValue,
|
91
|
+
filterProps = props.filterProps,
|
92
|
+
buttonProps = props.buttonProps;
|
98
93
|
|
99
|
-
var
|
100
|
-
var _useState = (0, _react.useState)(),
|
94
|
+
var _useState = (0, _react.useState)(defaultFilterValue || ((_filterItems$ = filterItems[0]) === null || _filterItems$ === void 0 ? void 0 : _filterItems$.value)),
|
101
95
|
_useState2 = _slicedToArray(_useState, 2),
|
102
96
|
active = _useState2[0],
|
103
97
|
setActive = _useState2[1];
|
104
98
|
|
105
|
-
var field = (0, _react2.useField)();
|
106
|
-
var schema = (0, _react2.useFieldSchema)();
|
107
99
|
var main = useMain(active);
|
108
|
-
var
|
109
|
-
var
|
100
|
+
var defaultCls = (0, _utils.usePrefixCls)();
|
101
|
+
var prefixCls = (0, _utils.usePrefixCls)('', {
|
102
|
+
prefix: 'teamix-pro-form-light-filter'
|
103
|
+
});
|
110
104
|
var content = main.map(function (_ref, key) {
|
111
105
|
var schema = _ref.schema,
|
112
106
|
name = _ref.name;
|
@@ -119,11 +113,23 @@ var QueryFilter = (0, _react2.observer)(function (props) {
|
|
119
113
|
}
|
120
114
|
});
|
121
115
|
});
|
122
|
-
return /*#__PURE__*/_react.default.createElement(
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
},
|
116
|
+
return /*#__PURE__*/_react.default.createElement("span", {
|
117
|
+
className: (0, _classnames.default)(prefixCls, "".concat(defaultCls).concat(size))
|
118
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
119
|
+
className: "".concat(prefixCls, "-main")
|
120
|
+
}, /*#__PURE__*/_react.default.createElement(_components.Select, _objectSpread(_objectSpread({}, filterProps), {}, {
|
121
|
+
className: (0, _classnames.default)("".concat(prefixCls, "-select"), filterProps === null || filterProps === void 0 ? void 0 : filterProps.className),
|
122
|
+
dataSource: filterItems,
|
123
|
+
onChange: setActive,
|
124
|
+
value: active
|
125
|
+
})), content), /*#__PURE__*/_react.default.createElement("span", {
|
126
|
+
className: "".concat(prefixCls, "-addonAfter")
|
127
|
+
}, /*#__PURE__*/_react.default.createElement(_components.Button, _objectSpread({}, buttonProps), /*#__PURE__*/_react.default.createElement(_icon.default, {
|
128
|
+
type: "search-line"
|
129
|
+
}))));
|
127
130
|
});
|
128
|
-
|
131
|
+
LightFilter.defaultProps = {
|
132
|
+
size: 'medium'
|
133
|
+
};
|
134
|
+
var _default = LightFilter;
|
129
135
|
exports.default = _default;
|
@@ -0,0 +1,74 @@
|
|
1
|
+
@import '../../global.scss';
|
2
|
+
|
3
|
+
$light-filter: #{teamix-pro-form}-light-filter;
|
4
|
+
|
5
|
+
// LightFilter
|
6
|
+
.#{$light-filter} {
|
7
|
+
display: flex;
|
8
|
+
width: 100%;
|
9
|
+
height: var(--search-normal-normal-m-height, 32px);
|
10
|
+
transition: box-shadow var(--active-transition);
|
11
|
+
&:hover,
|
12
|
+
&:focus {
|
13
|
+
box-shadow: var(--active-shadow);
|
14
|
+
border-color: var(--input-focus-border-color, #ababab);
|
15
|
+
}
|
16
|
+
.#{$light-filter}-main {
|
17
|
+
display: flex;
|
18
|
+
box-sizing: border-box;
|
19
|
+
border: var(--search-normal-normal-border-width, 1px) solid
|
20
|
+
var(--color-line1-2, #d9d9d9);
|
21
|
+
border-right: 0;
|
22
|
+
border-radius: var(--search-normal-corner, 2px);
|
23
|
+
border-top-right-radius: 0;
|
24
|
+
border-bottom-right-radius: 0;
|
25
|
+
// 表单项选择
|
26
|
+
.#{$light-filter}-select {
|
27
|
+
min-width: auto;
|
28
|
+
.#{$css-prefix}input {
|
29
|
+
min-width: auto;
|
30
|
+
border: 0;
|
31
|
+
box-shadow: none;
|
32
|
+
.#{$css-prefix}input-text-field {
|
33
|
+
padding-right: 0;
|
34
|
+
}
|
35
|
+
}
|
36
|
+
.#{$css-prefix}input {
|
37
|
+
height: $noborder-font-weight-medium;
|
38
|
+
}
|
39
|
+
.#{$css-prefix}input-control {
|
40
|
+
padding-right: 0;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}
|
44
|
+
|
45
|
+
// 按钮后缀
|
46
|
+
.#{$light-filter}-addonAfter {
|
47
|
+
.#{$css-prefix}btn {
|
48
|
+
border-top-left-radius: 0;
|
49
|
+
border-bottom-left-radius: 0;
|
50
|
+
.teamix-icon {
|
51
|
+
color: var(--color-line1-5, #ababab) !important;
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
// LightFilter无边框
|
58
|
+
.#{$form-item-cls}-bordered-none {
|
59
|
+
.#{$form-item-cls}-control {
|
60
|
+
.#{$form-item-cls}-control-content {
|
61
|
+
.#{$form-item-cls}-control-content-component {
|
62
|
+
min-height: $noborder-font-weight-medium;
|
63
|
+
.#{$css-prefix}date-picker2-input {
|
64
|
+
border: 0;
|
65
|
+
box-shadow: none !important;
|
66
|
+
}
|
67
|
+
.#{$css-prefix}date-picker2-input.#{$css-prefix}date-picker2-input-medium,
|
68
|
+
.#{$css-prefix}input.#{$css-prefix}medium {
|
69
|
+
height: $noborder-font-weight-medium;
|
70
|
+
}
|
71
|
+
}
|
72
|
+
}
|
73
|
+
}
|
74
|
+
}
|
@@ -29,9 +29,9 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
29
29
|
|
30
30
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
31
31
|
|
32
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
32
|
+
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; }
|
33
33
|
|
34
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
34
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
35
35
|
|
36
36
|
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; }
|
37
37
|
|
@@ -17,9 +17,9 @@ var _excluded = ["children", "className"];
|
|
17
17
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
19
19
|
|
20
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
20
|
+
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; }
|
21
21
|
|
22
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
22
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
23
23
|
|
24
24
|
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; }
|
25
25
|
|
package/lib/form/Filter/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
4
4
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
6
6
|
value: true
|
@@ -45,9 +45,9 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
45
45
|
|
46
46
|
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; }
|
47
47
|
|
48
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
48
|
+
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; }
|
49
49
|
|
50
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
50
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
51
51
|
|
52
52
|
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; }
|
53
53
|
|
@@ -96,7 +96,7 @@ var SimpleFilter = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
96
96
|
}
|
97
97
|
}])
|
98
98
|
}];
|
99
|
-
}, []);
|
99
|
+
}, [schema, triggerType]);
|
100
100
|
var eventProps = getEventProps(triggerType, onFilter);
|
101
101
|
return /*#__PURE__*/_react.default.createElement(_ProForm.default, _objectSpread(_objectSpread(_objectSpread({
|
102
102
|
feedbackLayout: "popover",
|
@@ -174,7 +174,7 @@ var AdvancedFilter = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
174
174
|
}]
|
175
175
|
}])
|
176
176
|
}];
|
177
|
-
}, []);
|
177
|
+
}, [schema, onReset, triggerType]);
|
178
178
|
var getTeamixLayout = (0, _react.useMemo)(function () {
|
179
179
|
return {
|
180
180
|
breakpoints: [990],
|
@@ -1,51 +1,5 @@
|
|
1
1
|
@import '../global.scss';
|
2
2
|
|
3
|
-
$query-filter: #{$teamix-pro-form}-query-filter;
|
4
|
-
|
5
|
-
.#{$query-filter} {
|
6
|
-
.#{$query-filter}-inline {
|
7
|
-
display: flex;
|
8
|
-
justify-content: space-between;
|
9
|
-
}
|
10
|
-
.#{$query-filter}-left {
|
11
|
-
display: flex;
|
12
|
-
}
|
13
|
-
.#{$query-filter}-addonBefore {
|
14
|
-
flex: 0 1 auto;
|
15
|
-
margin-right: 8px;
|
16
|
-
}
|
17
|
-
.#{$query-filter}-simple {
|
18
|
-
flex: 0 0 auto;
|
19
|
-
margin-right: -8px;
|
20
|
-
margin-bottom: 8px;
|
21
|
-
}
|
22
|
-
.#{$query-filter}-toggle {
|
23
|
-
margin-bottom: 8px;
|
24
|
-
}
|
25
|
-
.#{$query-filter}-addonAfter {
|
26
|
-
flex: 0 1 auto;
|
27
|
-
margin-left: 8px;
|
28
|
-
}
|
29
|
-
.#{$query-filter}-tag-title {
|
30
|
-
margin-right: 12px;
|
31
|
-
color: var(--color-text1-8, #848484);
|
32
|
-
}
|
33
|
-
.#{$query-filter}-tag-content {
|
34
|
-
color: var(--color-text1-2, #5a5a5a);
|
35
|
-
font-weight: bold;
|
36
|
-
}
|
37
|
-
.#{$query-filter}-tag-hidden {
|
38
|
-
display: none;
|
39
|
-
}
|
40
|
-
.#{$query-filter}-advanced {
|
41
|
-
padding: 16px;
|
42
|
-
background-color: var(--color-fill1-2, #f7f7f7);
|
43
|
-
}
|
44
|
-
.#{$query-filter}-advanced-hidden {
|
45
|
-
display: none;
|
46
|
-
}
|
47
|
-
}
|
48
|
-
|
49
3
|
// 筛选
|
50
4
|
.#{$teamix-pro-form}-filter-advanced,
|
51
5
|
.#{$teamix-pro-form}-filter-simple {
|