@teamix/pro 1.2.10 → 1.2.14
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 +2892 -2305
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/es/actions/base.d.ts +16 -6
- package/es/actions/base.js +66 -12
- package/es/actions/confirm.d.ts +1 -1
- package/es/actions/danger-confirm.d.ts +1 -1
- package/es/actions/dialog-component.d.ts +1 -1
- package/es/actions/dialog-component.js +2 -2
- package/es/actions/dialog-form.d.ts +1 -1
- package/es/actions/dialog-form.js +4 -4
- package/es/actions/dialog-info.d.ts +1 -1
- package/es/actions/dialog-table.d.ts +1 -1
- package/es/actions/dialog.d.ts +6 -2
- package/es/actions/dialog.js +5 -5
- package/es/actions/drawer-form.d.ts +1 -1
- package/es/actions/drawer-info.d.ts +1 -1
- package/es/actions/drawer-table.d.ts +1 -1
- package/es/actions/drawer.d.ts +1 -1
- package/es/actions/error.d.ts +1 -1
- package/es/actions/index.js +11 -7
- package/es/actions/index.scss +14 -0
- package/es/actions/link.d.ts +2 -2
- package/es/actions/link.js +4 -4
- package/es/actions/notice.d.ts +1 -1
- package/es/actions/request.d.ts +1 -1
- package/es/actions/request.js +4 -4
- 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 +9 -0
- package/es/card/index.js +21 -7
- package/es/card/index.scss +19 -0
- package/es/card/selectable.js +2 -2
- package/es/card/tab.d.ts +6 -0
- package/es/card/tab.js +27 -0
- 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 +46 -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.d.ts +2 -5
- package/es/form/Filter/index.js +5 -46
- package/es/form/Filter/index.scss +25 -0
- package/es/form/Filter/index2.d.ts +8 -0
- package/es/form/Filter/index2.js +370 -0
- package/es/form/Filter/index2.scss +73 -0
- package/es/form/ProForm/index.js +5 -25
- package/es/form/ProForm/index.scss +10 -28
- package/es/form/ProForm/useAutoSubmit.js +2 -2
- package/es/form/ProForm/useFieldRequest.js +2 -2
- package/es/form/ProForm/useFormDisplayValues.d.ts +3 -5
- package/es/form/ProForm/useFormDisplayValues.js +79 -42
- package/es/form/ProForm/useInitialRequest.js +2 -2
- package/es/form/SchemaForm/adapterType.js +1 -0
- package/es/form/SchemaForm/index.js +11 -10
- 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 +2 -2
- package/es/form/fieldTypeMap.js +1 -0
- package/es/form/global.scss +1 -0
- package/es/form/index.d.ts +2 -1
- package/es/form/index.js +5 -4
- package/es/form/typing.d.ts +3 -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 +19 -11
- package/es/page-header/index.js +24 -49
- package/es/page-header/index.scss +0 -11
- 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 +13 -11
- package/es/table/components/Filter/index.scss +7 -3
- package/es/table/components/Layout/index.js +13 -4
- package/es/table/components/QuickAction/index.js +3 -3
- package/es/table/components/ToolBar/FilterColumnIcon.js +2 -2
- package/es/table/components/ToolBar/index.js +2 -2
- package/es/table/index.js +24 -14
- package/es/table/typing.d.ts +6 -0
- package/es/table/utils/columnRender.js +40 -3
- package/es/table/utils/genProColumnToColumn.js +2 -2
- package/es/table/utils/index.js +17 -3
- package/es/table/utils/useTableSelection.js +2 -2
- package/es/templates/List/index.js +2 -2
- package/es/utils/message.js +2 -2
- package/lib/actions/base.d.ts +16 -6
- package/lib/actions/base.js +67 -12
- package/lib/actions/confirm.d.ts +1 -1
- package/lib/actions/danger-confirm.d.ts +1 -1
- package/lib/actions/dialog-component.d.ts +1 -1
- package/lib/actions/dialog-component.js +2 -2
- package/lib/actions/dialog-form.d.ts +1 -1
- package/lib/actions/dialog-form.js +5 -5
- package/lib/actions/dialog-info.d.ts +1 -1
- package/lib/actions/dialog-table.d.ts +1 -1
- package/lib/actions/dialog.d.ts +6 -2
- package/lib/actions/dialog.js +6 -6
- package/lib/actions/drawer-form.d.ts +1 -1
- package/lib/actions/drawer-info.d.ts +1 -1
- package/lib/actions/drawer-table.d.ts +1 -1
- package/lib/actions/drawer.d.ts +1 -1
- package/lib/actions/error.d.ts +1 -1
- package/lib/actions/index.js +11 -7
- package/lib/actions/index.scss +14 -0
- package/lib/actions/link.d.ts +2 -2
- package/lib/actions/link.js +4 -4
- package/lib/actions/notice.d.ts +1 -1
- package/lib/actions/request.d.ts +1 -1
- package/lib/actions/request.js +4 -4
- 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 +9 -0
- package/lib/card/index.js +22 -6
- package/lib/card/index.scss +19 -0
- package/lib/card/selectable.js +2 -2
- package/lib/card/tab.d.ts +6 -0
- package/lib/card/tab.js +39 -0
- 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 +51 -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.d.ts +2 -5
- package/lib/form/Filter/index.js +7 -48
- package/lib/form/Filter/index.scss +25 -0
- package/lib/form/Filter/index2.d.ts +8 -0
- package/lib/form/Filter/index2.js +396 -0
- package/lib/form/Filter/index2.scss +73 -0
- package/lib/form/ProForm/index.js +6 -26
- package/lib/form/ProForm/index.scss +10 -28
- package/lib/form/ProForm/useAutoSubmit.js +2 -2
- package/lib/form/ProForm/useFieldRequest.js +2 -2
- package/lib/form/ProForm/useFormDisplayValues.d.ts +3 -5
- package/lib/form/ProForm/useFormDisplayValues.js +83 -44
- package/lib/form/ProForm/useInitialRequest.js +2 -2
- package/lib/form/SchemaForm/adapterType.js +1 -0
- package/lib/form/SchemaForm/index.js +12 -11
- 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 +2 -2
- package/lib/form/fieldTypeMap.js +1 -0
- package/lib/form/global.scss +1 -0
- package/lib/form/index.d.ts +2 -1
- package/lib/form/index.js +8 -6
- package/lib/form/typing.d.ts +3 -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 +19 -11
- package/lib/page-header/index.js +22 -47
- package/lib/page-header/index.scss +0 -11
- 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 +13 -11
- package/lib/table/components/Filter/index.scss +7 -3
- package/lib/table/components/Layout/index.js +13 -4
- 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 +3 -3
- 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/index.js +23 -13
- package/lib/table/typing.d.ts +6 -0
- package/lib/table/utils/columnRender.js +40 -3
- package/lib/table/utils/genProColumnToColumn.js +2 -2
- package/lib/table/utils/index.js +17 -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.js +2 -2
- package/package.json +4 -4
- 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/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
|
@@ -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,32 @@ 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);
|
|
57
|
+
|
|
55
58
|
if (schema.name === active) {
|
|
56
59
|
main.push({
|
|
57
60
|
name: name,
|
|
58
61
|
schema: _objectSpread(_objectSpread({}, schema), {}, {
|
|
59
|
-
title: ''
|
|
62
|
+
title: '',
|
|
63
|
+
'x-component': _componentMap.default[schema['x-component']] || schema['x-component']
|
|
60
64
|
})
|
|
61
65
|
});
|
|
62
66
|
}
|
|
63
67
|
});
|
|
64
68
|
return main;
|
|
65
|
-
}; //
|
|
69
|
+
}; // 筛选项数据
|
|
66
70
|
|
|
67
71
|
|
|
68
72
|
var useFilterItems = function useFilterItems() {
|
|
@@ -75,38 +79,29 @@ var useFilterItems = function useFilterItems() {
|
|
|
75
79
|
});
|
|
76
80
|
});
|
|
77
81
|
return filterItems;
|
|
78
|
-
};
|
|
82
|
+
};
|
|
79
83
|
|
|
84
|
+
var LightFilter = (0, _react2.observer)(function (props) {
|
|
85
|
+
var _filterItems$;
|
|
80
86
|
|
|
81
|
-
var
|
|
82
|
-
var queryField = (0, _react2.useField)();
|
|
87
|
+
var field = (0, _react2.useField)();
|
|
83
88
|
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
|
-
};
|
|
89
|
+
var filterItems = useFilterItems();
|
|
90
|
+
var size = props.size,
|
|
91
|
+
defaultFilterValue = props.defaultFilterValue,
|
|
92
|
+
filterProps = props.filterProps,
|
|
93
|
+
buttonProps = props.buttonProps;
|
|
98
94
|
|
|
99
|
-
var
|
|
100
|
-
var _useState = (0, _react.useState)(),
|
|
95
|
+
var _useState = (0, _react.useState)(defaultFilterValue || ((_filterItems$ = filterItems[0]) === null || _filterItems$ === void 0 ? void 0 : _filterItems$.value)),
|
|
101
96
|
_useState2 = _slicedToArray(_useState, 2),
|
|
102
97
|
active = _useState2[0],
|
|
103
98
|
setActive = _useState2[1];
|
|
104
99
|
|
|
105
|
-
var field = (0, _react2.useField)();
|
|
106
|
-
var schema = (0, _react2.useFieldSchema)();
|
|
107
100
|
var main = useMain(active);
|
|
108
|
-
var
|
|
109
|
-
var
|
|
101
|
+
var defaultCls = (0, _utils.usePrefixCls)();
|
|
102
|
+
var prefixCls = (0, _utils.usePrefixCls)('', {
|
|
103
|
+
prefix: 'teamix-pro-form-light-filter'
|
|
104
|
+
});
|
|
110
105
|
var content = main.map(function (_ref, key) {
|
|
111
106
|
var schema = _ref.schema,
|
|
112
107
|
name = _ref.name;
|
|
@@ -119,11 +114,23 @@ var QueryFilter = (0, _react2.observer)(function (props) {
|
|
|
119
114
|
}
|
|
120
115
|
});
|
|
121
116
|
});
|
|
122
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
},
|
|
117
|
+
return /*#__PURE__*/_react.default.createElement("span", {
|
|
118
|
+
className: (0, _classnames.default)(prefixCls, "".concat(defaultCls).concat(size))
|
|
119
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
120
|
+
className: "".concat(prefixCls, "-main")
|
|
121
|
+
}, /*#__PURE__*/_react.default.createElement(_components.Select, _objectSpread(_objectSpread({}, filterProps), {}, {
|
|
122
|
+
className: (0, _classnames.default)("".concat(prefixCls, "-select"), filterProps === null || filterProps === void 0 ? void 0 : filterProps.className),
|
|
123
|
+
dataSource: filterItems,
|
|
124
|
+
onChange: setActive,
|
|
125
|
+
value: active
|
|
126
|
+
})), content), /*#__PURE__*/_react.default.createElement("span", {
|
|
127
|
+
className: "".concat(prefixCls, "-addonAfter")
|
|
128
|
+
}, /*#__PURE__*/_react.default.createElement(_components.Button, _objectSpread({}, buttonProps), /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
129
|
+
type: "search-line"
|
|
130
|
+
}))));
|
|
127
131
|
});
|
|
128
|
-
|
|
132
|
+
LightFilter.defaultProps = {
|
|
133
|
+
size: 'medium'
|
|
134
|
+
};
|
|
135
|
+
var _default = LightFilter;
|
|
129
136
|
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
|
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { IFilterProps } from '../typing';
|
|
3
|
+
import './index.scss';
|
|
3
4
|
/**
|
|
4
5
|
* 简单筛选
|
|
5
6
|
*/
|
|
6
7
|
declare const SimpleFilter: React.FC<IFilterProps>;
|
|
7
|
-
/**
|
|
8
|
-
* 查询筛选
|
|
9
|
-
*/
|
|
10
|
-
declare const QueryFilter: React.FC<IFilterProps>;
|
|
11
8
|
/**
|
|
12
9
|
* 高级筛选
|
|
13
10
|
*/
|
|
14
11
|
declare const AdvancedFilter: React.FC<IFilterProps>;
|
|
15
|
-
export { AdvancedFilter, SimpleFilter
|
|
12
|
+
export { AdvancedFilter, SimpleFilter };
|
|
16
13
|
export default AdvancedFilter;
|
package/lib/form/Filter/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
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
|
|
7
7
|
});
|
|
8
|
-
exports.default = exports.SimpleFilter = exports.
|
|
8
|
+
exports.default = exports.SimpleFilter = exports.AdvancedFilter = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
@@ -19,8 +19,9 @@ var _ProForm = _interopRequireDefault(require("../ProForm"));
|
|
|
19
19
|
|
|
20
20
|
var _utils2 = require("../utils");
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
require("./index.scss");
|
|
23
|
+
|
|
24
|
+
var _excluded = ["schema", "triggerType", "onFilter"];
|
|
24
25
|
|
|
25
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
26
27
|
|
|
@@ -44,9 +45,9 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
44
45
|
|
|
45
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; }
|
|
46
47
|
|
|
47
|
-
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; }
|
|
48
49
|
|
|
49
|
-
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; }
|
|
50
51
|
|
|
51
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; }
|
|
52
53
|
|
|
@@ -110,52 +111,10 @@ exports.SimpleFilter = SimpleFilter;
|
|
|
110
111
|
SimpleFilter.defaultProps = {
|
|
111
112
|
triggerType: 'change'
|
|
112
113
|
};
|
|
113
|
-
/**
|
|
114
|
-
* 查询筛选
|
|
115
|
-
*/
|
|
116
|
-
|
|
117
|
-
var QueryFilter = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
118
|
-
var schema = props.schema,
|
|
119
|
-
triggerType = props.triggerType,
|
|
120
|
-
onFilter = props.onFilter,
|
|
121
|
-
otherProps = _objectWithoutProperties(props, _excluded2);
|
|
122
|
-
|
|
123
|
-
var prefixCls = (0, _utils.usePrefixCls)('', {
|
|
124
|
-
prefix: 'teamix-pro-form-filter-query'
|
|
125
|
-
});
|
|
126
|
-
var querySchema = (0, _react.useMemo)(function () {
|
|
127
|
-
return [{
|
|
128
|
-
component: 'QueryFilter',
|
|
129
|
-
props: {
|
|
130
|
-
placeholder: 'placeholder'
|
|
131
|
-
},
|
|
132
|
-
children: schema
|
|
133
|
-
}, {
|
|
134
|
-
type: 'void',
|
|
135
|
-
decorator: null,
|
|
136
|
-
component: 'Submit',
|
|
137
|
-
props: {
|
|
138
|
-
style: _objectSpread({}, triggerType === 'submit' ? {} : {
|
|
139
|
-
display: 'none'
|
|
140
|
-
})
|
|
141
|
-
}
|
|
142
|
-
}];
|
|
143
|
-
}, []);
|
|
144
|
-
var eventProps = getEventProps(triggerType, onFilter);
|
|
145
|
-
return /*#__PURE__*/_react.default.createElement(_ProForm.default, _objectSpread(_objectSpread(_objectSpread({
|
|
146
|
-
feedbackLayout: "none",
|
|
147
|
-
breakpoints: [],
|
|
148
|
-
bordered: false
|
|
149
|
-
}, otherProps), eventProps), {}, {
|
|
150
|
-
className: (0, _classnames.default)(prefixCls, props.className),
|
|
151
|
-
schema: querySchema
|
|
152
|
-
}));
|
|
153
|
-
});
|
|
154
114
|
/**
|
|
155
115
|
* 高级筛选
|
|
156
116
|
*/
|
|
157
117
|
|
|
158
|
-
exports.QueryFilter = QueryFilter;
|
|
159
118
|
var AdvancedFilter = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
160
119
|
var form = (0, _react.useMemo)(function () {
|
|
161
120
|
return (props === null || props === void 0 ? void 0 : props.form) || (0, _core.createForm)();
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
@import '../global.scss';
|
|
2
|
+
|
|
3
|
+
// 筛选
|
|
4
|
+
.#{$teamix-pro-form}-filter-advanced,
|
|
5
|
+
.#{$teamix-pro-form}-filter-simple {
|
|
6
|
+
.#{$form-item-cls}-feedback-layout-popover {
|
|
7
|
+
margin-bottom: 0;
|
|
8
|
+
}
|
|
9
|
+
.#{$css-prefix}date-picker2-input {
|
|
10
|
+
.#{$css-prefix}input {
|
|
11
|
+
width: inherit;
|
|
12
|
+
input {
|
|
13
|
+
width: inherit;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// 筛选和抽屉按钮
|
|
20
|
+
.#{$teamix-pro-form}-filter-advanced,
|
|
21
|
+
.#{$css-prefix}drawer-footer {
|
|
22
|
+
.#{$css-prefix}formily-button-group {
|
|
23
|
+
margin-top: 0;
|
|
24
|
+
}
|
|
25
|
+
}
|