@angular-wave/angular.ts 0.0.40 → 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 (79) hide show
  1. package/README.md +28 -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/animations/animate-queue.js +7 -4
  6. package/src/core/compile/compile.js +5 -3
  7. package/src/core/compile/compile.md +2 -5
  8. package/src/core/compile/compile.spec.js +2 -43
  9. package/src/core/exception-handler.js +6 -6
  10. package/src/core/interpolate/interpolate.js +1 -1
  11. package/src/core/location/location.spec.js +0 -4
  12. package/src/core/q/q.js +1 -1
  13. package/src/core/scope/scope.js +1 -1
  14. package/src/core/task-tracker-factory.js +2 -2
  15. package/src/core/timeout/timeout.js +1 -1
  16. package/src/core/url-utils/url-utils.js +0 -2
  17. package/src/directive/bind/bind.js +2 -2
  18. package/src/directive/change/change.js +1 -1
  19. package/src/directive/cloak/cloak.js +1 -1
  20. package/src/directive/events/events.js +1 -1
  21. package/src/directive/form/form.js +2 -2
  22. package/src/directive/include/include.js +5 -7
  23. package/src/directive/init/init.js +1 -1
  24. package/src/directive/list/list.js +1 -1
  25. package/src/directive/model/model.js +1 -1
  26. package/src/directive/model-options/model-options.js +56 -421
  27. package/src/directive/model-options/model-options.md +407 -0
  28. package/src/directive/model-options/model-options.spec.js +1 -1
  29. package/src/directive/non-bindable/non-bindable.js +1 -2
  30. package/src/directive/options/options.js +3 -3
  31. package/src/directive/style/style.js +1 -1
  32. package/src/directive/switch/switch.js +2 -2
  33. package/src/directive/transclude/transclude.js +2 -2
  34. package/src/index.js +0 -461
  35. package/src/loader.js +1 -1
  36. package/src/public.js +1 -1
  37. package/src/router/template-factory.js +2 -2
  38. package/src/router/view-scroll.js +1 -1
  39. package/src/services/browser.js +1 -1
  40. package/src/services/document.js +2 -2
  41. package/src/services/http/http.js +11 -7
  42. package/src/services/log.js +1 -1
  43. package/src/services/template-request.js +1 -1
  44. package/src/shared/jqlite/jqlite.js +380 -351
  45. package/src/shared/jqlite/jqlite.spec.js +73 -82
  46. package/src/shared/utils.js +1 -1
  47. package/src/types.js +451 -0
  48. package/tsconfig.json +1 -1
  49. package/types/animations/shared.d.ts +7 -2
  50. package/types/core/compile/compile.d.ts +2 -1
  51. package/types/core/exception-handler.d.ts +5 -7
  52. package/types/core/interpolate/interpolate.d.ts +1 -1
  53. package/types/core/q/q.d.ts +1 -1
  54. package/types/core/task-tracker-factory.d.ts +5 -5
  55. package/types/core/timeout/timeout.d.ts +2 -2
  56. package/types/directive/bind/bind.d.ts +4 -4
  57. package/types/directive/change/change.d.ts +2 -2
  58. package/types/directive/cloak/cloak.d.ts +2 -2
  59. package/types/directive/include/include.d.ts +2 -2
  60. package/types/directive/init/init.d.ts +2 -2
  61. package/types/directive/list/list.d.ts +2 -2
  62. package/types/directive/model/model.d.ts +13 -7
  63. package/types/directive/model-options/model-options.d.ts +49 -0
  64. package/types/directive/non-bindable/non-bindable.d.ts +2 -3
  65. package/types/directive/style/style.d.ts +2 -2
  66. package/types/directive/switch/switch.d.ts +4 -4
  67. package/types/index.d.ts +1 -702
  68. package/types/public.d.ts +2 -2
  69. package/types/router/template-factory.d.ts +4 -4
  70. package/types/services/browser.d.ts +3 -3
  71. package/types/services/document.d.ts +6 -7
  72. package/types/services/log.d.ts +2 -2
  73. package/types/services/template-request.d.ts +1 -1
  74. package/types/shared/jqlite/jqlite.d.ts +91 -21
  75. package/types/shared/utils.d.ts +2 -2
  76. package/types/types.d.ts +438 -0
  77. package/types-back/index.d.ts +1 -83
  78. package/types-back/jqlite.d.ts +1 -121
  79. package/types-back/global.d.ts +0 -11
@@ -6,7 +6,11 @@ export function packageStyles(options: any): {
6
6
  };
7
7
  export function pendClasses(classes: any, fix: any, isPrefix: any): string;
8
8
  export function removeFromArray(arr: any, val: any): void;
9
- export function stripCommentsFromElement(element: any): any;
9
+ export function stripCommentsFromElement(element: any): JQLite | {
10
+ toString(): string;
11
+ eq(index: any): JQLite;
12
+ length: number;
13
+ };
10
14
  export function extractElementNode(element: any): any;
11
15
  export function applyAnimationClassesFactory(): (element: any, options: any) => void;
12
16
  export function prepareAnimationOptions(options: any): any;
@@ -47,4 +51,5 @@ export const ANIMATION_DELAY_PROP: string;
47
51
  export const ANIMATION_DURATION_PROP: string;
48
52
  export const TRANSITION_DELAY_PROP: string;
49
53
  export const TRANSITION_DURATION_PROP: string;
50
- export const ngMinErr: (arg0: string, arg1: string, ...arg2: any[]) => Error;
54
+ export const ngMinErr: (arg0: string, ...arg1: any[]) => Error;
55
+ import { JQLite } from "../shared/jqlite/jqlite";
@@ -162,7 +162,7 @@ export class $CompileProvider {
162
162
  * @returns {object} `this` for chaining
163
163
  */
164
164
  addPropertySecurityContext: (elementName: string, propertyName: string, ctx: string) => object;
165
- $get: (string | (($injector: any, $interpolate: any, $exceptionHandler: any, $templateRequest: any, $parse: any, $controller: any, $rootScope: any, $sce: any, $animate: any) => ($compileNodes: string | NodeList, transcludeFn: any, maxPriority: any, ignoreDirective: any, previousCompileContext: any) => (scope: any, cloneConnectFn: any, options: any) => any))[];
165
+ $get: (string | (($injector: any, $interpolate: any, $exceptionHandler: any, $templateRequest: any, $parse: any, $controller: any, $rootScope: any, $sce: any, $animate: any) => ($compileNodes: string | NodeList, transcludeFn: any, maxPriority: any, ignoreDirective: any, previousCompileContext: any) => (scope: any, cloneConnectFn: any, options: any) => string | NodeList | JQLite))[];
166
166
  }
167
167
  export namespace $CompileProvider {
168
168
  let $inject: string[];
@@ -171,3 +171,4 @@ export namespace $CompileProvider {
171
171
  * Function that aggregates all linking fns for a compilation root (nodeList)
172
172
  */
173
173
  export type CompositeLinkFn = Function;
174
+ import { JQLite } from "../../shared/jqlite/jqlite";
@@ -1,13 +1,11 @@
1
1
  /**
2
2
  * @constructor
3
- * @this {angular.ExceptionHandlerProvider}
3
+ * @this {ExceptionHandlerProvider}
4
4
  */
5
- export function $ExceptionHandlerProvider(this: import("../index").angular.ServiceProvider): void;
5
+ export function $ExceptionHandlerProvider(this: import("../types").ServiceProvider): void;
6
6
  export class $ExceptionHandlerProvider {
7
- $get: (string | (($log: import("../services/log").angular.LogService) => angular.ErrorHandler))[];
7
+ $get: (string | (($log: any) => ErrorHandler))[];
8
8
  }
9
9
  export function errorHandler(exception: any, cause: any): void;
10
- export namespace angular {
11
- type ExceptionHandlerProvider = import("../index").angular.ServiceProvider;
12
- type ErrorHandler = (exception: Error, cause?: string) => void;
13
- }
10
+ export type ExceptionHandlerProvider = import("../types").ServiceProvider;
11
+ export type ErrorHandler = (exception: Error, cause?: string) => void;
@@ -37,7 +37,7 @@ export class $InterpolateProvider {
37
37
  * @returns {string|self} Returns the symbol when used as getter and self if used as setter.
38
38
  */
39
39
  endSymbol: (value?: string | undefined) => string | (Window & typeof globalThis);
40
- $get: (string | (($parse: any, $exceptionHandler: import("../exception-handler").angular.ErrorHandler, $sce: any) => {
40
+ $get: (string | (($parse: any, $exceptionHandler: import("../exception-handler").ErrorHandler, $sce: any) => {
41
41
  (text: string, mustHaveExpression?: boolean | undefined, trustedContext?: string | undefined, allOrNothing?: boolean | undefined): (arg0: context) => any;
42
42
  /**
43
43
  * @ngdoc method
@@ -7,7 +7,7 @@
7
7
  */
8
8
  export function $QProvider(): void;
9
9
  export class $QProvider {
10
- $get: (string | (($rootScope: any, $exceptionHandler: import("../exception-handler").angular.ErrorHandler) => any))[];
10
+ $get: (string | (($rootScope: any, $exceptionHandler: import("../exception-handler").ErrorHandler) => any))[];
11
11
  /**
12
12
  * @ngdoc method
13
13
  * @name $qProvider#errorOnUnhandledRejections
@@ -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;
@@ -4,11 +4,11 @@ export const ngIncludeDirective: (string | (($templateRequest: any, $anchorScrol
4
4
  terminal: boolean;
5
5
  transclude: string;
6
6
  controller: () => void;
7
- compile(element: any, attr: any): (scope: any, $element: any, $attr: any, ctrl: any, $transclude: any) => void;
7
+ compile(_element: any, attr: any): (scope: any, $element: any, _$attr: any, ctrl: any, $transclude: any) => void;
8
8
  }))[];
9
9
  export const ngIncludeFillContentDirective: (string | (($compile: any) => {
10
10
  restrict: string;
11
11
  priority: number;
12
12
  require: string;
13
- link(scope: any, $element: any, $attr: any, ctrl: any): void;
13
+ link(scope: any, $element: any, _$attr: any, ctrl: any): void;
14
14
  }))[];
@@ -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 | {