@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
@@ -1,6 +1,6 @@
1
1
  export function $$TaskTrackerFactoryProvider(): void;
2
2
  export class $$TaskTrackerFactoryProvider {
3
- $get: (string | ((log: import("../services/log").angular.LogService) => TaskTracker))[];
3
+ $get: (string | ((log: any) => TaskTracker))[];
4
4
  }
5
5
  /**
6
6
  * ! This is a private undocumented service !
@@ -11,9 +11,9 @@ export class $$TaskTrackerFactoryProvider {
11
11
  *
12
12
  * A `TaskTracker` can keep track of pending tasks (grouped by type) and can notify interested
13
13
  * parties when all pending tasks (or tasks of a specific type) have been completed.
14
- * @param {import('../services/log').angular.LogService} log
14
+ * @param {import('../services/log').LogService} log
15
15
  */
16
- export function TaskTracker(log: import("../services/log").angular.LogService): void;
16
+ export function TaskTracker(log: any): void;
17
17
  export class TaskTracker {
18
18
  /**
19
19
  * ! This is a private undocumented service !
@@ -24,9 +24,9 @@ export class TaskTracker {
24
24
  *
25
25
  * A `TaskTracker` can keep track of pending tasks (grouped by type) and can notify interested
26
26
  * parties when all pending tasks (or tasks of a specific type) have been completed.
27
- * @param {import('../services/log').angular.LogService} log
27
+ * @param {import('../services/log').LogService} log
28
28
  */
29
- constructor(log: import("../services/log").angular.LogService);
29
+ constructor(log: any);
30
30
  ALL_TASKS_TYPE: string;
31
31
  DEFAULT_TASK_TYPE: string;
32
32
  /**
@@ -4,10 +4,10 @@
4
4
  * @param {*} $browser
5
5
  * @param {*} $q
6
6
  * @param {*} $$q
7
- * @param {import('../exception-handler').angular.ErrorHandler} $exceptionHandler
7
+ * @param {import('../exception-handler').ErrorHandler} $exceptionHandler
8
8
  * @returns
9
9
  */
10
- export function $timeout($rootScope: any, $browser: any, $q: any, $$q: any, $exceptionHandler: import("../exception-handler").angular.ErrorHandler): {
10
+ export function $timeout($rootScope: any, $browser: any, $q: any, $$q: any, $exceptionHandler: import("../exception-handler").ErrorHandler): {
11
11
  (fn?: (() => any) | undefined, delay?: number | undefined, invokeApply?: boolean | undefined, ...args: any[]): Promise<any>;
12
12
  /**
13
13
  * @ngdoc method
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @returns {angular.IDirective}
2
+ * @returns {import('../../types').Directive}
3
3
  */
4
- export function ngBindDirective(): angular.IDirective;
4
+ export function ngBindDirective(): import("../../types").Directive;
5
5
  /**
6
- * @returns {angular.IDirective}
6
+ * @returns {import('../../types').Directive}
7
7
  */
8
- export function ngBindTemplateDirective(): angular.IDirective;
8
+ export function ngBindTemplateDirective(): import("../../types").Directive;
9
9
  /**
10
10
  * TODO: add type
11
11
  */
@@ -1,4 +1,4 @@
1
1
  /**
2
- * @returns {angular.IDirective}
2
+ * @returns {import('../../types').Directive}
3
3
  */
4
- export function ngChangeDirective(): angular.IDirective;
4
+ export function ngChangeDirective(): import("../../types").Directive;
@@ -1,4 +1,4 @@
1
1
  /**
2
- * @returns {angular.IDirective}
2
+ * @returns {import('../../types').Directive}
3
3
  */
4
- export function ngCloakDirective(): angular.IDirective;
4
+ export function ngCloakDirective(): import("../../types").Directive;
@@ -1,4 +1,4 @@
1
1
  /**
2
- * @returns {angular.IDirective}
2
+ * @returns {import('../../types').Directive}
3
3
  */
4
- export function ngInitDirective(): angular.IDirective;
4
+ export function ngInitDirective(): import("../../types").Directive;
@@ -1,4 +1,4 @@
1
1
  /**
2
- * @returns {angular.IDirective}
2
+ * @returns {import('../../types').Directive}
3
3
  */
4
- export function ngListDirective(): angular.IDirective;
4
+ export function ngListDirective(): import("../../types").Directive;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  *
3
3
  * @param {*} $scope
4
- * @param {import('../../core/exception-handler').angular.ErrorHandler} $exceptionHandler
4
+ * @param {import('../../core/exception-handler').ErrorHandler} $exceptionHandler
5
5
  * @param {*} $attr
6
6
  * @param {*} $element
7
7
  * @param {*} $parse
@@ -10,12 +10,12 @@
10
10
  * @param {*} $q
11
11
  * @param {*} $interpolate
12
12
  */
13
- export function NgModelController($scope: any, $exceptionHandler: import("../../core/exception-handler").angular.ErrorHandler, $attr: any, $element: any, $parse: any, $animate: any, $timeout: any, $q: any, $interpolate: any): void;
13
+ export function NgModelController($scope: any, $exceptionHandler: import("../../core/exception-handler").ErrorHandler, $attr: any, $element: any, $parse: any, $animate: any, $timeout: any, $q: any, $interpolate: any): void;
14
14
  export class NgModelController {
15
15
  /**
16
16
  *
17
17
  * @param {*} $scope
18
- * @param {import('../../core/exception-handler').angular.ErrorHandler} $exceptionHandler
18
+ * @param {import('../../core/exception-handler').ErrorHandler} $exceptionHandler
19
19
  * @param {*} $attr
20
20
  * @param {*} $element
21
21
  * @param {*} $parse
@@ -24,7 +24,7 @@ export class NgModelController {
24
24
  * @param {*} $q
25
25
  * @param {*} $interpolate
26
26
  */
27
- constructor($scope: any, $exceptionHandler: import("../../core/exception-handler").angular.ErrorHandler, $attr: any, $element: any, $parse: any, $animate: any, $timeout: any, $q: any, $interpolate: any);
27
+ constructor($scope: any, $exceptionHandler: import("../../core/exception-handler").ErrorHandler, $attr: any, $element: any, $parse: any, $animate: any, $timeout: any, $q: any, $interpolate: any);
28
28
  $viewValue: number;
29
29
  $modelValue: number;
30
30
  $$rawModelValue: any;
@@ -54,7 +54,13 @@ export class NgModelController {
54
54
  $setSubmitted: () => void;
55
55
  $$setSubmitted: () => void;
56
56
  };
57
- $options: any;
57
+ $options: {
58
+ $$options: import("../model-options/model-options").ModelOptionsConfig;
59
+ getOption(name: string): string | boolean | number | {
60
+ [x: string]: number;
61
+ };
62
+ createChild(options: ModelOptionsConfig): any;
63
+ };
58
64
  $$updateEvents: string;
59
65
  $$updateEventHandler: any;
60
66
  $$parsedNgModel: any;
@@ -73,7 +79,7 @@ export class NgModelController {
73
79
  $$timeout: any;
74
80
  $$parse: any;
75
81
  $$q: any;
76
- $$exceptionHandler: import("../../core/exception-handler").angular.ErrorHandler;
82
+ $$exceptionHandler: import("../../core/exception-handler").ErrorHandler;
77
83
  $$initGetterSetters(): void;
78
84
  $render: () => void;
79
85
  /**
@@ -472,7 +478,7 @@ export class NgModelController {
472
478
  export namespace NgModelController {
473
479
  let $inject: string[];
474
480
  }
475
- export const ngModelMinErr: (arg0: string, arg1: string, ...arg2: any[]) => Error;
481
+ export const ngModelMinErr: (arg0: string, ...arg1: any[]) => Error;
476
482
  /**
477
483
  * @ngdoc directive
478
484
  * @name ngModel
@@ -0,0 +1,49 @@
1
+ export const defaultModelOptions: ModelOptions;
2
+ export function ngModelOptionsDirective(): import("../../types").Directive;
3
+ export type ModelOptionsConfig = {
4
+ /**
5
+ * - A string specifying which events the input should be bound to. Multiple events can be set using a space-delimited list. The special event 'default' matches the default events belonging to the control.
6
+ */
7
+ updateOn?: string;
8
+ /**
9
+ * - An integer specifying the debounce time in milliseconds. A value of 0 triggers an immediate update. If an object is supplied, custom debounce values can be set for each event.
10
+ */
11
+ debounce?: number | {
12
+ [x: string]: number;
13
+ };
14
+ /**
15
+ * - Indicates whether the model can be set with values that did not validate correctly. Defaults to false, which sets the model to undefined on validation failure.
16
+ */
17
+ allowInvalid?: boolean;
18
+ /**
19
+ * - Determines whether to treat functions bound to `ngModel` as getters/setters. Defaults to false.
20
+ */
21
+ getterSetter?: boolean;
22
+ updateOnDefault?: boolean;
23
+ };
24
+ /**
25
+ * @description
26
+ * A container for the options set by the {@link ngModelOptions} directive
27
+ */
28
+ declare class ModelOptions {
29
+ /**
30
+ * @param {ModelOptionsConfig} options
31
+ */
32
+ constructor(options: ModelOptionsConfig);
33
+ /** @type {ModelOptionsConfig} */
34
+ $$options: ModelOptionsConfig;
35
+ /**
36
+ * Returns the value of the given option
37
+ * @param {string} name the name of the option to retrieve
38
+ * @returns {string|boolean|number|Object.<string, number>} the value of the option *
39
+ */
40
+ getOption(name: string): string | boolean | number | {
41
+ [x: string]: number;
42
+ };
43
+ /**
44
+ * @param {ModelOptionsConfig} options a hash of options for the new child that will override the parent's options
45
+ * @return {ModelOptions} a new `ModelOptions` object initialized with the given options.
46
+ */
47
+ createChild(options: ModelOptionsConfig): ModelOptions;
48
+ }
49
+ export {};
@@ -1,5 +1,4 @@
1
1
  /**
2
- *
3
- * @returns {angular.IDirective}
2
+ * @returns {import('../../types').Directive}
4
3
  */
5
- export function ngNonBindableDirective(): angular.IDirective;
4
+ export function ngNonBindableDirective(): import("../../types").Directive;
@@ -1,4 +1,4 @@
1
1
  /**
2
- * @returns {angular.IDirective}
2
+ * @returns {import('../../types').Directive}
3
3
  */
4
- export function ngStyleDirective(): angular.IDirective;
4
+ export function ngStyleDirective(): import("../../types").Directive;
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @returns {angular.IDirective}
2
+ * @returns {import('../../types').Directive}
3
3
  */
4
- export function ngSwitchWhenDirective(): angular.IDirective;
4
+ export function ngSwitchWhenDirective(): import("../../types").Directive;
5
5
  /**
6
- * @returns {angular.IDirective}
6
+ * @returns {import('../../types').Directive}
7
7
  */
8
- export function ngSwitchDefaultDirective(): angular.IDirective;
8
+ export function ngSwitchDefaultDirective(): import("../../types").Directive;
9
9
  export const ngSwitchDirective: (string | (($animate: any) => {
10
10
  require: string;
11
11
  controller: (string | {