@indfnd/utils 0.1.6 → 0.1.7

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 (51) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/ind-utils.es.js +1 -1
  3. package/dist/ind-utils.umd.cjs +1 -1
  4. package/package.json +1 -1
  5. package/src/config/base.config.ts +4 -1
  6. package/types/api/com.d.ts +2 -2
  7. package/types/api/index-desc.d.ts +2 -2
  8. package/types/api/index.d.ts +6 -6
  9. package/types/api/item.d.ts +4 -4
  10. package/types/api/platform/dict.d.ts +4 -4
  11. package/types/api/platform/index.d.ts +5 -5
  12. package/types/api/platform/menu.d.ts +17 -11
  13. package/types/api/platform/oss.d.ts +12 -6
  14. package/types/api/platform/user.d.ts +17 -12
  15. package/types/api/user.d.ts +2 -2
  16. package/types/config/base.config.d.ts +30 -30
  17. package/types/config/base.config.d.ts.map +1 -1
  18. package/types/config/dev.config.d.ts +3 -3
  19. package/types/config/index.d.ts +57 -57
  20. package/types/config/prod.config.d.ts +3 -3
  21. package/types/index.d.ts +4 -4
  22. package/types/utils/base64.d.ts +22 -22
  23. package/types/utils/blob.d.ts +3 -3
  24. package/types/utils/cache/dict-cache.d.ts +3 -3
  25. package/types/utils/cache/index-desc.d.ts +4 -4
  26. package/types/utils/cache/index.d.ts +4 -4
  27. package/types/utils/cache/permission-cache.d.ts +4 -4
  28. package/types/utils/cache/user-cache.d.ts +4 -4
  29. package/types/utils/date.d.ts +4 -4
  30. package/types/utils/enum.d.ts +43 -39
  31. package/types/utils/event.d.ts +13 -5
  32. package/types/utils/excel.d.ts +4 -4
  33. package/types/utils/half-year.d.ts +6 -6
  34. package/types/utils/index.d.ts +20 -20
  35. package/types/utils/is-type.d.ts +33 -33
  36. package/types/utils/mime-type.d.ts +67 -67
  37. package/types/utils/number.d.ts +8 -8
  38. package/types/utils/quarter.d.ts +7 -7
  39. package/types/utils/request/axios.extends.d.ts +7 -3
  40. package/types/utils/request/cache-rules.d.ts +3 -3
  41. package/types/utils/request/content-type.d.ts +9 -9
  42. package/types/utils/request/index.d.ts +8 -8
  43. package/types/utils/request/interceptors.d.ts +4 -4
  44. package/types/utils/request/url-params.d.ts +6 -6
  45. package/types/utils/sm3/index.d.ts +6 -6
  46. package/types/utils/sm3/sm3.d.ts +3 -3
  47. package/types/utils/storage.d.ts +8 -8
  48. package/types/utils/table.d.ts +40 -31
  49. package/types/utils/token.d.ts +3 -3
  50. package/types/utils/uuid.d.ts +4 -4
  51. package/types/utils/validate.d.ts +5 -5
@@ -1,68 +1,68 @@
1
1
  export declare const MIME_TYPE: {
2
- aac: string;
3
- abw: string;
4
- arc: string;
5
- avi: string;
6
- azw: string;
7
- bin: string;
8
- bmp: string;
9
- bz: string;
10
- bz2: string;
11
- csh: string;
12
- css: string;
13
- csv: string;
14
- doc: string;
15
- docx: string;
16
- eot: string;
17
- epub: string;
18
- gif: string;
19
- html: string;
20
- ico: string;
21
- ics: string;
22
- jar: string;
23
- jpg: string;
24
- jpeg: string;
25
- js: string;
26
- json: string;
27
- jsonld: string;
28
- mid: string;
29
- midi: string;
30
- mjs: string;
31
- mp3: string;
32
- mpeg: string;
33
- mpkg: string;
34
- odp: string;
35
- ods: string;
36
- odt: string;
37
- oga: string;
38
- ogv: string;
39
- ogx: string;
40
- otf: string;
41
- png: string;
42
- pdf: string;
43
- ppt: string;
44
- pptx: string;
45
- rar: string;
46
- rtf: string;
47
- sh: string;
48
- svg: string;
49
- swf: string;
50
- tar: string;
51
- tiff: string;
52
- ttf: string;
53
- txt: string;
54
- vsd: string;
55
- wav: string;
56
- weba: string;
57
- webm: string;
58
- webp: string;
59
- woff: string;
60
- woff2: string;
61
- xhtml: string;
62
- xls: string;
63
- xlsx: string;
64
- xul: string;
65
- zip: string;
66
- '7z': string;
67
- };
68
- //# sourceMappingURL=mime-type.d.ts.map
2
+ aac: string
3
+ abw: string
4
+ arc: string
5
+ avi: string
6
+ azw: string
7
+ bin: string
8
+ bmp: string
9
+ bz: string
10
+ bz2: string
11
+ csh: string
12
+ css: string
13
+ csv: string
14
+ doc: string
15
+ docx: string
16
+ eot: string
17
+ epub: string
18
+ gif: string
19
+ html: string
20
+ ico: string
21
+ ics: string
22
+ jar: string
23
+ jpg: string
24
+ jpeg: string
25
+ js: string
26
+ json: string
27
+ jsonld: string
28
+ mid: string
29
+ midi: string
30
+ mjs: string
31
+ mp3: string
32
+ mpeg: string
33
+ mpkg: string
34
+ odp: string
35
+ ods: string
36
+ odt: string
37
+ oga: string
38
+ ogv: string
39
+ ogx: string
40
+ otf: string
41
+ png: string
42
+ pdf: string
43
+ ppt: string
44
+ pptx: string
45
+ rar: string
46
+ rtf: string
47
+ sh: string
48
+ svg: string
49
+ swf: string
50
+ tar: string
51
+ tiff: string
52
+ ttf: string
53
+ txt: string
54
+ vsd: string
55
+ wav: string
56
+ weba: string
57
+ webm: string
58
+ webp: string
59
+ woff: string
60
+ woff2: string
61
+ xhtml: string
62
+ xls: string
63
+ xlsx: string
64
+ xul: string
65
+ zip: string
66
+ '7z': string
67
+ }
68
+ //# sourceMappingURL=mime-type.d.ts.map
@@ -1,20 +1,20 @@
1
- export declare function toThousands(numStr: string): string;
1
+ export declare function toThousands(numStr: string): string
2
2
  /**
3
3
  * 数字金额转为汉字
4
4
  */
5
- export declare function toChies(numStr: string): string;
6
- export declare function numToDX(numStr: string): string;
7
- export declare function formatDecimal(num: number | string, decimal?: number): string;
5
+ export declare function toChies(numStr: string): string
6
+ export declare function numToDX(numStr: string): string
7
+ export declare function formatDecimal(num: number | string, decimal?: number): string
8
8
  /**
9
9
  * 保留指定位数的小数,对最后一位进行四舍五入
10
10
  */
11
- export declare function round(number: number, precision?: number): number;
11
+ export declare function round(number: number, precision?: number): number
12
12
  /**
13
13
  * 保留指定位数的小数,对最后一位进行四舍五入,并返回字符串
14
14
  */
15
- export declare function toFixed(num: number | string, precision?: number): string;
15
+ export declare function toFixed(num: number | string, precision?: number): string
16
16
  /**
17
17
  * 数字转中文
18
18
  */
19
- export declare const numToChineseNumerals: (num: any) => any;
20
- //# sourceMappingURL=number.d.ts.map
19
+ export declare const numToChineseNumerals: (num: any) => any
20
+ //# sourceMappingURL=number.d.ts.map
@@ -1,7 +1,7 @@
1
- export declare function quarter2Chinese(quarterNum: number): string;
2
- export declare function getQuarter(date: string): string;
3
- export declare function getQuarterNum(month: number | string): number;
4
- export declare function formatQuarter(quarter: string): string;
5
- export declare function getQuarterBeginMonth(quarter: string): string;
6
- export declare function getQuarterEndMonth(quarter: string): string;
7
- //# sourceMappingURL=quarter.d.ts.map
1
+ export declare function quarter2Chinese(quarterNum: number): string
2
+ export declare function getQuarter(date: string): string
3
+ export declare function getQuarterNum(month: number | string): number
4
+ export declare function formatQuarter(quarter: string): string
5
+ export declare function getQuarterBeginMonth(quarter: string): string
6
+ export declare function getQuarterEndMonth(quarter: string): string
7
+ //# sourceMappingURL=quarter.d.ts.map
@@ -1,5 +1,9 @@
1
- import type { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';
1
+ import type { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios'
2
2
  export interface AxiosExtendsInstance extends AxiosInstance {
3
- formPost?<T = any, R = AxiosResponse<T>>(url: string, data: any, config?: AxiosRequestConfig): Promise<R>;
3
+ formPost?<T = any, R = AxiosResponse<T>>(
4
+ url: string,
5
+ data: any,
6
+ config?: AxiosRequestConfig,
7
+ ): Promise<R>
4
8
  }
5
- //# sourceMappingURL=axios.extends.d.ts.map
9
+ //# sourceMappingURL=axios.extends.d.ts.map
@@ -2,6 +2,6 @@
2
2
  * 配置在该文件下的正则匹配都会被缓存
3
3
  * @type {RegExp[]}
4
4
  */
5
- declare const cacheRules: RegExp[];
6
- export default cacheRules;
7
- //# sourceMappingURL=cache-rules.d.ts.map
5
+ declare const cacheRules: RegExp[]
6
+ export default cacheRules
7
+ //# sourceMappingURL=cache-rules.d.ts.map
@@ -1,10 +1,10 @@
1
- export declare function getContentType(config: any): any;
2
- export declare function setContentType(headers: any, type: string): void;
1
+ export declare function getContentType(config: any): any
2
+ export declare function setContentType(headers: any, type: string): void
3
3
  export declare const CONTENT_TYPE: {
4
- form: string;
5
- multiForm: string;
6
- body: string;
7
- os: string;
8
- json: string;
9
- };
10
- //# sourceMappingURL=content-type.d.ts.map
4
+ form: string
5
+ multiForm: string
6
+ body: string
7
+ os: string
8
+ json: string
9
+ }
10
+ //# sourceMappingURL=content-type.d.ts.map
@@ -1,8 +1,8 @@
1
- import type { AxiosExtendsInstance } from './axios.extends';
2
- import { responseInterceptors } from './interceptors';
3
- export * from './url-params';
4
- export * from './content-type';
5
- export { responseInterceptors };
6
- declare const instance: AxiosExtendsInstance;
7
- export { instance as axios };
8
- //# sourceMappingURL=index.d.ts.map
1
+ import type { AxiosExtendsInstance } from './axios.extends'
2
+ import { responseInterceptors } from './interceptors'
3
+ export * from './url-params'
4
+ export * from './content-type'
5
+ export { responseInterceptors }
6
+ declare const instance: AxiosExtendsInstance
7
+ export { instance as axios }
8
+ //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
- export declare function requestInterceptors(config: any): any;
2
- export declare function responseInterceptors(response: any): any;
3
- export declare function inspectorError(error: any): Promise<never>;
4
- //# sourceMappingURL=interceptors.d.ts.map
1
+ export declare function requestInterceptors(config: any): any
2
+ export declare function responseInterceptors(response: any): any
3
+ export declare function inspectorError(error: any): Promise<never>
4
+ //# sourceMappingURL=interceptors.d.ts.map
@@ -1,8 +1,8 @@
1
1
  interface UrlParams {
2
- sso_token?: string;
3
- sso_id?: string;
4
- [propName: string]: any;
2
+ sso_token?: string
3
+ sso_id?: string
4
+ [propName: string]: any
5
5
  }
6
- export declare function getUrlParams(): UrlParams;
7
- export {};
8
- //# sourceMappingURL=url-params.d.ts.map
6
+ export declare function getUrlParams(): UrlParams
7
+ export {}
8
+ //# sourceMappingURL=url-params.d.ts.map
@@ -1,7 +1,7 @@
1
- import sm3 from './sm3';
1
+ import sm3 from './sm3'
2
2
  export declare const cryptor: {
3
- encrypt: typeof sm3;
4
- encryptForLogin(s: any, method: any, add: any): string;
5
- genSalt(s: any): string;
6
- };
7
- //# sourceMappingURL=index.d.ts.map
3
+ encrypt: typeof sm3
4
+ encryptForLogin(s: any, method: any, add: any): string
5
+ genSalt(s: any): string
6
+ }
7
+ //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,3 @@
1
- declare function sm3(str: any): string;
2
- export default sm3;
3
- //# sourceMappingURL=sm3.d.ts.map
1
+ declare function sm3(str: any): string
2
+ export default sm3
3
+ //# sourceMappingURL=sm3.d.ts.map
@@ -1,8 +1,8 @@
1
- export declare const getSessionStorage: (key: string) => any;
2
- export declare const setSessionStorage: (key: string, value: any) => void;
3
- export declare const removeSessionStorage: (key: string) => void;
4
- export declare function clearSessionStorage(): void;
5
- export declare const getLocalStorage: (key: string) => any;
6
- export declare const setLocalStorage: (key: string, value: any) => void;
7
- export declare const removeLocalStorage: (key: string) => void;
8
- //# sourceMappingURL=storage.d.ts.map
1
+ export declare const getSessionStorage: (key: string) => any
2
+ export declare const setSessionStorage: (key: string, value: any) => void
3
+ export declare const removeSessionStorage: (key: string) => void
4
+ export declare function clearSessionStorage(): void
5
+ export declare const getLocalStorage: (key: string) => any
6
+ export declare const setLocalStorage: (key: string, value: any) => void
7
+ export declare const removeLocalStorage: (key: string) => void
8
+ //# sourceMappingURL=storage.d.ts.map
@@ -1,37 +1,37 @@
1
1
  interface ColumnGroup {
2
- key?: string;
3
- title?: string;
4
- keyProp?: string;
5
- titleProp?: string;
6
- titleFormatter?: (title: string) => string;
7
- sortProp?: string;
8
- sortOrder?: boolean | 'asc' | 'desc';
9
- keyLastSuffix?: string;
10
- isLimitChildren?: boolean;
11
- headerTooltip?: boolean | string | ((data: any, parents: Array<any>) => string);
12
- children?: ColumnGroup[];
13
- [propName: string]: any;
2
+ key?: string
3
+ title?: string
4
+ keyProp?: string
5
+ titleProp?: string
6
+ titleFormatter?: (title: string) => string
7
+ sortProp?: string
8
+ sortOrder?: boolean | 'asc' | 'desc'
9
+ keyLastSuffix?: string
10
+ isLimitChildren?: boolean
11
+ headerTooltip?: boolean | string | ((data: any, parents: Array<any>) => string)
12
+ children?: ColumnGroup[]
13
+ [propName: string]: any
14
14
  }
15
15
  interface row2columnOption {
16
- keyPropName?: string;
17
- titlePropName?: string;
18
- sumColumnDefs?: Array<{
19
- key: string;
20
- title: string;
21
- [propName: string]: any;
22
- }>;
23
- sumColKeyProp?: 'sumColCode';
24
- sumColTitleProp?: 'sumColName';
16
+ keyPropName?: string
17
+ titlePropName?: string
18
+ sumColumnDefs?: Array<{
19
+ key: string
20
+ title: string
21
+ [propName: string]: any
22
+ }>
23
+ sumColKeyProp?: 'sumColCode'
24
+ sumColTitleProp?: 'sumColName'
25
25
  }
26
26
  interface Column {
27
- key?: string;
28
- title?: string;
29
- children?: Column[];
30
- [propName: string]: any;
27
+ key?: string
28
+ title?: string
29
+ children?: Column[]
30
+ [propName: string]: any
31
31
  }
32
32
  interface row2columnResult {
33
- columns: Column[];
34
- data: Array<any>;
33
+ columns: Column[]
34
+ data: Array<any>
35
35
  }
36
36
  /**
37
37
  * 行转列公共方法
@@ -43,7 +43,12 @@ interface row2columnResult {
43
43
  * @param option 一些参数
44
44
  * @returns 行转列后的表头和数据
45
45
  */
46
- export declare function row2column(data: Array<any>, columnGroups: ColumnGroup[], rowKey: string | string[], option?: row2columnOption): row2columnResult;
46
+ export declare function row2column(
47
+ data: Array<any>,
48
+ columnGroups: ColumnGroup[],
49
+ rowKey: string | string[],
50
+ option?: row2columnOption,
51
+ ): row2columnResult
47
52
  /**
48
53
  * 从行转列的数据转回行数据
49
54
  *
@@ -52,6 +57,10 @@ export declare function row2column(data: Array<any>, columnGroups: ColumnGroup[]
52
57
  * @param option 一些参数
53
58
  * @returns 行数据
54
59
  */
55
- export declare function flattenRow2ColumnData(data?: Array<any>, columns?: Column[], option?: row2columnOption): Array<any>;
56
- export {};
57
- //# sourceMappingURL=table.d.ts.map
60
+ export declare function flattenRow2ColumnData(
61
+ data?: Array<any>,
62
+ columns?: Column[],
63
+ option?: row2columnOption,
64
+ ): Array<any>
65
+ export {}
66
+ //# sourceMappingURL=table.d.ts.map
@@ -1,3 +1,3 @@
1
- export declare function setToken(token: string): void;
2
- export declare function getToken(): string | boolean;
3
- //# sourceMappingURL=token.d.ts.map
1
+ export declare function setToken(token: string): void
2
+ export declare function getToken(): string | boolean
3
+ //# sourceMappingURL=token.d.ts.map
@@ -1,7 +1,7 @@
1
- declare const uuid: (size?: number) => string;
2
- export { uuid };
1
+ declare const uuid: (size?: number) => string
2
+ export { uuid }
3
3
  /**
4
4
  * 生成uid
5
5
  */
6
- export declare function guid(): string;
7
- //# sourceMappingURL=uuid.d.ts.map
6
+ export declare function guid(): string
7
+ //# sourceMappingURL=uuid.d.ts.map
@@ -1,9 +1,9 @@
1
- export declare function checkIdCard(idcard: string): string;
2
- export declare function checkPhone(str: string): boolean;
1
+ export declare function checkIdCard(idcard: string): string
2
+ export declare function checkPhone(str: string): boolean
3
3
  /**
4
4
  * 校验电话号码是否正确
5
5
  *
6
6
  */
7
- export declare function checkTel(val: any): boolean;
8
- export declare function checkVehicleNo(str: string): boolean;
9
- //# sourceMappingURL=validate.d.ts.map
7
+ export declare function checkTel(val: any): boolean
8
+ export declare function checkVehicleNo(str: string): boolean
9
+ //# sourceMappingURL=validate.d.ts.map