@kengic/vue 0.27.2-beta.0 → 0.27.2-beta.2

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.
Files changed (88) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/kengic-vue.js +59326 -56601
  3. package/dist/project/build/vite/plugin/index.ts +1 -1
  4. package/dist/project/types/global.d.ts +0 -1
  5. package/dist/src/component/KgModal/KgModal.d.ts +6 -6
  6. package/dist/src/component/KgSubmit/KgSubmit.hooks.d.ts +4 -8
  7. package/dist/src/component/KgWarehouse/KgWarehouse.hooks.d.ts +1 -7
  8. package/dist/src/config/{index.hooks.d.ts → config.hooks.d.ts} +2 -6
  9. package/dist/src/config/index.d.ts +30 -3
  10. package/dist/src/const/index.d.ts +2 -3
  11. package/dist/src/{config/setup/setupKgLocale.d.ts → i18n/i18n.setup.d.ts} +2 -2
  12. package/dist/src/i18n/index.d.ts +3 -0
  13. package/dist/src/index.d.ts +2 -0
  14. package/dist/src/project/src/components/Application/src/useAppContext.d.ts +9 -0
  15. package/dist/src/project/src/components/index.d.ts +1 -0
  16. package/dist/src/project/src/hooks/component/useFormItem.d.ts +2 -0
  17. package/dist/src/project/src/hooks/component/usePageContext.d.ts +10 -0
  18. package/dist/src/project/src/hooks/core/onMountedOrActivated.d.ts +1 -0
  19. package/dist/src/project/src/hooks/core/useAttrs.d.ts +9 -0
  20. package/dist/src/project/src/hooks/core/useContext.d.ts +11 -0
  21. package/dist/src/project/src/hooks/core/useRefs.d.ts +2 -0
  22. package/dist/src/project/src/hooks/core/useTimeout.d.ts +10 -0
  23. package/dist/src/project/src/hooks/event/useBreakpoint.d.ts +22 -0
  24. package/dist/src/project/src/hooks/event/useEventListener.d.ts +14 -0
  25. package/dist/src/project/src/hooks/event/useIntersectionObserver.d.ts +13 -0
  26. package/dist/src/project/src/hooks/event/useScrollTo.d.ts +10 -0
  27. package/dist/src/project/src/hooks/event/useWindowSizeFn.d.ts +7 -0
  28. package/dist/src/project/src/hooks/index.d.ts +21 -0
  29. package/dist/src/project/src/hooks/jeecg/useAdaptiveWidth.d.ts +18 -0
  30. package/dist/src/project/src/hooks/setting/index.d.ts +2 -0
  31. package/dist/src/project/src/hooks/web/useAppInject.d.ts +3 -0
  32. package/dist/src/project/src/hooks/web/useContentHeight.d.ts +24 -0
  33. package/dist/src/project/src/hooks/web/useCopyToClipboard.d.ts +10 -0
  34. package/dist/src/project/src/hooks/web/useDesign.d.ts +4 -0
  35. package/dist/src/project/src/hooks/web/usePage.d.ts +10 -0
  36. package/dist/src/project/src/hooks/web/usePagination.d.ts +7 -0
  37. package/dist/src/project/src/hooks/web/useWebSocket.d.ts +18 -0
  38. package/dist/src/project/src/index.d.ts +3 -7
  39. package/dist/src/project/src/layouts/default/content/useContentContext.d.ts +9 -0
  40. package/dist/src/project/src/layouts/default/content/useContentViewHeight.d.ts +7 -0
  41. package/dist/src/project/src/layouts/index.d.ts +2 -0
  42. package/dist/src/project/src/router/constant2.d.ts +3 -0
  43. package/dist/src/project/src/router/index.d.ts +2 -0
  44. package/dist/src/project/src/settings/index.d.ts +1 -0
  45. package/dist/src/project/src/settings/projectSetting.d.ts +3 -0
  46. package/dist/src/project/src/utils/auth/index.d.ts +19 -0
  47. package/dist/src/project/src/utils/bem.d.ts +15 -0
  48. package/dist/src/project/src/utils/color.d.ts +29 -0
  49. package/dist/src/project/src/utils/common/compUtils.d.ts +87 -0
  50. package/dist/src/project/src/utils/common/functionUtils.d.ts +6 -0
  51. package/dist/src/project/src/utils/dateUtil.d.ts +4 -0
  52. package/dist/src/project/src/utils/domUtils.d.ts +28 -0
  53. package/dist/src/project/src/utils/encryption/signMd5Utils.d.ts +29 -0
  54. package/dist/src/project/src/utils/env.d.ts +0 -2
  55. package/dist/src/project/src/utils/event/index.d.ts +3 -0
  56. package/dist/src/project/src/utils/factory/createAsyncComponent.d.ts +9 -0
  57. package/dist/src/project/src/utils/file/base64Conver.d.ts +4 -0
  58. package/dist/src/project/src/utils/file/download.d.ts +9 -0
  59. package/dist/src/project/src/utils/helper/treeHelper.d.ts +34 -0
  60. package/dist/src/project/src/utils/helper/tsxHelper.d.ts +13 -0
  61. package/dist/src/project/src/utils/index.d.ts +26 -0
  62. package/dist/src/project/src/utils/index.index.d.ts +42 -0
  63. package/dist/src/project/src/utils/is.d.ts +17 -0
  64. package/dist/src/project/src/utils/mitt.d.ts +26 -0
  65. package/dist/src/project/src/utils/propTypes.d.ts +9 -0
  66. package/dist/src/project/src/utils/props.d.ts +68 -0
  67. package/dist/src/project/src/utils/uuid.d.ts +2 -0
  68. package/dist/src/project/types/config.d.ts +0 -3
  69. package/dist/src/store/index.d.ts +8 -0
  70. package/dist/src/util/kg-route.util.d.ts +0 -2
  71. package/dist/src/util/kg.util.d.ts +0 -6
  72. package/package.json +6 -2
  73. package/dist/src/config/setup/index.d.ts +0 -3
  74. package/dist/src/config/setup/setup.d.ts +0 -28
  75. package/dist/src/config/setup/setupKgStore.d.ts +0 -18
  76. package/dist/src/const/i18n/index.d.ts +0 -2
  77. /package/dist/src/config/{index.store.d.ts → config.store.d.ts} +0 -0
  78. /package/dist/src/const/{injection-keys.const.d.ts → const.injection-keys.d.ts} +0 -0
  79. /package/dist/src/const/{index.vm.d.ts → const.vm.d.ts} +0 -0
  80. /package/dist/src/{const/i18n → i18n}/en.d.ts +0 -0
  81. /package/dist/src/{const/i18n → i18n}/es_ES.d.ts +0 -0
  82. /package/dist/src/{const/i18n → i18n}/fr_FR.d.ts +0 -0
  83. /package/dist/src/{const/i18n → i18n}/km_KH.d.ts +0 -0
  84. /package/dist/src/{const/i18n → i18n}/ko_KR.d.ts +0 -0
  85. /package/dist/src/{const/i18n → i18n}/vi_VN.d.ts +0 -0
  86. /package/dist/src/{const/i18n → i18n}/zh_CN.d.ts +0 -0
  87. /package/dist/src/{helper → util}/ant-design-vue.d.ts +0 -0
  88. /package/dist/src/{helper → util}/tsx.helper.d.ts +0 -0
@@ -0,0 +1,87 @@
1
+ /**
2
+ * 获取文件服务访问路径
3
+ * @param fileUrl 文件路径
4
+ * @param prefix (默认http) 文件路径前缀 http/https
5
+ */
6
+ export declare const getFileAccessHttpUrl: (fileUrl: any, prefix?: string) => any;
7
+ /**
8
+ * 触发 window.resize
9
+ */
10
+ export declare function triggerWindowResizeEvent(): void;
11
+ /**
12
+ * 获取随机数
13
+ * @param length 数字位数
14
+ */
15
+ export declare const getRandom: (length?: number) => string;
16
+ /**
17
+ * 随机生成字符串
18
+ * @param length 字符串的长度
19
+ * @param chats 可选字符串区间(只会生成传入的字符串中的字符)
20
+ * @return string 生成的字符串
21
+ */
22
+ export declare function randomString(length: number, chats?: string): string;
23
+ /**
24
+ * 将普通列表数据转化为tree结构
25
+ * @param array tree数据
26
+ * @param opt 配置参数
27
+ * @param startPid 父节点
28
+ */
29
+ export declare const listToTree: (array: any, opt: any, startPid: any) => any;
30
+ /**
31
+ * 递归构建tree
32
+ * @param array
33
+ * @param startPid
34
+ * @param currentDept
35
+ * @param opt
36
+ * @returns {Array}
37
+ */
38
+ export declare const toTree: (array: any, startPid: any, currentDept: any, opt: any) => any;
39
+ /**
40
+ * 简单实现防抖方法
41
+ *
42
+ * 防抖(debounce)函数在第一次触发给定的函数时,不立即执行函数,而是给出一个期限值(delay),比如100ms。
43
+ * 如果100ms内再次执行函数,就重新开始计时,直到计时结束后再真正执行函数。
44
+ * 这样做的好处是如果短时间内大量触发同一事件,只会执行一次函数。
45
+ *
46
+ * @param fn 要防抖的函数
47
+ * @param delay 防抖的毫秒数
48
+ * @returns {Function}
49
+ */
50
+ export declare function simpleDebounce(fn: any, delay?: number): () => void;
51
+ /**
52
+ * 日期格式化
53
+ * @param date 日期
54
+ * @param block 格式化字符串
55
+ */
56
+ export declare function dateFormat(date: any, block: any): any;
57
+ /**
58
+ * 如果值不存在就 push 进数组,反之不处理
59
+ * @param array 要操作的数据
60
+ * @param value 要添加的值
61
+ * @param key 可空,如果比较的是对象,可能存在地址不一样但值实际上是一样的情况,可以传此字段判断对象中唯一的字段,例如 id。不传则直接比较实际值
62
+ * @returns {boolean} 成功 push 返回 true,不处理返回 false
63
+ */
64
+ export declare function pushIfNotExist(array: any, value: any, key?: any): boolean;
65
+ /**
66
+ * 过滤对象中为空的属性
67
+ * @param obj
68
+ * @returns {*}
69
+ */
70
+ export declare function filterObj(obj: any): any;
71
+ /**
72
+ * 查找树结构
73
+ * @param treeList
74
+ * @param fn 查找方法
75
+ * @param childrenKey
76
+ */
77
+ export declare function findTree(treeList: any[], fn: Fn, childrenKey?: string): any;
78
+ /**
79
+ * 【组件多了可能存在性能问题】获取弹窗div,将下拉框、日期等组件挂载到modal上,解决弹窗遮盖问题
80
+ * @param node
81
+ */
82
+ export declare function getAutoScrollContainer(node: HTMLElement): HTMLElement | null;
83
+ /**
84
+ * 判断子菜单是否全部隐藏
85
+ * @param menuTreeItem
86
+ */
87
+ export declare function checkChildrenHidden(menuTreeItem: any): any;
@@ -0,0 +1,6 @@
1
+ /**
2
+ *
3
+ * 执行命令
4
+ * @param code
5
+ */
6
+ export declare function executeCode(code: any): void;
@@ -0,0 +1,4 @@
1
+ import dayjs from 'dayjs';
2
+ export declare function formatToDateTime(date?: dayjs.Dayjs | undefined, format?: string): string;
3
+ export declare function formatToDate(date?: dayjs.Dayjs | undefined, format?: string): string;
4
+ export declare const dateUtil: typeof dayjs;
@@ -0,0 +1,28 @@
1
+ export interface ViewportOffsetResult {
2
+ left: number;
3
+ top: number;
4
+ right: number;
5
+ bottom: number;
6
+ rightIncludeBody: number;
7
+ bottomIncludeBody: number;
8
+ }
9
+ export declare function getBoundingClientRect(element: Element): DOMRect | number;
10
+ export declare function hasClass(el: Element, cls: string): boolean;
11
+ export declare function addClass(el: Element, cls: string): void;
12
+ export declare function removeClass(el: Element, cls: string): void;
13
+ /**
14
+ * Get the left and top offset of the current element
15
+ * left: the distance between the leftmost element and the left side of the document
16
+ * top: the distance from the top of the element to the top of the document
17
+ * right: the distance from the far right of the element to the right of the document
18
+ * bottom: the distance from the bottom of the element to the bottom of the document
19
+ * rightIncludeBody: the distance between the leftmost element and the right side of the document
20
+ * bottomIncludeBody: the distance from the bottom of the element to the bottom of the document
21
+ *
22
+ * @description:
23
+ */
24
+ export declare function getViewportOffset(element: Element): ViewportOffsetResult;
25
+ export declare function hackCss(attr: string, value: string): any;
26
+ export declare function on(element: Element | HTMLElement | Document | Window, event: string, handler: EventListenerOrEventListenerObject): void;
27
+ export declare function off(element: Element | HTMLElement | Document | Window, event: string, handler: Fn): void;
28
+ export declare function once(el: HTMLElement, event: string, fn: EventListener): void;
@@ -0,0 +1,29 @@
1
+ export declare class signMd5Utils {
2
+ /**
3
+ * json参数升序
4
+ * @param jsonObj 发送参数
5
+ */
6
+ static sortAsc(jsonObj: any): {};
7
+ /**
8
+ * @param url 请求的url,应该包含请求参数(url的?后面的参数)
9
+ * @param requestParams 请求参数(POST的JSON参数)
10
+ * @returns {string} 获取签名
11
+ */
12
+ static getSign(url: any, requestParams: any): string;
13
+ /**
14
+ * @param url 请求的url
15
+ * @returns {{}} 将url中请求参数组装成json对象(url的?后面的参数)
16
+ */
17
+ static parseQueryString(url: any): {};
18
+ /**
19
+ * @returns {*} 将两个对象合并成一个
20
+ */
21
+ static mergeObject(objectOne: any, objectTwo: any): any;
22
+ static urlEncode(param: any, key: any, encode: any): string;
23
+ /**
24
+ * 接口签名用 生成header中的时间戳
25
+ * @returns {number}
26
+ */
27
+ static getTimestamp(): number;
28
+ static myIsNaN(value: any): boolean;
29
+ }
@@ -3,11 +3,9 @@ export declare function getStorageShortName(): string;
3
3
  export declare function getAppEnvConfig(): {
4
4
  VITE_GLOB_APP_TITLE: string;
5
5
  VITE_GLOB_API_URL: string;
6
- VITE_USE_MOCK: string;
7
6
  VITE_GLOB_APP_SHORT_NAME: string;
8
7
  VITE_GLOB_API_URL_PREFIX: string | undefined;
9
8
  VITE_GLOB_APP_OPEN_SSO: string;
10
- VITE_GLOB_APP_OPEN_QIANKUN: string;
11
9
  VITE_GLOB_APP_CAS_BASE_URL: string;
12
10
  VITE_GLOB_DOMAIN_URL: string;
13
11
  VITE_GLOB_ONLINE_VIEW_URL: string | undefined;
@@ -0,0 +1,3 @@
1
+ export declare function addResizeListener(element: any, fn: () => any): void;
2
+ export declare function removeResizeListener(element: any, fn: () => any): void;
3
+ export declare function triggerWindowResize(): void;
@@ -0,0 +1,9 @@
1
+ interface Options {
2
+ size?: 'default' | 'small' | 'large';
3
+ delay?: number;
4
+ timeout?: number;
5
+ loading?: boolean;
6
+ retry?: boolean;
7
+ }
8
+ export declare function createAsyncComponent(loader: Fn, options?: Options): new () => import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>;
9
+ export {};
@@ -0,0 +1,4 @@
1
+ /**
2
+ * @description: base64 to blob
3
+ */
4
+ export declare function dataURLtoBlob(base64Buf: string): Blob;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Download file according to file address
3
+ * @param {*} sUrl
4
+ */
5
+ export declare function downloadByUrl({ url, target, fileName }: {
6
+ url: string;
7
+ target?: TargetContext;
8
+ fileName?: string;
9
+ }): boolean;
@@ -0,0 +1,34 @@
1
+ interface TreeHelperConfig {
2
+ id: string;
3
+ children: string;
4
+ pid: string;
5
+ }
6
+ export declare function treeToList<T = any>(tree: any, config?: Partial<TreeHelperConfig>): T;
7
+ export declare function findNodeAll<T = any>(tree: any, func: Fn, config?: Partial<TreeHelperConfig>): T[];
8
+ export declare function findPath<T = any>(tree: any, func: Fn, config?: Partial<TreeHelperConfig>): T | T[] | null;
9
+ export declare function filter<T = any>(tree: T[], func: (n: T) => boolean, config?: Partial<TreeHelperConfig>): T[];
10
+ export declare function forEach<T = any>(tree: T[], func: (n: T) => any, config?: Partial<TreeHelperConfig>): void;
11
+ /**
12
+ * @description: Extract tree specified structure
13
+ * @description: 提取树指定结构
14
+ */
15
+ export declare function treeMap<T = any>(treeData: T[], opt: {
16
+ children?: string;
17
+ conversion: Fn;
18
+ }): T[];
19
+ /**
20
+ * @description: Extract tree specified structure
21
+ * @description: 提取树指定结构
22
+ */
23
+ export declare function treeMapEach(data: any, { children, conversion }: {
24
+ children?: string;
25
+ conversion: Fn;
26
+ }): any;
27
+ /**
28
+ * 递归遍历树结构
29
+ * @param treeDatas 树
30
+ * @param callBack 回调
31
+ * @param parentNode 父节点
32
+ */
33
+ export declare function eachTree(treeDatas: any[], callBack: Fn, parentNode?: {}): void;
34
+ export {};
@@ -0,0 +1,13 @@
1
+ import { Slots } from 'vue';
2
+ /**
3
+ * @description: Get slot to prevent empty error
4
+ */
5
+ export declare function getSlot(slots: Slots, slot?: string, data?: any): import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
6
+ [key: string]: any;
7
+ }>[] | null;
8
+ /**
9
+ * extends slots
10
+ * @param slots
11
+ * @param excludeKeys
12
+ */
13
+ export declare function extendSlots(slots: Slots, excludeKeys?: string[]): any;
@@ -0,0 +1,26 @@
1
+ export * from './auth';
2
+ export * from './cache/index';
3
+ export * from './cache/memory';
4
+ export * from './cache/persistent';
5
+ export * from './cache/storageCache';
6
+ export * from './common/compUtils';
7
+ export * from './common/functionUtils';
8
+ export * from './encryption/signMd5Utils';
9
+ export * from './event';
10
+ export * from './bem';
11
+ export * from './cipher';
12
+ export * from './color';
13
+ export * from './dateUtil';
14
+ export * from './domUtils';
15
+ export * from './env';
16
+ export * from './index.index';
17
+ export * from './factory/createAsyncComponent';
18
+ export * from './file/base64Conver';
19
+ export * from './file/download';
20
+ export * from './helper/treeHelper';
21
+ export * from './helper/tsxHelper';
22
+ export * from './is';
23
+ export * from './mitt';
24
+ export * from './props';
25
+ export * from './propTypes';
26
+ export * from './uuid';
@@ -0,0 +1,42 @@
1
+ import type { Plugin } from 'vue';
2
+ import type { RouteLocationNormalized } from 'vue-router';
3
+ export declare const URL_HASH_TAB = "__AGWE4H__HASH__TAG__PWHRG__";
4
+ export declare const noop: () => void;
5
+ /**
6
+ * @description: Set ui mount node
7
+ */
8
+ export declare function getPopupContainer(node?: HTMLElement): HTMLElement;
9
+ /**
10
+ * Add the object as a parameter to the URL
11
+ * @param baseUrl url
12
+ * @param obj
13
+ * @returns {string}
14
+ * eg:
15
+ * let obj = {a: '3', b: '4'}
16
+ * setObjToUrlParams('www.baidu.com', obj)
17
+ * ==>www.baidu.com?a=3&b=4
18
+ */
19
+ export declare function setObjToUrlParams(baseUrl: string, obj: any): string;
20
+ export declare function deepMerge<T = any>(src?: any, target?: any): T;
21
+ export declare function openWindow(url: string, opt?: {
22
+ target?: TargetContext | string;
23
+ noopener?: boolean;
24
+ noreferrer?: boolean;
25
+ }): void;
26
+ export declare function getDynamicProps<T, U>(props: T): Partial<U>;
27
+ /**
28
+ * 获取表单字段值数据类型
29
+ * @param props
30
+ * @param field
31
+ * @updateBy:zyf
32
+ */
33
+ export declare function getValueType(props: any, field: any): string;
34
+ export declare function getRawRoute(route: RouteLocationNormalized): RouteLocationNormalized;
35
+ /**
36
+ * 深度克隆对象、数组
37
+ * @param obj 被克隆的对象
38
+ * @return 克隆后的对象
39
+ */
40
+ export declare function cloneObject(obj: any): any;
41
+ export declare const withInstall: <T>(component: T, alias?: string) => T & Plugin;
42
+ export declare function importViewsFile(path: any): Promise<any>;
@@ -0,0 +1,17 @@
1
+ export declare function is(val: unknown, type: string): boolean;
2
+ export declare function isDef<T = unknown>(val?: T): val is T;
3
+ export declare function isUnDef<T = unknown>(val?: T): val is T;
4
+ export declare function isObject(val: any): val is Record<any, any>;
5
+ export declare function isEmpty<T = unknown>(val: T): val is T;
6
+ export declare function isNull(val: unknown): val is null;
7
+ export declare function isNullAndUnDef(val: unknown): val is null | undefined;
8
+ export declare function isNullOrUnDef(val: unknown): val is null | undefined;
9
+ export declare function isNumber(val: unknown): val is number;
10
+ export declare function isPromise<T = any>(val: any): val is Promise<T>;
11
+ export declare function isString(val: unknown): val is string;
12
+ export declare function isJsonObjectString(val: string): val is string;
13
+ export declare function isFunction(val: unknown): val is Function;
14
+ export declare function isBoolean(val: unknown): val is boolean;
15
+ export declare function isArray(val: any): val is Array<any>;
16
+ export declare function isMap(val: unknown): val is Map<any, any>;
17
+ export declare function isUrl(path: string): boolean;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * copy to https://github.com/developit/mitt
3
+ * Expand clear method
4
+ */
5
+ export declare type EventType = string | symbol;
6
+ export declare type Handler<T = any> = (event?: T) => void;
7
+ export declare type WildcardHandler = (type: EventType, event?: any) => void;
8
+ export declare type EventHandlerList = Array<Handler>;
9
+ export declare type WildCardEventHandlerList = Array<WildcardHandler>;
10
+ export declare type EventHandlerMap = Map<EventType, EventHandlerList | WildCardEventHandlerList>;
11
+ export interface Emitter {
12
+ all: EventHandlerMap;
13
+ on<T = any>(type: EventType, handler: Handler<T>): void;
14
+ on(type: '*', handler: WildcardHandler): void;
15
+ off<T = any>(type: EventType, handler: Handler<T>): void;
16
+ off(type: '*', handler: WildcardHandler): void;
17
+ emit<T = any>(type: EventType, event?: T): void;
18
+ emit(type: '*', event?: any): void;
19
+ clear(): void;
20
+ }
21
+ /**
22
+ * Mitt: Tiny (~200b) functional event emitter / pubsub.
23
+ * @name mitt
24
+ * @returns {Mitt}
25
+ */
26
+ export declare function mitt(all?: EventHandlerMap): Emitter;
@@ -0,0 +1,9 @@
1
+ import { CSSProperties, VNodeChild } from 'vue';
2
+ import { VueTypesInterface, VueTypeValidableDef } from 'vue-types';
3
+ export declare type VueNode = VNodeChild | JSX.Element;
4
+ declare type PropTypes = VueTypesInterface & {
5
+ readonly style: VueTypeValidableDef<CSSProperties>;
6
+ readonly VNodeChild: VueTypeValidableDef<VueNode>;
7
+ };
8
+ declare const propTypes: PropTypes;
9
+ export { propTypes };
@@ -0,0 +1,68 @@
1
+ import { ExtractPropTypes, PropType } from 'vue';
2
+ declare const wrapperKey: unique symbol;
3
+ export declare type PropWrapper<T> = {
4
+ [wrapperKey]: T;
5
+ };
6
+ export declare const propKey: unique symbol;
7
+ declare type ResolveProp<T> = ExtractPropTypes<{
8
+ key: {
9
+ type: T;
10
+ required: true;
11
+ };
12
+ }>['key'];
13
+ declare type ResolvePropType<T> = ResolveProp<T> extends {
14
+ type: infer V;
15
+ } ? V : ResolveProp<T>;
16
+ declare type ResolvePropTypeWithReadonly<T> = Readonly<T> extends Readonly<Array<infer A>> ? ResolvePropType<A[]> : ResolvePropType<T>;
17
+ declare type IfUnknown<T, V> = [unknown] extends [T] ? V : T;
18
+ export declare type BuildPropOption<T, D extends BuildPropType<T, V, C>, R, V, C> = {
19
+ type?: T;
20
+ values?: readonly V[];
21
+ required?: R;
22
+ default?: R extends true ? never : D extends Record<string, unknown> | Array<any> ? () => D : (() => D) | D;
23
+ validator?: ((val: any) => val is C) | ((val: any) => boolean);
24
+ };
25
+ declare type _BuildPropType<T, V, C> = (T extends PropWrapper<unknown> ? T[typeof wrapperKey] : [V] extends [never] ? ResolvePropTypeWithReadonly<T> : never) | V | C;
26
+ export declare type BuildPropType<T, V, C> = _BuildPropType<IfUnknown<T, never>, IfUnknown<V, never>, IfUnknown<C, never>>;
27
+ declare type _BuildPropDefault<T, D> = [T] extends [
28
+ Record<string, unknown> | Array<any> | Function
29
+ ] ? D : D extends () => T ? ReturnType<D> : D;
30
+ export declare type BuildPropDefault<T, D, R> = R extends true ? {
31
+ readonly default?: undefined;
32
+ } : {
33
+ readonly default: Exclude<D, undefined> extends never ? undefined : Exclude<_BuildPropDefault<T, D>, undefined>;
34
+ };
35
+ export declare type BuildPropReturn<T, D, R, V, C> = {
36
+ readonly type: PropType<BuildPropType<T, V, C>>;
37
+ readonly required: IfUnknown<R, false>;
38
+ readonly validator: ((val: unknown) => boolean) | undefined;
39
+ [propKey]: true;
40
+ } & BuildPropDefault<BuildPropType<T, V, C>, IfUnknown<D, never>, IfUnknown<R, false>>;
41
+ /**
42
+ * @description Build prop. It can better optimize prop types
43
+ * @description 生成 prop,能更好地优化类型
44
+ * @example
45
+ // limited options
46
+ // the type will be PropType<'light' | 'dark'>
47
+ buildProp({
48
+ type: String,
49
+ values: ['light', 'dark'],
50
+ } as const)
51
+ * @example
52
+ // limited options and other types
53
+ // the type will be PropType<'small' | 'medium' | number>
54
+ buildProp({
55
+ type: [String, Number],
56
+ values: ['small', 'medium'],
57
+ validator: (val: unknown): val is number => typeof val === 'number',
58
+ } as const)
59
+ @link see more: https://github.com/element-plus/element-plus/pull/3341
60
+ */
61
+ export declare function buildProp<T = never, D extends BuildPropType<T, V, C> = never, R extends boolean = false, V = never, C = never>(option: BuildPropOption<T, D, R, V, C>, key?: string): BuildPropReturn<T, D, R, V, C>;
62
+ declare type NativePropType = [((...args: any) => any) | {
63
+ new (...args: any): any;
64
+ } | undefined | null];
65
+ export declare const buildProps: <O extends { [K in keyof O]: O[K] extends BuildPropReturn<any, any, any, any, any> ? O[K] : [O[K]] extends NativePropType ? O[K] : O[K] extends BuildPropOption<infer T, infer D extends BuildPropType<infer T, infer V, infer C>, infer R, infer V, infer C> ? D extends BuildPropType<T, V, C> ? BuildPropOption<T, D, R, V, C> : never : never; }>(props: O) => { [K_1 in keyof O]: O[K_1] extends {
66
+ [propKey]: boolean;
67
+ } ? O[K_1] : [O[K_1]] extends NativePropType ? O[K_1] : O[K_1] extends BuildPropOption<infer T_1, infer _D extends BuildPropType<infer T_1, infer V_1, infer C_1>, infer R_1, infer V_1, infer C_1> ? BuildPropReturn<T_1, O[K_1]["default"], R_1, V_1, C_1> : never; };
68
+ export {};
@@ -0,0 +1,2 @@
1
+ export declare function buildUUID(): string;
2
+ export declare function buildShortUUID(prefix?: string): string;
@@ -100,7 +100,6 @@ export interface GlobConfig {
100
100
  domainUrl: string;
101
101
  uploadUrl?: string;
102
102
  openSso?: string;
103
- openQianKun?: string;
104
103
  casBaseUrl?: string;
105
104
  viewUrl?: string;
106
105
  urlPrefix?: string;
@@ -109,11 +108,9 @@ export interface GlobConfig {
109
108
  export interface GlobEnvConfig {
110
109
  VITE_GLOB_APP_TITLE: string;
111
110
  VITE_GLOB_API_URL: string;
112
- VITE_USE_MOCK: string;
113
111
  VITE_GLOB_API_URL_PREFIX?: string;
114
112
  VITE_GLOB_APP_SHORT_NAME: string;
115
113
  VITE_GLOB_APP_OPEN_SSO: string;
116
- VITE_GLOB_APP_OPEN_QIANKUN: string;
117
114
  VITE_GLOB_APP_CAS_BASE_URL: string;
118
115
  VITE_GLOB_DOMAIN_URL: string;
119
116
  VITE_GLOB_UPLOAD_URL?: string;
@@ -0,0 +1,8 @@
1
+ import { App } from 'vue';
2
+ export declare const pinia: import("pinia").Pinia;
3
+ /**
4
+ * 设置 pinia.
5
+ *
6
+ * @param app 应用.
7
+ */
8
+ export declare function setupKgStore(app: App<Element>): void;
@@ -1,8 +1,6 @@
1
1
  import { KG_APP } from '../const';
2
2
  import { Menu } from '../project/src/router/types';
3
3
  export declare class KgRouteUtil {
4
- /** @deprecated 已弃用, 请使用 KgUtil 中的同名方法. */
5
- static addOnlineRoutesForAllApps(routes: any[]): any[];
6
4
  /** @deprecated 已弃用, 请使用 KgUtil 中的同名方法. */
7
5
  static getMenuByPath(menus: Array<Menu> | null | undefined, path: string): Menu | null;
8
6
  /** @deprecated 已弃用, 请使用 KgUtil 中的同名方法. */
@@ -154,12 +154,6 @@ export declare class KgUtil {
154
154
  * @return {} 权限策略.
155
155
  */
156
156
  static getPermissionType(permissionCode: string | null | undefined): number | null;
157
- /**
158
- * 给所有模块都添加在线表单的路由.
159
- * 由于默认的在线表单路由是没有区分模块的, 而每个模块下都可能有在线表单, 因此给每个模块都添加在线表单的路由.
160
- * @param routes 当前路由列表.
161
- */
162
- static addOnlineRoutesForAllApps(routes: any[]): any[];
163
157
  /**
164
158
  * 根据菜单地址地址获取菜单.
165
159
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/vue",
3
- "version": "0.27.2-beta.0",
3
+ "version": "0.27.2-beta.2",
4
4
  "scripts": {
5
5
  "build": "npm run use-node && rimraf dist && vue-tsc && vite build",
6
6
  "build:dev": "npm run use-node && rimraf dist && vue-tsc && vite build --mode development",
@@ -47,6 +47,7 @@
47
47
  "@types/fs-extra": "9.0.13",
48
48
  "@types/inquirer": "8.2.5",
49
49
  "@types/lodash-es": "4.17.9",
50
+ "@types/md5": "2.3.5",
50
51
  "@types/node": "18.18.4",
51
52
  "@types/semver": "7.5.3",
52
53
  "@types/store": "2.0.3",
@@ -68,9 +69,11 @@
68
69
  "inquirer": "8.2.5",
69
70
  "less": "4.1.3",
70
71
  "lodash-es": "4.17.21",
72
+ "md5": "2.3.0",
71
73
  "picocolors": "1.0.0",
72
74
  "pinia": "2.0.12",
73
75
  "prettier": "3.3.3",
76
+ "resize-observer-polyfill": "1.5.1",
74
77
  "rimraf": "3.0.2",
75
78
  "rollup": "2.79.1",
76
79
  "rollup-plugin-visualizer": "5.8.3",
@@ -96,7 +99,8 @@
96
99
  "vue": "3.2.43",
97
100
  "vue-i18n": "9.2.2",
98
101
  "vue-router": "4.1.6",
99
- "vue-tsc": "1.8.27"
102
+ "vue-tsc": "1.8.27",
103
+ "vue-types": "4.2.1"
100
104
  },
101
105
  "devDependencies": {},
102
106
  "main": "./dist/kengic-vue.js",
@@ -1,3 +0,0 @@
1
- export * from './setup';
2
- export * from './setupKgLocale';
3
- export * from './setupKgStore';
@@ -1,28 +0,0 @@
1
- import { StoreDefinition } from 'pinia';
2
- import { App } from 'vue';
3
- import { Router } from 'vue-router';
4
- import { IKgOption, P } from '../index.store';
5
- import '@kengic/core.react/index.css';
6
- export declare type IKgOptions = {
7
- /**
8
- * 语言数据.
9
- */
10
- I18N: Record<string, any>;
11
- app: App;
12
- i18n: any;
13
- /** 配置参数. */
14
- option?: IKgOption;
15
- /** 权限方法, 用来判断是否具有某个(某些)权限. */
16
- pFunction: P;
17
- router: Router;
18
- /** 状态数据: 权限. */
19
- usePermissionStore: StoreDefinition<any, any, any, any>;
20
- /** 状态数据: 用户. */
21
- useUserStore: StoreDefinition<any, any, any, any>;
22
- };
23
- /**
24
- * 初始.
25
- *
26
- * @param options 选项参数.
27
- */
28
- export declare function setup(options: IKgOptions): Promise<void>;
@@ -1,18 +0,0 @@
1
- import { Pinia } from 'pinia';
2
- /**
3
- * 配置 pinia 实例.
4
- * @param pinia pinia 实例.
5
- */
6
- export declare function setPinia(pinia: Pinia): void;
7
- /**
8
- * 获取 pinia 实例.
9
- * @return {} pinia 实例.
10
- * @throws Error 如果 pinia 实例为空, 抛错.
11
- */
12
- export declare function getPinia(): Pinia | null;
13
- /**
14
- * 设置 pinia.
15
- *
16
- * @param pinia pinia.
17
- */
18
- export declare function setupKgStore(pinia: Pinia): void;
@@ -1,2 +0,0 @@
1
- import { LocaleType } from '../../project/types/config';
2
- export declare const I18N: Partial<Record<LocaleType, any>>;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes