@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.
Files changed (64) hide show
  1. package/dist/angular-ts.esm.js +2 -2
  2. package/dist/angular-ts.umd.js +2 -2
  3. package/package.json +1 -1
  4. package/src/animations/animate-js.js +4 -4
  5. package/src/animations/animate-swap.js +3 -0
  6. package/src/core/compile/compile.js +3 -3
  7. package/src/core/controller/controller.js +0 -5
  8. package/src/core/di/injector.js +9 -12
  9. package/src/core/di/internal-injector.js +113 -60
  10. package/src/core/parser/parse.js +1 -12
  11. package/src/core/parser/parse.spec.js +96 -110
  12. package/src/core/timeout/timeout.js +110 -111
  13. package/src/directive/input/input.js +32 -726
  14. package/src/directive/input/input.md +706 -0
  15. package/src/directive/select/select.js +48 -122
  16. package/src/directive/select/select.md +74 -0
  17. package/src/directive/show-hide/show-hide.js +13 -224
  18. package/src/directive/show-hide/show-hide.md +257 -0
  19. package/src/filters/limit-to.spec.js +1 -1
  20. package/src/filters/order-by.spec.js +1 -1
  21. package/src/index.js +6 -2
  22. package/src/loader.js +7 -3
  23. package/src/public.js +1 -7
  24. package/src/router/state/state-builder.js +2 -4
  25. package/src/router/state/state-service.js +1 -1
  26. package/src/router/state-provider.js +1 -1
  27. package/src/router/template-factory.js +10 -10
  28. package/src/router/url/url-service.js +4 -4
  29. package/src/services/anchor-scroll.js +2 -2
  30. package/src/services/browser.js +2 -9
  31. package/src/services/cache-factory.js +0 -67
  32. package/src/services/cache-factory.md +75 -0
  33. package/src/services/cookie-reader.js +36 -55
  34. package/src/services/http/http.js +62 -587
  35. package/src/services/http/http.md +413 -0
  36. package/src/services/http-backend/http-backend.js +19 -44
  37. package/src/services/template-request.js +1 -9
  38. package/src/shared/jqlite/jqlite.js +4 -69
  39. package/src/types.js +2 -4
  40. package/types/animations/animate-swap.d.ts +4 -7
  41. package/types/core/compile/compile.d.ts +6 -6
  42. package/types/core/controller/controller.d.ts +0 -5
  43. package/types/core/di/internal-injector.d.ts +73 -18
  44. package/types/core/exception-handler.d.ts +1 -1
  45. package/types/core/parser/parse.d.ts +1 -1
  46. package/types/core/timeout/timeout.d.ts +16 -26
  47. package/types/directive/input/input.d.ts +19 -124
  48. package/types/directive/select/select.d.ts +7 -74
  49. package/types/directive/show-hide/show-hide.d.ts +11 -224
  50. package/types/loader.d.ts +4 -4
  51. package/types/router/state/state-builder.d.ts +1 -2
  52. package/types/router/state/state-service.d.ts +2 -2
  53. package/types/router/state-provider.d.ts +2 -2
  54. package/types/router/template-factory.d.ts +15 -15
  55. package/types/router/url/url-service.d.ts +4 -4
  56. package/types/services/anchor-scroll.d.ts +1 -1
  57. package/types/services/browser.d.ts +0 -10
  58. package/types/services/cache-factory.d.ts +0 -67
  59. package/types/services/cookie-reader.d.ts +2 -10
  60. package/types/services/http/http.d.ts +53 -61
  61. package/types/services/http-backend/http-backend.d.ts +8 -31
  62. package/types/services/template-request.d.ts +1 -9
  63. package/types/shared/jqlite/jqlite.d.ts +9 -9
  64. package/types/types.d.ts +1 -9
@@ -1,228 +1,15 @@
1
1
  /**
2
- * @ngdoc directive
3
- * @name ngShow
4
- * @multiElement
5
- *
6
- * @description
7
- * The `ngShow` directive shows or hides the given HTML element based on the expression provided to
8
- * the `ngShow` attribute.
9
- *
10
- * The element is shown or hidden by removing or adding the `.ng-hide` CSS class onto the element.
11
- * The `.ng-hide` CSS class is predefined in AngularJS and sets the display style to none (using an
12
- * `!important` flag). For CSP mode please add `angular-csp.css` to your HTML file (see
13
- * {@link ng.directive:ngCsp ngCsp}).
14
- *
15
- * ```html
16
- * <!-- when $scope.myValue is truthy (element is visible) -->
17
- * <div ng-show="myValue"></div>
18
- *
19
- * <!-- when $scope.myValue is falsy (element is hidden) -->
20
- * <div ng-show="myValue" class="ng-hide"></div>
21
- * ```
22
- *
23
- * When the `ngShow` expression evaluates to a falsy value then the `.ng-hide` CSS class is added
24
- * to the class attribute on the element causing it to become hidden. When truthy, the `.ng-hide`
25
- * CSS class is removed from the element causing the element not to appear hidden.
26
- *
27
- * ## Why is `!important` used?
28
- *
29
- * You may be wondering why `!important` is used for the `.ng-hide` CSS class. This is because the
30
- * `.ng-hide` selector can be easily overridden by heavier selectors. For example, something as
31
- * simple as changing the display style on a HTML list item would make hidden elements appear
32
- * visible. This also becomes a bigger issue when dealing with CSS frameworks.
33
- *
34
- * By using `!important`, the show and hide behavior will work as expected despite any clash between
35
- * CSS selector specificity (when `!important` isn't used with any conflicting styles). If a
36
- * developer chooses to override the styling to change how to hide an element then it is just a
37
- * matter of using `!important` in their own CSS code.
38
- *
39
- * ### Overriding `.ng-hide`
40
- *
41
- * By default, the `.ng-hide` class will style the element with `display: none !important`. If you
42
- * wish to change the hide behavior with `ngShow`/`ngHide`, you can simply overwrite the styles for
43
- * the `.ng-hide` CSS class. Note that the selector that needs to be used is actually
44
- * `.ng-hide:not(.ng-hide-animate)` to cope with extra animation classes that can be added.
45
- *
46
- * ```css
47
- * .ng-hide:not(.ng-hide-animate) {
48
- * /&#42; These are just alternative ways of hiding an element &#42;/
49
- * display: block!important;
50
- * position: absolute;
51
- * top: -9999px;
52
- * left: -9999px;
53
- * }
54
- * ```
55
- *
56
- * By default you don't need to override anything in CSS and the animations will work around the
57
- * display style.
58
- *
59
- * @animations
60
- * | Animation | Occurs |
61
- * |-----------------------------------------------------|---------------------------------------------------------------------------------------------------------------|
62
- * | {@link $animate#addClass addClass} `.ng-hide` | After the `ngShow` expression evaluates to a non truthy value and just before the contents are set to hidden. |
63
- * | {@link $animate#removeClass removeClass} `.ng-hide` | After the `ngShow` expression evaluates to a truthy value and just before contents are set to visible. |
64
- *
65
- * Animations in `ngShow`/`ngHide` work with the show and hide events that are triggered when the
66
- * directive expression is true and false. This system works like the animation system present with
67
- * `ngClass` except that you must also include the `!important` flag to override the display
68
- * property so that the elements are not actually hidden during the animation.
69
- *
70
- * ```css
71
- * /&#42; A working example can be found at the bottom of this page. &#42;/
72
- * .my-element.ng-hide-add, .my-element.ng-hide-remove {
73
- * transition: all 0.5s linear;
74
- * }
75
- *
76
- * .my-element.ng-hide-add { ... }
77
- * .my-element.ng-hide-add.ng-hide-add-active { ... }
78
- * .my-element.ng-hide-remove { ... }
79
- * .my-element.ng-hide-remove.ng-hide-remove-active { ... }
80
- * ```
81
- *
82
- * Keep in mind that, as of AngularJS version 1.3, there is no need to change the display property
83
- * to block during animation states - ngAnimate will automatically handle the style toggling for you.
84
- *
85
- * @element ANY
86
- * @param {string} ngShow If the {@link guide/expression expression} is truthy/falsy then the
87
- * element is shown/hidden respectively.
88
- *
89
- * @example
90
- * A simple example, animating the element's opacity:
91
-
92
- * <hr />
93
- *
94
- * @knownIssue
95
- *
96
- * ### Flickering when using ngShow to toggle between elements
97
- *
98
- * When using {@link ngShow} and / or {@link ngHide} to toggle between elements, it can
99
- * happen that both the element to show and the element to hide are visible for a very short time.
100
- *
101
- * This usually happens when the {@link ngAnimate ngAnimate module} is included, but no actual animations
102
- * are defined for {@link ngShow} / {@link ngHide}.
103
- *
104
- * There are several way to mitigate this problem:
105
- *
106
- * - {@link guide/animations#how-to-selectively-enable-disable-and-skip-animations Disable animations on the affected elements}.
107
- * - Use {@link ngIf} or {@link ngSwitch} instead of {@link ngShow} / {@link ngHide}.
108
- * - Use the special CSS selector `ng-hide.ng-hide-animate` to set `{display: none}` or similar on the affected elements.
109
- * - Use `ng-class="{'ng-hide': expression}` instead of instead of {@link ngShow} / {@link ngHide}.
110
- * - Define an animation on the affected elements.
2
+ * @returns {import('../../types').Directive}
111
3
  */
112
- export const ngShowDirective: (string | (($animate: any) => {
113
- restrict: string;
114
- multiElement: boolean;
115
- link(scope: any, element: any, attr: any): void;
116
- }))[];
4
+ export function ngShowDirective($animate: any): import("../../types").Directive;
5
+ export namespace ngShowDirective {
6
+ let $inject: string[];
7
+ }
117
8
  /**
118
- * @ngdoc directive
119
- * @name ngHide
120
- * @multiElement
121
- *
122
- * @description
123
- * The `ngHide` directive shows or hides the given HTML element based on the expression provided to
124
- * the `ngHide` attribute.
125
- *
126
- * The element is shown or hidden by removing or adding the `.ng-hide` CSS class onto the element.
127
- * The `.ng-hide` CSS class is predefined in AngularJS and sets the display style to none (using an
128
- * `!important` flag). For CSP mode please add `angular-csp.css` to your HTML file (see
129
- * {@link ng.directive:ngCsp ngCsp}).
130
- *
131
- * ```html
132
- * <!-- when $scope.myValue is truthy (element is hidden) -->
133
- * <div ng-hide="myValue" class="ng-hide"></div>
134
- *
135
- * <!-- when $scope.myValue is falsy (element is visible) -->
136
- * <div ng-hide="myValue"></div>
137
- * ```
138
- *
139
- * When the `ngHide` expression evaluates to a truthy value then the `.ng-hide` CSS class is added
140
- * to the class attribute on the element causing it to become hidden. When falsy, the `.ng-hide`
141
- * CSS class is removed from the element causing the element not to appear hidden.
142
- *
143
- * ## Why is `!important` used?
144
- *
145
- * You may be wondering why `!important` is used for the `.ng-hide` CSS class. This is because the
146
- * `.ng-hide` selector can be easily overridden by heavier selectors. For example, something as
147
- * simple as changing the display style on a HTML list item would make hidden elements appear
148
- * visible. This also becomes a bigger issue when dealing with CSS frameworks.
149
- *
150
- * By using `!important`, the show and hide behavior will work as expected despite any clash between
151
- * CSS selector specificity (when `!important` isn't used with any conflicting styles). If a
152
- * developer chooses to override the styling to change how to hide an element then it is just a
153
- * matter of using `!important` in their own CSS code.
154
- *
155
- * ### Overriding `.ng-hide`
156
- *
157
- * By default, the `.ng-hide` class will style the element with `display: none !important`. If you
158
- * wish to change the hide behavior with `ngShow`/`ngHide`, you can simply overwrite the styles for
159
- * the `.ng-hide` CSS class. Note that the selector that needs to be used is actually
160
- * `.ng-hide:not(.ng-hide-animate)` to cope with extra animation classes that can be added.
161
- *
162
- * ```css
163
- * .ng-hide:not(.ng-hide-animate) {
164
- * /&#42; These are just alternative ways of hiding an element &#42;/
165
- * display: block!important;
166
- * position: absolute;
167
- * top: -9999px;
168
- * left: -9999px;
169
- * }
170
- * ```
171
- *
172
- * By default you don't need to override in CSS anything and the animations will work around the
173
- * display style.
174
- *
175
- * @animations
176
- * | Animation | Occurs |
177
- * |-----------------------------------------------------|------------------------------------------------------------------------------------------------------------|
178
- * | {@link $animate#addClass addClass} `.ng-hide` | After the `ngHide` expression evaluates to a truthy value and just before the contents are set to hidden. |
179
- * | {@link $animate#removeClass removeClass} `.ng-hide` | After the `ngHide` expression evaluates to a non truthy value and just before contents are set to visible. |
180
- *
181
- * Animations in `ngShow`/`ngHide` work with the show and hide events that are triggered when the
182
- * directive expression is true and false. This system works like the animation system present with
183
- * `ngClass` except that you must also include the `!important` flag to override the display
184
- * property so that the elements are not actually hidden during the animation.
185
- *
186
- * ```css
187
- * /&#42; A working example can be found at the bottom of this page. &#42;/
188
- * .my-element.ng-hide-add, .my-element.ng-hide-remove {
189
- * transition: all 0.5s linear;
190
- * }
191
- *
192
- * .my-element.ng-hide-add { ... }
193
- * .my-element.ng-hide-add.ng-hide-add-active { ... }
194
- * .my-element.ng-hide-remove { ... }
195
- * .my-element.ng-hide-remove.ng-hide-remove-active { ... }
196
- * ```
197
- *
198
- * Keep in mind that, as of AngularJS version 1.3, there is no need to change the display property
199
- * to block during animation states - ngAnimate will automatically handle the style toggling for you.
200
- *
201
- * @element ANY
202
- * @param {string} ngHide If the {@link guide/expression expression} is truthy/falsy then the
203
- * element is hidden/shown respectively.
204
- *
205
- * @knownIssue
206
- *
207
- * ### Flickering when using ngHide to toggle between elements
208
- *
209
- * When using {@link ngShow} and / or {@link ngHide} to toggle between elements, it can
210
- * happen that both the element to show and the element to hide are visible for a very short time.
211
- *
212
- * This usually happens when the {@link ngAnimate ngAnimate module} is included, but no actual animations
213
- * are defined for {@link ngShow} / {@link ngHide}. Internet Explorer is affected more often than
214
- * other browsers.
215
- *
216
- * There are several way to mitigate this problem:
217
- *
218
- * - {@link guide/animations#how-to-selectively-enable-disable-and-skip-animations Disable animations on the affected elements}.
219
- * - Use {@link ngIf} or {@link ngSwitch} instead of {@link ngShow} / {@link ngHide}.
220
- * - Use the special CSS selector `ng-hide.ng-hide-animate` to set `{display: none}` or similar on the affected elements.
221
- * - Use `ng-class="{'ng-hide': expression}` instead of instead of {@link ngShow} / {@link ngHide}.
222
- * - Define an animation on the affected elements.
9
+ * @returns {import('../../types').Directive}
223
10
  */
224
- export const ngHideDirective: (string | (($animate: any) => {
225
- restrict: string;
226
- multiElement: boolean;
227
- link(scope: any, element: any, attr: any): void;
228
- }))[];
11
+ export function ngHideDirective($animate: any): import("../../types").Directive;
12
+ export namespace ngHideDirective {
13
+ let $inject_1: string[];
14
+ export { $inject_1 as $inject };
15
+ }
package/types/loader.d.ts CHANGED
@@ -79,9 +79,9 @@ export class Angular {
79
79
  *
80
80
  * @param {any[]} modules
81
81
  * @param {boolean?} strictDi
82
- * @returns {import("./types").InjectorService}
82
+ * @returns {import("./core/di/internal-injector").InjectorService}
83
83
  */
84
- injector(modules: any[], strictDi: boolean | null): import("./types").InjectorService;
84
+ injector(modules: any[], strictDi: boolean | null): import("./core/di/internal-injector").InjectorService;
85
85
  /**
86
86
  * @param {Element|Document} element
87
87
  */
@@ -129,11 +129,11 @@ export class Angular {
129
129
  * @param {string} name The name of the module to create or retrieve.
130
130
  * @param {Array.<string>} [requires] If specified then new module is being created. If
131
131
  * unspecified then the module is being retrieved for further configuration.
132
- * @param {Function} [configFn] Optional configuration function for the module. Same as
132
+ * @param {Array<any>|Function} [configFn] Optional configuration function for the module. Same as
133
133
  * {@link import('./types').Module#config Module#config()}.
134
134
  * @returns {NgModule} A newly registered module.
135
135
  */
136
- module(name: string, requires?: Array<string>, configFn?: Function): NgModule;
136
+ module(name: string, requires?: Array<string>, configFn?: Array<any> | Function): NgModule;
137
137
  }
138
138
  /**
139
139
  * Configuration option for AngularTS bootstrap process.
@@ -57,7 +57,7 @@ export class StateBuilder {
57
57
  matcher: any;
58
58
  $injector: any;
59
59
  builders: {
60
- name: (typeof nameBuilder)[];
60
+ name: ((state: any) => any)[];
61
61
  self: (typeof selfBuilder)[];
62
62
  parent: ((state: any) => any)[];
63
63
  data: (typeof dataBuilder)[];
@@ -81,7 +81,6 @@ export class StateBuilder {
81
81
  parentName(state: any): any;
82
82
  name(state: any): any;
83
83
  }
84
- declare function nameBuilder(state: any): any;
85
84
  declare function selfBuilder(state: any): any;
86
85
  declare function dataBuilder(state: any): any;
87
86
  declare function pathBuilder(state: any): any;
@@ -123,9 +123,9 @@ export class StateService {
123
123
  decorator(name: string, func: object): object;
124
124
  /**
125
125
  *
126
- * @param {angular.Ng1StateDeclaration} definition
126
+ * @param {any} definition
127
127
  */
128
- state(definition: angular.Ng1StateDeclaration): this;
128
+ state(definition: any): this;
129
129
  /**
130
130
  * Handler for when [[transitionTo]] is called with an invalid state.
131
131
  *
@@ -110,10 +110,10 @@ export class StateProvider {
110
110
  decorator(name: string, func: object): object;
111
111
  /**
112
112
  *
113
- * @param {angular.Ng1StateDeclaration} definition
113
+ * @param {*} definition
114
114
  * @returns {StateProvider}
115
115
  */
116
- state(definition: angular.Ng1StateDeclaration): StateProvider;
116
+ state(definition: any): StateProvider;
117
117
  /**
118
118
  * Registers an invalid state handler
119
119
  *
@@ -9,11 +9,11 @@
9
9
  export class TemplateFactory {
10
10
  /** @type {boolean} */
11
11
  _useHttp: boolean;
12
- $get: (string | (($http: angular.IHttpService, $templateCache: angular.ITemplateCacheService, $templateRequest: angular.ITemplateRequestService, $q: angular.IQService, $injector: import("../core/di/internal-injector").InjectorService) => this))[];
13
- $templateRequest: angular.ITemplateRequestService;
14
- $http: angular.IHttpService;
15
- $templateCache: angular.ITemplateCacheService;
16
- $q: angular.IQService;
12
+ $get: (string | (($http: any, $templateCache: any, $templateRequest: any, $q: any, $injector: import("../core/di/internal-injector").InjectorService) => this))[];
13
+ $templateRequest: any;
14
+ $http: any;
15
+ $templateCache: any;
16
+ $q: any;
17
17
  $injector: import("../core/di/internal-injector").InjectorService;
18
18
  /**
19
19
  * Forces the provider to use $http service directly
@@ -27,24 +27,24 @@ export class TemplateFactory {
27
27
  * The following properties are search in the specified order, and the first one
28
28
  * that is defined is used to create the template:
29
29
  *
30
- * @param {angular.Ng1ViewDeclaration} config
30
+ * @param {any} config
31
31
  * @param {any} params Parameters to pass to the template function.
32
- * @param {angular.ResolveContext} context The resolve context associated with the template's view
32
+ * @param {import("./resolve/resolve-context").ResolveContext} context The resolve context associated with the template's view
33
33
  *
34
34
  * @return {string|object} The template html as a string, or a promise for
35
35
  * that string,or `null` if no template is configured.
36
36
  */
37
- fromConfig(config: angular.Ng1ViewDeclaration, params: any, context: angular.ResolveContext): string | object;
37
+ fromConfig(config: any, params: any, context: import("./resolve/resolve-context").ResolveContext): string | object;
38
38
  /**
39
39
  * Creates a template from a string or a function returning a string.
40
40
  *
41
41
  * @param {string | Function} template html template as a string or function that returns an html template as a string.
42
- * @param {angular.RawParams} [params] Parameters to pass to the template function.
42
+ * @param {any} [params] Parameters to pass to the template function.
43
43
  *
44
44
  * @return {string|object} The template html as a string, or a promise for that
45
45
  * string.
46
46
  */
47
- fromString(template: string | Function, params?: angular.RawParams): string | object;
47
+ fromString(template: string | Function, params?: any): string | object;
48
48
  /**
49
49
  * Loads a template from the a URL via `$http` and `$templateCache`.
50
50
  *
@@ -60,11 +60,11 @@ export class TemplateFactory {
60
60
  *
61
61
  * @param {import('../types').Injectable<any>} provider Function to invoke via `locals`
62
62
  * @param {Function} injectFn a function used to invoke the template provider
63
- * @param {angular.ResolveContext} context
63
+ * @param {import("./resolve/resolve-context").ResolveContext} context
64
64
  * @return {string|Promise.<string>} The template html as a string, or a promise
65
65
  * for that string.
66
66
  */
67
- fromProvider(provider: import("../types").Injectable<any>, params: any, context: angular.ResolveContext): string | Promise<string>;
67
+ fromProvider(provider: import("../types").Injectable<any>, params: any, context: import("./resolve/resolve-context").ResolveContext): string | Promise<string>;
68
68
  /**
69
69
  * Creates a component's template by invoking an injectable provider function.
70
70
  *
@@ -81,13 +81,13 @@ export class TemplateFactory {
81
81
  * It analyses the component's bindings, then constructs a template that instantiates the component.
82
82
  * The template wires input and output bindings to resolves or from the parent component.
83
83
  *
84
- * @param {angular.IAugmentedJQuery} ngView {object} The parent ui-view (for binding outputs to callbacks)
85
- * @param {angular.ResolveContext} context The ResolveContext (for binding outputs to callbacks returned from resolves)
84
+ * @param {any} ngView {object} The parent ui-view (for binding outputs to callbacks)
85
+ * @param {import("./resolve/resolve-context").ResolveContext} context The ResolveContext (for binding outputs to callbacks returned from resolves)
86
86
  * @param {string} component {string} Component's name in camel case.
87
87
  * @param {any} [bindings] An object defining the component's bindings: {foo: '<'}
88
88
  * @return {string} The template as a string: "<component-name input1='::$resolve.foo'></component-name>".
89
89
  */
90
- makeComponentTemplate(ngView: angular.IAugmentedJQuery, context: angular.ResolveContext, component: string, bindings?: any): string;
90
+ makeComponentTemplate(ngView: any, context: import("./resolve/resolve-context").ResolveContext, component: string, bindings?: any): string;
91
91
  }
92
92
  export type BindingTuple = {
93
93
  name: string;
@@ -104,15 +104,15 @@ export class UrlService {
104
104
  * locationServices.url("/some/path?query=value#anchor", true);
105
105
  * ```
106
106
  *
107
- * @param {string} newUrl The new value for the URL.
107
+ * @param {string} [newUrl] The new value for the URL.
108
108
  * This url should reflect only the new internal [[path]], [[search]], and [[hash]] values.
109
109
  * It should not include the protocol, site, port, or base path of an absolute HREF.
110
- * @param {boolean} replace When true, replaces the current history entry (instead of appending it) with this new url
111
- * @param {any} state The history's state object, i.e., pushState (if the LocationServices implementation supports it)
110
+ * @param {boolean} [replace] When true, replaces the current history entry (instead of appending it) with this new url
111
+ * @param {any} [state] The history's state object, i.e., pushState (if the LocationServices implementation supports it)
112
112
  *
113
113
  * @return the url (after potentially being processed)
114
114
  */
115
- url(newUrl: string, replace: boolean, state: any): any;
115
+ url(newUrl?: string, replace?: boolean, state?: any): any;
116
116
  /**
117
117
  * @internal
118
118
  *
@@ -1,5 +1,5 @@
1
1
  export function AnchorScrollProvider(): void;
2
2
  export class AnchorScrollProvider {
3
3
  disableAutoScrolling: () => void;
4
- $get: (string | (($location: angular.IRootScopeService, $rootScope: any) => (hash: any) => void))[];
4
+ $get: (string | (($location: any, $rootScope: import("../core/scope/scope").Scope) => (hash: any) => void))[];
5
5
  }
@@ -149,8 +149,6 @@ export class Browser {
149
149
  cancel: (deferId: number) => boolean;
150
150
  }
151
151
  /**
152
- * @typedef {import('../types').ServiceProvider} angular.BrowserProvider
153
- * @description
154
152
  * This object has two goals:
155
153
  *
156
154
  * - hide all the global state in the browser caused by the window object
@@ -158,15 +156,7 @@ export class Browser {
158
156
  *
159
157
  * Remove this in the future
160
158
  */
161
- /**
162
- * @constructor
163
- * @this {angular.BrowserProvider}
164
- */
165
- export function BrowserProvider(this: import("../types").ServiceProvider): void;
166
159
  export class BrowserProvider {
167
160
  $get: (string | (($$taskTrackerFactory: import("../core/task-tracker-factory").TaskTracker) => Browser))[];
168
161
  }
169
162
  export type UrlChangeListener = (arg0: string, arg1: string | null) => any;
170
- export namespace angular {
171
- type BrowserProvider = import("../types").ServiceProvider;
172
- }
@@ -1,70 +1,3 @@
1
- /**
2
- * @ngdoc service
3
- * @name $cacheFactory
4
- *
5
- *
6
- * @description
7
- * Factory that constructs {@link $cacheFactory.Cache Cache} objects and gives access to
8
- * them.
9
- *
10
- * ```js
11
- *
12
- * let cache = $cacheFactory('cacheId');
13
- * expect($cacheFactory.get('cacheId')).toBe(cache);
14
- * expect($cacheFactory.get('noSuchCacheId')).not.toBeDefined();
15
- *
16
- * cache.put("key", "value");
17
- * cache.put("another key", "another value");
18
- *
19
- * // We've specified no options on creation
20
- * expect(cache.info()).toEqual({id: 'cacheId', size: 2});
21
- *
22
- * ```
23
- *
24
- *
25
- * @example
26
- <example module="cacheExampleApp" name="cache-factory">
27
- <file name="index.html">
28
- <div ng-controller="CacheController">
29
- <input ng-model="newCacheKey" placeholder="Key">
30
- <input ng-model="newCacheValue" placeholder="Value">
31
- <button ng-click="put(newCacheKey, newCacheValue)">Cache</button>
32
-
33
- <p ng-if="keys.length">Cached Values</p>
34
- <div ng-repeat="key in keys">
35
- <span ng-bind="key"></span>
36
- <span>: </span>
37
- <b ng-bind="cache.get(key)"></b>
38
- </div>
39
-
40
- <p>Cache Info</p>
41
- <div ng-repeat="(key, value) in cache.info()">
42
- <span ng-bind="key"></span>
43
- <span>: </span>
44
- <b ng-bind="value"></b>
45
- </div>
46
- </div>
47
- </file>
48
- <file name="script.js">
49
- angular.module('cacheExampleApp', []).
50
- controller('CacheController', ['$scope', '$cacheFactory', function($scope, $cacheFactory) {
51
- $scope.keys = [];
52
- $scope.cache = $cacheFactory('cacheId');
53
- $scope.put = function(key, value) {
54
- if (angular.isUndefined($scope.cache.get(key))) {
55
- $scope.keys.push(key);
56
- }
57
- $scope.cache.put(key, angular.isUndefined(value) ? null : value);
58
- };
59
- }]);
60
- </file>
61
- <file name="style.css">
62
- p {
63
- margin: 10px 0 3px;
64
- }
65
- </file>
66
- </example>
67
- */
68
1
  export function CacheFactoryProvider(): void;
69
2
  export class CacheFactoryProvider {
70
3
  $get: () => {
@@ -1,12 +1,4 @@
1
1
  /**
2
- *
3
- * @description
4
- * This is a private service for reading cookies used by $http and ngCookies
5
- *
6
- * @return {Object} a key/value map of the current cookies
2
+ * @returns {Object<String, String>} List of all cookies
7
3
  */
8
- export function $$CookieReader(): any;
9
- export function CookieReaderProvider(): void;
10
- export class CookieReaderProvider {
11
- $get: typeof $$CookieReader;
12
- }
4
+ export function getCookies(): any;
@@ -1,68 +1,60 @@
1
+ /**
2
+ * Default params serializer that converts objects to strings
3
+ * according to the following rules:
4
+ *
5
+ * * `{'foo': 'bar'}` results in `foo=bar`
6
+ * * `{'foo': Date.now()}` results in `foo=2015-04-01T09%3A50%3A49.262Z` (`toISOString()` and encoded representation of a Date object)
7
+ * * `{'foo': ['bar', 'baz']}` results in `foo=bar&foo=baz` (repeated key for each array element)
8
+ * * `{'foo': {'bar':'baz'}}` results in `foo=%7B%22bar%22%3A%22baz%22%7D` (stringified and encoded representation of an object)
9
+ *
10
+ * Note that serializer will sort the request parameters alphabetically.
11
+ */
1
12
  export function $HttpParamSerializerProvider(): void;
2
13
  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
14
  $get: () => (params: any) => string;
19
15
  }
16
+ /**
17
+ *
18
+ * Alternative {@link $http `$http`} params serializer that follows
19
+ * jQuery's [`param()`](http://api.jquery.com/jquery.param/) method logic.
20
+ * The serializer will also sort the params alphabetically.
21
+ *
22
+ * To use it for serializing `$http` request parameters, set it as the `paramSerializer` property:
23
+ *
24
+ * ```js
25
+ * $http({
26
+ * url: myUrl,
27
+ * method: 'GET',
28
+ * params: myParams,
29
+ * paramSerializer: '$httpParamSerializerJQLike'
30
+ * });
31
+ * ```
32
+ *
33
+ * It is also possible to set it as the default `paramSerializer` in the
34
+ * {@link $httpProvider#defaults `$httpProvider`}.
35
+ *
36
+ * Additionally, you can inject the serializer and use it explicitly, for example to serialize
37
+ * form data for submission:
38
+ *
39
+ * ```js
40
+ * .controller(function($http, $httpParamSerializerJQLike) {
41
+ * //...
42
+ *
43
+ * $http({
44
+ * url: myUrl,
45
+ * method: 'POST',
46
+ * data: $httpParamSerializerJQLike(myData),
47
+ * headers: {
48
+ * 'Content-Type': 'application/x-www-form-urlencoded'
49
+ * }
50
+ * });
51
+ *
52
+ * });
53
+ * ```
54
+ *
55
+ */
20
56
  export function $HttpParamSerializerJQLikeProvider(): void;
21
57
  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
58
  $get: () => (params: any) => string;
67
59
  }
68
60
  export function defaultHttpResponseTransform(data: any, headers: any): any;
@@ -113,8 +105,8 @@ export class $HttpProvider {
113
105
  useApplyAsync: (value?: boolean | undefined) => boolean | any;
114
106
  interceptors: any[];
115
107
  xsrfTrustedOrigins: any[];
116
- $get: (string | (($browser: any, $httpBackend: any, $$cookieReader: any, $cacheFactory: any, $rootScope: any, $q: any, $injector: import("../../core/di/internal-injector").InjectorService, $sce: any) => {
117
- (requestConfig: any): HttpPromise;
108
+ $get: (string | (($browser: any, $httpBackend: any, $cacheFactory: any, $rootScope: any, $q: any, $injector: import("../../core/di/internal-injector").InjectorService, $sce: any) => {
109
+ (requestConfig: any): any;
118
110
  pendingRequests: any[];
119
111
  /**
120
112
  * @ngdoc property