@angular-wave/angular.ts 0.9.2 → 0.9.4

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 (196) hide show
  1. package/@types/angular.d.ts +4 -19
  2. package/@types/animations/animate.d.ts +2 -2
  3. package/@types/animations/animation.d.ts +1 -1
  4. package/@types/core/compile/attributes.d.ts +1 -1
  5. package/@types/core/compile/compile.d.ts +2 -2
  6. package/@types/core/controller/controller.d.ts +1 -1
  7. package/@types/core/controller/interface.d.ts +6 -0
  8. package/@types/core/di/ng-module.d.ts +27 -26
  9. package/@types/core/filter/filter.d.ts +5 -5
  10. package/@types/core/interpolate/interface.d.ts +13 -0
  11. package/@types/core/interpolate/interpolate.d.ts +1 -13
  12. package/@types/core/scope/scope.d.ts +4 -1
  13. package/@types/directive/http/http.d.ts +16 -16
  14. package/@types/directive/http/interface.d.ts +27 -0
  15. package/@types/directive/include/include.d.ts +4 -4
  16. package/@types/directive/inject/inject.d.ts +12 -0
  17. package/@types/directive/model/model.d.ts +1 -1
  18. package/@types/directive/script/script.d.ts +2 -2
  19. package/@types/directive/setter/setter.d.ts +4 -4
  20. package/@types/filters/filter.d.ts +2 -2
  21. package/@types/filters/filters.d.ts +2 -2
  22. package/@types/filters/interface.d.ts +8 -0
  23. package/@types/filters/limit-to.d.ts +2 -2
  24. package/@types/filters/order-by.d.ts +2 -2
  25. package/@types/index.d.ts +84 -1
  26. package/@types/interface.d.ts +105 -82
  27. package/@types/router/state/interface.d.ts +8 -8
  28. package/@types/router/state-filters.d.ts +4 -4
  29. package/@types/router/template-factory.d.ts +6 -6
  30. package/@types/router/transition/hook-builder.d.ts +5 -2
  31. package/@types/router/transition/hook-registry.d.ts +11 -2
  32. package/@types/router/transition/transition-service.d.ts +6 -2
  33. package/@types/router/transition/transition.d.ts +2 -2
  34. package/@types/router/view/view.d.ts +1 -8
  35. package/@types/router/view-scroll.d.ts +4 -2
  36. package/@types/services/{anchor-scroll.d.ts → anchor-scroll/anchor-scroll.d.ts} +2 -2
  37. package/@types/services/exception/exception-handler.d.ts +2 -2
  38. package/@types/services/exception/interface.d.ts +1 -1
  39. package/@types/services/http/http.d.ts +40 -2
  40. package/@types/services/http/interface.d.ts +11 -0
  41. package/@types/services/location/location.d.ts +1 -4
  42. package/@types/services/sce/sce.d.ts +3 -4
  43. package/@types/services/template-cache/template-cache.d.ts +4 -4
  44. package/@types/services/template-request/interface.d.ts +22 -0
  45. package/@types/services/{template-request.d.ts → template-request/template-request.d.ts} +4 -7
  46. package/@types/shared/common.d.ts +8 -69
  47. package/@types/shared/hof.d.ts +7 -7
  48. package/dist/angular-ts.esm.js +509 -570
  49. package/dist/angular-ts.umd.js +509 -570
  50. package/dist/angular-ts.umd.min.js +1 -1
  51. package/{src/filters → docs/content/docs/filter}/filter.md +18 -9
  52. package/{src/filters → docs/content/docs/filter}/json.md +6 -3
  53. package/docs/content/docs/filter/limit-to.md +30 -0
  54. package/docs/content/docs/filter/order-by.md +123 -0
  55. package/docs/content/docs/provider/sceProvider.md +194 -0
  56. package/docs/content/docs/provider/templateRequestProvider.md +5 -0
  57. package/docs/content/docs/service/compile.md +5 -0
  58. package/docs/content/docs/service/controller.md +5 -0
  59. package/docs/content/docs/service/http.md +161 -0
  60. package/docs/content/docs/service/interpolation.md +5 -0
  61. package/docs/content/docs/service/log.md +1 -1
  62. package/docs/content/docs/service/parse.md +5 -0
  63. package/docs/content/docs/service/rootElement.md +5 -0
  64. package/docs/content/docs/service/rootScope.md +5 -0
  65. package/docs/content/docs/service/sce.md +194 -0
  66. package/docs/content/docs/service/templateRequest.md +5 -0
  67. package/docs/content/docs/values/_index.md +4 -0
  68. package/docs/content/docs/values/document.md +29 -0
  69. package/docs/content/docs/values/window.md +29 -0
  70. package/docs/layouts/shortcodes/version.html +1 -1
  71. package/docs/static/examples/document/document.html +3 -0
  72. package/docs/static/examples/i18n/i18n.html +77 -0
  73. package/docs/static/examples/window/window.html +4 -0
  74. package/docs/static/typedoc/assets/hierarchy.js +1 -1
  75. package/docs/static/typedoc/assets/highlight.css +0 -49
  76. package/docs/static/typedoc/assets/navigation.js +1 -1
  77. package/docs/static/typedoc/assets/search.js +1 -1
  78. package/docs/static/typedoc/classes/PubSubProvider.html +3 -2
  79. package/docs/static/typedoc/classes/TemplateCacheProvider.html +1 -1
  80. package/docs/static/typedoc/hierarchy.html +1 -1
  81. package/docs/static/typedoc/index.html +1 -1
  82. package/docs/static/typedoc/interfaces/HttpProviderDefaults.html +1 -1
  83. package/docs/static/typedoc/interfaces/RequestConfig.html +1 -1
  84. package/docs/static/typedoc/interfaces/RequestShortcutConfig.html +1 -1
  85. package/docs/static/typedoc/interfaces/ServiceProvider.html +3 -3
  86. package/docs/static/typedoc/types/HttpParamSerializer.html +2 -0
  87. package/docs/static/typedoc/types/{Expression.html → HttpParams.html} +1 -5
  88. package/legacy.d.ts +0 -921
  89. package/package.json +1 -1
  90. package/src/angular.js +2 -9
  91. package/src/animations/animate.js +1 -1
  92. package/src/animations/animation.js +7 -7
  93. package/src/core/compile/compile.js +3 -2
  94. package/src/core/controller/controller.js +10 -6
  95. package/src/core/controller/interface.ts +6 -0
  96. package/src/core/di/injector.js +1 -1
  97. package/src/core/di/internal-injector.js +2 -0
  98. package/src/core/di/ng-module.js +16 -13
  99. package/src/core/filter/filter.js +3 -3
  100. package/src/core/interpolate/interface.ts +14 -0
  101. package/src/core/interpolate/interpolate.js +7 -5
  102. package/src/core/scope/scope.js +4 -1
  103. package/src/directive/http/delete.spec.js +5 -8
  104. package/src/directive/http/http.js +16 -16
  105. package/src/directive/http/interface.ts +36 -0
  106. package/src/directive/http/put.spec.js +5 -8
  107. package/src/directive/include/include.js +2 -2
  108. package/src/{services/http-backend/http-backend.html → directive/inject/inject.html} +1 -4
  109. package/src/directive/inject/inject.js +35 -0
  110. package/src/directive/inject/inject.spec.js +108 -0
  111. package/src/{services/http-backend/http-backend.test.js → directive/inject/inject.test.js} +1 -1
  112. package/src/directive/script/script.js +1 -1
  113. package/src/directive/setter/setter.js +2 -2
  114. package/src/filters/filter.js +1 -1
  115. package/src/filters/filters.js +1 -1
  116. package/src/filters/interface.ts +9 -0
  117. package/src/filters/limit-to.js +1 -1
  118. package/src/filters/order-by.js +1 -1
  119. package/src/index.ts +96 -0
  120. package/src/injection-tokens.js +4 -1
  121. package/src/interface.ts +102 -93
  122. package/src/ng.js +6 -4
  123. package/src/ng.spec.js +12 -0
  124. package/src/router/directives/state-directives.js +1 -1
  125. package/src/router/directives/view-directive.spec.js +19 -35
  126. package/src/router/state/interface.ts +8 -8
  127. package/src/router/state/state-builder.js +4 -4
  128. package/src/router/state/state-registry.js +7 -2
  129. package/src/router/state/state-service.js +2 -14
  130. package/src/router/state-filters.js +2 -2
  131. package/src/router/template-factory.js +3 -3
  132. package/src/router/template-factory.spec.js +10 -19
  133. package/src/router/transition/hook-builder.js +5 -1
  134. package/src/router/transition/hook-registry.js +12 -3
  135. package/src/router/transition/transition-service.js +4 -9
  136. package/src/router/transition/transition.js +3 -2
  137. package/src/router/url/url-service.js +2 -2
  138. package/src/router/view/view.js +3 -15
  139. package/src/router/view-scroll.js +2 -2
  140. package/src/services/{anchor-scroll.js → anchor-scroll/anchor-scroll.js} +4 -4
  141. package/src/services/exception/exception-handler.js +1 -1
  142. package/src/services/exception/interface.ts +1 -1
  143. package/src/services/http/http.js +200 -13
  144. package/src/services/http/http.spec.js +388 -9
  145. package/src/services/http/interface.ts +13 -0
  146. package/src/services/location/location.js +1 -1
  147. package/src/services/pubsub/pubsub.js +0 -1
  148. package/src/services/sce/sce.js +18 -13
  149. package/src/services/template-cache/template-cache.js +2 -2
  150. package/src/services/template-request/interface.ts +23 -0
  151. package/src/services/{template-request.js → template-request/template-request.js} +6 -6
  152. package/src/shared/common.js +7 -80
  153. package/src/shared/hof.js +23 -17
  154. package/typedoc.json +1 -1
  155. package/@types/services/cookie-reader.d.ts +0 -4
  156. package/@types/services/http-backend/http-backend.d.ts +0 -58
  157. package/@types/services/template-cache/interface.d.ts +0 -10
  158. package/docs/static/typedoc/interfaces/ChangesObject.html +0 -6
  159. package/docs/static/typedoc/interfaces/ComponentOptions.html +0 -16
  160. package/docs/static/typedoc/interfaces/Controller.html +0 -12
  161. package/docs/static/typedoc/interfaces/Directive.html +0 -37
  162. package/docs/static/typedoc/interfaces/DirectivePrePost.html +0 -4
  163. package/docs/static/typedoc/interfaces/NgModelController.html +0 -30
  164. package/docs/static/typedoc/interfaces/NgModelOptions.html +0 -16
  165. package/docs/static/typedoc/interfaces/Provider.html +0 -34
  166. package/docs/static/typedoc/interfaces/TemplateCache.html +0 -7
  167. package/docs/static/typedoc/interfaces/TranscludeFunctionObject.html +0 -8
  168. package/docs/static/typedoc/types/AnnotatedDirectiveFactory.html +0 -1
  169. package/docs/static/typedoc/types/AnnotatedFactory.html +0 -8
  170. package/docs/static/typedoc/types/CloneAttachFunction.html +0 -2
  171. package/docs/static/typedoc/types/ControllerConstructor.html +0 -2
  172. package/docs/static/typedoc/types/DirectiveCompileFn.html +0 -2
  173. package/docs/static/typedoc/types/DirectiveController.html +0 -2
  174. package/docs/static/typedoc/types/DirectiveFactory.html +0 -1
  175. package/docs/static/typedoc/types/DirectiveFactoryFn.html +0 -1
  176. package/docs/static/typedoc/types/DirectiveLinkFn.html +0 -2
  177. package/docs/static/typedoc/types/ExpandoStore.html +0 -2
  178. package/docs/static/typedoc/types/FilterFactory.html +0 -2
  179. package/docs/static/typedoc/types/FilterFn.html +0 -2
  180. package/docs/static/typedoc/types/Injectable.html +0 -4
  181. package/docs/static/typedoc/types/InjectableClass.html +0 -1
  182. package/docs/static/typedoc/types/InjectableFactory.html +0 -1
  183. package/docs/static/typedoc/types/OnChangesObject.html +0 -2
  184. package/docs/static/typedoc/types/SwapModeType.html +0 -2
  185. package/docs/static/typedoc/types/TController.html +0 -2
  186. package/docs/static/typedoc/variables/SwapMode.html +0 -11
  187. package/src/filters/limit-to.md +0 -19
  188. package/src/filters/order-by.md +0 -83
  189. package/src/router/state/README.md +0 -21
  190. package/src/services/cookie-reader.js +0 -48
  191. package/src/services/http/http.md +0 -413
  192. package/src/services/http-backend/http-backend.js +0 -158
  193. package/src/services/http-backend/http-backend.spec.js +0 -389
  194. package/src/services/sce/sce.md +0 -300
  195. package/src/services/template-cache/interface.ts +0 -10
  196. /package/src/services/{anchor-scroll.html → anchor-scroll/anchor-scroll.html} +0 -0
@@ -2,10 +2,10 @@
2
2
  * Provides an instance of a cache that can be used to store and retrieve template content.
3
3
  */
4
4
  export class TemplateCacheProvider {
5
- /** @type {import('./interface.ts').TemplateCache} */
6
- cache: import("./interface.ts").TemplateCache;
5
+ /** @type {ng.TemplateCacheService} */
6
+ cache: ng.TemplateCacheService;
7
7
  /**
8
- * @returns {import('./interface.ts').TemplateCache}
8
+ * @returns {ng.TemplateCacheService}
9
9
  */
10
- $get(): import("./interface.ts").TemplateCache;
10
+ $get(): ng.TemplateCacheService;
11
11
  }
@@ -0,0 +1,22 @@
1
+ export interface TemplateRequestService {
2
+ /**
3
+ * Downloads a template using $http and, upon success, stores the
4
+ * contents inside of $templateCache.
5
+ *
6
+ * If the HTTP request fails or the response data of the HTTP request is
7
+ * empty then a $compile error will be thrown (unless
8
+ * {ignoreRequestError} is set to true).
9
+ *
10
+ * @param tpl The template URL.
11
+ * @param ignoreRequestError Whether or not to ignore the exception
12
+ * when the request fails or the template is
13
+ * empty.
14
+ *
15
+ * @return A promise whose value is the template content.
16
+ */
17
+ (tpl: string, ignoreRequestError?: boolean): Promise<string>;
18
+ /**
19
+ * total amount of pending template requests being downloaded.
20
+ */
21
+ totalPendingRequests: number;
22
+ }
@@ -43,13 +43,10 @@ export class TemplateRequestProvider {
43
43
  $get: (
44
44
  | string
45
45
  | ((
46
- $exceptionHandler: import("./exception/exception-handler.js").ErrorHandler,
47
- $templateCache: import("../services/template-cache/interface.ts").TemplateCache,
48
- $http: any,
46
+ $exceptionHandler: ng.ExceptionHandlerService,
47
+ $templateCache: ng.TemplateCacheService,
48
+ $http: ng.HttpService,
49
49
  $sce: any,
50
- ) => {
51
- (tpl: any, ignoreRequestError: any): any;
52
- totalPendingRequests: number;
53
- })
50
+ ) => ng.TemplateRequestService)
54
51
  )[];
55
52
  }
@@ -1,67 +1,4 @@
1
1
  export function equals(o1: any, o2: any): any;
2
- /**
3
- * Builds proxy functions on the `to` object which pass through to the `from` object.
4
- *
5
- * For each key in `fnNames`, creates a proxy function on the `to` object.
6
- * The proxy function calls the real function on the `from` object.
7
- *
8
- *
9
- * #### Example:
10
- * This example creates an new class instance whose functions are prebound to the new'd object.
11
- * ```js
12
- * class Foo {
13
- * constructor(data) {
14
- * // Binds all functions from Foo.prototype to 'this',
15
- * // then copies them to 'this'
16
- * bindFunctions(Foo.prototype, this, this);
17
- * this.data = data;
18
- * }
19
- *
20
- * log() {
21
- * console.log(this.data);
22
- * }
23
- * }
24
- *
25
- * let myFoo = new Foo([1,2,3]);
26
- * var logit = myFoo.log;
27
- * logit(); // logs [1, 2, 3] from the myFoo 'this' instance
28
- * ```
29
- *
30
- * #### Example:
31
- * This example creates a bound version of a service function, and copies it to another object
32
- * ```
33
- *
34
- * var SomeService = {
35
- * this.data = [3, 4, 5];
36
- * this.log = function() {
37
- * console.log(this.data);
38
- * }
39
- * }
40
- *
41
- * // Constructor fn
42
- * function OtherThing() {
43
- * // Binds all functions from SomeService to SomeService,
44
- * // then copies them to 'this'
45
- * bindFunctions(SomeService, this, SomeService);
46
- * }
47
- *
48
- * let myOtherThing = new OtherThing();
49
- * myOtherThing.log(); // logs [3, 4, 5] from SomeService's 'this'
50
- * ```
51
- *
52
- * @param source A function that returns the source object which contains the original functions to be bound
53
- * @param target A function that returns the target object which will receive the bound functions
54
- * @param bind A function that returns the object which the functions will be bound to
55
- * @param fnNames The function names which will be bound (Defaults to all the functions found on the 'from' object)
56
- * @param latebind If true, the binding of the function is delayed until the first time it's invoked
57
- */
58
- export function createProxyFunctions(
59
- source: any,
60
- target: any,
61
- bind: any,
62
- fnNames: any,
63
- latebind?: boolean,
64
- ): any;
65
2
  /**
66
3
  * prototypal inheritance helper.
67
4
  * Creates a new object which has `parent` object as its prototype, and then copies the properties from `extra` onto it
@@ -75,7 +12,14 @@ export function createProxyFunctions(
75
12
  * @returns {Object} - A new object with `parent` as its prototype and properties from `extra`.
76
13
  */
77
14
  export function inherit(parent: any, extra?: any): any;
78
- export function _removeFrom(array: any, obj: any): any;
15
+ /**
16
+ * Given an array, and an item, if the item is found in the array, it removes it (in-place).
17
+ * The same array is returned
18
+ * @param {Array} array
19
+ * @param {any} obj
20
+ * @returns {Array}
21
+ */
22
+ export function removeFrom(array: any[], obj: any): any[];
79
23
  /**
80
24
  * Applies a set of defaults to an options object. The options object is filtered
81
25
  * to only those properties of the objects in the defaultsList.
@@ -177,11 +121,6 @@ export function tail<T>(arr: T[]): T | undefined;
177
121
  * shallow copy from src to dest
178
122
  */
179
123
  export function copy(src: any, dest: any): any;
180
- /**
181
- * Given an array, and an item, if the item is found in the array, it removes it (in-place).
182
- * The same array is returned
183
- */
184
- export const removeFrom: any;
185
124
  export function allTrueR(memo: any, elem: any): any;
186
125
  export function anyTrueR(memo: any, elem: any): any;
187
126
  export function unnestR(memo: any, elem: any): any;
@@ -48,12 +48,13 @@ export function curry(fn: any): any | (() => any | any);
48
48
  */
49
49
  export function compose(...args: any[]): () => any;
50
50
  /**
51
- * Given a varargs list of functions, returns a function that is composes the argument functions, left-to-right
52
- * given: f(x), g(x), h(x)
53
- * let piped = pipe(f,g,h);
54
- * then, piped is: h(g(f(x)))
51
+ * Given a class constructor, returns a predicate function that checks
52
+ * whether a given object is an instance of that class.
53
+ *
54
+ * @param {new (...args: any[]) => any} ctor - The class constructor to check against.
55
+ * @returns {(obj: any) => boolean} A predicate function that returns true if the object is of the given class.
55
56
  */
56
- export function pipe(...args: any[]): any;
57
+ export function is(ctor: new (...args: any[]) => any): (obj: any) => boolean;
57
58
  /**
58
59
  * Sorta like Pattern Matching (a functional programming conditional construct)
59
60
  *
@@ -103,6 +104,5 @@ export function pattern(struct: any): (arg0: any) => any;
103
104
  * getName(obj) === true
104
105
  */
105
106
  export const propEq: any;
106
- export function parse(name: any): any;
107
- export function is(ctor: any): (obj: any) => boolean;
107
+ export function parse(path: any): (obj: any) => any;
108
108
  export function val(v: any): () => any;