@angular-wave/angular.ts 0.0.40 → 0.0.42
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 +28 -0
- package/dist/angular-ts.esm.js +2 -2
- package/dist/angular-ts.umd.js +2 -2
- package/package.json +1 -1
- package/src/animations/animate-queue.js +7 -4
- package/src/core/compile/compile.js +5 -3
- package/src/core/compile/compile.md +2 -5
- package/src/core/compile/compile.spec.js +2 -43
- package/src/core/exception-handler.js +6 -6
- package/src/core/interpolate/interpolate.js +1 -1
- package/src/core/location/location.spec.js +0 -4
- package/src/core/q/q.js +1 -1
- package/src/core/scope/scope.js +1 -1
- package/src/core/task-tracker-factory.js +2 -2
- package/src/core/timeout/timeout.js +1 -1
- package/src/core/url-utils/url-utils.js +0 -2
- package/src/directive/bind/bind.js +2 -2
- package/src/directive/change/change.js +1 -1
- package/src/directive/cloak/cloak.js +1 -1
- package/src/directive/events/events.js +1 -1
- package/src/directive/form/form.js +2 -2
- package/src/directive/include/include.js +5 -7
- package/src/directive/init/init.js +1 -1
- package/src/directive/list/list.js +1 -1
- package/src/directive/model/model.js +1 -1
- package/src/directive/model-options/model-options.js +56 -421
- package/src/directive/model-options/model-options.md +407 -0
- package/src/directive/model-options/model-options.spec.js +1 -1
- package/src/directive/non-bindable/non-bindable.js +1 -2
- package/src/directive/options/options.js +3 -3
- package/src/directive/style/style.js +1 -1
- package/src/directive/switch/switch.js +2 -2
- package/src/directive/transclude/transclude.js +2 -2
- package/src/index.js +0 -461
- package/src/loader.js +1 -1
- package/src/public.js +1 -1
- package/src/router/template-factory.js +2 -2
- package/src/router/view-scroll.js +1 -1
- package/src/services/browser.js +1 -1
- package/src/services/document.js +2 -2
- package/src/services/http/http.js +11 -7
- package/src/services/log.js +1 -1
- package/src/services/template-request.js +1 -1
- package/src/shared/jqlite/jqlite.js +380 -351
- package/src/shared/jqlite/jqlite.spec.js +73 -82
- package/src/shared/utils.js +1 -1
- package/src/types.js +451 -0
- package/tsconfig.json +1 -1
- package/types/animations/shared.d.ts +7 -2
- package/types/core/compile/compile.d.ts +2 -1
- package/types/core/exception-handler.d.ts +5 -7
- package/types/core/interpolate/interpolate.d.ts +1 -1
- package/types/core/q/q.d.ts +1 -1
- package/types/core/task-tracker-factory.d.ts +5 -5
- package/types/core/timeout/timeout.d.ts +2 -2
- package/types/directive/bind/bind.d.ts +4 -4
- package/types/directive/change/change.d.ts +2 -2
- package/types/directive/cloak/cloak.d.ts +2 -2
- package/types/directive/include/include.d.ts +2 -2
- package/types/directive/init/init.d.ts +2 -2
- package/types/directive/list/list.d.ts +2 -2
- package/types/directive/model/model.d.ts +13 -7
- package/types/directive/model-options/model-options.d.ts +49 -0
- package/types/directive/non-bindable/non-bindable.d.ts +2 -3
- package/types/directive/style/style.d.ts +2 -2
- package/types/directive/switch/switch.d.ts +4 -4
- package/types/index.d.ts +1 -702
- package/types/public.d.ts +2 -2
- package/types/router/template-factory.d.ts +4 -4
- package/types/services/browser.d.ts +3 -3
- package/types/services/document.d.ts +6 -7
- package/types/services/log.d.ts +2 -2
- package/types/services/template-request.d.ts +1 -1
- package/types/shared/jqlite/jqlite.d.ts +91 -21
- package/types/shared/utils.d.ts +2 -2
- package/types/types.d.ts +438 -0
- package/types-back/index.d.ts +1 -83
- package/types-back/jqlite.d.ts +1 -121
- package/types-back/global.d.ts +0 -11
package/types/types.d.ts
ADDED
|
@@ -0,0 +1,438 @@
|
|
|
1
|
+
export type BootstrapConfig = any;
|
|
2
|
+
export type Injectable<T_1> = Function | Array<string | Function>;
|
|
3
|
+
export type ComponentOptions = any;
|
|
4
|
+
export type ControllerConstructor = Function;
|
|
5
|
+
export type OnChangesObject = any;
|
|
6
|
+
export type ChangesObject = any;
|
|
7
|
+
export type Controller = any;
|
|
8
|
+
export type Attributes = {
|
|
9
|
+
[x: string]: any;
|
|
10
|
+
};
|
|
11
|
+
export type TScope = import("./core/scope/scope").Scope;
|
|
12
|
+
export type TElement = import("./shared/jqlite/jqlite").JQLite;
|
|
13
|
+
export type TAttributes = Attributes;
|
|
14
|
+
export type TController = DirectiveController;
|
|
15
|
+
export type DirectiveController = Controller | Controller[] | {
|
|
16
|
+
[key: string]: Controller;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Compile function for an AngularJS directive.
|
|
20
|
+
*/
|
|
21
|
+
export type DirectiveCompileFn = (templateElement: TElement, templateAttributes: TAttributes, transclude: TranscludeFunction) => any;
|
|
22
|
+
/**
|
|
23
|
+
* Link function for an AngularJS directive.
|
|
24
|
+
*/
|
|
25
|
+
export type DirectiveLinkFn = (scope: TScope, instanceElement: TElement, instanceAttributes: TAttributes, controller?: TController, transclude?: TranscludeFunction) => void;
|
|
26
|
+
export type CloneAttachFunction = (clonedElement?: JQLite, scope?: Scope) => any;
|
|
27
|
+
/**
|
|
28
|
+
* This corresponds to $transclude passed to controllers and to the transclude function passed to link functions.
|
|
29
|
+
* https://docs.angularjs.org/api/ng/service/$compile#-controller-
|
|
30
|
+
* http://teropa.info/blog/2015/06/09/transclusion.html
|
|
31
|
+
*/
|
|
32
|
+
export type TranscludeFunction = {
|
|
33
|
+
transcludeWithScope: (arg0: TScope, arg1: CloneAttachFunction, arg2: JQLite | undefined, arg3: string | undefined) => import("./shared/jqlite/jqlite").JQLite;
|
|
34
|
+
transcludeWithoutScope: (arg0: CloneAttachFunction | undefined, arg1: JQLite | undefined, arg2: string | undefined) => import("./shared/jqlite/jqlite").JQLite;
|
|
35
|
+
/**
|
|
36
|
+
* - Returns true if the specified slot contains content (i.e., one or more DOM nodes)
|
|
37
|
+
*/
|
|
38
|
+
isSlotFilled: (arg0: string) => boolean;
|
|
39
|
+
};
|
|
40
|
+
export type transcludeWithScope = (arg0: TScope, arg1: CloneAttachFunction, arg2: JQLite | undefined, arg3: string | undefined) => import("./shared/jqlite/jqlite").JQLite;
|
|
41
|
+
export type transcludeWithoutScope = (arg0: CloneAttachFunction | undefined, arg1: JQLite | undefined, arg2: string | undefined) => import("./shared/jqlite/jqlite").JQLite;
|
|
42
|
+
/**
|
|
43
|
+
* Represents the pre and post linking functions of a directive.
|
|
44
|
+
*/
|
|
45
|
+
export type DirectivePrePost = {
|
|
46
|
+
/**
|
|
47
|
+
* The pre-linking function of the directive.
|
|
48
|
+
*/
|
|
49
|
+
pre?: DirectiveLinkFn | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* The post-linking function of the directive.
|
|
52
|
+
*/
|
|
53
|
+
post?: DirectiveLinkFn | undefined;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Directive definition object.
|
|
57
|
+
*/
|
|
58
|
+
export type Directive = {
|
|
59
|
+
/**
|
|
60
|
+
* Compile function for the directive.
|
|
61
|
+
*/
|
|
62
|
+
compile?: DirectiveCompileFn | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* Controller constructor or name.
|
|
65
|
+
*/
|
|
66
|
+
controller?: string | Injectable<ControllerConstructor> | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Controller alias.
|
|
69
|
+
*/
|
|
70
|
+
controllerAs?: string | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* Bindings to controller.
|
|
73
|
+
*/
|
|
74
|
+
bindToController?: boolean | {
|
|
75
|
+
[boundProperty: string]: string;
|
|
76
|
+
} | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* Link function.
|
|
79
|
+
*/
|
|
80
|
+
link?: DirectiveLinkFn | DirectivePrePost | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* Multi-element directive flag.
|
|
83
|
+
*/
|
|
84
|
+
multiElement?: boolean | undefined;
|
|
85
|
+
/**
|
|
86
|
+
* Skip all directives on element
|
|
87
|
+
*/
|
|
88
|
+
priority?: number | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* Directive priority.
|
|
91
|
+
*/
|
|
92
|
+
terminal?: boolean | undefined;
|
|
93
|
+
/**
|
|
94
|
+
* Deprecated: Replace flag.
|
|
95
|
+
*/
|
|
96
|
+
replace?: boolean | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* Required controllers.
|
|
99
|
+
*/
|
|
100
|
+
require?: string | string[] | {
|
|
101
|
+
[controller: string]: string;
|
|
102
|
+
} | undefined;
|
|
103
|
+
/**
|
|
104
|
+
* Restriction mode.
|
|
105
|
+
*/
|
|
106
|
+
restrict?: string | undefined;
|
|
107
|
+
/**
|
|
108
|
+
* Scope options.
|
|
109
|
+
*/
|
|
110
|
+
scope?: boolean | {
|
|
111
|
+
[boundProperty: string]: string;
|
|
112
|
+
} | undefined;
|
|
113
|
+
/**
|
|
114
|
+
* HTML template.
|
|
115
|
+
*/
|
|
116
|
+
template?: string | ((tElement: TElement, tAttrs: TAttributes) => string) | undefined;
|
|
117
|
+
/**
|
|
118
|
+
* Template namespace.
|
|
119
|
+
*/
|
|
120
|
+
templateNamespace?: string | undefined;
|
|
121
|
+
/**
|
|
122
|
+
* HTML template URL.
|
|
123
|
+
*/
|
|
124
|
+
templateUrl?: string | ((tElement: TElement, tAttrs: TAttributes) => string) | undefined;
|
|
125
|
+
/**
|
|
126
|
+
* Transclusion options.
|
|
127
|
+
*/
|
|
128
|
+
transclude?: boolean | "element" | {
|
|
129
|
+
[slot: string]: string;
|
|
130
|
+
} | undefined;
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* Factory function for creating directives.
|
|
134
|
+
*/
|
|
135
|
+
export type DirectiveFactory = (...args: any[]) => Directive | DirectiveLinkFn;
|
|
136
|
+
export type FilterFunction = Function;
|
|
137
|
+
export type FilterFactory = Function;
|
|
138
|
+
/**
|
|
139
|
+
* Interface for a service provider class.
|
|
140
|
+
*/
|
|
141
|
+
export type ServiceProviderClass = {
|
|
142
|
+
/**
|
|
143
|
+
* - The constructor for the service provider.
|
|
144
|
+
*/
|
|
145
|
+
constructor: Function;
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* Interface for a service provider factory function.
|
|
149
|
+
*/
|
|
150
|
+
export type ServiceProviderFactory = Function;
|
|
151
|
+
/**
|
|
152
|
+
* Interface for a service provider.
|
|
153
|
+
*/
|
|
154
|
+
export type ServiceProvider = {
|
|
155
|
+
/**
|
|
156
|
+
* - The $get property that represents a service instance or a factory function.
|
|
157
|
+
*/
|
|
158
|
+
$get: any;
|
|
159
|
+
};
|
|
160
|
+
export type Module = any;
|
|
161
|
+
export type FormController = {
|
|
162
|
+
/**
|
|
163
|
+
* - True if the form has not been modified.
|
|
164
|
+
*/
|
|
165
|
+
$pristine: boolean;
|
|
166
|
+
/**
|
|
167
|
+
* - True if the form has been modified.
|
|
168
|
+
*/
|
|
169
|
+
$dirty: boolean;
|
|
170
|
+
/**
|
|
171
|
+
* - True if the form is valid.
|
|
172
|
+
*/
|
|
173
|
+
$valid: boolean;
|
|
174
|
+
/**
|
|
175
|
+
* - True if the form is invalid.
|
|
176
|
+
*/
|
|
177
|
+
$invalid: boolean;
|
|
178
|
+
/**
|
|
179
|
+
* - True if the form has been submitted.
|
|
180
|
+
*/
|
|
181
|
+
$submitted: boolean;
|
|
182
|
+
/**
|
|
183
|
+
* - An object containing arrays of controls with validation errors keyed by validation error keys.
|
|
184
|
+
*/
|
|
185
|
+
$error: {
|
|
186
|
+
[x: string]: Array<NgModelController | FormController>;
|
|
187
|
+
};
|
|
188
|
+
/**
|
|
189
|
+
* - The name of the form.
|
|
190
|
+
*/
|
|
191
|
+
$name?: string | undefined;
|
|
192
|
+
/**
|
|
193
|
+
* - An object containing arrays of controls that are pending validation, keyed by validation error keys.
|
|
194
|
+
*/
|
|
195
|
+
$pending?: {
|
|
196
|
+
[x: string]: Array<NgModelController | FormController>;
|
|
197
|
+
} | undefined;
|
|
198
|
+
/**
|
|
199
|
+
* - Adds a control to the form.
|
|
200
|
+
*/
|
|
201
|
+
$addControl: (arg0: NgModelController | FormController) => void;
|
|
202
|
+
/**
|
|
203
|
+
* - Returns an array of all controls in the form.
|
|
204
|
+
*/
|
|
205
|
+
$getControls: () => ReadonlyArray<NgModelController | FormController>;
|
|
206
|
+
/**
|
|
207
|
+
* - Removes a control from the form.
|
|
208
|
+
*/
|
|
209
|
+
$removeControl: (arg0: NgModelController | FormController) => void;
|
|
210
|
+
/**
|
|
211
|
+
* - Sets the validity of a control in the form.
|
|
212
|
+
*/
|
|
213
|
+
$setValidity: (arg0: string, arg1: boolean, arg2: NgModelController | FormController) => void;
|
|
214
|
+
/**
|
|
215
|
+
* - Marks the form as dirty.
|
|
216
|
+
*/
|
|
217
|
+
$setDirty: () => void;
|
|
218
|
+
/**
|
|
219
|
+
* - Marks the form as pristine.
|
|
220
|
+
*/
|
|
221
|
+
$setPristine: () => void;
|
|
222
|
+
/**
|
|
223
|
+
* - Commits the view value of all controls in the form.
|
|
224
|
+
*/
|
|
225
|
+
$commitViewValue: () => void;
|
|
226
|
+
/**
|
|
227
|
+
* - Rolls back the view value of all controls in the form.
|
|
228
|
+
*/
|
|
229
|
+
$rollbackViewValue: () => void;
|
|
230
|
+
/**
|
|
231
|
+
* - Marks the form as submitted.
|
|
232
|
+
*/
|
|
233
|
+
$setSubmitted: () => void;
|
|
234
|
+
/**
|
|
235
|
+
* - Marks the form controls as untouched.
|
|
236
|
+
*/
|
|
237
|
+
$setUntouched: () => void;
|
|
238
|
+
/**
|
|
239
|
+
* - An indexer for additional properties.
|
|
240
|
+
*/
|
|
241
|
+
name?: (arg0: string) => any;
|
|
242
|
+
};
|
|
243
|
+
export type NgModelController = {
|
|
244
|
+
/**
|
|
245
|
+
* - Renders the view value.
|
|
246
|
+
*/
|
|
247
|
+
$render: () => void;
|
|
248
|
+
/**
|
|
249
|
+
* - Sets the validity state.
|
|
250
|
+
*/
|
|
251
|
+
$setValidity: (arg0: string, arg1: boolean) => void;
|
|
252
|
+
/**
|
|
253
|
+
* - Sets the view value.
|
|
254
|
+
*/
|
|
255
|
+
$setViewValue: (arg0: any, arg1: string | undefined) => void;
|
|
256
|
+
/**
|
|
257
|
+
* - Marks the control as pristine.
|
|
258
|
+
*/
|
|
259
|
+
$setPristine: () => void;
|
|
260
|
+
/**
|
|
261
|
+
* - Marks the control as dirty.
|
|
262
|
+
*/
|
|
263
|
+
$setDirty: () => void;
|
|
264
|
+
/**
|
|
265
|
+
* - Validates the control.
|
|
266
|
+
*/
|
|
267
|
+
$validate: () => void;
|
|
268
|
+
/**
|
|
269
|
+
* - Marks the control as touched.
|
|
270
|
+
*/
|
|
271
|
+
$setTouched: () => void;
|
|
272
|
+
/**
|
|
273
|
+
* - Marks the control as untouched.
|
|
274
|
+
*/
|
|
275
|
+
$setUntouched: () => void;
|
|
276
|
+
/**
|
|
277
|
+
* - Rolls back the view value.
|
|
278
|
+
*/
|
|
279
|
+
$rollbackViewValue: () => void;
|
|
280
|
+
/**
|
|
281
|
+
* - Commits the view value.
|
|
282
|
+
*/
|
|
283
|
+
$commitViewValue: () => void;
|
|
284
|
+
/**
|
|
285
|
+
* - Processes the model value.
|
|
286
|
+
*/
|
|
287
|
+
$processModelValue: () => void;
|
|
288
|
+
/**
|
|
289
|
+
* - Checks if the value is empty.
|
|
290
|
+
*/
|
|
291
|
+
$isEmpty: (arg0: any) => boolean;
|
|
292
|
+
/**
|
|
293
|
+
* - Overrides model options.
|
|
294
|
+
*/
|
|
295
|
+
$overrideModelOptions: (arg0: NgModelOptions) => void;
|
|
296
|
+
/**
|
|
297
|
+
* - The current view value.
|
|
298
|
+
*/
|
|
299
|
+
$viewValue: any;
|
|
300
|
+
/**
|
|
301
|
+
* - The current model value.
|
|
302
|
+
*/
|
|
303
|
+
$modelValue: any;
|
|
304
|
+
/**
|
|
305
|
+
* - Array of parsers.
|
|
306
|
+
*/
|
|
307
|
+
$parsers: Array<(arg0: any, arg1: any) => boolean>;
|
|
308
|
+
/**
|
|
309
|
+
* - Array of formatters.
|
|
310
|
+
*/
|
|
311
|
+
$formatters: Array<(arg0: any) => any>;
|
|
312
|
+
/**
|
|
313
|
+
* - Array of view change listeners.
|
|
314
|
+
*/
|
|
315
|
+
$viewChangeListeners: Array<() => any>;
|
|
316
|
+
/**
|
|
317
|
+
* - Validation errors.
|
|
318
|
+
*/
|
|
319
|
+
$error: {
|
|
320
|
+
[x: string]: boolean;
|
|
321
|
+
};
|
|
322
|
+
/**
|
|
323
|
+
* - The name of the control.
|
|
324
|
+
*/
|
|
325
|
+
$name?: string | undefined;
|
|
326
|
+
/**
|
|
327
|
+
* - True if the control has been touched.
|
|
328
|
+
*/
|
|
329
|
+
$touched: boolean;
|
|
330
|
+
/**
|
|
331
|
+
* - True if the control has not been touched.
|
|
332
|
+
*/
|
|
333
|
+
$untouched: boolean;
|
|
334
|
+
/**
|
|
335
|
+
* - Synchronous validators.
|
|
336
|
+
*/
|
|
337
|
+
$validators: {
|
|
338
|
+
[x: string]: (arg0: any, arg1: any) => boolean;
|
|
339
|
+
};
|
|
340
|
+
/**
|
|
341
|
+
* - Asynchronous validators.
|
|
342
|
+
*/
|
|
343
|
+
$asyncValidators: {
|
|
344
|
+
[x: string]: (arg0: any, arg1: any) => Promise<any>;
|
|
345
|
+
};
|
|
346
|
+
/**
|
|
347
|
+
* - Pending validation.
|
|
348
|
+
*/
|
|
349
|
+
$pending?: {
|
|
350
|
+
[x: string]: boolean;
|
|
351
|
+
} | undefined;
|
|
352
|
+
/**
|
|
353
|
+
* - True if the control is pristine.
|
|
354
|
+
*/
|
|
355
|
+
$pristine: boolean;
|
|
356
|
+
/**
|
|
357
|
+
* - True if the control is dirty.
|
|
358
|
+
*/
|
|
359
|
+
$dirty: boolean;
|
|
360
|
+
/**
|
|
361
|
+
* - True if the control is valid.
|
|
362
|
+
*/
|
|
363
|
+
$valid: boolean;
|
|
364
|
+
/**
|
|
365
|
+
* - True if the control is invalid.
|
|
366
|
+
*/
|
|
367
|
+
$invalid: boolean;
|
|
368
|
+
};
|
|
369
|
+
export type NgModelOptions = {
|
|
370
|
+
/**
|
|
371
|
+
* - The event to update on.
|
|
372
|
+
*/
|
|
373
|
+
updateOn?: string | undefined;
|
|
374
|
+
/**
|
|
375
|
+
* - The debounce delay.
|
|
376
|
+
*/
|
|
377
|
+
debounce?: number | {
|
|
378
|
+
[x: string]: number;
|
|
379
|
+
} | undefined;
|
|
380
|
+
/**
|
|
381
|
+
* - Allows invalid models.
|
|
382
|
+
*/
|
|
383
|
+
allowInvalid?: boolean | undefined;
|
|
384
|
+
/**
|
|
385
|
+
* - Indicates if getter/setter syntax is allowed.
|
|
386
|
+
*/
|
|
387
|
+
getterSetter?: boolean | undefined;
|
|
388
|
+
/**
|
|
389
|
+
* - The timezone.
|
|
390
|
+
*/
|
|
391
|
+
timezone?: string | undefined;
|
|
392
|
+
/**
|
|
393
|
+
* - The format for seconds in time and datetime-local inputs.
|
|
394
|
+
*/
|
|
395
|
+
timeSecondsFormat?: string | undefined;
|
|
396
|
+
/**
|
|
397
|
+
* - Indicates if zero seconds should be stripped.
|
|
398
|
+
*/
|
|
399
|
+
timeStripZeroSeconds?: boolean | undefined;
|
|
400
|
+
};
|
|
401
|
+
export type ModelValidators = {
|
|
402
|
+
[x: string]: (arg0: any, arg1: any) => boolean;
|
|
403
|
+
};
|
|
404
|
+
export type AsyncModelValidators = {
|
|
405
|
+
[x: string]: (arg0: any, arg1: any) => Promise<any>;
|
|
406
|
+
};
|
|
407
|
+
export type InjectorService = {
|
|
408
|
+
/**
|
|
409
|
+
* - Annotate a function or an array of inline annotations.
|
|
410
|
+
*/
|
|
411
|
+
annotate: (arg0: Function, arg1: boolean | undefined) => string[];
|
|
412
|
+
/**
|
|
413
|
+
* - Get a service by name.
|
|
414
|
+
*/
|
|
415
|
+
get: (arg0: string, arg1: string | undefined) => any;
|
|
416
|
+
/**
|
|
417
|
+
* - Instantiate a type constructor with optional locals.
|
|
418
|
+
*/
|
|
419
|
+
instantiate: (arg0: Function, arg1: any | null) => any;
|
|
420
|
+
/**
|
|
421
|
+
* - Invoke a function with optional context and locals.
|
|
422
|
+
*/
|
|
423
|
+
invoke: (arg0: Injectable<Function | ((...args: any[]) => any)>, arg1: any | undefined, arg2: any | undefined) => any;
|
|
424
|
+
/**
|
|
425
|
+
* - Add and load new modules to the injector.
|
|
426
|
+
*/
|
|
427
|
+
loadNewModules: (arg0: Array<Module | string | Injectable<(...args: any[]) => void>>) => void;
|
|
428
|
+
/**
|
|
429
|
+
* - A map of all the modules loaded into the injector.
|
|
430
|
+
*/
|
|
431
|
+
modules: {
|
|
432
|
+
[x: string]: Module;
|
|
433
|
+
};
|
|
434
|
+
/**
|
|
435
|
+
* - Indicates if strict dependency injection is enforced.
|
|
436
|
+
*/
|
|
437
|
+
strictDi: boolean;
|
|
438
|
+
};
|
package/types-back/index.d.ts
CHANGED
|
@@ -27,11 +27,6 @@ declare namespace angular {
|
|
|
27
27
|
(...args: any[]): IServiceProvider;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
// All service providers extend this interface
|
|
31
|
-
interface IServiceProvider {
|
|
32
|
-
$get: any;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
30
|
///////////////////////////////////////////////////////////////////////////
|
|
36
31
|
// Module
|
|
37
32
|
// see http://docs.angularjs.org/api/angular.Module
|
|
@@ -141,7 +136,7 @@ declare namespace angular {
|
|
|
141
136
|
/**
|
|
142
137
|
* Run blocks are the closest thing in Angular to the main method. A run block is the code which needs to run to kickstart the application. It is executed after all of the service have been configured and the injector has been created. Run blocks typically contain code which is hard to unit-test, and for this reason should be declared in isolated modules, so that they can be ignored in the unit-tests.
|
|
143
138
|
*/
|
|
144
|
-
run(
|
|
139
|
+
run(initializationFuncti Injectable<Function>): IModule;
|
|
145
140
|
/**
|
|
146
141
|
* Register a service constructor, which will be invoked with new to create the service instance. This is short for registering a service where its provider's $get property is a factory function that returns an instance instantiated by the injector from the service constructor function.
|
|
147
142
|
*
|
|
@@ -259,27 +254,6 @@ declare namespace angular {
|
|
|
259
254
|
$invalid: boolean;
|
|
260
255
|
}
|
|
261
256
|
|
|
262
|
-
// Allows tuning how model updates are done.
|
|
263
|
-
// https://docs.angularjs.org/api/ng/directive/ngModelOptions
|
|
264
|
-
interface INgModelOptions {
|
|
265
|
-
updateOn?: string | undefined;
|
|
266
|
-
debounce?: number | { [key: string]: number } | undefined;
|
|
267
|
-
allowInvalid?: boolean | undefined;
|
|
268
|
-
getterSetter?: boolean | undefined;
|
|
269
|
-
timezone?: string | undefined;
|
|
270
|
-
/**
|
|
271
|
-
* Defines if the time and datetime-local types should show seconds and milliseconds.
|
|
272
|
-
* The option follows the format string of date filter.
|
|
273
|
-
* By default, the options is undefined which is equal to 'ss.sss' (seconds and milliseconds)
|
|
274
|
-
*/
|
|
275
|
-
timeSecondsFormat?: string | undefined;
|
|
276
|
-
/**
|
|
277
|
-
* Defines if the time and datetime-local types should strip the seconds and milliseconds
|
|
278
|
-
* from the formatted value if they are zero. This option is applied after `timeSecondsFormat`
|
|
279
|
-
*/
|
|
280
|
-
timeStripZeroSeconds?: boolean | undefined;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
257
|
interface IModelValidators {
|
|
284
258
|
/**
|
|
285
259
|
* viewValue is any because it can be an object that is called in the view like $viewValue.name:$viewValue.subName
|
|
@@ -2121,62 +2095,6 @@ declare namespace angular {
|
|
|
2121
2095
|
// AUTO module (angular.js)
|
|
2122
2096
|
///////////////////////////////////////////////////////////////////////////
|
|
2123
2097
|
namespace auto {
|
|
2124
|
-
///////////////////////////////////////////////////////////////////////
|
|
2125
|
-
// InjectorService
|
|
2126
|
-
// see http://docs.angularjs.org/api/AUTO.$injector
|
|
2127
|
-
///////////////////////////////////////////////////////////////////////
|
|
2128
|
-
interface IInjectorService {
|
|
2129
|
-
annotate(fn: Function, strictDi?: boolean): string[];
|
|
2130
|
-
annotate(inlineAnnotatedFunction: any[]): string[];
|
|
2131
|
-
get<T>(name: string, caller?: string): T;
|
|
2132
|
-
get(name: "$anchorScroll"): IAnchorScrollService;
|
|
2133
|
-
get(name: "$cacheFactory"): ICacheFactoryService;
|
|
2134
|
-
get(name: "$compile"): ICompileService;
|
|
2135
|
-
get(name: "$controller"): IControllerService;
|
|
2136
|
-
get(name: "$document"): IDocumentService;
|
|
2137
|
-
get(name: "$exceptionHandler"): IExceptionHandlerService;
|
|
2138
|
-
get(name: "$filter"): IFilterService;
|
|
2139
|
-
get(name: "$http"): IHttpService;
|
|
2140
|
-
get(name: "$httpBackend"): IHttpBackendService;
|
|
2141
|
-
get(name: "$httpParamSerializer"): IHttpParamSerializer;
|
|
2142
|
-
get(name: "$httpParamSerializerJQLike"): IHttpParamSerializer;
|
|
2143
|
-
get(name: "$interpolate"): IInterpolateService;
|
|
2144
|
-
get(name: "$interval"): IIntervalService;
|
|
2145
|
-
get(name: "$location"): ILocationService;
|
|
2146
|
-
get(name: "$log"): LogService;
|
|
2147
|
-
get(name: "$parse"): IParseService;
|
|
2148
|
-
get(name: "$q"): IQService;
|
|
2149
|
-
get(name: "$rootElement"): IRootElementService;
|
|
2150
|
-
get(name: "$rootScope"): IRootScopeService;
|
|
2151
|
-
get(name: "$sce"): ISCEService;
|
|
2152
|
-
get(name: "$sceDelegate"): ISCEDelegateService;
|
|
2153
|
-
get(name: "$templateCache"): ITemplateCacheService;
|
|
2154
|
-
get(name: "$templateRequest"): ITemplateRequestService;
|
|
2155
|
-
get(name: "$timeout"): ITimeoutService;
|
|
2156
|
-
get(name: "$window"): IWindowService;
|
|
2157
|
-
get<T>(name: "$xhrFactory"): IXhrFactory<T>;
|
|
2158
|
-
has(name: string): boolean;
|
|
2159
|
-
instantiate<T>(
|
|
2160
|
-
typeConstructor: { new (...args: any[]): T },
|
|
2161
|
-
locals?: any,
|
|
2162
|
-
): T;
|
|
2163
|
-
invoke<T = any>(
|
|
2164
|
-
func: Injectable<Function | ((...args: any[]) => T)>,
|
|
2165
|
-
context?: any,
|
|
2166
|
-
locals?: any,
|
|
2167
|
-
): T;
|
|
2168
|
-
/**
|
|
2169
|
-
* Add the specified modules to the current injector.
|
|
2170
|
-
* This method will add each of the injectables to the injector and execute all of the config and run blocks for each module passed to the method.
|
|
2171
|
-
* @param modules A module, module name or annotated injection function.
|
|
2172
|
-
*/
|
|
2173
|
-
loadNewModules(
|
|
2174
|
-
modules: Array<IModule | string | Injectable<(...args: any[]) => void>>,
|
|
2175
|
-
): void;
|
|
2176
|
-
/** An object map of all the modules that have been loaded into the injector. */
|
|
2177
|
-
modules: { [moduleName: string]: IModule };
|
|
2178
|
-
strictDi: boolean;
|
|
2179
|
-
}
|
|
2180
2098
|
|
|
2181
2099
|
///////////////////////////////////////////////////////////////////////
|
|
2182
2100
|
// ProvideService
|
package/types-back/jqlite.d.ts
CHANGED
|
@@ -105,13 +105,7 @@ interface JQLite {
|
|
|
105
105
|
*/
|
|
106
106
|
detach(selector?: string): this;
|
|
107
107
|
|
|
108
|
-
|
|
109
|
-
* Remove all child nodes of the set of matched elements from the DOM.
|
|
110
|
-
* @see {@link https://api.jquery.com/empty/}
|
|
111
|
-
*/
|
|
112
|
-
empty(): this;
|
|
113
|
-
|
|
114
|
-
/**
|
|
108
|
+
/**
|
|
115
109
|
* Reduce the set of matched elements to the one at the specified index.
|
|
116
110
|
*
|
|
117
111
|
* @param index An integer indicating the 0-based position of the element. OR An integer indicating the position of the element, counting backwards from the last element in the set.
|
|
@@ -149,94 +143,6 @@ interface JQLite {
|
|
|
149
143
|
*/
|
|
150
144
|
html(func: (index: number, oldhtml: string) => string): this;
|
|
151
145
|
|
|
152
|
-
/**
|
|
153
|
-
* Get the immediately following sibling of each element in the set of matched elements. If a selector is provided, it retrieves the next sibling only if it matches that selector.
|
|
154
|
-
*
|
|
155
|
-
* @see {@link https://api.jquery.com/next/}
|
|
156
|
-
*/
|
|
157
|
-
next(): this;
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* Attach an event handler function for one or more events to the selected elements.
|
|
161
|
-
*
|
|
162
|
-
* @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
|
|
163
|
-
* @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. Rest parameter args is for optional parameters passed to jQuery.trigger(). Note that the actual parameters on the event handler function must be marked as optional (? syntax).
|
|
164
|
-
* @see {@link https://api.jquery.com/on/#on-events-selector-data-handler}
|
|
165
|
-
*/
|
|
166
|
-
on(
|
|
167
|
-
events: string,
|
|
168
|
-
handler: (eventObject: JQueryEventObject, ...args: any[]) => any,
|
|
169
|
-
): this;
|
|
170
|
-
/**
|
|
171
|
-
* Attach an event handler function for one or more events to the selected elements.
|
|
172
|
-
*
|
|
173
|
-
* @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
|
|
174
|
-
* @param data Data to be passed to the handler in event.data when an event is triggered.
|
|
175
|
-
* @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.
|
|
176
|
-
* @see {@link https://api.jquery.com/on/#on-events-selector-data-handler}
|
|
177
|
-
*/
|
|
178
|
-
on(
|
|
179
|
-
events: string,
|
|
180
|
-
data: any,
|
|
181
|
-
handler: (eventObject: JQueryEventObject, ...args: any[]) => any,
|
|
182
|
-
): this;
|
|
183
|
-
/**
|
|
184
|
-
* Attach an event handler function for one or more events to the selected elements.
|
|
185
|
-
*
|
|
186
|
-
* @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
|
|
187
|
-
* @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element.
|
|
188
|
-
* @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.
|
|
189
|
-
* @see {@link https://api.jquery.com/on/#on-events-selector-data-handler}
|
|
190
|
-
*/
|
|
191
|
-
on(
|
|
192
|
-
events: string,
|
|
193
|
-
selector: string,
|
|
194
|
-
handler: (eventObject: JQueryEventObject, ...eventData: any[]) => any,
|
|
195
|
-
): this;
|
|
196
|
-
/**
|
|
197
|
-
* Attach an event handler function for one or more events to the selected elements.
|
|
198
|
-
*
|
|
199
|
-
* @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
|
|
200
|
-
* @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element.
|
|
201
|
-
* @param data Data to be passed to the handler in event.data when an event is triggered.
|
|
202
|
-
* @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.
|
|
203
|
-
* @see {@link https://api.jquery.com/on/#on-events-selector-data-handler}
|
|
204
|
-
*/
|
|
205
|
-
on(
|
|
206
|
-
events: string,
|
|
207
|
-
selector: string,
|
|
208
|
-
data: any,
|
|
209
|
-
handler: (eventObject: JQueryEventObject, ...eventData: any[]) => any,
|
|
210
|
-
): this;
|
|
211
|
-
/**
|
|
212
|
-
* Attach an event handler function for one or more events to the selected elements.
|
|
213
|
-
*
|
|
214
|
-
* @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).
|
|
215
|
-
* @param selector A selector string to filter the descendants of the selected elements that will call the handler. If the selector is null or omitted, the handler is always called when it reaches the selected element.
|
|
216
|
-
* @param data Data to be passed to the handler in event.data when an event occurs.
|
|
217
|
-
* @see {@link https://api.jquery.com/on/#on-events-selector-data}
|
|
218
|
-
*/
|
|
219
|
-
on(
|
|
220
|
-
events: {
|
|
221
|
-
[key: string]: (eventObject: JQueryEventObject, ...args: any[]) => any;
|
|
222
|
-
},
|
|
223
|
-
selector?: string,
|
|
224
|
-
data?: any,
|
|
225
|
-
): this;
|
|
226
|
-
/**
|
|
227
|
-
* Attach an event handler function for one or more events to the selected elements.
|
|
228
|
-
*
|
|
229
|
-
* @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).
|
|
230
|
-
* @param data Data to be passed to the handler in event.data when an event occurs.
|
|
231
|
-
* @see {@link https://api.jquery.com/on/#on-events-selector-data}
|
|
232
|
-
*/
|
|
233
|
-
on(
|
|
234
|
-
events: {
|
|
235
|
-
[key: string]: (eventObject: JQueryEventObject, ...args: any[]) => any;
|
|
236
|
-
},
|
|
237
|
-
data?: any,
|
|
238
|
-
): this;
|
|
239
|
-
|
|
240
146
|
/**
|
|
241
147
|
* Remove an event handler.
|
|
242
148
|
* @see {@link https://api.jquery.com/off/#off}
|
|
@@ -451,21 +357,8 @@ interface JQLite {
|
|
|
451
357
|
*/
|
|
452
358
|
wrap(wrappingElement: JQLite | Element | string): this;
|
|
453
359
|
|
|
454
|
-
// Undocumented
|
|
455
360
|
length: number;
|
|
456
361
|
|
|
457
|
-
// TODO: events, how to define?
|
|
458
|
-
// $destroy
|
|
459
|
-
controller(name?: string): any;
|
|
460
|
-
injector(): ng.auto.IInjectorService;
|
|
461
|
-
/**
|
|
462
|
-
* Returns the `$scope` of the element.
|
|
463
|
-
*
|
|
464
|
-
* **IMPORTANT**: Requires `debugInfoEnabled` to be true.
|
|
465
|
-
*
|
|
466
|
-
* See https://docs.angularjs.org/guide/production#disabling-debug-data for more information.
|
|
467
|
-
*/
|
|
468
|
-
scope<T extends ng.IScope>(): T;
|
|
469
362
|
/**
|
|
470
363
|
* Returns the `$scope` of the element.
|
|
471
364
|
*
|
|
@@ -479,16 +372,3 @@ interface JQLite {
|
|
|
479
372
|
inheritedData(obj: { [key: string]: any }): this;
|
|
480
373
|
inheritedData(key?: string): any;
|
|
481
374
|
}
|
|
482
|
-
|
|
483
|
-
interface JQueryStatic {
|
|
484
|
-
(
|
|
485
|
-
element:
|
|
486
|
-
| string
|
|
487
|
-
| Element
|
|
488
|
-
| Document
|
|
489
|
-
| Window
|
|
490
|
-
| JQLite
|
|
491
|
-
| ArrayLike<Element>
|
|
492
|
-
| (() => void),
|
|
493
|
-
): JQLite;
|
|
494
|
-
}
|