@angular-wave/angular.ts 0.3.0 → 0.4.0
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/.github/workflows/ci.yml +57 -0
- package/README.md +1 -1
- 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/attributes.js +1 -1
- package/src/core/compile/compile.js +10 -12
- package/src/core/compile/compile.spec.js +0 -1
- package/src/core/compile/compile.test.js +1 -1
- package/src/core/controller/controller.js +1 -1
- package/src/core/exception-handler.js +2 -6
- package/src/core/filter/filter.js +2 -2
- package/src/core/interpolate/interpolate.js +3 -3
- package/src/core/interval/interval-factory.js +7 -23
- package/src/core/interval/interval.js +1 -1
- package/src/core/interval/interval.spec.js +0 -25
- 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/q/q.js +0 -27
- package/src/core/q/q.spec.js +0 -44
- package/src/core/sce/sce.js +2 -2
- package/src/core/scope/scope.js +35 -41
- package/src/core/scope/scope.spec.js +71 -13
- package/src/core/task-tracker-factory.js +1 -1
- package/src/core/timeout/timeout.js +4 -8
- package/src/directive/attrs/attrs.js +1 -1
- package/src/directive/if/if.js +5 -5
- package/src/directive/input/input.spec.js +0 -1
- package/src/directive/observe/observe.html +18 -0
- package/src/directive/observe/observe.js +37 -0
- package/src/directive/observe/observe.spec.js +92 -0
- package/src/directive/observe/observe.test.js +9 -0
- package/src/directive/observe/test.html +197 -0
- package/src/directive/script/script.js +11 -9
- package/src/directive/validators/validators.js +70 -42
- package/src/public.js +63 -66
- 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 +7 -11
- 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/router/view-scroll.js +13 -8
- 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 -7
- 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 +3 -3
- package/types/core/compile/compile.d.ts +12 -12
- package/types/core/controller/controller.d.ts +1 -1
- package/types/core/exception-handler.d.ts +3 -4
- 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 +3 -3
- 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/q/q.d.ts +0 -5
- package/types/core/sce/sce.d.ts +4 -4
- package/types/core/scope/scope.d.ts +12 -3
- package/types/core/task-tracker-factory.d.ts +1 -1
- package/types/core/timeout/timeout.d.ts +3 -4
- package/types/directive/observe/observe.d.ts +4 -0
- 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 +2 -2
- 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/router/view-scroll.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 -8
- 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/.github/workflows/lint.yml +0 -19
- package/.github/workflows/playwright.yml +0 -27
- package/.github/workflows/types.yml +0 -19
- package/src/directive/csp.md +0 -63
|
@@ -1065,124 +1065,6 @@ describe("$http", function () {
|
|
|
1065
1065
|
expect(res.config.method).toBe("GET");
|
|
1066
1066
|
});
|
|
1067
1067
|
|
|
1068
|
-
describe("JQ-like param serialization", function () {
|
|
1069
|
-
it("is possible", async function () {
|
|
1070
|
-
await $http({
|
|
1071
|
-
url: "/mock/hello",
|
|
1072
|
-
params: {
|
|
1073
|
-
a: 42,
|
|
1074
|
-
b: 43,
|
|
1075
|
-
},
|
|
1076
|
-
paramSerializer: "$httpParamSerializerJQLike",
|
|
1077
|
-
}).then(function (r) {
|
|
1078
|
-
response = r;
|
|
1079
|
-
});
|
|
1080
|
-
$rootScope.$apply();
|
|
1081
|
-
|
|
1082
|
-
expect(
|
|
1083
|
-
response.config
|
|
1084
|
-
.paramSerializer(response.config.params)
|
|
1085
|
-
.endsWith("a=42&b=43"),
|
|
1086
|
-
).toBeTrue();
|
|
1087
|
-
});
|
|
1088
|
-
|
|
1089
|
-
it("serializes null and undefined elements as empty", async function () {
|
|
1090
|
-
await $http({
|
|
1091
|
-
url: "/mock/hello",
|
|
1092
|
-
params: {
|
|
1093
|
-
a: null,
|
|
1094
|
-
b: undefined,
|
|
1095
|
-
},
|
|
1096
|
-
paramSerializer: "$httpParamSerializerJQLike",
|
|
1097
|
-
}).then(function (r) {
|
|
1098
|
-
response = r;
|
|
1099
|
-
});
|
|
1100
|
-
$rootScope.$apply();
|
|
1101
|
-
|
|
1102
|
-
expect(
|
|
1103
|
-
response.config
|
|
1104
|
-
.paramSerializer(response.config.params)
|
|
1105
|
-
.endsWith("a=&b="),
|
|
1106
|
-
).toBeTrue();
|
|
1107
|
-
});
|
|
1108
|
-
|
|
1109
|
-
it("uses square brackets in arrays", async function () {
|
|
1110
|
-
await $http({
|
|
1111
|
-
url: "/mock/hello",
|
|
1112
|
-
params: {
|
|
1113
|
-
a: [42, 43],
|
|
1114
|
-
},
|
|
1115
|
-
paramSerializer: "$httpParamSerializerJQLike",
|
|
1116
|
-
}).then(function (r) {
|
|
1117
|
-
response = r;
|
|
1118
|
-
});
|
|
1119
|
-
$rootScope.$apply();
|
|
1120
|
-
|
|
1121
|
-
expect(
|
|
1122
|
-
response.config
|
|
1123
|
-
.paramSerializer(response.config.params)
|
|
1124
|
-
.endsWith("a%5B%5D=42&a%5B%5D=43"),
|
|
1125
|
-
).toBeTrue();
|
|
1126
|
-
});
|
|
1127
|
-
|
|
1128
|
-
it("uses square brackets in objects", async function () {
|
|
1129
|
-
await $http({
|
|
1130
|
-
url: "/mock/hello",
|
|
1131
|
-
params: {
|
|
1132
|
-
a: { b: 42, c: 43 },
|
|
1133
|
-
},
|
|
1134
|
-
paramSerializer: "$httpParamSerializerJQLike",
|
|
1135
|
-
}).then(function (r) {
|
|
1136
|
-
response = r;
|
|
1137
|
-
});
|
|
1138
|
-
$rootScope.$apply();
|
|
1139
|
-
|
|
1140
|
-
expect(
|
|
1141
|
-
response.config
|
|
1142
|
-
.paramSerializer(response.config.params)
|
|
1143
|
-
.endsWith("a%5Bb%5D=42&a%5Bc%5D=43"),
|
|
1144
|
-
).toBeTrue();
|
|
1145
|
-
});
|
|
1146
|
-
|
|
1147
|
-
it("supports nesting in objects", async function () {
|
|
1148
|
-
await $http({
|
|
1149
|
-
url: "/mock/hello",
|
|
1150
|
-
params: {
|
|
1151
|
-
a: { b: { c: 42 } },
|
|
1152
|
-
},
|
|
1153
|
-
paramSerializer: "$httpParamSerializerJQLike",
|
|
1154
|
-
}).then(function (r) {
|
|
1155
|
-
response = r;
|
|
1156
|
-
});
|
|
1157
|
-
$rootScope.$apply();
|
|
1158
|
-
|
|
1159
|
-
expect(
|
|
1160
|
-
response.config
|
|
1161
|
-
.paramSerializer(response.config.params)
|
|
1162
|
-
.endsWith("a%5Bb%5D%5Bc%5D=42"),
|
|
1163
|
-
).toBeTrue();
|
|
1164
|
-
});
|
|
1165
|
-
|
|
1166
|
-
it("appends array indexes when items are objects", async function () {
|
|
1167
|
-
await $http({
|
|
1168
|
-
url: "/mock/hello",
|
|
1169
|
-
params: {
|
|
1170
|
-
a: [{ b: 42 }],
|
|
1171
|
-
},
|
|
1172
|
-
paramSerializer: "$httpParamSerializerJQLike",
|
|
1173
|
-
}).then(function (r) {
|
|
1174
|
-
response = r;
|
|
1175
|
-
});
|
|
1176
|
-
$rootScope.$apply();
|
|
1177
|
-
|
|
1178
|
-
expect(
|
|
1179
|
-
response.config
|
|
1180
|
-
.paramSerializer(response.config.params)
|
|
1181
|
-
.endsWith("a%5B0%5D%5Bb%5D=42"),
|
|
1182
|
-
).toBeTrue();
|
|
1183
|
-
});
|
|
1184
|
-
});
|
|
1185
|
-
|
|
1186
1068
|
it("allows aborting a request with a Promise", async function () {
|
|
1187
1069
|
const timeout = $q.defer();
|
|
1188
1070
|
$http
|
|
@@ -79,21 +79,19 @@ describe("$templateRequest", () => {
|
|
|
79
79
|
},
|
|
80
80
|
]);
|
|
81
81
|
|
|
82
|
-
createInjector(["test"]).invoke(
|
|
83
|
-
($
|
|
84
|
-
spyOn($http, "get").and.callThrough();
|
|
82
|
+
createInjector(["test"]).invoke(($templateRequest, $http) => {
|
|
83
|
+
spyOn($http, "get").and.callThrough();
|
|
85
84
|
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
const customCache = new Map();
|
|
86
|
+
httpOptions.cache = customCache;
|
|
88
87
|
|
|
89
|
-
|
|
88
|
+
$templateRequest("tpl.html");
|
|
90
89
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
);
|
|
90
|
+
expect($http.get).toHaveBeenCalledOnceWith("tpl.html", {
|
|
91
|
+
cache: customCache,
|
|
92
|
+
transformResponse: [],
|
|
93
|
+
});
|
|
94
|
+
});
|
|
97
95
|
});
|
|
98
96
|
});
|
|
99
97
|
});
|
package/src/services/log.js
CHANGED
|
@@ -30,17 +30,11 @@ export let LogService = {
|
|
|
30
30
|
warn: undefined,
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
/**
|
|
34
|
-
* @typedef {import('../types').ServiceProvider} LogProvider
|
|
35
|
-
* @property {function(): boolean} debugEnabled - Function to get the current debug state.
|
|
36
|
-
* @property {function(boolean): angular.LogProvider} debugEnabled - Function to enable or disable debug.
|
|
37
|
-
*/
|
|
38
|
-
|
|
39
33
|
/**
|
|
40
34
|
* @type {LogProvider}
|
|
41
35
|
* Use the `$logProvider` to configure how the application logs messages
|
|
42
36
|
*/
|
|
43
|
-
export class
|
|
37
|
+
export class LogProvider {
|
|
44
38
|
constructor() {
|
|
45
39
|
this.debug = true;
|
|
46
40
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defaultHttpResponseTransform } from "./http/http";
|
|
2
|
-
import { extend, isString,
|
|
2
|
+
import { extend, isString, minErr } from "../shared/utils";
|
|
3
3
|
|
|
4
4
|
var $templateRequestMinErr = minErr("$templateRequest");
|
|
5
5
|
|
|
@@ -62,7 +62,7 @@ export function TemplateRequestProvider() {
|
|
|
62
62
|
/**
|
|
63
63
|
*
|
|
64
64
|
* @param {import('../core/exception-handler').ErrorHandler} $exceptionHandler
|
|
65
|
-
* @param {
|
|
65
|
+
* @param {import('../core/cache/cache-factory').TemplateCache} $templateCache
|
|
66
66
|
* @param {*} $http
|
|
67
67
|
* @param {*} $q
|
|
68
68
|
* @param {*} $sce
|
|
@@ -77,7 +77,7 @@ export function TemplateRequestProvider() {
|
|
|
77
77
|
// resources for keys that already are included in there. This also makes
|
|
78
78
|
// AngularJS accept any script directive, no matter its name. However, we
|
|
79
79
|
// still need to unwrap trusted types.
|
|
80
|
-
if (!isString(tpl) ||
|
|
80
|
+
if (!isString(tpl) || !$templateCache.has(tpl)) {
|
|
81
81
|
tpl = $sce.getTrustedResourceUrl(tpl);
|
|
82
82
|
}
|
|
83
83
|
|
package/src/shared/common.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isDate, isFunction, isRegExp, isString } from "./utils";
|
|
2
|
-
import { all,
|
|
2
|
+
import { all, curry } from "./hof";
|
|
3
3
|
import { services } from "../router/common/coreservices";
|
|
4
4
|
|
|
5
5
|
export function forEach(obj, cb, thisArg) {
|
|
@@ -160,8 +160,7 @@ export function defaults(opts, ...defaultsList) {
|
|
|
160
160
|
const defaultVals = Object.assign({}, ...defaultsList.reverse());
|
|
161
161
|
return Object.assign(defaultVals, pick(opts || {}, Object.keys(defaultVals)));
|
|
162
162
|
}
|
|
163
|
-
|
|
164
|
-
export const mergeR = (memo, item) => Object.assign(memo, item);
|
|
163
|
+
|
|
165
164
|
/**
|
|
166
165
|
* Finds the common ancestor path between two states.
|
|
167
166
|
*
|
|
@@ -214,12 +213,7 @@ export function omit(obj, propNames) {
|
|
|
214
213
|
.filter((x) => !propNames.includes(x))
|
|
215
214
|
.reduce((acc, key) => ((acc[key] = obj[key]), acc), {});
|
|
216
215
|
}
|
|
217
|
-
|
|
218
|
-
* Maps an array, or object to a property (by name)
|
|
219
|
-
*/
|
|
220
|
-
export function pluck(collection, propName) {
|
|
221
|
-
return map(collection, prop(propName));
|
|
222
|
-
}
|
|
216
|
+
|
|
223
217
|
/** Filters an Array or an Object's properties based on a predicate */
|
|
224
218
|
export function filter(collection, callback) {
|
|
225
219
|
const arr = Array.isArray(collection),
|
package/src/shared/hof.js
CHANGED
|
@@ -73,13 +73,7 @@ export function compose() {
|
|
|
73
73
|
export function pipe() {
|
|
74
74
|
return compose.apply(null, [].slice.call(arguments).reverse());
|
|
75
75
|
}
|
|
76
|
-
|
|
77
|
-
* Given a property name, returns a function that returns that property from an object
|
|
78
|
-
* let obj = { foo: 1, name: "blarg" };
|
|
79
|
-
* let getName = prop("name");
|
|
80
|
-
* getName(obj) === "blarg"
|
|
81
|
-
*/
|
|
82
|
-
export const prop = (name) => (obj) => obj && obj[name];
|
|
76
|
+
|
|
83
77
|
/**
|
|
84
78
|
* Given a property name and a value, returns a function that returns a boolean based on whether
|
|
85
79
|
* the passed object has a property that matches the value
|
|
@@ -96,7 +90,11 @@ export const propEq = curry((name, _val, obj) => obj && obj[name] === _val);
|
|
|
96
90
|
* let propNotFound = prop("this.property.doesnt.exist");
|
|
97
91
|
* propNotFound(obj) === undefined
|
|
98
92
|
*/
|
|
99
|
-
export const parse = (name) =>
|
|
93
|
+
export const parse = (name) =>
|
|
94
|
+
pipe.apply(
|
|
95
|
+
null,
|
|
96
|
+
name.split(".").map((name) => (obj) => obj && obj[name]),
|
|
97
|
+
);
|
|
100
98
|
|
|
101
99
|
/**
|
|
102
100
|
* Given two functions that return truthy or falsey values, returns a function that returns truthy
|
package/src/types.js
CHANGED
|
@@ -150,20 +150,6 @@
|
|
|
150
150
|
* - An object where keys are string identifiers and values are {@link Controller}
|
|
151
151
|
*/
|
|
152
152
|
|
|
153
|
-
/**
|
|
154
|
-
* @template [S=import('./core/scope/scope').Scope]
|
|
155
|
-
* @template {TScope} S - The type of the directive's scope.
|
|
156
|
-
*
|
|
157
|
-
* @template [T=import('./shared/jqlite/jqlite').JQLite]
|
|
158
|
-
* @template {TElement} T - The type of the directive's element.
|
|
159
|
-
*
|
|
160
|
-
* @template [A=Attributes]
|
|
161
|
-
* @template {TAttributes} A - The type of the directive's attributes.
|
|
162
|
-
*
|
|
163
|
-
* @template [C=Controller]
|
|
164
|
-
* @template {TController} C - The type of the directive's controller.
|
|
165
|
-
*/
|
|
166
|
-
|
|
167
153
|
/**
|
|
168
154
|
* Compile function for an AngularJS directive.
|
|
169
155
|
*
|
|
@@ -39,7 +39,7 @@ export function animateCache(): {
|
|
|
39
39
|
*/
|
|
40
40
|
put(key: string, value: any, isValid: boolean): void;
|
|
41
41
|
};
|
|
42
|
-
export function
|
|
43
|
-
export class
|
|
42
|
+
export function AnimateCacheProvider(): void;
|
|
43
|
+
export class AnimateCacheProvider {
|
|
44
44
|
$get: (typeof animateCache)[];
|
|
45
45
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export function
|
|
2
|
-
export class
|
|
1
|
+
export function AnimateCssDriverProvider($$animationProvider: any): void;
|
|
2
|
+
export class AnimateCssDriverProvider {
|
|
3
3
|
constructor($$animationProvider: any);
|
|
4
4
|
/**
|
|
5
5
|
* @returns {Function}
|
|
6
6
|
*/
|
|
7
7
|
$get: (string | (($animateCss: any, $$AnimateRunner: typeof import("./animate-runner").AnimateRunner, $rootElement: JQLite) => (animationDetails: any) => any))[];
|
|
8
8
|
}
|
|
9
|
-
export namespace
|
|
9
|
+
export namespace AnimateCssDriverProvider {
|
|
10
10
|
let $inject: string[];
|
|
11
11
|
}
|
|
12
12
|
import { JQLite } from "../shared/jqlite/jqlite";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export function
|
|
2
|
-
export class
|
|
1
|
+
export function AnimateCssProvider(): void;
|
|
2
|
+
export class AnimateCssProvider {
|
|
3
3
|
$get: (string | (($$AnimateRunner: any, $timeout: any, $$animateCache: any, $$rAFScheduler: import("./raf-scheduler").RafScheduler, $$animateQueue: any) => (element: any, initialOptions: any) => {
|
|
4
4
|
$$willAnimate: boolean;
|
|
5
5
|
start(): any;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export function
|
|
2
|
-
export class
|
|
1
|
+
export function AnimateJsDriverProvider($$animationProvider: any): void;
|
|
2
|
+
export class AnimateJsDriverProvider {
|
|
3
3
|
constructor($$animationProvider: any);
|
|
4
4
|
$get: (string | (($$animateJs: any, $$AnimateRunner: any) => (animationDetails: any) => any))[];
|
|
5
5
|
}
|
|
6
|
-
export namespace
|
|
6
|
+
export namespace AnimateJsDriverProvider {
|
|
7
7
|
let $inject: string[];
|
|
8
8
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export function
|
|
2
|
-
export class
|
|
1
|
+
export function AnimateJsProvider($animateProvider: any): void;
|
|
2
|
+
export class AnimateJsProvider {
|
|
3
3
|
constructor($animateProvider: any);
|
|
4
4
|
$get: (string | (($injector: import("../core/di/internal-injector").InjectorService, $$AnimateRunner: any) => (element: any, event: any, classes: any, options: any, ...args: any[]) => {
|
|
5
5
|
$$willAnimate: boolean;
|
|
@@ -7,6 +7,6 @@ export class $$AnimateJsProvider {
|
|
|
7
7
|
start(): any;
|
|
8
8
|
}))[];
|
|
9
9
|
}
|
|
10
|
-
export namespace
|
|
10
|
+
export namespace AnimateJsProvider {
|
|
11
11
|
let $inject: string[];
|
|
12
12
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export function
|
|
2
|
-
export class
|
|
1
|
+
export function AnimateQueueProvider($animateProvider: any): void;
|
|
2
|
+
export class AnimateQueueProvider {
|
|
3
3
|
constructor($animateProvider: any);
|
|
4
4
|
rules: {
|
|
5
5
|
skip: any[];
|
|
@@ -14,6 +14,6 @@ export class $$AnimateQueueProvider {
|
|
|
14
14
|
enabled(element: any, bool: any, ...args: any[]): any;
|
|
15
15
|
}))[];
|
|
16
16
|
}
|
|
17
|
-
export namespace
|
|
17
|
+
export namespace AnimateQueueProvider {
|
|
18
18
|
let $inject: string[];
|
|
19
19
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export function
|
|
2
|
-
export class
|
|
1
|
+
export function AnimationProvider(): void;
|
|
2
|
+
export class AnimationProvider {
|
|
3
3
|
drivers: any[];
|
|
4
4
|
$get: (string | (($rootScope: any, $injector: import("../core/di/internal-injector").InjectorService, $$AnimateRunner: any, $$rAFScheduler: import("./raf-scheduler").RafScheduler, $$animateCache: any) => (element: any, event: any, options: any) => any))[];
|
|
5
5
|
}
|
|
@@ -1,4 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* A cache for maping template names to their respective content.
|
|
3
|
+
*
|
|
4
|
+
* @typedef {Map<string, string>} TemplateCache
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Service responsible for providing a cache for templates.
|
|
8
|
+
*
|
|
9
|
+
* @class TemplateCacheProvider
|
|
10
|
+
* @description Provides an instance of a template cache that can be used to store and retrieve template content.
|
|
11
|
+
*/
|
|
2
12
|
export class TemplateCacheProvider {
|
|
3
|
-
|
|
13
|
+
/**
|
|
14
|
+
* @description Returns a new instance of a `TemplateCache`, which is a Map used to store templates.
|
|
15
|
+
* @returns {TemplateCache} A new instance of the template cache (Map object).
|
|
16
|
+
*/
|
|
17
|
+
$get: () => TemplateCache;
|
|
4
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* A cache for maping template names to their respective content.
|
|
21
|
+
*/
|
|
22
|
+
export type TemplateCache = Map<string, string>;
|
|
@@ -9,15 +9,15 @@ export class Attributes {
|
|
|
9
9
|
/**
|
|
10
10
|
* @param {import('../scope/scope').Scope} $rootScope
|
|
11
11
|
* @param {*} $animate
|
|
12
|
-
* @param {import("../exception-handler").
|
|
12
|
+
* @param {import("../exception-handler").ErrorHandler} $exceptionHandler
|
|
13
13
|
* @param {*} $sce
|
|
14
14
|
* @param {import('../../shared/jqlite/jqlite').JQLite} [element]
|
|
15
15
|
* @param {*} [attributesToCopy]
|
|
16
16
|
*/
|
|
17
|
-
constructor($rootScope: import("../scope/scope").Scope, $animate: any, $exceptionHandler: import("../exception-handler").
|
|
17
|
+
constructor($rootScope: import("../scope/scope").Scope, $animate: any, $exceptionHandler: import("../exception-handler").ErrorHandler, $sce: any, element?: import("../../shared/jqlite/jqlite").JQLite, attributesToCopy?: any);
|
|
18
18
|
$rootScope: import("../scope/scope").Scope;
|
|
19
19
|
$animate: any;
|
|
20
|
-
$exceptionHandler:
|
|
20
|
+
$exceptionHandler: import("../exception-handler").ErrorHandler;
|
|
21
21
|
$sce: any;
|
|
22
22
|
$attr: {};
|
|
23
23
|
$$element: import("../../shared/jqlite/jqlite").JQLite;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export function
|
|
2
|
-
export class
|
|
1
|
+
export function CompileProvider($provide: any, $$sanitizeUriProvider: any): void;
|
|
2
|
+
export class CompileProvider {
|
|
3
3
|
constructor($provide: any, $$sanitizeUriProvider: any);
|
|
4
4
|
/**
|
|
5
5
|
* Register a new directive with the compiler.
|
|
@@ -9,9 +9,9 @@ export class $CompileProvider {
|
|
|
9
9
|
* are the factories.
|
|
10
10
|
* @param {Function|Array} directiveFactory An injectable directive factory function. See the
|
|
11
11
|
* {@link guide/directive directive guide} and the {@link $compile compile API} for more info.
|
|
12
|
-
* @returns {
|
|
12
|
+
* @returns {CompileProvider} Self for chaining.
|
|
13
13
|
*/
|
|
14
|
-
directive: (name: string | any, directiveFactory: Function | any[]) =>
|
|
14
|
+
directive: (name: string | any, directiveFactory: Function | any[]) => CompileProvider;
|
|
15
15
|
/**
|
|
16
16
|
* @param {string|Object} name Name of the component in camelCase (i.e. `myComp` which will match `<my-comp>`),
|
|
17
17
|
* or an object map of components where the keys are the names and the values are the component definition objects.
|
|
@@ -54,9 +54,9 @@ export class $CompileProvider {
|
|
|
54
54
|
* - `$...` – additional properties to attach to the directive factory function and the controller
|
|
55
55
|
* constructor function. (This is used by the component router to annotate)
|
|
56
56
|
*
|
|
57
|
-
* @returns {
|
|
57
|
+
* @returns {CompileProvider} the compile provider itself, for chaining of function calls.
|
|
58
58
|
*/
|
|
59
|
-
component: (name: string | any, options: any) =>
|
|
59
|
+
component: (name: string | any, options: any) => CompileProvider;
|
|
60
60
|
/**
|
|
61
61
|
* Retrieves or overrides the default regular expression that is used for determining trusted safe
|
|
62
62
|
* urls during a[href] sanitization.
|
|
@@ -69,10 +69,10 @@ export class $CompileProvider {
|
|
|
69
69
|
* the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.
|
|
70
70
|
*
|
|
71
71
|
* @param {RegExp=} regexp New regexp to trust urls with.
|
|
72
|
-
* @returns {RegExp
|
|
72
|
+
* @returns {RegExp|CompileProvider} Current RegExp if called without value or self for
|
|
73
73
|
* chaining otherwise.
|
|
74
74
|
*/
|
|
75
|
-
aHrefSanitizationTrustedUrlList: (regexp?: RegExp | undefined) => RegExp |
|
|
75
|
+
aHrefSanitizationTrustedUrlList: (regexp?: RegExp | undefined) => RegExp | CompileProvider;
|
|
76
76
|
/**
|
|
77
77
|
* Retrieves or overrides the default regular expression that is used for determining trusted safe
|
|
78
78
|
* urls during img[src] sanitization.
|
|
@@ -85,10 +85,10 @@ export class $CompileProvider {
|
|
|
85
85
|
* the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.
|
|
86
86
|
*
|
|
87
87
|
* @param {RegExp=} regexp New regexp to trust urls with.
|
|
88
|
-
* @returns {RegExp
|
|
88
|
+
* @returns {RegExp|CompileProvider} Current RegExp if called without value or self for
|
|
89
89
|
* chaining otherwise.
|
|
90
90
|
*/
|
|
91
|
-
imgSrcSanitizationTrustedUrlList: (regexp?: RegExp | undefined) => RegExp |
|
|
91
|
+
imgSrcSanitizationTrustedUrlList: (regexp?: RegExp | undefined) => RegExp | CompileProvider;
|
|
92
92
|
strictComponentBindingsEnabled: (enabled: any) => boolean | this;
|
|
93
93
|
/**
|
|
94
94
|
* Defines the security context for DOM properties bound by ng-prop-*.
|
|
@@ -99,9 +99,9 @@ export class $CompileProvider {
|
|
|
99
99
|
* @returns {object} `this` for chaining
|
|
100
100
|
*/
|
|
101
101
|
addPropertySecurityContext: (elementName: string, propertyName: string, ctx: string) => object;
|
|
102
|
-
$get: (string | (($injector: import("../../core/di/internal-injector").InjectorService, $interpolate: any, $exceptionHandler: import("../exception-handler").
|
|
102
|
+
$get: (string | (($injector: import("../../core/di/internal-injector").InjectorService, $interpolate: any, $exceptionHandler: import("../exception-handler").ErrorHandler, $templateRequest: any, $parse: import("../parser/parse").ParseService, $controller: any, $rootScope: import("../scope/scope").Scope, $sce: any, $animate: any) => ($compileNodes: string | NodeList, transcludeFn: any, maxPriority: any, ignoreDirective: any, previousCompileContext: any) => (scope: any, cloneConnectFn: any, options: any) => JQLite))[];
|
|
103
103
|
}
|
|
104
|
-
export namespace
|
|
104
|
+
export namespace CompileProvider {
|
|
105
105
|
let $inject: string[];
|
|
106
106
|
}
|
|
107
107
|
/**
|
|
@@ -6,7 +6,7 @@ export function identifierForController(controller: any, ident: any): any;
|
|
|
6
6
|
* This provider allows controller registration via the
|
|
7
7
|
* {@link ng.$controllerProvider#register register} method.
|
|
8
8
|
*/
|
|
9
|
-
export class
|
|
9
|
+
export class ControllerProvider {
|
|
10
10
|
/**
|
|
11
11
|
* @type {Map<string, Function|Object>}
|
|
12
12
|
* @private
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @constructor
|
|
3
|
-
* @this {
|
|
3
|
+
* @this {import('../types').ServiceProvider}
|
|
4
4
|
*/
|
|
5
|
-
export function
|
|
6
|
-
export class
|
|
5
|
+
export function ExceptionHandlerProvider(this: any): void;
|
|
6
|
+
export class ExceptionHandlerProvider {
|
|
7
7
|
$get: (string | (($log: import("../services/log").LogService) => ErrorHandler))[];
|
|
8
8
|
}
|
|
9
9
|
export function errorHandler(exception: any, cause: any): void;
|
|
10
|
-
export type ExceptionHandlerProvider = import("../types").ServiceProvider;
|
|
11
10
|
export type ErrorHandler = (exception: Error, cause?: string) => void;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export function
|
|
2
|
-
export class
|
|
1
|
+
export function FilterProvider($provide: any): void;
|
|
2
|
+
export class FilterProvider {
|
|
3
3
|
constructor($provide: any);
|
|
4
4
|
register: (name: any, factory: any) => any;
|
|
5
5
|
$get: (string | (($injector: import("../../core/di/internal-injector").InjectorService) => (name: any) => any))[];
|
|
6
6
|
}
|
|
7
|
-
export namespace
|
|
7
|
+
export namespace FilterProvider {
|
|
8
8
|
let $inject: string[];
|
|
9
9
|
}
|
|
@@ -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
|
|
3
|
-
$get: (string | (($
|
|
1
|
+
export function $IntervalFactoryProvider(): void;
|
|
2
|
+
export class $IntervalFactoryProvider {
|
|
3
|
+
$get: (string | (($q: any, $rootScope: import("../scope/scope").Scope) => (setIntervalFn: any, clearIntervalFn: any) => (fn: any, delay: any, count: 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/q/q.d.ts
CHANGED
|
@@ -52,11 +52,6 @@ export class $QProvider {
|
|
|
52
52
|
*/
|
|
53
53
|
errorOnUnhandledRejections(value?: boolean | undefined): boolean | $QProvider;
|
|
54
54
|
}
|
|
55
|
-
export class $$QProvider {
|
|
56
|
-
errorOn: boolean;
|
|
57
|
-
$get: (string | (($exceptionHandler: any) => any))[];
|
|
58
|
-
errorOnUnhandledRejections(value: any): boolean | this;
|
|
59
|
-
}
|
|
60
55
|
export type QService = {
|
|
61
56
|
defer: () => Deferred<any>;
|
|
62
57
|
all: (arg0: any | null) => QPromise<any>;
|