@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.
- package/README.md +28 -0
- 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-queue.js +7 -4
- package/src/core/compile/compile.js +5 -3
- package/src/core/compile/compile.md +2 -5
- package/src/core/compile/compile.spec.js +2 -43
- package/src/core/exception-handler.js +6 -6
- package/src/core/interpolate/interpolate.js +1 -1
- package/src/core/location/location.spec.js +0 -4
- package/src/core/q/q.js +1 -1
- package/src/core/scope/scope.js +1 -1
- package/src/core/task-tracker-factory.js +2 -2
- package/src/core/timeout/timeout.js +1 -1
- package/src/core/url-utils/url-utils.js +0 -2
- package/src/directive/bind/bind.js +2 -2
- package/src/directive/change/change.js +1 -1
- package/src/directive/cloak/cloak.js +1 -1
- package/src/directive/events/events.js +1 -1
- package/src/directive/form/form.js +2 -2
- package/src/directive/include/include.js +5 -7
- package/src/directive/init/init.js +1 -1
- package/src/directive/list/list.js +1 -1
- package/src/directive/model/model.js +1 -1
- package/src/directive/model-options/model-options.js +56 -421
- package/src/directive/model-options/model-options.md +407 -0
- package/src/directive/model-options/model-options.spec.js +1 -1
- package/src/directive/non-bindable/non-bindable.js +1 -2
- package/src/directive/options/options.js +3 -3
- package/src/directive/style/style.js +1 -1
- package/src/directive/switch/switch.js +2 -2
- package/src/directive/transclude/transclude.js +2 -2
- package/src/index.js +0 -461
- package/src/loader.js +1 -1
- package/src/public.js +1 -1
- package/src/router/template-factory.js +2 -2
- package/src/router/view-scroll.js +1 -1
- package/src/services/browser.js +1 -1
- package/src/services/document.js +2 -2
- package/src/services/http/http.js +11 -7
- package/src/services/log.js +1 -1
- package/src/services/template-request.js +1 -1
- package/src/shared/jqlite/jqlite.js +380 -351
- package/src/shared/jqlite/jqlite.spec.js +73 -82
- package/src/shared/utils.js +1 -1
- package/src/types.js +451 -0
- package/tsconfig.json +1 -1
- package/types/animations/shared.d.ts +7 -2
- package/types/core/compile/compile.d.ts +2 -1
- package/types/core/exception-handler.d.ts +5 -7
- package/types/core/interpolate/interpolate.d.ts +1 -1
- package/types/core/q/q.d.ts +1 -1
- package/types/core/task-tracker-factory.d.ts +5 -5
- package/types/core/timeout/timeout.d.ts +2 -2
- package/types/directive/bind/bind.d.ts +4 -4
- package/types/directive/change/change.d.ts +2 -2
- package/types/directive/cloak/cloak.d.ts +2 -2
- package/types/directive/include/include.d.ts +2 -2
- package/types/directive/init/init.d.ts +2 -2
- package/types/directive/list/list.d.ts +2 -2
- package/types/directive/model/model.d.ts +13 -7
- package/types/directive/model-options/model-options.d.ts +49 -0
- package/types/directive/non-bindable/non-bindable.d.ts +2 -3
- package/types/directive/style/style.d.ts +2 -2
- package/types/directive/switch/switch.d.ts +4 -4
- package/types/index.d.ts +1 -702
- package/types/public.d.ts +2 -2
- package/types/router/template-factory.d.ts +4 -4
- package/types/services/browser.d.ts +3 -3
- package/types/services/document.d.ts +6 -7
- package/types/services/log.d.ts +2 -2
- package/types/services/template-request.d.ts +1 -1
- package/types/shared/jqlite/jqlite.d.ts +91 -21
- package/types/shared/utils.d.ts +2 -2
- package/types/types.d.ts +438 -0
- package/types-back/index.d.ts +1 -83
- package/types-back/jqlite.d.ts +1 -121
- 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):
|
|
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:
|
|
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) =>
|
|
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 {
|
|
3
|
+
* @this {ExceptionHandlerProvider}
|
|
4
4
|
*/
|
|
5
|
-
export function $ExceptionHandlerProvider(this: import("../
|
|
5
|
+
export function $ExceptionHandlerProvider(this: import("../types").ServiceProvider): void;
|
|
6
6
|
export class $ExceptionHandlerProvider {
|
|
7
|
-
$get: (string | (($log:
|
|
7
|
+
$get: (string | (($log: any) => ErrorHandler))[];
|
|
8
8
|
}
|
|
9
9
|
export function errorHandler(exception: any, cause: any): void;
|
|
10
|
-
export
|
|
11
|
-
|
|
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").
|
|
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
|
package/types/core/q/q.d.ts
CHANGED
|
@@ -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").
|
|
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:
|
|
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').
|
|
14
|
+
* @param {import('../services/log').LogService} log
|
|
15
15
|
*/
|
|
16
|
-
export function TaskTracker(log:
|
|
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').
|
|
27
|
+
* @param {import('../services/log').LogService} log
|
|
28
28
|
*/
|
|
29
|
-
constructor(log:
|
|
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').
|
|
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").
|
|
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 {
|
|
2
|
+
* @returns {import('../../types').Directive}
|
|
3
3
|
*/
|
|
4
|
-
export function ngBindDirective():
|
|
4
|
+
export function ngBindDirective(): import("../../types").Directive;
|
|
5
5
|
/**
|
|
6
|
-
* @returns {
|
|
6
|
+
* @returns {import('../../types').Directive}
|
|
7
7
|
*/
|
|
8
|
-
export function ngBindTemplateDirective():
|
|
8
|
+
export function ngBindTemplateDirective(): import("../../types").Directive;
|
|
9
9
|
/**
|
|
10
10
|
* TODO: add type
|
|
11
11
|
*/
|
|
@@ -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(
|
|
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,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
*
|
|
3
3
|
* @param {*} $scope
|
|
4
|
-
* @param {import('../../core/exception-handler').
|
|
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").
|
|
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').
|
|
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").
|
|
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:
|
|
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").
|
|
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:
|
|
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,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @returns {
|
|
2
|
+
* @returns {import('../../types').Directive}
|
|
3
3
|
*/
|
|
4
|
-
export function ngSwitchWhenDirective():
|
|
4
|
+
export function ngSwitchWhenDirective(): import("../../types").Directive;
|
|
5
5
|
/**
|
|
6
|
-
* @returns {
|
|
6
|
+
* @returns {import('../../types').Directive}
|
|
7
7
|
*/
|
|
8
|
-
export function ngSwitchDefaultDirective():
|
|
8
|
+
export function ngSwitchDefaultDirective(): import("../../types").Directive;
|
|
9
9
|
export const ngSwitchDirective: (string | (($animate: any) => {
|
|
10
10
|
require: string;
|
|
11
11
|
controller: (string | {
|