@gx-design-vue/pro-utils 0.2.0-alpha.4 → 0.2.0-alpha.5

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/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { arraySlice } from "./array/slice.js";
2
2
  import { compareArray, compareArraySort, compareArrayTimeSort, compareTime } from "./array/sort.js";
3
- import { AlignType, BasicTablePageConfig, Breakpoint, CustomRender, DeepPartial, EmptyEmit, ExtendIfDefined, Fn, LimitDeepPartial, MediaOptions, Nullable, OmitUndefined, RecordType, SemanticClassNames, SemanticStyles, SizeType, VueNode, WithFalse, WithIfDefault, WithRequired } from "./typing.js";
3
+ import { AlignType, BasicTablePageConfig, Breakpoint, CustomRender, DeepPartial, EmptyEmit, EmptyObject, ExtendIfDefined, Fn, LimitDeepPartial, MediaOptions, Nullable, OmitUndefined, RecordType, RenderNodeFn, SemanticClassNames, SemanticStyles, SizeType, WithFalse, WithIfDefault, WithRequired } from "./typing.js";
4
4
  import { filterTree, findSourceByTree, findValueAndAncestors, getArrayLast, getLevelData, getMaxFloor, getSortIndex, treeData } from "./array/tree.js";
5
5
  import { arrayUnique, arrayUniqueBy } from "./array/unique.js";
6
6
  import { PrefixCls, getPrefixCls } from "./class/prefix.js";
@@ -50,4 +50,4 @@ import { nanoid } from "./string/nanoid.js";
50
50
  import { createUUIDFactory } from "./string/uuid.js";
51
51
  import { genColumnKey, handleShowIndex } from "./table/column.js";
52
52
  import { handleCurrentPage } from "./table/page.js";
53
- export { AlignType, Base64, BasicTablePageConfig, Breakpoint, CustomRender, DeepPartial, EmptyEmit, ExtendIfDefined, Fn, LimitDeepPartial, MediaOptions, Nullable, OmitUndefined, PrefixCls, RecordType, RenderResult, ScrollToOptions, SemanticClassNames, SemanticStyles, SizeType, SlotsPropsResult, VueNode, WithFalse, WithIfDefault, WithRequired, arraySlice, arrayUnique, arrayUniqueBy, blobToDataURL, blobToFile, checkFileType, classNames, cloneDeep, cloneDeepWith, cloneDeepWithImpl, compareArray, compareArraySort, compareArrayTimeSort, compareTime, convertValueBoolean, copyProperties, createUUIDFactory, dataURLtoBlob, dataURLtoFile, deepCopy, deepMerge, easeInOutCubic, fileTypes, filterEmpty, filterTree, findSourceByTree, findValueAndAncestors, forInObject, formatDuration, formatNumber, genColumnKey, generateVideoPicture, getArrayLast, getBase64, getBlobUrl, getFileSuffix, getKeys, getLevelData, getMaxFloor, getMediaInfos, getPrefixCls, getScroll, getScrollContainer, getSlot, getSlotVNode, getSlotsChildren, getSlotsProps, getSortIndex, getSymbols, getTextWidth, getValueFromObjectByKey, getVideoCoverPicture, getVideoFileUrl, handleCurrentPage, handleEmptyField, handleShowIndex, is, isArray, isBoolean, isBrowser, isDataURLBase64, isDeepEqual, isDeepEqualReact, isEmptyElement, isEqual, isFunction, isImg, isInContainer, isJSONStr, isMediaDataURI, isMobile, isNil, isNotNil, isNumber, isObject, isObjectWithSymbols, isPlainObject, isPrimitive, isScroll, isServer, isString, isTablet, isTypedArray, isUnsafeProperty, isUrl, isValid, isWindow, isWindowsOs, keysOf, merge, mergeWith, nanoid, off, omitBoolean, omitUndefined, omitUndefinedAndEmptyArr, on, wrapperRaf as raf, runFunction, scrollTo, slotRender, toChinesNum, toConvertNumberShow, treeData, useDeepMerge };
53
+ export { AlignType, Base64, BasicTablePageConfig, Breakpoint, CustomRender, DeepPartial, EmptyEmit, EmptyObject, ExtendIfDefined, Fn, LimitDeepPartial, MediaOptions, Nullable, OmitUndefined, PrefixCls, RecordType, RenderNodeFn, RenderResult, ScrollToOptions, SemanticClassNames, SemanticStyles, SizeType, SlotsPropsResult, WithFalse, WithIfDefault, WithRequired, arraySlice, arrayUnique, arrayUniqueBy, blobToDataURL, blobToFile, checkFileType, classNames, cloneDeep, cloneDeepWith, cloneDeepWithImpl, compareArray, compareArraySort, compareArrayTimeSort, compareTime, convertValueBoolean, copyProperties, createUUIDFactory, dataURLtoBlob, dataURLtoFile, deepCopy, deepMerge, easeInOutCubic, fileTypes, filterEmpty, filterTree, findSourceByTree, findValueAndAncestors, forInObject, formatDuration, formatNumber, genColumnKey, generateVideoPicture, getArrayLast, getBase64, getBlobUrl, getFileSuffix, getKeys, getLevelData, getMaxFloor, getMediaInfos, getPrefixCls, getScroll, getScrollContainer, getSlot, getSlotVNode, getSlotsChildren, getSlotsProps, getSortIndex, getSymbols, getTextWidth, getValueFromObjectByKey, getVideoCoverPicture, getVideoFileUrl, handleCurrentPage, handleEmptyField, handleShowIndex, is, isArray, isBoolean, isBrowser, isDataURLBase64, isDeepEqual, isDeepEqualReact, isEmptyElement, isEqual, isFunction, isImg, isInContainer, isJSONStr, isMediaDataURI, isMobile, isNil, isNotNil, isNumber, isObject, isObjectWithSymbols, isPlainObject, isPrimitive, isScroll, isServer, isString, isTablet, isTypedArray, isUnsafeProperty, isUrl, isValid, isWindow, isWindowsOs, keysOf, merge, mergeWith, nanoid, off, omitBoolean, omitUndefined, omitUndefinedAndEmptyArr, on, wrapperRaf as raf, runFunction, scrollTo, slotRender, toChinesNum, toConvertNumberShow, treeData, useDeepMerge };
package/dist/typing.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { CSSProperties, Slot, VNode, VNodeChild } from "vue";
2
- import { JSX } from "vue/jsx-runtime";
1
+ import { CSSProperties, VNode, VNodeChild } from "vue";
3
2
 
4
3
  //#region src/typing.d.ts
5
4
  interface EmptyEmit {}
5
+ type EmptyObject = Record<never, never>;
6
6
  /**
7
7
  * 深度部分类型,递归地将所有属性变为可选。
8
8
  *
@@ -130,11 +130,7 @@ type ExtendIfDefined<T, R = undefined> = R extends undefined ? T : T & R;
130
130
  * ```
131
131
  */
132
132
  type WithRequired<T, Keys extends keyof T> = Required<Pick<T, Keys>> & Partial<Omit<T, Keys>>;
133
- /**
134
- * 联合类型,表示所有可能的 Vue 节点类型。
135
- * 包含 VNodeChild 和 JSX.Element 以提供更广泛的兼容性。
136
- */
137
- type VueNode = VNodeChild | JSX.Element;
133
+ type RenderNodeFn<Args extends any[] = any[]> = (...args: Args) => VNodeChild;
138
134
  /**
139
135
  * 综合渲染函数类型,用于自定义内容渲染。
140
136
  * 支持插槽、虚拟节点、渲染函数和原始值。
@@ -146,7 +142,7 @@ type VueNode = VNodeChild | JSX.Element;
146
142
  * const render3: CustomRender = '纯文本'
147
143
  * ```
148
144
  */
149
- type CustomRender = Slot | VNodeChild | VNode | ((...props: any[]) => VNode) | ((...props: any[]) => VNode[]) | VNode[] | JSX.Element | string | null | undefined;
145
+ type CustomRender<Args extends any[] = any[]> = RenderNodeFn<Args> | string | number | null | undefined | VNode | boolean;
150
146
  /**
151
147
  * 响应式断点名称,遵循 Ant Design 的断点系统。
152
148
  *
@@ -259,4 +255,4 @@ type SemanticClassNames<Name extends string> = Partial<Record<Name, string>>;
259
255
  */
260
256
  type SemanticStyles<Name extends string> = Partial<Record<Name, CSSProperties>>;
261
257
  //#endregion
262
- export { AlignType, BasicTablePageConfig, Breakpoint, CustomRender, DeepPartial, EmptyEmit, ExtendIfDefined, Fn, LimitDeepPartial, MediaOptions, Nullable, OmitUndefined, RecordType, SemanticClassNames, SemanticStyles, SizeType, VueNode, WithFalse, WithIfDefault, WithRequired };
258
+ export { AlignType, BasicTablePageConfig, Breakpoint, CustomRender, DeepPartial, EmptyEmit, EmptyObject, ExtendIfDefined, Fn, LimitDeepPartial, MediaOptions, Nullable, OmitUndefined, RecordType, RenderNodeFn, SemanticClassNames, SemanticStyles, SizeType, WithFalse, WithIfDefault, WithRequired };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gx-design-vue/pro-utils",
3
3
  "type": "module",
4
- "version": "0.2.0-alpha.4",
4
+ "version": "0.2.0-alpha.5",
5
5
  "description": "Gx Design Pro Utils",
6
6
  "author": {
7
7
  "name": "gx12358",