mixlea-utils-js 0.1.21 → 0.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mixlea-utils-js.js +97 -84
- package/dist/mixlea-utils-js.umd.js +2 -2
- package/dist/types/index.d.ts +23 -16
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -259,6 +259,18 @@ declare type CoalesceReturn<T extends readonly MaybeThunk<any>[]> = T extends []
|
|
|
259
259
|
*/
|
|
260
260
|
declare type CoalesceReturn_2<T extends readonly MaybeThunk_2<any>[]> = T extends [] ? undefined : Exclude<ReturnType<T[number]> | T[number], null | undefined> | undefined;
|
|
261
261
|
|
|
262
|
+
declare interface CommonEvent {
|
|
263
|
+
type: 'mousedown' | 'mouseup' | 'click';
|
|
264
|
+
bubbles?: boolean;
|
|
265
|
+
cancelable?: boolean;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
declare interface CommonEvent_2 {
|
|
269
|
+
type: 'mousedown' | 'mouseup' | 'click';
|
|
270
|
+
bubbles?: boolean;
|
|
271
|
+
cancelable?: boolean;
|
|
272
|
+
}
|
|
273
|
+
|
|
262
274
|
export declare function compareSetDifference<T>(setA: Set<T>, setB: Set<T>): Set<T>;
|
|
263
275
|
|
|
264
276
|
export declare function convertWeightUnitToStandard(chineseWeight: string): string;
|
|
@@ -337,10 +349,9 @@ export declare function deepMultiSet<T = unknown>(target: T, assignment: Record<
|
|
|
337
349
|
|
|
338
350
|
export declare function deepSet(obj: any, path: string | Array<string | number>, value: any): void;
|
|
339
351
|
|
|
340
|
-
declare function
|
|
341
|
-
export { dispatchEvent_2 as dispatchEvent }
|
|
352
|
+
export declare function dispatchNodeEvent<T = any>(el: T, e: CommonEvent | SpecialEvent): Promise<T>;
|
|
342
353
|
|
|
343
|
-
export declare function
|
|
354
|
+
export declare function dispatchNodeEvents<T = any>(el: T, events: (CommonEvent_2 | SpecialEvent_2)[]): Promise<T>;
|
|
344
355
|
|
|
345
356
|
export declare function distanceSimilarity(a: string, b: string): number;
|
|
346
357
|
|
|
@@ -419,18 +430,6 @@ export declare function evaluateMathExpression(expression: string, variables: Re
|
|
|
419
430
|
termFallbackValue: number;
|
|
420
431
|
} | number): number;
|
|
421
432
|
|
|
422
|
-
declare interface EventEmit {
|
|
423
|
-
type: 'mousedown' | 'mouseup' | 'click';
|
|
424
|
-
bubbles?: true;
|
|
425
|
-
cancelable?: true;
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
declare interface EventEmit_2 {
|
|
429
|
-
type: 'mousedown' | 'mouseup' | 'click';
|
|
430
|
-
bubbles?: true;
|
|
431
|
-
cancelable?: true;
|
|
432
|
-
}
|
|
433
|
-
|
|
434
433
|
export declare function exchangeRateFormatter<T = unknown>(value: T, opts?: {
|
|
435
434
|
thousandth?: boolean;
|
|
436
435
|
}): string;
|
|
@@ -468,7 +467,7 @@ export declare function findHtmlElementById(id: string, defaultValue?: HTMLEleme
|
|
|
468
467
|
|
|
469
468
|
export declare function findHtmlElementUpward(start: Element | null, callback: (element: Element) => boolean, defaultElement?: Element): Element | null;
|
|
470
469
|
|
|
471
|
-
export declare function findNodeClosest(from: HTMLElement | null | undefined, callback: (node: HTMLElement) => boolean, end
|
|
470
|
+
export declare function findNodeClosest(from: HTMLElement | null | undefined, callback: (node: HTMLElement) => boolean, end?: HTMLElement | null | undefined): HTMLElement | null;
|
|
472
471
|
|
|
473
472
|
/**
|
|
474
473
|
* 将扁平数组转换成树结构
|
|
@@ -1218,6 +1217,14 @@ declare interface SortCondition<T> {
|
|
|
1218
1217
|
order: 'asc' | 'desc';
|
|
1219
1218
|
}
|
|
1220
1219
|
|
|
1220
|
+
declare interface SpecialEvent {
|
|
1221
|
+
type: 'focus';
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
declare interface SpecialEvent_2 {
|
|
1225
|
+
type: 'focus';
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1221
1228
|
export declare function stopDOMEvent(event: any): void;
|
|
1222
1229
|
|
|
1223
1230
|
declare interface StoreResult<T, A> {
|