@gx-design-vue/pro-utils 0.2.0-beta.4 → 0.2.0-beta.41
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/getValueFromObjectByKey/index.d.ts +3 -0
- package/dist/index.d.ts +9 -3
- package/dist/isImg/index.d.ts +2 -0
- package/dist/isNil/index.d.ts +1 -0
- package/dist/isUrl/index.d.ts +6 -0
- package/dist/merge/index.d.ts +1 -1
- package/dist/nanoid/index.d.ts +6 -0
- package/dist/omitUndefined/index.d.ts +1 -1
- package/dist/omitUndefinedAndEmptyArr/index.d.ts +1 -0
- package/dist/pro-utils.js +668 -0
- package/dist/pro-utils.umd.cjs +5 -0
- package/dist/scroll/raf.d.ts +2 -6
- package/dist/slots/index.d.ts +36 -8
- package/dist/typings/index.d.ts +9 -4
- package/dist/utils/index.d.ts +16 -6
- package/dist/utils/validate.d.ts +4 -4
- package/package.json +15 -51
- package/dist/pro-utils.mjs +0 -555
- package/dist/pro-utils.umd.js +0 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
type DeepValueOf<T, K> = K extends `${infer First}:${infer Rest}` ? First extends keyof T ? Rest extends '' ? T[First] : DeepValueOf<T[First], Rest> : undefined : K extends keyof T ? T[K] : undefined;
|
|
2
|
+
export declare function getValueFromObjectByKey<T extends object, K extends string | string[] = string>(object: T, key: K): DeepValueOf<T, K extends string ? K : string> | undefined;
|
|
3
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
import isServer from './isServer';
|
|
2
|
-
import {
|
|
2
|
+
import { getScrollContainer, isInContainer, isScroll } from './scroll';
|
|
3
|
+
import { isImg } from './isImg';
|
|
4
|
+
import { isNil } from './isNil';
|
|
5
|
+
import { isUrl } from './isUrl';
|
|
6
|
+
import { merge } from './merge';
|
|
7
|
+
import { nanoid } from './nanoid';
|
|
8
|
+
import { getValueFromObjectByKey } from './getValueFromObjectByKey';
|
|
3
9
|
import classNames from './classNames';
|
|
4
10
|
import scrollTo from './scroll/scrollTo';
|
|
5
11
|
import getScroll from './scroll/getScroll';
|
|
6
12
|
import throttleByAnimationFrame from './scroll/throttleByAnimationFrame';
|
|
7
13
|
import globalConfig from './utils/config';
|
|
8
|
-
export * from './merge';
|
|
9
14
|
export * from './isDeepEqualReact';
|
|
10
15
|
export * from './isBrowser';
|
|
11
16
|
export * from './omitBoolean';
|
|
12
17
|
export * from './omitUndefined';
|
|
18
|
+
export * from './omitUndefinedAndEmptyArr';
|
|
13
19
|
export * from './slots';
|
|
14
20
|
export * from './utils';
|
|
15
21
|
export * from './utils/validate';
|
|
16
22
|
export * from './typings';
|
|
17
|
-
export { isServer, globalConfig, classNames, isScroll, isInContainer, getScrollContainer, scrollTo, getScroll, throttleByAnimationFrame };
|
|
23
|
+
export { isServer, globalConfig, classNames, isScroll, isInContainer, getScrollContainer, scrollTo, getScroll, isImg, isNil, isUrl, merge, nanoid, getValueFromObjectByKey, throttleByAnimationFrame };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isNil: (value: any) => value is null | undefined;
|
package/dist/merge/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const omitUndefinedAndEmptyArr: <T extends Record<string, any>>(obj: T) => T;
|