@angular-wave/angular.ts 0.0.41 → 0.0.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/README.md +27 -0
  2. package/dist/angular-ts.esm.js +2 -2
  3. package/dist/angular-ts.umd.js +2 -2
  4. package/package.json +1 -1
  5. package/src/core/compile/compile.js +1 -1
  6. package/src/core/compile/compile.md +2 -5
  7. package/src/core/exception-handler.js +6 -6
  8. package/src/core/interpolate/interpolate.js +1 -1
  9. package/src/core/location/location.spec.js +0 -4
  10. package/src/core/q/q.js +1 -1
  11. package/src/core/scope/scope.js +1 -1
  12. package/src/core/task-tracker-factory.js +2 -2
  13. package/src/core/timeout/timeout.js +1 -1
  14. package/src/core/url-utils/url-utils.js +0 -2
  15. package/src/directive/bind/bind.js +2 -2
  16. package/src/directive/change/change.js +1 -1
  17. package/src/directive/cloak/cloak.js +1 -1
  18. package/src/directive/events/events.js +1 -1
  19. package/src/directive/form/form.js +2 -2
  20. package/src/directive/init/init.js +1 -1
  21. package/src/directive/list/list.js +1 -1
  22. package/src/directive/model/model.js +1 -1
  23. package/src/directive/model-options/model-options.js +56 -421
  24. package/src/directive/model-options/model-options.md +407 -0
  25. package/src/directive/model-options/model-options.spec.js +1 -1
  26. package/src/directive/non-bindable/non-bindable.js +1 -2
  27. package/src/directive/style/style.js +1 -1
  28. package/src/directive/switch/switch.js +2 -2
  29. package/src/directive/transclude/transclude.js +2 -2
  30. package/src/index.js +0 -461
  31. package/src/loader.js +1 -1
  32. package/src/public.js +1 -1
  33. package/src/router/template-factory.js +2 -2
  34. package/src/router/view-scroll.js +1 -1
  35. package/src/services/browser.js +1 -1
  36. package/src/services/document.js +2 -2
  37. package/src/services/log.js +1 -1
  38. package/src/services/template-request.js +1 -1
  39. package/src/shared/jqlite/jqlite.js +52 -44
  40. package/src/shared/jqlite/jqlite.spec.js +0 -1
  41. package/src/shared/utils.js +1 -1
  42. package/src/types.js +447 -9
  43. package/tsconfig.json +1 -1
  44. package/types/animations/shared.d.ts +1 -1
  45. package/types/core/exception-handler.d.ts +5 -7
  46. package/types/core/interpolate/interpolate.d.ts +1 -1
  47. package/types/core/q/q.d.ts +1 -1
  48. package/types/core/task-tracker-factory.d.ts +5 -5
  49. package/types/core/timeout/timeout.d.ts +2 -2
  50. package/types/directive/bind/bind.d.ts +4 -4
  51. package/types/directive/change/change.d.ts +2 -2
  52. package/types/directive/cloak/cloak.d.ts +2 -2
  53. package/types/directive/init/init.d.ts +2 -2
  54. package/types/directive/list/list.d.ts +2 -2
  55. package/types/directive/model/model.d.ts +13 -7
  56. package/types/directive/model-options/model-options.d.ts +49 -0
  57. package/types/directive/non-bindable/non-bindable.d.ts +2 -3
  58. package/types/directive/style/style.d.ts +2 -2
  59. package/types/directive/switch/switch.d.ts +4 -4
  60. package/types/index.d.ts +1 -702
  61. package/types/public.d.ts +2 -2
  62. package/types/router/template-factory.d.ts +4 -4
  63. package/types/services/browser.d.ts +3 -3
  64. package/types/services/document.d.ts +4 -6
  65. package/types/services/log.d.ts +2 -2
  66. package/types/services/template-request.d.ts +1 -1
  67. package/types/shared/jqlite/jqlite.d.ts +10 -2
  68. package/types/shared/utils.d.ts +2 -2
  69. package/types/types.d.ts +437 -33
  70. package/types-back/index.d.ts +1 -27
  71. package/types-back/jqlite.d.ts +0 -81
  72. package/types-back/global.d.ts +0 -11
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@angular-wave/angular.ts",
3
3
  "license": "MIT",
4
- "version": "0.0.41",
4
+ "version": "0.0.42",
5
5
  "type": "module",
6
6
  "main": "dist/angular-ts.esm.js",
7
7
  "browser": "dist/angular-ts.umd.js",
@@ -234,7 +234,7 @@ export function $CompileProvider($provide, $$sanitizeUriProvider) {
234
234
  /**
235
235
  *
236
236
  * @param {*} $injector
237
- * @param {import('../exception-handler').angular.ErrorHandler} $exceptionHandler
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 `EACM` which restricts the directive to a specific directive
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('../index').angular.ServiceProvider} angular.ExceptionHandlerProvider
38
+ * @typedef {import('../types').ServiceProvider} ExceptionHandlerProvider
39
39
  */
40
40
 
41
- /** @type {import('../services/log').angular.LogService} */
41
+ /** @type {import('../services/log').LogService} */
42
42
  let log;
43
43
 
44
44
  /**
45
- * @callback angular.ErrorHandler
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 {angular.ExceptionHandlerProvider}
56
+ * @this {ExceptionHandlerProvider}
57
57
  */
58
58
  export function $ExceptionHandlerProvider() {
59
59
  this.$get = [
60
60
  "$log",
61
61
  /**
62
- * @param {import('../services/log').angular.LogService} $log
63
- * @returns {angular.ErrorHandler}
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').angular.ErrorHandler} $exceptionHandler
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').angular.ErrorHandler} $exceptionHandler
274
+ * @param {import('../exception-handler').ErrorHandler} $exceptionHandler
275
275
  * @returns
276
276
  */
277
277
  function ($rootScope, $exceptionHandler) {
@@ -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').angular.ErrorHandler} */
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').angular.LogService} 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').angular.LogService} 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').angular.ErrorHandler} $exceptionHandler
12
+ * @param {import('../exception-handler').ErrorHandler} $exceptionHandler
13
13
  * @returns
14
14
  */
15
15
  export function $timeout($rootScope, $browser, $q, $$q, $exceptionHandler) {
@@ -1,5 +1,3 @@
1
- /* eslint-disable no-use-before-define */
2
-
3
1
  import { isString } from "../../shared/utils";
4
2
 
5
3
  // service.
@@ -1,7 +1,7 @@
1
1
  import { isUndefined, stringify } from "../../shared/utils";
2
2
 
3
3
  /**
4
- * @returns {angular.IDirective}
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 {angular.IDirective}
18
+ * @returns {import('../../types').Directive}
19
19
  */
20
20
  export function ngBindTemplateDirective() {
21
21
  return {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @returns {angular.IDirective}
2
+ * @returns {import('../../types').Directive}
3
3
  */
4
4
  export function ngChangeDirective() {
5
5
  return {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @returns {angular.IDirective}
2
+ * @returns {import('../../types').Directive}
3
3
  */
4
4
  export function ngCloakDirective() {
5
5
  return {
@@ -27,7 +27,7 @@ const forceAsyncEvents = {
27
27
  *
28
28
  * @param {*} $parse
29
29
  * @param {*} $rootScope
30
- * @param {import('../../core/exception-handler').angular.ErrorHandler} $exceptionHandler
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 EAC
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 ? "EAC" : "E",
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) {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @returns {angular.IDirective}
2
+ * @returns {import('../../types').Directive}
3
3
  */
4
4
  export function ngInitDirective() {
5
5
  return {
@@ -1,7 +1,7 @@
1
1
  import { forEach, isUndefined, trim } from "../../shared/utils";
2
2
 
3
3
  /**
4
- * @returns {angular.IDirective}
4
+ * @returns {import('../../types').Directive}
5
5
  */
6
6
  export function ngListDirective() {
7
7
  return {
@@ -189,7 +189,7 @@ NgModelController.$inject = [
189
189
  /**
190
190
  *
191
191
  * @param {*} $scope
192
- * @param {import('../../core/exception-handler').angular.ErrorHandler} $exceptionHandler
192
+ * @param {import('../../core/exception-handler').ErrorHandler} $exceptionHandler
193
193
  * @param {*} $attr
194
194
  * @param {*} $element
195
195
  * @param {*} $parse