@angular-wave/angular.ts 0.0.37 → 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/binding.spec.js +4 -4
- package/src/core/location/location.js +1 -1
- package/src/core/scope/scope.js +4 -7
- package/src/exts/aria/aria.html +1 -4
- package/src/exts/messages/messages.html +1 -4
- package/src/index.js +307 -1
- package/src/loader.js +13 -6
- package/src/public.js +7 -2
- package/src/router/directives/directives.test.js +19 -0
- package/src/router/directives/state-directives.html +21 -0
- package/src/router/{state-directives.spec.js → directives/state-directives.spec.js} +2 -1
- package/src/router/{view-directive.spec.js → directives/view-directive.spec.js} +2 -1
- package/src/router/directives/view-directives.html +21 -0
- package/src/router/router.html +22 -0
- package/src/router/router.test.js +11 -0
- package/src/router/services.spec.js +2 -2
- package/src/router/{state-builder.spec.js → state/state-builder.spec.js} +9 -12
- package/src/router/state/state.html +22 -0
- package/src/router/{state.spec.js → state/state.spec.js} +1 -1
- package/src/router/state/state.test.js +11 -0
- package/src/router/state-filter.spec.js +2 -2
- package/src/router/template-factory.spec.js +4 -4
- package/src/router/url/url.html +18 -0
- package/src/router/url/url.test.js +11 -0
- package/src/router/view/view.html +18 -0
- package/src/router/{view.spec.js → view/view.spec.js} +1 -1
- package/src/router/view/view.test.js +11 -0
- package/src/router/view-hook.spec.js +4 -4
- package/src/router/view-scroll.spec.js +4 -4
- package/src/services/http/http.html +22 -0
- package/src/services/http/http.test.js +11 -0
- package/src/services/http-backend/http-backend.html +21 -0
- package/src/services/http-backend/http-backend.js +1 -1
- package/src/services/http-backend/http-backend.spec.js +1 -1
- package/src/services/http-backend/http-backend.test.js +11 -0
- package/src/shared/common.spec.js +4 -4
- package/src/shared/hof.spec.js +1 -1
- package/src/shared/min-err.spec.js +2 -2
- package/src/shared/shared.html +22 -0
- package/src/shared/shared.test.js +11 -0
- package/src/shared/test-utils.js +2 -2
- package/src/shared/utils.spec.js +1 -1
- package/src/src.html +22 -0
- 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/src/router/{url-service.spec.js → url/url-service.spec.js} +0 -0
- /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
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* @description
|
|
4
|
-
* Private service to sanitize uris for links and images. Used by $compile.
|
|
5
|
-
*/
|
|
6
|
-
export function SanitizeUriProvider(): void;
|
|
7
|
-
export class SanitizeUriProvider {
|
|
8
|
-
/**
|
|
9
|
-
* @description
|
|
10
|
-
* Retrieves or overrides the default regular expression that is used for determining trusted safe
|
|
11
|
-
* urls during a[href] sanitization.
|
|
12
|
-
*
|
|
13
|
-
* The sanitization is a security measure aimed at prevent XSS attacks via HTML anchor links.
|
|
14
|
-
*
|
|
15
|
-
* Any url due to be assigned to an `a[href]` attribute via interpolation is marked as requiring
|
|
16
|
-
* the $sce.URL security context. When interpolation occurs a call is made to `$sce.trustAsUrl(url)`
|
|
17
|
-
* which in turn may call `$$sanitizeUri(url, isMedia)` to sanitize the potentially malicious URL.
|
|
18
|
-
*
|
|
19
|
-
* If the URL matches the `aHrefSanitizationTrustedUrlList` regular expression, it is returned unchanged.
|
|
20
|
-
*
|
|
21
|
-
* If there is no match the URL is returned prefixed with `'unsafe:'` to ensure that when it is written
|
|
22
|
-
* to the DOM it is inactive and potentially malicious code will not be executed.
|
|
23
|
-
*
|
|
24
|
-
* @param {RegExp=} regexp New regexp to trust urls with.
|
|
25
|
-
* @returns {RegExp|ng.ICompileProvider} Current RegExp if called without value or self for
|
|
26
|
-
* chaining otherwise.
|
|
27
|
-
*/
|
|
28
|
-
aHrefSanitizationTrustedUrlList: (
|
|
29
|
-
regexp?: RegExp | undefined,
|
|
30
|
-
) => RegExp | ng.ICompileProvider;
|
|
31
|
-
/**
|
|
32
|
-
* @description
|
|
33
|
-
* Retrieves or overrides the default regular expression that is used for determining trusted safe
|
|
34
|
-
* urls during img[src] sanitization.
|
|
35
|
-
*
|
|
36
|
-
* The sanitization is a security measure aimed at prevent XSS attacks via HTML image src links.
|
|
37
|
-
*
|
|
38
|
-
* Any URL due to be assigned to an `img[src]` attribute via interpolation is marked as requiring
|
|
39
|
-
* the $sce.MEDIA_URL security context. When interpolation occurs a call is made to
|
|
40
|
-
* `$sce.trustAsMediaUrl(url)` which in turn may call `$$sanitizeUri(url, isMedia)` to sanitize
|
|
41
|
-
* the potentially malicious URL.
|
|
42
|
-
*
|
|
43
|
-
* If the URL matches the `imgSrcSanitizationTrustedUrlList` regular expression, it is returned
|
|
44
|
-
* unchanged.
|
|
45
|
-
*
|
|
46
|
-
* If there is no match the URL is returned prefixed with `'unsafe:'` to ensure that when it is written
|
|
47
|
-
* to the DOM it is inactive and potentially malicious code will not be executed.
|
|
48
|
-
*
|
|
49
|
-
* @param {RegExp=} regexp New regexp to trust urls with.
|
|
50
|
-
* @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for
|
|
51
|
-
* chaining otherwise.
|
|
52
|
-
*/
|
|
53
|
-
imgSrcSanitizationTrustedUrlList: (
|
|
54
|
-
regexp?: RegExp | undefined,
|
|
55
|
-
) => RegExp | ng.$compileProvider;
|
|
56
|
-
$get: () => (uri: any, isMediaUrl: any) => any;
|
|
57
|
-
}
|
package/types/core/timeout.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export function $timeout(
|
|
2
|
-
$rootScope: any,
|
|
3
|
-
$browser: any,
|
|
4
|
-
$q: any,
|
|
5
|
-
$$q: any,
|
|
6
|
-
$exceptionHandler: any,
|
|
7
|
-
): {
|
|
8
|
-
(
|
|
9
|
-
fn?: (() => any) | undefined,
|
|
10
|
-
delay?: number | undefined,
|
|
11
|
-
invokeApply?: boolean | undefined,
|
|
12
|
-
...args: any[]
|
|
13
|
-
): Promise<any>;
|
|
14
|
-
/**
|
|
15
|
-
* @ngdoc method
|
|
16
|
-
* @name $timeout#cancel
|
|
17
|
-
*
|
|
18
|
-
* @description
|
|
19
|
-
* Cancels a task associated with the `promise`. As a result of this, the promise will be
|
|
20
|
-
* resolved with a rejection.
|
|
21
|
-
*
|
|
22
|
-
* @param {Promise=} promise Promise returned by the `$timeout` function.
|
|
23
|
-
* @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully
|
|
24
|
-
* canceled.
|
|
25
|
-
*/
|
|
26
|
-
cancel(promise?: Promise<any> | undefined): boolean;
|
|
27
|
-
};
|
|
28
|
-
export function $TimeoutProvider(): void;
|
|
29
|
-
export class $TimeoutProvider {
|
|
30
|
-
$get: (string | typeof $timeout)[];
|
|
31
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export function createEventDirective(
|
|
2
|
-
$parse: any,
|
|
3
|
-
$rootScope: any,
|
|
4
|
-
$exceptionHandler: any,
|
|
5
|
-
directiveName: any,
|
|
6
|
-
eventName: any,
|
|
7
|
-
forceAsync: any,
|
|
8
|
-
): {
|
|
9
|
-
restrict: string;
|
|
10
|
-
compile(_element: any, attr: any): (scope: any, element: any) => void;
|
|
11
|
-
};
|
|
12
|
-
export const ngEventDirectives: {};
|
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
export function FormController(
|
|
2
|
-
$element: any,
|
|
3
|
-
$attrs: any,
|
|
4
|
-
$scope: any,
|
|
5
|
-
$animate: any,
|
|
6
|
-
$interpolate: any,
|
|
7
|
-
): void;
|
|
8
|
-
export class FormController {
|
|
9
|
-
constructor(
|
|
10
|
-
$element: any,
|
|
11
|
-
$attrs: any,
|
|
12
|
-
$scope: any,
|
|
13
|
-
$animate: any,
|
|
14
|
-
$interpolate: any,
|
|
15
|
-
);
|
|
16
|
-
$$controls: any[];
|
|
17
|
-
$error: {};
|
|
18
|
-
$$success: {};
|
|
19
|
-
$pending: any;
|
|
20
|
-
$name: any;
|
|
21
|
-
$dirty: boolean;
|
|
22
|
-
$pristine: boolean;
|
|
23
|
-
$valid: boolean;
|
|
24
|
-
$invalid: boolean;
|
|
25
|
-
$submitted: boolean;
|
|
26
|
-
$$parentForm: {
|
|
27
|
-
$addControl: () => void;
|
|
28
|
-
$getControls: () => any;
|
|
29
|
-
$$renameControl: typeof nullFormRenameControl;
|
|
30
|
-
$removeControl: () => void;
|
|
31
|
-
$setValidity: () => void;
|
|
32
|
-
$setDirty: () => void;
|
|
33
|
-
$setPristine: () => void;
|
|
34
|
-
$setSubmitted: () => void;
|
|
35
|
-
$$setSubmitted: () => void;
|
|
36
|
-
};
|
|
37
|
-
$$element: any;
|
|
38
|
-
$$animate: any;
|
|
39
|
-
/**
|
|
40
|
-
* @ngdoc method
|
|
41
|
-
* @name form.FormController#$rollbackViewValue
|
|
42
|
-
*
|
|
43
|
-
* @description
|
|
44
|
-
* Rollback 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 typically needed by the reset button of
|
|
48
|
-
* a form that uses `ng-model-options` to pend updates.
|
|
49
|
-
*/
|
|
50
|
-
$rollbackViewValue(): void;
|
|
51
|
-
/**
|
|
52
|
-
* @ngdoc method
|
|
53
|
-
* @name form.FormController#$commitViewValue
|
|
54
|
-
*
|
|
55
|
-
* @description
|
|
56
|
-
* Commit all form controls pending updates to the `$modelValue`.
|
|
57
|
-
*
|
|
58
|
-
* Updates may be pending by a debounced event or because the input is waiting for a some future
|
|
59
|
-
* event defined in `ng-model-options`. This method is rarely needed as `NgModelController`
|
|
60
|
-
* usually handles calling this in response to input events.
|
|
61
|
-
*/
|
|
62
|
-
$commitViewValue(): void;
|
|
63
|
-
/**
|
|
64
|
-
* @ngdoc method
|
|
65
|
-
* @name form.FormController#$addControl
|
|
66
|
-
* @param {object} control control object, either a {@link form.FormController} or an
|
|
67
|
-
* {@link ngModel.NgModelController}
|
|
68
|
-
*
|
|
69
|
-
* @description
|
|
70
|
-
* Register a control with the form. Input elements using ngModelController do this automatically
|
|
71
|
-
* when they are linked.
|
|
72
|
-
*
|
|
73
|
-
* Note that the current state of the control will not be reflected on the new parent form. This
|
|
74
|
-
* is not an issue with normal use, as freshly compiled and linked controls are in a `$pristine`
|
|
75
|
-
* state.
|
|
76
|
-
*
|
|
77
|
-
* However, if the method is used programmatically, for example by adding dynamically created controls,
|
|
78
|
-
* or controls that have been previously removed without destroying their corresponding DOM element,
|
|
79
|
-
* it's the developers responsibility to make sure the current state propagates to the parent form.
|
|
80
|
-
*
|
|
81
|
-
* For example, if an input control is added that is already `$dirty` and has `$error` properties,
|
|
82
|
-
* calling `$setDirty()` and `$validate()` afterwards will propagate the state to the parent form.
|
|
83
|
-
*/
|
|
84
|
-
$addControl(control: object): void;
|
|
85
|
-
/**
|
|
86
|
-
* @ngdoc method
|
|
87
|
-
* @name form.FormController#$getControls
|
|
88
|
-
* @returns {Array} the controls that are currently part of this form
|
|
89
|
-
*
|
|
90
|
-
* @description
|
|
91
|
-
* This method returns a **shallow copy** of the controls that are currently part of this form.
|
|
92
|
-
* The controls can be instances of {@link form.FormController `FormController`}
|
|
93
|
-
* ({@link ngForm "child-forms"}) and of {@link ngModel.NgModelController `NgModelController`}.
|
|
94
|
-
* If you need access to the controls of child-forms, you have to call `$getControls()`
|
|
95
|
-
* recursively on them.
|
|
96
|
-
* This can be used for example to iterate over all controls to validate them.
|
|
97
|
-
*
|
|
98
|
-
* The controls can be accessed normally, but adding to, or removing controls from the array has
|
|
99
|
-
* no effect on the form. Instead, use {@link form.FormController#$addControl `$addControl()`} and
|
|
100
|
-
* {@link form.FormController#$removeControl `$removeControl()`} for this use-case.
|
|
101
|
-
* Likewise, adding a control to, or removing a control from the form is not reflected
|
|
102
|
-
* in the shallow copy. That means you should get a fresh copy from `$getControls()` every time
|
|
103
|
-
* you need access to the controls.
|
|
104
|
-
*/
|
|
105
|
-
$getControls(): any[];
|
|
106
|
-
$$renameControl(control: any, newName: any): void;
|
|
107
|
-
/**
|
|
108
|
-
* @ngdoc method
|
|
109
|
-
* @name form.FormController#$removeControl
|
|
110
|
-
* @param {object} control control object, either a {@link form.FormController} or an
|
|
111
|
-
* {@link ngModel.NgModelController}
|
|
112
|
-
*
|
|
113
|
-
* @description
|
|
114
|
-
* Deregister a control from the form.
|
|
115
|
-
*
|
|
116
|
-
* Input elements using ngModelController do this automatically when they are destroyed.
|
|
117
|
-
*
|
|
118
|
-
* Note that only the removed control's validation state (`$errors`etc.) will be removed from the
|
|
119
|
-
* form. `$dirty`, `$submitted` states will not be changed, because the expected behavior can be
|
|
120
|
-
* different from case to case. For example, removing the only `$dirty` control from a form may or
|
|
121
|
-
* may not mean that the form is still `$dirty`.
|
|
122
|
-
*/
|
|
123
|
-
$removeControl(control: object): void;
|
|
124
|
-
/**
|
|
125
|
-
* @ngdoc method
|
|
126
|
-
* @name form.FormController#$setDirty
|
|
127
|
-
*
|
|
128
|
-
* @description
|
|
129
|
-
* Sets the form to a dirty state.
|
|
130
|
-
*
|
|
131
|
-
* This method can be called to add the 'ng-dirty' class and set the form to a dirty
|
|
132
|
-
* state (ng-dirty class). This method will also propagate to parent forms.
|
|
133
|
-
*/
|
|
134
|
-
$setDirty(): void;
|
|
135
|
-
/**
|
|
136
|
-
* @ngdoc method
|
|
137
|
-
* @name form.FormController#$setPristine
|
|
138
|
-
*
|
|
139
|
-
* @description
|
|
140
|
-
* Sets the form to its pristine state.
|
|
141
|
-
*
|
|
142
|
-
* This method sets the form's `$pristine` state to true, the `$dirty` state to false, removes
|
|
143
|
-
* the `ng-dirty` class and adds the `ng-pristine` class. Additionally, it sets the `$submitted`
|
|
144
|
-
* state to false.
|
|
145
|
-
*
|
|
146
|
-
* This method will also propagate to all the controls contained in this form.
|
|
147
|
-
*
|
|
148
|
-
* Setting a form back to a pristine state is often useful when we want to 'reuse' a form after
|
|
149
|
-
* saving or resetting it.
|
|
150
|
-
*/
|
|
151
|
-
$setPristine(): void;
|
|
152
|
-
/**
|
|
153
|
-
* @ngdoc method
|
|
154
|
-
* @name form.FormController#$setUntouched
|
|
155
|
-
*
|
|
156
|
-
* @description
|
|
157
|
-
* Sets the form to its untouched state.
|
|
158
|
-
*
|
|
159
|
-
* This method can be called to remove the 'ng-touched' class and set the form controls to their
|
|
160
|
-
* untouched state (ng-untouched class).
|
|
161
|
-
*
|
|
162
|
-
* Setting a form controls back to their untouched state is often useful when setting the form
|
|
163
|
-
* back to its pristine state.
|
|
164
|
-
*/
|
|
165
|
-
$setUntouched(): void;
|
|
166
|
-
/**
|
|
167
|
-
* @ngdoc method
|
|
168
|
-
* @name form.FormController#$setSubmitted
|
|
169
|
-
*
|
|
170
|
-
* @description
|
|
171
|
-
* Sets the form to its `$submitted` state. This will also set `$submitted` on all child and
|
|
172
|
-
* parent forms of the form.
|
|
173
|
-
*/
|
|
174
|
-
$setSubmitted(): void;
|
|
175
|
-
$$setSubmitted(): void;
|
|
176
|
-
}
|
|
177
|
-
export namespace FormController {
|
|
178
|
-
let $inject: string[];
|
|
179
|
-
}
|
|
180
|
-
export function setupValidity(instance: any): void;
|
|
181
|
-
export function addSetValidityMethod(context: any): void;
|
|
182
|
-
export namespace nullFormCtrl {
|
|
183
|
-
export function $addControl(): void;
|
|
184
|
-
export let $getControls: () => any;
|
|
185
|
-
export { nullFormRenameControl as $$renameControl };
|
|
186
|
-
export function $removeControl(): void;
|
|
187
|
-
export function $setValidity(): void;
|
|
188
|
-
export function $setDirty(): void;
|
|
189
|
-
export function $setPristine(): void;
|
|
190
|
-
export function $setSubmitted(): void;
|
|
191
|
-
export function $$setSubmitted(): void;
|
|
192
|
-
}
|
|
193
|
-
export const formDirective: (
|
|
194
|
-
| string
|
|
195
|
-
| ((
|
|
196
|
-
$timeout: any,
|
|
197
|
-
$parse: any,
|
|
198
|
-
) => {
|
|
199
|
-
name: string;
|
|
200
|
-
restrict: string;
|
|
201
|
-
require: string[];
|
|
202
|
-
controller: typeof FormController;
|
|
203
|
-
compile: (
|
|
204
|
-
formElement: any,
|
|
205
|
-
attr: any,
|
|
206
|
-
) => {
|
|
207
|
-
pre: (scope: any, formElement: any, attr: any, ctrls: any) => void;
|
|
208
|
-
};
|
|
209
|
-
})
|
|
210
|
-
)[];
|
|
211
|
-
export const ngFormDirective: (
|
|
212
|
-
| string
|
|
213
|
-
| ((
|
|
214
|
-
$timeout: any,
|
|
215
|
-
$parse: any,
|
|
216
|
-
) => {
|
|
217
|
-
name: string;
|
|
218
|
-
restrict: string;
|
|
219
|
-
require: string[];
|
|
220
|
-
controller: typeof FormController;
|
|
221
|
-
compile: (
|
|
222
|
-
formElement: any,
|
|
223
|
-
attr: any,
|
|
224
|
-
) => {
|
|
225
|
-
pre: (scope: any, formElement: any, attr: any, ctrls: any) => void;
|
|
226
|
-
};
|
|
227
|
-
})
|
|
228
|
-
)[];
|
|
229
|
-
declare function nullFormRenameControl(control: any, name: any): void;
|
|
230
|
-
export {};
|
package/types/directive/if.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export const ngIfDirective: (
|
|
2
|
-
| string
|
|
3
|
-
| (($animate: any) => {
|
|
4
|
-
multiElement: boolean;
|
|
5
|
-
transclude: string;
|
|
6
|
-
priority: number;
|
|
7
|
-
terminal: boolean;
|
|
8
|
-
restrict: string;
|
|
9
|
-
link(
|
|
10
|
-
$scope: any,
|
|
11
|
-
$element: any,
|
|
12
|
-
$attr: any,
|
|
13
|
-
ctrl: any,
|
|
14
|
-
$transclude: any,
|
|
15
|
-
): void;
|
|
16
|
-
})
|
|
17
|
-
)[];
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export const ngIncludeDirective: (
|
|
2
|
-
| string
|
|
3
|
-
| ((
|
|
4
|
-
$templateRequest: any,
|
|
5
|
-
$anchorScroll: any,
|
|
6
|
-
$animate: any,
|
|
7
|
-
) => {
|
|
8
|
-
restrict: string;
|
|
9
|
-
priority: number;
|
|
10
|
-
terminal: boolean;
|
|
11
|
-
transclude: string;
|
|
12
|
-
controller: () => void;
|
|
13
|
-
compile(
|
|
14
|
-
element: any,
|
|
15
|
-
attr: any,
|
|
16
|
-
): (
|
|
17
|
-
scope: any,
|
|
18
|
-
$element: any,
|
|
19
|
-
$attr: any,
|
|
20
|
-
ctrl: any,
|
|
21
|
-
$transclude: any,
|
|
22
|
-
) => void;
|
|
23
|
-
})
|
|
24
|
-
)[];
|
|
25
|
-
export const ngIncludeFillContentDirective: (
|
|
26
|
-
| string
|
|
27
|
-
| (($compile: any) => {
|
|
28
|
-
restrict: string;
|
|
29
|
-
priority: number;
|
|
30
|
-
require: string;
|
|
31
|
-
link(scope: any, $element: any, $attr: any, ctrl: any): void;
|
|
32
|
-
})
|
|
33
|
-
)[];
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export const ngOptionsDirective: (
|
|
2
|
-
| string
|
|
3
|
-
| ((
|
|
4
|
-
$compile: any,
|
|
5
|
-
$document: any,
|
|
6
|
-
$parse: any,
|
|
7
|
-
) => {
|
|
8
|
-
restrict: string;
|
|
9
|
-
terminal: boolean;
|
|
10
|
-
require: string[];
|
|
11
|
-
link: {
|
|
12
|
-
pre: (scope: any, selectElement: any, attr: any, ctrls: any) => void;
|
|
13
|
-
post: (scope: any, selectElement: any, attr: any, ctrls: any) => void;
|
|
14
|
-
};
|
|
15
|
-
})
|
|
16
|
-
)[];
|
package/types/directive/ref.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export const ngRepeatDirective: (
|
|
2
|
-
| string
|
|
3
|
-
| ((
|
|
4
|
-
$parse: any,
|
|
5
|
-
$animate: any,
|
|
6
|
-
) => {
|
|
7
|
-
restrict: string;
|
|
8
|
-
multiElement: boolean;
|
|
9
|
-
transclude: string;
|
|
10
|
-
priority: number;
|
|
11
|
-
terminal: boolean;
|
|
12
|
-
compile: (
|
|
13
|
-
$element: any,
|
|
14
|
-
$attr: any,
|
|
15
|
-
) => (
|
|
16
|
-
$scope: any,
|
|
17
|
-
$element: any,
|
|
18
|
-
$attr: any,
|
|
19
|
-
ctrl: any,
|
|
20
|
-
$transclude: any,
|
|
21
|
-
) => void;
|
|
22
|
-
})
|
|
23
|
-
)[];
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @returns {angular.IDirective}
|
|
3
|
-
*/
|
|
4
|
-
export function ngSwitchWhenDirective(): angular.IDirective;
|
|
5
|
-
/**
|
|
6
|
-
* @returns {angular.IDirective}
|
|
7
|
-
*/
|
|
8
|
-
export function ngSwitchDefaultDirective(): angular.IDirective;
|
|
9
|
-
export const ngSwitchDirective: (
|
|
10
|
-
| string
|
|
11
|
-
| (($animate: any) => {
|
|
12
|
-
require: string;
|
|
13
|
-
controller: (
|
|
14
|
-
| string
|
|
15
|
-
| {
|
|
16
|
-
new (): {
|
|
17
|
-
cases: {};
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
)[];
|
|
21
|
-
link(scope: any, _element: any, attr: any, ngSwitchController: any): void;
|
|
22
|
-
})
|
|
23
|
-
)[];
|
package/types/services/http.d.ts
DELETED
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
export function $HttpParamSerializerProvider(): void;
|
|
2
|
-
export class $HttpParamSerializerProvider {
|
|
3
|
-
/**
|
|
4
|
-
* @ngdoc service
|
|
5
|
-
* @name $httpParamSerializer
|
|
6
|
-
* @description
|
|
7
|
-
*
|
|
8
|
-
* Default {@link $http `$http`} params serializer that converts objects to strings
|
|
9
|
-
* according to the following rules:
|
|
10
|
-
*
|
|
11
|
-
* * `{'foo': 'bar'}` results in `foo=bar`
|
|
12
|
-
* * `{'foo': Date.now()}` results in `foo=2015-04-01T09%3A50%3A49.262Z` (`toISOString()` and encoded representation of a Date object)
|
|
13
|
-
* * `{'foo': ['bar', 'baz']}` results in `foo=bar&foo=baz` (repeated key for each array element)
|
|
14
|
-
* * `{'foo': {'bar':'baz'}}` results in `foo=%7B%22bar%22%3A%22baz%22%7D` (stringified and encoded representation of an object)
|
|
15
|
-
*
|
|
16
|
-
* Note that serializer will sort the request parameters alphabetically.
|
|
17
|
-
*/
|
|
18
|
-
$get: () => (params: any) => string;
|
|
19
|
-
}
|
|
20
|
-
export function $HttpParamSerializerJQLikeProvider(): void;
|
|
21
|
-
export class $HttpParamSerializerJQLikeProvider {
|
|
22
|
-
/**
|
|
23
|
-
* @ngdoc service
|
|
24
|
-
* @name $httpParamSerializerJQLike
|
|
25
|
-
*
|
|
26
|
-
* @description
|
|
27
|
-
*
|
|
28
|
-
* Alternative {@link $http `$http`} params serializer that follows
|
|
29
|
-
* jQuery's [`param()`](http://api.jquery.com/jquery.param/) method logic.
|
|
30
|
-
* The serializer will also sort the params alphabetically.
|
|
31
|
-
*
|
|
32
|
-
* To use it for serializing `$http` request parameters, set it as the `paramSerializer` property:
|
|
33
|
-
*
|
|
34
|
-
* ```js
|
|
35
|
-
* $http({
|
|
36
|
-
* url: myUrl,
|
|
37
|
-
* method: 'GET',
|
|
38
|
-
* params: myParams,
|
|
39
|
-
* paramSerializer: '$httpParamSerializerJQLike'
|
|
40
|
-
* });
|
|
41
|
-
* ```
|
|
42
|
-
*
|
|
43
|
-
* It is also possible to set it as the default `paramSerializer` in the
|
|
44
|
-
* {@link $httpProvider#defaults `$httpProvider`}.
|
|
45
|
-
*
|
|
46
|
-
* Additionally, you can inject the serializer and use it explicitly, for example to serialize
|
|
47
|
-
* form data for submission:
|
|
48
|
-
*
|
|
49
|
-
* ```js
|
|
50
|
-
* .controller(function($http, $httpParamSerializerJQLike) {
|
|
51
|
-
* //...
|
|
52
|
-
*
|
|
53
|
-
* $http({
|
|
54
|
-
* url: myUrl,
|
|
55
|
-
* method: 'POST',
|
|
56
|
-
* data: $httpParamSerializerJQLike(myData),
|
|
57
|
-
* headers: {
|
|
58
|
-
* 'Content-Type': 'application/x-www-form-urlencoded'
|
|
59
|
-
* }
|
|
60
|
-
* });
|
|
61
|
-
*
|
|
62
|
-
* });
|
|
63
|
-
* ```
|
|
64
|
-
*
|
|
65
|
-
*/
|
|
66
|
-
$get: () => (params: any) => string;
|
|
67
|
-
}
|
|
68
|
-
export function defaultHttpResponseTransform(data: any, headers: any): any;
|
|
69
|
-
/**
|
|
70
|
-
* @ngdoc provider
|
|
71
|
-
* @name $httpProvider
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
* @description
|
|
75
|
-
* Use `$httpProvider` to change the default behavior of the {@link ng.$http $http} service.
|
|
76
|
-
*/
|
|
77
|
-
export function $HttpProvider(): void;
|
|
78
|
-
export class $HttpProvider {
|
|
79
|
-
defaults: {
|
|
80
|
-
transformResponse: (typeof defaultHttpResponseTransform)[];
|
|
81
|
-
transformRequest: ((d: any) => any)[];
|
|
82
|
-
headers: {
|
|
83
|
-
common: {
|
|
84
|
-
Accept: string;
|
|
85
|
-
};
|
|
86
|
-
post: any;
|
|
87
|
-
put: any;
|
|
88
|
-
patch: any;
|
|
89
|
-
};
|
|
90
|
-
xsrfCookieName: string;
|
|
91
|
-
xsrfHeaderName: string;
|
|
92
|
-
paramSerializer: string;
|
|
93
|
-
};
|
|
94
|
-
/**
|
|
95
|
-
* @ngdoc method
|
|
96
|
-
* @name $httpProvider#useApplyAsync
|
|
97
|
-
* @description
|
|
98
|
-
*
|
|
99
|
-
* Configure $http service to combine processing of multiple http responses received at around
|
|
100
|
-
* the same time via {@link ng.$rootScope.Scope#$applyAsync $rootScope.$applyAsync}. This can result in
|
|
101
|
-
* significant performance improvement for bigger applications that make many HTTP requests
|
|
102
|
-
* concurrently (common during application bootstrap).
|
|
103
|
-
*
|
|
104
|
-
* Defaults to false. If no value is specified, returns the current configured value.
|
|
105
|
-
*
|
|
106
|
-
* @param {boolean=} value If true, when requests are loaded, they will schedule a deferred
|
|
107
|
-
* "apply" on the next tick, giving time for subsequent requests in a roughly ~10ms window
|
|
108
|
-
* to load and share the same digest cycle.
|
|
109
|
-
*
|
|
110
|
-
* @returns {boolean|Object} If a value is specified, returns the $httpProvider for chaining.
|
|
111
|
-
* otherwise, returns the current configured value.
|
|
112
|
-
*/
|
|
113
|
-
useApplyAsync: (value?: boolean | undefined) => boolean | any;
|
|
114
|
-
interceptors: any[];
|
|
115
|
-
xsrfTrustedOrigins: any[];
|
|
116
|
-
$get: (
|
|
117
|
-
| string
|
|
118
|
-
| ((
|
|
119
|
-
$browser: any,
|
|
120
|
-
$httpBackend: any,
|
|
121
|
-
$$cookieReader: any,
|
|
122
|
-
$cacheFactory: any,
|
|
123
|
-
$rootScope: any,
|
|
124
|
-
$q: any,
|
|
125
|
-
$injector: any,
|
|
126
|
-
$sce: any,
|
|
127
|
-
) => {
|
|
128
|
-
(requestConfig: any): HttpPromise;
|
|
129
|
-
pendingRequests: any[];
|
|
130
|
-
/**
|
|
131
|
-
* @ngdoc property
|
|
132
|
-
* @name $http#defaults
|
|
133
|
-
*
|
|
134
|
-
* @description
|
|
135
|
-
* Runtime equivalent of the `$httpProvider.defaults` property. Allows configuration of
|
|
136
|
-
* default headers, withCredentials as well as request and response transformations.
|
|
137
|
-
*
|
|
138
|
-
* See "Setting HTTP Headers" and "Transforming Requests and Responses" sections above.
|
|
139
|
-
*/
|
|
140
|
-
defaults: {
|
|
141
|
-
transformResponse: (typeof defaultHttpResponseTransform)[];
|
|
142
|
-
transformRequest: ((d: any) => any)[];
|
|
143
|
-
headers: {
|
|
144
|
-
common: {
|
|
145
|
-
Accept: string;
|
|
146
|
-
};
|
|
147
|
-
post: any;
|
|
148
|
-
put: any;
|
|
149
|
-
patch: any;
|
|
150
|
-
};
|
|
151
|
-
xsrfCookieName: string;
|
|
152
|
-
xsrfHeaderName: string;
|
|
153
|
-
paramSerializer: string;
|
|
154
|
-
};
|
|
155
|
-
})
|
|
156
|
-
)[];
|
|
157
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|