@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.
Files changed (191) hide show
  1. package/Makefile +6 -5
  2. package/dist/angular-ts.esm.js +2 -1
  3. package/dist/angular-ts.umd.js +1 -1
  4. package/package.json +2 -4
  5. package/rollup.config.js +5 -1
  6. package/src/binding.spec.js +4 -4
  7. package/src/core/location/location.js +1 -1
  8. package/src/core/scope/scope.js +4 -7
  9. package/src/exts/aria/aria.html +1 -4
  10. package/src/exts/messages/messages.html +1 -4
  11. package/src/index.js +307 -1
  12. package/src/loader.js +13 -6
  13. package/src/public.js +7 -2
  14. package/src/router/directives/directives.test.js +19 -0
  15. package/src/router/directives/state-directives.html +21 -0
  16. package/src/router/{state-directives.spec.js → directives/state-directives.spec.js} +2 -1
  17. package/src/router/{view-directive.spec.js → directives/view-directive.spec.js} +2 -1
  18. package/src/router/directives/view-directives.html +21 -0
  19. package/src/router/router.html +22 -0
  20. package/src/router/router.test.js +11 -0
  21. package/src/router/services.spec.js +2 -2
  22. package/src/router/{state-builder.spec.js → state/state-builder.spec.js} +9 -12
  23. package/src/router/state/state.html +22 -0
  24. package/src/router/{state.spec.js → state/state.spec.js} +1 -1
  25. package/src/router/state/state.test.js +11 -0
  26. package/src/router/state-filter.spec.js +2 -2
  27. package/src/router/template-factory.spec.js +4 -4
  28. package/src/router/url/url.html +18 -0
  29. package/src/router/url/url.test.js +11 -0
  30. package/src/router/view/view.html +18 -0
  31. package/src/router/{view.spec.js → view/view.spec.js} +1 -1
  32. package/src/router/view/view.test.js +11 -0
  33. package/src/router/view-hook.spec.js +4 -4
  34. package/src/router/view-scroll.spec.js +4 -4
  35. package/src/services/http/http.html +22 -0
  36. package/src/services/http/http.test.js +11 -0
  37. package/src/services/http-backend/http-backend.html +21 -0
  38. package/src/services/http-backend/http-backend.js +1 -1
  39. package/src/services/http-backend/http-backend.spec.js +1 -1
  40. package/src/services/http-backend/http-backend.test.js +11 -0
  41. package/src/shared/common.spec.js +4 -4
  42. package/src/shared/hof.spec.js +1 -1
  43. package/src/shared/min-err.spec.js +2 -2
  44. package/src/shared/shared.html +22 -0
  45. package/src/shared/shared.test.js +11 -0
  46. package/src/shared/test-utils.js +2 -2
  47. package/src/shared/utils.spec.js +1 -1
  48. package/src/src.html +22 -0
  49. package/src/src.test.js +10 -0
  50. package/tsconfig.json +1 -1
  51. package/tsconfig.types.json +11 -0
  52. package/types/animations/animate-cache.d.ts +7 -7
  53. package/types/animations/animate-children-directive.d.ts +3 -6
  54. package/types/animations/animate-swap.d.ts +7 -16
  55. package/types/animations/animation.d.ts +2 -11
  56. package/types/animations/raf-scheduler.d.ts +3 -3
  57. package/types/animations/shared.d.ts +8 -23
  58. package/types/core/{animate-css.d.ts → animate/animate-css.d.ts} +2 -8
  59. package/types/core/{cache.d.ts → cache/cache.d.ts} +5 -5
  60. package/types/core/compile/compile.d.ts +173 -0
  61. package/types/core/controller/controller.d.ts +32 -0
  62. package/types/core/exception-handler.d.ts +1 -1
  63. package/types/core/filter/filter.d.ts +9 -0
  64. package/types/core/{interpolate.d.ts → interpolate/interpolate.d.ts} +23 -39
  65. package/types/core/interval/interval-factory.d.ts +4 -0
  66. package/types/core/{interval.d.ts → interval/interval.d.ts} +1 -1
  67. package/types/core/location/location.d.ts +209 -0
  68. package/types/core/pubsub/pubsub.d.ts +156 -0
  69. package/types/core/q/q.d.ts +31 -0
  70. package/types/core/sanitize/sanitize-uri.d.ts +53 -0
  71. package/types/core/{sce.d.ts → sce/sce.d.ts} +80 -86
  72. package/types/core/scope/scope.d.ts +727 -0
  73. package/types/core/task-tracker-factory.d.ts +29 -29
  74. package/types/core/timeout/timeout.d.ts +20 -0
  75. package/types/core/{urlUtils.d.ts → url-utils/url-utils.d.ts} +2 -7
  76. package/types/directive/{bind.d.ts → bind/bind.d.ts} +4 -10
  77. package/types/directive/{class.d.ts → class/class.d.ts} +12 -21
  78. package/types/directive/controller/controller.d.ts +6 -0
  79. package/types/directive/events/events.d.ts +5 -0
  80. package/types/directive/form/form.d.ts +200 -0
  81. package/types/directive/if/if.d.ts +8 -0
  82. package/types/directive/include/include.d.ts +14 -0
  83. package/types/directive/{input.d.ts → input/input.d.ts} +20 -69
  84. package/types/directive/{model.d.ts → model/model.d.ts} +256 -279
  85. package/types/directive/options/options.d.ts +9 -0
  86. package/types/directive/ref/ref.d.ts +5 -0
  87. package/types/directive/repeat/repeat.d.ts +8 -0
  88. package/types/directive/{script.d.ts → script/script.d.ts} +5 -8
  89. package/types/directive/{show-hide.d.ts → show-hide/show-hide.d.ts} +10 -16
  90. package/types/directive/switch/switch.d.ts +17 -0
  91. package/types/directive/transclude/transclude.d.ts +4 -0
  92. package/types/directive/{validators.d.ts → validators/validators.d.ts} +20 -35
  93. package/types/filters/filters.d.ts +10 -16
  94. package/types/filters/order-by.d.ts +2 -4
  95. package/types/index.d.ts +117 -0
  96. package/types/injector.d.ts +12 -0
  97. package/types/public.d.ts +5 -0
  98. package/types/router/common/coreservices.d.ts +2 -2
  99. package/types/router/common/glob.d.ts +9 -9
  100. package/types/router/common/queue.d.ts +13 -13
  101. package/types/router/common/trace.d.ts +43 -43
  102. package/types/router/directives/view-directive.d.ts +13 -32
  103. package/types/router/globals.d.ts +20 -20
  104. package/types/router/hooks/lazy-load.d.ts +2 -11
  105. package/types/router/hooks/redirect-to.d.ts +1 -4
  106. package/types/router/hooks/url.d.ts +1 -5
  107. package/types/router/hooks/views.d.ts +1 -4
  108. package/types/router/params/param-factory.d.ts +5 -5
  109. package/types/router/params/param-type.d.ts +35 -35
  110. package/types/router/params/param-types.d.ts +11 -11
  111. package/types/router/params/param.d.ts +38 -38
  112. package/types/router/params/state-params.d.ts +10 -10
  113. package/types/router/path/path-node.d.ts +34 -34
  114. package/types/router/path/path-utils.d.ts +73 -77
  115. package/types/router/resolve/resolvable.d.ts +32 -32
  116. package/types/router/resolve/resolve-context.d.ts +84 -84
  117. package/types/router/services.d.ts +4 -9
  118. package/types/router/state/state-builder.d.ts +27 -27
  119. package/types/router/state/state-matcher.d.ts +5 -5
  120. package/types/router/state/state-object.d.ts +58 -58
  121. package/types/router/state/state-queue-manager.d.ts +10 -16
  122. package/types/router/state/state-registry.d.ts +100 -107
  123. package/types/router/state/state-service.d.ts +411 -411
  124. package/types/router/state/target-state.d.ts +64 -69
  125. package/types/router/state/views.d.ts +31 -37
  126. package/types/router/state-filters.d.ts +7 -7
  127. package/types/router/state-provider.d.ts +105 -105
  128. package/types/router/template-factory.d.ts +83 -112
  129. package/types/router/transition/hook-builder.d.ts +25 -25
  130. package/types/router/transition/hook-registry.d.ts +68 -83
  131. package/types/router/transition/interface.d.ts +7 -7
  132. package/types/router/transition/reject-factory.d.ts +34 -34
  133. package/types/router/transition/transition-event-type.d.ts +9 -18
  134. package/types/router/transition/transition-hook.d.ts +77 -82
  135. package/types/router/transition/transition-service.d.ts +82 -99
  136. package/types/router/transition/transition.d.ts +369 -377
  137. package/types/router/url/url-config.d.ts +84 -84
  138. package/types/router/url/url-matcher.d.ts +115 -119
  139. package/types/router/url/url-rule.d.ts +114 -124
  140. package/types/router/url/url-rules.d.ts +217 -217
  141. package/types/router/url/url-service.d.ts +264 -269
  142. package/types/router/view/view.d.ts +114 -117
  143. package/types/router/view-scroll.d.ts +2 -2
  144. package/types/services/anchor-scroll.d.ts +2 -8
  145. package/types/services/browser.d.ts +122 -130
  146. package/types/services/cache-factory.d.ts +25 -25
  147. package/types/services/cookie-reader.d.ts +2 -2
  148. package/types/services/document.d.ts +2 -2
  149. package/types/services/http/http.d.ts +145 -0
  150. package/types/services/{http-backend.d.ts → http-backend/http-backend.d.ts} +3 -35
  151. package/types/services/log.d.ts +49 -49
  152. package/types/services/template-request.d.ts +44 -53
  153. package/types/shared/common.d.ts +4 -19
  154. package/types/{constants.d.ts → shared/constants.d.ts} +6 -6
  155. package/types/shared/hof.d.ts +1 -1
  156. package/types/{jqLite.d.ts → shared/jqlite/jqlite.d.ts} +11 -11
  157. package/types/shared/test-utils.d.ts +11 -0
  158. package/types/shared/utils.d.ts +7 -24
  159. package/types-back/global.d.ts +3 -1
  160. package/types-back/index.d.ts +2 -221
  161. package/types/core/compile.d.ts +0 -206
  162. package/types/core/controller.d.ts +0 -42
  163. package/types/core/filter.d.ts +0 -9
  164. package/types/core/interval-factory.d.ts +0 -21
  165. package/types/core/location.d.ts +0 -234
  166. package/types/core/pubsub.d.ts +0 -164
  167. package/types/core/q.d.ts +0 -33
  168. package/types/core/root-scope.d.ts +0 -754
  169. package/types/core/sanitize-uri.d.ts +0 -57
  170. package/types/core/timeout.d.ts +0 -31
  171. package/types/directive/controller.d.ts +0 -6
  172. package/types/directive/events.d.ts +0 -12
  173. package/types/directive/form.d.ts +0 -230
  174. package/types/directive/if.d.ts +0 -17
  175. package/types/directive/include.d.ts +0 -33
  176. package/types/directive/options.d.ts +0 -16
  177. package/types/directive/ref.d.ts +0 -11
  178. package/types/directive/repeat.d.ts +0 -23
  179. package/types/directive/switch.d.ts +0 -23
  180. package/types/directive/transclude.d.ts +0 -15
  181. package/types/services/http.d.ts +0 -157
  182. /package/src/router/{url-service.spec.js → url/url-service.spec.js} +0 -0
  183. /package/types/directive/{attrs.d.ts → attrs/attrs.d.ts} +0 -0
  184. /package/types/directive/{change.d.ts → change/change.d.ts} +0 -0
  185. /package/types/directive/{cloak.d.ts → cloak/cloak.d.ts} +0 -0
  186. /package/types/directive/{init.d.ts → init/init.d.ts} +0 -0
  187. /package/types/directive/{list.d.ts → list/list.d.ts} +0 -0
  188. /package/types/directive/{non-bindable.d.ts → non-bindable/non-bindable.d.ts} +0 -0
  189. /package/types/directive/{style.d.ts → style/style.d.ts} +0 -0
  190. /package/types/exts/{aria.d.ts → aria/aria.d.ts} +0 -0
  191. /package/types/exts/{messages.d.ts → messages/messages.d.ts} +0 -0
@@ -1,147 +1,127 @@
1
- export function NgModelController(
2
- $scope: any,
3
- $exceptionHandler: any,
4
- $attr: any,
5
- $element: any,
6
- $parse: any,
7
- $animate: any,
8
- $timeout: any,
9
- $q: any,
10
- $interpolate: any,
11
- ): void;
1
+ export function NgModelController($scope: any, $exceptionHandler: any, $attr: any, $element: any, $parse: any, $animate: any, $timeout: any, $q: any, $interpolate: any): void;
12
2
  export class NgModelController {
13
- constructor(
14
- $scope: any,
15
- $exceptionHandler: any,
16
- $attr: any,
17
- $element: any,
18
- $parse: any,
19
- $animate: any,
20
- $timeout: any,
21
- $q: any,
22
- $interpolate: any,
23
- );
24
- $viewValue: number;
25
- $modelValue: number;
26
- $$rawModelValue: any;
27
- $validators: {};
28
- $asyncValidators: {};
29
- $parsers: any[];
30
- $formatters: any[];
31
- $viewChangeListeners: any[];
32
- $untouched: boolean;
33
- $touched: boolean;
34
- $pristine: boolean;
35
- $dirty: boolean;
36
- $valid: boolean;
37
- $invalid: boolean;
38
- $error: {};
39
- $$success: {};
40
- $pending: any;
41
- $name: any;
42
- $$parentForm: {
43
- $addControl: () => void;
44
- $getControls: () => any;
45
- $$renameControl: (control: any, name: any) => void;
46
- $removeControl: () => void;
47
- $setValidity: () => void;
48
- $setDirty: () => void;
49
- $setPristine: () => void;
50
- $setSubmitted: () => void;
51
- $$setSubmitted: () => void;
52
- };
53
- $options: any;
54
- $$updateEvents: string;
55
- $$updateEventHandler: any;
56
- $$parsedNgModel: any;
57
- $$parsedNgModelAssign: any;
58
- $$ngModelGet: any;
59
- $$ngModelSet: any;
60
- $$pendingDebounce: any;
61
- $$parserValid: boolean;
62
- $$parserName: string;
63
- $$currentValidationRunId: number;
64
- $$scope: any;
65
- $$rootScope: any;
66
- $$attr: any;
67
- $$element: any;
68
- $$animate: any;
69
- $$timeout: any;
70
- $$parse: any;
71
- $$q: any;
72
- $$exceptionHandler: any;
73
- $$initGetterSetters(): void;
74
- $render: () => void;
75
- /**
76
- * @ngdoc method
77
- * @name ngModel.NgModelController#$isEmpty
78
- *
79
- * @description
80
- * This is called when we need to determine if the value of an input is empty.
81
- *
82
- * For instance, the required directive does this to work out if the input has data or not.
83
- *
84
- * The default `$isEmpty` function checks whether the value is `undefined`, `''`, `null` or `NaN`.
85
- *
86
- * You can override this for input directives whose concept of being empty is different from the
87
- * default. The `checkboxInputType` directive does this because in its case a value of `false`
88
- * implies empty.
89
- *
90
- * @param {*} value The value of the input to check for emptiness.
91
- * @returns {boolean} True if `value` is "empty".
92
- */
93
- $isEmpty(value: any): boolean;
94
- $$updateEmptyClasses(value: any): void;
95
- /**
96
- * @ngdoc method
97
- * @name ngModel.NgModelController#$setPristine
98
- *
99
- * @description
100
- * Sets the control to its pristine state.
101
- *
102
- * This method can be called to remove the `ng-dirty` class and set the control to its pristine
103
- * state (`ng-pristine` class). A model is considered to be pristine when the control
104
- * has not been changed from when first compiled.
105
- */
106
- $setPristine(): void;
107
- /**
108
- * @ngdoc method
109
- * @name ngModel.NgModelController#$setDirty
110
- *
111
- * @description
112
- * Sets the control to its dirty state.
113
- *
114
- * This method can be called to remove the `ng-pristine` class and set the control to its dirty
115
- * state (`ng-dirty` class). A model is considered to be dirty when the control has been changed
116
- * from when first compiled.
117
- */
118
- $setDirty(): void;
119
- /**
120
- * @ngdoc method
121
- * @name ngModel.NgModelController#$setUntouched
122
- *
123
- * @description
124
- * Sets the control to its untouched state.
125
- *
126
- * This method can be called to remove the `ng-touched` class and set the control to its
127
- * untouched state (`ng-untouched` class). Upon compilation, a model is set as untouched
128
- * by default, however this function can be used to restore that state if the model has
129
- * already been touched by the user.
130
- */
131
- $setUntouched(): void;
132
- /**
133
- * @ngdoc method
134
- * @name ngModel.NgModelController#$setTouched
135
- *
136
- * @description
137
- * Sets the control to its touched state.
138
- *
139
- * This method can be called to remove the `ng-untouched` class and set the control to its
140
- * touched state (`ng-touched` class). A model is considered to be touched when the user has
141
- * first focused the control element and then shifted focus away from the control (blur event).
142
- */
143
- $setTouched(): void;
144
- /**
3
+ constructor($scope: any, $exceptionHandler: any, $attr: any, $element: any, $parse: any, $animate: any, $timeout: any, $q: any, $interpolate: any);
4
+ $viewValue: number;
5
+ $modelValue: number;
6
+ $$rawModelValue: any;
7
+ $validators: {};
8
+ $asyncValidators: {};
9
+ $parsers: any[];
10
+ $formatters: any[];
11
+ $viewChangeListeners: any[];
12
+ $untouched: boolean;
13
+ $touched: boolean;
14
+ $pristine: boolean;
15
+ $dirty: boolean;
16
+ $valid: boolean;
17
+ $invalid: boolean;
18
+ $error: {};
19
+ $$success: {};
20
+ $pending: any;
21
+ $name: any;
22
+ $$parentForm: {
23
+ $addControl: () => void;
24
+ $getControls: () => any;
25
+ $$renameControl: (control: any, name: any) => void;
26
+ $removeControl: () => void;
27
+ $setValidity: () => void;
28
+ $setDirty: () => void;
29
+ $setPristine: () => void;
30
+ $setSubmitted: () => void;
31
+ $$setSubmitted: () => void;
32
+ };
33
+ $options: any;
34
+ $$updateEvents: string;
35
+ $$updateEventHandler: any;
36
+ $$parsedNgModel: any;
37
+ $$parsedNgModelAssign: any;
38
+ $$ngModelGet: any;
39
+ $$ngModelSet: any;
40
+ $$pendingDebounce: any;
41
+ $$parserValid: boolean;
42
+ $$parserName: string;
43
+ $$currentValidationRunId: number;
44
+ $$scope: any;
45
+ $$rootScope: any;
46
+ $$attr: any;
47
+ $$element: any;
48
+ $$animate: any;
49
+ $$timeout: any;
50
+ $$parse: any;
51
+ $$q: any;
52
+ $$exceptionHandler: any;
53
+ $$initGetterSetters(): void;
54
+ $render: () => void;
55
+ /**
56
+ * @ngdoc method
57
+ * @name ngModel.NgModelController#$isEmpty
58
+ *
59
+ * @description
60
+ * This is called when we need to determine if the value of an input is empty.
61
+ *
62
+ * For instance, the required directive does this to work out if the input has data or not.
63
+ *
64
+ * The default `$isEmpty` function checks whether the value is `undefined`, `''`, `null` or `NaN`.
65
+ *
66
+ * You can override this for input directives whose concept of being empty is different from the
67
+ * default. The `checkboxInputType` directive does this because in its case a value of `false`
68
+ * implies empty.
69
+ *
70
+ * @param {*} value The value of the input to check for emptiness.
71
+ * @returns {boolean} True if `value` is "empty".
72
+ */
73
+ $isEmpty(value: any): boolean;
74
+ $$updateEmptyClasses(value: any): void;
75
+ /**
76
+ * @ngdoc method
77
+ * @name ngModel.NgModelController#$setPristine
78
+ *
79
+ * @description
80
+ * Sets the control to its pristine state.
81
+ *
82
+ * This method can be called to remove the `ng-dirty` class and set the control to its pristine
83
+ * state (`ng-pristine` class). A model is considered to be pristine when the control
84
+ * has not been changed from when first compiled.
85
+ */
86
+ $setPristine(): void;
87
+ /**
88
+ * @ngdoc method
89
+ * @name ngModel.NgModelController#$setDirty
90
+ *
91
+ * @description
92
+ * Sets the control to its dirty state.
93
+ *
94
+ * This method can be called to remove the `ng-pristine` class and set the control to its dirty
95
+ * state (`ng-dirty` class). A model is considered to be dirty when the control has been changed
96
+ * from when first compiled.
97
+ */
98
+ $setDirty(): void;
99
+ /**
100
+ * @ngdoc method
101
+ * @name ngModel.NgModelController#$setUntouched
102
+ *
103
+ * @description
104
+ * Sets the control to its untouched state.
105
+ *
106
+ * This method can be called to remove the `ng-touched` class and set the control to its
107
+ * untouched state (`ng-untouched` class). Upon compilation, a model is set as untouched
108
+ * by default, however this function can be used to restore that state if the model has
109
+ * already been touched by the user.
110
+ */
111
+ $setUntouched(): void;
112
+ /**
113
+ * @ngdoc method
114
+ * @name ngModel.NgModelController#$setTouched
115
+ *
116
+ * @description
117
+ * Sets the control to its touched state.
118
+ *
119
+ * This method can be called to remove the `ng-untouched` class and set the control to its
120
+ * touched state (`ng-touched` class). A model is considered to be touched when the user has
121
+ * first focused the control element and then shifted focus away from the control (blur event).
122
+ */
123
+ $setTouched(): void;
124
+ /**
145
125
  * @ngdoc method
146
126
  * @name ngModel.NgModelController#$rollbackViewValue
147
127
  *
@@ -230,120 +210,120 @@ export class NgModelController {
230
210
  </file>
231
211
  * </example>
232
212
  */
233
- $rollbackViewValue(): void;
234
- /**
235
- * @ngdoc method
236
- * @name ngModel.NgModelController#$validate
237
- *
238
- * @description
239
- * Runs each of the registered validators (first synchronous validators and then
240
- * asynchronous validators).
241
- * If the validity changes to invalid, the model will be set to `undefined`,
242
- * unless {@link ngModelOptions `ngModelOptions.allowInvalid`} is `true`.
243
- * If the validity changes to valid, it will set the model to the last available valid
244
- * `$modelValue`, i.e. either the last parsed value or the last value set from the scope.
245
- */
246
- $validate(): void;
247
- $$runValidators(modelValue: any, viewValue: any, doneCallback: any): void;
248
- /**
249
- * @ngdoc method
250
- * @name ngModel.NgModelController#$commitViewValue
251
- *
252
- * @description
253
- * Commit a pending update to the `$modelValue`.
254
- *
255
- * Updates may be pending by a debounced event or because the input is waiting for a some future
256
- * event defined in `ng-model-options`. this method is rarely needed as `NgModelController`
257
- * usually handles calling this in response to input events.
258
- */
259
- $commitViewValue(): void;
260
- $$lastCommittedViewValue: any;
261
- $$parseAndValidate(): void;
262
- $$writeModelToScope(): void;
263
- /**
264
- * @ngdoc method
265
- * @name ngModel.NgModelController#$setViewValue
266
- *
267
- * @description
268
- * Update the view value.
269
- *
270
- * This method should be called when a control wants to change the view value; typically,
271
- * this is done from within a DOM event handler. For example, the {@link ng.directive:input input}
272
- * directive calls it when the value of the input changes and {@link ng.directive:select select}
273
- * calls it when an option is selected.
274
- *
275
- * When `$setViewValue` is called, the new `value` will be staged for committing through the `$parsers`
276
- * and `$validators` pipelines. If there are no special {@link ngModelOptions} specified then the staged
277
- * value is sent directly for processing through the `$parsers` pipeline. After this, the `$validators` and
278
- * `$asyncValidators` are called and the value is applied to `$modelValue`.
279
- * Finally, the value is set to the **expression** specified in the `ng-model` attribute and
280
- * all the registered change listeners, in the `$viewChangeListeners` list are called.
281
- *
282
- * In case the {@link ng.directive:ngModelOptions ngModelOptions} directive is used with `updateOn`
283
- * and the `default` trigger is not listed, all those actions will remain pending until one of the
284
- * `updateOn` events is triggered on the DOM element.
285
- * All these actions will be debounced if the {@link ng.directive:ngModelOptions ngModelOptions}
286
- * directive is used with a custom debounce for this particular event.
287
- * Note that a `$digest` is only triggered once the `updateOn` events are fired, or if `debounce`
288
- * is specified, once the timer runs out.
289
- *
290
- * When used with standard inputs, the view value will always be a string (which is in some cases
291
- * parsed into another type, such as a `Date` object for `input[date]`.)
292
- * However, custom controls might also pass objects to this method. In this case, we should make
293
- * a copy of the object before passing it to `$setViewValue`. This is because `ngModel` does not
294
- * perform a deep watch of objects, it only looks for a change of identity. If you only change
295
- * the property of the object then ngModel will not realize that the object has changed and
296
- * will not invoke the `$parsers` and `$validators` pipelines. For this reason, you should
297
- * not change properties of the copy once it has been passed to `$setViewValue`.
298
- * Otherwise you may cause the model value on the scope to change incorrectly.
299
- *
300
- * <div class="alert alert-info">
301
- * In any case, the value passed to the method should always reflect the current value
302
- * of the control. For example, if you are calling `$setViewValue` for an input element,
303
- * you should pass the input DOM value. Otherwise, the control and the scope model become
304
- * out of sync. It's also important to note that `$setViewValue` does not call `$render` or change
305
- * the control's DOM value in any way. If we want to change the control's DOM value
306
- * programmatically, we should update the `ngModel` scope expression. Its new value will be
307
- * picked up by the model controller, which will run it through the `$formatters`, `$render` it
308
- * to update the DOM, and finally call `$validate` on it.
309
- * </div>
310
- *
311
- * @param {*} value value from the view.
312
- * @param {string} trigger Event that triggered the update.
313
- */
314
- $setViewValue(value: any, trigger: string): void;
315
- $$debounceViewValueCommit(trigger: any): void;
316
- /**
317
- * @ngdoc method
318
- *
319
- * @name ngModel.NgModelController#$overrideModelOptions
320
- *
321
- * @description
322
- *
323
- * Override the current model options settings programmatically.
324
- *
325
- * The previous `ModelOptions` value will not be modified. Instead, a
326
- * new `ModelOptions` object will inherit from the previous one overriding
327
- * or inheriting settings that are defined in the given parameter.
328
- *
329
- * See {@link ngModelOptions} for information about what options can be specified
330
- * and how model option inheritance works.
331
- *
332
- * <div class="alert alert-warning">
333
- * **Note:** this function only affects the options set on the `ngModelController`,
334
- * and not the options on the {@link ngModelOptions} directive from which they might have been
335
- * obtained initially.
336
- * </div>
337
- *
338
- * <div class="alert alert-danger">
339
- * **Note:** it is not possible to override the `getterSetter` option.
340
- * </div>
341
- *
342
- * @param {Object} options a hash of settings to override the previous options
343
- *
344
- */
345
- $overrideModelOptions(options: any): void;
346
- /**
213
+ $rollbackViewValue(): void;
214
+ /**
215
+ * @ngdoc method
216
+ * @name ngModel.NgModelController#$validate
217
+ *
218
+ * @description
219
+ * Runs each of the registered validators (first synchronous validators and then
220
+ * asynchronous validators).
221
+ * If the validity changes to invalid, the model will be set to `undefined`,
222
+ * unless {@link ngModelOptions `ngModelOptions.allowInvalid`} is `true`.
223
+ * If the validity changes to valid, it will set the model to the last available valid
224
+ * `$modelValue`, i.e. either the last parsed value or the last value set from the scope.
225
+ */
226
+ $validate(): void;
227
+ $$runValidators(modelValue: any, viewValue: any, doneCallback: any): void;
228
+ /**
229
+ * @ngdoc method
230
+ * @name ngModel.NgModelController#$commitViewValue
231
+ *
232
+ * @description
233
+ * Commit a pending update to the `$modelValue`.
234
+ *
235
+ * Updates may be pending by a debounced event or because the input is waiting for a some future
236
+ * event defined in `ng-model-options`. this method is rarely needed as `NgModelController`
237
+ * usually handles calling this in response to input events.
238
+ */
239
+ $commitViewValue(): void;
240
+ $$lastCommittedViewValue: any;
241
+ $$parseAndValidate(): void;
242
+ $$writeModelToScope(): void;
243
+ /**
244
+ * @ngdoc method
245
+ * @name ngModel.NgModelController#$setViewValue
246
+ *
247
+ * @description
248
+ * Update the view value.
249
+ *
250
+ * This method should be called when a control wants to change the view value; typically,
251
+ * this is done from within a DOM event handler. For example, the {@link ng.directive:input input}
252
+ * directive calls it when the value of the input changes and {@link ng.directive:select select}
253
+ * calls it when an option is selected.
254
+ *
255
+ * When `$setViewValue` is called, the new `value` will be staged for committing through the `$parsers`
256
+ * and `$validators` pipelines. If there are no special {@link ngModelOptions} specified then the staged
257
+ * value is sent directly for processing through the `$parsers` pipeline. After this, the `$validators` and
258
+ * `$asyncValidators` are called and the value is applied to `$modelValue`.
259
+ * Finally, the value is set to the **expression** specified in the `ng-model` attribute and
260
+ * all the registered change listeners, in the `$viewChangeListeners` list are called.
261
+ *
262
+ * In case the {@link ng.directive:ngModelOptions ngModelOptions} directive is used with `updateOn`
263
+ * and the `default` trigger is not listed, all those actions will remain pending until one of the
264
+ * `updateOn` events is triggered on the DOM element.
265
+ * All these actions will be debounced if the {@link ng.directive:ngModelOptions ngModelOptions}
266
+ * directive is used with a custom debounce for this particular event.
267
+ * Note that a `$digest` is only triggered once the `updateOn` events are fired, or if `debounce`
268
+ * is specified, once the timer runs out.
269
+ *
270
+ * When used with standard inputs, the view value will always be a string (which is in some cases
271
+ * parsed into another type, such as a `Date` object for `input[date]`.)
272
+ * However, custom controls might also pass objects to this method. In this case, we should make
273
+ * a copy of the object before passing it to `$setViewValue`. This is because `ngModel` does not
274
+ * perform a deep watch of objects, it only looks for a change of identity. If you only change
275
+ * the property of the object then ngModel will not realize that the object has changed and
276
+ * will not invoke the `$parsers` and `$validators` pipelines. For this reason, you should
277
+ * not change properties of the copy once it has been passed to `$setViewValue`.
278
+ * Otherwise you may cause the model value on the scope to change incorrectly.
279
+ *
280
+ * <div class="alert alert-info">
281
+ * In any case, the value passed to the method should always reflect the current value
282
+ * of the control. For example, if you are calling `$setViewValue` for an input element,
283
+ * you should pass the input DOM value. Otherwise, the control and the scope model become
284
+ * out of sync. It's also important to note that `$setViewValue` does not call `$render` or change
285
+ * the control's DOM value in any way. If we want to change the control's DOM value
286
+ * programmatically, we should update the `ngModel` scope expression. Its new value will be
287
+ * picked up by the model controller, which will run it through the `$formatters`, `$render` it
288
+ * to update the DOM, and finally call `$validate` on it.
289
+ * </div>
290
+ *
291
+ * @param {*} value value from the view.
292
+ * @param {string} trigger Event that triggered the update.
293
+ */
294
+ $setViewValue(value: any, trigger: string): void;
295
+ $$debounceViewValueCommit(trigger: any): void;
296
+ /**
297
+ * @ngdoc method
298
+ *
299
+ * @name ngModel.NgModelController#$overrideModelOptions
300
+ *
301
+ * @description
302
+ *
303
+ * Override the current model options settings programmatically.
304
+ *
305
+ * The previous `ModelOptions` value will not be modified. Instead, a
306
+ * new `ModelOptions` object will inherit from the previous one overriding
307
+ * or inheriting settings that are defined in the given parameter.
308
+ *
309
+ * See {@link ngModelOptions} for information about what options can be specified
310
+ * and how model option inheritance works.
311
+ *
312
+ * <div class="alert alert-warning">
313
+ * **Note:** this function only affects the options set on the `ngModelController`,
314
+ * and not the options on the {@link ngModelOptions} directive from which they might have been
315
+ * obtained initially.
316
+ * </div>
317
+ *
318
+ * <div class="alert alert-danger">
319
+ * **Note:** it is not possible to override the `getterSetter` option.
320
+ * </div>
321
+ *
322
+ * @param {Object} options a hash of settings to override the previous options
323
+ *
324
+ */
325
+ $overrideModelOptions(options: any): void;
326
+ /**
347
327
  * @ngdoc method
348
328
  *
349
329
  * @name ngModel.NgModelController#$processModelValue
@@ -454,19 +434,19 @@ export class NgModelController {
454
434
  * </example>
455
435
  *
456
436
  */
457
- $processModelValue(): void;
458
- /**
459
- * This method is called internally to run the $formatters on the $modelValue
460
- */
461
- $$format(): number;
462
- /**
463
- * This method is called internally when the bound scope value changes.
464
- */
465
- $$setModelValue(modelValue: any): void;
466
- $$setUpdateOnEvents(): void;
437
+ $processModelValue(): void;
438
+ /**
439
+ * This method is called internally to run the $formatters on the $modelValue
440
+ */
441
+ $$format(): number;
442
+ /**
443
+ * This method is called internally when the bound scope value changes.
444
+ */
445
+ $$setModelValue(modelValue: any): void;
446
+ $$setUpdateOnEvents(): void;
467
447
  }
468
448
  export namespace NgModelController {
469
- let $inject: string[];
449
+ let $inject: string[];
470
450
  }
471
451
  export const ngModelMinErr: (...args: any[]) => Error;
472
452
  /**
@@ -657,16 +637,13 @@ export const ngModelMinErr: (...args: any[]) => Error;
657
637
  </file>
658
638
  * </example>
659
639
  */
660
- export const ngModelDirective: (
661
- | string
662
- | (($rootScope: any) => {
663
- restrict: string;
664
- require: string[];
665
- controller: typeof NgModelController;
666
- priority: number;
667
- compile: (element: any) => {
640
+ export const ngModelDirective: (string | (($rootScope: any) => {
641
+ restrict: string;
642
+ require: string[];
643
+ controller: typeof NgModelController;
644
+ priority: number;
645
+ compile: (element: any) => {
668
646
  pre: (scope: any, element: any, attr: any, ctrls: any) => void;
669
647
  post: (scope: any, element: any, attr: any, ctrls: any) => void;
670
- };
671
- })
672
- )[];
648
+ };
649
+ }))[];
@@ -0,0 +1,9 @@
1
+ export const ngOptionsDirective: (string | (($compile: any, $document: any, $parse: any) => {
2
+ restrict: string;
3
+ terminal: boolean;
4
+ require: string[];
5
+ link: {
6
+ pre: (scope: any, selectElement: any, attr: any, ctrls: any) => void;
7
+ post: (scope: any, selectElement: any, attr: any, ctrls: any) => void;
8
+ };
9
+ }))[];
@@ -0,0 +1,5 @@
1
+ export const ngRefDirective: (string | (($parse: any) => {
2
+ priority: number;
3
+ restrict: string;
4
+ compile(tElement: any, tAttrs: any): (scope: any, element: any, attrs: any) => void;
5
+ }))[];
@@ -0,0 +1,8 @@
1
+ export const ngRepeatDirective: (string | (($parse: any, $animate: any) => {
2
+ restrict: string;
3
+ multiElement: boolean;
4
+ transclude: string;
5
+ priority: number;
6
+ terminal: boolean;
7
+ compile: ($element: any, $attr: any) => ($scope: any, $element: any, $attr: any, ctrl: any, $transclude: any) => void;
8
+ }))[];
@@ -13,11 +13,8 @@
13
13
  * @param {string} type Must be set to `'text/ng-template'`.
14
14
  * @param {string} id Cache name of the template.
15
15
  */
16
- export const scriptDirective: (
17
- | string
18
- | (($templateCache: any) => {
19
- restrict: string;
20
- terminal: boolean;
21
- compile(element: any, attr: any): void;
22
- })
23
- )[];
16
+ export const scriptDirective: (string | (($templateCache: any) => {
17
+ restrict: string;
18
+ terminal: boolean;
19
+ compile(element: any, attr: any): void;
20
+ }))[];
@@ -109,14 +109,11 @@
109
109
  * - Use `ng-class="{'ng-hide': expression}` instead of instead of {@link ngShow} / {@link ngHide}.
110
110
  * - Define an animation on the affected elements.
111
111
  */
112
- export const ngShowDirective: (
113
- | string
114
- | (($animate: any) => {
115
- restrict: string;
116
- multiElement: boolean;
117
- link(scope: any, element: any, attr: any): void;
118
- })
119
- )[];
112
+ export const ngShowDirective: (string | (($animate: any) => {
113
+ restrict: string;
114
+ multiElement: boolean;
115
+ link(scope: any, element: any, attr: any): void;
116
+ }))[];
120
117
  /**
121
118
  * @ngdoc directive
122
119
  * @name ngHide
@@ -224,11 +221,8 @@ export const ngShowDirective: (
224
221
  * - Use `ng-class="{'ng-hide': expression}` instead of instead of {@link ngShow} / {@link ngHide}.
225
222
  * - Define an animation on the affected elements.
226
223
  */
227
- export const ngHideDirective: (
228
- | string
229
- | (($animate: any) => {
230
- restrict: string;
231
- multiElement: boolean;
232
- link(scope: any, element: any, attr: any): void;
233
- })
234
- )[];
224
+ export const ngHideDirective: (string | (($animate: any) => {
225
+ restrict: string;
226
+ multiElement: boolean;
227
+ link(scope: any, element: any, attr: any): void;
228
+ }))[];