@das-fed/utils 6.3.0-beta.1 → 6.3.0-beta.4

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 (167) hide show
  1. package/__VLS_types.d.ts +124 -0
  2. package/api-services/modules/{file.d.ts → file/index.d.ts} +4 -4
  3. package/api-services/modules/{file.js → file/index.js} +18 -36
  4. package/api-services/modules/file/index.js.gz +0 -0
  5. package/api-services/modules/index.js.gz +0 -0
  6. package/atob/index.d.ts +2 -2
  7. package/common-info/{getIframeUrl.js → getIframeUrl/index.js} +1 -2
  8. package/common-info/getInfoFromUrl/index.js +84 -0
  9. package/common-info/getInfoFromUrl/index.js.gz +0 -0
  10. package/common-info/index.d.ts +1 -1
  11. package/common-info/index.js +2 -4
  12. package/common-info/index.js.gz +0 -0
  13. package/common-info/{set-personal-info.d.ts → set-personal-info/index.d.ts} +1 -1
  14. package/common-info/{set-personal-info.js → set-personal-info/index.js} +10 -24
  15. package/common-info/set-personal-info/index.js.gz +0 -0
  16. package/common-info/type.d.ts +104 -0
  17. package/common-tools/{arr-tools.d.ts → arr-tools/index.d.ts} +1 -1
  18. package/common-tools/{date-format.js → date-format/index.js} +1 -2
  19. package/common-tools/{get-url-params.d.ts → get-url-params/index.d.ts} +1 -1
  20. package/common-tools/{get-url-params.js → get-url-params/index.js} +2 -4
  21. package/common-tools/get-url-params/index.js.gz +0 -0
  22. package/common-tools/{nest-tree-format.d.ts → nest-tree-format/index.d.ts} +1 -1
  23. package/common-tools/{nest-tree-format.js → nest-tree-format/index.js} +2 -4
  24. package/common-tools/obj-tools/index.js +14 -0
  25. package/common-tools/{platform-tools.js → platform-tools/index.js} +1 -2
  26. package/common-tools/{queue-promise.d.ts → queue-promise/index.d.ts} +1 -1
  27. package/common-tools/setHtmlMinWH/index.d.ts +5 -0
  28. package/common-tools/update-fav-icon/index.d.ts +11 -0
  29. package/common-tools/update-fav-icon/index.js +21 -0
  30. package/create-api-service/index.js +255 -295
  31. package/create-api-service/index.js.gz +0 -0
  32. package/create-api-service/{sso.d.ts → sso/index.d.ts} +5 -5
  33. package/create-api-service/{sso.js → sso/index.js} +421 -444
  34. package/create-api-service/sso/index.js.gz +0 -0
  35. package/curring-http/index.js +1626 -4809
  36. package/curring-http/index.js.gz +0 -0
  37. package/curring-http/type.d.ts +89 -0
  38. package/dom-check-in/index.js +5 -5
  39. package/dom-watcher/index.d.ts +1 -1
  40. package/esm-map.json +8 -0
  41. package/load-js/index.d.ts +1 -1
  42. package/load-js/index.js +1 -2
  43. package/nextTiken/index.js +5 -10
  44. package/nextTiken/index.js.gz +0 -0
  45. package/oss/index.d.ts +1 -1
  46. package/oss/index.js +1 -2
  47. package/package.json +8 -3
  48. package/pinyin-first-character/index.js +45 -50
  49. package/pinyin-first-character/index.js.gz +0 -0
  50. package/style/index.js +5 -9
  51. package/style/index.js.gz +0 -0
  52. package/style/style.d.ts +3 -3
  53. package/token-tools/index.d.ts +1 -1
  54. package/token-tools/index.js.gz +0 -0
  55. package/use-low-code/index.js +1 -2
  56. package/use-low-code/index.js.gz +0 -0
  57. package/webSocket-service/index.js +41 -52
  58. package/webSocket-service/index.js.gz +0 -0
  59. package/webSocket-service/type.d.ts +28 -0
  60. package/with-install/index.d.ts +1 -1
  61. package/common-info/getInfoFromUrl.js +0 -85
  62. package/common-tools/obj-tools.js +0 -20
  63. package/common-tools/setHtmlMinWH.d.ts +0 -5
  64. package/common-tools/update-fav-icon.d.ts +0 -10
  65. package/common-tools/update-fav-icon.js +0 -22
  66. package/dimple-canvas/use-dimple-canvas/core/antv-x6/index.d.ts +0 -29
  67. package/dimple-canvas/use-dimple-canvas/core/antv-x6/index.js +0 -19925
  68. package/dimple-canvas/use-dimple-canvas/core/konva/index.d.ts +0 -54
  69. package/dimple-canvas/use-dimple-canvas/core/konva/index.js +0 -119
  70. package/dimple-canvas/use-dimple-canvas/core/konva/utils/add-event-listener.d.ts +0 -101
  71. package/dimple-canvas/use-dimple-canvas/core/konva/utils/add-event-listener.js +0 -17
  72. package/dimple-canvas/use-dimple-canvas/core/konva/utils/add-object/index.d.ts +0 -8
  73. package/dimple-canvas/use-dimple-canvas/core/konva/utils/add-object/index.js +0 -55
  74. package/dimple-canvas/use-dimple-canvas/core/konva/utils/create-canvas.d.ts +0 -5
  75. package/dimple-canvas/use-dimple-canvas/core/konva/utils/create-canvas.js +0 -14
  76. package/dimple-canvas/use-dimple-canvas/core/konva/utils/find.d.ts +0 -5
  77. package/dimple-canvas/use-dimple-canvas/core/konva/utils/find.js +0 -5
  78. package/dimple-canvas/use-dimple-canvas/core/konva/utils/guideline.d.ts +0 -5
  79. package/dimple-canvas/use-dimple-canvas/core/konva/utils/guideline.js +0 -181
  80. package/dimple-canvas/use-dimple-canvas/core/konva/utils/lib.d.ts +0 -4
  81. package/dimple-canvas/use-dimple-canvas/core/konva/utils/lib.js +0 -7402
  82. package/dimple-canvas/use-dimple-canvas/core/konva/utils/load-json.d.ts +0 -6
  83. package/dimple-canvas/use-dimple-canvas/core/konva/utils/load-json.js +0 -13
  84. package/dimple-canvas/use-dimple-canvas/core/konva/utils/remove-object.d.ts +0 -4
  85. package/dimple-canvas/use-dimple-canvas/core/konva/utils/remove-object.js +0 -7
  86. package/dimple-canvas/use-dimple-canvas/core/konva/utils/rule.d.ts +0 -8
  87. package/dimple-canvas/use-dimple-canvas/core/konva/utils/rule.js +0 -193
  88. package/dimple-canvas/use-dimple-canvas/core/konva/utils/transform-axis.d.ts +0 -11
  89. package/dimple-canvas/use-dimple-canvas/core/konva/utils/transform-axis.js +0 -20
  90. package/dimple-canvas/use-dimple-canvas/core/konva/utils/transformer.d.ts +0 -5
  91. package/dimple-canvas/use-dimple-canvas/core/konva/utils/transformer.js +0 -52
  92. package/dimple-canvas/use-dimple-canvas/core/konva/utils/wheel-zoom.d.ts +0 -2
  93. package/dimple-canvas/use-dimple-canvas/core/konva/utils/wheel-zoom.js +0 -14
  94. package/dimple-canvas/use-dimple-canvas/index.d.ts +0 -9
  95. package/dimple-canvas/use-dimple-canvas/index.js +0 -10
  96. package/directive/auth.d.ts +0 -8
  97. package/directive/auth.js +0 -64
  98. package/directive/clickOutside.d.ts +0 -6
  99. package/directive/clickOutside.js +0 -27
  100. package/directive/hoverInside.d.ts +0 -6
  101. package/directive/hoverInside.js +0 -21
  102. package/directive/utils.d.ts +0 -7
  103. package/directive/utils.js +0 -7
  104. package/hooks/popup-manager/use-zindex.d.ts +0 -5
  105. package/hooks/popup-manager/use-zindex.js +0 -22
  106. package/hooks/use-get-auth/apis.d.ts +0 -4
  107. package/hooks/use-get-auth/apis.js +0 -8
  108. package/hooks/use-get-auth/index.d.ts +0 -9
  109. package/hooks/use-get-auth/index.js +0 -57
  110. package/style/math.js +0 -17
  111. package/style/style.js +0 -61
  112. package/vue/hooks/use-model-value.d.ts +0 -3
  113. package/vue/hooks/use-model-value.js +0 -10
  114. /package/api-services/modules/{app-manage.d.ts → app-manage/index.d.ts} +0 -0
  115. /package/api-services/modules/{app-manage.js → app-manage/index.js} +0 -0
  116. /package/api-services/modules/{authentication.d.ts → authentication/index.d.ts} +0 -0
  117. /package/api-services/modules/{authentication.js → authentication/index.js} +0 -0
  118. /package/api-services/modules/{bems.d.ts → bems/index.d.ts} +0 -0
  119. /package/api-services/modules/{bems.js → bems/index.js} +0 -0
  120. /package/api-services/modules/{contract.d.ts → contract/index.d.ts} +0 -0
  121. /package/api-services/modules/{contract.js → contract/index.js} +0 -0
  122. /package/api-services/modules/{duty-manage.d.ts → duty-manage/index.d.ts} +0 -0
  123. /package/api-services/modules/{duty-manage.js → duty-manage/index.js} +0 -0
  124. /package/api-services/modules/{enterpriseright.d.ts → enterpriseright/index.d.ts} +0 -0
  125. /package/api-services/modules/{enterpriseright.js → enterpriseright/index.js} +0 -0
  126. /package/api-services/modules/{gateway-edge.d.ts → gateway-edge/index.d.ts} +0 -0
  127. /package/api-services/modules/{gateway-edge.js → gateway-edge/index.js} +0 -0
  128. /package/api-services/modules/{iot.d.ts → iot/index.d.ts} +0 -0
  129. /package/api-services/modules/{iot.js → iot/index.js} +0 -0
  130. /package/api-services/modules/{justauth.d.ts → justauth/index.d.ts} +0 -0
  131. /package/api-services/modules/{justauth.js → justauth/index.js} +0 -0
  132. /package/api-services/modules/{knowledge.d.ts → knowledge/index.d.ts} +0 -0
  133. /package/api-services/modules/{knowledge.js → knowledge/index.js} +0 -0
  134. /package/api-services/modules/{link.d.ts → link/index.d.ts} +0 -0
  135. /package/api-services/modules/{link.js → link/index.js} +0 -0
  136. /package/api-services/modules/{permission.d.ts → permission/index.d.ts} +0 -0
  137. /package/api-services/modules/{permission.js → permission/index.js} +0 -0
  138. /package/api-services/modules/{platformManage.d.ts → platformManage/index.d.ts} +0 -0
  139. /package/api-services/modules/{platformManage.js → platformManage/index.js} +0 -0
  140. /package/api-services/modules/{portal.d.ts → portal/index.d.ts} +0 -0
  141. /package/api-services/modules/{portal.js → portal/index.js} +0 -0
  142. /package/api-services/modules/{space-manage.d.ts → space-manage/index.d.ts} +0 -0
  143. /package/api-services/modules/{space-manage.js → space-manage/index.js} +0 -0
  144. /package/api-services/modules/{super-admin.d.ts → super-admin/index.d.ts} +0 -0
  145. /package/api-services/modules/{super-admin.js → super-admin/index.js} +0 -0
  146. /package/api-services/modules/{supplier.d.ts → supplier/index.d.ts} +0 -0
  147. /package/api-services/modules/{supplier.js → supplier/index.js} +0 -0
  148. /package/api-services/modules/{supplychain-manage.d.ts → supplychain-manage/index.d.ts} +0 -0
  149. /package/api-services/modules/{supplychain-manage.js → supplychain-manage/index.js} +0 -0
  150. /package/api-services/modules/{systemConfiguration.d.ts → systemConfiguration/index.d.ts} +0 -0
  151. /package/api-services/modules/{systemConfiguration.js → systemConfiguration/index.js} +0 -0
  152. /package/api-services/modules/{tool.d.ts → tool/index.d.ts} +0 -0
  153. /package/api-services/modules/{tool.js → tool/index.js} +0 -0
  154. /package/api-services/src/{create-service.d.ts → create-service/index.d.ts} +0 -0
  155. /package/api-services/src/{create-service.js → create-service/index.js} +0 -0
  156. /package/common-info/{getIframeUrl.d.ts → getIframeUrl/index.d.ts} +0 -0
  157. /package/common-info/{getInfoFromUrl.d.ts → getInfoFromUrl/index.d.ts} +0 -0
  158. /package/common-tools/{arr-tools.js → arr-tools/index.js} +0 -0
  159. /package/common-tools/{date-format.d.ts → date-format/index.d.ts} +0 -0
  160. /package/common-tools/{handle-data.d.ts → handle-data/index.d.ts} +0 -0
  161. /package/common-tools/{handle-data.js → handle-data/index.js} +0 -0
  162. /package/common-tools/{obj-tools.d.ts → obj-tools/index.d.ts} +0 -0
  163. /package/common-tools/{platform-tools.d.ts → platform-tools/index.d.ts} +0 -0
  164. /package/common-tools/{queue-promise.js → queue-promise/index.js} +0 -0
  165. /package/common-tools/{setHtmlMinWH.js → setHtmlMinWH/index.js} +0 -0
  166. /package/create-api-service/{proxy-sso.d.ts → proxy-sso/index.d.ts} +0 -0
  167. /package/create-api-service/{proxy-sso.js → proxy-sso/index.js} +0 -0
@@ -0,0 +1,124 @@
1
+ // @ts-nocheck
2
+
3
+ type __VLS_IntrinsicElements = __VLS_PickNotAny<import('vue/jsx-runtime').JSX.IntrinsicElements, __VLS_PickNotAny<JSX.IntrinsicElements, Record<string, any>>>;
4
+ type __VLS_Element = __VLS_PickNotAny<import('vue/jsx-runtime').JSX.Element, JSX.Element>;
5
+
6
+ type __VLS_IsAny<T> = 0 extends 1 & T ? true : false;
7
+ type __VLS_PickNotAny<A, B> = __VLS_IsAny<A> extends true ? B : A;
8
+
9
+ type __VLS_Prettify<T> = { [K in keyof T]: T[K]; } & {};
10
+
11
+ type __VLS_OmitKeepDiscriminatedUnion<T, K extends keyof any> =
12
+ T extends any
13
+ ? Pick<T, Exclude<keyof T, K>>
14
+ : never;
15
+
16
+ type __VLS_GlobalComponents =
17
+ __VLS_PickNotAny<import('vue').GlobalComponents, {}>
18
+ & __VLS_PickNotAny<import('@vue/runtime-core').GlobalComponents, {}>
19
+ & __VLS_PickNotAny<import('@vue/runtime-dom').GlobalComponents, {}>
20
+ & Pick<typeof import('vue'),
21
+ 'Transition'
22
+ | 'TransitionGroup'
23
+ | 'KeepAlive'
24
+ | 'Suspense'
25
+ | 'Teleport'
26
+ >;
27
+
28
+ declare const __VLS_intrinsicElements: __VLS_IntrinsicElements;
29
+
30
+ // v-for
31
+ declare function __VLS_getVForSourceType(source: number): [number, number, number][];
32
+ declare function __VLS_getVForSourceType(source: string): [string, number, number][];
33
+ declare function __VLS_getVForSourceType<T extends any[]>(source: T): [
34
+ T[number], // item
35
+ number, // key
36
+ number, // index
37
+ ][];
38
+ declare function __VLS_getVForSourceType<T extends { [Symbol.iterator](): Iterator<any> }>(source: T): [
39
+ T extends { [Symbol.iterator](): Iterator<infer T1> } ? T1 : never, // item
40
+ number, // key
41
+ undefined, // index
42
+ ][];
43
+ declare function __VLS_getVForSourceType<T>(source: T): [
44
+ T[keyof T], // item
45
+ keyof T, // key
46
+ number, // index
47
+ ][];
48
+
49
+ declare function __VLS_getSlotParams<T>(slot: T): Parameters<__VLS_PickNotAny<NonNullable<T>, (...args: any[]) => any>>;
50
+ declare function __VLS_getSlotParam<T>(slot: T): Parameters<__VLS_PickNotAny<NonNullable<T>, (...args: any[]) => any>>[0];
51
+ declare function __VLS_directiveFunction<T>(dir: T):
52
+ T extends import('vue').ObjectDirective<infer E, infer V> | import('vue').FunctionDirective<infer E, infer V> ? (value: V) => void
53
+ : T;
54
+ declare function __VLS_withScope<T, K>(ctx: T, scope: K): ctx is T & K;
55
+ declare function __VLS_makeOptional<T>(t: T): { [K in keyof T]?: T[K] };
56
+
57
+ type __VLS_SelfComponent<N, C> = string extends N ? {} : N extends string ? { [P in N]: C } : {};
58
+ type __VLS_WithComponent<N0 extends string, LocalComponents, N1 extends string, N2 extends string, N3 extends string> =
59
+ N1 extends keyof LocalComponents ? N1 extends N0 ? Pick<LocalComponents, N0> : { [K in N0]: LocalComponents[N1] } :
60
+ N2 extends keyof LocalComponents ? N2 extends N0 ? Pick<LocalComponents, N0> : { [K in N0]: LocalComponents[N2] } :
61
+ N3 extends keyof LocalComponents ? N3 extends N0 ? Pick<LocalComponents, N0> : { [K in N0]: LocalComponents[N3] } :
62
+ N1 extends keyof __VLS_GlobalComponents ? N1 extends N0 ? Pick<__VLS_GlobalComponents, N0> : { [K in N0]: __VLS_GlobalComponents[N1] } :
63
+ N2 extends keyof __VLS_GlobalComponents ? N2 extends N0 ? Pick<__VLS_GlobalComponents, N0> : { [K in N0]: __VLS_GlobalComponents[N2] } :
64
+ N3 extends keyof __VLS_GlobalComponents ? N3 extends N0 ? Pick<__VLS_GlobalComponents, N0> : { [K in N0]: __VLS_GlobalComponents[N3] } :
65
+ { [K in N0]: unknown }
66
+
67
+ type __VLS_FillingEventArg_ParametersLength<E extends (...args: any) => any> = __VLS_IsAny<Parameters<E>> extends true ? -1 : Parameters<E>['length'];
68
+ type __VLS_FillingEventArg<E> = E extends (...args: any) => any ? __VLS_FillingEventArg_ParametersLength<E> extends 0 ? ($event?: undefined) => ReturnType<E> : E : E;
69
+ declare function __VLS_asFunctionalComponent<T, K = T extends new (...args: any) => any ? InstanceType<T> : unknown>(t: T, instance?: K):
70
+ T extends new (...args: any) => any
71
+ ? (props: (K extends { $props: infer Props } ? Props : any) & Record<string, unknown>, ctx?: {
72
+ attrs?: any,
73
+ slots?: K extends { $slots: infer Slots } ? Slots : any,
74
+ emit?: K extends { $emit: infer Emit } ? Emit : any
75
+ }) => __VLS_Element & { __ctx?: typeof ctx & { props?: typeof props; expose?(exposed: K): void; } }
76
+ : T extends () => any ? (props: {}, ctx?: any) => ReturnType<T>
77
+ : T extends (...args: any) => any ? T
78
+ : (_: {} & Record<string, unknown>, ctx?: any) => { __ctx?: { attrs?: any, expose?: any, slots?: any, emit?: any, props?: {} & Record<string, unknown> } };
79
+ declare function __VLS_elementAsFunctionalComponent<T>(t: T): (_: T & Record<string, unknown>, ctx?: any) => { __ctx?: { attrs?: any, expose?: any, slots?: any, emit?: any, props?: T & Record<string, unknown> } };
80
+ declare function __VLS_functionalComponentArgsRest<T extends (...args: any) => any>(t: T): Parameters<T>['length'] extends 2 ? [any] : [];
81
+ declare function __VLS_pickEvent<E1, E2>(emitEvent: E1, propEvent: E2): __VLS_FillingEventArg<
82
+ __VLS_PickNotAny<
83
+ __VLS_AsFunctionOrAny<E2>,
84
+ __VLS_AsFunctionOrAny<E1>
85
+ >
86
+ > | undefined;
87
+ declare function __VLS_pickFunctionalComponentCtx<T, K>(comp: T, compInstance: K): __VLS_PickNotAny<
88
+ '__ctx' extends keyof __VLS_PickNotAny<K, {}> ? K extends { __ctx?: infer Ctx } ? Ctx : never : any
89
+ , T extends (props: any, ctx: infer Ctx) => any ? Ctx : any
90
+ >;
91
+ type __VLS_FunctionalComponentProps<T, K> =
92
+ '__ctx' extends keyof __VLS_PickNotAny<K, {}> ? K extends { __ctx?: { props?: infer P } } ? NonNullable<P> : never
93
+ : T extends (props: infer P, ...args: any) => any ? P :
94
+ {};
95
+ type __VLS_AsFunctionOrAny<F> = unknown extends F ? any : ((...args: any) => any) extends F ? F : any;
96
+
97
+ declare function __VLS_normalizeSlot<S>(s: S): S extends () => infer R ? (props: {}) => R : S;
98
+
99
+ /**
100
+ * emit
101
+ */
102
+ // fix https://github.com/vuejs/language-tools/issues/926
103
+ type __VLS_UnionToIntersection<U> = (U extends unknown ? (arg: U) => unknown : never) extends ((arg: infer P) => unknown) ? P : never;
104
+ type __VLS_OverloadUnionInner<T, U = unknown> = U & T extends (...args: infer A) => infer R
105
+ ? U extends T
106
+ ? never
107
+ : __VLS_OverloadUnionInner<T, Pick<T, keyof T> & U & ((...args: A) => R)> | ((...args: A) => R)
108
+ : never;
109
+ type __VLS_OverloadUnion<T> = Exclude<
110
+ __VLS_OverloadUnionInner<(() => never) & T>,
111
+ T extends () => never ? never : () => never
112
+ >;
113
+ type __VLS_ConstructorOverloads<T> = __VLS_OverloadUnion<T> extends infer F
114
+ ? F extends (event: infer E, ...args: infer A) => any
115
+ ? { [K in E & string]: (...args: A) => void; }
116
+ : never
117
+ : never;
118
+ type __VLS_NormalizeEmits<T> = __VLS_Prettify<
119
+ __VLS_UnionToIntersection<
120
+ __VLS_ConstructorOverloads<T> & {
121
+ [K in keyof T]: T[K] extends any[] ? { (...args: T[K]): void } : never
122
+ }
123
+ >
124
+ >;
@@ -19,13 +19,13 @@ export declare const useFile: () => {
19
19
  errorMessage: any;
20
20
  errorImport: any;
21
21
  errorFilePath: any;
22
- fileImport: (importFunc: (n?: any) => Promise<ImExportFuncRelated>, file: any, options: optionsRalated, needProgress?: boolean, errPathName?: string, isBatch?: boolean) => Promise<void>;
23
- fileExport: (exportFunc: () => Promise<ImExportFuncRelated>, fileName?: string, fileSuffix?: string, needProgress?: boolean) => Promise<void>;
24
- fileAction: (exportFunc: () => Promise<ImExportFuncRelated>, fileName?: string, actionTitle?: string) => Promise<void>;
22
+ fileImport: (importFunc: (n?: any) => Promise<ImExportFuncRelated>, file: any, options: optionsRalated, needProgress?: boolean, errPathName?: string, isBatch?: boolean) => any;
23
+ fileExport: (exportFunc: () => Promise<ImExportFuncRelated>, fileName?: string, fileSuffix?: string, needProgress?: boolean) => any;
24
+ fileAction: (exportFunc: () => Promise<ImExportFuncRelated>, fileName?: string, actionTitle?: string) => any;
25
25
  generateUniqueName: (fileName?: string) => string;
26
26
  downloadFile: (path: any, filename: string, fileSuffix?: string) => void;
27
27
  resetStataus: () => void;
28
- checkProgress: (taskId: any, type: string, fileName: string, fileSuffix?: string) => Promise<void>;
28
+ checkProgress: (taskId: any, type: string, fileName: string, fileSuffix?: string) => any;
29
29
  };
30
30
  /**
31
31
  * 下载文件
@@ -28,8 +28,7 @@ var ee = { exports: {} };
28
28
  var r = -t.utcOffset(), e = Math.abs(r), n = Math.floor(e / 60), s = e % 60;
29
29
  return (r <= 0 ? "+" : "-") + E(n, 2, "0") + ":" + E(s, 2, "0");
30
30
  }, m: function t(r, e) {
31
- if (r.date() < e.date())
32
- return -t(e, r);
31
+ if (r.date() < e.date()) return -t(e, r);
33
32
  var n = 12 * (e.year() - r.year()) + (e.month() - r.month()), s = r.clone().add(n, D), i = e - s < 0, u = r.clone().add(n + (i ? -1 : 1), D);
34
33
  return +(-(n + (e - s) / (i ? s - u : u - s)) || 0);
35
34
  }, a: function(t) {
@@ -44,22 +43,19 @@ var ee = { exports: {} };
44
43
  return t instanceof h || !(!t || !t[W]);
45
44
  }, f = function t(r, e, n) {
46
45
  var s;
47
- if (!r)
48
- return I;
46
+ if (!r) return I;
49
47
  if (typeof r == "string") {
50
48
  var i = r.toLowerCase();
51
49
  H[i] && (s = i), e && (H[i] = e, s = i);
52
50
  var u = r.split("-");
53
- if (!s && u.length > 1)
54
- return t(u[0]);
51
+ if (!s && u.length > 1) return t(u[0]);
55
52
  } else {
56
53
  var d = r.name;
57
54
  H[d] = r, s = d;
58
55
  }
59
56
  return !n && s && (I = s), s || !n && I;
60
57
  }, a = function(t, r) {
61
- if (J(t))
62
- return t.clone();
58
+ if (J(t)) return t.clone();
63
59
  var e = typeof r == "object" ? r : {};
64
60
  return e.date = t, e.args = arguments, new h(e);
65
61
  }, o = z;
@@ -74,12 +70,9 @@ var ee = { exports: {} };
74
70
  return r.parse = function(e) {
75
71
  this.$d = function(n) {
76
72
  var s = n.date, i = n.utc;
77
- if (s === null)
78
- return /* @__PURE__ */ new Date(NaN);
79
- if (o.u(s))
80
- return /* @__PURE__ */ new Date();
81
- if (s instanceof Date)
82
- return new Date(s);
73
+ if (s === null) return /* @__PURE__ */ new Date(NaN);
74
+ if (o.u(s)) return /* @__PURE__ */ new Date();
75
+ if (s instanceof Date) return new Date(s);
83
76
  if (typeof s == "string" && !/Z$/i.test(s)) {
84
77
  var u = s.match(q);
85
78
  if (u) {
@@ -143,8 +136,7 @@ var ee = { exports: {} };
143
136
  if (i === D || i === k) {
144
137
  var m = this.clone().set(P, 1);
145
138
  m.$d[d](p), m.init(), this.$d = m.set(P, Math.min(this.$D, m.daysInMonth())).$d;
146
- } else
147
- d && this.$d[d](p);
139
+ } else d && this.$d[d](p);
148
140
  return this.init(), this;
149
141
  }, r.set = function(e, n) {
150
142
  return this.clone().$set(e, n);
@@ -157,22 +149,17 @@ var ee = { exports: {} };
157
149
  var w = a(i);
158
150
  return o.w(w.date(w.date() + Math.round(g * e)), i);
159
151
  };
160
- if (u === D)
161
- return this.set(D, this.$M + e);
162
- if (u === k)
163
- return this.set(k, this.$y + e);
164
- if (u === y)
165
- return d(1);
166
- if (u === Y)
167
- return d(7);
152
+ if (u === D) return this.set(D, this.$M + e);
153
+ if (u === k) return this.set(k, this.$y + e);
154
+ if (u === y) return d(1);
155
+ if (u === Y) return d(7);
168
156
  var p = (s = {}, s[b] = c, s[_] = j, s[T] = $, s)[u] || 1, m = this.$d.getTime() + e * p;
169
157
  return o.w(m, this);
170
158
  }, r.subtract = function(e, n) {
171
159
  return this.add(-1 * e, n);
172
160
  }, r.format = function(e) {
173
161
  var n = this, s = this.$locale();
174
- if (!this.isValid())
175
- return s.invalidDate || B;
162
+ if (!this.isValid()) return s.invalidDate || B;
176
163
  var i = e || "YYYY-MM-DDTHH:mm:ssZ", u = o.z(this), d = this.$H, p = this.$m, m = this.$M, g = s.weekdays, w = s.months, A = s.meridiem, O = function(x, N, K, V) {
177
164
  return x && (x[N] || x(n, i)) || K[N].slice(0, V);
178
165
  }, U = function(x) {
@@ -276,8 +263,7 @@ var ee = { exports: {} };
276
263
  }, r.$locale = function() {
277
264
  return H[this.$L];
278
265
  }, r.locale = function(e, n) {
279
- if (!e)
280
- return this.$L;
266
+ if (!e) return this.$L;
281
267
  var s = this.clone(), i = f(e, n, !0);
282
268
  return i && (s.$L = i), s;
283
269
  }, r.clone = function() {
@@ -324,8 +310,7 @@ const ie = /* @__PURE__ */ ne(ae), oe = G.get("token"), ue = G.post("putObject",
324
310
  var A;
325
311
  R = S, h && (c.value = "normal", $.value = 0, v.value = "导入进度", l.value = !0, T.value = ""), k = a;
326
312
  const r = await B();
327
- if (!r.status)
328
- return;
313
+ if (!r.status) return;
329
314
  let e = r.data, n = null, { autoContentType: s, bucketName: i, importFileName: u } = o;
330
315
  const d = t ? le : ue;
331
316
  if (t) {
@@ -351,8 +336,7 @@ const ie = /* @__PURE__ */ ne(ae), oe = G.get("token"), ue = G.post("putObject",
351
336
  };
352
337
  }
353
338
  const [p, m] = await d(n).run();
354
- if (p)
355
- return;
339
+ if (p) return;
356
340
  const g = await de(m.data), w = await (f == null ? void 0 : f(g));
357
341
  if (h) {
358
342
  if (!w.status) {
@@ -361,8 +345,7 @@ const ie = /* @__PURE__ */ ne(ae), oe = G.get("token"), ue = G.post("putObject",
361
345
  }
362
346
  v.value = "导入进度", l.value = !0, z(w.taskId, "import", "");
363
347
  } else {
364
- if (!w.status)
365
- return;
348
+ if (!w.status) return;
366
349
  c.value = "success", (A = window.DasMessage) == null || A.success({
367
350
  message: "导入成功",
368
351
  grouping: !0,
@@ -417,8 +400,7 @@ const ie = /* @__PURE__ */ ne(ae), oe = G.get("token"), ue = G.post("putObject",
417
400
  b.value = R || `${d}${u}`, _.value = k.sizeText, y.value = "部分数据校验不通过,请下载附件并修改,重新导入!", D.value = `${Q().baseURL}/oss${t.filePath}`;
418
401
  }
419
402
  W(t.status, r, t.message);
420
- } else
421
- a == "action" && (c.value = "success");
403
+ } else a == "action" && (c.value = "success");
422
404
  else
423
405
  M && t.status != 2 ? M = setTimeout(() => {
424
406
  H(f, a, o, h);
Binary file
package/atob/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const encryption: (str: string) => string;
2
- export declare const decrypt: (str: string) => string;
1
+ export declare const encryption: (str: string) => any;
2
+ export declare const decrypt: (str: string) => any;
@@ -1,7 +1,6 @@
1
1
  import { getFullPath as n } from "@das-fed/utils/common-tools";
2
2
  const l = (r, t) => {
3
- if (!r)
4
- return;
3
+ if (!r) return;
5
4
  let e = {};
6
5
  const i = "enterpriseadmin/iocvisual";
7
6
  return (r === "preview" || r === "preview3d") && (e = { showLayout: !1 }), n("/" + i + "/" + r, { ...e, ...t });
@@ -0,0 +1,84 @@
1
+ /*! js-cookie v3.0.5 | MIT */
2
+ function a(e) {
3
+ for (var o = 1; o < arguments.length; o++) {
4
+ var t = arguments[o];
5
+ for (var s in t)
6
+ e[s] = t[s];
7
+ }
8
+ return e;
9
+ }
10
+ var u = {
11
+ read: function(e) {
12
+ return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
13
+ },
14
+ write: function(e) {
15
+ return encodeURIComponent(e).replace(
16
+ /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
17
+ decodeURIComponent
18
+ );
19
+ }
20
+ };
21
+ function g(e, o) {
22
+ function t(n, f, r) {
23
+ if (!(typeof document > "u")) {
24
+ r = a({}, o, r), typeof r.expires == "number" && (r.expires = new Date(Date.now() + r.expires * 864e5)), r.expires && (r.expires = r.expires.toUTCString()), n = encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
25
+ var c = "";
26
+ for (var i in r)
27
+ r[i] && (c += "; " + i, r[i] !== !0 && (c += "=" + r[i].split(";")[0]));
28
+ return document.cookie = n + "=" + e.write(f, n) + c;
29
+ }
30
+ }
31
+ function s(n) {
32
+ if (!(typeof document > "u" || arguments.length && !n)) {
33
+ for (var f = document.cookie ? document.cookie.split("; ") : [], r = {}, c = 0; c < f.length; c++) {
34
+ var i = f[c].split("="), d = i.slice(1).join("=");
35
+ try {
36
+ var p = decodeURIComponent(i[0]);
37
+ if (r[p] = e.read(d, p), n === p)
38
+ break;
39
+ } catch {
40
+ }
41
+ }
42
+ return n ? r[n] : r;
43
+ }
44
+ }
45
+ return Object.create(
46
+ {
47
+ set: t,
48
+ get: s,
49
+ remove: function(n, f) {
50
+ t(
51
+ n,
52
+ "",
53
+ a({}, f, {
54
+ expires: -1
55
+ })
56
+ );
57
+ },
58
+ withAttributes: function(n) {
59
+ return g(this.converter, a({}, this.attributes, n));
60
+ },
61
+ withConverter: function(n) {
62
+ return g(a({}, this.converter, n), this.attributes);
63
+ }
64
+ },
65
+ {
66
+ attributes: { value: Object.freeze(o) },
67
+ converter: { value: Object.freeze(e) }
68
+ }
69
+ );
70
+ }
71
+ var h = g(u, { path: "/" });
72
+ const v = () => {
73
+ const e = new URL(location.href).searchParams, o = e.get("token") || e.get("accessToken") || e.get("accesstoken") || "";
74
+ o && (JSON.stringify({ access_token: o }), h.set("accessToken", o));
75
+ }, I = () => {
76
+ const e = JSON.parse(sessionStorage.getItem("projectInfo") || "{}"), o = new URL(location.href).searchParams, t = o.get("project") || o.get("projectId") || "";
77
+ if (!t) return;
78
+ const s = o.get("projectParent") || o.get("projectParentId") || (e == null ? void 0 : e.parentId) || "", n = o.get("projectName") || (e == null ? void 0 : e.name) || "";
79
+ sessionStorage.setItem("project", t), sessionStorage.setItem("projectInfo", JSON.stringify({ ...e, id: t, name: n, parentId: s }));
80
+ };
81
+ export {
82
+ I as getProjectInfoFromQuery,
83
+ v as getTokenFromQuery
84
+ };
@@ -50,4 +50,4 @@ export declare const getInstanceInfo: () => {
50
50
  instanceInfo: any;
51
51
  };
52
52
  /** 获取favIcon */
53
- export declare const getFavIcon: () => string;
53
+ export declare const getFavIcon: () => any;
@@ -54,11 +54,9 @@ const S = I, C = () => {
54
54
  };
55
55
  }, h = (e, t) => {
56
56
  const n = "permission-btn", s = f(), a = p(location.href, "app") || "", o = t || a || s.currentSubAppCode;
57
- if (!o)
58
- return;
57
+ if (!o) return;
59
58
  const r = p(location.href, "menu") || "", g = e || r || s.currentSubApp.currentMenuCode, c = JSON.parse(sessionStorage.getItem(n) || "{}");
60
- if (!c || JSON.stringify(c) === "{}")
61
- return;
59
+ if (!c || JSON.stringify(c) === "{}") return;
62
60
  const u = c[o][g];
63
61
  return u && u.length ? u : c[o]["origin-auth"] ? c[o]["origin-auth"][g] ?? [] : [];
64
62
  }, T = (e, t) => h(e, t) ?? [], f = () => {
Binary file
@@ -2,4 +2,4 @@
2
2
  * 获取用户信息存入sessionStorage
3
3
  * @param token token
4
4
  */
5
- export declare const setPersonalInfo: (token: string) => Promise<void>;
5
+ export declare const setPersonalInfo: (token: string) => any;
@@ -69,8 +69,7 @@ const pt = (e, t, n, { allOwnKeys: r } = {}) => (j(t, (s, o) => {
69
69
  }, yt = (e, t, n, r) => {
70
70
  let s, o, i;
71
71
  const c = {};
72
- if (t = t || {}, e == null)
73
- return t;
72
+ if (t = t || {}, e == null) return t;
74
73
  do {
75
74
  for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
76
75
  i = s[o], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
@@ -82,13 +81,10 @@ const pt = (e, t, n, { allOwnKeys: r } = {}) => (j(t, (s, o) => {
82
81
  const r = e.indexOf(t, n);
83
82
  return r !== -1 && r === n;
84
83
  }, bt = (e) => {
85
- if (!e)
86
- return null;
87
- if (_(e))
88
- return e;
84
+ if (!e) return null;
85
+ if (_(e)) return e;
89
86
  let t = e.length;
90
- if (!xe(t))
91
- return null;
87
+ if (!xe(t)) return null;
92
88
  const n = new Array(t);
93
89
  for (; t-- > 0; )
94
90
  n[t] = e[t];
@@ -311,8 +307,7 @@ function $(e, t, n) {
311
307
  if (!a.isFunction(s))
312
308
  throw new TypeError("visitor must be a function");
313
309
  function l(d) {
314
- if (d === null)
315
- return "";
310
+ if (d === null) return "";
316
311
  if (a.isDate(d))
317
312
  return d.toISOString();
318
313
  if (!f && a.isBlob(d))
@@ -501,8 +496,7 @@ function vt(e) {
501
496
  function qe(e) {
502
497
  function t(n, r, s, o) {
503
498
  let i = n[o++];
504
- if (i === "__proto__")
505
- return !0;
499
+ if (i === "__proto__") return !0;
506
500
  const c = Number.isFinite(+i), f = o >= n.length;
507
501
  return i = !i && a.isArray(s) ? s.length : i, f ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = vt(s[i])), !c);
508
502
  }
@@ -939,8 +933,7 @@ function F(e, t) {
939
933
  if (a.isUndefined(u)) {
940
934
  if (!a.isUndefined(l))
941
935
  return r(void 0, l, p);
942
- } else
943
- return r(l, u, p);
936
+ } else return r(l, u, p);
944
937
  }
945
938
  function o(l, u) {
946
939
  if (!a.isUndefined(u))
@@ -950,8 +943,7 @@ function F(e, t) {
950
943
  if (a.isUndefined(u)) {
951
944
  if (!a.isUndefined(l))
952
945
  return r(void 0, l);
953
- } else
954
- return r(void 0, u);
946
+ } else return r(void 0, u);
955
947
  }
956
948
  function c(l, u, p) {
957
949
  if (p in t)
@@ -1337,12 +1329,7 @@ ce.transitional = function(t, n, r) {
1337
1329
  s(i, " has been removed" + (n ? " in " + n : "")),
1338
1330
  h.ERR_DEPRECATED
1339
1331
  );
1340
- return n && !Oe[i] && (Oe[i] = !0, console.warn(
1341
- s(
1342
- i,
1343
- " has been deprecated since v" + n + " and will be removed in the near future"
1344
- )
1345
- )), t ? t(o, i, c) : !0;
1332
+ return n && !Oe[i] && (Oe[i] = !0), t ? t(o, i, c) : !0;
1346
1333
  };
1347
1334
  };
1348
1335
  function Rn(e, t, n) {
@@ -1497,8 +1484,7 @@ class ue {
1497
1484
  });
1498
1485
  const r = this;
1499
1486
  this.promise.then((s) => {
1500
- if (!r._listeners)
1501
- return;
1487
+ if (!r._listeners) return;
1502
1488
  let o = r._listeners.length;
1503
1489
  for (; o-- > 0; )
1504
1490
  r._listeners[o](s);
@@ -0,0 +1,104 @@
1
+ export interface UserInfo {
2
+ /** 用户id */
3
+ id: string
4
+ /** 用户名称 */
5
+ name: string
6
+ /** 用户标识 2 - B端身份, 4 - C 端身份, 6 - B+C 端身份 */
7
+ flag: number
8
+ /** 租户id */
9
+ tenantId: string
10
+ }
11
+
12
+ export interface PersonalInfo {
13
+ /** id */
14
+ id: string
15
+ /** 名称 */
16
+ name: string
17
+ /** 手机号 */
18
+ phone: string
19
+ /** 用户名称 */
20
+ userName: string
21
+ /** 邮箱 */
22
+ email: string
23
+ /** 头像 */
24
+ headPicture: string
25
+ }
26
+
27
+ export interface TenantInfo {
28
+ /** 用户ID */
29
+ userId: string
30
+ /** 用户名 */
31
+ userName: string
32
+ name: string
33
+ /** 租户信息 */
34
+ tenant: {
35
+ id: string
36
+ name: string
37
+ adminUserId: string
38
+ description: string
39
+ domain: string
40
+ }
41
+ /** 用户标识 2 - B端身份, 4 - C 端身份, 6 - B+C 端身份 */
42
+ flag: number
43
+ areaCode: string
44
+ /** 手机号 */
45
+ phone: string
46
+ }
47
+
48
+ export interface HomeInfo {
49
+ applicationCode: string
50
+ applicationPath: string
51
+ enable: boolean
52
+ originalCode: string
53
+ routeUrl: string
54
+ type: number | null
55
+ }
56
+
57
+ export interface ProjectInfo {
58
+ /** 项目id */
59
+ id: string | number
60
+ /** 父级id */
61
+ parentId?: string
62
+ /** 项目名称 */
63
+ name: string
64
+ /** 租户id */
65
+ tenantId?: string
66
+ }
67
+
68
+ export interface SubAppsInfo {
69
+ /** 所有应用信息 */
70
+ appcategorys?: any[]
71
+ /** 当前应用完整信息 */
72
+ currentSubApp?: any
73
+ /** 所有应用 */
74
+ flatSubAppList?: any[]
75
+ /** 当前应用code */
76
+ currentSubAppCode?: string
77
+ /** 当前打开的应用 */
78
+ subAppList?: any[]
79
+ }
80
+
81
+ interface TabItem {
82
+ /** 当前应用url */
83
+ currentApplication: string
84
+ /** 当前加载的应用 */
85
+ applicationPath: string
86
+ applicationCode: string
87
+ menuId: string
88
+ name: string
89
+ path: string
90
+ code: string
91
+ query?: any
92
+ }
93
+ export interface TabInfo {
94
+ /** 当前tabs key */
95
+ currentCode?: string
96
+ /** 当前tabs */
97
+ currentTab?: TabItem
98
+ /** 用于记录该应用上次开启的tab */
99
+ preTab?: Record<string, TabItem>
100
+ /** 当前打开的tabs(微前端环境会存入) */
101
+ tabMap?: Record<string, TabItem[]>
102
+ }
103
+
104
+ export type permissionBtnInfo = { code?: string; name?: string }[]
@@ -12,4 +12,4 @@ export declare const arrEqual: (a: any[], b: any[], isSort?: boolean) => boolean
12
12
  * @param val 要根据哪个字段来去重
13
13
  * @returns
14
14
  */
15
- export declare const arrUnique: (arr: any[], val: string) => any[];
15
+ export declare const arrUnique: (arr: any[], val: string) => any;
@@ -10,8 +10,7 @@ const a = (s, t = "yyyy-MM-dd HH:mm:ss") => {
10
10
  S: e.getMilliseconds()
11
11
  }, g = e.getFullYear().toString();
12
12
  g = g.length >= 4 ? g : "0000".substr(0, 4 - g.length) + g, /(y+)/.test(t) && (t = t.replace(RegExp.$1, (g + "").substr(4 - RegExp.$1.length)));
13
- for (var n in r)
14
- new RegExp("(" + n + ")").test(t) && (t = t.replace(RegExp.$1, RegExp.$1.length === 1 ? r[n] : ("00" + r[n]).substr(("" + r[n]).length)));
13
+ for (var n in r) new RegExp("(" + n + ")").test(t) && (t = t.replace(RegExp.$1, RegExp.$1.length === 1 ? r[n] : ("00" + r[n]).substr(("" + r[n]).length)));
15
14
  return t;
16
15
  };
17
16
  export {
@@ -43,4 +43,4 @@ export declare const addPathParamsToUrl: (url: string, pathParams: any[]) => str
43
43
  * @param url url
44
44
  * @returns origin
45
45
  */
46
- export declare function getOriginFromUrl(url: string): string;
46
+ export declare function getOriginFromUrl(url: string): any;
@@ -21,11 +21,9 @@ const a = (r, n) => {
21
21
  }), t ? e = location.origin + r + `?${t}` : e = location.origin + r, e;
22
22
  }, h = (r, n) => {
23
23
  const e = n || location.href, t = a(e), s = Object.keys(t) || [];
24
- if (!s || !s.length)
25
- return e.includes("?") ? e.split("?")[0] : e.split("&")[0];
24
+ if (!s || !s.length) return e.includes("?") ? e.split("?")[0] : e.split("&")[0];
26
25
  let l = s.filter((i) => !r.includes(i));
27
- if (!l || !l.length)
28
- return e.includes("?") ? e.split("?")[0] : e.split("&")[0];
26
+ if (!l || !l.length) return e.includes("?") ? e.split("?")[0] : e.split("&")[0];
29
27
  let c = "";
30
28
  return l.forEach((i, o) => {
31
29
  o === s.length - 1 ? c += `${i}=${t[i]}` : c += `${i}=${t[i]}&`;
@@ -20,7 +20,7 @@ export declare const flatTree: (list: any[], child?: string, deleteChild?: boole
20
20
  * @param children 子节点指定字段名,默认‘children’
21
21
  * @returns
22
22
  */
23
- export declare const filterTreeArray: (tree: any[], predicate: (node: any) => boolean, children?: string) => any[];
23
+ export declare const filterTreeArray: (tree: any[], predicate: (node: any) => boolean, children?: string) => any;
24
24
  /**
25
25
  * 树结构查找节点,深度优先
26
26
  * @param tree 要过滤的树