@gkits/collect 0.0.25 → 0.0.26
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/README.md +1 -1
- package/dist/dts/res/_utils/animate/animate.d.ts +11 -11
- package/dist/dts/res/_utils/browser/fetcher.d.ts +58 -0
- package/dist/dts/res/_utils/browser/touch.d.ts +5 -5
- package/dist/dts/res/_utils/extend/arrayIndex.d.ts +1 -1
- package/dist/dts/res/_utils/intersections.d.ts +31 -0
- package/dist/dts/res/_utils/place.d.ts +1 -1
- package/dist/dts/res/_utils/string/marker.d.ts +1 -1
- package/dist/dts/res/_utils/style/basics.d.ts +1 -1
- package/dist/dts/res/_utils/style/display.d.ts +1 -1
- package/dist/dts/res/_utils/style/screen.d.ts +2 -0
- package/dist/dts/res/_utils/style/style.d.ts +1 -0
- package/dist/dts/res/param.d.ts +2 -0
- package/dist/dts/res/shared/environments/environment.d.ts +1 -0
- package/dist/dts/res/shared/interface/type.d.ts +7 -7
- package/dist/dts/res/shared/mixins/hiElementBase.d.ts +1 -0
- package/dist/dts/res/vessel/src/_lib/getUrlParams.d.ts +14 -0
- package/dist/dts/res/vessel/src/_lib/httpProxy.d.ts +74 -0
- package/dist/dts/res/vessel/src/_lib/loadJC.d.ts +1 -0
- package/dist/dts/res/vessel/src/_lib/networkState.d.ts +6 -0
- package/dist/dts/res/vessel/src/_lib/pathHandle.d.ts +12 -0
- package/dist/dts/res/vessel/src/_lib/throttle.d.ts +12 -0
- package/dist/dts/res/vessel/src/index.d.ts +3 -0
- package/dist/dts/res/vessel/src/indexdb.d.ts +14 -0
- package/dist/dts/res/vessel/src/upapi.d.ts +146 -0
- package/dist/dts/res/vessel/src/user.model.d.ts +12 -0
- package/dist/dts/res/vessel/src/vessel.d.ts +52 -0
- package/dist/index.js +3 -473
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
# `@
|
|
1
|
+
# `@gkits/collect`
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
type seekers = 'bounce' | 'flash' | 'headShake' | 'heartBeat' | 'jello' | 'pulse' | 'rubberBand' | 'shake' | 'shake' | 'shakeX' | 'shakeY' | 'swing' | 'tada' | 'wobble';
|
|
2
|
-
type back = 'backInDown' | 'backInLeft' | 'backInRight' | 'backInUp' | 'backOutDown' | 'backOutLeft' | 'backOutRight' | 'backOutUp';
|
|
3
|
-
type bouncing = 'bounceIn' | 'bounceInDown' | 'bounceInLeft' | 'bounceInRight' | 'bounceInUp' | 'bounceOut' | 'bounceOutDown' | 'bounceOutLeft' | 'bounceOutRight' | 'bounceOutUp';
|
|
4
|
-
type fading = 'fadeIn' | 'fadeInBottomLeft' | 'fadeInBottomRight' | 'fadeInDown' | 'fadeInDownBig' | 'fadeInLeft' | 'fadeInLeftBig' | 'fadeInRight' | 'fadeInRightBig' | 'fadeInTopLeft' | 'fadeInTopRight' | 'fadeInUp' | 'fadeInUpBig' | 'fadeOut' | 'fadeOutBottomLeft' | 'fadeOutBottomRight' | 'fadeOutDown' | 'fadeOutDownBig' | 'fadeOutLeft' | 'fadeOutLeftBig' | 'fadeOutRight' | 'fadeOutRightBig' | 'fadeOutTopLeft' | 'fadeOutTopRight' | 'fadeOutUp' | 'fadeOutUpBig';
|
|
5
|
-
type flippers = 'flip' | 'flipInX' | 'flipInY' | 'flipOutX' | 'flipOutY';
|
|
6
|
-
type lightspeed = 'lightSpeedInLeft' | 'lightSpeedInRight' | 'lightSpeedOutLeft' | 'lightSpeedOutRight';
|
|
7
|
-
type rotating = 'rotateIn' | 'rotateInDownLeft' | 'rotateInDownRight' | 'rotateInUpLeft' | 'rotateInUpRight' | 'rotateOut' | 'rotateOutDownLeft' | 'rotateOutDownRight' | 'rotateOutUpLeft' | 'rotateOutUpRight';
|
|
8
|
-
type sliding = 'slideInDown' | 'slideInLeft' | 'slideInRight' | 'slideInUp' | 'slideOutDown' | 'slideOutLeft' | 'slideOutRight' | 'slideOutUp';
|
|
9
|
-
type specials = 'hinge' | 'jackInTheBox' | 'rollIn' | 'rollOut';
|
|
10
|
-
type zoom = 'zoomIn' | 'zoomInDown' | 'zoomInLeft' | 'zoomInRight' | 'zoomInUp' | 'zoomOut' | 'zoomOutDown' | 'zoomOutLeft' | 'zoomOutRight' | 'zoomOutUp';
|
|
11
|
-
export type ANIMATE_NAME = seekers | back | bouncing | fading | flippers | lightspeed | rotating | sliding | specials | zoom;
|
|
1
|
+
declare type seekers = 'bounce' | 'flash' | 'headShake' | 'heartBeat' | 'jello' | 'pulse' | 'rubberBand' | 'shake' | 'shake' | 'shakeX' | 'shakeY' | 'swing' | 'tada' | 'wobble';
|
|
2
|
+
declare type back = 'backInDown' | 'backInLeft' | 'backInRight' | 'backInUp' | 'backOutDown' | 'backOutLeft' | 'backOutRight' | 'backOutUp';
|
|
3
|
+
declare type bouncing = 'bounceIn' | 'bounceInDown' | 'bounceInLeft' | 'bounceInRight' | 'bounceInUp' | 'bounceOut' | 'bounceOutDown' | 'bounceOutLeft' | 'bounceOutRight' | 'bounceOutUp';
|
|
4
|
+
declare type fading = 'fadeIn' | 'fadeInBottomLeft' | 'fadeInBottomRight' | 'fadeInDown' | 'fadeInDownBig' | 'fadeInLeft' | 'fadeInLeftBig' | 'fadeInRight' | 'fadeInRightBig' | 'fadeInTopLeft' | 'fadeInTopRight' | 'fadeInUp' | 'fadeInUpBig' | 'fadeOut' | 'fadeOutBottomLeft' | 'fadeOutBottomRight' | 'fadeOutDown' | 'fadeOutDownBig' | 'fadeOutLeft' | 'fadeOutLeftBig' | 'fadeOutRight' | 'fadeOutRightBig' | 'fadeOutTopLeft' | 'fadeOutTopRight' | 'fadeOutUp' | 'fadeOutUpBig';
|
|
5
|
+
declare type flippers = 'flip' | 'flipInX' | 'flipInY' | 'flipOutX' | 'flipOutY';
|
|
6
|
+
declare type lightspeed = 'lightSpeedInLeft' | 'lightSpeedInRight' | 'lightSpeedOutLeft' | 'lightSpeedOutRight';
|
|
7
|
+
declare type rotating = 'rotateIn' | 'rotateInDownLeft' | 'rotateInDownRight' | 'rotateInUpLeft' | 'rotateInUpRight' | 'rotateOut' | 'rotateOutDownLeft' | 'rotateOutDownRight' | 'rotateOutUpLeft' | 'rotateOutUpRight';
|
|
8
|
+
declare type sliding = 'slideInDown' | 'slideInLeft' | 'slideInRight' | 'slideInUp' | 'slideOutDown' | 'slideOutLeft' | 'slideOutRight' | 'slideOutUp';
|
|
9
|
+
declare type specials = 'hinge' | 'jackInTheBox' | 'rollIn' | 'rollOut';
|
|
10
|
+
declare type zoom = 'zoomIn' | 'zoomInDown' | 'zoomInLeft' | 'zoomInRight' | 'zoomInUp' | 'zoomOut' | 'zoomOutDown' | 'zoomOutLeft' | 'zoomOutRight' | 'zoomOutUp';
|
|
11
|
+
export declare type ANIMATE_NAME = seekers | back | bouncing | fading | flippers | lightspeed | rotating | sliding | specials | zoom;
|
|
12
12
|
export declare function Animate(selector: any): (name: ANIMATE_NAME, duration: number, callback?: () => void) => void;
|
|
13
13
|
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
interface Interceptor<T, E = any> {
|
|
2
|
+
fulfilled?: (value: T) => T | Promise<T>;
|
|
3
|
+
rejected?: (params: {
|
|
4
|
+
error: E;
|
|
5
|
+
options: T;
|
|
6
|
+
}) => any;
|
|
7
|
+
}
|
|
8
|
+
declare type Config = {
|
|
9
|
+
timeout?: number;
|
|
10
|
+
retries?: number;
|
|
11
|
+
retryInterval?: number;
|
|
12
|
+
retryOnFail?: boolean;
|
|
13
|
+
apiUrl?: string;
|
|
14
|
+
withHeader?: boolean;
|
|
15
|
+
};
|
|
16
|
+
export interface RequestOptions extends RequestInit {
|
|
17
|
+
body?: object & BodyInit | null;
|
|
18
|
+
_timeout?: number;
|
|
19
|
+
_retries?: number;
|
|
20
|
+
_retryInterval?: number;
|
|
21
|
+
_retryOnFail?: boolean;
|
|
22
|
+
_apiUrl?: string;
|
|
23
|
+
_withHeader?: boolean;
|
|
24
|
+
_isReturnNativeResponse?: boolean;
|
|
25
|
+
}
|
|
26
|
+
interface RequestContext {
|
|
27
|
+
url: string;
|
|
28
|
+
options: RequestOptions;
|
|
29
|
+
}
|
|
30
|
+
interface ResponseContext {
|
|
31
|
+
response: Response;
|
|
32
|
+
options: RequestOptions;
|
|
33
|
+
}
|
|
34
|
+
declare class InterceptorManager<T, E = any> {
|
|
35
|
+
private handlers;
|
|
36
|
+
use(fulfilled?: Interceptor<T, E>['fulfilled'], rejected?: Interceptor<T, E>['rejected']): void;
|
|
37
|
+
runHandlers(value: T): Promise<T>;
|
|
38
|
+
}
|
|
39
|
+
export declare class HttpFetch {
|
|
40
|
+
constructor(config: Config);
|
|
41
|
+
private timeout;
|
|
42
|
+
private retries;
|
|
43
|
+
private apiUrl;
|
|
44
|
+
private retryInterval;
|
|
45
|
+
private retryOnFail;
|
|
46
|
+
interceptors: {
|
|
47
|
+
request: InterceptorManager<RequestContext, any>;
|
|
48
|
+
response: InterceptorManager<ResponseContext, any>;
|
|
49
|
+
};
|
|
50
|
+
private fetchWithTimeout;
|
|
51
|
+
private retryFetch;
|
|
52
|
+
request(resource: string, options?: RequestOptions): Promise<unknown>;
|
|
53
|
+
get<T = Response>(resource: string, options?: Omit<RequestOptions, 'method'>): Promise<unknown>;
|
|
54
|
+
post<T = Response>(resource: string, options?: Omit<RequestOptions, 'method'>): Promise<unknown>;
|
|
55
|
+
put<T = Response>(resource: string, options?: Omit<RequestOptions, 'method'>): Promise<unknown>;
|
|
56
|
+
delete<T = Response>(resource: string, options?: Omit<RequestOptions, 'method'>): Promise<unknown>;
|
|
57
|
+
}
|
|
58
|
+
export {};
|
|
@@ -10,12 +10,12 @@ declare class Pointer {
|
|
|
10
10
|
constructor(nativePointer: Touch | PointerEvent | MouseEvent);
|
|
11
11
|
getCoalesced(): Pointer[];
|
|
12
12
|
}
|
|
13
|
-
type PointerType = Pointer;
|
|
13
|
+
declare type PointerType = Pointer;
|
|
14
14
|
export { PointerType as Pointer };
|
|
15
|
-
export type InputEvent = TouchEvent | PointerEvent | MouseEvent;
|
|
16
|
-
type StartCallback = (pointer: Pointer, event: InputEvent) => boolean;
|
|
17
|
-
type MoveCallback = (previousPointers: Pointer[], changedPointers: Pointer[], event: InputEvent) => void;
|
|
18
|
-
type EndCallback = (pointer: Pointer, event: InputEvent, cancelled: boolean) => void;
|
|
15
|
+
export declare type InputEvent = TouchEvent | PointerEvent | MouseEvent;
|
|
16
|
+
declare type StartCallback = (pointer: Pointer, event: InputEvent) => boolean;
|
|
17
|
+
declare type MoveCallback = (previousPointers: Pointer[], changedPointers: Pointer[], event: InputEvent) => void;
|
|
18
|
+
declare type EndCallback = (pointer: Pointer, event: InputEvent, cancelled: boolean) => void;
|
|
19
19
|
interface PointerTrackerOptions {
|
|
20
20
|
start?: StartCallback;
|
|
21
21
|
move?: MoveCallback;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
interface OPTIONS {
|
|
2
|
+
root?: HTMLElement | null;
|
|
3
|
+
rootMargin?: string;
|
|
4
|
+
threshold?: number | Array<number>;
|
|
5
|
+
}
|
|
6
|
+
interface ENTRY {
|
|
7
|
+
boundingClientRect: any;
|
|
8
|
+
intersectionRatio: any;
|
|
9
|
+
intersectionRect: any;
|
|
10
|
+
isIntersecting: any;
|
|
11
|
+
rootBounds: any;
|
|
12
|
+
target: any;
|
|
13
|
+
time: any;
|
|
14
|
+
}
|
|
15
|
+
interface ADDOPTIONS {
|
|
16
|
+
el: ParentNode;
|
|
17
|
+
src?: string;
|
|
18
|
+
callback?: (entry?: ENTRY) => void;
|
|
19
|
+
out?: (entry?: ENTRY) => void;
|
|
20
|
+
}
|
|
21
|
+
export declare class IObserver {
|
|
22
|
+
constructor(options?: OPTIONS, needDelay?: boolean);
|
|
23
|
+
private options;
|
|
24
|
+
private callback;
|
|
25
|
+
private IO;
|
|
26
|
+
private needDelay;
|
|
27
|
+
remove(el: ParentNode): void;
|
|
28
|
+
add(options: ADDOPTIONS): void;
|
|
29
|
+
uninstall(): void;
|
|
30
|
+
}
|
|
31
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare function MARKER(): any;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
type StyleName = 'Cursor' | 'PoiNo' | 'PoiAll' | 'PosR' | 'PosA' | 'PosF' | 'OH' | 'OA' | 'VisHi' | 'VisVi' | 'DisBlock' | 'DisInBlock' | 'DisIn' | 'DisFlex' | 'DisGrid' | 'DisNo' | 'WS' | 'WW' | 'WB' | 'TEll' | 'BCover' | 'TL' | 'TR' | 'TC' | 'Opa0' | 'Opa1' | 'Inset' | 'Content';
|
|
1
|
+
declare type StyleName = 'Cursor' | 'PoiNo' | 'PoiAll' | 'PosR' | 'PosA' | 'PosF' | 'OH' | 'OA' | 'VisHi' | 'VisVi' | 'DisBlock' | 'DisInBlock' | 'DisIn' | 'DisFlex' | 'DisGrid' | 'DisNo' | 'WS' | 'WW' | 'WB' | 'TEll' | 'BCover' | 'TL' | 'TR' | 'TC' | 'Opa0' | 'Opa1' | 'Inset' | 'Content';
|
|
2
2
|
export declare function BasicsStyle(SName?: Array<StyleName>): string;
|
|
3
3
|
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type CSSDisplayPropertyValue = "block" | "contents" | "flex" | "grid" | "inherit" | "initial" | "inline" | "inline-block" | "inline-flex" | "inline-grid" | "inline-table" | "list-item" | "none" | "run-in" | "table" | "table-caption" | "table-cell" | "table-column" | "table-column-group" | "table-footer-group" | "table-header-group" | "table-row" | "table-row-group";
|
|
1
|
+
export declare type CSSDisplayPropertyValue = "block" | "contents" | "flex" | "grid" | "inherit" | "initial" | "inline" | "inline-block" | "inline-flex" | "inline-grid" | "inline-table" | "list-item" | "none" | "run-in" | "table" | "table-caption" | "table-cell" | "table-column" | "table-column-group" | "table-footer-group" | "table-header-group" | "table-row" | "table-row-group";
|
|
2
2
|
export declare const hidden = ":host([hidden]),:host([hide]){display:none}";
|
|
3
3
|
export declare function display(displayValue: CSSDisplayPropertyValue): string;
|
|
@@ -2,9 +2,11 @@ export declare class Screens {
|
|
|
2
2
|
private static _case;
|
|
3
3
|
static get case(): Screens;
|
|
4
4
|
constructor();
|
|
5
|
+
isMobile: boolean;
|
|
5
6
|
pageSize: any;
|
|
6
7
|
size: number;
|
|
7
8
|
toVw(value: number): string;
|
|
8
9
|
toPerce(value: number): string;
|
|
9
10
|
toPx(value: number): string;
|
|
11
|
+
toEm(value: number): string;
|
|
10
12
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare function Style(selector: any): (props: any, value?: any) => void;
|
|
2
|
+
export declare function SetProperty(selector: any): (props: Array<Array<string>>) => void;
|
|
2
3
|
export declare function RemoveStyle(selector: any): (props: Array<string>) => void;
|
|
3
4
|
export declare function Css(selector: any): (props: any, value?: any) => any;
|
|
4
5
|
export declare function StyleInsertRule(selector: any): (value: (string | CSSStyleSheet)[]) => any;
|
package/dist/dts/res/param.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export type SITE = 'top' | 'right' | 'bottom' | 'left';
|
|
2
|
-
export type PLACE = SITE | 'topleft' | 'topright' | 'bottomleft' | 'bottomright';
|
|
3
|
-
export type DIR_TYPE = PLACE | 'righttop' | 'rightbottom' | 'lefttop' | 'leftbottom' | 'auto';
|
|
4
|
-
export type SIZE_TYPE = 'large' | 'small' | 'default' | string;
|
|
5
|
-
export type LAYOUT_TYPE = 'horizontal' | 'vertical';
|
|
6
|
-
export type ALIGN = 'left' | 'center' | 'right' | 'sides';
|
|
7
|
-
export type MESSAGE_TYPE = 'info' | 'success' | 'error' | 'warning' | 'loading' | 'show';
|
|
1
|
+
export declare type SITE = 'top' | 'right' | 'bottom' | 'left';
|
|
2
|
+
export declare type PLACE = SITE | 'topleft' | 'topright' | 'bottomleft' | 'bottomright';
|
|
3
|
+
export declare type DIR_TYPE = PLACE | 'righttop' | 'rightbottom' | 'lefttop' | 'leftbottom' | 'auto';
|
|
4
|
+
export declare type SIZE_TYPE = 'large' | 'small' | 'default' | string;
|
|
5
|
+
export declare type LAYOUT_TYPE = 'horizontal' | 'vertical';
|
|
6
|
+
export declare type ALIGN = 'left' | 'center' | 'right' | 'sides';
|
|
7
|
+
export declare type MESSAGE_TYPE = 'info' | 'success' | 'error' | 'warning' | 'loading' | 'show';
|
|
8
8
|
export interface COLOR_TYPE {
|
|
9
9
|
value: string;
|
|
10
10
|
isGradient: boolean;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface IOptionsValue {
|
|
2
|
+
url?: string;
|
|
3
|
+
type?: any[];
|
|
4
|
+
replace?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare class UrlHandle {
|
|
7
|
+
getFileNameFromUrl(url: any): string;
|
|
8
|
+
getUrlParams(optionss?: IOptionsValue): {};
|
|
9
|
+
replaceQSParams(search: string, key: string, val: any): string;
|
|
10
|
+
replaceUrlParams(urlStr: string, obj: Object): string;
|
|
11
|
+
replacePathParams(pathStr: string, queryObj: object): string;
|
|
12
|
+
compareUrlPath(url1: string, url2?: string): boolean;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
declare class HttpProxy {
|
|
2
|
+
private RealXMLHttpRequest;
|
|
3
|
+
private realXMLHttpRequest;
|
|
4
|
+
proxyAjax: (proxyMap: ProxyMap) => {
|
|
5
|
+
new (): XMLHttpRequest;
|
|
6
|
+
prototype: XMLHttpRequest;
|
|
7
|
+
readonly DONE: number;
|
|
8
|
+
readonly HEADERS_RECEIVED: number;
|
|
9
|
+
readonly LOADING: number;
|
|
10
|
+
readonly OPENED: number;
|
|
11
|
+
readonly UNSENT: number;
|
|
12
|
+
};
|
|
13
|
+
unProxyAjax: () => void;
|
|
14
|
+
}
|
|
15
|
+
declare const httpProxy: HttpProxy;
|
|
16
|
+
export default httpProxy;
|
|
17
|
+
export interface ProxyMap {
|
|
18
|
+
readyState?: AttrProxy<number>;
|
|
19
|
+
response?: AttrProxy<any>;
|
|
20
|
+
responseText?: AttrProxy<string>;
|
|
21
|
+
responseType?: AttrProxy<XMLHttpRequestResponseType>;
|
|
22
|
+
responseURL?: AttrProxy<string>;
|
|
23
|
+
responseXML?: AttrProxy<Document | null>;
|
|
24
|
+
status?: AttrProxy<number>;
|
|
25
|
+
statusText?: AttrProxy<string>;
|
|
26
|
+
timeout?: AttrProxy<number>;
|
|
27
|
+
withCredentials?: AttrProxy<boolean>;
|
|
28
|
+
upload?: AttrProxy<XMLHttpRequestUpload>;
|
|
29
|
+
UNSENT?: AttrProxy<number>;
|
|
30
|
+
OPENED?: AttrProxy<number>;
|
|
31
|
+
HEADERS_RECEIVED?: AttrProxy<number>;
|
|
32
|
+
LOADING?: AttrProxy<number>;
|
|
33
|
+
DONE?: AttrProxy<number>;
|
|
34
|
+
onreadystatechange?: (xhr: FullWritableXMLHTTPRequest) => void;
|
|
35
|
+
onabort?: (xhr: FullWritableXMLHTTPRequest) => void;
|
|
36
|
+
onerror?: (xhr: FullWritableXMLHTTPRequest) => void;
|
|
37
|
+
onload?: (xhr: FullWritableXMLHTTPRequest) => void;
|
|
38
|
+
onloadend?: (xhr: FullWritableXMLHTTPRequest) => void;
|
|
39
|
+
onloadstart?: (xhr: FullWritableXMLHTTPRequest) => void;
|
|
40
|
+
onprogress?: (xhr: FullWritableXMLHTTPRequest) => void;
|
|
41
|
+
ontimeout?: (xhr: FullWritableXMLHTTPRequest) => void;
|
|
42
|
+
open?: (args: any[], xhr: FullWritableXMLHTTPRequest) => boolean | void | any;
|
|
43
|
+
abort?: (args: any[], xhr: FullWritableXMLHTTPRequest) => boolean | void | any;
|
|
44
|
+
getAllResponseHeaders?: (args: any[], xhr: FullWritableXMLHTTPRequest) => boolean | void | any;
|
|
45
|
+
getResponseHeader?: (args: any[], xhr: FullWritableXMLHTTPRequest) => boolean | void | any;
|
|
46
|
+
overrideMimeType?: (args: any[], xhr: FullWritableXMLHTTPRequest) => boolean | void | any;
|
|
47
|
+
send?: (args: any[], xhr: FullWritableXMLHTTPRequest) => boolean | void | any;
|
|
48
|
+
setRequestHeader?: (args: any[], xhr: FullWritableXMLHTTPRequest) => boolean | void | any;
|
|
49
|
+
addEventListener?: (args: any[], xhr: FullWritableXMLHTTPRequest) => boolean | void | any;
|
|
50
|
+
removeEventListener?: (args: any[], xhr: FullWritableXMLHTTPRequest) => boolean | void | any;
|
|
51
|
+
}
|
|
52
|
+
export interface AttrProxy<T> {
|
|
53
|
+
setter?: boolean | SetGetFn<T>;
|
|
54
|
+
getter?: boolean | SetGetFn<T>;
|
|
55
|
+
}
|
|
56
|
+
export interface SetGetFn<T> {
|
|
57
|
+
(this: XMLHttpRequest, value: T, xhr: XMLHttpRequest): T;
|
|
58
|
+
}
|
|
59
|
+
export declare type FullWritableXMLHTTPRequest = XMLHttpRequestUpload & WtritableAttrs;
|
|
60
|
+
export interface WtritableAttrs {
|
|
61
|
+
readyState: number;
|
|
62
|
+
response: any;
|
|
63
|
+
responseText: string;
|
|
64
|
+
responseURL: string;
|
|
65
|
+
responseXML: Document | null;
|
|
66
|
+
status: number;
|
|
67
|
+
statusText: string;
|
|
68
|
+
upload: XMLHttpRequestUpload;
|
|
69
|
+
DONE: number;
|
|
70
|
+
HEADERS_RECEIVED: number;
|
|
71
|
+
LOADING: number;
|
|
72
|
+
OPENED: number;
|
|
73
|
+
UNSENT: number;
|
|
74
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function LoadJC(path: string, name?: string): Promise<boolean>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface OPTIONS {
|
|
2
|
+
url: string;
|
|
3
|
+
vessel: string;
|
|
4
|
+
version?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare class PathHandle {
|
|
7
|
+
delRoutePath(url: string): string;
|
|
8
|
+
getPath(options: OPTIONS): any;
|
|
9
|
+
private toNum;
|
|
10
|
+
version(versionA: any, versionB: any): boolean;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class Throttle {
|
|
2
|
+
_THROTTlE: any;
|
|
3
|
+
_Time: number;
|
|
4
|
+
init(callback: () => void, time?: number): void;
|
|
5
|
+
}
|
|
6
|
+
export declare class Specific {
|
|
7
|
+
timeOut: number;
|
|
8
|
+
init(options: {
|
|
9
|
+
front: string | (() => boolean);
|
|
10
|
+
callback: () => void;
|
|
11
|
+
}): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare class IndexDBIO {
|
|
2
|
+
private static _instance;
|
|
3
|
+
static getInstance(): IndexDBIO;
|
|
4
|
+
DB_NAME: string;
|
|
5
|
+
Indb: any;
|
|
6
|
+
version: number;
|
|
7
|
+
name: string;
|
|
8
|
+
request: any;
|
|
9
|
+
init(SQL_NAME?: string): Promise<unknown>;
|
|
10
|
+
get(name: any): Promise<unknown>;
|
|
11
|
+
add(name: any, content: any): Promise<unknown>;
|
|
12
|
+
remove(name: any): Promise<unknown>;
|
|
13
|
+
update: (name: any, content: any) => Promise<unknown>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { UrlHandle } from './_lib/getUrlParams';
|
|
2
|
+
export declare class UplusApi extends UrlHandle {
|
|
3
|
+
constructor();
|
|
4
|
+
private static _instance;
|
|
5
|
+
static getInstance(): UplusApi;
|
|
6
|
+
private userModel;
|
|
7
|
+
private vessel;
|
|
8
|
+
NEBULA: any;
|
|
9
|
+
APICLOUD: any;
|
|
10
|
+
CORDOVA: any;
|
|
11
|
+
H5VESSEL: any;
|
|
12
|
+
networkState: any;
|
|
13
|
+
RETCODE: string[];
|
|
14
|
+
middlePageOrigin: string;
|
|
15
|
+
work: {
|
|
16
|
+
isOnline: {
|
|
17
|
+
apicloud: {
|
|
18
|
+
name: string;
|
|
19
|
+
module: string;
|
|
20
|
+
};
|
|
21
|
+
stable: string;
|
|
22
|
+
};
|
|
23
|
+
getDeviceList: {
|
|
24
|
+
apicloud: {
|
|
25
|
+
name: string;
|
|
26
|
+
module: string;
|
|
27
|
+
};
|
|
28
|
+
stable: string;
|
|
29
|
+
};
|
|
30
|
+
getSign: {
|
|
31
|
+
apicloud: {
|
|
32
|
+
name: string;
|
|
33
|
+
module: string;
|
|
34
|
+
};
|
|
35
|
+
stable: string;
|
|
36
|
+
};
|
|
37
|
+
requestPermissionV2: {
|
|
38
|
+
stable: string;
|
|
39
|
+
};
|
|
40
|
+
getFamilyInfo: {
|
|
41
|
+
stable: string;
|
|
42
|
+
};
|
|
43
|
+
getAppInfo: {
|
|
44
|
+
stable: string;
|
|
45
|
+
};
|
|
46
|
+
imagePicker: {
|
|
47
|
+
stable: string;
|
|
48
|
+
};
|
|
49
|
+
openCamera: {
|
|
50
|
+
stable: string;
|
|
51
|
+
};
|
|
52
|
+
fileToBase64: {
|
|
53
|
+
stable: string;
|
|
54
|
+
};
|
|
55
|
+
getLocationInfo: {
|
|
56
|
+
stable: string;
|
|
57
|
+
};
|
|
58
|
+
pullUpMiniProgramInUplus: {
|
|
59
|
+
stable: string;
|
|
60
|
+
};
|
|
61
|
+
checkAppIsInstalled: {
|
|
62
|
+
apicloud: {
|
|
63
|
+
name: string;
|
|
64
|
+
module: string;
|
|
65
|
+
};
|
|
66
|
+
stable: string;
|
|
67
|
+
};
|
|
68
|
+
saveImages: {
|
|
69
|
+
stable: string;
|
|
70
|
+
};
|
|
71
|
+
gotoPage: {
|
|
72
|
+
apicloud: {
|
|
73
|
+
name: string;
|
|
74
|
+
module: string;
|
|
75
|
+
};
|
|
76
|
+
stable: string;
|
|
77
|
+
};
|
|
78
|
+
dynamicSignRequest: {
|
|
79
|
+
apicloud: {
|
|
80
|
+
name: string;
|
|
81
|
+
module: string;
|
|
82
|
+
};
|
|
83
|
+
stable: string;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
conduct(options: any, callback: any, error?: (r: any) => void): void;
|
|
87
|
+
distribute(): void;
|
|
88
|
+
initialize(): Promise<any>;
|
|
89
|
+
BreakNet(callback?: (r: any) => void, text?: any): void;
|
|
90
|
+
isOnline(): Promise<unknown>;
|
|
91
|
+
isLogin(): Promise<any>;
|
|
92
|
+
getUserInfo(): Promise<any>;
|
|
93
|
+
getDeviceList(familyId: any): Promise<unknown>;
|
|
94
|
+
requestPermissionV2(name: any, callback: any): void;
|
|
95
|
+
getSign(isTest: boolean, SignData: any, callback: (r?: any) => void): void;
|
|
96
|
+
getFamilyInfo(callback: any, times?: number): void;
|
|
97
|
+
getAppInfo(callback: any): void;
|
|
98
|
+
imagePicker(options: any): Promise<any>;
|
|
99
|
+
openCamera(options: any): Promise<any>;
|
|
100
|
+
fileToBase64(options: any): Promise<any>;
|
|
101
|
+
getLocationInfo(callback: any): void;
|
|
102
|
+
getLocation(): Promise<{
|
|
103
|
+
longitude: any;
|
|
104
|
+
latitude: any;
|
|
105
|
+
appRaw?: any;
|
|
106
|
+
wxRaw?: any;
|
|
107
|
+
}>;
|
|
108
|
+
pullUpMiniProgram(options: any, callback?: (r?: any) => void): void;
|
|
109
|
+
pullUpMiniProgramInUplus(options: any, callback?: (r?: any) => void): void;
|
|
110
|
+
pullUpMiniProgramInWxMiniP(options: any): void;
|
|
111
|
+
pullUpMiniProgramInBrowser(options: {
|
|
112
|
+
appId?: string;
|
|
113
|
+
path?: string;
|
|
114
|
+
query?: string;
|
|
115
|
+
platform?: string;
|
|
116
|
+
}): void;
|
|
117
|
+
pullUpMiniProgramInBrowserV2(options: {
|
|
118
|
+
appId?: string;
|
|
119
|
+
path?: string;
|
|
120
|
+
query?: string;
|
|
121
|
+
urlLinkType?: string;
|
|
122
|
+
category?: string;
|
|
123
|
+
}): void;
|
|
124
|
+
checkAppIsInstalled(options: {
|
|
125
|
+
platform: 'qq' | 'weibo' | 'wechat';
|
|
126
|
+
}, callback?: (r?: any) => void, error?: (r?: any) => void): void;
|
|
127
|
+
saveImages(options: any, callback?: (r?: any) => void, error?: (r?: any) => void): void;
|
|
128
|
+
track(options: {
|
|
129
|
+
eventId: string;
|
|
130
|
+
variable?: any;
|
|
131
|
+
}, callback?: (r?: any) => void): void;
|
|
132
|
+
jumpUrl(options: {
|
|
133
|
+
url: string;
|
|
134
|
+
param?: any;
|
|
135
|
+
}): void;
|
|
136
|
+
gotoPage(options: any, callback?: any, error?: any): void;
|
|
137
|
+
dynamicSignRequest(options: {
|
|
138
|
+
url: string;
|
|
139
|
+
body?: any;
|
|
140
|
+
headers: any;
|
|
141
|
+
method: string;
|
|
142
|
+
signKey: any;
|
|
143
|
+
}, callback?: (r?: any) => void, error?: (r?: any) => void): void;
|
|
144
|
+
hiddenProperty(callback: () => void, error?: () => void): void;
|
|
145
|
+
exitApp(): void;
|
|
146
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { UrlHandle } from './_lib/getUrlParams';
|
|
2
|
+
export declare class Vessel extends UrlHandle {
|
|
3
|
+
constructor();
|
|
4
|
+
private static _instance;
|
|
5
|
+
static getInstance(): Vessel;
|
|
6
|
+
type: string;
|
|
7
|
+
containerType: string;
|
|
8
|
+
taskSourceType: string;
|
|
9
|
+
config: {
|
|
10
|
+
WrapperName: string[];
|
|
11
|
+
isCallback: boolean;
|
|
12
|
+
timeOut: number;
|
|
13
|
+
isReady: boolean;
|
|
14
|
+
};
|
|
15
|
+
protected _readyQ: Array<any>;
|
|
16
|
+
protected _navigator: string;
|
|
17
|
+
device: {
|
|
18
|
+
isAndroid: boolean;
|
|
19
|
+
isIOS: boolean;
|
|
20
|
+
isUplus: boolean;
|
|
21
|
+
isWx: boolean;
|
|
22
|
+
isWxMiniProgram: boolean;
|
|
23
|
+
isWeiBo: boolean;
|
|
24
|
+
isNetEaseNews: boolean;
|
|
25
|
+
isTTWebView: boolean;
|
|
26
|
+
isWxBrowser: boolean;
|
|
27
|
+
};
|
|
28
|
+
private _readyQueue;
|
|
29
|
+
isShowTip: boolean;
|
|
30
|
+
ContainerType: {
|
|
31
|
+
zjApp: string;
|
|
32
|
+
synApp: string;
|
|
33
|
+
synWorkBenchApp: string;
|
|
34
|
+
zjwxMiniP: string;
|
|
35
|
+
synwxMiniP: string;
|
|
36
|
+
zjttMiniP: string;
|
|
37
|
+
zjsyMiniP: string;
|
|
38
|
+
zjActivityMiniP: string;
|
|
39
|
+
};
|
|
40
|
+
isReady(): boolean;
|
|
41
|
+
ready(): Promise<any>;
|
|
42
|
+
init(callback?: () => void): void;
|
|
43
|
+
private setReadyState;
|
|
44
|
+
private loadWxEnv;
|
|
45
|
+
initTtSdk(): void;
|
|
46
|
+
private loadTtEnv;
|
|
47
|
+
initTaskSourceType(): void;
|
|
48
|
+
private initContainerType;
|
|
49
|
+
private exist;
|
|
50
|
+
distinctMiniP(ua: any): boolean;
|
|
51
|
+
private detection;
|
|
52
|
+
}
|