@angular-wave/angular.ts 0.0.66 → 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.
- package/dist/angular-ts.esm.js +2 -2
- package/dist/angular-ts.umd.js +2 -2
- package/package.json +1 -1
- package/src/animations/animate-js.js +4 -4
- package/src/animations/animate-swap.js +3 -0
- package/src/core/compile/compile.js +3 -3
- package/src/core/controller/controller.js +0 -5
- package/src/core/di/injector.js +9 -12
- package/src/core/di/internal-injector.js +113 -60
- package/src/core/parser/parse.js +1 -12
- package/src/core/parser/parse.spec.js +96 -110
- package/src/core/timeout/timeout.js +110 -111
- package/src/directive/input/input.js +32 -726
- package/src/directive/input/input.md +706 -0
- package/src/directive/select/select.js +48 -122
- package/src/directive/select/select.md +74 -0
- package/src/directive/show-hide/show-hide.js +13 -224
- package/src/directive/show-hide/show-hide.md +257 -0
- package/src/filters/limit-to.spec.js +1 -1
- package/src/filters/order-by.spec.js +1 -1
- package/src/index.js +6 -2
- package/src/loader.js +7 -3
- package/src/public.js +1 -7
- package/src/router/state/state-builder.js +2 -4
- package/src/router/state/state-service.js +1 -1
- package/src/router/state-provider.js +1 -1
- package/src/router/template-factory.js +10 -10
- package/src/router/url/url-service.js +4 -4
- package/src/services/anchor-scroll.js +2 -2
- package/src/services/browser.js +2 -9
- package/src/services/cache-factory.js +0 -67
- package/src/services/cache-factory.md +75 -0
- package/src/services/cookie-reader.js +36 -55
- package/src/services/http/http.js +62 -587
- package/src/services/http/http.md +413 -0
- package/src/services/http-backend/http-backend.js +19 -44
- package/src/services/template-request.js +1 -9
- package/src/shared/jqlite/jqlite.js +4 -69
- package/src/types.js +2 -4
- package/types/animations/animate-swap.d.ts +4 -7
- package/types/core/compile/compile.d.ts +6 -6
- package/types/core/controller/controller.d.ts +0 -5
- package/types/core/di/internal-injector.d.ts +73 -18
- package/types/core/exception-handler.d.ts +1 -1
- package/types/core/parser/parse.d.ts +1 -1
- package/types/core/timeout/timeout.d.ts +16 -26
- package/types/directive/input/input.d.ts +19 -124
- package/types/directive/select/select.d.ts +7 -74
- package/types/directive/show-hide/show-hide.d.ts +11 -224
- package/types/loader.d.ts +4 -4
- package/types/router/state/state-builder.d.ts +1 -2
- package/types/router/state/state-service.d.ts +2 -2
- package/types/router/state-provider.d.ts +2 -2
- package/types/router/template-factory.d.ts +15 -15
- package/types/router/url/url-service.d.ts +4 -4
- package/types/services/anchor-scroll.d.ts +1 -1
- package/types/services/browser.d.ts +0 -10
- package/types/services/cache-factory.d.ts +0 -67
- package/types/services/cookie-reader.d.ts +2 -10
- package/types/services/http/http.d.ts +53 -61
- package/types/services/http-backend/http-backend.d.ts +8 -31
- package/types/services/template-request.d.ts +1 -9
- package/types/shared/jqlite/jqlite.d.ts +9 -9
- package/types/types.d.ts +1 -9
package/src/types.js
CHANGED
|
@@ -11,12 +11,10 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
15
14
|
* @typedef {Object} Annotated
|
|
16
15
|
* @property {Array<String>} $inject
|
|
17
|
-
* *
|
|
18
|
-
* @typedef {Function & Annotated & Array<any>} AnnotatedFunction
|
|
19
16
|
*
|
|
17
|
+
* @typedef {Function & Annotated & Array<any>} AnnotatedFunction
|
|
20
18
|
*/
|
|
21
19
|
|
|
22
20
|
/**
|
|
@@ -316,7 +314,7 @@
|
|
|
316
314
|
|
|
317
315
|
/**
|
|
318
316
|
* Interface for a service provider.
|
|
319
|
-
* @typedef {Object} ServiceProvider
|
|
317
|
+
* @typedef {Object|Function} ServiceProvider
|
|
320
318
|
* @property {*} $get - The $get property that represents a service instance or a factory function.
|
|
321
319
|
*/
|
|
322
320
|
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
}
|
|
@@ -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 {
|
|
17
|
+
* @returns {$CompileProvider} Self for chaining.
|
|
18
18
|
*/
|
|
19
|
-
directive: (name: string | any, directiveFactory: Function | any[]) =>
|
|
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
|
|
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 |
|
|
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
|
|
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 |
|
|
149
|
+
imgSrcSanitizationTrustedUrlList: (regexp?: RegExp | undefined) => RegExp | $CompileProvider;
|
|
150
150
|
strictComponentBindingsEnabled: (enabled: any) => boolean | this;
|
|
151
151
|
/**
|
|
152
152
|
* @ngdoc method
|
|
@@ -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
|
*
|
|
@@ -1,36 +1,91 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Injector for providers
|
|
3
|
+
* @extends AbstractInjector
|
|
4
|
+
*/
|
|
5
|
+
export class ProviderInjector extends AbstractInjector {
|
|
2
6
|
/**
|
|
3
|
-
*
|
|
4
7
|
* @param {Object} cache
|
|
5
|
-
* @param {boolean} strictDi
|
|
8
|
+
* @param {boolean} strictDi - Indicates if strict dependency injection is enforced.
|
|
6
9
|
*/
|
|
7
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
|
+
*/
|
|
8
40
|
cache: any;
|
|
41
|
+
/** @type {boolean} */
|
|
9
42
|
strictDi: boolean;
|
|
10
43
|
path: any[];
|
|
11
|
-
|
|
12
|
-
modules:
|
|
13
|
-
|
|
44
|
+
/** @type {Object.<string, import("../../types").Module>} */
|
|
45
|
+
modules: {
|
|
46
|
+
[x: string]: import("../../types").Module;
|
|
47
|
+
};
|
|
14
48
|
/**
|
|
49
|
+
* Get a service by name.
|
|
15
50
|
*
|
|
16
51
|
* @param {String} serviceName
|
|
17
52
|
* @returns {any}
|
|
18
53
|
*/
|
|
19
54
|
get(serviceName: string): any;
|
|
20
|
-
injectionArgs(fn: any, locals: any, serviceName: any): any[];
|
|
21
|
-
invoke(fn: any, self: any, locals: any, serviceName: any): any;
|
|
22
|
-
instantiate(Type: any, locals: any, serviceName: any): any;
|
|
23
55
|
/**
|
|
56
|
+
* Get the injection arguments for a function.
|
|
24
57
|
*
|
|
25
|
-
* @param {
|
|
26
|
-
* @
|
|
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
|
|
27
83
|
*/
|
|
28
|
-
has(name: string): boolean;
|
|
29
|
-
}
|
|
30
|
-
export class InjectorService extends ProviderInjector {
|
|
31
|
-
constructor(cache: any, strictDi: any, providerInjector: any);
|
|
32
|
-
strictDi: any;
|
|
33
|
-
providerInjector: any;
|
|
34
|
-
factory(serviceName: any, caller: any): any;
|
|
35
84
|
loadNewModules(): void;
|
|
85
|
+
/**
|
|
86
|
+
* @abstract
|
|
87
|
+
* @param {String} _serviceName
|
|
88
|
+
*/
|
|
89
|
+
factory(_serviceName: string): void;
|
|
36
90
|
}
|
|
91
|
+
export {};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @constructor
|
|
3
3
|
* @this {ExceptionHandlerProvider}
|
|
4
4
|
*/
|
|
5
|
-
export function $ExceptionHandlerProvider(this:
|
|
5
|
+
export function $ExceptionHandlerProvider(this: any): void;
|
|
6
6
|
export class $ExceptionHandlerProvider {
|
|
7
7
|
$get: (string | (($log: any) => ErrorHandler))[];
|
|
8
8
|
}
|
|
@@ -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 {
|
|
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]
|
|
@@ -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 |
|
|
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
|
-
|
|
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
|
-
|
|
14
|
-
|
|
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
|
-
* @
|
|
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
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
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 {};
|