@angular-wave/angular.ts 0.0.38 → 0.0.39
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/Makefile +6 -5
- package/dist/angular-ts.esm.js +2 -1
- package/dist/angular-ts.umd.js +1 -1
- package/package.json +2 -4
- package/rollup.config.js +5 -1
- package/src/core/scope/scope.js +4 -7
- package/src/index.js +307 -1
- package/src/loader.js +13 -6
- package/src/public.js +7 -2
- package/src/src.test.js +10 -0
- package/tsconfig.json +1 -1
- package/tsconfig.types.json +11 -0
- package/types/animations/animate-cache.d.ts +7 -7
- package/types/animations/animate-children-directive.d.ts +3 -6
- package/types/animations/animate-swap.d.ts +7 -16
- package/types/animations/animation.d.ts +2 -11
- package/types/animations/raf-scheduler.d.ts +3 -3
- package/types/animations/shared.d.ts +8 -23
- package/types/core/{animate-css.d.ts → animate/animate-css.d.ts} +2 -8
- package/types/core/{cache.d.ts → cache/cache.d.ts} +5 -5
- package/types/core/compile/compile.d.ts +173 -0
- package/types/core/controller/controller.d.ts +32 -0
- package/types/core/exception-handler.d.ts +1 -1
- package/types/core/filter/filter.d.ts +9 -0
- package/types/core/{interpolate.d.ts → interpolate/interpolate.d.ts} +23 -39
- package/types/core/interval/interval-factory.d.ts +4 -0
- package/types/core/{interval.d.ts → interval/interval.d.ts} +1 -1
- package/types/core/location/location.d.ts +209 -0
- package/types/core/pubsub/pubsub.d.ts +156 -0
- package/types/core/q/q.d.ts +31 -0
- package/types/core/sanitize/sanitize-uri.d.ts +53 -0
- package/types/core/{sce.d.ts → sce/sce.d.ts} +80 -86
- package/types/core/scope/scope.d.ts +727 -0
- package/types/core/task-tracker-factory.d.ts +29 -29
- package/types/core/timeout/timeout.d.ts +20 -0
- package/types/core/{urlUtils.d.ts → url-utils/url-utils.d.ts} +2 -7
- package/types/directive/{bind.d.ts → bind/bind.d.ts} +4 -10
- package/types/directive/{class.d.ts → class/class.d.ts} +12 -21
- package/types/directive/controller/controller.d.ts +6 -0
- package/types/directive/events/events.d.ts +5 -0
- package/types/directive/form/form.d.ts +200 -0
- package/types/directive/if/if.d.ts +8 -0
- package/types/directive/include/include.d.ts +14 -0
- package/types/directive/{input.d.ts → input/input.d.ts} +20 -69
- package/types/directive/{model.d.ts → model/model.d.ts} +256 -279
- package/types/directive/options/options.d.ts +9 -0
- package/types/directive/ref/ref.d.ts +5 -0
- package/types/directive/repeat/repeat.d.ts +8 -0
- package/types/directive/{script.d.ts → script/script.d.ts} +5 -8
- package/types/directive/{show-hide.d.ts → show-hide/show-hide.d.ts} +10 -16
- package/types/directive/switch/switch.d.ts +17 -0
- package/types/directive/transclude/transclude.d.ts +4 -0
- package/types/directive/{validators.d.ts → validators/validators.d.ts} +20 -35
- package/types/filters/filters.d.ts +10 -16
- package/types/filters/order-by.d.ts +2 -4
- package/types/index.d.ts +117 -0
- package/types/injector.d.ts +12 -0
- package/types/public.d.ts +5 -0
- package/types/router/common/coreservices.d.ts +2 -2
- package/types/router/common/glob.d.ts +9 -9
- package/types/router/common/queue.d.ts +13 -13
- package/types/router/common/trace.d.ts +43 -43
- package/types/router/directives/view-directive.d.ts +13 -32
- package/types/router/globals.d.ts +20 -20
- package/types/router/hooks/lazy-load.d.ts +2 -11
- package/types/router/hooks/redirect-to.d.ts +1 -4
- package/types/router/hooks/url.d.ts +1 -5
- package/types/router/hooks/views.d.ts +1 -4
- package/types/router/params/param-factory.d.ts +5 -5
- package/types/router/params/param-type.d.ts +35 -35
- package/types/router/params/param-types.d.ts +11 -11
- package/types/router/params/param.d.ts +38 -38
- package/types/router/params/state-params.d.ts +10 -10
- package/types/router/path/path-node.d.ts +34 -34
- package/types/router/path/path-utils.d.ts +73 -77
- package/types/router/resolve/resolvable.d.ts +32 -32
- package/types/router/resolve/resolve-context.d.ts +84 -84
- package/types/router/services.d.ts +4 -9
- package/types/router/state/state-builder.d.ts +27 -27
- package/types/router/state/state-matcher.d.ts +5 -5
- package/types/router/state/state-object.d.ts +58 -58
- package/types/router/state/state-queue-manager.d.ts +10 -16
- package/types/router/state/state-registry.d.ts +100 -107
- package/types/router/state/state-service.d.ts +411 -411
- package/types/router/state/target-state.d.ts +64 -69
- package/types/router/state/views.d.ts +31 -37
- package/types/router/state-filters.d.ts +7 -7
- package/types/router/state-provider.d.ts +105 -105
- package/types/router/template-factory.d.ts +83 -112
- package/types/router/transition/hook-builder.d.ts +25 -25
- package/types/router/transition/hook-registry.d.ts +68 -83
- package/types/router/transition/interface.d.ts +7 -7
- package/types/router/transition/reject-factory.d.ts +34 -34
- package/types/router/transition/transition-event-type.d.ts +9 -18
- package/types/router/transition/transition-hook.d.ts +77 -82
- package/types/router/transition/transition-service.d.ts +82 -99
- package/types/router/transition/transition.d.ts +369 -377
- package/types/router/url/url-config.d.ts +84 -84
- package/types/router/url/url-matcher.d.ts +115 -119
- package/types/router/url/url-rule.d.ts +114 -124
- package/types/router/url/url-rules.d.ts +217 -217
- package/types/router/url/url-service.d.ts +264 -269
- package/types/router/view/view.d.ts +114 -117
- package/types/router/view-scroll.d.ts +2 -2
- package/types/services/anchor-scroll.d.ts +2 -8
- package/types/services/browser.d.ts +122 -130
- package/types/services/cache-factory.d.ts +25 -25
- package/types/services/cookie-reader.d.ts +2 -2
- package/types/services/document.d.ts +2 -2
- package/types/services/http/http.d.ts +145 -0
- package/types/services/{http-backend.d.ts → http-backend/http-backend.d.ts} +3 -35
- package/types/services/log.d.ts +49 -49
- package/types/services/template-request.d.ts +44 -53
- package/types/shared/common.d.ts +4 -19
- package/types/{constants.d.ts → shared/constants.d.ts} +6 -6
- package/types/shared/hof.d.ts +1 -1
- package/types/{jqLite.d.ts → shared/jqlite/jqlite.d.ts} +11 -11
- package/types/shared/test-utils.d.ts +11 -0
- package/types/shared/utils.d.ts +7 -24
- package/types-back/global.d.ts +3 -1
- package/types-back/index.d.ts +2 -221
- package/types/core/compile.d.ts +0 -206
- package/types/core/controller.d.ts +0 -42
- package/types/core/filter.d.ts +0 -9
- package/types/core/interval-factory.d.ts +0 -21
- package/types/core/location.d.ts +0 -234
- package/types/core/pubsub.d.ts +0 -164
- package/types/core/q.d.ts +0 -33
- package/types/core/root-scope.d.ts +0 -754
- package/types/core/sanitize-uri.d.ts +0 -57
- package/types/core/timeout.d.ts +0 -31
- package/types/directive/controller.d.ts +0 -6
- package/types/directive/events.d.ts +0 -12
- package/types/directive/form.d.ts +0 -230
- package/types/directive/if.d.ts +0 -17
- package/types/directive/include.d.ts +0 -33
- package/types/directive/options.d.ts +0 -16
- package/types/directive/ref.d.ts +0 -11
- package/types/directive/repeat.d.ts +0 -23
- package/types/directive/switch.d.ts +0 -23
- package/types/directive/transclude.d.ts +0 -15
- package/types/services/http.d.ts +0 -157
- /package/types/directive/{attrs.d.ts → attrs/attrs.d.ts} +0 -0
- /package/types/directive/{change.d.ts → change/change.d.ts} +0 -0
- /package/types/directive/{cloak.d.ts → cloak/cloak.d.ts} +0 -0
- /package/types/directive/{init.d.ts → init/init.d.ts} +0 -0
- /package/types/directive/{list.d.ts → list/list.d.ts} +0 -0
- /package/types/directive/{non-bindable.d.ts → non-bindable/non-bindable.d.ts} +0 -0
- /package/types/directive/{style.d.ts → style/style.d.ts} +0 -0
- /package/types/exts/{aria.d.ts → aria/aria.d.ts} +0 -0
- /package/types/exts/{messages.d.ts → messages/messages.d.ts} +0 -0
|
@@ -15,36 +15,36 @@
|
|
|
15
15
|
*/
|
|
16
16
|
export function $$TaskTrackerFactoryProvider(): void;
|
|
17
17
|
export class $$TaskTrackerFactoryProvider {
|
|
18
|
-
|
|
18
|
+
$get: () => any;
|
|
19
19
|
}
|
|
20
20
|
export function TaskTracker(log: any): void;
|
|
21
21
|
export class TaskTracker {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
22
|
+
constructor(log: any);
|
|
23
|
+
ALL_TASKS_TYPE: string;
|
|
24
|
+
DEFAULT_TASK_TYPE: string;
|
|
25
|
+
/**
|
|
26
|
+
* Execute the specified function and decrement the appropriate `taskCounts` counter.
|
|
27
|
+
* If the counter reaches 0, all corresponding `taskCallbacks` are executed.
|
|
28
|
+
*
|
|
29
|
+
* @param {Function} fn - The function to execute.
|
|
30
|
+
* @param {string=} [taskType=DEFAULT_TASK_TYPE] - The type of task that is being completed.
|
|
31
|
+
*/
|
|
32
|
+
completeTask: (fn: any, taskType: any) => void;
|
|
33
|
+
/**
|
|
34
|
+
* Increase the task count for the specified task type (or the default task type if non is
|
|
35
|
+
* specified).
|
|
36
|
+
*
|
|
37
|
+
* @param {string=} [taskType=DEFAULT_TASK_TYPE] - The type of task whose count will be increased.
|
|
38
|
+
*/
|
|
39
|
+
incTaskCount: (taskType: any) => void;
|
|
40
|
+
/**
|
|
41
|
+
* Execute the specified callback when all pending tasks have been completed.
|
|
42
|
+
*
|
|
43
|
+
* If there are no pending tasks, the callback is executed immediately. You can optionally limit
|
|
44
|
+
* the tasks that will be waited for to a specific type, by passing a `taskType`.
|
|
45
|
+
*
|
|
46
|
+
* @param {function} callback - The function to call when there are no pending tasks.
|
|
47
|
+
* @param {string=} [taskType=ALL_TASKS_TYPE] - The type of tasks that will be waited for.
|
|
48
|
+
*/
|
|
49
|
+
notifyWhenNoPendingTasks: (callback: any, taskType: any) => void;
|
|
50
50
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export function $timeout($rootScope: any, $browser: any, $q: any, $$q: any, $exceptionHandler: any): {
|
|
2
|
+
(fn?: (() => any) | undefined, delay?: number | undefined, invokeApply?: boolean | undefined, ...args: any[]): Promise<any>;
|
|
3
|
+
/**
|
|
4
|
+
* @ngdoc method
|
|
5
|
+
* @name $timeout#cancel
|
|
6
|
+
*
|
|
7
|
+
* @description
|
|
8
|
+
* Cancels a task associated with the `promise`. As a result of this, the promise will be
|
|
9
|
+
* resolved with a rejection.
|
|
10
|
+
*
|
|
11
|
+
* @param {Promise=} promise Promise returned by the `$timeout` function.
|
|
12
|
+
* @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully
|
|
13
|
+
* canceled.
|
|
14
|
+
*/
|
|
15
|
+
cancel(promise?: Promise<any> | undefined): boolean;
|
|
16
|
+
};
|
|
17
|
+
export function $TimeoutProvider(): void;
|
|
18
|
+
export class $TimeoutProvider {
|
|
19
|
+
$get: (string | typeof $timeout)[];
|
|
20
|
+
}
|
|
@@ -74,9 +74,7 @@ export function urlIsSameOriginAsBaseUrl(requestUrl: string | object): boolean;
|
|
|
74
74
|
* @returns {Function} - A function that receives a URL (string or parsed URL object) and returns
|
|
75
75
|
* whether it is of an allowed origin.
|
|
76
76
|
*/
|
|
77
|
-
export function urlIsAllowedOriginFactory(
|
|
78
|
-
trustedOriginUrls: string[],
|
|
79
|
-
): Function;
|
|
77
|
+
export function urlIsAllowedOriginFactory(trustedOriginUrls: string[]): Function;
|
|
80
78
|
/**
|
|
81
79
|
* Determine if two URLs share the same origin.
|
|
82
80
|
*
|
|
@@ -87,10 +85,7 @@ export function urlIsAllowedOriginFactory(
|
|
|
87
85
|
*
|
|
88
86
|
* @returns {boolean} - True if both URLs have the same origin, and false otherwise.
|
|
89
87
|
*/
|
|
90
|
-
export function urlsAreSameOrigin(
|
|
91
|
-
url1: string | any,
|
|
92
|
-
url2: string | object,
|
|
93
|
-
): boolean;
|
|
88
|
+
export function urlsAreSameOrigin(url1: string | any, url2: string | object): boolean;
|
|
94
89
|
/**
|
|
95
90
|
* Returns the current document base URL.
|
|
96
91
|
* @returns {string}
|
|
@@ -9,13 +9,7 @@ export function ngBindTemplateDirective(): angular.IDirective;
|
|
|
9
9
|
/**
|
|
10
10
|
* TODO: add type
|
|
11
11
|
*/
|
|
12
|
-
export const ngBindHtmlDirective: (
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
compile: (
|
|
17
|
-
_tElement: any,
|
|
18
|
-
tAttrs: any,
|
|
19
|
-
) => (scope: any, element: any) => void;
|
|
20
|
-
})
|
|
21
|
-
)[];
|
|
12
|
+
export const ngBindHtmlDirective: (string | (($parse: any) => {
|
|
13
|
+
restrict: string;
|
|
14
|
+
compile: (_tElement: any, tAttrs: any) => (scope: any, element: any) => void;
|
|
15
|
+
}))[];
|
|
@@ -53,13 +53,10 @@
|
|
|
53
53
|
* element.
|
|
54
54
|
*
|
|
55
55
|
*/
|
|
56
|
-
export const ngClassDirective: (
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
link(scope: any, element: any, attr: any): void;
|
|
61
|
-
})
|
|
62
|
-
)[];
|
|
56
|
+
export const ngClassDirective: (string | (($parse: any) => {
|
|
57
|
+
restrict: string;
|
|
58
|
+
link(scope: any, element: any, attr: any): void;
|
|
59
|
+
}))[];
|
|
63
60
|
/**
|
|
64
61
|
* @ngdoc directive
|
|
65
62
|
* @name ngClassOdd
|
|
@@ -85,13 +82,10 @@ export const ngClassDirective: (
|
|
|
85
82
|
*
|
|
86
83
|
*
|
|
87
84
|
*/
|
|
88
|
-
export const ngClassOddDirective: (
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
link(scope: any, element: any, attr: any): void;
|
|
93
|
-
})
|
|
94
|
-
)[];
|
|
85
|
+
export const ngClassOddDirective: (string | (($parse: any) => {
|
|
86
|
+
restrict: string;
|
|
87
|
+
link(scope: any, element: any, attr: any): void;
|
|
88
|
+
}))[];
|
|
95
89
|
/**
|
|
96
90
|
* @ngdoc directive
|
|
97
91
|
* @name ngClassEven
|
|
@@ -116,10 +110,7 @@ export const ngClassOddDirective: (
|
|
|
116
110
|
* result of the evaluation can be a string representing space delimited class names or an array.
|
|
117
111
|
*
|
|
118
112
|
*/
|
|
119
|
-
export const ngClassEvenDirective: (
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
link(scope: any, element: any, attr: any): void;
|
|
124
|
-
})
|
|
125
|
-
)[];
|
|
113
|
+
export const ngClassEvenDirective: (string | (($parse: any) => {
|
|
114
|
+
restrict: string;
|
|
115
|
+
link(scope: any, element: any, attr: any): void;
|
|
116
|
+
}))[];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export function createEventDirective($parse: any, $rootScope: any, $exceptionHandler: any, directiveName: any, eventName: any, forceAsync: any): {
|
|
2
|
+
restrict: string;
|
|
3
|
+
compile(_element: any, attr: any): (scope: any, element: any) => void;
|
|
4
|
+
};
|
|
5
|
+
export const ngEventDirectives: {};
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
export function FormController($element: any, $attrs: any, $scope: any, $animate: any, $interpolate: any): void;
|
|
2
|
+
export class FormController {
|
|
3
|
+
constructor($element: any, $attrs: any, $scope: any, $animate: any, $interpolate: any);
|
|
4
|
+
$$controls: any[];
|
|
5
|
+
$error: {};
|
|
6
|
+
$$success: {};
|
|
7
|
+
$pending: any;
|
|
8
|
+
$name: any;
|
|
9
|
+
$dirty: boolean;
|
|
10
|
+
$pristine: boolean;
|
|
11
|
+
$valid: boolean;
|
|
12
|
+
$invalid: boolean;
|
|
13
|
+
$submitted: boolean;
|
|
14
|
+
$$parentForm: {
|
|
15
|
+
$addControl: () => void;
|
|
16
|
+
$getControls: () => any;
|
|
17
|
+
$$renameControl: typeof nullFormRenameControl;
|
|
18
|
+
$removeControl: () => void;
|
|
19
|
+
$setValidity: () => void;
|
|
20
|
+
$setDirty: () => void;
|
|
21
|
+
$setPristine: () => void;
|
|
22
|
+
$setSubmitted: () => void;
|
|
23
|
+
$$setSubmitted: () => void;
|
|
24
|
+
};
|
|
25
|
+
$$element: any;
|
|
26
|
+
$$animate: any;
|
|
27
|
+
/**
|
|
28
|
+
* @ngdoc method
|
|
29
|
+
* @name form.FormController#$rollbackViewValue
|
|
30
|
+
*
|
|
31
|
+
* @description
|
|
32
|
+
* Rollback all form controls pending updates to the `$modelValue`.
|
|
33
|
+
*
|
|
34
|
+
* Updates may be pending by a debounced event or because the input is waiting for a some future
|
|
35
|
+
* event defined in `ng-model-options`. This method is typically needed by the reset button of
|
|
36
|
+
* a form that uses `ng-model-options` to pend updates.
|
|
37
|
+
*/
|
|
38
|
+
$rollbackViewValue(): void;
|
|
39
|
+
/**
|
|
40
|
+
* @ngdoc method
|
|
41
|
+
* @name form.FormController#$commitViewValue
|
|
42
|
+
*
|
|
43
|
+
* @description
|
|
44
|
+
* Commit all form controls pending updates to the `$modelValue`.
|
|
45
|
+
*
|
|
46
|
+
* Updates may be pending by a debounced event or because the input is waiting for a some future
|
|
47
|
+
* event defined in `ng-model-options`. This method is rarely needed as `NgModelController`
|
|
48
|
+
* usually handles calling this in response to input events.
|
|
49
|
+
*/
|
|
50
|
+
$commitViewValue(): void;
|
|
51
|
+
/**
|
|
52
|
+
* @ngdoc method
|
|
53
|
+
* @name form.FormController#$addControl
|
|
54
|
+
* @param {object} control control object, either a {@link form.FormController} or an
|
|
55
|
+
* {@link ngModel.NgModelController}
|
|
56
|
+
*
|
|
57
|
+
* @description
|
|
58
|
+
* Register a control with the form. Input elements using ngModelController do this automatically
|
|
59
|
+
* when they are linked.
|
|
60
|
+
*
|
|
61
|
+
* Note that the current state of the control will not be reflected on the new parent form. This
|
|
62
|
+
* is not an issue with normal use, as freshly compiled and linked controls are in a `$pristine`
|
|
63
|
+
* state.
|
|
64
|
+
*
|
|
65
|
+
* However, if the method is used programmatically, for example by adding dynamically created controls,
|
|
66
|
+
* or controls that have been previously removed without destroying their corresponding DOM element,
|
|
67
|
+
* it's the developers responsibility to make sure the current state propagates to the parent form.
|
|
68
|
+
*
|
|
69
|
+
* For example, if an input control is added that is already `$dirty` and has `$error` properties,
|
|
70
|
+
* calling `$setDirty()` and `$validate()` afterwards will propagate the state to the parent form.
|
|
71
|
+
*/
|
|
72
|
+
$addControl(control: object): void;
|
|
73
|
+
/**
|
|
74
|
+
* @ngdoc method
|
|
75
|
+
* @name form.FormController#$getControls
|
|
76
|
+
* @returns {Array} the controls that are currently part of this form
|
|
77
|
+
*
|
|
78
|
+
* @description
|
|
79
|
+
* This method returns a **shallow copy** of the controls that are currently part of this form.
|
|
80
|
+
* The controls can be instances of {@link form.FormController `FormController`}
|
|
81
|
+
* ({@link ngForm "child-forms"}) and of {@link ngModel.NgModelController `NgModelController`}.
|
|
82
|
+
* If you need access to the controls of child-forms, you have to call `$getControls()`
|
|
83
|
+
* recursively on them.
|
|
84
|
+
* This can be used for example to iterate over all controls to validate them.
|
|
85
|
+
*
|
|
86
|
+
* The controls can be accessed normally, but adding to, or removing controls from the array has
|
|
87
|
+
* no effect on the form. Instead, use {@link form.FormController#$addControl `$addControl()`} and
|
|
88
|
+
* {@link form.FormController#$removeControl `$removeControl()`} for this use-case.
|
|
89
|
+
* Likewise, adding a control to, or removing a control from the form is not reflected
|
|
90
|
+
* in the shallow copy. That means you should get a fresh copy from `$getControls()` every time
|
|
91
|
+
* you need access to the controls.
|
|
92
|
+
*/
|
|
93
|
+
$getControls(): any[];
|
|
94
|
+
$$renameControl(control: any, newName: any): void;
|
|
95
|
+
/**
|
|
96
|
+
* @ngdoc method
|
|
97
|
+
* @name form.FormController#$removeControl
|
|
98
|
+
* @param {object} control control object, either a {@link form.FormController} or an
|
|
99
|
+
* {@link ngModel.NgModelController}
|
|
100
|
+
*
|
|
101
|
+
* @description
|
|
102
|
+
* Deregister a control from the form.
|
|
103
|
+
*
|
|
104
|
+
* Input elements using ngModelController do this automatically when they are destroyed.
|
|
105
|
+
*
|
|
106
|
+
* Note that only the removed control's validation state (`$errors`etc.) will be removed from the
|
|
107
|
+
* form. `$dirty`, `$submitted` states will not be changed, because the expected behavior can be
|
|
108
|
+
* different from case to case. For example, removing the only `$dirty` control from a form may or
|
|
109
|
+
* may not mean that the form is still `$dirty`.
|
|
110
|
+
*/
|
|
111
|
+
$removeControl(control: object): void;
|
|
112
|
+
/**
|
|
113
|
+
* @ngdoc method
|
|
114
|
+
* @name form.FormController#$setDirty
|
|
115
|
+
*
|
|
116
|
+
* @description
|
|
117
|
+
* Sets the form to a dirty state.
|
|
118
|
+
*
|
|
119
|
+
* This method can be called to add the 'ng-dirty' class and set the form to a dirty
|
|
120
|
+
* state (ng-dirty class). This method will also propagate to parent forms.
|
|
121
|
+
*/
|
|
122
|
+
$setDirty(): void;
|
|
123
|
+
/**
|
|
124
|
+
* @ngdoc method
|
|
125
|
+
* @name form.FormController#$setPristine
|
|
126
|
+
*
|
|
127
|
+
* @description
|
|
128
|
+
* Sets the form to its pristine state.
|
|
129
|
+
*
|
|
130
|
+
* This method sets the form's `$pristine` state to true, the `$dirty` state to false, removes
|
|
131
|
+
* the `ng-dirty` class and adds the `ng-pristine` class. Additionally, it sets the `$submitted`
|
|
132
|
+
* state to false.
|
|
133
|
+
*
|
|
134
|
+
* This method will also propagate to all the controls contained in this form.
|
|
135
|
+
*
|
|
136
|
+
* Setting a form back to a pristine state is often useful when we want to 'reuse' a form after
|
|
137
|
+
* saving or resetting it.
|
|
138
|
+
*/
|
|
139
|
+
$setPristine(): void;
|
|
140
|
+
/**
|
|
141
|
+
* @ngdoc method
|
|
142
|
+
* @name form.FormController#$setUntouched
|
|
143
|
+
*
|
|
144
|
+
* @description
|
|
145
|
+
* Sets the form to its untouched state.
|
|
146
|
+
*
|
|
147
|
+
* This method can be called to remove the 'ng-touched' class and set the form controls to their
|
|
148
|
+
* untouched state (ng-untouched class).
|
|
149
|
+
*
|
|
150
|
+
* Setting a form controls back to their untouched state is often useful when setting the form
|
|
151
|
+
* back to its pristine state.
|
|
152
|
+
*/
|
|
153
|
+
$setUntouched(): void;
|
|
154
|
+
/**
|
|
155
|
+
* @ngdoc method
|
|
156
|
+
* @name form.FormController#$setSubmitted
|
|
157
|
+
*
|
|
158
|
+
* @description
|
|
159
|
+
* Sets the form to its `$submitted` state. This will also set `$submitted` on all child and
|
|
160
|
+
* parent forms of the form.
|
|
161
|
+
*/
|
|
162
|
+
$setSubmitted(): void;
|
|
163
|
+
$$setSubmitted(): void;
|
|
164
|
+
}
|
|
165
|
+
export namespace FormController {
|
|
166
|
+
let $inject: string[];
|
|
167
|
+
}
|
|
168
|
+
export function setupValidity(instance: any): void;
|
|
169
|
+
export function addSetValidityMethod(context: any): void;
|
|
170
|
+
export namespace nullFormCtrl {
|
|
171
|
+
export function $addControl(): void;
|
|
172
|
+
export let $getControls: () => any;
|
|
173
|
+
export { nullFormRenameControl as $$renameControl };
|
|
174
|
+
export function $removeControl(): void;
|
|
175
|
+
export function $setValidity(): void;
|
|
176
|
+
export function $setDirty(): void;
|
|
177
|
+
export function $setPristine(): void;
|
|
178
|
+
export function $setSubmitted(): void;
|
|
179
|
+
export function $$setSubmitted(): void;
|
|
180
|
+
}
|
|
181
|
+
export const formDirective: (string | (($timeout: any, $parse: any) => {
|
|
182
|
+
name: string;
|
|
183
|
+
restrict: string;
|
|
184
|
+
require: string[];
|
|
185
|
+
controller: typeof FormController;
|
|
186
|
+
compile: (formElement: any, attr: any) => {
|
|
187
|
+
pre: (scope: any, formElement: any, attr: any, ctrls: any) => void;
|
|
188
|
+
};
|
|
189
|
+
}))[];
|
|
190
|
+
export const ngFormDirective: (string | (($timeout: any, $parse: any) => {
|
|
191
|
+
name: string;
|
|
192
|
+
restrict: string;
|
|
193
|
+
require: string[];
|
|
194
|
+
controller: typeof FormController;
|
|
195
|
+
compile: (formElement: any, attr: any) => {
|
|
196
|
+
pre: (scope: any, formElement: any, attr: any, ctrls: any) => void;
|
|
197
|
+
};
|
|
198
|
+
}))[];
|
|
199
|
+
declare function nullFormRenameControl(control: any, name: any): void;
|
|
200
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const ngIncludeDirective: (string | (($templateRequest: any, $anchorScroll: any, $animate: any) => {
|
|
2
|
+
restrict: string;
|
|
3
|
+
priority: number;
|
|
4
|
+
terminal: boolean;
|
|
5
|
+
transclude: string;
|
|
6
|
+
controller: () => void;
|
|
7
|
+
compile(element: any, attr: any): (scope: any, $element: any, $attr: any, ctrl: any, $transclude: any) => void;
|
|
8
|
+
}))[];
|
|
9
|
+
export const ngIncludeFillContentDirective: (string | (($compile: any) => {
|
|
10
|
+
restrict: string;
|
|
11
|
+
priority: number;
|
|
12
|
+
require: string;
|
|
13
|
+
link(scope: any, $element: any, $attr: any, ctrl: any): void;
|
|
14
|
+
}))[];
|
|
@@ -1,61 +1,19 @@
|
|
|
1
1
|
export function weekParser(isoWeek: any, existingDate: any): any;
|
|
2
|
-
export function createDateParser(
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
): (iso: any, previousDate: any) => any;
|
|
6
|
-
export function createDateInputType(
|
|
7
|
-
type: any,
|
|
8
|
-
regexp: any,
|
|
9
|
-
parseDate: any,
|
|
10
|
-
): (
|
|
11
|
-
scope: any,
|
|
12
|
-
element: any,
|
|
13
|
-
attr: any,
|
|
14
|
-
ctrl: any,
|
|
15
|
-
$browser: any,
|
|
16
|
-
$filter: any,
|
|
17
|
-
$parse: any,
|
|
18
|
-
) => void;
|
|
19
|
-
export function badInputChecker(
|
|
20
|
-
scope: any,
|
|
21
|
-
element: any,
|
|
22
|
-
attr: any,
|
|
23
|
-
ctrl: any,
|
|
24
|
-
parserName: any,
|
|
25
|
-
): void;
|
|
2
|
+
export function createDateParser(regexp: any, mapping: any): (iso: any, previousDate: any) => any;
|
|
3
|
+
export function createDateInputType(type: any, regexp: any, parseDate: any): (scope: any, element: any, attr: any, ctrl: any, $browser: any, $filter: any, $parse: any) => void;
|
|
4
|
+
export function badInputChecker(scope: any, element: any, attr: any, ctrl: any, parserName: any): void;
|
|
26
5
|
export function numberFormatterParser(ctrl: any): void;
|
|
27
6
|
export function isNumberInteger(num: any): boolean;
|
|
28
7
|
export function countDecimals(num: any): number;
|
|
29
|
-
export function isValidForStep(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
step: any,
|
|
33
|
-
): boolean;
|
|
34
|
-
export function numberInputType(
|
|
35
|
-
scope: any,
|
|
36
|
-
element: any,
|
|
37
|
-
attr: any,
|
|
38
|
-
ctrl: any,
|
|
39
|
-
$browser: any,
|
|
40
|
-
$filter: any,
|
|
41
|
-
$parse: any,
|
|
42
|
-
): void;
|
|
43
|
-
export function rangeInputType(
|
|
44
|
-
scope: any,
|
|
45
|
-
element: any,
|
|
46
|
-
attr: any,
|
|
47
|
-
ctrl: any,
|
|
48
|
-
$browser: any,
|
|
49
|
-
): void;
|
|
8
|
+
export function isValidForStep(viewValue: any, stepBase: any, step: any): boolean;
|
|
9
|
+
export function numberInputType(scope: any, element: any, attr: any, ctrl: any, $browser: any, $filter: any, $parse: any): void;
|
|
10
|
+
export function rangeInputType(scope: any, element: any, attr: any, ctrl: any, $browser: any): void;
|
|
50
11
|
export function hiddenInputBrowserCacheDirective(): {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
): {
|
|
57
|
-
pre(scope: any, element: any): void;
|
|
58
|
-
};
|
|
12
|
+
restrict: string;
|
|
13
|
+
priority: number;
|
|
14
|
+
compile(_: any, attr: any): {
|
|
15
|
+
pre(scope: any, element: any): void;
|
|
16
|
+
};
|
|
59
17
|
};
|
|
60
18
|
/**
|
|
61
19
|
* @ngdoc directive
|
|
@@ -80,9 +38,9 @@ export function hiddenInputBrowserCacheDirective(): {
|
|
|
80
38
|
*
|
|
81
39
|
*/
|
|
82
40
|
export function ngValueDirective(): {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
41
|
+
restrict: string;
|
|
42
|
+
priority: number;
|
|
43
|
+
compile(tpl: any, tplAttr: any): (scope: any, elm: any, attr: any) => void;
|
|
86
44
|
};
|
|
87
45
|
export const ISO_DATE_REGEXP: RegExp;
|
|
88
46
|
export const URL_REGEXP: RegExp;
|
|
@@ -176,17 +134,10 @@ export const VALIDITY_STATE_PROPERTY: "validity";
|
|
|
176
134
|
* input.
|
|
177
135
|
*
|
|
178
136
|
*/
|
|
179
|
-
export const inputDirective: (
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
$filter: any,
|
|
184
|
-
$parse: any,
|
|
185
|
-
) => {
|
|
186
|
-
restrict: string;
|
|
187
|
-
require: string[];
|
|
188
|
-
link: {
|
|
137
|
+
export const inputDirective: (string | (($browser: any, $filter: any, $parse: any) => {
|
|
138
|
+
restrict: string;
|
|
139
|
+
require: string[];
|
|
140
|
+
link: {
|
|
189
141
|
pre(scope: any, element: any, attr: any, ctrls: any): void;
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
)[];
|
|
142
|
+
};
|
|
143
|
+
}))[];
|