@angular-wave/angular.ts 0.0.65 → 0.0.67

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/dist/angular-ts.esm.js +2 -2
  2. package/dist/angular-ts.umd.js +2 -2
  3. package/package.json +1 -1
  4. package/src/animations/animate-js.js +6 -0
  5. package/src/animations/animate-swap.js +3 -0
  6. package/src/animations/animation.js +1 -1
  7. package/src/core/compile/compile.js +16 -4
  8. package/src/core/controller/controller.js +5 -5
  9. package/src/core/di/injector.js +133 -259
  10. package/src/core/di/injector.md +3 -3
  11. package/src/core/di/injector.spec.js +30 -24
  12. package/src/core/di/internal-injector.js +286 -0
  13. package/src/core/filter/filter.js +5 -0
  14. package/src/core/parser/parse.js +1 -12
  15. package/src/core/parser/parse.spec.js +96 -110
  16. package/src/core/sce/sce.js +6 -1
  17. package/src/core/timeout/timeout.js +110 -111
  18. package/src/directive/input/input.js +32 -726
  19. package/src/directive/input/input.md +706 -0
  20. package/src/directive/select/select.js +48 -122
  21. package/src/directive/select/select.md +74 -0
  22. package/src/directive/show-hide/show-hide.js +13 -224
  23. package/src/directive/show-hide/show-hide.md +257 -0
  24. package/src/filters/limit-to.spec.js +1 -1
  25. package/src/filters/order-by.spec.js +1 -1
  26. package/src/index.js +6 -2
  27. package/src/loader.js +8 -4
  28. package/src/public.js +1 -7
  29. package/src/router/services.js +9 -4
  30. package/src/router/state/state-builder.js +6 -7
  31. package/src/router/state/state-registry.js +5 -0
  32. package/src/router/state/state-service.js +1 -1
  33. package/src/router/state/views.js +2 -1
  34. package/src/router/state-provider.js +1 -1
  35. package/src/router/template-factory.js +15 -14
  36. package/src/router/url/url-service.js +4 -4
  37. package/src/services/anchor-scroll.js +2 -2
  38. package/src/services/browser.js +2 -9
  39. package/src/services/cache-factory.js +0 -67
  40. package/src/services/cache-factory.md +75 -0
  41. package/src/services/cookie-reader.js +36 -55
  42. package/src/services/http/http.js +73 -586
  43. package/src/services/http/http.md +413 -0
  44. package/src/services/http-backend/http-backend.js +19 -44
  45. package/src/services/template-request.js +1 -9
  46. package/src/shared/jqlite/jqlite.js +4 -69
  47. package/src/types.js +8 -12
  48. package/types/animations/animate-js.d.ts +1 -1
  49. package/types/animations/animate-swap.d.ts +4 -7
  50. package/types/animations/animation.d.ts +1 -1
  51. package/types/core/compile/compile.d.ts +7 -7
  52. package/types/core/controller/controller.d.ts +1 -6
  53. package/types/core/di/injector.d.ts +13 -7
  54. package/types/core/di/internal-injector.d.ts +91 -0
  55. package/types/core/exception-handler.d.ts +1 -1
  56. package/types/core/filter/filter.d.ts +1 -1
  57. package/types/core/parser/parse.d.ts +1 -1
  58. package/types/core/sce/sce.d.ts +1 -1
  59. package/types/core/timeout/timeout.d.ts +16 -26
  60. package/types/directive/input/input.d.ts +19 -124
  61. package/types/directive/select/select.d.ts +7 -74
  62. package/types/directive/show-hide/show-hide.d.ts +11 -224
  63. package/types/loader.d.ts +4 -4
  64. package/types/router/services.d.ts +8 -1
  65. package/types/router/state/state-builder.d.ts +1 -2
  66. package/types/router/state/state-registry.d.ts +2 -2
  67. package/types/router/state/state-service.d.ts +2 -2
  68. package/types/router/state-provider.d.ts +2 -2
  69. package/types/router/template-factory.d.ts +16 -16
  70. package/types/router/url/url-service.d.ts +4 -4
  71. package/types/services/anchor-scroll.d.ts +1 -1
  72. package/types/services/browser.d.ts +0 -10
  73. package/types/services/cache-factory.d.ts +0 -67
  74. package/types/services/cookie-reader.d.ts +2 -10
  75. package/types/services/http/http.d.ts +53 -61
  76. package/types/services/http-backend/http-backend.d.ts +8 -31
  77. package/types/services/template-request.d.ts +1 -9
  78. package/types/shared/jqlite/jqlite.d.ts +9 -9
  79. package/types/types.d.ts +5 -38
package/src/types.js CHANGED
@@ -10,6 +10,13 @@
10
10
  * @template T
11
11
  */
12
12
 
13
+ /**
14
+ * @typedef {Object} Annotated
15
+ * @property {Array<String>} $inject
16
+ *
17
+ * @typedef {Function & Annotated & Array<any>} AnnotatedFunction
18
+ */
19
+
13
20
  /**
14
21
  * @typedef {Object} ComponentOptions
15
22
  * @description Component definition object (a simplified directive definition object)
@@ -307,7 +314,7 @@
307
314
 
308
315
  /**
309
316
  * Interface for a service provider.
310
- * @typedef {Object} ServiceProvider
317
+ * @typedef {Object|Function} ServiceProvider
311
318
  * @property {*} $get - The $get property that represents a service instance or a factory function.
312
319
  */
313
320
 
@@ -444,15 +451,4 @@
444
451
  * @property {function(any, any): IPromise<any>} [index] - Async validator function for each index.
445
452
  */
446
453
 
447
- /**
448
- * @typedef {Object} InjectorService
449
- * @property {function(Function, boolean=): string[]} annotate - Annotate a function or an array of inline annotations.
450
- * @property {function(string, string=): any} get - Get a service by name.
451
- * @property {function(Function, any?): any} instantiate - Instantiate a type constructor with optional locals.
452
- * @property {function(Injectable<Function | ((...args: any[]) => any)>, any=, any=): any} invoke - Invoke a function with optional context and locals.
453
- * @property {function(Array<Module | string | Injectable<(...args: any[]) => void>>): void} [loadNewModules] - Add and load new modules to the injector.
454
- * @property {Object.<string, Module>} [modules] - A map of all the modules loaded into the injector.
455
- * @property {boolean} [strictDi] - Indicates if strict dependency injection is enforced.
456
- */
457
-
458
454
  export {};
@@ -1,7 +1,7 @@
1
1
  export function $$AnimateJsProvider($animateProvider: any): void;
2
2
  export class $$AnimateJsProvider {
3
3
  constructor($animateProvider: any);
4
- $get: (string | (($injector: any, $$AnimateRunner: any) => (element: any, event: any, classes: any, options: any, ...args: any[]) => {
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;
6
6
  end(): any;
7
7
  start(): any;
@@ -1,10 +1,7 @@
1
- export function ngAnimateSwapDirective($animate: any): {
2
- restrict: string;
3
- transclude: string;
4
- terminal: boolean;
5
- priority: number;
6
- link(scope: any, $element: any, attrs: any, ctrl: any, $transclude: any): void;
7
- };
1
+ /**
2
+ * @returns {import('../types').Directive}
3
+ */
4
+ export function ngAnimateSwapDirective($animate: any): import("../types").Directive;
8
5
  export namespace ngAnimateSwapDirective {
9
6
  let $inject: string[];
10
7
  }
@@ -1,5 +1,5 @@
1
1
  export function $$AnimationProvider(): void;
2
2
  export class $$AnimationProvider {
3
3
  drivers: any[];
4
- $get: (string | (($rootScope: any, $injector: any, $$AnimateRunner: any, $$rAFScheduler: import("./raf-scheduler").RafScheduler, $$animateCache: any) => (element: any, event: any, options: any) => any))[];
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
  }
@@ -14,9 +14,9 @@ export class $CompileProvider {
14
14
  * are the factories.
15
15
  * @param {Function|Array} directiveFactory An injectable directive factory function. See the
16
16
  * {@link guide/directive directive guide} and the {@link $compile compile API} for more info.
17
- * @returns {ng.ICompileProvider} Self for chaining.
17
+ * @returns {$CompileProvider} Self for chaining.
18
18
  */
19
- directive: (name: string | any, directiveFactory: Function | any[]) => ng.ICompileProvider;
19
+ directive: (name: string | any, directiveFactory: Function | any[]) => $CompileProvider;
20
20
  /**
21
21
  * @ngdoc method
22
22
  * @name $compileProvider#component
@@ -122,10 +122,10 @@ export class $CompileProvider {
122
122
  * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.
123
123
  *
124
124
  * @param {RegExp=} regexp New regexp to trust urls with.
125
- * @returns {RegExp|ng.ICompileProvider} Current RegExp if called without value or self for
125
+ * @returns {RegExp|$CompileProvider} Current RegExp if called without value or self for
126
126
  * chaining otherwise.
127
127
  */
128
- aHrefSanitizationTrustedUrlList: (regexp?: RegExp | undefined) => RegExp | ng.ICompileProvider;
128
+ aHrefSanitizationTrustedUrlList: (regexp?: RegExp | undefined) => RegExp | $CompileProvider;
129
129
  /**
130
130
  * @ngdoc method
131
131
  * @name $compileProvider#imgSrcSanitizationTrustedUrlList
@@ -143,10 +143,10 @@ export class $CompileProvider {
143
143
  * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.
144
144
  *
145
145
  * @param {RegExp=} regexp New regexp to trust urls with.
146
- * @returns {RegExp|ng.ICompileProvider} Current RegExp if called without value or self for
146
+ * @returns {RegExp|$CompileProvider} Current RegExp if called without value or self for
147
147
  * chaining otherwise.
148
148
  */
149
- imgSrcSanitizationTrustedUrlList: (regexp?: RegExp | undefined) => RegExp | ng.ICompileProvider;
149
+ imgSrcSanitizationTrustedUrlList: (regexp?: RegExp | undefined) => RegExp | $CompileProvider;
150
150
  strictComponentBindingsEnabled: (enabled: any) => boolean | this;
151
151
  /**
152
152
  * @ngdoc method
@@ -161,7 +161,7 @@ export class $CompileProvider {
161
161
  * @returns {object} `this` for chaining
162
162
  */
163
163
  addPropertySecurityContext: (elementName: string, propertyName: string, ctx: string) => object;
164
- $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))[];
164
+ $get: (string | (($injector: import("../../core/di/internal-injector").InjectorService, $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))[];
165
165
  }
166
166
  export namespace $CompileProvider {
167
167
  let $inject: string[];
@@ -1,10 +1,5 @@
1
1
  export function identifierForController(controller: any, ident: any): any;
2
2
  /**
3
- * @ngdoc provider
4
- * @name $controllerProvider
5
- *
6
- *
7
- * @description
8
3
  * The {@link ng.$controller $controller service} is used by AngularJS to create new
9
4
  * controllers.
10
5
  *
@@ -28,5 +23,5 @@ export class $ControllerProvider {
28
23
  * annotations in the array notation).
29
24
  */
30
25
  register: (name: string | any, constructor: Function | any[]) => void;
31
- $get: (string | (($injector: any) => (expression: Function | string, locals: any, later: any, ident: any) => any))[];
26
+ $get: (string | (($injector: import("../../core/di/internal-injector").InjectorService) => (expression: Function | string, locals: any, later: any, ident: any) => any))[];
32
27
  }
@@ -2,11 +2,17 @@
2
2
  *
3
3
  * @param {Array<String|Function>} modulesToLoad
4
4
  * @param {boolean} [strictDi]
5
- * @returns {import("../../types").InjectorService}
5
+ * @returns {InjectorService}
6
6
  */
7
- export function createInjector(modulesToLoad: Array<string | Function>, strictDi?: boolean): import("../../types").InjectorService;
8
- export namespace createInjector {
9
- export { annotate as $$annotate };
10
- }
11
- declare function annotate(fn: any, strictDi: any, name: any): any;
12
- export {};
7
+ export function createInjector(modulesToLoad: Array<string | Function>, strictDi?: boolean): InjectorService;
8
+ /**
9
+ *
10
+ * @param {any} fn
11
+ * @param {boolean} [strictDi]
12
+ * @param {String} [name]
13
+ * @returns {Array<string>}
14
+ */
15
+ export function annotate(fn: any, strictDi?: boolean, name?: string): Array<string>;
16
+ /** @type {String[]} Used only for error reporting of circular dependencies*/
17
+ export const path: string[];
18
+ import { InjectorService } from "./internal-injector";
@@ -0,0 +1,91 @@
1
+ /**
2
+ * Injector for providers
3
+ * @extends AbstractInjector
4
+ */
5
+ export class ProviderInjector extends AbstractInjector {
6
+ /**
7
+ * @param {Object} cache
8
+ * @param {boolean} strictDi - Indicates if strict dependency injection is enforced.
9
+ */
10
+ constructor(cache: any, strictDi: boolean);
11
+ }
12
+ /**
13
+ * Injector for factories and services
14
+ * @extends AbstractInjector
15
+ */
16
+ export class InjectorService extends AbstractInjector {
17
+ /**
18
+ *
19
+ * @param {boolean} strictDi - Indicates if strict dependency injection is enforced.
20
+ * @param {ProviderInjector} providerInjector
21
+ */
22
+ constructor(strictDi: boolean, providerInjector: ProviderInjector);
23
+ providerInjector: ProviderInjector;
24
+ factory(serviceName: any): any;
25
+ /**
26
+ *
27
+ * @param {String} name
28
+ * @returns {boolean}
29
+ */
30
+ has(name: string): boolean;
31
+ }
32
+ declare class AbstractInjector {
33
+ /**
34
+ * @param {boolean} strictDi - Indicates if strict dependency injection is enforced.
35
+ */
36
+ constructor(strictDi: boolean);
37
+ /**
38
+ * @type {Object<String, Function>}
39
+ */
40
+ cache: any;
41
+ /** @type {boolean} */
42
+ strictDi: boolean;
43
+ path: any[];
44
+ /** @type {Object.<string, import("../../types").Module>} */
45
+ modules: {
46
+ [x: string]: import("../../types").Module;
47
+ };
48
+ /**
49
+ * Get a service by name.
50
+ *
51
+ * @param {String} serviceName
52
+ * @returns {any}
53
+ */
54
+ get(serviceName: string): any;
55
+ /**
56
+ * Get the injection arguments for a function.
57
+ *
58
+ * @param {Function|Array} fn
59
+ * @param {Object} locals
60
+ * @param {String} serviceName
61
+ * @returns
62
+ */
63
+ injectionArgs(fn: Function | any[], locals: any, serviceName: string): any[];
64
+ /**
65
+ * Invoke a function with optional context and locals.
66
+ *
67
+ * @param {Function|String|Array<any>} fn
68
+ * @param {*} [self]
69
+ * @param {Object} [locals]
70
+ * @param {String} [serviceName]
71
+ * @returns
72
+ */
73
+ invoke(fn: Function | string | Array<any>, self?: any, locals?: any, serviceName?: string): any;
74
+ /**
75
+ * Instantiate a type constructor with optional locals.
76
+ * @param {Function|Array} type
77
+ * @param {*} [locals]
78
+ * @param {String} [serviceName]
79
+ */
80
+ instantiate(type: Function | any[], locals?: any, serviceName?: string): any;
81
+ /**
82
+ * @abstract
83
+ */
84
+ loadNewModules(): void;
85
+ /**
86
+ * @abstract
87
+ * @param {String} _serviceName
88
+ */
89
+ factory(_serviceName: string): void;
90
+ }
91
+ export {};
@@ -2,7 +2,7 @@
2
2
  * @constructor
3
3
  * @this {ExceptionHandlerProvider}
4
4
  */
5
- export function $ExceptionHandlerProvider(this: import("../types").ServiceProvider): void;
5
+ export function $ExceptionHandlerProvider(this: any): void;
6
6
  export class $ExceptionHandlerProvider {
7
7
  $get: (string | (($log: any) => ErrorHandler))[];
8
8
  }
@@ -2,7 +2,7 @@ export function $FilterProvider($provide: any): void;
2
2
  export class $FilterProvider {
3
3
  constructor($provide: any);
4
4
  register: (name: any, factory: any) => any;
5
- $get: (string | (($injector: any) => (name: any) => any))[];
5
+ $get: (string | (($injector: import("../../core/di/internal-injector").InjectorService) => (name: any) => any))[];
6
6
  }
7
7
  export namespace $FilterProvider {
8
8
  let $inject: string[];
@@ -9,7 +9,7 @@
9
9
  * @property {function(any, any): any} assign - Assigns a value to a context. If value is not provided,
10
10
  */
11
11
  /**
12
- * @typedef {function} CompiledExpressionFunction
12
+ * @typedef {Function} CompiledExpressionFunction
13
13
  * @param {import('../scope/scope').Scope} context - An object against which any expressions embedded in the strings are evaluated against (typically a scope object).
14
14
  * @param {object} [locals] - local variables context object, useful for overriding values in `context`.
15
15
  * @param {any} [assign]
@@ -150,7 +150,7 @@ export class $SceDelegateProvider {
150
150
  * array (i.e. there is no `bannedResourceUrlList`.)
151
151
  */
152
152
  bannedResourceUrlList: (value: any, ...args: any[]) => any[];
153
- $get: (string | (($injector: any, $$sanitizeUri: any) => {
153
+ $get: (string | (($injector: import("../../core/di/internal-injector").InjectorService, $$sanitizeUri: any) => {
154
154
  trustAs: (type: string, trustedValue: any) => any;
155
155
  getTrusted: (type: string, maybeTrusted: any) => any;
156
156
  valueOf: (maybeTrusted: any) => any;
@@ -1,29 +1,19 @@
1
- /**
2
- *
3
- * @param {*} $rootScope
4
- * @param {*} $browser
5
- * @param {*} $q
6
- * @param {*} $$q
7
- * @param {import('../exception-handler').ErrorHandler} $exceptionHandler
8
- * @returns
9
- */
10
- export function $timeout($rootScope: any, $browser: any, $q: any, $$q: any, $exceptionHandler: import("../exception-handler").ErrorHandler): {
11
- (fn?: (() => any) | undefined, delay?: number | undefined, invokeApply?: boolean | undefined, ...args: any[]): Promise<any>;
12
- /**
13
- * @ngdoc method
14
- * @name $timeout#cancel
15
- *
16
- * @description
17
- * Cancels a task associated with the `promise`. As a result of this, the promise will be
18
- * resolved with a rejection.
19
- *
20
- * @param {Promise=} promise Promise returned by the `$timeout` function.
21
- * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully
22
- * canceled.
23
- */
24
- cancel(promise?: Promise<any> | undefined): boolean;
25
- };
26
1
  export function $TimeoutProvider(): void;
27
2
  export class $TimeoutProvider {
28
- $get: (string | typeof $timeout)[];
3
+ $get: (string | (($rootScope: import("../scope/scope").Scope, $browser: import("../../services/browser").Browser, $q: any, $$q: any, $exceptionHandler: import("../exception-handler").ErrorHandler) => {
4
+ (fn?: (() => any) | undefined, delay?: number | undefined, invokeApply?: boolean | undefined, ...args: any[]): Promise<any>;
5
+ /**
6
+ * @ngdoc method
7
+ * @name $timeout#cancel
8
+ *
9
+ * @description
10
+ * Cancels a task associated with the `promise`. As a result of this, the promise will be
11
+ * resolved with a rejection.
12
+ *
13
+ * @param {Promise=} promise Promise returned by the `$timeout` function.
14
+ * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully
15
+ * canceled.
16
+ */
17
+ cancel(promise?: Promise<any> | undefined): boolean;
18
+ }))[];
29
19
  }
@@ -8,136 +8,31 @@ export function countDecimals(num: any): number;
8
8
  export function isValidForStep(viewValue: any, stepBase: any, step: any): boolean;
9
9
  export function numberInputType(scope: any, element: any, attr: any, ctrl: any, $browser: any, $filter: any, $parse: any): void;
10
10
  export function rangeInputType(scope: any, element: any, attr: any, ctrl: any, $browser: any): void;
11
- export function hiddenInputBrowserCacheDirective(): {
11
+ /**
12
+ * @param {import('../../services/browser').Browser} $browser
13
+ * @param {*} $filter
14
+ * @param {*} $parse
15
+ * @returns
16
+ */
17
+ export function inputDirective($browser: import("../../services/browser").Browser, $filter: any, $parse: any): {
12
18
  restrict: string;
13
- priority: number;
14
- compile(_: any, attr: any): {
15
- pre(scope: any, element: any): void;
19
+ require: string[];
20
+ link: {
21
+ pre(scope: any, element: any, attr: any, ctrls: any): void;
16
22
  };
17
23
  };
24
+ export namespace inputDirective {
25
+ let $inject: string[];
26
+ }
18
27
  /**
19
- * @ngdoc directive
20
- * @name ngValue
21
- * @restrict A
22
- * @priority 100
23
- *
24
- * @description
25
- * Binds the given expression to the value of the element.
26
- *
27
- * It is mainly used on {@link input[radio] `input[radio]`} and option elements,
28
- * so that when the element is selected, the {@link ngModel `ngModel`} of that element (or its
29
- * {@link select `select`} parent element) is set to the bound value. It is especially useful
30
- * for dynamically generated lists using {@link ngRepeat `ngRepeat`}, as shown below.
31
- *
32
- * It can also be used to achieve one-way binding of a given expression to an input element
33
- * such as an `input[text]` or a `textarea`, when that element does not use ngModel.
34
- *
35
- * @element ANY
36
- * @param {string=} ngValue AngularJS expression, whose value will be bound to the `value` attribute
37
- * and `value` property of the element.
38
- *
28
+ * @returns {import('../../types').Directive}
39
29
  */
40
- export function ngValueDirective(): {
41
- restrict: string;
42
- priority: number;
43
- compile(tpl: any, tplAttr: any): (scope: any, elm: any, attr: any) => void;
44
- };
30
+ export function hiddenInputBrowserCacheDirective(): import("../../types").Directive;
31
+ /**
32
+ * @returns {import('../../types').Directive}
33
+ */
34
+ export function ngValueDirective(): import("../../types").Directive;
45
35
  export const ISO_DATE_REGEXP: RegExp;
46
36
  export const URL_REGEXP: RegExp;
47
37
  export const EMAIL_REGEXP: RegExp;
48
38
  export const VALIDITY_STATE_PROPERTY: "validity";
49
- /**
50
- * @ngdoc directive
51
- * @name textarea
52
- * @restrict E
53
- *
54
- * @description
55
- * HTML textarea element control with AngularJS data-binding. The data-binding and validation
56
- * properties of this element are exactly the same as those of the
57
- * {@link ng.directive:input input element}.
58
- *
59
- * @param {string} ngModel Assignable AngularJS expression to data-bind to.
60
- * @param {string=} name Property name of the form under which the control is published.
61
- * @param {string=} required Sets `required` validation error key if the value is not entered.
62
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
63
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
64
- * `required` when you want to data-bind to the `required` attribute.
65
- * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than
66
- * minlength.
67
- * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
68
- * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of any
69
- * length.
70
- * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel {@link ngModel.NgModelController#$viewValue $viewValue}
71
- * does not match a RegExp found by evaluating the AngularJS expression given in the attribute value.
72
- * If the expression evaluates to a RegExp object, then this is used directly.
73
- * If the expression evaluates to a string, then it will be converted to a RegExp
74
- * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
75
- * `new RegExp('^abc$')`.<br />
76
- * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
77
- * start at the index of the last search's match, thus not taking the whole input value into
78
- * account.
79
- * @param {string=} ngChange AngularJS expression to be executed when input changes due to user
80
- * interaction with the input element.
81
- * @param {boolean=} [ngTrim=true] If set to false AngularJS will not automatically trim the input.
82
- *
83
- * @knownIssue
84
- *
85
- * When specifying the `placeholder` attribute of `<textarea>`, Internet Explorer will temporarily
86
- * insert the placeholder value as the textarea's content. If the placeholder value contains
87
- * interpolation (`{{ ... }}`), an error will be logged in the console when AngularJS tries to update
88
- * the value of the by-then-removed text node. This doesn't affect the functionality of the
89
- * textarea, but can be undesirable.
90
- *
91
- * You can work around this Internet Explorer issue by using `ng-attr-placeholder` instead of
92
- * `placeholder` on textareas, whenever you need interpolation in the placeholder value. You can
93
- * find more details on `ngAttr` in the
94
- * [Interpolation](guide/interpolation#-ngattr-for-binding-to-arbitrary-attributes) section of the
95
- * Developer Guide.
96
- */
97
- /**
98
- * @ngdoc directive
99
- * @name input
100
- * @restrict E
101
- *
102
- * @description
103
- * HTML input element control. When used together with {@link ngModel `ngModel`}, it provides data-binding,
104
- * input state control, and validation.
105
- * Input control follows HTML5 input types and polyfills the HTML5 validation behavior for older browsers.
106
- *
107
- * <div class="alert alert-warning">
108
- * **Note:** Not every feature offered is available for all input types.
109
- * Specifically, data binding and event handling via `ng-model` is unsupported for `input[file]`.
110
- * </div>
111
- *
112
- * @param {string} ngModel Assignable AngularJS expression to data-bind to.
113
- * @param {string=} name Property name of the form under which the control is published.
114
- * @param {string=} required Sets `required` validation error key if the value is not entered.
115
- * @param {boolean=} ngRequired Sets `required` attribute if set to true
116
- * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than
117
- * minlength.
118
- * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
119
- * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of any
120
- * length.
121
- * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel {@link ngModel.NgModelController#$viewValue $viewValue}
122
- * value does not match a RegExp found by evaluating the AngularJS expression given in the attribute value.
123
- * If the expression evaluates to a RegExp object, then this is used directly.
124
- * If the expression evaluates to a string, then it will be converted to a RegExp
125
- * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
126
- * `new RegExp('^abc$')`.<br />
127
- * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
128
- * start at the index of the last search's match, thus not taking the whole input value into
129
- * account.
130
- * @param {string=} ngChange AngularJS expression to be executed when input changes due to user
131
- * interaction with the input element.
132
- * @param {boolean=} [ngTrim=true] If set to false AngularJS will not automatically trim the input.
133
- * This parameter is ignored for input[type=password] controls, which will never trim the
134
- * input.
135
- *
136
- */
137
- export const inputDirective: (string | (($browser: any, $filter: any, $parse: any) => {
138
- restrict: string;
139
- require: string[];
140
- link: {
141
- pre(scope: any, element: any, attr: any, ctrls: any): void;
142
- };
143
- }))[];
@@ -1,79 +1,12 @@
1
- export function selectDirective(): {
2
- restrict: string;
3
- require: string[];
4
- controller: typeof SelectController;
5
- priority: number;
6
- link: {
7
- pre: (scope: any, element: any, attr: any, ctrls: any) => void;
8
- post: (scope: any, element: any, attrs: any, ctrls: any) => void;
9
- };
10
- };
11
- export const optionDirective: (string | (($interpolate: any) => {
1
+ /**
2
+ * @returns {import('../../types').Directive}
3
+ */
4
+ export function selectDirective(): import("../../types").Directive;
5
+ export function optionDirective($interpolate: any): {
12
6
  restrict: string;
13
7
  priority: number;
14
8
  compile(element: any, attr: any): (scope: any, element: any, attr: any) => void;
15
- }))[];
16
- declare function SelectController($element: any, $scope: any): void;
17
- declare class SelectController {
18
- constructor($element: any, $scope: any);
19
- selectValueMap: {};
20
- ngModelCtrl: {
21
- $setViewValue: () => void;
22
- $render: () => void;
23
- };
24
- multiple: boolean;
25
- unknownOption: JQLite;
26
- hasEmptyOption: boolean;
27
- emptyOption: any;
28
- renderUnknownOption: (val: any) => void;
29
- updateUnknownOption: (val: any) => void;
30
- generateUnknownOptionValue: (val: any) => string;
31
- removeUnknownOption: () => void;
32
- selectEmptyOption: () => void;
33
- unselectEmptyOption: () => void;
34
- readValue: () => any;
35
- writeValue: (value: any) => void;
36
- addOption: (value: any, element: any) => void;
37
- removeOption: (value: any) => void;
38
- hasOption: (value: any) => boolean;
39
- /**
40
- * @ngdoc method
41
- * @name select.SelectController#$hasEmptyOption
42
- *
43
- * @description
44
- *
45
- * Returns `true` if the select element currently has an empty option
46
- * element, i.e. an option that signifies that the select is empty / the selection is null.
47
- *
48
- */
49
- $hasEmptyOption: () => boolean;
50
- /**
51
- * @ngdoc method
52
- * @name select.SelectController#$isUnknownOptionSelected
53
- *
54
- * @description
55
- *
56
- * Returns `true` if the select element's unknown option is selected. The unknown option is added
57
- * and automatically selected whenever the select model doesn't match any option.
58
- *
59
- */
60
- $isUnknownOptionSelected: () => boolean;
61
- /**
62
- * @ngdoc method
63
- * @name select.SelectController#$isEmptyOptionSelected
64
- *
65
- * @description
66
- *
67
- * Returns `true` if the select element has an empty option and this empty option is currently
68
- * selected. Returns `false` if the select element has no empty option or it is not selected.
69
- *
70
- */
71
- $isEmptyOptionSelected: () => boolean;
72
- selectUnknownOrEmptyOption: (value: any) => void;
73
- registerOption: (optionScope: any, optionElement: any, optionAttrs: any, interpolateValueFn: any, interpolateTextFn: any) => void;
74
- }
75
- declare namespace SelectController {
9
+ };
10
+ export namespace optionDirective {
76
11
  let $inject: string[];
77
12
  }
78
- import { JQLite } from "../../shared/jqlite/jqlite";
79
- export {};