@angular-wave/angular.ts 0.0.38 → 0.0.39
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/Makefile +6 -5
- package/dist/angular-ts.esm.js +2 -1
- package/dist/angular-ts.umd.js +1 -1
- package/package.json +2 -4
- package/rollup.config.js +5 -1
- package/src/core/scope/scope.js +4 -7
- package/src/index.js +307 -1
- package/src/loader.js +13 -6
- package/src/public.js +7 -2
- package/src/src.test.js +10 -0
- package/tsconfig.json +1 -1
- package/tsconfig.types.json +11 -0
- package/types/animations/animate-cache.d.ts +7 -7
- package/types/animations/animate-children-directive.d.ts +3 -6
- package/types/animations/animate-swap.d.ts +7 -16
- package/types/animations/animation.d.ts +2 -11
- package/types/animations/raf-scheduler.d.ts +3 -3
- package/types/animations/shared.d.ts +8 -23
- package/types/core/{animate-css.d.ts → animate/animate-css.d.ts} +2 -8
- package/types/core/{cache.d.ts → cache/cache.d.ts} +5 -5
- package/types/core/compile/compile.d.ts +173 -0
- package/types/core/controller/controller.d.ts +32 -0
- package/types/core/exception-handler.d.ts +1 -1
- package/types/core/filter/filter.d.ts +9 -0
- package/types/core/{interpolate.d.ts → interpolate/interpolate.d.ts} +23 -39
- package/types/core/interval/interval-factory.d.ts +4 -0
- package/types/core/{interval.d.ts → interval/interval.d.ts} +1 -1
- package/types/core/location/location.d.ts +209 -0
- package/types/core/pubsub/pubsub.d.ts +156 -0
- package/types/core/q/q.d.ts +31 -0
- package/types/core/sanitize/sanitize-uri.d.ts +53 -0
- package/types/core/{sce.d.ts → sce/sce.d.ts} +80 -86
- package/types/core/scope/scope.d.ts +727 -0
- package/types/core/task-tracker-factory.d.ts +29 -29
- package/types/core/timeout/timeout.d.ts +20 -0
- package/types/core/{urlUtils.d.ts → url-utils/url-utils.d.ts} +2 -7
- package/types/directive/{bind.d.ts → bind/bind.d.ts} +4 -10
- package/types/directive/{class.d.ts → class/class.d.ts} +12 -21
- package/types/directive/controller/controller.d.ts +6 -0
- package/types/directive/events/events.d.ts +5 -0
- package/types/directive/form/form.d.ts +200 -0
- package/types/directive/if/if.d.ts +8 -0
- package/types/directive/include/include.d.ts +14 -0
- package/types/directive/{input.d.ts → input/input.d.ts} +20 -69
- package/types/directive/{model.d.ts → model/model.d.ts} +256 -279
- package/types/directive/options/options.d.ts +9 -0
- package/types/directive/ref/ref.d.ts +5 -0
- package/types/directive/repeat/repeat.d.ts +8 -0
- package/types/directive/{script.d.ts → script/script.d.ts} +5 -8
- package/types/directive/{show-hide.d.ts → show-hide/show-hide.d.ts} +10 -16
- package/types/directive/switch/switch.d.ts +17 -0
- package/types/directive/transclude/transclude.d.ts +4 -0
- package/types/directive/{validators.d.ts → validators/validators.d.ts} +20 -35
- package/types/filters/filters.d.ts +10 -16
- package/types/filters/order-by.d.ts +2 -4
- package/types/index.d.ts +117 -0
- package/types/injector.d.ts +12 -0
- package/types/public.d.ts +5 -0
- package/types/router/common/coreservices.d.ts +2 -2
- package/types/router/common/glob.d.ts +9 -9
- package/types/router/common/queue.d.ts +13 -13
- package/types/router/common/trace.d.ts +43 -43
- package/types/router/directives/view-directive.d.ts +13 -32
- package/types/router/globals.d.ts +20 -20
- package/types/router/hooks/lazy-load.d.ts +2 -11
- package/types/router/hooks/redirect-to.d.ts +1 -4
- package/types/router/hooks/url.d.ts +1 -5
- package/types/router/hooks/views.d.ts +1 -4
- package/types/router/params/param-factory.d.ts +5 -5
- package/types/router/params/param-type.d.ts +35 -35
- package/types/router/params/param-types.d.ts +11 -11
- package/types/router/params/param.d.ts +38 -38
- package/types/router/params/state-params.d.ts +10 -10
- package/types/router/path/path-node.d.ts +34 -34
- package/types/router/path/path-utils.d.ts +73 -77
- package/types/router/resolve/resolvable.d.ts +32 -32
- package/types/router/resolve/resolve-context.d.ts +84 -84
- package/types/router/services.d.ts +4 -9
- package/types/router/state/state-builder.d.ts +27 -27
- package/types/router/state/state-matcher.d.ts +5 -5
- package/types/router/state/state-object.d.ts +58 -58
- package/types/router/state/state-queue-manager.d.ts +10 -16
- package/types/router/state/state-registry.d.ts +100 -107
- package/types/router/state/state-service.d.ts +411 -411
- package/types/router/state/target-state.d.ts +64 -69
- package/types/router/state/views.d.ts +31 -37
- package/types/router/state-filters.d.ts +7 -7
- package/types/router/state-provider.d.ts +105 -105
- package/types/router/template-factory.d.ts +83 -112
- package/types/router/transition/hook-builder.d.ts +25 -25
- package/types/router/transition/hook-registry.d.ts +68 -83
- package/types/router/transition/interface.d.ts +7 -7
- package/types/router/transition/reject-factory.d.ts +34 -34
- package/types/router/transition/transition-event-type.d.ts +9 -18
- package/types/router/transition/transition-hook.d.ts +77 -82
- package/types/router/transition/transition-service.d.ts +82 -99
- package/types/router/transition/transition.d.ts +369 -377
- package/types/router/url/url-config.d.ts +84 -84
- package/types/router/url/url-matcher.d.ts +115 -119
- package/types/router/url/url-rule.d.ts +114 -124
- package/types/router/url/url-rules.d.ts +217 -217
- package/types/router/url/url-service.d.ts +264 -269
- package/types/router/view/view.d.ts +114 -117
- package/types/router/view-scroll.d.ts +2 -2
- package/types/services/anchor-scroll.d.ts +2 -8
- package/types/services/browser.d.ts +122 -130
- package/types/services/cache-factory.d.ts +25 -25
- package/types/services/cookie-reader.d.ts +2 -2
- package/types/services/document.d.ts +2 -2
- package/types/services/http/http.d.ts +145 -0
- package/types/services/{http-backend.d.ts → http-backend/http-backend.d.ts} +3 -35
- package/types/services/log.d.ts +49 -49
- package/types/services/template-request.d.ts +44 -53
- package/types/shared/common.d.ts +4 -19
- package/types/{constants.d.ts → shared/constants.d.ts} +6 -6
- package/types/shared/hof.d.ts +1 -1
- package/types/{jqLite.d.ts → shared/jqlite/jqlite.d.ts} +11 -11
- package/types/shared/test-utils.d.ts +11 -0
- package/types/shared/utils.d.ts +7 -24
- package/types-back/global.d.ts +3 -1
- package/types-back/index.d.ts +2 -221
- package/types/core/compile.d.ts +0 -206
- package/types/core/controller.d.ts +0 -42
- package/types/core/filter.d.ts +0 -9
- package/types/core/interval-factory.d.ts +0 -21
- package/types/core/location.d.ts +0 -234
- package/types/core/pubsub.d.ts +0 -164
- package/types/core/q.d.ts +0 -33
- package/types/core/root-scope.d.ts +0 -754
- package/types/core/sanitize-uri.d.ts +0 -57
- package/types/core/timeout.d.ts +0 -31
- package/types/directive/controller.d.ts +0 -6
- package/types/directive/events.d.ts +0 -12
- package/types/directive/form.d.ts +0 -230
- package/types/directive/if.d.ts +0 -17
- package/types/directive/include.d.ts +0 -33
- package/types/directive/options.d.ts +0 -16
- package/types/directive/ref.d.ts +0 -11
- package/types/directive/repeat.d.ts +0 -23
- package/types/directive/switch.d.ts +0 -23
- package/types/directive/transclude.d.ts +0 -15
- package/types/services/http.d.ts +0 -157
- /package/types/directive/{attrs.d.ts → attrs/attrs.d.ts} +0 -0
- /package/types/directive/{change.d.ts → change/change.d.ts} +0 -0
- /package/types/directive/{cloak.d.ts → cloak/cloak.d.ts} +0 -0
- /package/types/directive/{init.d.ts → init/init.d.ts} +0 -0
- /package/types/directive/{list.d.ts → list/list.d.ts} +0 -0
- /package/types/directive/{non-bindable.d.ts → non-bindable/non-bindable.d.ts} +0 -0
- /package/types/directive/{style.d.ts → style/style.d.ts} +0 -0
- /package/types/exts/{aria.d.ts → aria/aria.d.ts} +0 -0
- /package/types/exts/{messages.d.ts → messages/messages.d.ts} +0 -0
package/types-back/index.d.ts
CHANGED
|
@@ -9,13 +9,6 @@ declare global {
|
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
export as namespace angular;
|
|
13
|
-
export as namespace ng;
|
|
14
|
-
|
|
15
|
-
// Support AMD require
|
|
16
|
-
export = angular;
|
|
17
|
-
|
|
18
|
-
import ng = angular;
|
|
19
12
|
import { Obj } from "./router";
|
|
20
13
|
|
|
21
14
|
///////////////////////////////////////////////////////////////////////////////
|
|
@@ -39,11 +32,6 @@ declare namespace angular {
|
|
|
39
32
|
$get: any;
|
|
40
33
|
}
|
|
41
34
|
|
|
42
|
-
interface IAngularBootstrapConfig {
|
|
43
|
-
debugInfoEnabled: boolean;
|
|
44
|
-
strictDi?: boolean | undefined;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
35
|
///////////////////////////////////////////////////////////////////////////
|
|
48
36
|
// Module
|
|
49
37
|
// see http://docs.angularjs.org/api/angular.Module
|
|
@@ -185,53 +173,6 @@ declare namespace angular {
|
|
|
185
173
|
requires: string[];
|
|
186
174
|
}
|
|
187
175
|
|
|
188
|
-
///////////////////////////////////////////////////////////////////////////
|
|
189
|
-
// Attributes
|
|
190
|
-
// see http://docs.angularjs.org/api/ng/type/$compile.directive.Attributes
|
|
191
|
-
///////////////////////////////////////////////////////////////////////////
|
|
192
|
-
interface IAttributes {
|
|
193
|
-
/**
|
|
194
|
-
* this is necessary to be able to access the scoped attributes. it's not very elegant
|
|
195
|
-
* because you have to use attrs['foo'] instead of attrs.foo but I don't know of a better way
|
|
196
|
-
* this should really be limited to return string but it creates this problem: http://stackoverflow.com/q/17201854/165656
|
|
197
|
-
*/
|
|
198
|
-
[name: string]: any;
|
|
199
|
-
|
|
200
|
-
/**
|
|
201
|
-
* Converts an attribute name (e.g. dash/colon/underscore-delimited string, optionally prefixed with x- or data-) to its normalized, camelCase form.
|
|
202
|
-
*
|
|
203
|
-
* Also there is special case for Moz prefix starting with upper case letter.
|
|
204
|
-
*
|
|
205
|
-
* For further information check out the guide on @see https://docs.angularjs.org/guide/directive#matching-directives
|
|
206
|
-
*/
|
|
207
|
-
$normalize(name: string): string;
|
|
208
|
-
|
|
209
|
-
/**
|
|
210
|
-
* Adds and removes the appropriate CSS class values to the element based on the difference between
|
|
211
|
-
* the new and old CSS class values (specified as newClasses and oldClasses).
|
|
212
|
-
*/
|
|
213
|
-
$updateClass(newClasses: string, oldClasses: string): void;
|
|
214
|
-
|
|
215
|
-
/**
|
|
216
|
-
* Set DOM element attribute value.
|
|
217
|
-
*/
|
|
218
|
-
$set(key: string, value: any): void;
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* Observes an interpolated attribute.
|
|
222
|
-
* The observer function will be invoked once during the next $digest
|
|
223
|
-
* following compilation. The observer is then invoked whenever the
|
|
224
|
-
* interpolated value changes.
|
|
225
|
-
*/
|
|
226
|
-
$observe<T>(name: string, fn: (value?: T) => any): Function;
|
|
227
|
-
|
|
228
|
-
/**
|
|
229
|
-
* A map of DOM element attribute names to the normalized name. This is needed
|
|
230
|
-
* to do reverse lookup from normalized name back to actual name.
|
|
231
|
-
*/
|
|
232
|
-
$attr: Object;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
176
|
/**
|
|
236
177
|
* form.FormController - type in module ng
|
|
237
178
|
* see https://docs.angularjs.org/api/ng/type/form.FormController
|
|
@@ -2139,59 +2080,6 @@ declare namespace angular {
|
|
|
2139
2080
|
require?: { [controller: string]: string } | undefined;
|
|
2140
2081
|
}
|
|
2141
2082
|
|
|
2142
|
-
type IControllerConstructor =
|
|
2143
|
-
| (new (...args: any[]) => IController) // Instead of classes, plain functions are often used as controller constructors, especially in examples.
|
|
2144
|
-
| ((...args: any[]) => void | IController);
|
|
2145
|
-
|
|
2146
|
-
/**
|
|
2147
|
-
* Directive controllers have a well-defined lifecycle. Each controller can implement "lifecycle hooks". These are methods that
|
|
2148
|
-
* will be called by Angular at certain points in the life cycle of the directive.
|
|
2149
|
-
* https://docs.angularjs.org/api/ng/service/$compile#life-cycle-hooks
|
|
2150
|
-
* https://docs.angularjs.org/guide/component
|
|
2151
|
-
*/
|
|
2152
|
-
interface IController {
|
|
2153
|
-
/**
|
|
2154
|
-
* Called on each controller after all the controllers on an element have been constructed and had their bindings
|
|
2155
|
-
* initialized (and before the pre & post linking functions for the directives on this element). This is a good
|
|
2156
|
-
* place to put initialization code for your controller.
|
|
2157
|
-
*/
|
|
2158
|
-
$onInit?(): void;
|
|
2159
|
-
/**
|
|
2160
|
-
* Called on each turn of the digest cycle. Provides an opportunity to detect and act on changes.
|
|
2161
|
-
* Any actions that you wish to take in response to the changes that you detect must be invoked from this hook;
|
|
2162
|
-
* implementing this has no effect on when `$onChanges` is called. For example, this hook could be useful if you wish
|
|
2163
|
-
* to perform a deep equality check, or to check a `Dat`e object, changes to which would not be detected by Angular's
|
|
2164
|
-
* change detector and thus not trigger `$onChanges`. This hook is invoked with no arguments; if detecting changes,
|
|
2165
|
-
* you must store the previous value(s) for comparison to the current values.
|
|
2166
|
-
*/
|
|
2167
|
-
$doCheck?(): void;
|
|
2168
|
-
/**
|
|
2169
|
-
* Called whenever one-way bindings are updated. The onChangesObj is a hash whose keys are the names of the bound
|
|
2170
|
-
* properties that have changed, and the values are an {@link IChangesObject} object of the form
|
|
2171
|
-
* { currentValue, previousValue, isFirstChange() }. Use this hook to trigger updates within a component such as
|
|
2172
|
-
* cloning the bound value to prevent accidental mutation of the outer value.
|
|
2173
|
-
*/
|
|
2174
|
-
$onChanges?(onChangesObj: IOnChangesObject): void;
|
|
2175
|
-
/**
|
|
2176
|
-
* Called on a controller when its containing scope is destroyed. Use this hook for releasing external resources,
|
|
2177
|
-
* watches and event handlers.
|
|
2178
|
-
*/
|
|
2179
|
-
$onDestroy?(): void;
|
|
2180
|
-
/**
|
|
2181
|
-
* Called after this controller's element and its children have been linked. Similar to the post-link function this
|
|
2182
|
-
* hook can be used to set up DOM event handlers and do direct DOM manipulation. Note that child elements that contain
|
|
2183
|
-
* templateUrl directives will not have been compiled and linked since they are waiting for their template to load
|
|
2184
|
-
* asynchronously and their own compilation and linking has been suspended until that occurs. This hook can be considered
|
|
2185
|
-
* analogous to the ngAfterViewInit and ngAfterContentInit hooks in Angular 2. Since the compilation process is rather
|
|
2186
|
-
* different in Angular 1 there is no direct mapping and care should be taken when upgrading.
|
|
2187
|
-
*/
|
|
2188
|
-
$postLink?(): void;
|
|
2189
|
-
|
|
2190
|
-
// IController implementations frequently do not implement any of its methods.
|
|
2191
|
-
// A string indexer indicates to TypeScript not to issue a weak type error in this case.
|
|
2192
|
-
[s: string]: any;
|
|
2193
|
-
}
|
|
2194
|
-
|
|
2195
2083
|
/**
|
|
2196
2084
|
* Interface for the $onInit lifecycle hook
|
|
2197
2085
|
* https://docs.angularjs.org/api/ng/service/$compile#life-cycle-hooks
|
|
@@ -2263,26 +2151,12 @@ declare namespace angular {
|
|
|
2263
2151
|
$postLink(): void;
|
|
2264
2152
|
}
|
|
2265
2153
|
|
|
2266
|
-
interface IOnChangesObject {
|
|
2267
|
-
[property: string]: IChangesObject<any>;
|
|
2268
|
-
}
|
|
2269
|
-
|
|
2270
|
-
interface IChangesObject<T> {
|
|
2271
|
-
currentValue: T;
|
|
2272
|
-
previousValue: T;
|
|
2273
|
-
isFirstChange(): boolean;
|
|
2274
|
-
}
|
|
2275
|
-
|
|
2276
2154
|
///////////////////////////////////////////////////////////////////////////
|
|
2277
2155
|
// Directive
|
|
2278
2156
|
// see http://docs.angularjs.org/api/ng/provider/$compileProvider#directive
|
|
2279
2157
|
// and http://docs.angularjs.org/guide/directive
|
|
2280
2158
|
///////////////////////////////////////////////////////////////////////////
|
|
2281
2159
|
|
|
2282
|
-
type IDirectiveController =
|
|
2283
|
-
| IController
|
|
2284
|
-
| IController[]
|
|
2285
|
-
| { [key: string]: IController };
|
|
2286
2160
|
|
|
2287
2161
|
interface IDirectiveFactory<
|
|
2288
2162
|
TScope extends Scope = Scope,
|
|
@@ -2297,102 +2171,9 @@ declare namespace angular {
|
|
|
2297
2171
|
| IDirectiveLinkFn<TScope, TElement, TAttributes, TController>;
|
|
2298
2172
|
}
|
|
2299
2173
|
|
|
2300
|
-
|
|
2301
|
-
TScope extends Scope = Scope,
|
|
2302
|
-
TElement extends JQLite = JQLite,
|
|
2303
|
-
TAttributes extends IAttributes = IAttributes,
|
|
2304
|
-
TController extends IDirectiveController = IController,
|
|
2305
|
-
> {
|
|
2306
|
-
(
|
|
2307
|
-
scope: TScope,
|
|
2308
|
-
instanceElement: TElement,
|
|
2309
|
-
instanceAttributes: TAttributes,
|
|
2310
|
-
controller?: TController,
|
|
2311
|
-
transclude?: ITranscludeFunction,
|
|
2312
|
-
): void;
|
|
2313
|
-
}
|
|
2174
|
+
|
|
2314
2175
|
|
|
2315
|
-
|
|
2316
|
-
TScope extends Scope = Scope,
|
|
2317
|
-
TElement extends JQLite = JQLite,
|
|
2318
|
-
TAttributes extends IAttributes = IAttributes,
|
|
2319
|
-
TController extends IDirectiveController = IController,
|
|
2320
|
-
> {
|
|
2321
|
-
pre?:
|
|
2322
|
-
| IDirectiveLinkFn<TScope, TElement, TAttributes, TController>
|
|
2323
|
-
| undefined;
|
|
2324
|
-
post?:
|
|
2325
|
-
| IDirectiveLinkFn<TScope, TElement, TAttributes, TController>
|
|
2326
|
-
| undefined;
|
|
2327
|
-
}
|
|
2328
|
-
|
|
2329
|
-
interface IDirectiveCompileFn<
|
|
2330
|
-
TScope extends Scope = Scope,
|
|
2331
|
-
TElement extends JQLite = JQLite,
|
|
2332
|
-
TAttributes extends IAttributes = IAttributes,
|
|
2333
|
-
TController extends IDirectiveController = IController,
|
|
2334
|
-
> {
|
|
2335
|
-
(
|
|
2336
|
-
templateElement: TElement,
|
|
2337
|
-
templateAttributes: TAttributes,
|
|
2338
|
-
/**
|
|
2339
|
-
* @deprecated
|
|
2340
|
-
* Note: The transclude function that is passed to the compile function is deprecated,
|
|
2341
|
-
* as it e.g. does not know about the right outer scope. Please use the transclude function
|
|
2342
|
-
* that is passed to the link function instead.
|
|
2343
|
-
*/
|
|
2344
|
-
transclude: ITranscludeFunction,
|
|
2345
|
-
):
|
|
2346
|
-
| void
|
|
2347
|
-
| IDirectiveLinkFn<TScope, TElement, TAttributes, TController>
|
|
2348
|
-
| IDirectivePrePost<TScope, TElement, TAttributes, TController>;
|
|
2349
|
-
}
|
|
2350
|
-
|
|
2351
|
-
interface IDirective<
|
|
2352
|
-
TScope extends Scope = Scope,
|
|
2353
|
-
TElement extends JQLite = JQLite,
|
|
2354
|
-
TAttributes extends IAttributes = IAttributes,
|
|
2355
|
-
TController extends IDirectiveController = IController,
|
|
2356
|
-
> {
|
|
2357
|
-
compile?:
|
|
2358
|
-
| IDirectiveCompileFn<TScope, TElement, TAttributes, TController>
|
|
2359
|
-
| undefined;
|
|
2360
|
-
controller?: string | Injectable<IControllerConstructor> | undefined;
|
|
2361
|
-
controllerAs?: string | undefined;
|
|
2362
|
-
/**
|
|
2363
|
-
* Deprecation warning: although bindings for non-ES6 class controllers are currently bound to this before
|
|
2364
|
-
* the controller constructor is called, this use is now deprecated. Please place initialization code that
|
|
2365
|
-
* relies upon bindings inside a $onInit method on the controller, instead.
|
|
2366
|
-
*/
|
|
2367
|
-
bindToController?:
|
|
2368
|
-
| boolean
|
|
2369
|
-
| { [boundProperty: string]: string }
|
|
2370
|
-
| undefined;
|
|
2371
|
-
link?:
|
|
2372
|
-
| IDirectiveLinkFn<TScope, TElement, TAttributes, TController>
|
|
2373
|
-
| IDirectivePrePost<TScope, TElement, TAttributes, TController>
|
|
2374
|
-
| undefined;
|
|
2375
|
-
multiElement?: boolean | undefined;
|
|
2376
|
-
priority?: number | undefined;
|
|
2377
|
-
/**
|
|
2378
|
-
* @deprecated
|
|
2379
|
-
*/
|
|
2380
|
-
replace?: boolean | undefined;
|
|
2381
|
-
require?: string | string[] | { [controller: string]: string } | undefined;
|
|
2382
|
-
restrict?: string | undefined;
|
|
2383
|
-
scope?: boolean | { [boundProperty: string]: string } | undefined;
|
|
2384
|
-
template?:
|
|
2385
|
-
| string
|
|
2386
|
-
| ((tElement: TElement, tAttrs: TAttributes) => string)
|
|
2387
|
-
| undefined;
|
|
2388
|
-
templateNamespace?: string | undefined;
|
|
2389
|
-
templateUrl?:
|
|
2390
|
-
| string
|
|
2391
|
-
| ((tElement: TElement, tAttrs: TAttributes) => string)
|
|
2392
|
-
| undefined;
|
|
2393
|
-
terminal?: boolean | undefined;
|
|
2394
|
-
transclude?: boolean | "element" | { [slot: string]: string } | undefined;
|
|
2395
|
-
}
|
|
2176
|
+
|
|
2396
2177
|
|
|
2397
2178
|
/**
|
|
2398
2179
|
* These interfaces are kept for compatibility with older versions of these type definitions.
|
package/types/core/compile.d.ts
DELETED
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
export function $CompileProvider(
|
|
2
|
-
$provide: any,
|
|
3
|
-
$$sanitizeUriProvider: any,
|
|
4
|
-
): void;
|
|
5
|
-
export class $CompileProvider {
|
|
6
|
-
constructor($provide: any, $$sanitizeUriProvider: any);
|
|
7
|
-
/**
|
|
8
|
-
* @ngdoc method
|
|
9
|
-
* @name $compileProvider#directive
|
|
10
|
-
* @kind function
|
|
11
|
-
*
|
|
12
|
-
* @description
|
|
13
|
-
* Register a new directive with the compiler.
|
|
14
|
-
*
|
|
15
|
-
* @param {string|Object} name Name of the directive in camel-case (i.e. `ngBind` which will match
|
|
16
|
-
* as `ng-bind`), or an object map of directives where the keys are the names and the values
|
|
17
|
-
* are the factories.
|
|
18
|
-
* @param {Function|Array} directiveFactory An injectable directive factory function. See the
|
|
19
|
-
* {@link guide/directive directive guide} and the {@link $compile compile API} for more info.
|
|
20
|
-
* @returns {ng.ICompileProvider} Self for chaining.
|
|
21
|
-
*/
|
|
22
|
-
directive: (
|
|
23
|
-
name: string | any,
|
|
24
|
-
directiveFactory: Function | any[],
|
|
25
|
-
) => ng.ICompileProvider;
|
|
26
|
-
/**
|
|
27
|
-
* @ngdoc method
|
|
28
|
-
* @name $compileProvider#component
|
|
29
|
-
* @module ng
|
|
30
|
-
* @param {string|Object} name Name of the component in camelCase (i.e. `myComp` which will match `<my-comp>`),
|
|
31
|
-
* or an object map of components where the keys are the names and the values are the component definition objects.
|
|
32
|
-
* @param {Object} options Component definition object (a simplified
|
|
33
|
-
* {@link ng.$compile#directive-definition-object directive definition object}),
|
|
34
|
-
* with the following properties (all optional):
|
|
35
|
-
*
|
|
36
|
-
* - `controller` – `{(string|function()=}` – controller constructor function that should be
|
|
37
|
-
* associated with newly created scope or the name of a {@link ng.$compile#-controller-
|
|
38
|
-
* registered controller} if passed as a string. An empty `noop` function by default.
|
|
39
|
-
* - `controllerAs` – `{string=}` – identifier name for to reference the controller in the component's scope.
|
|
40
|
-
* If present, the controller will be published to scope under the `controllerAs` name.
|
|
41
|
-
* If not present, this will default to be `$ctrl`.
|
|
42
|
-
* - `template` – `{string=|function()=}` – html template as a string or a function that
|
|
43
|
-
* returns an html template as a string which should be used as the contents of this component.
|
|
44
|
-
* Empty string by default.
|
|
45
|
-
*
|
|
46
|
-
* If `template` is a function, then it is {@link auto.$injector#invoke injected} with
|
|
47
|
-
* the following locals:
|
|
48
|
-
*
|
|
49
|
-
* - `$element` - Current element
|
|
50
|
-
* - `$attrs` - Current attributes object for the element
|
|
51
|
-
*
|
|
52
|
-
* - `templateUrl` – `{string=|function()=}` – path or function that returns a path to an html
|
|
53
|
-
* template that should be used as the contents of this component.
|
|
54
|
-
*
|
|
55
|
-
* If `templateUrl` is a function, then it is {@link auto.$injector#invoke injected} with
|
|
56
|
-
* the following locals:
|
|
57
|
-
*
|
|
58
|
-
* - `$element` - Current element
|
|
59
|
-
* - `$attrs` - Current attributes object for the element
|
|
60
|
-
*
|
|
61
|
-
* - `bindings` – `{object=}` – defines bindings between DOM attributes and component properties.
|
|
62
|
-
* Component properties are always bound to the component controller and not to the scope.
|
|
63
|
-
* See {@link ng.$compile#-bindtocontroller- `bindToController`}.
|
|
64
|
-
* - `transclude` – `{boolean=}` – whether {@link $compile#transclusion content transclusion} is enabled.
|
|
65
|
-
* Disabled by default.
|
|
66
|
-
* - `require` - `{Object<string, string>=}` - requires the controllers of other directives and binds them to
|
|
67
|
-
* this component's controller. The object keys specify the property names under which the required
|
|
68
|
-
* controllers (object values) will be bound. See {@link ng.$compile#-require- `require`}.
|
|
69
|
-
* - `$...` – additional properties to attach to the directive factory function and the controller
|
|
70
|
-
* constructor function. (This is used by the component router to annotate)
|
|
71
|
-
*
|
|
72
|
-
* @returns {ng.$compileProvider} the compile provider itself, for chaining of function calls.
|
|
73
|
-
* @description
|
|
74
|
-
* Register a **component definition** with the compiler. This is a shorthand for registering a special
|
|
75
|
-
* type of directive, which represents a self-contained UI component in your application. Such components
|
|
76
|
-
* are always isolated (i.e. `scope: {}`) and are always restricted to elements (i.e. `restrict: 'E'`).
|
|
77
|
-
*
|
|
78
|
-
* Component definitions are very simple and do not require as much configuration as defining general
|
|
79
|
-
* directives. Component definitions usually consist only of a template and a controller backing it.
|
|
80
|
-
*
|
|
81
|
-
* In order to make the definition easier, components enforce best practices like use of `controllerAs`,
|
|
82
|
-
* `bindToController`. They always have **isolate scope** and are restricted to elements.
|
|
83
|
-
*
|
|
84
|
-
* Here are a few examples of how you would usually define components:
|
|
85
|
-
*
|
|
86
|
-
* ```js
|
|
87
|
-
* let myMod = angular.module(...);
|
|
88
|
-
* myMod.component('myComp', {
|
|
89
|
-
* template: '<div>My name is {{$ctrl.name}}</div>',
|
|
90
|
-
* controller: function() {
|
|
91
|
-
* this.name = 'shahar';
|
|
92
|
-
* }
|
|
93
|
-
* });
|
|
94
|
-
*
|
|
95
|
-
* myMod.component('myComp', {
|
|
96
|
-
* template: '<div>My name is {{$ctrl.name}}</div>',
|
|
97
|
-
* bindings: {name: '@'}
|
|
98
|
-
* });
|
|
99
|
-
*
|
|
100
|
-
* myMod.component('myComp', {
|
|
101
|
-
* templateUrl: 'views/my-comp.html',
|
|
102
|
-
* controller: 'MyCtrl',
|
|
103
|
-
* controllerAs: 'ctrl',
|
|
104
|
-
* bindings: {name: '@'}
|
|
105
|
-
* });
|
|
106
|
-
*
|
|
107
|
-
* ```
|
|
108
|
-
* For more examples, and an in-depth guide, see the {@link guide/component component guide}.
|
|
109
|
-
*
|
|
110
|
-
* <br />
|
|
111
|
-
* See also {@link ng.$compileProvider#directive $compileProvider.directive()}.
|
|
112
|
-
*/
|
|
113
|
-
component: (name: string | any, options: any) => ng.$compileProvider;
|
|
114
|
-
/**
|
|
115
|
-
* @ngdoc method
|
|
116
|
-
* @name $compileProvider#aHrefSanitizationTrustedUrlList
|
|
117
|
-
* @kind function
|
|
118
|
-
*
|
|
119
|
-
* @description
|
|
120
|
-
* Retrieves or overrides the default regular expression that is used for determining trusted safe
|
|
121
|
-
* urls during a[href] sanitization.
|
|
122
|
-
*
|
|
123
|
-
* The sanitization is a security measure aimed at preventing XSS attacks via html links.
|
|
124
|
-
*
|
|
125
|
-
* Any url about to be assigned to a[href] via data-binding is first normalized and turned into
|
|
126
|
-
* an absolute url. Afterwards, the url is matched against the `aHrefSanitizationTrustedUrlList`
|
|
127
|
-
* regular expression. If a match is found, the original url is written into the dom. Otherwise,
|
|
128
|
-
* the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.
|
|
129
|
-
*
|
|
130
|
-
* @param {RegExp=} regexp New regexp to trust urls with.
|
|
131
|
-
* @returns {RegExp|ng.ICompileProvider} Current RegExp if called without value or self for
|
|
132
|
-
* chaining otherwise.
|
|
133
|
-
*/
|
|
134
|
-
aHrefSanitizationTrustedUrlList: (
|
|
135
|
-
regexp?: RegExp | undefined,
|
|
136
|
-
) => RegExp | ng.ICompileProvider;
|
|
137
|
-
/**
|
|
138
|
-
* @ngdoc method
|
|
139
|
-
* @name $compileProvider#imgSrcSanitizationTrustedUrlList
|
|
140
|
-
* @kind function
|
|
141
|
-
*
|
|
142
|
-
* @description
|
|
143
|
-
* Retrieves or overrides the default regular expression that is used for determining trusted safe
|
|
144
|
-
* urls during img[src] sanitization.
|
|
145
|
-
*
|
|
146
|
-
* The sanitization is a security measure aimed at prevent XSS attacks via html links.
|
|
147
|
-
*
|
|
148
|
-
* Any url about to be assigned to img[src] via data-binding is first normalized and turned into
|
|
149
|
-
* an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationTrustedUrlList`
|
|
150
|
-
* regular expression. If a match is found, the original url is written into the dom. Otherwise,
|
|
151
|
-
* the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.
|
|
152
|
-
*
|
|
153
|
-
* @param {RegExp=} regexp New regexp to trust urls with.
|
|
154
|
-
* @returns {RegExp|ng.ICompileProvider} Current RegExp if called without value or self for
|
|
155
|
-
* chaining otherwise.
|
|
156
|
-
*/
|
|
157
|
-
imgSrcSanitizationTrustedUrlList: (
|
|
158
|
-
regexp?: RegExp | undefined,
|
|
159
|
-
) => RegExp | ng.ICompileProvider;
|
|
160
|
-
debugInfoEnabled: (enabled: any) => boolean | this;
|
|
161
|
-
strictComponentBindingsEnabled: (enabled: any) => boolean | this;
|
|
162
|
-
/**
|
|
163
|
-
* @ngdoc method
|
|
164
|
-
* @name $compileProvider#addPropertySecurityContext
|
|
165
|
-
* @description
|
|
166
|
-
*
|
|
167
|
-
* Defines the security context for DOM properties bound by ng-prop-*.
|
|
168
|
-
*
|
|
169
|
-
* @param {string} elementName The element name or '*' to match any element.
|
|
170
|
-
* @param {string} propertyName The DOM property name.
|
|
171
|
-
* @param {string} ctx The {@link $sce} security context in which this value is safe for use, e.g. `$sce.URL`
|
|
172
|
-
* @returns {object} `this` for chaining
|
|
173
|
-
*/
|
|
174
|
-
addPropertySecurityContext: (
|
|
175
|
-
elementName: string,
|
|
176
|
-
propertyName: string,
|
|
177
|
-
ctx: string,
|
|
178
|
-
) => object;
|
|
179
|
-
$get: (
|
|
180
|
-
| string
|
|
181
|
-
| ((
|
|
182
|
-
$injector: any,
|
|
183
|
-
$interpolate: any,
|
|
184
|
-
$exceptionHandler: any,
|
|
185
|
-
$templateRequest: any,
|
|
186
|
-
$parse: any,
|
|
187
|
-
$controller: any,
|
|
188
|
-
$rootScope: any,
|
|
189
|
-
$sce: any,
|
|
190
|
-
$animate: any,
|
|
191
|
-
) => (
|
|
192
|
-
$compileNodes: string | NodeList,
|
|
193
|
-
transcludeFn: any,
|
|
194
|
-
maxPriority: any,
|
|
195
|
-
ignoreDirective: any,
|
|
196
|
-
previousCompileContext: any,
|
|
197
|
-
) => (scope: any, cloneConnectFn: any, options: any) => any)
|
|
198
|
-
)[];
|
|
199
|
-
}
|
|
200
|
-
export namespace $CompileProvider {
|
|
201
|
-
let $inject: string[];
|
|
202
|
-
}
|
|
203
|
-
/**
|
|
204
|
-
* Function that aggregates all linking fns for a compilation root (nodeList)
|
|
205
|
-
*/
|
|
206
|
-
export type CompositeLinkFn = Function;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
export function identifierForController(controller: any, ident: any): any;
|
|
2
|
-
/**
|
|
3
|
-
* @ngdoc provider
|
|
4
|
-
* @name $controllerProvider
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* @description
|
|
8
|
-
* The {@link ng.$controller $controller service} is used by AngularJS to create new
|
|
9
|
-
* controllers.
|
|
10
|
-
*
|
|
11
|
-
* This provider allows controller registration via the
|
|
12
|
-
* {@link ng.$controllerProvider#register register} method.
|
|
13
|
-
*/
|
|
14
|
-
export function $ControllerProvider(): void;
|
|
15
|
-
export class $ControllerProvider {
|
|
16
|
-
/**
|
|
17
|
-
* @ngdoc method
|
|
18
|
-
* @name $controllerProvider#has
|
|
19
|
-
* @param {string} name Controller name to check.
|
|
20
|
-
*/
|
|
21
|
-
has: (name: string) => any;
|
|
22
|
-
/**
|
|
23
|
-
* @ngdoc method
|
|
24
|
-
* @name $controllerProvider#register
|
|
25
|
-
* @param {string|Object} name Controller name, or an object map of controllers where the keys are
|
|
26
|
-
* the names and the values are the constructors.
|
|
27
|
-
* @param {Function|Array} constructor Controller constructor fn (optionally decorated with DI
|
|
28
|
-
* annotations in the array notation).
|
|
29
|
-
*/
|
|
30
|
-
register: (name: string | any, constructor: Function | any[]) => void;
|
|
31
|
-
$get: (
|
|
32
|
-
| string
|
|
33
|
-
| ((
|
|
34
|
-
$injector: any,
|
|
35
|
-
) => (
|
|
36
|
-
expression: Function | string,
|
|
37
|
-
locals: any,
|
|
38
|
-
later: any,
|
|
39
|
-
ident: any,
|
|
40
|
-
) => any)
|
|
41
|
-
)[];
|
|
42
|
-
}
|
package/types/core/filter.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export function $FilterProvider($provide: any): void;
|
|
2
|
-
export class $FilterProvider {
|
|
3
|
-
constructor($provide: any);
|
|
4
|
-
register: (name: any, factory: any) => any;
|
|
5
|
-
$get: (string | (($injector: any) => (name: any) => any))[];
|
|
6
|
-
}
|
|
7
|
-
export namespace $FilterProvider {
|
|
8
|
-
let $inject: string[];
|
|
9
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export function $$IntervalFactoryProvider(): void;
|
|
2
|
-
export class $$IntervalFactoryProvider {
|
|
3
|
-
$get: (
|
|
4
|
-
| string
|
|
5
|
-
| ((
|
|
6
|
-
$browser: any,
|
|
7
|
-
$q: any,
|
|
8
|
-
$$q: any,
|
|
9
|
-
$rootScope: any,
|
|
10
|
-
) => (
|
|
11
|
-
setIntervalFn: any,
|
|
12
|
-
clearIntervalFn: any,
|
|
13
|
-
) => (
|
|
14
|
-
fn: any,
|
|
15
|
-
delay: any,
|
|
16
|
-
count: any,
|
|
17
|
-
invokeApply: any,
|
|
18
|
-
...args: any[]
|
|
19
|
-
) => any)
|
|
20
|
-
)[];
|
|
21
|
-
}
|