duck-vue-components 0.0.0

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 (123) hide show
  1. package/README.md +29 -0
  2. package/dist/MyButton-C1krVCi6.cjs +36 -0
  3. package/dist/MyButton-C7riFwH6.js +28 -0
  4. package/dist/_plugin-vue_export-helper-DQXgr64F.cjs +13 -0
  5. package/dist/_plugin-vue_export-helper-DbXABBKy.js +8 -0
  6. package/dist/affix-CYU-9qMr.cjs +71 -0
  7. package/dist/affix-D9EM8_Um.js +66 -0
  8. package/dist/button-CGv1WHzT.cjs +132 -0
  9. package/dist/button-tOWSPPxz.js +126 -0
  10. package/dist/chunk-CZWwpsFl.cjs +43 -0
  11. package/dist/chunk-pbuEa-1d.js +13 -0
  12. package/dist/config.cjs +1 -0
  13. package/dist/config.js +1 -0
  14. package/dist/constants/json.cjs +4 -0
  15. package/dist/constants/json.d.cts +2 -0
  16. package/dist/constants/json.d.ts +2 -0
  17. package/dist/constants/json.js +2 -0
  18. package/dist/constants.cjs +14 -0
  19. package/dist/constants.d.cts +3 -0
  20. package/dist/constants.d.ts +3 -0
  21. package/dist/constants.js +3 -0
  22. package/dist/controls/MyButton.cjs +3 -0
  23. package/dist/controls/MyButton.d.cts +2 -0
  24. package/dist/controls/MyButton.d.ts +2 -0
  25. package/dist/controls/MyButton.js +2 -0
  26. package/dist/controls/affix.cjs +8 -0
  27. package/dist/controls/affix.d.cts +2 -0
  28. package/dist/controls/affix.d.ts +2 -0
  29. package/dist/controls/affix.js +2 -0
  30. package/dist/controls/button.cjs +8 -0
  31. package/dist/controls/button.js +2 -0
  32. package/dist/controls.cjs +18 -0
  33. package/dist/controls.d.cts +10 -0
  34. package/dist/controls.d.ts +10 -0
  35. package/dist/controls.js +5 -0
  36. package/dist/dom-CllENWMY.js +346 -0
  37. package/dist/dom-DS4YqkjW.cjs +580 -0
  38. package/dist/index-1ELDRrC5.d.ts +1397 -0
  39. package/dist/index-5JdIJn1m.d.cts +74 -0
  40. package/dist/index-6KzLtJFy.d.cts +157 -0
  41. package/dist/index-BGkTN1DD.d.cts +15 -0
  42. package/dist/index-BHq-BMCP.d.ts +74 -0
  43. package/dist/index-BI-hrf4t.d.ts +332 -0
  44. package/dist/index-BtOBjeH7.d.ts +10 -0
  45. package/dist/index-C-uY4885.d.cts +23 -0
  46. package/dist/index-C5SJLWEN.d.ts +23 -0
  47. package/dist/index-CSvc8L11.d.cts +51 -0
  48. package/dist/index-CeemHBNT.d.ts +51 -0
  49. package/dist/index-CfkAYIKD.d.cts +80 -0
  50. package/dist/index-CiJC-ieW.d.ts +157 -0
  51. package/dist/index-DamAmum6.d.ts +15 -0
  52. package/dist/index-DhOoJCHW.d.cts +1397 -0
  53. package/dist/index-PhthUD7x.d.cts +10 -0
  54. package/dist/index-oDsyZ3t2.d.cts +332 -0
  55. package/dist/index-x9xs2cbA.d.ts +80 -0
  56. package/dist/json-BkkaM20u.cjs +31034 -0
  57. package/dist/json-D-_zTSK6.js +31023 -0
  58. package/dist/locale-DhlAaV1Q.js +597 -0
  59. package/dist/locale-WzzxOobw.cjs +658 -0
  60. package/dist/locale.cjs +12 -0
  61. package/dist/locale.js +2 -0
  62. package/dist/objects-CLXPNOUW.js +134 -0
  63. package/dist/objects-o7u5s_lI.cjs +272 -0
  64. package/dist/packages/config.cjs +10 -0
  65. package/dist/packages/config.d.cts +2 -0
  66. package/dist/packages/config.d.ts +2 -0
  67. package/dist/packages/config.js +5 -0
  68. package/dist/packages/constants/json.cjs +4 -0
  69. package/dist/packages/constants/json.js +2 -0
  70. package/dist/packages/constants.cjs +78 -0
  71. package/dist/packages/constants.js +67 -0
  72. package/dist/packages/controls/MyButton.cjs +3 -0
  73. package/dist/packages/controls/MyButton.js +2 -0
  74. package/dist/packages/controls/affix.cjs +8 -0
  75. package/dist/packages/controls/affix.js +2 -0
  76. package/dist/packages/controls/button.cjs +8 -0
  77. package/dist/packages/controls/button.d.cts +2 -0
  78. package/dist/packages/controls/button.d.ts +2 -0
  79. package/dist/packages/controls/button.js +2 -0
  80. package/dist/packages/controls.cjs +31 -0
  81. package/dist/packages/controls.js +12 -0
  82. package/dist/packages/locale.cjs +12 -0
  83. package/dist/packages/locale.d.cts +39 -0
  84. package/dist/packages/locale.d.ts +39 -0
  85. package/dist/packages/locale.js +2 -0
  86. package/dist/packages/stores.cjs +337 -0
  87. package/dist/packages/stores.js +320 -0
  88. package/dist/packages/utils/dom.cjs +32 -0
  89. package/dist/packages/utils/dom.d.cts +2 -0
  90. package/dist/packages/utils/dom.d.ts +2 -0
  91. package/dist/packages/utils/dom.js +2 -0
  92. package/dist/packages/utils/vue/props.cjs +63 -0
  93. package/dist/packages/utils/vue/props.d.cts +2 -0
  94. package/dist/packages/utils/vue/props.d.ts +2 -0
  95. package/dist/packages/utils/vue/props.js +56 -0
  96. package/dist/packages/utils/vue.cjs +32 -0
  97. package/dist/packages/utils/vue.d.cts +3 -0
  98. package/dist/packages/utils/vue.d.ts +3 -0
  99. package/dist/packages/utils/vue.js +24 -0
  100. package/dist/packages/utils.cjs +190 -0
  101. package/dist/packages/utils.js +6 -0
  102. package/dist/packages.cjs +15 -0
  103. package/dist/packages.d.cts +3 -0
  104. package/dist/packages.d.ts +3 -0
  105. package/dist/packages.js +3 -0
  106. package/dist/stores.cjs +17 -0
  107. package/dist/stores.d.cts +805 -0
  108. package/dist/stores.d.ts +805 -0
  109. package/dist/stores.js +4 -0
  110. package/dist/style.css +15 -0
  111. package/dist/utils/dom.cjs +32 -0
  112. package/dist/utils/dom.js +2 -0
  113. package/dist/utils/vue/props.cjs +7 -0
  114. package/dist/utils/vue/props.js +2 -0
  115. package/dist/utils/vue.cjs +11 -0
  116. package/dist/utils/vue.js +3 -0
  117. package/dist/utils-DlBKdS0t.js +696 -0
  118. package/dist/utils-egS_3P4w.cjs +850 -0
  119. package/dist/utils.cjs +190 -0
  120. package/dist/utils.d.cts +5 -0
  121. package/dist/utils.d.ts +5 -0
  122. package/dist/utils.js +6 -0
  123. package/package.json +184 -0
@@ -0,0 +1,10 @@
1
+ import * as _$vue from "vue";
2
+
3
+ //#region src/packages/controls/MyButton/MyButton.vue.d.ts
4
+ type __VLS_Props = {
5
+ type?: 'primary';
6
+ };
7
+ declare const __VLS_export: _$vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
8
+ declare const _default: typeof __VLS_export;
9
+ //#endregion
10
+ export { _default as t };
@@ -0,0 +1,332 @@
1
+ import * as _$vue from "vue";
2
+ import { InjectionKey } from "vue";
3
+ import { castArray as ensureArray } from "lodash-unified";
4
+ import { isClient, isIOS } from "@vueuse/core";
5
+ import * as _$_vue_shared0 from "@vue/shared";
6
+ import { NOOP, camelize, hyphenate, hyphenate as kebabCase, isArray, isDate, isFunction, isObject, isPlainObject, isPromise, isString, isSymbol, toRawType } from "@vue/shared";
7
+ import { AxiosInstance, AxiosRequestConfig, AxiosResponse, InternalAxiosRequestConfig } from "axios";
8
+ import { JSONValue } from "@rw-vue-framework/constants";
9
+
10
+ //#region src/packages/utils/arrays.d.ts
11
+ declare const unique: <T>(arr: T[]) => T[];
12
+ declare const uniqueBy: <T extends Record<string, any>>(arr: T[], key: keyof T) => T[];
13
+ declare const uniqueByFn: <T extends Record<string, any>>(arr: T[], compareFn: (item: T) => any) => T[];
14
+ type Many<T> = T | ReadonlyArray<T>;
15
+ /** like `_.castArray`, except falsy value returns empty array. */
16
+ declare const castArray: <T>(arr: Many<T>) => T[];
17
+ //#endregion
18
+ //#region src/packages/utils/browser.d.ts
19
+ declare const isFirefox: () => boolean;
20
+ declare const loadScript: (src: string, options?: {
21
+ async?: boolean;
22
+ charset?: string;
23
+ type?: string;
24
+ defer?: boolean;
25
+ }) => Promise<void>;
26
+ //#endregion
27
+ //#region src/packages/utils/error.d.ts
28
+ declare function throwError(scope: string, m: string): never;
29
+ declare function debugWarn(err: Error): void;
30
+ declare function debugWarn(scope: string, message: string): void;
31
+ //#endregion
32
+ //#region src/packages/utils/objects.d.ts
33
+ type Entries<T> = { [K in keyof T]: [K, T[K]] }[keyof T][];
34
+ declare const keysOf: <T extends object>(arr: T) => Array<keyof T>;
35
+ declare const entriesOf: <T extends object>(arr: T) => Entries<T>;
36
+ declare const hasOwn: (val: object, key: string | symbol) => key is keyof typeof val;
37
+ declare const deepMerge: <T extends Record<string, any>>(target: T, ...sources: Partial<T>[]) => T;
38
+ declare const deepMergeInPlace: <T extends Record<string, any>>(target: T, source?: Partial<T> | Record<string, any>) => T;
39
+ declare const validateObjectStructure: (data: any, requiredKeys?: string[]) => boolean;
40
+ declare const safeSet: (obj: Record<string, any>, path: string, value: any) => boolean;
41
+ declare const safeGet: (obj: Record<string, any>, path: string, defaultValue?: any) => any;
42
+ declare const getProp: <T = any>(obj: Record<string, any>, path: Arrayable<string>, defaultValue?: any) => {
43
+ value: T;
44
+ };
45
+ declare function assignmentData(initial: any, current: any): {};
46
+ declare function transDataToString(initial: any): {};
47
+ //#endregion
48
+ //#region src/packages/utils/raf.d.ts
49
+ declare const rAF: (fn: () => void) => number;
50
+ declare const cAF: (handle: number) => void;
51
+ //#endregion
52
+ //#region src/packages/utils/rand.d.ts
53
+ /**
54
+ * @deprecated Use `useId` `useIdInjection` instead
55
+ * Generate random number in range [0, 1000]
56
+ * Maybe replace with [uuid](https://www.npmjs.com/package/uuid)
57
+ */
58
+ declare const generateId: () => number;
59
+ /**
60
+ * @deprecated
61
+ * Generating a random int in range (0, max - 1)
62
+ * @param max {number}
63
+ */
64
+ declare const getRandomInt: (max: number) => number;
65
+ //#endregion
66
+ //#region src/packages/utils/strings.d.ts
67
+ /**
68
+ * fork from {@link https://github.com/sindresorhus/escape-string-regexp}
69
+ */
70
+ declare const escapeStringRegexp: (string?: string) => string;
71
+ declare const capitalize: <T extends string>(str: T) => Capitalize<T>;
72
+ //#endregion
73
+ //#region src/packages/utils/types.d.ts
74
+ declare const isUndefined: (val: any) => val is undefined;
75
+ declare const isBoolean: (val: any) => val is boolean;
76
+ declare const isNumber: (val: any) => val is number;
77
+ declare const isEmpty: (val: unknown) => boolean;
78
+ declare const isElement: (e: unknown) => e is Element;
79
+ declare const isPropAbsent: (prop: unknown) => prop is null | undefined;
80
+ declare const isStringNumber: (val: string) => boolean;
81
+ declare const isWindow: (val: unknown) => val is Window;
82
+ /** 增加 */
83
+ declare const isHTML: (val: string) => boolean;
84
+ declare const isComponent: (val: any) => boolean;
85
+ declare const renderTemplate: (template: string, data: any) => string;
86
+ declare const stringToArray: (value: string) => string[];
87
+ //#endregion
88
+ //#region src/packages/utils/typescript.d.ts
89
+ declare const mutable: <T extends readonly any[] | Record<string, unknown>>(val: T) => Mutable<typeof val>;
90
+ type Mutable<T> = { -readonly [P in keyof T]: T[P] };
91
+ type HTMLElementCustomized<T> = HTMLElement & T;
92
+ /**
93
+ * @deprecated stop to use null
94
+ * @see {@link https://github.com/sindresorhus/meta/discussions/7}
95
+ */
96
+ type Nullable<T> = T | null;
97
+ type Arrayable<T> = T | T[];
98
+ type Awaitable<T> = Promise<T> | T;
99
+ //#endregion
100
+ //#region src/packages/utils/throttleByRaf.d.ts
101
+ declare function throttleByRaf(cb: (...args: any[]) => void): {
102
+ (...args: any[]): void;
103
+ cancel(): void;
104
+ };
105
+ //#endregion
106
+ //#region src/packages/utils/easings.d.ts
107
+ declare function easeInOutCubic(t: number, b: number, c: number, d: number): number;
108
+ //#endregion
109
+ //#region src/packages/utils/http.d.ts
110
+ declare module 'axios' {
111
+ interface AxiosRequestConfig {
112
+ cache?: boolean;
113
+ useQueue?: boolean;
114
+ _retryCount?: number;
115
+ }
116
+ }
117
+ interface HttpPlugin {
118
+ name: string;
119
+ onRequest?: (config: InternalAxiosRequestConfig) => InternalAxiosRequestConfig | Promise<InternalAxiosRequestConfig>;
120
+ onResponse?: (response: AxiosResponse) => AxiosResponse | Promise<AxiosResponse>;
121
+ onError?: (error: any) => any;
122
+ }
123
+ interface ResponseHandlerConfig {
124
+ successCodes?: number[];
125
+ reloginCodes?: number[];
126
+ loginPath?: string | (() => string);
127
+ redirectCodes?: {
128
+ [code: number]: string;
129
+ };
130
+ customHandlers?: {
131
+ [code: number]: (data: any, response: AxiosResponse) => any;
132
+ };
133
+ reLogin?: () => void;
134
+ routerPush?: (path: string) => void;
135
+ showMessage?: (message: string, type?: 'success' | 'error' | 'warning' | 'info') => void;
136
+ }
137
+ interface HttpConfig extends AxiosRequestConfig {
138
+ init?: boolean;
139
+ baseURL?: string;
140
+ repeatPost?: boolean;
141
+ repeatPostTime?: number;
142
+ showError?: boolean;
143
+ autoRelogin?: boolean;
144
+ isDebug?: boolean;
145
+ responseHandler?: ResponseHandlerConfig;
146
+ encrypt?: boolean;
147
+ encryptOptions?: {
148
+ encryptKey?: string;
149
+ encryptFunc?: (data: any, key: string) => any;
150
+ decryptFunc?: (data: any, key: string) => any;
151
+ };
152
+ defaultParams?: {
153
+ [key: string]: any;
154
+ };
155
+ errorHandler?: () => void;
156
+ reloginHandler?: () => Promise<boolean>;
157
+ plugins?: HttpPlugin[];
158
+ }
159
+ /**
160
+ * HTTP 请求类 - 单例模式实现
161
+ */
162
+ declare class Http {
163
+ private static instance;
164
+ private static domainInstances;
165
+ axiosInstance: AxiosInstance;
166
+ config: HttpConfig;
167
+ private plugins;
168
+ /**
169
+ * 私有构造函数,防止外部直接实例化
170
+ */
171
+ private constructor();
172
+ /**
173
+ * 获取单例实例
174
+ */
175
+ static getInstance(config?: HttpConfig): Http;
176
+ /**
177
+ * 获取指定域名的实例
178
+ * @param domain 域名
179
+ * @param config 配置
180
+ */
181
+ static getDomainInstance(domain: string, config?: HttpConfig): Http;
182
+ /**
183
+ * 创建新的 HTTP 实例(用于特殊需求)
184
+ */
185
+ static createInstance(config?: HttpConfig): Http;
186
+ /**
187
+ * 重新配置实例
188
+ */
189
+ reconfigure(config: HttpConfig): void;
190
+ /**
191
+ * 注册内置插件
192
+ */
193
+ private registerBuiltinPlugins;
194
+ /**
195
+ * 注册插件
196
+ */
197
+ use(...plugins: HttpPlugin[]): Http;
198
+ /**
199
+ * 设置拦截器
200
+ */
201
+ private setupInterceptors;
202
+ /**
203
+ * 创建防重复提交插件
204
+ */
205
+ private createRepeatPostPlugin;
206
+ /**
207
+ * 创建错误处理插件
208
+ */
209
+ private createErrorHandlerPlugin;
210
+ /**
211
+ * 创建重新登录插件
212
+ */
213
+ private createReloginPlugin;
214
+ /**
215
+ * 创建调试插件
216
+ */
217
+ private createDebugPlugin;
218
+ /**
219
+ * 创建统一响应处理插件
220
+ */
221
+ private createResponseHandlerPlugin;
222
+ /**
223
+ * 检查是否重复提交
224
+ */
225
+ private isRepeatPost;
226
+ /**
227
+ * GET 请求
228
+ * @param url 请求路径
229
+ * @param params 请求参数
230
+ * @param config 请求配置
231
+ * @param domain 可选的域名,如果提供则使用该域名发送请求
232
+ */
233
+ get<T = any>(url: string, params?: {}, config?: {}, domain?: string): Promise<T>;
234
+ /**
235
+ * POST 请求
236
+ * @param url 请求路径
237
+ * @param data 请求数据
238
+ * @param config 请求配置
239
+ * @param domain 可选的域名,如果提供则使用该域名发送请求
240
+ */
241
+ post<T = any>(url: string, data?: {}, config?: {}, domain?: string): Promise<T>;
242
+ /**
243
+ * PUT 请求
244
+ * @param url 请求路径
245
+ * @param data 请求数据
246
+ * @param config 请求配置
247
+ * @param domain 可选的域名,如果提供则使用该域名发送请求
248
+ */
249
+ put<T = any>(url: string, data?: {}, config?: {}, domain?: string): Promise<T>;
250
+ /**
251
+ * DELETE 请求
252
+ * @param url 请求路径
253
+ * @param config 请求配置
254
+ * @param domain 可选的域名,如果提供则使用该域名发送请求
255
+ */
256
+ delete<T = any>(url: string, config?: {}, domain?: string): Promise<T>;
257
+ /**
258
+ * 直接请求特定域名
259
+ * @param domain 域名
260
+ */
261
+ domain(domain: string): Http;
262
+ /**
263
+ * 添加请求取消功能
264
+ */
265
+ /**
266
+ * 文件上传请求
267
+ */
268
+ upload<T = any>(url: string, file: File | FormData, config?: {}, domain?: string): Promise<T>;
269
+ /**
270
+ * 文件下载请求
271
+ */
272
+ download(url: string, params?: {}, config?: {}, domain?: string): Promise<Blob>;
273
+ }
274
+ declare const http: Http;
275
+ declare const initHttp: (HttpConfig: any) => void;
276
+ declare const useHttp: () => Http;
277
+ //#endregion
278
+ //#region src/packages/utils/encrypt.d.ts
279
+ declare function rwEncode(data: JSONValue, privateKey?: any): any;
280
+ declare function rwDecode(data: string, privateKey?: any, showError?: boolean): any;
281
+ declare const md5: (sourceString: string | object) => string;
282
+ //#endregion
283
+ //#region src/packages/utils/loadConfig.d.ts
284
+ declare const loadConfig: () => Promise<{
285
+ appconfig: boolean;
286
+ }>;
287
+ //#endregion
288
+ //#region src/packages/utils/exportExcel.d.ts
289
+ declare function exportExcel(structName: string, data: Record<string, any>[], columns: any[]): void;
290
+ declare const exportExcelAll: (url: string, postData: any, config: any) => void;
291
+ //#endregion
292
+ //#region src/packages/utils/mapUtils.d.ts
293
+ declare function gcj02ToBd09(lng: number, lat: number): number[];
294
+ declare function bd09ToGcj02(bd_lon: number, bd_lat: number): number[];
295
+ //#endregion
296
+ //#region src/packages/utils/formData.d.ts
297
+ type NestedKeyOf<T> = { [K in keyof T & (string | number)]: T[K] extends Record<string, any> ? `${K}` | `${K}.${NestedKeyOf<T[K]>}` : `${K}` }[keyof T & (string | number)];
298
+ type PathValue<T, P extends string> = P extends `${infer K}.${infer Rest}` ? K extends keyof T ? PathValue<T[K], Rest> : never : P extends keyof T ? T[P] : never;
299
+ interface FormData$1<T = Record<string, any>> {
300
+ formId: string;
301
+ data: T;
302
+ setFieldValue: <P extends string>(field: P, value: PathValue<T, P>) => void;
303
+ getFieldValue: <P extends string>(field: P) => PathValue<T, P> | undefined;
304
+ setFieldsValue: (values: Partial<T>) => void;
305
+ getFieldsValue: () => T;
306
+ deleteField: (field: string) => void;
307
+ hasField: (field: string) => boolean;
308
+ validate: () => Promise<boolean>;
309
+ }
310
+ declare class PathUtils {
311
+ private static cache;
312
+ static parsePath(path: string): string[];
313
+ static getValue(obj: any, path: string): any;
314
+ static setValue(obj: any, path: string, value: any): void;
315
+ static deleteValue(obj: any, path: string): boolean;
316
+ static hasValue(obj: any, path: string): boolean;
317
+ }
318
+ declare function createFormData<T extends Record<string, any>>(formId: string, initialData?: T): FormData$1<T>;
319
+ declare function useFormField<T = any>(fieldName: string): {
320
+ value: [T | undefined] extends [_$vue.Ref<any, any>] ? _$_vue_shared0.IfAny<_$vue.Ref<any, any> & T, _$vue.Ref<_$vue.Ref<any, any> & T, _$vue.Ref<any, any> & T>, _$vue.Ref<any, any> & T> : _$vue.Ref<_$vue.UnwrapRef<T> | undefined, T | _$vue.UnwrapRef<T> | undefined>;
321
+ hasValue: _$vue.Ref<boolean, boolean>;
322
+ deleteField: () => void;
323
+ setField: (value: T) => void;
324
+ } | {
325
+ value: _$vue.WritableComputedRef<T | undefined, T | undefined>;
326
+ hasValue: _$vue.ComputedRef<boolean>;
327
+ deleteField: () => void;
328
+ setField: (value: T) => void;
329
+ };
330
+ declare const FormDataKey: InjectionKey<FormData$1>;
331
+ //#endregion
332
+ export { escapeStringRegexp as $, mutable as A, isObject as B, easeInOutCubic as C, isIOS as Ct, HTMLElementCustomized as D, unique as Dt, Awaitable as E, ensureArray as Et, isElement as F, isStringNumber as G, isPromise as H, isEmpty as I, isWindow as J, isSymbol as K, isFunction as L, isBoolean as M, isComponent as N, Mutable as O, uniqueBy as Ot, isDate as P, capitalize as Q, isHTML as R, useHttp as S, isFirefox as St, Arrayable as T, castArray as Tt, isPropAbsent as U, isPlainObject as V, isString as W, stringToArray as X, renderTemplate as Y, camelize as Z, HttpConfig as _, NOOP as _t, PathValue as a, rAF as at, http as b, throwError as bt, bd09ToGcj02 as c, deepMergeInPlace as ct, exportExcelAll as d, hasOwn as dt, hyphenate as et, loadConfig as f, keysOf as ft, Http as g, validateObjectStructure as gt, rwEncode as h, transDataToString as ht, PathUtils as i, cAF as it, isArray as j, Nullable as k, uniqueByFn as kt, gcj02ToBd09 as l, entriesOf as lt, rwDecode as m, safeSet as mt, FormDataKey as n, generateId as nt, createFormData as o, assignmentData as ot, md5 as p, safeGet as pt, isUndefined as q, NestedKeyOf as r, getRandomInt as rt, useFormField as s, deepMerge as st, FormData$1 as t, kebabCase as tt, exportExcel as u, getProp as ut, HttpPlugin as v, toRawType as vt, throttleByRaf as w, loadScript as wt, initHttp as x, isClient as xt, ResponseHandlerConfig as y, debugWarn as yt, isNumber as z };
@@ -0,0 +1,80 @@
1
+ import { CSSProperties } from "vue";
2
+
3
+ //#region src/packages/utils/dom/aria.d.ts
4
+ /**
5
+ * Determine if the testing element is visible on screen no matter if its on the viewport or not
6
+ */
7
+ declare const isVisible: (element: HTMLElement) => boolean;
8
+ declare const obtainAllFocusableElements: (element: HTMLElement) => HTMLElement[];
9
+ /**
10
+ * @desc Determine if target element is focusable
11
+ * @param element {HTMLElement}
12
+ * @returns {Boolean} true if it is focusable
13
+ */
14
+ declare const isFocusable: (element: HTMLElement) => boolean;
15
+ /**
16
+ * @desc Set Attempt to set focus on the current node.
17
+ * @param element
18
+ * The node to attempt to focus on.
19
+ * @returns
20
+ * true if element is focused.
21
+ */
22
+ declare const attemptFocus: (element: HTMLElement) => boolean;
23
+ /**
24
+ * Trigger an event
25
+ * mouseenter, mouseleave, mouseover, keyup, change, click, etc.
26
+ * @param {HTMLElement} elm
27
+ * @param {String} name
28
+ * @param {*} opts
29
+ */
30
+ declare const triggerEvent: (elm: HTMLElement, name: string, ...opts: Array<boolean>) => HTMLElement;
31
+ declare const isLeaf: (el: HTMLElement) => boolean;
32
+ declare const getSibling: (el: HTMLElement, distance: number, elClass: string) => Element | null;
33
+ declare const focusNode: (el: HTMLElement) => void;
34
+ //#endregion
35
+ //#region src/packages/utils/dom/event.d.ts
36
+ declare const composeEventHandlers: <E>(theirsHandler?: (event: E) => boolean | void, oursHandler?: (event: E) => void, {
37
+ checkForDefaultPrevented
38
+ }?: {
39
+ checkForDefaultPrevented?: boolean | undefined;
40
+ }) => (event: E) => void;
41
+ type WhenMouseHandler = (e: PointerEvent) => any;
42
+ declare const whenMouse: (handler: WhenMouseHandler) => WhenMouseHandler;
43
+ //#endregion
44
+ //#region src/packages/utils/dom/position.d.ts
45
+ declare const isInContainer: (el?: Element, container?: Element | Window) => boolean;
46
+ declare const getOffsetTop: (el: HTMLElement) => number;
47
+ declare const getOffsetTopDistance: (el: HTMLElement, containerEl: HTMLElement) => number;
48
+ declare const getClientXY: (event: MouseEvent | TouchEvent) => {
49
+ clientX: number;
50
+ clientY: number;
51
+ };
52
+ //#endregion
53
+ //#region src/packages/utils/dom/scroll.d.ts
54
+ declare const isScroll: (el: HTMLElement, isVertical?: boolean) => boolean;
55
+ declare const getScrollContainer: (el: HTMLElement, isVertical?: boolean) => Window | HTMLElement | undefined;
56
+ declare const getScrollBarWidth: (namespace: string) => number;
57
+ /**
58
+ * Scroll with in the container element, positioning the **selected** element at the top
59
+ * of the container
60
+ */
61
+ declare function scrollIntoView(container: HTMLElement, selected: HTMLElement): void;
62
+ declare function animateScrollTo(container: HTMLElement | Window, from: number, to: number, duration: number, callback?: unknown): () => void;
63
+ declare const getScrollElement: (target: HTMLElement, container: HTMLElement | Window) => HTMLElement;
64
+ declare const getScrollTop: (container: HTMLElement | Window) => number;
65
+ //#endregion
66
+ //#region src/packages/utils/dom/style.d.ts
67
+ declare const classNameToArray: (cls?: string) => string[];
68
+ declare const hasClass: (el: Element, cls: string) => boolean;
69
+ declare const addClass: (el: Element, cls: string) => void;
70
+ declare const removeClass: (el: Element, cls: string) => void;
71
+ declare const getStyle: (element: HTMLElement, styleName: keyof CSSProperties) => string;
72
+ declare const setStyle: (element: HTMLElement, styleName: CSSProperties | keyof CSSProperties, value?: string | number) => void;
73
+ declare const removeStyle: (element: HTMLElement, style: CSSProperties | keyof CSSProperties) => void;
74
+ declare function addUnit(value?: string | number, defaultUnit?: string): string | undefined;
75
+ //#endregion
76
+ //#region src/packages/utils/dom/element.d.ts
77
+ type GetElement = <T extends string | HTMLElement | Window | null | undefined>(target: T) => T extends string ? HTMLElement | null : T;
78
+ declare const getElement: GetElement;
79
+ //#endregion
80
+ export { triggerEvent as A, attemptFocus as C, isLeaf as D, isFocusable as E, isVisible as O, whenMouse as S, getSibling as T, getClientXY as _, getStyle as a, isInContainer as b, removeStyle as c, getScrollBarWidth as d, getScrollContainer as f, scrollIntoView as g, isScroll as h, classNameToArray as i, obtainAllFocusableElements as k, setStyle as l, getScrollTop as m, addClass as n, hasClass as o, getScrollElement as p, addUnit as r, removeClass as s, getElement as t, animateScrollTo as u, getOffsetTop as v, focusNode as w, composeEventHandlers as x, getOffsetTopDistance as y };