@sheinx/hooks 3.6.0-beta.3 → 3.6.0-beta.30
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-filter/use-filter.d.ts.map +1 -1
- 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/check-border.d.ts +6 -0
- package/cjs/common/use-position-style/check-border.d.ts.map +1 -0
- package/cjs/common/use-position-style/check-border.js +35 -0
- package/cjs/common/use-position-style/get-position-style.d.ts +1 -0
- package/cjs/common/use-position-style/get-position-style.d.ts.map +1 -1
- package/cjs/common/use-position-style/get-position-style.js +14 -8
- package/cjs/common/use-position-style/index.d.ts +1 -0
- package/cjs/common/use-position-style/index.d.ts.map +1 -1
- package/cjs/common/use-position-style/index.js +21 -10
- package/cjs/components/use-cascader/use-cascader.d.ts.map +1 -1
- package/cjs/components/use-cascader/use-cascader.type.d.ts +2 -1
- package/cjs/components/use-cascader/use-cascader.type.d.ts.map +1 -1
- 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-fieldset/fieldset-context.d.ts +1 -1
- package/cjs/components/use-form/use-form-fieldset/fieldset-context.d.ts.map +1 -1
- package/cjs/components/use-form/use-form-fieldset/fieldset-context.js +3 -2
- package/cjs/components/use-form/use-form-fieldset/index.d.ts +1 -0
- package/cjs/components/use-form/use-form-fieldset/index.d.ts.map +1 -1
- package/cjs/components/use-form/use-form-fieldset/index.js +6 -0
- 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 +19 -9
- package/cjs/components/use-form/use-form.type.d.ts +3 -1
- 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-format.d.ts.map +1 -1
- package/cjs/components/use-input/use-input-format.js +12 -4
- 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-tree.d.ts +13 -0
- package/cjs/components/use-table/use-table-tree.d.ts.map +1 -1
- package/cjs/components/use-table/use-table-tree.js +68 -1
- package/cjs/components/use-table/use-table-virtual.d.ts.map +1 -1
- package/cjs/components/use-table/use-table-virtual.js +6 -4
- 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/index.d.ts +3 -2
- package/cjs/components/use-tree/index.d.ts.map +1 -1
- package/cjs/components/use-tree/index.js +18 -2
- package/cjs/components/use-tree/use-tree-node.d.ts.map +1 -1
- package/cjs/components/use-tree/use-tree-node.js +1 -5
- package/cjs/components/use-tree/use-tree-node.type.d.ts +18 -0
- package/cjs/components/use-tree/use-tree-node.type.d.ts.map +1 -1
- package/cjs/components/use-tree/use-tree-virtual-node.d.ts +13 -0
- package/cjs/components/use-tree/use-tree-virtual-node.d.ts.map +1 -0
- package/cjs/components/use-tree/use-tree-virtual-node.js +92 -0
- package/cjs/components/use-tree/use-tree.d.ts.map +1 -1
- package/cjs/components/use-tree/use-tree.js +236 -18
- package/cjs/components/use-tree/use-tree.type.d.ts +35 -1
- 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/is.d.ts +2 -0
- package/cjs/utils/is.d.ts.map +1 -1
- package/cjs/utils/is.js +5 -2
- package/cjs/utils/lazyload.d.ts.map +1 -1
- package/cjs/utils/lazyload.js +2 -2
- package/cjs/utils/object.d.ts.map +1 -1
- package/cjs/utils/object.js +6 -1
- package/cjs/utils/warning.js +5 -5
- package/esm/common/use-filter/use-filter.d.ts.map +1 -1
- 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/check-border.d.ts +6 -0
- package/esm/common/use-position-style/check-border.d.ts.map +1 -0
- package/esm/common/use-position-style/check-border.js +29 -0
- package/esm/common/use-position-style/get-position-style.d.ts +1 -0
- package/esm/common/use-position-style/get-position-style.d.ts.map +1 -1
- package/esm/common/use-position-style/get-position-style.js +14 -8
- package/esm/common/use-position-style/index.d.ts +1 -0
- package/esm/common/use-position-style/index.d.ts.map +1 -1
- package/esm/common/use-position-style/index.js +21 -10
- package/esm/components/use-cascader/use-cascader.d.ts.map +1 -1
- package/esm/components/use-cascader/use-cascader.type.d.ts +2 -1
- package/esm/components/use-cascader/use-cascader.type.d.ts.map +1 -1
- 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-fieldset/fieldset-context.d.ts +1 -1
- package/esm/components/use-form/use-form-fieldset/fieldset-context.d.ts.map +1 -1
- package/esm/components/use-form/use-form-fieldset/fieldset-context.js +2 -1
- package/esm/components/use-form/use-form-fieldset/index.d.ts +1 -0
- package/esm/components/use-form/use-form-fieldset/index.d.ts.map +1 -1
- package/esm/components/use-form/use-form-fieldset/index.js +2 -1
- 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 +19 -9
- package/esm/components/use-form/use-form.type.d.ts +3 -1
- 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-format.d.ts.map +1 -1
- package/esm/components/use-input/use-input-format.js +12 -4
- 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-tree.d.ts +13 -0
- package/esm/components/use-table/use-table-tree.d.ts.map +1 -1
- package/esm/components/use-table/use-table-tree.js +67 -0
- package/esm/components/use-table/use-table-virtual.d.ts.map +1 -1
- package/esm/components/use-table/use-table-virtual.js +6 -4
- 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/index.d.ts +3 -2
- package/esm/components/use-tree/index.d.ts.map +1 -1
- package/esm/components/use-tree/index.js +3 -2
- package/esm/components/use-tree/use-tree-node.d.ts.map +1 -1
- package/esm/components/use-tree/use-tree-node.js +1 -5
- package/esm/components/use-tree/use-tree-node.type.d.ts +18 -0
- package/esm/components/use-tree/use-tree-node.type.d.ts.map +1 -1
- package/esm/components/use-tree/use-tree-virtual-node.d.ts +13 -0
- package/esm/components/use-tree/use-tree-virtual-node.d.ts.map +1 -0
- package/esm/components/use-tree/use-tree-virtual-node.js +85 -0
- package/esm/components/use-tree/use-tree.d.ts.map +1 -1
- package/esm/components/use-tree/use-tree.js +238 -20
- package/esm/components/use-tree/use-tree.type.d.ts +35 -1
- 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/is.d.ts +2 -0
- package/esm/utils/is.d.ts.map +1 -1
- package/esm/utils/is.js +4 -1
- package/esm/utils/lazyload.d.ts.map +1 -1
- package/esm/utils/lazyload.js +3 -3
- package/esm/utils/object.d.ts.map +1 -1
- package/esm/utils/object.js +6 -1
- package/esm/utils/warning.js +5 -5
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-tree.type.d.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C;IAC5C,WAAW,EAAE,CACX,EAAE,EAAE,YAAY,KACb,QAAQ,GAAG;QAAE,oBAAoB,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,YAAY,GAAG,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC;IACrF,UAAU,EAAE,CAAC,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;IAC3D,YAAY,EAAE,CAAC,EAAE,EAAE,YAAY,KAAK,IAAI,CAAC;IACzC,WAAW,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC;IACpC,SAAS,EAAE,GAAG,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,QAAQ,EAAE,CAAC;IACjB,QAAQ,EAAE,YAAY,CAAC,QAAQ,CAAC,EAAE,CAAC;IACnC,OAAO,EAAE,GAAG,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;IACzC,OAAO,EAAE,GAAG,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IACrC,QAAQ,EAAE,GAAG,CAAC,YAAY,EAAE,iBAAiB,CAAC,CAAC;IAC/C,iBAAiB,EAAE,GAAG,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;CACnD"}
|
@@ -7,7 +7,7 @@ declare const useTiled: <DataItem>(props: UseTiledProps<DataItem>) => {
|
|
7
7
|
} | {
|
8
8
|
data: any;
|
9
9
|
onFilter: (text: string, from?: string) => void;
|
10
|
-
expandIcons: ((item: DataItem) => string | number | boolean | import("react").
|
10
|
+
expandIcons: ((item: DataItem) => string | number | boolean | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined)[];
|
11
11
|
};
|
12
12
|
export default useTiled;
|
13
13
|
//# sourceMappingURL=use-tiled.d.ts.map
|
@@ -13,7 +13,7 @@ export declare const addResizeObserver: (el: HTMLElement, handler: any, options?
|
|
13
13
|
}) => () => void;
|
14
14
|
export declare function getParent(el: HTMLElement | null | Element, target?: string | HTMLElement): Element | null;
|
15
15
|
export declare function getClosestScrollContainer(element: HTMLElement | null): HTMLElement | null;
|
16
|
-
export declare function
|
16
|
+
export declare function getClosestPositionedContainer(element: Element | HTMLElement | null, positions?: React.CSSProperties['position'][]): HTMLElement | null;
|
17
17
|
export declare function cssSupport(attr: keyof CSSStyleDeclaration, value: string): boolean;
|
18
18
|
export declare const parsePxToNumber: (str: string) => number;
|
19
19
|
export declare const getFieldId: (name?: string, formName?: string) => string | undefined;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"element.d.ts","sourceRoot":"","sources":["element.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B;;;;;;GAMG;AACH,wBAAgB,QAAQ,CACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,EACzB,WAAW,UAAQ,EACnB,SAAS,CAAC,EAAE,MAAM,GACjB,KAAK,CAAC,SAAS,CASjB;AAGD,eAAO,MAAM,iBAAiB,OACxB,WAAW,WACN,GAAG;;;gBA4Cb,CAAC;AAEF,wBAAgB,SAAS,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,GAAG,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,WAAW,kBAmBxF;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,WAAW,GAAG,IAAI,CAmCzF;AAED,wBAAgB,
|
1
|
+
{"version":3,"file":"element.d.ts","sourceRoot":"","sources":["element.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B;;;;;;GAMG;AACH,wBAAgB,QAAQ,CACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,EACzB,WAAW,UAAQ,EACnB,SAAS,CAAC,EAAE,MAAM,GACjB,KAAK,CAAC,SAAS,CASjB;AAGD,eAAO,MAAM,iBAAiB,OACxB,WAAW,WACN,GAAG;;;gBA4Cb,CAAC;AAEF,wBAAgB,SAAS,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,GAAG,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,WAAW,kBAmBxF;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,WAAW,GAAG,IAAI,CAmCzF;AAED,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,OAAO,GAAG,WAAW,GAAG,IAAI,EACrC,SAAS,GAAE,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,EAA0B,sBAuBrE;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,mBAAmB,EAAE,KAAK,EAAE,MAAM,WAYxE;AAED,eAAO,MAAM,eAAe,QAAS,MAAM,WAAwC,CAAC;AAEpF,eAAO,MAAM,UAAU,UAAW,MAAM,aAAa,MAAM,uBAG1D,CAAC"}
|
package/cjs/utils/dom/element.js
CHANGED
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.addResizeObserver = void 0;
|
7
7
|
exports.cssSupport = cssSupport;
|
8
|
-
exports.
|
8
|
+
exports.getClosestPositionedContainer = getClosestPositionedContainer;
|
9
9
|
exports.getClosestScrollContainer = getClosestScrollContainer;
|
10
10
|
exports.getFieldId = void 0;
|
11
11
|
exports.getParent = getParent;
|
@@ -158,13 +158,15 @@ function getClosestScrollContainer(element) {
|
|
158
158
|
// 如果没有找到可滚动的祖先,返回 body 或 documentElement
|
159
159
|
return document.scrollingElement || document.documentElement;
|
160
160
|
}
|
161
|
-
function
|
161
|
+
function getClosestPositionedContainer(element) {
|
162
|
+
var positions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ['fixed', 'absolute'];
|
162
163
|
if (!element) {
|
163
164
|
return null;
|
164
165
|
}
|
165
166
|
var isFixable = function isFixable(el) {
|
166
167
|
var style = window.getComputedStyle(el);
|
167
|
-
|
168
|
+
var position = style.position;
|
169
|
+
return positions.includes(position);
|
168
170
|
};
|
169
171
|
|
170
172
|
// 遍历父元素
|
package/cjs/utils/is.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import { ObjectType } from '../common/type';
|
2
|
+
import { DisabledOption } from '../components/use-tree/use-tree.type';
|
2
3
|
import { UnMatchedData } from '../common/use-list-select/use-list.type';
|
3
4
|
import React from 'react';
|
4
5
|
export declare function isBrowser(): boolean;
|
@@ -25,4 +26,5 @@ export declare function isNamedComponent(type: any): type is React.ForwardRefExo
|
|
25
26
|
export declare const isMacOS: () => boolean;
|
26
27
|
export declare const isFirefox: () => boolean;
|
27
28
|
export declare function isDomElement(element: any): element is HTMLElement;
|
29
|
+
export declare const isOptionalDisabled: <DataItem>(disabled: unknown) => disabled is DisabledOption<DataItem>;
|
28
30
|
//# sourceMappingURL=is.d.ts.map
|
package/cjs/utils/is.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"is.d.ts","sourceRoot":"","sources":["is.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACxE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,wBAAgB,SAAS,YAExB;AASD,eAAO,MAAM,OAAO,4BAAgB,CAAC;AACrC,eAAO,MAAM,QAAQ,QAAS,OAAO,sBACc,CAAC;AACpD,eAAO,MAAM,MAAM,QAAS,OAAO,gBAAqC,CAAC;AACzE,eAAO,MAAM,SAAS,QAAS,OAAO,mBAA2C,CAAC;AAClF,eAAO,MAAM,OAAO,QAAS,OAAO,KAAG,OAA+B,CAAC;AACvE,eAAO,MAAM,QAAQ,MAAO,OAAO,gBAAuC,CAAC;AAC3E,eAAO,MAAM,QAAQ,QAAS,OAAO,KAAG,OAAgC,CAAC;AACzE,eAAO,MAAM,QAAQ,MAAO,OAAO,gBAAuC,CAAC;AAC3E,eAAO,MAAM,WAAW,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@@ exports.isDate = exports.isBuffer = void 0;
|
|
9
9
|
exports.isDomElement = isDomElement;
|
10
10
|
exports.isMergeable = exports.isMap = exports.isMacOS = exports.isLink = exports.isFunc = exports.isFirefox = exports.isError = exports.isEmpty = void 0;
|
11
11
|
exports.isNamedComponent = isNamedComponent;
|
12
|
-
exports.isUndefined = exports.isUnMatchedData = exports.isString = exports.isSet = exports.isRegexp = exports.isPromise = exports.isObject = exports.isNumber = exports.isNan = void 0;
|
12
|
+
exports.isUndefined = exports.isUnMatchedData = exports.isString = exports.isSet = exports.isRegexp = exports.isPromise = exports.isOptionalDisabled = exports.isObject = exports.isNumber = exports.isNan = void 0;
|
13
13
|
var _react = _interopRequireDefault(require("react"));
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15
15
|
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); }
|
@@ -111,4 +111,7 @@ var isFirefox = exports.isFirefox = function isFirefox() {
|
|
111
111
|
function isDomElement(element) {
|
112
112
|
return (typeof HTMLElement === "undefined" ? "undefined" : _typeof(HTMLElement)) === 'object' ? element instanceof HTMLElement // DOM2
|
113
113
|
: element && _typeof(element) === 'object' && element !== null && element.nodeType === 1 && typeof element.nodeName === 'string';
|
114
|
-
}
|
114
|
+
}
|
115
|
+
var isOptionalDisabled = exports.isOptionalDisabled = function isOptionalDisabled(disabled) {
|
116
|
+
return isObject(disabled) && disabled.hasOwnProperty('isRealtime');
|
117
|
+
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"lazyload.d.ts","sourceRoot":"","sources":["lazyload.ts"],"names":[],"mappings":"AAKA,KAAK,UAAU,GAAG;IAChB,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,oBAAoB,CAAC;CACjC,CAAC;AAsBF,wBAAgB,QAAQ,SAgBvB;AAWD,wBAAgB,WAAW,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,cAAc,CAAC,EAAE,OAAO,QAUvE;
|
1
|
+
{"version":3,"file":"lazyload.d.ts","sourceRoot":"","sources":["lazyload.ts"],"names":[],"mappings":"AAKA,KAAK,UAAU,GAAG;IAChB,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,oBAAoB,CAAC;CACjC,CAAC;AAsBF,wBAAgB,QAAQ,SAgBvB;AAWD,wBAAgB,WAAW,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,cAAc,CAAC,EAAE,OAAO,QAUvE;AA0BD,wBAAgB,QAAQ,CAAC,GAAG,EAAE,UAAU,iBA4BvC"}
|
package/cjs/utils/lazyload.js
CHANGED
@@ -19,7 +19,6 @@ var getRect = function getRect(el) {
|
|
19
19
|
if (el) {
|
20
20
|
_utils.devUseWarning.error("the ".concat(el, " is not a element"));
|
21
21
|
}
|
22
|
-
;
|
23
22
|
return {
|
24
23
|
top: 0,
|
25
24
|
bottom: winHeight
|
@@ -75,13 +74,14 @@ function getObserver(obj, id) {
|
|
75
74
|
render = obj.render,
|
76
75
|
offscreen = obj.offscreen,
|
77
76
|
noRemove = obj.noRemove;
|
78
|
-
var fixedContainer = (0, _element.
|
77
|
+
var fixedContainer = (0, _element.getClosestPositionedContainer)(element, ['fixed', 'absolute']);
|
79
78
|
var observer = new IntersectionObserver(function (entries) {
|
80
79
|
entries.forEach(function (en) {
|
81
80
|
if (en.isIntersecting || en.intersectionRatio > 0) {
|
82
81
|
render();
|
83
82
|
if (!noRemove) removeStack(id);
|
84
83
|
} else {
|
84
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
85
85
|
offscreen && offscreen();
|
86
86
|
}
|
87
87
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["object.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,UAGvC;AASD,UAAU,WAAW;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAGD,eAAO,MAAM,YAAY,QAAS,UAAU,UAG3C,CAAC;AAGF,eAAO,MAAM,SAAS,2CAEZ,UAAU,YACT,WAAW,eAwBrB,CAAC;AAEF,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,+DA4BxC;AAED,UAAU,cAAc;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,OAAO,WACV,UAAU,QACZ,MAAM,SACL,GAAG,YACD,cAAc,eAiDxB,CAAC;AAEF,eAAO,MAAM,OAAO,WAAY,UAAU,QAAQ,MAAM,YAAW,WAAW,YAyB7E,CAAC;AAEF,eAAO,MAAM,UAA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AAM,YAAW,WAAW,YAyB7E,CAAC;AAEF,eAAO,MAAM,UAAU,WAAY,UAAU,QAAQ,MAAM,eA0B1D,CAAC;AAEF,eAAO,MAAM,OAAO,WAAY,UAAU,QAAQ,MAAM,YAavD,CAAC;AAEF,eAAO,MAAM,OAAO,QAAS,UAAU,YAItC,CAAC;AAEF,eAAO,MAAM,WAAW,wFAQvB,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,QAAS,UAAU,cAAa,MAAM,KAAQ,MAAM,EAoB9E,CAAC;AAGF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB,WAAY,MAAM,GAAG,MAAM,EAAE,aAAa,MAAM,EAAE,KAAG,MAAM,EAmB3F,CAAA"}
|
package/cjs/utils/object.js
CHANGED
@@ -320,6 +320,9 @@ var getCompleteFieldKeys = exports.getCompleteFieldKeys = function getCompleteFi
|
|
320
320
|
var completeFields = [];
|
321
321
|
fieldsArray.forEach(function (field) {
|
322
322
|
var na = "".concat(field, "[");
|
323
|
+
if (field.endsWith(']')) {
|
324
|
+
na = field;
|
325
|
+
}
|
323
326
|
var no = "".concat(field, ".");
|
324
327
|
completeFields.push(field);
|
325
328
|
var childFields = allFields.filter(function (f) {
|
@@ -329,5 +332,7 @@ var getCompleteFieldKeys = exports.getCompleteFieldKeys = function getCompleteFi
|
|
329
332
|
completeFields.push.apply(completeFields, _toConsumableArray(childFields));
|
330
333
|
}
|
331
334
|
});
|
332
|
-
|
335
|
+
|
336
|
+
// 返回之前去重
|
337
|
+
return Array.from(new Set(completeFields));
|
333
338
|
};
|
package/cjs/utils/warning.js
CHANGED
@@ -15,29 +15,29 @@ var shouldShowMessage = function shouldShowMessage(message) {
|
|
15
15
|
var deprecated = function deprecated(prop, newProp, component, extraMessage) {
|
16
16
|
if (process.env.NODE_ENV !== 'production') {
|
17
17
|
var msg = "[shineout] '".concat(prop, "' in ").concat(component, " component is deprecated, please use '").concat(newProp, "' instead. ").concat(extraMessage);
|
18
|
-
shouldShowMessage(msg)
|
18
|
+
if (shouldShowMessage(msg)) console.error(msg);
|
19
19
|
}
|
20
20
|
};
|
21
21
|
var breakingChange = function breakingChange(message) {
|
22
22
|
if (process.env.NODE_ENV !== 'production') {
|
23
23
|
var msg = "[shineout] ".concat(message);
|
24
|
-
shouldShowMessage(msg)
|
24
|
+
if (shouldShowMessage(msg)) console.error(msg);
|
25
25
|
}
|
26
26
|
};
|
27
27
|
var devWarn = function devWarn(message) {
|
28
28
|
if (process.env.NODE_ENV !== 'production') {
|
29
|
-
shouldShowMessage(message)
|
29
|
+
if (shouldShowMessage(message)) console.warn("[shineout] ".concat(message));
|
30
30
|
}
|
31
31
|
};
|
32
32
|
var conflictWarning = function conflictWarning(component, prop1, prop2) {
|
33
33
|
if (process.env.NODE_ENV !== 'production') {
|
34
34
|
var msg = "[shineout] ".concat(prop1, " and ").concat(prop2, " cannot be used at the same time in ").concat(component, ".");
|
35
|
-
shouldShowMessage(msg)
|
35
|
+
if (shouldShowMessage(msg)) console.warn(msg);
|
36
36
|
}
|
37
37
|
};
|
38
38
|
var error = function error(message) {
|
39
39
|
var msg = new Error("[shineout] ".concat(message));
|
40
|
-
shouldShowMessage(msg.message)
|
40
|
+
if (shouldShowMessage(msg.message)) console.error(msg);
|
41
41
|
};
|
42
42
|
var devUseWarning = exports.devUseWarning = {
|
43
43
|
error: error,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-filter.d.ts","sourceRoot":"","sources":["use-filter.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,QAAA,MAAM,SAAS;;;;;;;;;;kCAmBkD,OAAO;sBAiB1C,MAAM;sBAKN,MAAM,SAAQ,MAAM;;
|
1
|
+
{"version":3,"file":"use-filter.d.ts","sourceRoot":"","sources":["use-filter.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,cAAc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AAM,GAAG,SAAS,CAAC;CAC3B;AAED,QAAA,MAAM,iBAAiB,UAAW,mBAAmB;;;;;;;;;;;;;wBAKP,MAAM,YAAY,MAAM;CA0CrE,CAAC;AAEF,eAAe,iBAAiB,CAAC;AAEjC,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
@@ -33,8 +33,13 @@ var usePaginationList = function usePaginationList(props) {
|
|
33
33
|
var _props$total;
|
34
34
|
if (!shouldPage) return {};
|
35
35
|
var total = (_props$total = props.total) !== null && _props$total !== void 0 ? _props$total : Array.isArray(data) ? data.length : 0;
|
36
|
+
var finalCurrent = props.current || current;
|
37
|
+
var maxCurrent = Math.ceil(total / (props.pageSize || pageSize));
|
38
|
+
if (current > maxCurrent) {
|
39
|
+
finalCurrent = 1;
|
40
|
+
}
|
36
41
|
return {
|
37
|
-
current:
|
42
|
+
current: finalCurrent,
|
38
43
|
pageSize: props.pageSize || pageSize,
|
39
44
|
total: total,
|
40
45
|
disabled: !!props.loading,
|
@@ -0,0 +1,6 @@
|
|
1
|
+
interface UseCheckElementBorderWidthOptions {
|
2
|
+
direction?: 'horizontal' | 'vertical';
|
3
|
+
}
|
4
|
+
export declare const useCheckElementBorderWidth: (elementRef: React.RefObject<HTMLElement>, options?: UseCheckElementBorderWidthOptions) => number;
|
5
|
+
export {};
|
6
|
+
//# sourceMappingURL=check-border.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"check-border.d.ts","sourceRoot":"","sources":["check-border.ts"],"names":[],"mappings":"AAEA,UAAU,iCAAiC;IAGzC,SAAS,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;CACvC;AAGD,eAAO,MAAM,0BAA0B,eACzB,MAAM,SAAS,CAAC,WAAW,CAAC,YAC/B,iCAAiC,KACzC,MAqBF,CAAC"}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
2
|
+
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."); }
|
3
|
+
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); }
|
4
|
+
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; }
|
5
|
+
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; } }
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
7
|
+
import { useCallback, useEffect, useState } from 'react';
|
8
|
+
export var useCheckElementBorderWidth = function useCheckElementBorderWidth(elementRef) {
|
9
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
10
|
+
var _useState = useState(0),
|
11
|
+
_useState2 = _slicedToArray(_useState, 2),
|
12
|
+
borderWidth = _useState2[0],
|
13
|
+
setBorderWidth = _useState2[1];
|
14
|
+
|
15
|
+
// 获取指定方向上的border宽度之和
|
16
|
+
var getBorderWidth = useCallback(function () {
|
17
|
+
if (elementRef.current) {
|
18
|
+
var _options$direction = options.direction,
|
19
|
+
direction = _options$direction === void 0 ? 'horizontal' : _options$direction;
|
20
|
+
var style = window.getComputedStyle(elementRef.current);
|
21
|
+
var _borderWidth = direction === 'horizontal' ? parseFloat(style.borderLeftWidth) + parseFloat(style.borderRightWidth) : parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);
|
22
|
+
setBorderWidth(_borderWidth);
|
23
|
+
}
|
24
|
+
}, [elementRef]);
|
25
|
+
useEffect(function () {
|
26
|
+
getBorderWidth();
|
27
|
+
}, [getBorderWidth]);
|
28
|
+
return borderWidth;
|
29
|
+
};
|
@@ -3,5 +3,6 @@ export declare const getPositionStyle: (position: string, config?: {
|
|
3
3
|
popupGap?: number | undefined;
|
4
4
|
zIndex?: number | undefined;
|
5
5
|
fixedWidth?: boolean | "min" | undefined;
|
6
|
+
parentBorderWidth?: number | undefined;
|
6
7
|
} | undefined) => React.CSSProperties;
|
7
8
|
//# sourceMappingURL=get-position-style.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"get-position-style.d.ts","sourceRoot":"","sources":["get-position-style.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"get-position-style.d.ts","sourceRoot":"","sources":["get-position-style.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,eAAO,MAAM,gBAAgB,aACjB,MAAM;;;;;qCA+CjB,CAAC"}
|
@@ -22,6 +22,9 @@ export var getPositionStyle = function getPositionStyle(position, config) {
|
|
22
22
|
if (config !== null && config !== void 0 && config.fixedWidth) {
|
23
23
|
var key = config.fixedWidth === 'min' ? 'minWidth' : 'width';
|
24
24
|
newStyle[key] = '100%';
|
25
|
+
if (config.parentBorderWidth) {
|
26
|
+
newStyle[key] = "calc(100% + ".concat(config.parentBorderWidth, "px)");
|
27
|
+
}
|
25
28
|
}
|
26
29
|
if (position === 'drop-down') {
|
27
30
|
newStyle.top = mainMargin;
|
@@ -33,19 +36,22 @@ export var getPositionStyle = function getPositionStyle(position, config) {
|
|
33
36
|
var positionArr = (position || '').split('-');
|
34
37
|
if (positionArr.length === 2) {
|
35
38
|
var _positionArr = _slicedToArray(positionArr, 2),
|
36
|
-
|
37
|
-
|
38
|
-
newStyle[ReverseDir[
|
39
|
-
newStyle[
|
39
|
+
vDirection = _positionArr[0],
|
40
|
+
hDirection = _positionArr[1];
|
41
|
+
newStyle[ReverseDir[vDirection]] = mainMargin;
|
42
|
+
newStyle[hDirection] = 0;
|
43
|
+
if (config !== null && config !== void 0 && config.parentBorderWidth) {
|
44
|
+
newStyle[hDirection] = -config.parentBorderWidth / 2;
|
45
|
+
}
|
40
46
|
} else {
|
41
47
|
var _positionArr2 = _slicedToArray(positionArr, 1),
|
42
|
-
|
43
|
-
newStyle[ReverseDir[
|
44
|
-
if (
|
48
|
+
_vDirection = _positionArr2[0];
|
49
|
+
newStyle[ReverseDir[_vDirection]] = mainMargin;
|
50
|
+
if (_vDirection === 'left' || _vDirection === 'right') {
|
45
51
|
newStyle.top = halfMargin;
|
46
52
|
newStyle.transform = 'translateY(-50%)';
|
47
53
|
}
|
48
|
-
if (
|
54
|
+
if (_vDirection === 'top' || _vDirection === 'bottom') {
|
49
55
|
newStyle.left = halfMargin;
|
50
56
|
newStyle.transform = 'translateX(-50%)';
|
51
57
|
}
|
@@ -15,6 +15,7 @@ export interface PositionStyleConfig {
|
|
15
15
|
fixedWidth?: boolean | 'min';
|
16
16
|
updateKey?: number | string;
|
17
17
|
adjust?: boolean;
|
18
|
+
offset?: [number, number];
|
18
19
|
}
|
19
20
|
export declare const usePositionStyle: (config: PositionStyleConfig) => {
|
20
21
|
style: React.CSSProperties;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AASnD,MAAM,MAAM,kBAAkB,GAC1B,aAAa,GACb,UAAU,GACV,cAAc,GACd,WAAW,GACX,MAAM,GACN,OAAO,CAAC;AACZ,MAAM,MAAM,gBAAgB,GACxB,aAAa,GACb,cAAc,GACd,UAAU,GACV,WAAW,GACX,KAAK,GACL,QAAQ,CAAC;AAYb,KAAK,YAAY,GAAG,kBAAkB,GAAG,gBAAgB,GAAG,OAAO,CAAC;AACpE,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,YAAY,GAAG,SAAS,CAAC;IACnC,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,OAAO,CAAC;IAEd,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAE1C,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAEzC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAC3C,YAAY,EAAE,MAAM,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC3B;AAOD,eAAO,MAAM,gBAAgB,WAAY,mBAAmB;;;CAkT3D,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
@@ -8,6 +8,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8
8
|
import React, { useEffect, useState } from 'react';
|
9
9
|
import { getPositionStyle } from "./get-position-style";
|
10
10
|
import { useCheckElementPosition } from "./check-position";
|
11
|
+
import { useCheckElementBorderWidth } from "./check-border";
|
11
12
|
import shallowEqual from "../../utils/shallow-equal";
|
12
13
|
import usePersistFn from "../use-persist-fn";
|
13
14
|
import { getCurrentCSSZoom } from "../../utils";
|
@@ -34,7 +35,8 @@ export var usePositionStyle = function usePositionStyle(config) {
|
|
34
35
|
popupElRef = _ref.popupElRef,
|
35
36
|
scrollElRef = _ref.scrollElRef,
|
36
37
|
updateKey = _ref.updateKey,
|
37
|
-
adjust = _ref.adjust
|
38
|
+
adjust = _ref.adjust,
|
39
|
+
offset = _ref.offset;
|
38
40
|
// 初次渲染无样式的时候, 隐藏展示
|
39
41
|
var _useState = useState(hideStyle),
|
40
42
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -65,6 +67,9 @@ export var usePositionStyle = function usePositionStyle(config) {
|
|
65
67
|
scrollContainer: scrollElRef === null || scrollElRef === void 0 ? void 0 : scrollElRef.current,
|
66
68
|
enable: show && adjust
|
67
69
|
});
|
70
|
+
var parentElBorderWidth = useCheckElementBorderWidth(parentElRef, {
|
71
|
+
direction: 'horizontal'
|
72
|
+
});
|
68
73
|
var adjustPosition = function adjustPosition(position) {
|
69
74
|
var winHeight = docSize.height;
|
70
75
|
if (!verticalPosition.includes(position)) return position;
|
@@ -149,7 +154,7 @@ export var usePositionStyle = function usePositionStyle(config) {
|
|
149
154
|
var overRight = 0;
|
150
155
|
var overLeft = 0;
|
151
156
|
if (h === 'left') {
|
152
|
-
style.left = rect.left - containerRect.left + containerScroll.left;
|
157
|
+
style.left = rect.left - containerRect.left + containerScroll.left - (offset ? offset[0] : 0);
|
153
158
|
style.transform = '';
|
154
159
|
arrayStyle.left = "8px";
|
155
160
|
if (adjust) {
|
@@ -159,7 +164,7 @@ export var usePositionStyle = function usePositionStyle(config) {
|
|
159
164
|
}
|
160
165
|
}
|
161
166
|
} else if (h === 'right') {
|
162
|
-
style.right = containerRect.right - rect.right + containerScrollBarWidth - containerScroll.left;
|
167
|
+
style.right = containerRect.right - rect.right + containerScrollBarWidth - containerScroll.left - (offset ? offset[0] : 0);
|
163
168
|
style.left = 'auto';
|
164
169
|
style.transform = '';
|
165
170
|
arrayStyle.right = "8px";
|
@@ -216,11 +221,11 @@ export var usePositionStyle = function usePositionStyle(config) {
|
|
216
221
|
_h = _targetPosition$split4[0],
|
217
222
|
_v = _targetPosition$split4[1];
|
218
223
|
if (_v === 'top') {
|
219
|
-
style.top = rect.top - containerRect.top + containerScroll.top;
|
224
|
+
style.top = rect.top - containerRect.top + containerScroll.top - (offset ? offset[1] : 0);
|
220
225
|
style.transform = '';
|
221
226
|
arrayStyle.top = "8px";
|
222
227
|
} else if (_v === 'bottom') {
|
223
|
-
style.top = rect.bottom - containerRect.top + containerScroll.top;
|
228
|
+
style.top = rect.bottom - containerRect.top + containerScroll.top + (offset ? offset[1] : 0);
|
224
229
|
arrayStyle.bottom = "8px";
|
225
230
|
style.transform = 'translateY(-100%)';
|
226
231
|
} else {
|
@@ -233,10 +238,12 @@ export var usePositionStyle = function usePositionStyle(config) {
|
|
233
238
|
}
|
234
239
|
if (_h === 'right') {
|
235
240
|
style.left = rect.right - containerRect.left + containerScroll.left + popupGap;
|
241
|
+
arrayStyle.left = '0px';
|
242
|
+
arrayStyle.right = 'auto';
|
236
243
|
} else {
|
237
|
-
style.
|
238
|
-
arrayStyle.right =
|
239
|
-
|
244
|
+
style.right = containerRect.right - rect.left;
|
245
|
+
arrayStyle.right = '0px';
|
246
|
+
arrayStyle.left = 'auto';
|
240
247
|
}
|
241
248
|
} else if (position === 'cover') {
|
242
249
|
style.top = rect.top - containerRect.top + containerScroll.top;
|
@@ -295,17 +302,19 @@ export var usePositionStyle = function usePositionStyle(config) {
|
|
295
302
|
newStyle: style
|
296
303
|
};
|
297
304
|
context.parentRect = parentElRef.current.getBoundingClientRect();
|
305
|
+
var realPosition = position;
|
298
306
|
if (adjust) {
|
299
307
|
var popupInfo = getPopUpInfo(context.parentRect);
|
300
308
|
context.popUpHeight = popupInfo.height;
|
301
309
|
context.popUpWidth = popupInfo.width;
|
310
|
+
realPosition = adjustPosition(position);
|
302
311
|
}
|
303
|
-
var realPosition = adjust ? adjustPosition(position) : position;
|
304
312
|
if (!absolute) {
|
305
313
|
newStyle = getPositionStyle(realPosition, {
|
306
314
|
popupGap: popupGap,
|
307
315
|
zIndex: zIndex,
|
308
|
-
fixedWidth: fixedWidth
|
316
|
+
fixedWidth: fixedWidth,
|
317
|
+
parentBorderWidth: parentElBorderWidth
|
309
318
|
});
|
310
319
|
} else {
|
311
320
|
var _ref3 = getAbsoluteStyle(realPosition),
|
@@ -317,6 +326,8 @@ export var usePositionStyle = function usePositionStyle(config) {
|
|
317
326
|
// for animation
|
318
327
|
if (realPosition.indexOf('top') === 0) {
|
319
328
|
newStyle.transformOrigin = 'center bottom';
|
329
|
+
} else if (realPosition.indexOf('bottom') === 0) {
|
330
|
+
newStyle.transformOrigin = 'center top';
|
320
331
|
}
|
321
332
|
return {
|
322
333
|
newStyle: newStyle,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-cascader.d.ts","sourceRoot":"","sources":["use-cascader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,QAAA,MAAM,WAAW;;;;
|
1
|
+
{"version":3,"file":"use-cascader.d.ts","sourceRoot":"","sources":["use-cascader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,QAAA,MAAM,WAAW;;;;CA2ChB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { KeygenResult, TreeKeygenType, ObjectKey } from '../../common/type';
|
2
|
+
import { DisabledOption } from '../use-tree';
|
2
3
|
import { TreeModeType } from '../use-tree/use-tree.type';
|
3
4
|
export interface BaseCascaderProps<DataItem, Value extends KeygenResult[]> {
|
4
5
|
value?: Value;
|
@@ -11,7 +12,7 @@ export interface BaseCascaderProps<DataItem, Value extends KeygenResult[]> {
|
|
11
12
|
beforeChange?: (value: Value) => any;
|
12
13
|
mode?: TreeModeType;
|
13
14
|
keygen: TreeKeygenType<DataItem>;
|
14
|
-
disabled?: ((
|
15
|
+
disabled?: DisabledOption<DataItem> | boolean | ((item: DataItem) => boolean);
|
15
16
|
filterSameChange?: boolean;
|
16
17
|
}
|
17
18
|
//# sourceMappingURL=use-cascader.type.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-cascader.type.d.ts","sourceRoot":"","sources":["use-cascader.type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,MAAM,WAAW,iBAAiB,CAAC,QAAQ,EAAE,KAAK,SAAS,YAAY,EAAE;IACvE,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,IAAI,EAAE,QAAQ,EAAE,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC;IAClC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC,EAAE,QAAQ,KAAK,IAAI,CAAC;IACvD,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,GAAG,CAAC;IACrC,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;IACjC,QAAQ,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,QAAQ,KAAK,OAAO,CAAC,
|
1
|
+
{"version":3,"file":"use-cascader.type.d.ts","sourceRoot":"","sources":["use-cascader.type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,MAAM,WAAW,iBAAiB,CAAC,QAAQ,EAAE,KAAK,SAAS,YAAY,EAAE;IACvE,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,IAAI,EAAE,QAAQ,EAAE,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC;IAClC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC,EAAE,QAAQ,KAAK,IAAI,CAAC;IACvD,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,GAAG,CAAC;IACrC,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;IACjC,QAAQ,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,GAAG,OAAO,GAAG,CAAC,CAAC,IAAI,EAAE,QAAQ,KAAK,OAAO,CAAC,CAAC;IAC9E,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B"}
|
@@ -22,7 +22,7 @@ declare const useCheck: (props: BaseCheckProps) => {
|
|
22
22
|
ref: ((instance: HTMLInputElement | null) => void) | null;
|
23
23
|
disabled: boolean | undefined;
|
24
24
|
};
|
25
|
-
getRootProps: <TOther_2 extends ObjectType>(externalProps?: TOther_2) => TOther_2 & {
|
25
|
+
getRootProps: <TOther_2 extends ObjectType>(externalProps?: TOther_2) => Omit<TOther_2, "needStopPropagation"> & {
|
26
26
|
onClick: (event: React.MouseEvent) => void;
|
27
27
|
};
|
28
28
|
disabled: boolean | undefined;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-check.d.ts","sourceRoot":"","sources":["use-check.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAe,UAAU,EAAE,MAAM,mBAAmB,CAAC;
|
1
|
+
{"version":3,"file":"use-check.d.ts","sourceRoot":"","sources":["use-check.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAe,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAI5D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,QAAA,MAAM,QAAQ,UAAW,cAAc;;;;;qBAuDpB,gBAAgB,CAAC,gBAAgB,CAAC;0BArBT,MAAM,WAAW,CAAC,gBAAgB,CAAC;;;;;;;;;;;yBAnBa,gBAAgB;;;;CAiE3G,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
@@ -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":[],"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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"}
|