@angular-wave/angular.ts 0.3.0 → 0.3.1
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/angular-ts.esm.js +2 -2
- package/dist/angular-ts.umd.js +2 -2
- package/package.json +1 -1
- package/src/animations/animate-cache.js +1 -1
- package/src/animations/animate-css-driver.js +2 -2
- package/src/animations/animate-css.js +1 -1
- package/src/animations/animate-js-driver.js +2 -2
- package/src/animations/animate-js.js +2 -2
- package/src/animations/animate-queue.js +2 -2
- package/src/animations/animation.js +1 -1
- package/src/core/cache/cache-factory.js +18 -2
- package/src/core/compile/compile.js +9 -11
- package/src/core/compile/compile.spec.js +0 -1
- package/src/core/controller/controller.js +1 -1
- package/src/core/exception-handler.js +1 -1
- package/src/core/filter/filter.js +2 -2
- package/src/core/interpolate/interpolate.js +3 -3
- package/src/core/interval/interval-factory.js +1 -1
- package/src/core/interval/interval.js +1 -1
- package/src/core/location/location.js +1 -1
- package/src/core/location/location.spec.js +3 -3
- package/src/core/parser/parse.js +2 -2
- package/src/core/sce/sce.js +2 -2
- package/src/core/scope/scope.js +1 -1
- package/src/core/task-tracker-factory.js +1 -1
- package/src/core/timeout/timeout.js +3 -3
- package/src/directive/if/if.js +5 -5
- package/src/directive/script/script.js +11 -9
- package/src/directive/validators/validators.js +70 -42
- package/src/public.js +56 -60
- package/src/router/params/param.js +1 -2
- package/src/router/path/path-node.js +5 -5
- package/src/router/path/path-utils.js +19 -21
- package/src/router/state/state-builder.js +17 -11
- package/src/router/state/state-queue-manager.js +16 -7
- package/src/router/state/state-registry.js +9 -5
- package/src/router/state/state-service.js +4 -8
- package/src/router/template-factory.js +2 -2
- package/src/router/transition/transition-service.js +1 -1
- package/src/router/transition/transition.js +13 -11
- package/src/router/url/url-matcher.js +2 -2
- package/src/router/url/url-service.js +1 -1
- package/src/router/view/view.js +3 -3
- package/src/services/http/http.js +2 -82
- package/src/services/http/http.spec.js +0 -118
- package/src/services/http/template-request.spec.js +10 -12
- package/src/services/http-backend/http-backend.js +1 -1
- package/src/services/log.js +1 -1
- package/src/services/template-request.js +3 -3
- package/src/shared/common.js +3 -9
- package/src/shared/hof.js +6 -8
- package/src/types.js +0 -14
- package/types/animations/animate-cache.d.ts +2 -2
- package/types/animations/animate-css-driver.d.ts +3 -3
- package/types/animations/animate-css.d.ts +2 -2
- package/types/animations/animate-js-driver.d.ts +3 -3
- package/types/animations/animate-js.d.ts +3 -3
- package/types/animations/animate-queue.d.ts +3 -3
- package/types/animations/animation.d.ts +2 -2
- package/types/core/cache/cache-factory.d.ts +20 -2
- package/types/core/compile/attributes.d.ts +1 -1
- package/types/core/compile/compile.d.ts +11 -11
- package/types/core/controller/controller.d.ts +1 -1
- package/types/core/exception-handler.d.ts +2 -3
- package/types/core/filter/filter.d.ts +3 -3
- package/types/core/interpolate/interpolate.d.ts +6 -6
- package/types/core/interval/interval-factory.d.ts +2 -2
- package/types/core/interval/interval.d.ts +2 -2
- package/types/core/location/location.d.ts +2 -2
- package/types/core/parser/parse.d.ts +4 -4
- package/types/core/sce/sce.d.ts +4 -4
- package/types/core/scope/scope.d.ts +1 -1
- package/types/core/task-tracker-factory.d.ts +1 -1
- package/types/core/timeout/timeout.d.ts +1 -2
- package/types/directive/script/script.d.ts +8 -5
- package/types/directive/validators/validators.d.ts +3 -15
- package/types/router/path/path-node.d.ts +0 -7
- package/types/router/path/path-utils.d.ts +7 -2
- package/types/router/state/state-queue-manager.d.ts +13 -3
- package/types/router/state/state-registry.d.ts +5 -2
- package/types/router/state/state-service.d.ts +1 -1
- package/types/router/template-factory.d.ts +3 -3
- package/types/router/transition/transition-service.d.ts +1 -1
- package/types/router/transition/transition.d.ts +3 -3
- package/types/router/url/url-service.d.ts +3 -3
- package/types/services/http/http.d.ts +4 -48
- package/types/services/http-backend/http-backend.d.ts +2 -2
- package/types/services/log.d.ts +2 -3
- package/types/services/template-request.d.ts +1 -1
- package/types/shared/common.d.ts +0 -5
- package/types/shared/hof.d.ts +0 -1
- package/types/types.d.ts +1 -1
- package/src/directive/csp.md +0 -63
|
@@ -10,22 +10,22 @@
|
|
|
10
10
|
* security bugs!
|
|
11
11
|
* </div>
|
|
12
12
|
*/
|
|
13
|
-
export function
|
|
14
|
-
export class
|
|
13
|
+
export function InterpolateProvider(): void;
|
|
14
|
+
export class InterpolateProvider {
|
|
15
15
|
/**
|
|
16
16
|
* Symbol to denote start of expression in the interpolated string. Defaults to `{{`.
|
|
17
17
|
*
|
|
18
18
|
* @param {string=} value new value to set the starting symbol to.
|
|
19
|
-
* @returns {string
|
|
19
|
+
* @returns {string|InterpolateProvider} Returns the symbol when used as getter and self if used as setter.
|
|
20
20
|
*/
|
|
21
|
-
startSymbol: (value?: string | undefined) => string |
|
|
21
|
+
startSymbol: (value?: string | undefined) => string | InterpolateProvider;
|
|
22
22
|
/**
|
|
23
23
|
* Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.
|
|
24
24
|
*
|
|
25
25
|
* @param {string=} value new value to set the ending symbol to.
|
|
26
|
-
* @returns {string
|
|
26
|
+
* @returns {string|InterpolateProvider} Returns the symbol when used as getter and self if used as setter.
|
|
27
27
|
*/
|
|
28
|
-
endSymbol: (value?: string | undefined) => string |
|
|
28
|
+
endSymbol: (value?: string | undefined) => string | InterpolateProvider;
|
|
29
29
|
$get: (string | (($parse: import("../parser/parse").ParseService, $exceptionHandler: import("../exception-handler").ErrorHandler, $sce: any) => {
|
|
30
30
|
(text: string, mustHaveExpression?: boolean | undefined, trustedContext?: string | undefined, allOrNothing?: boolean | undefined): Function;
|
|
31
31
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function
|
|
2
|
-
export class
|
|
1
|
+
export function $IntervalFactoryProvider(): void;
|
|
2
|
+
export class $IntervalFactoryProvider {
|
|
3
3
|
$get: (string | (($browser: import("../../services/browser").Browser, $q: any, $$q: any, $rootScope: import("../scope/scope").Scope) => (setIntervalFn: any, clearIntervalFn: any) => (fn: any, delay: any, count: any, invokeApply: any, ...args: any[]) => any))[];
|
|
4
4
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export function
|
|
2
|
-
export class
|
|
1
|
+
export function LocationProvider(): void;
|
|
2
|
+
export class LocationProvider {
|
|
3
3
|
/**
|
|
4
4
|
* The default value for the prefix is `'!'`.
|
|
5
5
|
* @param {string=} prefix Prefix for hash part (containing path and search)
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
/**
|
|
25
25
|
* @typedef {function(CompiledExpression|string|function(import('../scope/scope').Scope):any, function(any, import('../scope/scope').Scope, any):any=, boolean=): CompiledExpression} ParseService
|
|
26
26
|
*/
|
|
27
|
-
export function
|
|
28
|
-
export class
|
|
27
|
+
export function ParseProvider(): void;
|
|
28
|
+
export class ParseProvider {
|
|
29
29
|
/**
|
|
30
30
|
* Allows defining the set of characters that are allowed in AngularJS expressions. The function
|
|
31
31
|
* `identifierStart` will get called to know if a given character is a valid character to be the
|
|
@@ -44,9 +44,9 @@ export class $ParseProvider {
|
|
|
44
44
|
* a valid identifier start character.
|
|
45
45
|
* @param {function(any):boolean} [identifierContinue] The function that will decide whether the given character is
|
|
46
46
|
* a valid identifier continue character.
|
|
47
|
-
* @returns {
|
|
47
|
+
* @returns {ParseProvider}
|
|
48
48
|
*/
|
|
49
|
-
setIdentifierFns: (identifierStart?: (arg0: any) => boolean, identifierContinue?: (arg0: any) => boolean) =>
|
|
49
|
+
setIdentifierFns: (identifierStart?: (arg0: any) => boolean, identifierContinue?: (arg0: any) => boolean) => ParseProvider;
|
|
50
50
|
$get: (string | (($filter: (any: any) => any) => ParseService))[];
|
|
51
51
|
}
|
|
52
52
|
export function constantWatchDelegate(scope: any, listener: any, objectEquality: any, parsedExpression: any): any;
|
package/types/core/sce/sce.d.ts
CHANGED
|
@@ -78,8 +78,8 @@ export function adjustMatcher(matcher: any): any;
|
|
|
78
78
|
* from the trusted resource URL lsit. This helps to mitigate the security impact of certain types
|
|
79
79
|
* of issues, like for instance attacker-controlled `ng-includes`.
|
|
80
80
|
*/
|
|
81
|
-
export function
|
|
82
|
-
export class
|
|
81
|
+
export function SceDelegateProvider(): void;
|
|
82
|
+
export class SceDelegateProvider {
|
|
83
83
|
SCE_CONTEXTS: {
|
|
84
84
|
HTML: string;
|
|
85
85
|
CSS: string;
|
|
@@ -139,8 +139,8 @@ export class $SceDelegateProvider {
|
|
|
139
139
|
valueOf: (maybeTrusted: any) => any;
|
|
140
140
|
}))[];
|
|
141
141
|
}
|
|
142
|
-
export function
|
|
143
|
-
export class
|
|
142
|
+
export function SceProvider(): void;
|
|
143
|
+
export class SceProvider {
|
|
144
144
|
/**
|
|
145
145
|
* @param {boolean=} value If provided, then enables/disables SCE application-wide.
|
|
146
146
|
* @return {boolean} True if SCE is enabled, false otherwise.
|
|
@@ -72,7 +72,7 @@ export const $$applyAsyncQueue: Function[];
|
|
|
72
72
|
* The provider also injects runtime services to make them available to all scopes.
|
|
73
73
|
*
|
|
74
74
|
*/
|
|
75
|
-
export class
|
|
75
|
+
export class RootScopeProvider {
|
|
76
76
|
$get: (string | ((exceptionHandler: import("../exception-handler").ErrorHandler, parse: import("../parser/parse").ParseService, browser: import("../../services/browser").Browser) => Scope))[];
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
export class $TimeoutProvider {
|
|
1
|
+
export class TimeoutProvider {
|
|
3
2
|
$get: (string | (($rootScope: import("../scope/scope").Scope, $browser: import("../../services/browser").Browser, $q: any, $$q: any, $exceptionHandler: import("../exception-handler").ErrorHandler) => {
|
|
4
3
|
(fn?: (() => any) | undefined, delay?: number | undefined, invokeApply?: boolean | undefined, ...args: any[]): import("../q/q").QPromise<any>;
|
|
5
4
|
/**
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @param {import('../../core/cache/cache-factory').TemplateCache} $templateCache
|
|
3
|
+
* @returns {import('../../types').Directive}
|
|
4
|
+
*/
|
|
5
|
+
export function scriptDirective($templateCache: import("../../core/cache/cache-factory").TemplateCache): import("../../types").Directive;
|
|
6
|
+
export namespace scriptDirective {
|
|
7
|
+
let $inject: string[];
|
|
8
|
+
}
|
|
@@ -21,11 +21,7 @@
|
|
|
21
21
|
* custom controls, `$isEmpty()` can be overwritten to account for a $viewValue that is not string-based.
|
|
22
22
|
*
|
|
23
23
|
*/
|
|
24
|
-
export const requiredDirective: (string | (($parse:
|
|
25
|
-
restrict: string;
|
|
26
|
-
require: string;
|
|
27
|
-
link(scope: any, elm: any, attr: any, ctrl: any): void;
|
|
28
|
-
}))[];
|
|
24
|
+
export const requiredDirective: (string | (($parse: import("../../core/parser/parse.js").ParseService) => import("../../types.js").Directive))[];
|
|
29
25
|
/**
|
|
30
26
|
* @param {String|RegExp} ngPattern AngularJS expression that must evaluate to a `RegExp` or a `String`
|
|
31
27
|
* parsable into a `RegExp`, or a `RegExp` literal. See above for
|
|
@@ -65,11 +61,7 @@ export const requiredDirective: (string | (($parse: any) => {
|
|
|
65
61
|
* </ol>
|
|
66
62
|
* </div>
|
|
67
63
|
*/
|
|
68
|
-
export const patternDirective: (string | (($parse:
|
|
69
|
-
restrict: string;
|
|
70
|
-
require: string;
|
|
71
|
-
compile: (tElm: any, tAttr: any) => (scope: any, elm: any, attr: any, ctrl: any) => void;
|
|
72
|
-
}))[];
|
|
64
|
+
export const patternDirective: (string | (($parse: import("../../core/parser/parse.js").ParseService) => import("../../types.js").Directive))[];
|
|
73
65
|
/**
|
|
74
66
|
* @param {string} ngMaxlength AngularJS expression that must evaluate to a `Number` or `String`
|
|
75
67
|
* parsable into a `Number`. Used as value for the `maxlength`
|
|
@@ -100,11 +92,7 @@ export const patternDirective: (string | (($parse: any) => {
|
|
|
100
92
|
* </div>
|
|
101
93
|
*
|
|
102
94
|
*/
|
|
103
|
-
export const maxlengthDirective: (string | (($parse:
|
|
104
|
-
restrict: string;
|
|
105
|
-
require: string;
|
|
106
|
-
link(scope: any, elm: any, attr: any, ctrl: any): void;
|
|
107
|
-
}))[];
|
|
95
|
+
export const maxlengthDirective: (string | (($parse: import("../../core/parser/parse.js").ParseService) => import("../../types.js").Directive))[];
|
|
108
96
|
/**
|
|
109
97
|
*
|
|
110
98
|
* @param {string} ngMinlength AngularJS expression that must evaluate to a `Number` or `String`
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
/** Given a PathNode[], create an TargetState
|
|
2
|
+
* @param {import("../state/state-registry.js").StateRegistryProvider} registry
|
|
3
|
+
* @param {Array<PathNode>} path
|
|
4
|
+
* @returns
|
|
5
|
+
*/
|
|
6
|
+
export function makeTargetState(registry: import("../state/state-registry.js").StateRegistryProvider, path: Array<PathNode>): TargetState;
|
|
1
7
|
/**
|
|
2
8
|
* This class contains functions which convert TargetStates, Nodes and paths from one type to another.
|
|
3
9
|
*/
|
|
4
10
|
export class PathUtils {
|
|
5
|
-
/** Given a PathNode[], create an TargetState */
|
|
6
|
-
static makeTargetState(registry: any, path: any): TargetState;
|
|
7
11
|
static buildPath(targetState: any): any;
|
|
8
12
|
/** Given a fromPath: PathNode[] and a TargetState, builds a toPath: PathNode[] */
|
|
9
13
|
static buildToPath(fromPath: any, targetState: any): any;
|
|
@@ -76,4 +80,5 @@ export class PathUtils {
|
|
|
76
80
|
/** Gets the raw parameter values from a path */
|
|
77
81
|
static paramValues(path: any): any;
|
|
78
82
|
}
|
|
83
|
+
import { PathNode } from "./path-node";
|
|
79
84
|
import { TargetState } from "../state/target-state";
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
export class StateQueueManager {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* @param {import("./state-registry.js").StateRegistryProvider} stateRegistry
|
|
4
|
+
* @param {*} urlServiceRules
|
|
5
|
+
* @param {*} states
|
|
6
|
+
* @param {*} builder
|
|
7
|
+
* @param {*} listeners
|
|
8
|
+
*/
|
|
9
|
+
constructor(stateRegistry: import("./state-registry.js").StateRegistryProvider, urlServiceRules: any, states: any, builder: any, listeners: any);
|
|
10
|
+
stateRegistry: import("./state-registry.js").StateRegistryProvider;
|
|
4
11
|
urlServiceRules: any;
|
|
5
12
|
states: any;
|
|
6
13
|
builder: any;
|
|
7
14
|
listeners: any;
|
|
8
|
-
|
|
15
|
+
/**
|
|
16
|
+
* @type {Array<StateObject>}
|
|
17
|
+
*/
|
|
18
|
+
queue: Array<StateObject>;
|
|
9
19
|
register(stateDecl: any): StateObject;
|
|
10
20
|
flush(): any;
|
|
11
21
|
attachRoute(state: any): void;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* This API is found at `$stateRegistry` ([[UIRouter.stateRegistry]])
|
|
5
5
|
*/
|
|
6
|
-
export class
|
|
6
|
+
export class StateRegistryProvider {
|
|
7
7
|
static $inject: string[];
|
|
8
8
|
constructor(urlService: any, stateService: any, globals: any, viewService: any);
|
|
9
9
|
states: {};
|
|
@@ -25,7 +25,10 @@ export class StateRegistry {
|
|
|
25
25
|
* @internalapi
|
|
26
26
|
*/
|
|
27
27
|
getStateHookBuilder(hookName: any): (stateObject: any) => (trans: any, state: any) => any;
|
|
28
|
-
|
|
28
|
+
/**
|
|
29
|
+
* @private
|
|
30
|
+
*/
|
|
31
|
+
private registerRoot;
|
|
29
32
|
_root: import("./state-object").StateObject;
|
|
30
33
|
/**
|
|
31
34
|
* Listen for a State Registry events
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* Service which manages loading of templates from a ViewConfig.
|
|
8
8
|
*/
|
|
9
|
-
export class
|
|
9
|
+
export class TemplateFactoryProvider {
|
|
10
10
|
/** @type {boolean} */
|
|
11
11
|
_useHttp: boolean;
|
|
12
|
-
$get: (string | (($http: any, $templateCache:
|
|
12
|
+
$get: (string | (($http: any, $templateCache: import("../core/cache/cache-factory").TemplateCache, $templateRequest: any, $q: any, $injector: import("../core/di/internal-injector").InjectorService) => this))[];
|
|
13
13
|
$templateRequest: any;
|
|
14
14
|
$http: any;
|
|
15
|
-
$templateCache:
|
|
15
|
+
$templateCache: import("../core/cache/cache-factory").TemplateCache;
|
|
16
16
|
$q: any;
|
|
17
17
|
$injector: import("../core/di/internal-injector").InjectorService;
|
|
18
18
|
/**
|
|
@@ -20,7 +20,7 @@ export namespace defaultTransOpts {
|
|
|
20
20
|
*
|
|
21
21
|
* This API is located at `router.transitionService` ([[UIRouter.transitionService]])
|
|
22
22
|
*/
|
|
23
|
-
export class
|
|
23
|
+
export class TransitionProvider {
|
|
24
24
|
static $inject: string[];
|
|
25
25
|
/**
|
|
26
26
|
* @param {import('../globals').UIRouterGlobals} globals
|
|
@@ -17,12 +17,12 @@ export class Transition {
|
|
|
17
17
|
* @param fromPath The path of [[PathNode]]s from which the transition is leaving. The last node in the `fromPath`
|
|
18
18
|
* encapsulates the "from state".
|
|
19
19
|
* @param targetState The target state and parameters being transitioned to (also, the transition options)
|
|
20
|
-
* @param {import('../transition/transition-service').
|
|
20
|
+
* @param {import('../transition/transition-service').TransitionProvider} transitionService The [[TransitionService]] instance
|
|
21
21
|
* @internal
|
|
22
22
|
*/
|
|
23
|
-
constructor(fromPath: any, targetState: any, transitionService: import("../transition/transition-service").
|
|
23
|
+
constructor(fromPath: any, targetState: any, transitionService: import("../transition/transition-service").TransitionProvider, globals: any);
|
|
24
24
|
globals: any;
|
|
25
|
-
transitionService: import("../transition/transition-service").
|
|
25
|
+
transitionService: import("../transition/transition-service").TransitionProvider;
|
|
26
26
|
_deferred: import("../../core/q/q").Deferred<any>;
|
|
27
27
|
/**
|
|
28
28
|
* This promise is resolved or rejected based on the outcome of the Transition.
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
export class UrlService {
|
|
5
5
|
static $inject: string[];
|
|
6
6
|
/**
|
|
7
|
-
* @param {import("../../core/location/location")
|
|
7
|
+
* @param {import("../../core/location/location").LocationProvider} $locationProvider
|
|
8
8
|
*/
|
|
9
|
-
constructor($locationProvider: import("../../core/location/location")
|
|
9
|
+
constructor($locationProvider: import("../../core/location/location").LocationProvider, stateService: any, globals: any, urlConfigProvider: any);
|
|
10
10
|
stateService: any;
|
|
11
|
-
$locationProvider: import("../../core/location/location")
|
|
11
|
+
$locationProvider: import("../../core/location/location").LocationProvider;
|
|
12
12
|
$location: import("../../core/location/location").Location;
|
|
13
13
|
$browser: import("../../services/browser").Browser;
|
|
14
14
|
/** @type {boolean} */
|
|
@@ -9,60 +9,16 @@
|
|
|
9
9
|
*
|
|
10
10
|
* Note that serializer will sort the request parameters alphabetically.
|
|
11
11
|
*/
|
|
12
|
-
export function
|
|
13
|
-
export class
|
|
14
|
-
$get: () => (params: any) => string;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
* Alternative {@link $http `$http`} params serializer that follows
|
|
19
|
-
* jQuery's [`param()`](http://api.jquery.com/jquery.param/) method logic.
|
|
20
|
-
* The serializer will also sort the params alphabetically.
|
|
21
|
-
*
|
|
22
|
-
* To use it for serializing `$http` request parameters, set it as the `paramSerializer` property:
|
|
23
|
-
*
|
|
24
|
-
* ```js
|
|
25
|
-
* $http({
|
|
26
|
-
* url: myUrl,
|
|
27
|
-
* method: 'GET',
|
|
28
|
-
* params: myParams,
|
|
29
|
-
* paramSerializer: '$httpParamSerializerJQLike'
|
|
30
|
-
* });
|
|
31
|
-
* ```
|
|
32
|
-
*
|
|
33
|
-
* It is also possible to set it as the default `paramSerializer` in the
|
|
34
|
-
* {@link $httpProvider#defaults `$httpProvider`}.
|
|
35
|
-
*
|
|
36
|
-
* Additionally, you can inject the serializer and use it explicitly, for example to serialize
|
|
37
|
-
* form data for submission:
|
|
38
|
-
*
|
|
39
|
-
* ```js
|
|
40
|
-
* .controller(function($http, $httpParamSerializerJQLike) {
|
|
41
|
-
* //...
|
|
42
|
-
*
|
|
43
|
-
* $http({
|
|
44
|
-
* url: myUrl,
|
|
45
|
-
* method: 'POST',
|
|
46
|
-
* data: $httpParamSerializerJQLike(myData),
|
|
47
|
-
* headers: {
|
|
48
|
-
* 'Content-Type': 'application/x-www-form-urlencoded'
|
|
49
|
-
* }
|
|
50
|
-
* });
|
|
51
|
-
*
|
|
52
|
-
* });
|
|
53
|
-
* ```
|
|
54
|
-
*
|
|
55
|
-
*/
|
|
56
|
-
export function $HttpParamSerializerJQLikeProvider(): void;
|
|
57
|
-
export class $HttpParamSerializerJQLikeProvider {
|
|
12
|
+
export function HttpParamSerializerProvider(): void;
|
|
13
|
+
export class HttpParamSerializerProvider {
|
|
58
14
|
$get: () => (params: any) => string;
|
|
59
15
|
}
|
|
60
16
|
export function defaultHttpResponseTransform(data: any, headers: any): any;
|
|
61
17
|
/**
|
|
62
18
|
* Use `$httpProvider` to change the default behavior of the {@link ng.$http $http} service.
|
|
63
19
|
*/
|
|
64
|
-
export function
|
|
65
|
-
export class
|
|
20
|
+
export function HttpProvider(): void;
|
|
21
|
+
export class HttpProvider {
|
|
66
22
|
defaults: {
|
|
67
23
|
transformResponse: (typeof defaultHttpResponseTransform)[];
|
|
68
24
|
transformRequest: ((d: any) => any)[];
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* {@link ng.$http $http}.
|
|
7
7
|
*
|
|
8
8
|
*/
|
|
9
|
-
export function
|
|
10
|
-
export class
|
|
9
|
+
export function HttpBackendProvider(): void;
|
|
10
|
+
export class HttpBackendProvider {
|
|
11
11
|
$get: (string | (($browser: import("../browser").Browser) => (method: any, url: any, post: any, callback: any, headers: any, timeout: any, withCredentials: any, responseType: any, eventHandlers: any, uploadEventHandlers: any) => void))[];
|
|
12
12
|
}
|
|
13
13
|
/**
|
package/types/services/log.d.ts
CHANGED
|
@@ -44,8 +44,8 @@ export let LogService: LogService;
|
|
|
44
44
|
* @type {LogProvider}
|
|
45
45
|
* Use the `$logProvider` to configure how the application logs messages
|
|
46
46
|
*/
|
|
47
|
-
export class
|
|
48
|
-
debug:
|
|
47
|
+
export class LogProvider {
|
|
48
|
+
debug: any;
|
|
49
49
|
/**
|
|
50
50
|
* @param {boolean=} flag enable or disable debug level messages
|
|
51
51
|
* @returns {*} current value if used as getter or itself (chaining) if used as setter
|
|
@@ -56,4 +56,3 @@ export class $LogProvider {
|
|
|
56
56
|
$get(): LogService;
|
|
57
57
|
}
|
|
58
58
|
export type LogCall = (...args: any[]) => void;
|
|
59
|
-
export type LogProvider = import("../types").ServiceProvider;
|
|
@@ -40,7 +40,7 @@ export class TemplateRequestProvider {
|
|
|
40
40
|
*
|
|
41
41
|
* @property {number} totalPendingRequests total amount of pending template requests being downloaded.
|
|
42
42
|
*/
|
|
43
|
-
$get: (string | (($exceptionHandler: import("../core/exception-handler").ErrorHandler, $templateCache:
|
|
43
|
+
$get: (string | (($exceptionHandler: import("../core/exception-handler").ErrorHandler, $templateCache: import("../core/cache/cache-factory").TemplateCache, $http: any, $q: any, $sce: any) => {
|
|
44
44
|
(tpl: any, ignoreRequestError: any): any;
|
|
45
45
|
totalPendingRequests: number;
|
|
46
46
|
}))[];
|
package/types/shared/common.d.ts
CHANGED
|
@@ -110,10 +110,6 @@ export function pick(obj: any, propNames: any): {};
|
|
|
110
110
|
* @param propNames an Array of strings, which are the blacklisted property names
|
|
111
111
|
*/
|
|
112
112
|
export function omit(obj: any, propNames: any): {};
|
|
113
|
-
/**
|
|
114
|
-
* Maps an array, or object to a property (by name)
|
|
115
|
-
*/
|
|
116
|
-
export function pluck(collection: any, propName: any): any;
|
|
117
113
|
/** Filters an Array or an Object's properties based on a predicate */
|
|
118
114
|
export function filter(collection: any, callback: any): {};
|
|
119
115
|
/** Finds an object from an array, or a property of an object, that matches a predicate */
|
|
@@ -176,7 +172,6 @@ export const removeFrom: any;
|
|
|
176
172
|
/** pushes a values to an array and returns the value */
|
|
177
173
|
export const pushTo: any;
|
|
178
174
|
export function deregAll(functions: any): any;
|
|
179
|
-
export function mergeR(memo: any, item: any): any;
|
|
180
175
|
export function allTrueR(memo: any, elem: any): any;
|
|
181
176
|
export function anyTrueR(memo: any, elem: any): any;
|
|
182
177
|
export function unnestR(memo: any, elem: any): any;
|
package/types/shared/hof.d.ts
CHANGED
|
@@ -100,7 +100,6 @@ export function or(fn1: any, fn2: any): (...args: any[]) => any;
|
|
|
100
100
|
* @returns {function(any): *}
|
|
101
101
|
*/
|
|
102
102
|
export function pattern(struct: any): (arg0: any) => any;
|
|
103
|
-
export function prop(name: any): (obj: any) => any;
|
|
104
103
|
/**
|
|
105
104
|
* Given a property name and a value, returns a function that returns a boolean based on whether
|
|
106
105
|
* the passed object has a property that matches the value
|
package/types/types.d.ts
CHANGED
package/src/directive/csp.md
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/\*\*
|
|
2
|
-
|
|
3
|
-
- @ngdoc directive
|
|
4
|
-
- @name ngCsp
|
|
5
|
-
-
|
|
6
|
-
- @restrict A
|
|
7
|
-
- @element ANY
|
|
8
|
-
- @description
|
|
9
|
-
-
|
|
10
|
-
- AngularJS has some features that can conflict with certain restrictions that are applied when using
|
|
11
|
-
- [CSP (Content Security Policy)](https://developer.mozilla.org/en/Security/CSP) rules.
|
|
12
|
-
-
|
|
13
|
-
- If you intend to implement CSP with these rules then you must tell AngularJS not to use these
|
|
14
|
-
- features.
|
|
15
|
-
-
|
|
16
|
-
- This is necessary when developing things like Google Chrome Extensions or Universal Windows Apps.
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
- The following default rules in CSP affect AngularJS:
|
|
20
|
-
-
|
|
21
|
-
- - The use of inline resources, such as inline `<script>` and `<style>` elements, are forbidden.
|
|
22
|
-
- This prevents apps from injecting custom styles directly into the document. AngularJS makes use of
|
|
23
|
-
- this to include some CSS rules (e.g. {@link ngCloak} and {@link ngHide}). To make these
|
|
24
|
-
- directives work when a CSP rule is blocking inline styles, you must link to the `angular-csp.css`
|
|
25
|
-
- in your HTML manually. (This CSP rule can be disabled with the CSP keyword `unsafe-inline`, but
|
|
26
|
-
- it is generally not recommended as it would weaken the protections offered by CSP.)
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
- This error is harmless but annoying. To prevent the error from showing up, put the `ngCsp`
|
|
30
|
-
- directive on an element of the HTML document that appears before the `<script>` tag that loads
|
|
31
|
-
- the `angular.js` file.
|
|
32
|
-
-
|
|
33
|
-
- _Note: This directive is only available in the `ng-csp` and `data-ng-csp` attribute form._
|
|
34
|
-
-
|
|
35
|
-
- You can specify which of the CSP related AngularJS features should be deactivated by providing
|
|
36
|
-
- a value for the `ng-csp` attribute. The options are as follows:
|
|
37
|
-
-
|
|
38
|
-
- - no-inline-style: this stops AngularJS from injecting CSS styles into the DOM
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
- You can use these values in the following combinations:
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
- - No declaration means that AngularJS will assume that you can do inline styles, but it will do
|
|
45
|
-
- a runtime check for unsafe-eval. E.g. `<body>`. This is backwardly compatible with previous
|
|
46
|
-
- versions of AngularJS.
|
|
47
|
-
-
|
|
48
|
-
- - A simple `ng-csp` (or `data-ng-csp`) attribute will tell AngularJS to deactivate both inline
|
|
49
|
-
- styles and unsafe eval. E.g. `<body ng-csp>`. This is backwardly compatible with previous
|
|
50
|
-
- versions of AngularJS.
|
|
51
|
-
-
|
|
52
|
-
- - Specifying only `no-inline-style` tells AngularJS that we must not inject styles, but that we can
|
|
53
|
-
- run eval - no automatic check for unsafe eval will occur. E.g. `<body ng-csp="no-inline-style">`
|
|
54
|
-
-
|
|
55
|
-
- - Specifying both `no-unsafe-eval` and `no-inline-style` tells AngularJS that we must not inject
|
|
56
|
-
- styles nor use eval, which is the same as an empty: ng-csp.
|
|
57
|
-
- E.g.`<body ng-csp="no-inline-style;no-unsafe-eval">`
|
|
58
|
-
|
|
59
|
-
// `ngCsp` is not implemented as a proper directive any more, because we need it be processed while
|
|
60
|
-
// we bootstrap the app (before `$parse` is instantiated). For this reason, we just have the `csp()`
|
|
61
|
-
// fn that looks for the `ng-csp` attribute anywhere in the current doc.
|
|
62
|
-
// TODO MOVE CSP to PARSE CONFIG as this should not even be a directive
|
|
63
|
-
\*/
|