@angular-wave/angular.ts 0.0.41 → 0.0.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -0
- package/dist/angular-ts.esm.js +2 -2
- package/dist/angular-ts.umd.js +2 -2
- package/package.json +1 -1
- package/src/core/compile/compile.js +1 -1
- package/src/core/compile/compile.md +2 -5
- package/src/core/exception-handler.js +6 -6
- package/src/core/interpolate/interpolate.js +1 -1
- package/src/core/location/location.spec.js +0 -4
- package/src/core/q/q.js +1 -1
- package/src/core/scope/scope.js +1 -1
- package/src/core/task-tracker-factory.js +2 -2
- package/src/core/timeout/timeout.js +1 -1
- package/src/core/url-utils/url-utils.js +0 -2
- package/src/directive/bind/bind.js +2 -2
- package/src/directive/change/change.js +1 -1
- package/src/directive/cloak/cloak.js +1 -1
- package/src/directive/events/events.js +1 -1
- package/src/directive/form/form.js +2 -2
- package/src/directive/init/init.js +1 -1
- package/src/directive/list/list.js +1 -1
- package/src/directive/model/model.js +1 -1
- package/src/directive/model-options/model-options.js +56 -421
- package/src/directive/model-options/model-options.md +407 -0
- package/src/directive/model-options/model-options.spec.js +1 -1
- package/src/directive/non-bindable/non-bindable.js +1 -2
- package/src/directive/style/style.js +1 -1
- package/src/directive/switch/switch.js +2 -2
- package/src/directive/transclude/transclude.js +2 -2
- package/src/index.js +0 -461
- package/src/loader.js +1 -1
- package/src/public.js +1 -1
- package/src/router/template-factory.js +2 -2
- package/src/router/view-scroll.js +1 -1
- package/src/services/browser.js +1 -1
- package/src/services/document.js +2 -2
- package/src/services/log.js +1 -1
- package/src/services/template-request.js +1 -1
- package/src/shared/jqlite/jqlite.js +52 -44
- package/src/shared/jqlite/jqlite.spec.js +0 -1
- package/src/shared/utils.js +1 -1
- package/src/types.js +447 -9
- package/tsconfig.json +1 -1
- package/types/animations/shared.d.ts +1 -1
- package/types/core/exception-handler.d.ts +5 -7
- package/types/core/interpolate/interpolate.d.ts +1 -1
- package/types/core/q/q.d.ts +1 -1
- package/types/core/task-tracker-factory.d.ts +5 -5
- package/types/core/timeout/timeout.d.ts +2 -2
- package/types/directive/bind/bind.d.ts +4 -4
- package/types/directive/change/change.d.ts +2 -2
- package/types/directive/cloak/cloak.d.ts +2 -2
- package/types/directive/init/init.d.ts +2 -2
- package/types/directive/list/list.d.ts +2 -2
- package/types/directive/model/model.d.ts +13 -7
- package/types/directive/model-options/model-options.d.ts +49 -0
- package/types/directive/non-bindable/non-bindable.d.ts +2 -3
- package/types/directive/style/style.d.ts +2 -2
- package/types/directive/switch/switch.d.ts +4 -4
- package/types/index.d.ts +1 -702
- package/types/public.d.ts +2 -2
- package/types/router/template-factory.d.ts +4 -4
- package/types/services/browser.d.ts +3 -3
- package/types/services/document.d.ts +4 -6
- package/types/services/log.d.ts +2 -2
- package/types/services/template-request.d.ts +1 -1
- package/types/shared/jqlite/jqlite.d.ts +10 -2
- package/types/shared/utils.d.ts +2 -2
- package/types/types.d.ts +437 -33
- package/types-back/index.d.ts +1 -27
- package/types-back/jqlite.d.ts +0 -81
- package/types-back/global.d.ts +0 -11
package/package.json
CHANGED
|
@@ -234,7 +234,7 @@ export function $CompileProvider($provide, $$sanitizeUriProvider) {
|
|
|
234
234
|
/**
|
|
235
235
|
*
|
|
236
236
|
* @param {*} $injector
|
|
237
|
-
* @param {import('../exception-handler').
|
|
237
|
+
* @param {import('../exception-handler').ErrorHandler} $exceptionHandler
|
|
238
238
|
* @returns
|
|
239
239
|
*/
|
|
240
240
|
function ($injector, $exceptionHandler) {
|
|
@@ -471,14 +471,11 @@
|
|
|
471
471
|
-
|
|
472
472
|
-
|
|
473
473
|
- #### `restrict`
|
|
474
|
-
- String of subset of `
|
|
474
|
+
- String of subset of `EA` which restricts the directive to a specific directive
|
|
475
475
|
- declaration style. If omitted, the defaults (elements and attributes) are used.
|
|
476
476
|
-
|
|
477
477
|
- - `E` - Element name (default): `<my-directive></my-directive>`
|
|
478
|
-
- - `A` - Attribute (default): `<div my-directive="exp"></div
|
|
479
|
-
- - `C` - Class: `<div class="my-directive: exp;"></div>`
|
|
480
|
-
- - `M` - Comment: `<!-- directive: my-directive exp -->`
|
|
481
|
-
-
|
|
478
|
+
- - `A` - Attribute (default): `<div my-directive="exp"></div>`-
|
|
482
479
|
-
|
|
483
480
|
- #### `templateNamespace`
|
|
484
481
|
- String representing the document type used by the markup in the template.
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
*/
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
|
-
* @typedef {import('../
|
|
38
|
+
* @typedef {import('../types').ServiceProvider} ExceptionHandlerProvider
|
|
39
39
|
*/
|
|
40
40
|
|
|
41
|
-
/** @type {import('../services/log').
|
|
41
|
+
/** @type {import('../services/log').LogService} */
|
|
42
42
|
let log;
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
|
-
* @callback
|
|
45
|
+
* @callback ErrorHandler
|
|
46
46
|
* @param {Error} exception - Exception associated with the error.
|
|
47
47
|
* @param {string} [cause] - Optional information about the context in which the error was thrown.
|
|
48
48
|
* @returns {void}
|
|
@@ -53,14 +53,14 @@ export const errorHandler = (exception, cause) => {
|
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
55
|
* @constructor
|
|
56
|
-
* @this {
|
|
56
|
+
* @this {ExceptionHandlerProvider}
|
|
57
57
|
*/
|
|
58
58
|
export function $ExceptionHandlerProvider() {
|
|
59
59
|
this.$get = [
|
|
60
60
|
"$log",
|
|
61
61
|
/**
|
|
62
|
-
* @param {import('../services/log').
|
|
63
|
-
* @returns {
|
|
62
|
+
* @param {import('../services/log').LogService} $log
|
|
63
|
+
* @returns {ErrorHandler}
|
|
64
64
|
*/
|
|
65
65
|
function ($log) {
|
|
66
66
|
log = $log;
|
|
@@ -89,7 +89,7 @@ export function $InterpolateProvider() {
|
|
|
89
89
|
/**
|
|
90
90
|
*
|
|
91
91
|
* @param {*} $parse
|
|
92
|
-
* @param {import('../exception-handler').
|
|
92
|
+
* @param {import('../exception-handler').ErrorHandler} $exceptionHandler
|
|
93
93
|
* @param {*} $sce
|
|
94
94
|
* @returns
|
|
95
95
|
*/
|
|
@@ -3297,10 +3297,6 @@ describe("$location", () => {
|
|
|
3297
3297
|
);
|
|
3298
3298
|
});
|
|
3299
3299
|
|
|
3300
|
-
it("should throw on url(urlString, stateObject)", () => {
|
|
3301
|
-
expectThrowOnStateChange(locationUrl);
|
|
3302
|
-
});
|
|
3303
|
-
|
|
3304
3300
|
it("should allow navigating outside the original base URL", () => {
|
|
3305
3301
|
locationUrl = new LocationHashbangUrl(
|
|
3306
3302
|
"http://server/pre/index.html",
|
package/src/core/q/q.js
CHANGED
|
@@ -271,7 +271,7 @@ export function $QProvider() {
|
|
|
271
271
|
/**
|
|
272
272
|
*
|
|
273
273
|
* @param {*} $rootScope
|
|
274
|
-
* @param {import('../exception-handler').
|
|
274
|
+
* @param {import('../exception-handler').ErrorHandler} $exceptionHandler
|
|
275
275
|
* @returns
|
|
276
276
|
*/
|
|
277
277
|
function ($rootScope, $exceptionHandler) {
|
package/src/core/scope/scope.js
CHANGED
|
@@ -55,7 +55,7 @@ let applyAsyncId = null;
|
|
|
55
55
|
let $parse;
|
|
56
56
|
/** @type {import('../../services/browser').Browser} */
|
|
57
57
|
let $browser;
|
|
58
|
-
/**@type {import('../exception-handler').
|
|
58
|
+
/**@type {import('../exception-handler').ErrorHandler} */
|
|
59
59
|
let $exceptionHandler;
|
|
60
60
|
|
|
61
61
|
/**
|
|
@@ -2,7 +2,7 @@ export function $$TaskTrackerFactoryProvider() {
|
|
|
2
2
|
// eslint-disable-next-line no-use-before-define
|
|
3
3
|
this.$get = [
|
|
4
4
|
"$log",
|
|
5
|
-
/** @param {import('../services/log').
|
|
5
|
+
/** @param {import('../services/log').LogService} log */
|
|
6
6
|
(log) => new TaskTracker(log),
|
|
7
7
|
];
|
|
8
8
|
}
|
|
@@ -16,7 +16,7 @@ export function $$TaskTrackerFactoryProvider() {
|
|
|
16
16
|
*
|
|
17
17
|
* A `TaskTracker` can keep track of pending tasks (grouped by type) and can notify interested
|
|
18
18
|
* parties when all pending tasks (or tasks of a specific type) have been completed.
|
|
19
|
-
* @param {import('../services/log').
|
|
19
|
+
* @param {import('../services/log').LogService} log
|
|
20
20
|
*/
|
|
21
21
|
export function TaskTracker(log) {
|
|
22
22
|
const self = this;
|
|
@@ -9,7 +9,7 @@ const $timeoutMinErr = minErr("$timeout");
|
|
|
9
9
|
* @param {*} $browser
|
|
10
10
|
* @param {*} $q
|
|
11
11
|
* @param {*} $$q
|
|
12
|
-
* @param {import('../exception-handler').
|
|
12
|
+
* @param {import('../exception-handler').ErrorHandler} $exceptionHandler
|
|
13
13
|
* @returns
|
|
14
14
|
*/
|
|
15
15
|
export function $timeout($rootScope, $browser, $q, $$q, $exceptionHandler) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isUndefined, stringify } from "../../shared/utils";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @returns {
|
|
4
|
+
* @returns {import('../../types').Directive}
|
|
5
5
|
*/
|
|
6
6
|
export function ngBindDirective() {
|
|
7
7
|
return {
|
|
@@ -15,7 +15,7 @@ export function ngBindDirective() {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* @returns {
|
|
18
|
+
* @returns {import('../../types').Directive}
|
|
19
19
|
*/
|
|
20
20
|
export function ngBindTemplateDirective() {
|
|
21
21
|
return {
|
|
@@ -27,7 +27,7 @@ const forceAsyncEvents = {
|
|
|
27
27
|
*
|
|
28
28
|
* @param {*} $parse
|
|
29
29
|
* @param {*} $rootScope
|
|
30
|
-
* @param {import('../../core/exception-handler').
|
|
30
|
+
* @param {import('../../core/exception-handler').ErrorHandler} $exceptionHandler
|
|
31
31
|
* @returns
|
|
32
32
|
*/
|
|
33
33
|
($parse, $rootScope, $exceptionHandler) => {
|
|
@@ -416,7 +416,7 @@ addSetValidityMethod({
|
|
|
416
416
|
/**
|
|
417
417
|
* @ngdoc directive
|
|
418
418
|
* @name ngForm
|
|
419
|
-
* @restrict
|
|
419
|
+
* @restrict EA
|
|
420
420
|
*
|
|
421
421
|
* @description
|
|
422
422
|
* Helper directive that makes it possible to create control groups inside a
|
|
@@ -518,7 +518,7 @@ const formDirectiveFactory = function (isNgForm) {
|
|
|
518
518
|
function ($timeout, $parse) {
|
|
519
519
|
const formDirective = {
|
|
520
520
|
name: "form",
|
|
521
|
-
restrict: isNgForm ? "
|
|
521
|
+
restrict: isNgForm ? "EA" : "E",
|
|
522
522
|
require: ["form", "^^?form"], // first is the form's own ctrl, second is an optional parent form
|
|
523
523
|
controller: FormController,
|
|
524
524
|
compile: function ngFormCompile(formElement, attr) {
|
|
@@ -189,7 +189,7 @@ NgModelController.$inject = [
|
|
|
189
189
|
/**
|
|
190
190
|
*
|
|
191
191
|
* @param {*} $scope
|
|
192
|
-
* @param {import('../../core/exception-handler').
|
|
192
|
+
* @param {import('../../core/exception-handler').ErrorHandler} $exceptionHandler
|
|
193
193
|
* @param {*} $attr
|
|
194
194
|
* @param {*} $element
|
|
195
195
|
* @param {*} $parse
|