@sheinx/hooks 3.6.0-beta.9 → 3.6.0-fix.1
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/cjs/common/use-input-able/use-Input-able.d.ts.map +1 -1
- package/cjs/common/use-input-able/use-Input-able.js +6 -7
- package/cjs/common/use-pagination-list/index.d.ts.map +1 -1
- package/cjs/common/use-pagination-list/index.js +6 -1
- package/cjs/common/use-position-style/index.d.ts.map +1 -1
- package/cjs/common/use-position-style/index.js +7 -3
- package/cjs/components/use-check/use-check.d.ts +1 -1
- package/cjs/components/use-check/use-check.d.ts.map +1 -1
- package/cjs/components/use-check/use-check.js +10 -3
- package/cjs/components/use-datepicker/use-datepicker-format.d.ts.map +1 -1
- package/cjs/components/use-datepicker/use-datepicker-format.js +4 -0
- package/cjs/components/use-datepicker/use-datepicker-format.type.d.ts +1 -1
- package/cjs/components/use-datepicker/use-datepicker-format.type.d.ts.map +1 -1
- package/cjs/components/use-form/Provider.d.ts +1 -2
- package/cjs/components/use-form/Provider.d.ts.map +1 -1
- package/cjs/components/use-form/use-form-control/use-form-control.d.ts.map +1 -1
- package/cjs/components/use-form/use-form-control/use-form-control.js +2 -3
- package/cjs/components/use-form/use-form.d.ts +1 -2
- package/cjs/components/use-form/use-form.d.ts.map +1 -1
- package/cjs/components/use-form/use-form.js +20 -11
- package/cjs/components/use-form/use-form.type.d.ts +5 -3
- package/cjs/components/use-form/use-form.type.d.ts.map +1 -1
- package/cjs/components/use-input/use-input-format.d.ts +1 -1
- package/cjs/components/use-input/use-input-number.d.ts +1 -1
- package/cjs/components/use-input/use-input-number.d.ts.map +1 -1
- package/cjs/components/use-input/use-input-number.js +1 -0
- package/cjs/components/use-popup/use-popup.d.ts.map +1 -1
- package/cjs/components/use-popup/use-popup.js +5 -0
- package/cjs/components/use-table/index.d.ts +2 -1
- package/cjs/components/use-table/index.d.ts.map +1 -1
- package/cjs/components/use-table/index.js +7 -0
- package/cjs/components/use-table/use-table-filter.d.ts +19 -0
- package/cjs/components/use-table/use-table-filter.d.ts.map +1 -0
- package/cjs/components/use-table/use-table-filter.js +96 -0
- package/cjs/components/use-table/use-table.type.d.ts +93 -0
- package/cjs/components/use-table/use-table.type.d.ts.map +1 -1
- package/cjs/components/use-tabs/context.d.ts +1 -1
- package/cjs/components/use-tabs/context.d.ts.map +1 -1
- package/cjs/components/use-tabs/use-tabs.d.ts +1 -1
- package/cjs/components/use-tree/use-tree.d.ts.map +1 -1
- package/cjs/components/use-tree/use-tree.js +58 -13
- package/cjs/components/use-tree/use-tree.type.d.ts +4 -0
- package/cjs/components/use-tree/use-tree.type.d.ts.map +1 -1
- package/cjs/components/use-treeselect/use-tiled.d.ts +1 -1
- package/cjs/utils/dom/element.d.ts +1 -1
- package/cjs/utils/dom/element.d.ts.map +1 -1
- package/cjs/utils/dom/element.js +5 -3
- package/cjs/utils/lazyload.d.ts.map +1 -1
- package/cjs/utils/lazyload.js +2 -2
- package/esm/common/use-input-able/use-Input-able.d.ts.map +1 -1
- package/esm/common/use-input-able/use-Input-able.js +7 -8
- package/esm/common/use-pagination-list/index.d.ts.map +1 -1
- package/esm/common/use-pagination-list/index.js +6 -1
- package/esm/common/use-position-style/index.d.ts.map +1 -1
- package/esm/common/use-position-style/index.js +7 -3
- package/esm/components/use-check/use-check.d.ts +1 -1
- package/esm/components/use-check/use-check.d.ts.map +1 -1
- package/esm/components/use-check/use-check.js +10 -3
- package/esm/components/use-datepicker/use-datepicker-format.d.ts.map +1 -1
- package/esm/components/use-datepicker/use-datepicker-format.js +4 -0
- package/esm/components/use-datepicker/use-datepicker-format.type.d.ts +1 -1
- package/esm/components/use-datepicker/use-datepicker-format.type.d.ts.map +1 -1
- package/esm/components/use-form/Provider.d.ts +1 -2
- package/esm/components/use-form/Provider.d.ts.map +1 -1
- package/esm/components/use-form/use-form-control/use-form-control.d.ts.map +1 -1
- package/esm/components/use-form/use-form-control/use-form-control.js +2 -3
- package/esm/components/use-form/use-form.d.ts +1 -2
- package/esm/components/use-form/use-form.d.ts.map +1 -1
- package/esm/components/use-form/use-form.js +20 -11
- package/esm/components/use-form/use-form.type.d.ts +5 -3
- package/esm/components/use-form/use-form.type.d.ts.map +1 -1
- package/esm/components/use-input/use-input-format.d.ts +1 -1
- package/esm/components/use-input/use-input-number.d.ts +1 -1
- package/esm/components/use-input/use-input-number.d.ts.map +1 -1
- package/esm/components/use-input/use-input-number.js +1 -0
- package/esm/components/use-popup/use-popup.d.ts.map +1 -1
- package/esm/components/use-popup/use-popup.js +5 -0
- package/esm/components/use-table/index.d.ts +2 -1
- package/esm/components/use-table/index.d.ts.map +1 -1
- package/esm/components/use-table/index.js +1 -0
- package/esm/components/use-table/use-table-filter.d.ts +19 -0
- package/esm/components/use-table/use-table-filter.d.ts.map +1 -0
- package/esm/components/use-table/use-table-filter.js +89 -0
- package/esm/components/use-table/use-table.type.d.ts +93 -0
- package/esm/components/use-table/use-table.type.d.ts.map +1 -1
- package/esm/components/use-tabs/context.d.ts +1 -1
- package/esm/components/use-tabs/context.d.ts.map +1 -1
- package/esm/components/use-tabs/use-tabs.d.ts +1 -1
- package/esm/components/use-tree/use-tree.d.ts.map +1 -1
- package/esm/components/use-tree/use-tree.js +58 -13
- package/esm/components/use-tree/use-tree.type.d.ts +4 -0
- package/esm/components/use-tree/use-tree.type.d.ts.map +1 -1
- package/esm/components/use-treeselect/use-tiled.d.ts +1 -1
- package/esm/utils/dom/element.d.ts +1 -1
- package/esm/utils/dom/element.d.ts.map +1 -1
- package/esm/utils/dom/element.js +4 -2
- package/esm/utils/lazyload.d.ts.map +1 -1
- package/esm/utils/lazyload.js +3 -3
- package/package.json +1 -1
|
@@ -17,6 +17,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
17
17
|
*/
|
|
18
18
|
import React from 'react';
|
|
19
19
|
import { extractEventHandlers } from "../../utils";
|
|
20
|
+
import { util } from "../..";
|
|
20
21
|
import useForkRef from "../../common/use-fork-ref";
|
|
21
22
|
var useCheck = function useCheck(props) {
|
|
22
23
|
var checked = props.checked,
|
|
@@ -37,9 +38,12 @@ var useCheck = function useCheck(props) {
|
|
|
37
38
|
};
|
|
38
39
|
var inputRef = React.useRef(null);
|
|
39
40
|
var handleInputRef = useForkRef(inputRef, inputRefPo);
|
|
40
|
-
var handleClick = function handleClick(otherHandlers) {
|
|
41
|
+
var handleClick = function handleClick(otherHandlers, needStopPropagation) {
|
|
41
42
|
return function (event) {
|
|
42
43
|
var _inputRef$current, _otherHandlers$onClic;
|
|
44
|
+
if (needStopPropagation) {
|
|
45
|
+
event.stopPropagation();
|
|
46
|
+
}
|
|
43
47
|
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.click();
|
|
44
48
|
otherHandlers === null || otherHandlers === void 0 || (_otherHandlers$onClic = otherHandlers.onClick) === null || _otherHandlers$onClic === void 0 || _otherHandlers$onClic.call(otherHandlers, event);
|
|
45
49
|
};
|
|
@@ -47,8 +51,10 @@ var useCheck = function useCheck(props) {
|
|
|
47
51
|
var getRootProps = function getRootProps() {
|
|
48
52
|
var externalProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
49
53
|
var externalEventHandlers = extractEventHandlers(externalProps);
|
|
50
|
-
return _objectSpread(_objectSpread({}, externalProps
|
|
51
|
-
|
|
54
|
+
return _objectSpread(_objectSpread({}, util.removeProps(externalProps, {
|
|
55
|
+
needStopPropagation: true
|
|
56
|
+
})), {}, {
|
|
57
|
+
onClick: handleClick(externalEventHandlers, externalProps.needStopPropagation)
|
|
52
58
|
});
|
|
53
59
|
//封装点击事件 点击触发input 的点击
|
|
54
60
|
// disabled 禁用后不可点击
|
|
@@ -77,6 +83,7 @@ var useCheck = function useCheck(props) {
|
|
|
77
83
|
disabled: disabled
|
|
78
84
|
}, checkProps), {}, {
|
|
79
85
|
onClick: function onClick(e) {
|
|
86
|
+
// TODO: 这个e.stopPropagation生效不了,外部的触发是通过inputRef.current?.click()方式的;没啥用的代码
|
|
80
87
|
e.stopPropagation();
|
|
81
88
|
_onClick === null || _onClick === void 0 || _onClick(e);
|
|
82
89
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-datepicker-format.d.ts","sourceRoot":"","sources":["use-datepicker-format.ts"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAE3D,OAAO,KAAK,EACV,kBAAkB,EAClB,mBAAmB,EACnB,wBAAwB,EACzB,MAAM,8BAA8B,CAAC;AAkEtC,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"use-datepicker-format.d.ts","sourceRoot":"","sources":["use-datepicker-format.ts"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAE3D,OAAO,KAAK,EACV,kBAAkB,EAClB,mBAAmB,EACnB,wBAAwB,EACzB,MAAM,8BAA8B,CAAC;AAkEtC,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;0BAuMe,gBAAgB;sCAiEJ,MAAM;iCA7BX,MAAM,SAAS,MAAM;yCAxLrD,OAAO,GAAG,KAAK,GAAG,SAAS,QAAQ,MAAM,UAAU,IAAI,KAAK,OAAO;uCAWvE,MAAM,cAAc,CAAC,IAAI,EAAE,CAAC,QAC3B,MAAM;kBACG,MAAM,SAAS;mBAAS,GAAG;;+BA4CrC,IAAI,YAAY,OAAO,GAAG,KAAK,GAAG,SAAS,gBAAgB,MAAM;;CAwN3E,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -204,6 +204,10 @@ var useDatePickerFormat = function useDatePickerFormat(props) {
|
|
|
204
204
|
if (props.formatResult) {
|
|
205
205
|
if (typeof props.formatResult === 'string') {
|
|
206
206
|
return getFormatValueArr(dateArr, props.formatResult);
|
|
207
|
+
} else if (typeof props.formatResult === 'function') {
|
|
208
|
+
return dateArr.map(function (item) {
|
|
209
|
+
return props.formatResult(item);
|
|
210
|
+
});
|
|
207
211
|
} else {
|
|
208
212
|
return dateArr.map(function (item) {
|
|
209
213
|
if (!item) return '';
|
|
@@ -5,7 +5,7 @@ export type DatePickerModeType = 'year' | 'month' | 'quarter' | 'time' | 'day';
|
|
|
5
5
|
export interface UseDatePickerFormatProps<Value extends DatePickerValueType> {
|
|
6
6
|
type: 'date' | 'datetime' | 'month' | 'time' | 'week' | 'year' | 'quarter';
|
|
7
7
|
format: string | undefined;
|
|
8
|
-
formatResult
|
|
8
|
+
formatResult?: string | ((date?: Date) => string);
|
|
9
9
|
range: boolean | undefined | number;
|
|
10
10
|
value: Value | undefined;
|
|
11
11
|
onChange: ((value: Value extends any[] ? string[] : string, ...args: any) => void) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-datepicker-format.type.d.ts","sourceRoot":"","sources":["use-datepicker-format.type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;AAC9D,MAAM,MAAM,mBAAmB,GAAG,YAAY,GAAG,YAAY,EAAE,CAAC;AAChE,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAClG,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,KAAK,CAAC;AAC/E,MAAM,WAAW,wBAAwB,CAAC,KAAK,SAAS,mBAAmB;IACzE,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAC3E,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,YAAY,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"use-datepicker-format.type.d.ts","sourceRoot":"","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SAAS,CAAC;IAClC,WAAW,EAAE,OAAO,GAAG,SAAS,CAAC;IACjC,cAAc,EAAE,mBAAmB,CAAC;IACpC,cAAc,EACV,CAAC,CACC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,EACvB,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,GAAG,CAAA;KAAE,EACnC,IAAI,EAAE,kBAAkB,KACrB,IAAI,CAAC,GACV,SAAS,CAAC;IACd,QAAQ,EACJ,OAAO,GACP,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,KAAK,EAAE,SAAS,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,IAAI,KAAK,OAAO,CAAC,GACvF,KAAK,CAAC,OAAO,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,CAAC,GAC1C,SAAS,CAAC;CACf"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ProviderProps } from './use-form.type';
|
|
3
|
-
export declare const Provider: (props: ProviderProps) => JSX.Element;
|
|
2
|
+
export declare const Provider: (props: ProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
//# sourceMappingURL=Provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["Provider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["Provider.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,eAAO,MAAM,QAAQ,UAAW,aAAa,4CAW5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-form-control.d.ts","sourceRoot":"","sources":["use-form-control.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AA0B/D,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAC;;
|
|
1
|
+
{"version":3,"file":"use-form-control.d.ts","sourceRoot":"","sources":["use-form-control.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AA0B/D,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAC;;kBAiJpC,CAAC,YAAY,GAAG,EAAE;;;;;EAkDrD"}
|
|
@@ -88,7 +88,6 @@ export default function useFormControl(props) {
|
|
|
88
88
|
var formValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
89
89
|
var errors = arguments.length > 1 ? arguments[1] : undefined;
|
|
90
90
|
var severErrors = arguments.length > 2 ? arguments[2] : undefined;
|
|
91
|
-
var names = arguments.length > 3 ? arguments[3] : undefined;
|
|
92
91
|
if (!name) return;
|
|
93
92
|
if (isArray(name)) {
|
|
94
93
|
var _value = getValue(name, formValue);
|
|
@@ -100,7 +99,7 @@ export default function useFormControl(props) {
|
|
|
100
99
|
var dv = isArray(defaultValue) ? defaultValue : [];
|
|
101
100
|
var nextValue = [];
|
|
102
101
|
name.forEach(function (n, index) {
|
|
103
|
-
if (
|
|
102
|
+
if (_value[index] === undefined && dv[index] !== undefined) {
|
|
104
103
|
nextValue[index] = dv[index];
|
|
105
104
|
} else {
|
|
106
105
|
nextValue[index] = _value[index];
|
|
@@ -114,7 +113,7 @@ export default function useFormControl(props) {
|
|
|
114
113
|
setErrorState(_error2);
|
|
115
114
|
}
|
|
116
115
|
if (!shallowEqual(_value2, latestInfo.valueState)) {
|
|
117
|
-
if (
|
|
116
|
+
if (_value2 === undefined && defaultValue !== undefined) {
|
|
118
117
|
setValueState(defaultValue);
|
|
119
118
|
} else {
|
|
120
119
|
setValueState(_value2);
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ProviderProps, UseFormProps, UseFormSlotProps, ValidateFnConfig } from './use-form.type';
|
|
3
2
|
import { ObjectType } from '../../common/type';
|
|
4
3
|
declare const useForm: <T extends ObjectType>(props: UseFormProps<T>) => {
|
|
5
4
|
getFormProps: <TOther extends ObjectType = ObjectType>(externalProps?: TOther) => UseFormSlotProps<TOther>;
|
|
6
|
-
Provider: (props: ProviderProps) => JSX.Element;
|
|
5
|
+
Provider: (props: ProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
ProviderProps: {
|
|
8
7
|
formValue: import("./use-form.type").FormContextValueType;
|
|
9
8
|
formConfig: import("./use-form.type").FormCommonConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-form.d.ts","sourceRoot":"","sources":["use-form.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-form.d.ts","sourceRoot":"","sources":["use-form.ts"],"names":[],"mappings":"AA+BA,OAAO,EAEL,aAAa,EACb,YAAY,EACZ,gBAAgB,EAGhB,gBAAgB,EAEjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAe,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAI5D,QAAA,MAAM,OAAO;;;;;;;;;wBAyRC;gBAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;gBAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;aAAE;8BA9Jd,MAAM;oCAiOD,OAAO;;6BAfb,MAAM,KAAK,KAAK,GAAG,SAAS;;oCAdrB,MAAM,EAAE;sCA5LxC,MAAM,GAAG,MAAM,EAAE,WAAU,gBAAgB;qCA8PvB,MAAM,WAAW,gBAAgB;gCA/CzB,MAAM,SAAS,MAAM,UAAU,KAAK;gCAKpC,MAAM,SAAS,MAAM;kCAnIpD,MAAM,0BAAyB,qBAAqB;;;;;;oBAqEjD;YAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;SAAE;0BA9Jd,MAAM;gCAiOD,OAAO;;yBAfb,MAAM,KAAK,KAAK,GAAG,SAAS;;gCAdrB,MAAM,EAAE;kCA5LxC,MAAM,GAAG,MAAM,EAAE,WAAU,gBAAgB;iCA8PvB,MAAM,WAAW,gBAAgB;4BA/CzB,MAAM,SAAS,MAAM,UAAU,KAAK;4BAKpC,MAAM,SAAS,MAAM;8BAnIpD,MAAM,0BAAyB,qBAAqB;;CAma9D,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -44,7 +44,6 @@ var useForm = function useForm(props) {
|
|
|
44
44
|
forceSet: true
|
|
45
45
|
};
|
|
46
46
|
var preValue = usePrevious(props.value);
|
|
47
|
-
var formDomRef = React.useRef();
|
|
48
47
|
var _React$useRef = React.useRef({
|
|
49
48
|
defaultValues: {},
|
|
50
49
|
validateMap: {},
|
|
@@ -70,7 +69,7 @@ var useForm = function useForm(props) {
|
|
|
70
69
|
Object.keys(context.updateMap).forEach(function (key) {
|
|
71
70
|
var _context$updateMap$ke;
|
|
72
71
|
(_context$updateMap$ke = context.updateMap[key]) === null || _context$updateMap$ke === void 0 || _context$updateMap$ke.forEach(function (update) {
|
|
73
|
-
update(context.value, context.errors, context.serverErrors
|
|
72
|
+
update(context.value, context.errors, context.serverErrors);
|
|
74
73
|
});
|
|
75
74
|
});
|
|
76
75
|
Object.keys(context.flowMap).forEach(function (key) {
|
|
@@ -88,12 +87,12 @@ var useForm = function useForm(props) {
|
|
|
88
87
|
var _context$updateMap$pa;
|
|
89
88
|
var parentKey = key.split('.')[0];
|
|
90
89
|
(_context$updateMap$pa = context.updateMap[parentKey]) === null || _context$updateMap$pa === void 0 || _context$updateMap$pa.forEach(function (update) {
|
|
91
|
-
update(context.value, context.errors, context.serverErrors
|
|
90
|
+
update(context.value, context.errors, context.serverErrors);
|
|
92
91
|
});
|
|
93
92
|
} else {
|
|
94
93
|
var _context$updateMap$ke2;
|
|
95
94
|
(_context$updateMap$ke2 = context.updateMap[key]) === null || _context$updateMap$ke2 === void 0 || _context$updateMap$ke2.forEach(function (update) {
|
|
96
|
-
update(context.value, context.errors, context.serverErrors
|
|
95
|
+
update(context.value, context.errors, context.serverErrors);
|
|
97
96
|
});
|
|
98
97
|
}
|
|
99
98
|
(_context$flowMap$key = context.flowMap[key]) === null || _context$flowMap$key === void 0 || _context$flowMap$key.forEach(function (update) {
|
|
@@ -118,9 +117,9 @@ var useForm = function useForm(props) {
|
|
|
118
117
|
onError === null || onError === void 0 || onError(err);
|
|
119
118
|
if (!props.scrollToError) return;
|
|
120
119
|
setTimeout(function () {
|
|
121
|
-
var
|
|
120
|
+
var _props$formElRef$curr;
|
|
122
121
|
var selector = "[".concat(getDataAttributeName('status'), "=\"error\"]");
|
|
123
|
-
var el = (
|
|
122
|
+
var el = (_props$formElRef$curr = props.formElRef.current) === null || _props$formElRef$curr === void 0 ? void 0 : _props$formElRef$curr.querySelector(selector);
|
|
124
123
|
if (el) {
|
|
125
124
|
el.scrollIntoView();
|
|
126
125
|
var focusableSelectors = 'textarea, input,[tabindex]:not([tabindex="-1"])';
|
|
@@ -244,10 +243,20 @@ var useForm = function useForm(props) {
|
|
|
244
243
|
var isVisibleX = elementRect.left >= parentRect.left && elementRect.right <= parentRect.right;
|
|
245
244
|
if (!isVisibleY || !isVisibleX) {
|
|
246
245
|
// 计算元素相对于父元素的偏移量
|
|
247
|
-
var offsetTop =
|
|
248
|
-
var offsetLeft =
|
|
249
|
-
|
|
250
|
-
|
|
246
|
+
var offsetTop = elementRect.top - parentRect.top;
|
|
247
|
+
var offsetLeft = elementRect.left - parentRect.left;
|
|
248
|
+
// 如果是往上滚动,那么只有当元素的偏移量小于0时才需要滚动
|
|
249
|
+
if (offsetTop < 0) {
|
|
250
|
+
parentEl.scrollTop = Math.max(parentEl.scrollTop + offsetTop, 0);
|
|
251
|
+
} else {
|
|
252
|
+
parentEl.scrollTop = Math.min(parentEl.scrollTop + offsetTop, parentEl.scrollHeight - parentEl.clientHeight);
|
|
253
|
+
}
|
|
254
|
+
// 如果是往左滚动,那么只有当元素的偏移量小于0时才需要滚动
|
|
255
|
+
if (offsetLeft < 0) {
|
|
256
|
+
parentEl.scrollLeft = Math.max(parentEl.scrollLeft + offsetLeft, 0);
|
|
257
|
+
} else {
|
|
258
|
+
parentEl.scrollLeft = Math.min(parentEl.scrollLeft + offsetLeft, parentEl.scrollWidth - parentEl.clientWidth);
|
|
259
|
+
}
|
|
251
260
|
}
|
|
252
261
|
} else {
|
|
253
262
|
// 如果没有找到可滚动的父元素,使用默认行为
|
|
@@ -451,7 +460,6 @@ var useForm = function useForm(props) {
|
|
|
451
460
|
var externalProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
452
461
|
var externalEventHandlers = extractEventHandlers(externalProps);
|
|
453
462
|
return _objectSpread(_objectSpread(_objectSpread({}, externalProps), externalEventHandlers), {}, {
|
|
454
|
-
ref: formDomRef,
|
|
455
463
|
disabled: !!disabled,
|
|
456
464
|
onSubmit: handleSubmit(externalEventHandlers),
|
|
457
465
|
onReset: handleReset(externalEventHandlers)
|
|
@@ -497,6 +505,7 @@ var useForm = function useForm(props) {
|
|
|
497
505
|
}
|
|
498
506
|
if (validateFieldSet.size === 0 && updateFieldSet.size === 0) {
|
|
499
507
|
context.names.delete(n);
|
|
508
|
+
delete context.errors[n];
|
|
500
509
|
delete context.defaultValues[n];
|
|
501
510
|
}
|
|
502
511
|
var finalReserveAble = (_props$reserveAble = props.reserveAble) !== null && _props$reserveAble !== void 0 ? _props$reserveAble : reserveAble;
|
|
@@ -17,7 +17,7 @@ export type ValidateFnConfig = {
|
|
|
17
17
|
ignoreChildren?: boolean;
|
|
18
18
|
};
|
|
19
19
|
export type ValidateFn = (name: string, value: any, formData: ObjectType, config?: ValidateFnConfig) => Promise<true | FormError>;
|
|
20
|
-
export type UpdateFn = (formValue: ObjectType, errors: ObjectType<Error | undefined>, serverErrors: ObjectType<Error | undefined
|
|
20
|
+
export type UpdateFn = (formValue: ObjectType, errors: ObjectType<Error | undefined>, serverErrors: ObjectType<Error | undefined>) => void;
|
|
21
21
|
export interface FormContextValueType {
|
|
22
22
|
func?: {
|
|
23
23
|
unbind: (n: string, reserveAble?: boolean, validate?: ValidateFn, update?: UpdateFn) => void;
|
|
@@ -185,7 +185,9 @@ export interface BaseFormProps<T> extends Omit<FormCommonConfig, 'formName'> {
|
|
|
185
185
|
*/
|
|
186
186
|
name?: string;
|
|
187
187
|
}
|
|
188
|
-
export type UseFormProps<T> = BaseFormProps<T
|
|
188
|
+
export type UseFormProps<T> = BaseFormProps<T> & {
|
|
189
|
+
formElRef: React.RefObject<HTMLFormElement>;
|
|
190
|
+
};
|
|
189
191
|
export type FormContext = {
|
|
190
192
|
defaultValues: ObjectType;
|
|
191
193
|
validateMap: ObjectType<Set<(name: string, v: any, formValue: ObjectType, config?: {
|
|
@@ -198,7 +200,7 @@ export type FormContext = {
|
|
|
198
200
|
lastValue: ObjectType | undefined;
|
|
199
201
|
resetTime: number;
|
|
200
202
|
mounted: boolean;
|
|
201
|
-
updateMap: ObjectType<Set<(formValue: ObjectType, errors: ObjectType<Error | undefined>, serverErrors: ObjectType<Error | undefined
|
|
203
|
+
updateMap: ObjectType<Set<(formValue: ObjectType, errors: ObjectType<Error | undefined>, serverErrors: ObjectType<Error | undefined>) => void>>;
|
|
202
204
|
flowMap: ObjectType<Set<() => void>>;
|
|
203
205
|
value: ObjectType;
|
|
204
206
|
errors: ObjectType<Error | undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-form.type.d.ts","sourceRoot":"","sources":["use-form.type.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE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K,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,UAAU,GAAG,SAAS,CAAC;IAElC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IAEjB,SAAS,EAAE,UAAU,CACnB,GAAG,CACD,CACE,SAAS,EAAE,UAAU,EACrB,MAAM,EAAE,UAAU,CAAC,KAAK,GAAG,SAAS,CAAC,EACrC,YAAY,EAAE,UAAU,CAAC,KAAK,GAAG,SAAS,CAAC,KACxC,IAAI,CACV,CACF,CAAC;IAEF,OAAO,EAAE,UAAU,CAAC,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;IACrC,KAAK,EAAE,UAAU,CAAC;IAClB,MAAM,EAAE,UAAU,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC;IACtC,YAAY,EAAE,UAAU,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC;IAC5C,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,oBAAoB,EAAE,MAAM,EAAE,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,GAAG,CAAC;IACd,OAAO,EAAE,GAAG,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,gBAAgB,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,UAAU,CACzE,mBAAmB,EACnB,MAAM,CACP,CAAC"}
|
|
@@ -5,7 +5,7 @@ declare const useInputFormat: (props: InputFormatProps) => {
|
|
|
5
5
|
onBlur: (e: React.FocusEvent) => void;
|
|
6
6
|
onFocus: (e: React.FocusEvent) => void;
|
|
7
7
|
value: string | undefined;
|
|
8
|
-
type: "search" |
|
|
8
|
+
type: "search" | (string & {}) | "color" | "button" | "time" | "reset" | "submit" | "email" | "url" | "range" | "tel" | "hidden" | "checkbox" | "radio" | "text" | "date" | "datetime-local" | "file" | "image" | "month" | "password" | "week" | undefined;
|
|
9
9
|
};
|
|
10
10
|
export default useInputFormat;
|
|
11
11
|
//# sourceMappingURL=use-input-format.d.ts.map
|
|
@@ -7,7 +7,7 @@ declare const useNumberFormat: (props: InputNumberProps) => {
|
|
|
7
7
|
onBlur: (e: React.FocusEvent<Element, Element>) => void;
|
|
8
8
|
onFocus: (e: React.FocusEvent<Element, Element>) => void;
|
|
9
9
|
value: string | undefined;
|
|
10
|
-
type: "search" |
|
|
10
|
+
type: "search" | (string & {}) | "color" | "button" | "time" | "reset" | "submit" | "email" | "url" | "range" | "tel" | "hidden" | "checkbox" | "radio" | "text" | "date" | "datetime-local" | "file" | "image" | "month" | "password" | "week" | undefined;
|
|
11
11
|
};
|
|
12
12
|
export default useNumberFormat;
|
|
13
13
|
//# sourceMappingURL=use-input-number.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-input-number.d.ts","sourceRoot":"","sources":["use-input-number.ts"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAK3D,QAAA,MAAM,eAAe,UAAW,gBAAgB;;;;;;;;
|
|
1
|
+
{"version":3,"file":"use-input-number.d.ts","sourceRoot":"","sources":["use-input-number.ts"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAK3D,QAAA,MAAM,eAAe,UAAW,gBAAgB;;;;;;;;CAwJ/C,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -66,6 +66,7 @@ var useNumberFormat = function useNumberFormat(props) {
|
|
|
66
66
|
var onInnerChange = usePersistFn(function (val) {
|
|
67
67
|
setInternalInputValue(getStringValue(val));
|
|
68
68
|
if (typeof val === 'string') {
|
|
69
|
+
if (val.endsWith('.')) return;
|
|
69
70
|
var num = parseFloat(val);
|
|
70
71
|
if (val === '') {
|
|
71
72
|
// 如果允许空值,则返回 null,否则返回 undefined
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-popup.d.ts","sourceRoot":"","sources":["use-popup.ts"],"names":[],"mappings":"AAAA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAOhE,QAAA,MAAM,QAAQ,UAAW,cAAc;;;;;;;
|
|
1
|
+
{"version":3,"file":"use-popup.d.ts","sourceRoot":"","sources":["use-popup.ts"],"names":[],"mappings":"AAAA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAOhE,QAAA,MAAM,QAAQ,UAAW,cAAc;;;;;;;0BA8HK;YAAE,MAAM,EAAE,WAAW,GAAG,IAAI,CAAA;SAAE;0BAM9B;YAAE,MAAM,EAAE,WAAW,GAAG,IAAI,CAAA;SAAE;;;;;qBA5B7B;YAAE,MAAM,EAAE,WAAW,GAAG,IAAI,CAAA;SAAE;;;;;;;;;;;;;;;;;;;;;;;;;2BA6ElD,MAAM,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC;6BAGxC,MAAM,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC;;CAsBpE,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -72,6 +72,11 @@ var usePopup = function usePopup(props) {
|
|
|
72
72
|
updatePosition();
|
|
73
73
|
}
|
|
74
74
|
setOpenState(!!props.open);
|
|
75
|
+
|
|
76
|
+
// 外部传了open时,需要正常的触发onCollapse;触发了onCollapse才能让组件内部的edit状态正确,否则可能会出现弹出层打开了但是用户却无法选择的情况
|
|
77
|
+
if (props.open !== undefined) {
|
|
78
|
+
changeOpen(!!props.open);
|
|
79
|
+
}
|
|
75
80
|
}, [props.open]);
|
|
76
81
|
|
|
77
82
|
// const getPopUpHeight = () => {
|
|
@@ -2,9 +2,10 @@ export { default, default as useTableLayout } from './use-table-layout';
|
|
|
2
2
|
export { default as useTableColumns } from './use-table-columns';
|
|
3
3
|
export { default as useTableGroup } from './use-table-group';
|
|
4
4
|
export { default as useTableSort } from './use-table-sort';
|
|
5
|
+
export { default as useTableFilter } from './use-table-filter';
|
|
5
6
|
export { default as useTableRow } from './use-table-row';
|
|
6
7
|
export { default as useTableExpand } from './use-table-expand';
|
|
7
8
|
export { default as useTableTree } from './use-table-tree';
|
|
8
9
|
export { default as useTableVirtual } from './use-table-virtual';
|
|
9
|
-
export type { TableFormatColumn, TableColumnItem, TableHeadColumn, TableGroupColumn, TableSorterInfo, BaseTableProps, } from './use-table.type';
|
|
10
|
+
export type { TableFormatColumn, TableColumnItem, TableHeadColumn, TableGroupColumn, TableSorterInfo, BaseTableProps, TableColumnFilter, TableFilterData, } from './use-table.type';
|
|
10
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEjE,YAAY,EACV,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEjE,YAAY,EACV,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,eAAe,GAChB,MAAM,kBAAkB,CAAC"}
|
|
@@ -3,6 +3,7 @@ export { default, default as useTableLayout } from "./use-table-layout";
|
|
|
3
3
|
export { default as useTableColumns } from "./use-table-columns";
|
|
4
4
|
export { default as useTableGroup } from "./use-table-group";
|
|
5
5
|
export { default as useTableSort } from "./use-table-sort";
|
|
6
|
+
export { default as useTableFilter } from "./use-table-filter";
|
|
6
7
|
export { default as useTableRow } from "./use-table-row";
|
|
7
8
|
export { default as useTableExpand } from "./use-table-expand";
|
|
8
9
|
export { default as useTableTree } from "./use-table-tree";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TableColumnItem, BaseTableProps } from './use-table.type';
|
|
3
|
+
import { KeygenResult } from '../../common/type';
|
|
4
|
+
export interface UseTableFilterProps<Item = any> extends Pick<BaseTableProps<Item>, 'onSortCancel' | 'sorter' | 'data'> {
|
|
5
|
+
columns?: TableColumnItem<Item>[];
|
|
6
|
+
}
|
|
7
|
+
export interface FilterInfo<T> {
|
|
8
|
+
value?: any;
|
|
9
|
+
onFilter?: (value: any, row: T) => boolean;
|
|
10
|
+
}
|
|
11
|
+
export type FilterMap<T> = Map<KeygenResult, FilterInfo<T>>;
|
|
12
|
+
declare const useTableFilter: <Item = any>(props: UseTableFilterProps<Item>) => {
|
|
13
|
+
filterInfo: FilterMap<Item>;
|
|
14
|
+
setFilterInfo: import("react").Dispatch<import("react").SetStateAction<FilterMap<Item>>>;
|
|
15
|
+
filteredData: Item[] | undefined;
|
|
16
|
+
onFilterChange: (columnKey: KeygenResult, value: any) => void;
|
|
17
|
+
};
|
|
18
|
+
export default useTableFilter;
|
|
19
|
+
//# sourceMappingURL=use-table-filter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-table-filter.d.ts","sourceRoot":"","sources":["use-table-filter.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEnE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,WAAW,mBAAmB,CAAC,IAAI,GAAG,GAAG,CAC7C,SAAQ,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,cAAc,GAAG,QAAQ,GAAG,MAAM,CAAC;IACtE,OAAO,CAAC,EAAE,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC;CACnC;AACD,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,KAAK,CAAC,EAAE,GAAG,CAAA;IACX,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,KAAK,OAAO,CAAC;CAC5C;AAED,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,GAAG,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AAE5D,QAAA,MAAM,cAAc;;;;gCA6BH,YAAY,SAAS,GAAG;CAoDxC,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
|
+
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."); }
|
|
9
|
+
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); }
|
|
10
|
+
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; }
|
|
11
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
+
import { useState, useMemo, useEffect } from 'react';
|
|
14
|
+
import usePersistFn from "../../common/use-persist-fn";
|
|
15
|
+
import { isFunc } from "../../utils/is";
|
|
16
|
+
var useTableFilter = function useTableFilter(props) {
|
|
17
|
+
var _useState = useState(new Map()),
|
|
18
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
19
|
+
filterInfo = _useState2[0],
|
|
20
|
+
setFilterInfo = _useState2[1];
|
|
21
|
+
var activeFilters = useMemo(function () {
|
|
22
|
+
return Array.from(filterInfo.keys()).filter(function (key) {
|
|
23
|
+
var _filterInfo$get;
|
|
24
|
+
return ((_filterInfo$get = filterInfo.get(key)) === null || _filterInfo$get === void 0 ? void 0 : _filterInfo$get.value) !== undefined;
|
|
25
|
+
});
|
|
26
|
+
}, [filterInfo]);
|
|
27
|
+
var filteredData = useMemo(function () {
|
|
28
|
+
var _props$data;
|
|
29
|
+
if (activeFilters.length === 0) return props.data;
|
|
30
|
+
return (_props$data = props.data) === null || _props$data === void 0 ? void 0 : _props$data.filter(function (item) {
|
|
31
|
+
return activeFilters.every(function (key) {
|
|
32
|
+
var filter = filterInfo.get(key);
|
|
33
|
+
if ((filter === null || filter === void 0 ? void 0 : filter.value) === undefined) return true;
|
|
34
|
+
if (Array.isArray(filter.value) && filter.value.length === 0) return true;
|
|
35
|
+
if (filter !== null && filter !== void 0 && filter.onFilter && isFunc(filter.onFilter)) {
|
|
36
|
+
return filter.onFilter(filter.value, item);
|
|
37
|
+
}
|
|
38
|
+
return true;
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
}, [activeFilters, props.data]);
|
|
42
|
+
var onFilterChange = usePersistFn(function (columnKey, value) {
|
|
43
|
+
// TODO: 暂未开放reset全部筛选条件
|
|
44
|
+
if (columnKey === '__reset__') {
|
|
45
|
+
setFilterInfo(function (prev) {
|
|
46
|
+
var next = new Map(prev);
|
|
47
|
+
next.forEach(function (v, k) {
|
|
48
|
+
next.set(k, _objectSpread(_objectSpread({}, v), {}, {
|
|
49
|
+
value: undefined
|
|
50
|
+
}));
|
|
51
|
+
});
|
|
52
|
+
return next;
|
|
53
|
+
});
|
|
54
|
+
} else {
|
|
55
|
+
setFilterInfo(function (prev) {
|
|
56
|
+
var _prev$get;
|
|
57
|
+
var next = new Map(prev);
|
|
58
|
+
next.set(columnKey, {
|
|
59
|
+
value: value,
|
|
60
|
+
onFilter: (_prev$get = prev.get(columnKey)) === null || _prev$get === void 0 ? void 0 : _prev$get.onFilter
|
|
61
|
+
});
|
|
62
|
+
return next;
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
// 根据columns生成filterInfo
|
|
68
|
+
useEffect(function () {
|
|
69
|
+
var _props$columns;
|
|
70
|
+
var _filterInfo = props === null || props === void 0 || (_props$columns = props.columns) === null || _props$columns === void 0 ? void 0 : _props$columns.reduce(function (acc, column, index) {
|
|
71
|
+
var _column$filter;
|
|
72
|
+
if (!column.filter) return acc;
|
|
73
|
+
var columnKey = typeof column.render === 'string' ? column.render : String(index);
|
|
74
|
+
acc.set(columnKey, {
|
|
75
|
+
value: undefined,
|
|
76
|
+
onFilter: (_column$filter = column.filter) === null || _column$filter === void 0 ? void 0 : _column$filter.onFilter
|
|
77
|
+
});
|
|
78
|
+
return acc;
|
|
79
|
+
}, new Map());
|
|
80
|
+
if (_filterInfo) setFilterInfo(_filterInfo);
|
|
81
|
+
}, [props.columns]);
|
|
82
|
+
return {
|
|
83
|
+
filterInfo: filterInfo,
|
|
84
|
+
setFilterInfo: setFilterInfo,
|
|
85
|
+
filteredData: filteredData,
|
|
86
|
+
onFilterChange: onFilterChange
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
export default useTableFilter;
|
|
@@ -139,6 +139,93 @@ export interface TableColumnSorter {
|
|
|
139
139
|
export interface ColumnRenderFunc<DataItem> {
|
|
140
140
|
(data: DataItem, index: number, checkInstance?: React.ReactComponentElement<any>): React.ReactNode | (() => React.ReactNode);
|
|
141
141
|
}
|
|
142
|
+
export interface TableColumnFilterBase<DataItem> {
|
|
143
|
+
/**
|
|
144
|
+
* @cn 筛选模式: search 搜索模式, select 选择模式
|
|
145
|
+
* @en Filter mode: search search mode, select select mode
|
|
146
|
+
*/
|
|
147
|
+
mode: 'search' | 'select';
|
|
148
|
+
/**
|
|
149
|
+
* @cn 筛选数据的函数
|
|
150
|
+
* @en Filter data function
|
|
151
|
+
* @param value 筛选值
|
|
152
|
+
* @param row 行数据
|
|
153
|
+
* @returns 是否通过筛选
|
|
154
|
+
*/
|
|
155
|
+
onFilter: (value: any, row: DataItem) => boolean;
|
|
156
|
+
/**
|
|
157
|
+
* @cn 自定义的筛选项图标
|
|
158
|
+
* @en Custom filter icon
|
|
159
|
+
*/
|
|
160
|
+
icon?: React.ReactNode;
|
|
161
|
+
}
|
|
162
|
+
export type TableFilterData = {
|
|
163
|
+
label: string;
|
|
164
|
+
value: any;
|
|
165
|
+
icon?: React.ReactNode;
|
|
166
|
+
[key: string]: any;
|
|
167
|
+
children?: TableFilterData[];
|
|
168
|
+
};
|
|
169
|
+
export interface SelectModeColumnFilter<DataItem> extends TableColumnFilterBase<DataItem> {
|
|
170
|
+
/**
|
|
171
|
+
* @cn 筛选模式为 select 时
|
|
172
|
+
* @en Filter mode is select
|
|
173
|
+
*/
|
|
174
|
+
mode: 'select';
|
|
175
|
+
/**
|
|
176
|
+
* 必填的 `config` 字段
|
|
177
|
+
*/
|
|
178
|
+
config: {
|
|
179
|
+
/**
|
|
180
|
+
* @cn 筛选项数据
|
|
181
|
+
* @en Filter item data
|
|
182
|
+
*/
|
|
183
|
+
data: Array<TableFilterData>;
|
|
184
|
+
/**
|
|
185
|
+
* @cn 自定义渲染筛选项
|
|
186
|
+
* @en Custom rendering filter options
|
|
187
|
+
* @default (data) => data.label
|
|
188
|
+
*/
|
|
189
|
+
renderItem?: ((item: TableFilterData) => React.ReactNode) | ObjectKey<TableFilterData>;
|
|
190
|
+
/**
|
|
191
|
+
* @cn 是否多选
|
|
192
|
+
* @en Whether to multiple select
|
|
193
|
+
*/
|
|
194
|
+
multiple?: boolean;
|
|
195
|
+
/**
|
|
196
|
+
* @cn 是否开启顶部的搜索框
|
|
197
|
+
* @en Whether to open the top search box
|
|
198
|
+
*/
|
|
199
|
+
search?: boolean;
|
|
200
|
+
/**
|
|
201
|
+
* @cn 是否高亮命中的关键词,仅当 search 为 true 时有效
|
|
202
|
+
* @en Whether to highlight the hit keywords
|
|
203
|
+
*/
|
|
204
|
+
highlight?: boolean;
|
|
205
|
+
};
|
|
206
|
+
/**
|
|
207
|
+
* @cn 筛选数据的函数
|
|
208
|
+
* @en Filter data function
|
|
209
|
+
* @param value 筛选值,单选时为单个值,多选时为数组
|
|
210
|
+
* @param row 行数据
|
|
211
|
+
* @returns 是否通过筛选
|
|
212
|
+
*/
|
|
213
|
+
onFilter: (value: any, row: DataItem) => boolean;
|
|
214
|
+
}
|
|
215
|
+
export interface SearchModeColumnFilter<DataItem> extends TableColumnFilterBase<DataItem> {
|
|
216
|
+
/**
|
|
217
|
+
* 筛选模式为 search 时
|
|
218
|
+
*/
|
|
219
|
+
mode: 'search';
|
|
220
|
+
/**
|
|
221
|
+
* 此时不允许传 `config`
|
|
222
|
+
*/
|
|
223
|
+
config?: never;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* 最终的联合类型
|
|
227
|
+
*/
|
|
228
|
+
export type TableColumnFilter<DataItem> = SelectModeColumnFilter<DataItem> | SearchModeColumnFilter<DataItem>;
|
|
142
229
|
/**
|
|
143
230
|
* @title TableColumn
|
|
144
231
|
*/
|
|
@@ -227,6 +314,12 @@ export interface TableColumnItem<DataItem> {
|
|
|
227
314
|
* @version 3.5.0
|
|
228
315
|
*/
|
|
229
316
|
sortDirections?: ('asc' | 'desc')[];
|
|
317
|
+
/**
|
|
318
|
+
* @cn 列的筛选配置
|
|
319
|
+
* @en Column filter configuration
|
|
320
|
+
* @version 3.6.0
|
|
321
|
+
*/
|
|
322
|
+
filter?: TableColumnFilter<DataItem>;
|
|
230
323
|
/**
|
|
231
324
|
* @en The content of the header
|
|
232
325
|
* @cn 表头显示内容
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-table.type.d.ts","sourceRoot":"","sources":["use-table.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAE,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