@base-framework/base 3.0.460 → 3.0.461
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/base.js +1 -1
- package/dist/base.js.map +4 -4
- package/dist/types/modules/ajax/ajax.d.ts +2 -101
- package/dist/types/modules/ajax/base-ajax-methods.d.ts +1 -0
- package/dist/types/modules/ajax/xhr-default-settings.d.ts +17 -0
- package/dist/types/modules/ajax/xhr-request.d.ts +101 -0
- package/package.json +1 -1
|
@@ -50,104 +50,5 @@ export function Ajax(url: string, params?: string, callBackFn?: Function, respon
|
|
|
50
50
|
* @returns {object} xhr object.
|
|
51
51
|
*/
|
|
52
52
|
export function Ajax(settings: object): any;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
*
|
|
56
|
-
* This will create an xhr request object.
|
|
57
|
-
*
|
|
58
|
-
* @class
|
|
59
|
-
*/
|
|
60
|
-
export class XhrRequest {
|
|
61
|
-
/**
|
|
62
|
-
* This will create an xhr request object.
|
|
63
|
-
*
|
|
64
|
-
* @constructor
|
|
65
|
-
* @param {*} args
|
|
66
|
-
*/
|
|
67
|
-
constructor(args: any);
|
|
68
|
-
settings: any;
|
|
69
|
-
xhr: any;
|
|
70
|
-
/**
|
|
71
|
-
* This will setup the xhr request.
|
|
72
|
-
*
|
|
73
|
-
* @protected
|
|
74
|
-
* @param {*} args
|
|
75
|
-
* @returns {(object|boolean)}
|
|
76
|
-
*/
|
|
77
|
-
protected setup(args: any): (object | boolean);
|
|
78
|
-
/**
|
|
79
|
-
* This will call all before send callbacks.
|
|
80
|
-
*
|
|
81
|
-
* @protected
|
|
82
|
-
* @returns {void}
|
|
83
|
-
*/
|
|
84
|
-
protected beforeSend(): void;
|
|
85
|
-
/**
|
|
86
|
-
* This will convert an object to a string.
|
|
87
|
-
*
|
|
88
|
-
* @protected
|
|
89
|
-
* @param {object} object
|
|
90
|
-
* @returns {string}
|
|
91
|
-
*/
|
|
92
|
-
protected objectToString(object: object): string;
|
|
93
|
-
/**
|
|
94
|
-
* This will add the base params to the request params.
|
|
95
|
-
*
|
|
96
|
-
* @protected
|
|
97
|
-
* @param {*} params
|
|
98
|
-
* @param {*} addingParams
|
|
99
|
-
* @returns {*}
|
|
100
|
-
*/
|
|
101
|
-
protected setupParams(params: any, addingParams: any): any;
|
|
102
|
-
/**
|
|
103
|
-
* This will get the params.
|
|
104
|
-
*
|
|
105
|
-
* @protected
|
|
106
|
-
* @returns {*}
|
|
107
|
-
*/
|
|
108
|
-
protected getParams(): any;
|
|
109
|
-
/**
|
|
110
|
-
* This will set the settings from the args.
|
|
111
|
-
*
|
|
112
|
-
* @protected
|
|
113
|
-
* @param {array} args
|
|
114
|
-
* @returns {void}
|
|
115
|
-
*/
|
|
116
|
-
protected getXhrSettings(args: any[]): void;
|
|
117
|
-
/**
|
|
118
|
-
* This will create the xhr object.
|
|
119
|
-
*
|
|
120
|
-
* @protected
|
|
121
|
-
* @returns {(object|boolean)}
|
|
122
|
-
*/
|
|
123
|
-
protected createXHR(): (object | boolean);
|
|
124
|
-
/**
|
|
125
|
-
* This will setup the request headers.
|
|
126
|
-
*
|
|
127
|
-
* @protected
|
|
128
|
-
* @returns {void}
|
|
129
|
-
*/
|
|
130
|
-
protected setupHeaders(): void;
|
|
131
|
-
/**
|
|
132
|
-
* This will update the request status.
|
|
133
|
-
*
|
|
134
|
-
* @protected
|
|
135
|
-
* @param {object} e
|
|
136
|
-
* @param {string} [overrideType]
|
|
137
|
-
*/
|
|
138
|
-
protected update(e: object, overrideType?: string): boolean;
|
|
139
|
-
/**
|
|
140
|
-
* This will get the response data.
|
|
141
|
-
*
|
|
142
|
-
* @protected
|
|
143
|
-
* @returns {*}
|
|
144
|
-
*/
|
|
145
|
-
protected getResponseData(): any;
|
|
146
|
-
/**
|
|
147
|
-
* This will add the xhr events.
|
|
148
|
-
*
|
|
149
|
-
* @protected
|
|
150
|
-
* @returns {void}
|
|
151
|
-
*/
|
|
152
|
-
protected addXhrEvents(): void;
|
|
153
|
-
}
|
|
53
|
+
export { XhrRequest };
|
|
54
|
+
import { XhrRequest } from './xhr-request.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function setupBaseAjaxMethods(): void;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export namespace XhrDefaultSettings {
|
|
2
|
+
let url: string;
|
|
3
|
+
let responseType: string;
|
|
4
|
+
let method: string;
|
|
5
|
+
let fixedParams: string;
|
|
6
|
+
let headers: {
|
|
7
|
+
'Content-Type': string;
|
|
8
|
+
};
|
|
9
|
+
let beforeSend: any[];
|
|
10
|
+
let async: boolean;
|
|
11
|
+
let crossDomain: boolean;
|
|
12
|
+
let withCredentials: boolean;
|
|
13
|
+
let completed: any;
|
|
14
|
+
let failed: any;
|
|
15
|
+
let aborted: any;
|
|
16
|
+
let progress: any;
|
|
17
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* XhrRequest
|
|
3
|
+
*
|
|
4
|
+
* This will create an xhr request object.
|
|
5
|
+
*
|
|
6
|
+
* @class
|
|
7
|
+
*/
|
|
8
|
+
export class XhrRequest {
|
|
9
|
+
/**
|
|
10
|
+
* This will create an xhr request object.
|
|
11
|
+
*
|
|
12
|
+
* @constructor
|
|
13
|
+
* @param {*} args
|
|
14
|
+
*/
|
|
15
|
+
constructor(args: any);
|
|
16
|
+
settings: any;
|
|
17
|
+
xhr: any;
|
|
18
|
+
/**
|
|
19
|
+
* This will setup the xhr request.
|
|
20
|
+
*
|
|
21
|
+
* @protected
|
|
22
|
+
* @param {*} args
|
|
23
|
+
* @returns {(object|boolean)}
|
|
24
|
+
*/
|
|
25
|
+
protected setup(args: any): (object | boolean);
|
|
26
|
+
/**
|
|
27
|
+
* This will call all before send callbacks.
|
|
28
|
+
*
|
|
29
|
+
* @protected
|
|
30
|
+
* @returns {void}
|
|
31
|
+
*/
|
|
32
|
+
protected beforeSend(): void;
|
|
33
|
+
/**
|
|
34
|
+
* This will convert an object to a string.
|
|
35
|
+
*
|
|
36
|
+
* @protected
|
|
37
|
+
* @param {object} object
|
|
38
|
+
* @returns {string}
|
|
39
|
+
*/
|
|
40
|
+
protected objectToString(object: object): string;
|
|
41
|
+
/**
|
|
42
|
+
* This will add the base params to the request params.
|
|
43
|
+
*
|
|
44
|
+
* @protected
|
|
45
|
+
* @param {*} params
|
|
46
|
+
* @param {*} addingParams
|
|
47
|
+
* @returns {*}
|
|
48
|
+
*/
|
|
49
|
+
protected setupParams(params: any, addingParams: any): any;
|
|
50
|
+
/**
|
|
51
|
+
* This will get the params.
|
|
52
|
+
*
|
|
53
|
+
* @protected
|
|
54
|
+
* @returns {*}
|
|
55
|
+
*/
|
|
56
|
+
protected getParams(): any;
|
|
57
|
+
/**
|
|
58
|
+
* This will set the settings from the args.
|
|
59
|
+
*
|
|
60
|
+
* @protected
|
|
61
|
+
* @param {array} args
|
|
62
|
+
* @returns {void}
|
|
63
|
+
*/
|
|
64
|
+
protected getXhrSettings(args: any[]): void;
|
|
65
|
+
/**
|
|
66
|
+
* This will create the xhr object.
|
|
67
|
+
*
|
|
68
|
+
* @protected
|
|
69
|
+
* @returns {(object|boolean)}
|
|
70
|
+
*/
|
|
71
|
+
protected createXHR(): (object | boolean);
|
|
72
|
+
/**
|
|
73
|
+
* This will setup the request headers.
|
|
74
|
+
*
|
|
75
|
+
* @protected
|
|
76
|
+
* @returns {void}
|
|
77
|
+
*/
|
|
78
|
+
protected setupHeaders(): void;
|
|
79
|
+
/**
|
|
80
|
+
* This will update the request status.
|
|
81
|
+
*
|
|
82
|
+
* @protected
|
|
83
|
+
* @param {object} e
|
|
84
|
+
* @param {string} [overrideType]
|
|
85
|
+
*/
|
|
86
|
+
protected update(e: object, overrideType?: string): boolean;
|
|
87
|
+
/**
|
|
88
|
+
* This will get the response data.
|
|
89
|
+
*
|
|
90
|
+
* @protected
|
|
91
|
+
* @returns {*}
|
|
92
|
+
*/
|
|
93
|
+
protected getResponseData(): any;
|
|
94
|
+
/**
|
|
95
|
+
* This will add the xhr events.
|
|
96
|
+
*
|
|
97
|
+
* @protected
|
|
98
|
+
* @returns {void}
|
|
99
|
+
*/
|
|
100
|
+
protected addXhrEvents(): void;
|
|
101
|
+
}
|