@@ -8,10 +8,8 @@ export 'directive_wrapper.dart';
8
8
import 'dart:async';
9
9
import 'dart:html';
10
10
import 'package:angular/angular.dart';
11
- import 'package:angular_forms/angular_forms.dart';
12
11
import 'package:angular/src/di/reflector.dart' as _ngRef;
13
12
import 'package:angular/angular.template.dart' as _ref0;
14
- import 'package:angular_forms/angular_forms.template.dart' as _ref1;
15
13
import 'package:angular/src/debug/debug_context.dart';
16
14
import 'directive_wrapper.dart' as import1;
17
15
import 'package:angular/src/debug/debug_app_view.dart';
@@ -23,14 +21,7 @@ import 'package:angular/src/core/change_detection/change_detection.dart';
23
21
import 'package:angular/src/core/linker/app_view_utils.dart' as import8;
24
22
import 'package:angular/angular.dart';
25
23
import 'package:angular/src/core/linker/element_ref.dart';
26
- import 'package:angular_forms/src/directives/ng_form_model.dart' as import11;
27
- import 'package:angular_forms/src/directives/control_container.dart' as import12;
28
- import 'package:angular_forms/src/directives/default_value_accessor.dart' as import13;
29
- import 'package:angular/src/core/di/opaque_token.dart' as import14;
30
- import 'package:angular_forms/src/directives/control_value_accessor.dart' as import15;
31
- import 'package:angular_forms/src/directives/ng_control_name.dart' as import16;
32
- import 'package:angular_forms/src/directives/ng_control.dart' as import17;
33
- import 'package:angular/src/core/change_detection/directive_change_detector.dart' as import18;
24
+ import 'package:angular/src/core/change_detection/directive_change_detector.dart' as import11;
34
25
35
26
const List<dynamic> styles$TestFooComponent = const ['div._ngcontent-%COMP% { font-size:10px; }'];
36
27
List<StaticNodeDebugInfo> nodeDebugInfos_TestFooComponent0 = [
@@ -53,7 +44,7 @@ class ViewTestFooComponent0 extends DebugAppView<import1.TestFooComponent> {
53
44
ComponentRef<import1.TestFooComponent> build() {
54
45
final import3.HtmlElement parentRenderNode = initViewRoot(rootEl);
55
46
var doc = import3.document;
56
- _el_0 = createDivAndAppendDbg(this, doc, parentRenderNode, 0, 0, 0 );
47
+ _el_0 = createDivAndAppendDbg(this, doc, parentRenderNode, 0, 0, 4 );
57
48
createAttr(_el_0, 'directive-with-output', '');
58
49
createAttr(_el_0, 'role', 'button');
59
50
createAttr(_el_0, 'some-child-directive', '');
@@ -62,7 +53,7 @@ class ViewTestFooComponent0 extends DebugAppView<import1.TestFooComponent> {
62
53
_DirectiveWithOutput_0_5 = new import1.DirectiveWithOutput();
63
54
import3.Text _text_1 = new import3.Text('Foo');
64
55
_el_0.append(_text_1);
65
- dbgElm(this, _text_1, 1, 0, 87 );
56
+ dbgElm(this, _text_1, 1, 0, 91 );
66
57
_el_0.addEventListener('click', eventHandler1(_ChildDirective_0_4.instance.handleClick));
67
58
_el_0.addEventListener('keypress', eventHandler1(_ChildDirective_0_4.instance.handleKeyPress));
68
59
final subscription_0 = _ChildDirective_0_4.instance.trigger.listen(eventHandler1(_handle_trigger_0_0));
@@ -71,21 +62,10 @@ class ViewTestFooComponent0 extends DebugAppView<import1.TestFooComponent> {
71
62
return null;
72
63
}
73
64
74
- @override
75
- dynamic injectorGetInternal(dynamic token, int nodeIndex, dynamic notFoundResult) {
76
- if ((identical(token, import1.ChildDirective) && ((0 <= nodeIndex) && (nodeIndex <= 1)))) {
77
- return _ChildDirective_0_4.instance;
78
- }
79
- if ((identical(token, import1.DirectiveWithOutput) && ((0 <= nodeIndex) && (nodeIndex <= 1)))) {
80
- return _DirectiveWithOutput_0_5;
81
- }
82
- return notFoundResult;
83
- }
84
-
85
65
@override
86
66
void detectChangesInternal() {
87
67
final import1.TestFooComponent _ctx = ctx;
88
- dbg(0, 0, 48 );
68
+ dbg(0, 0, 52 );
89
69
final currVal_0 = _ctx.rowIndex;
90
70
if (import8.checkBinding(_expr_0, currVal_0)) {
91
71
_ChildDirective_0_4.instance.gridRow = currVal_0;
@@ -95,7 +75,7 @@ class ViewTestFooComponent0 extends DebugAppView<import1.TestFooComponent> {
95
75
}
96
76
97
77
void _handle_trigger_0_0($event) {
98
- dbg(0, 0, 65 );
78
+ dbg(0, 0, 69 );
99
79
ctx.onTrigger;
100
80
}
101
81
}
@@ -124,14 +104,6 @@ class _ViewTestFooComponentHost0 extends DebugAppView<dynamic> {
124
104
return new ComponentRef<import1.TestFooComponent>(0, this, rootEl, _TestFooComponent_0_4);
125
105
}
126
106
127
- @override
128
- dynamic injectorGetInternal(dynamic token, int nodeIndex, dynamic notFoundResult) {
129
- if ((identical(token, import1.TestFooComponent) && (0 == nodeIndex))) {
130
- return _TestFooComponent_0_4;
131
- }
132
- return notFoundResult;
133
- }
134
-
135
107
@override
136
108
void detectChangesInternal() {
137
109
_compView_0.detectChanges();
@@ -148,153 +120,6 @@ AppView viewFactory_TestFooComponentHost0(AppView<dynamic> parentView, num paren
148
120
}
149
121
150
122
const ComponentFactory<import1.TestFooComponent> TestFooComponentNgFactory = const ComponentFactory<import1.TestFooComponent>('test-foo', viewFactory_TestFooComponentHost0, _TestFooComponentMetadata);
151
- const List<dynamic> styles$InputFormTest = const [];
152
- List<StaticNodeDebugInfo> nodeDebugInfos_InputFormTest0 = [
153
- new StaticNodeDebugInfo([import11.NgFormModel, import12.ControlContainer], null, <String, dynamic>{}),
154
- new StaticNodeDebugInfo([import13.DefaultValueAccessor, const import14.MultiToken<import15.ControlValueAccessor<dynamic>>('NgValueAccessor'), import16.NgControlName, import17.NgControl], null, <String, dynamic>{})
155
- ];
156
-
157
- class ViewInputFormTest0 extends DebugAppView<import1.InputFormTest> {
158
- import3.DivElement _el_0;
159
- import11.NgFormModel _NgFormModel_0_4;
160
- dynamic _ControlContainer_0_5;
161
- import3.InputElement _el_1;
162
- import13.DefaultValueAccessor _DefaultValueAccessor_1_4;
163
- List<import15.ControlValueAccessor> _NgValueAccessor_1_5;
164
- import16.NgControlName _NgControlName_1_6;
165
- var _expr_0;
166
- static RenderComponentType _renderType;
167
- ViewInputFormTest0(AppView<dynamic> parentView, num parentIndex) : super(import6.ViewType.COMPONENT, {}, parentView, parentIndex, ChangeDetectionStrategy.CheckAlways, nodeDebugInfos_InputFormTest0) {
168
- rootEl = import3.document.createElement('input-form-test');
169
- _renderType ??= import8.appViewUtils.createRenderType('asset:_goldens/test/_files/directives/directive_wrapper.dart class InputFormTest - inline template', ViewEncapsulation.None, styles$InputFormTest);
170
- setupComponentType(_renderType);
171
- }
172
- @override
173
- ComponentRef<import1.InputFormTest> build() {
174
- final import3.HtmlElement parentRenderNode = initViewRoot(rootEl);
175
- var doc = import3.document;
176
- _el_0 = createDivAndAppendDbg(this, doc, parentRenderNode, 0, 0, 0);
177
- _NgFormModel_0_4 = new import11.NgFormModel(null);
178
- _ControlContainer_0_5 = _NgFormModel_0_4;
179
- _el_1 = createAndAppendDbg(this, doc, 'input', _el_0, 1, 1, 2);
180
- createAttr(_el_1, 'ngControl', 'login');
181
- createAttr(_el_1, 'type', 'text');
182
- _DefaultValueAccessor_1_4 = new import13.DefaultValueAccessor(_el_1);
183
- _NgValueAccessor_1_5 = [_DefaultValueAccessor_1_4];
184
- _NgControlName_1_6 = new import16.NgControlName(_ControlContainer_0_5, null, _NgValueAccessor_1_5);
185
- import8.appViewUtils.eventManager.addEventListener(_el_0, 'submit', eventHandler1(_NgFormModel_0_4.onSubmit));
186
- _el_1.addEventListener('input', eventHandler1(_handle_input_1_0));
187
- _el_1.addEventListener('blur', eventHandler0(_DefaultValueAccessor_1_4.touchHandler));
188
- init(const [], null, [_el_0, _el_1]);
189
- return null;
190
- }
191
-
192
- @override
193
- dynamic injectorGetInternal(dynamic token, int nodeIndex, dynamic notFoundResult) {
194
- if ((identical(token, import13.DefaultValueAccessor) && (1 == nodeIndex))) {
195
- return _DefaultValueAccessor_1_4;
196
- }
197
- if ((identical(token, const import14.MultiToken<import15.ControlValueAccessor<dynamic>>('NgValueAccessor')) && (1 == nodeIndex))) {
198
- return _NgValueAccessor_1_5;
199
- }
200
- if (((identical(token, import16.NgControlName) || identical(token, import17.NgControl)) && (1 == nodeIndex))) {
201
- return _NgControlName_1_6;
202
- }
203
- if ((identical(token, import11.NgFormModel) && ((0 <= nodeIndex) && (nodeIndex <= 1)))) {
204
- return _NgFormModel_0_4;
205
- }
206
- if ((identical(token, import12.ControlContainer) && ((0 <= nodeIndex) && (nodeIndex <= 1)))) {
207
- return _ControlContainer_0_5;
208
- }
209
- return notFoundResult;
210
- }
211
-
212
- @override
213
- void detectChangesInternal() {
214
- final import1.InputFormTest _ctx = ctx;
215
- bool changed = false;
216
- bool firstCheck = (this.cdState == 0);
217
- changed = false;
218
- dbg(0, 0, 5);
219
- final currVal_0 = _ctx.form;
220
- if (import8.checkBinding(_expr_0, currVal_0)) {
221
- _NgFormModel_0_4.form = currVal_0;
222
- changed = true;
223
- _expr_0 = currVal_0;
224
- }
225
- if (changed) {
226
- _NgFormModel_0_4.ngAfterChanges();
227
- }
228
- changed = false;
229
- if (firstCheck) {
230
- _NgControlName_1_6.name = 'login';
231
- changed = true;
232
- }
233
- if (changed) {
234
- _NgControlName_1_6.ngAfterChanges();
235
- }
236
- }
237
-
238
- @override
239
- void destroyInternal() {
240
- dbg(1, 1, 2);
241
- _NgControlName_1_6.ngOnDestroy();
242
- }
243
-
244
- void _handle_input_1_0($event) {
245
- dbg(1, 1, 2);
246
- _DefaultValueAccessor_1_4.onChange($event.target.value);
247
- }
248
- }
249
-
250
- AppView<import1.InputFormTest> viewFactory_InputFormTest0(AppView<dynamic> parentView, num parentIndex) {
251
- return new ViewInputFormTest0(parentView, parentIndex);
252
- }
253
-
254
- const List<dynamic> styles$InputFormTestHost = const [];
255
- List<StaticNodeDebugInfo> nodeDebugInfos_InputFormTestHost0 = [
256
- new StaticNodeDebugInfo([import1.InputFormTest], import1.InputFormTest, <String, dynamic>{})
257
- ];
258
-
259
- class _ViewInputFormTestHost0 extends DebugAppView<dynamic> {
260
- ViewInputFormTest0 _compView_0;
261
- import1.InputFormTest _InputFormTest_0_4;
262
- _ViewInputFormTestHost0(AppView<dynamic> parentView, num parentIndex) : super(import6.ViewType.HOST, {}, parentView, parentIndex, ChangeDetectionStrategy.CheckAlways, nodeDebugInfos_InputFormTestHost0);
263
- @override
264
- ComponentRef build() {
265
- _compView_0 = new ViewInputFormTest0(this, 0);
266
- rootEl = _compView_0.rootEl;
267
- dbgIdx(rootEl, 0);
268
- _InputFormTest_0_4 = new import1.InputFormTest();
269
- _compView_0.create(_InputFormTest_0_4, projectableNodes);
270
- init0Dbg(rootEl, [rootEl]);
271
- return new ComponentRef<import1.InputFormTest>(0, this, rootEl, _InputFormTest_0_4);
272
- }
273
-
274
- @override
275
- dynamic injectorGetInternal(dynamic token, int nodeIndex, dynamic notFoundResult) {
276
- if ((identical(token, import1.InputFormTest) && (0 == nodeIndex))) {
277
- return _InputFormTest_0_4;
278
- }
279
- return notFoundResult;
280
- }
281
-
282
- @override
283
- void detectChangesInternal() {
284
- _compView_0.detectChanges();
285
- }
286
-
287
- @override
288
- void destroyInternal() {
289
- _compView_0?.destroy();
290
- }
291
- }
292
-
293
- AppView viewFactory_InputFormTestHost0(AppView<dynamic> parentView, num parentIndex) {
294
- return new _ViewInputFormTestHost0(parentView, parentIndex);
295
- }
296
-
297
- const ComponentFactory<import1.InputFormTest> InputFormTestNgFactory = const ComponentFactory<import1.InputFormTest>('input-form-test', viewFactory_InputFormTestHost0, _InputFormTestMetadata);
298
123
const List<dynamic> styles$DirectiveContainerTest = const [];
299
124
List<StaticNodeDebugInfo> nodeDebugInfos_DirectiveContainerTest0 = [
300
125
new StaticNodeDebugInfo([import1.FastDirective], null, <String, dynamic>{}),
@@ -316,11 +141,11 @@ class ViewDirectiveContainerTest0 extends DebugAppView<import1.DirectiveContaine
316
141
ComponentRef<import1.DirectiveContainerTest> build() {
317
142
final import3.HtmlElement parentRenderNode = initViewRoot(rootEl);
318
143
var doc = import3.document;
319
- _el_0 = createDivAndAppendDbg(this, doc, parentRenderNode, 0, 0, 0 );
144
+ _el_0 = createDivAndAppendDbg(this, doc, parentRenderNode, 0, 0, 4 );
320
145
_el_0.className = 'target1';
321
146
createAttr(_el_0, 'fastDirective', '');
322
147
_FastDirective_0_4 = new FastDirectiveNgCd(new import1.FastDirective(_el_0), this, _el_0);
323
- _el_1 = createDivAndAppendDbg(this, doc, parentRenderNode, 1, 0, 60 );
148
+ _el_1 = createDivAndAppendDbg(this, doc, parentRenderNode, 1, 1, 4 );
324
149
_el_1.className = 'target2';
325
150
createAttr(_el_1, 'fastDirective', '');
326
151
_FastDirective_1_4 = new FastDirectiveNgCd(new import1.FastDirective(_el_1), this, _el_1);
@@ -335,7 +160,7 @@ class ViewDirectiveContainerTest0 extends DebugAppView<import1.DirectiveContaine
335
160
if (firstCheck) {
336
161
(_FastDirective_0_4.instance.name = _ctx.finalName);
337
162
}
338
- dbg(1, 0, 95 );
163
+ dbg(1, 1, 39 );
339
164
_FastDirective_1_4.instance.name = _ctx.nonFinal;
340
165
}
341
166
}
@@ -381,7 +206,7 @@ AppView viewFactory_DirectiveContainerTestHost0(AppView<dynamic> parentView, num
381
206
382
207
const ComponentFactory<import1.DirectiveContainerTest> DirectiveContainerTestNgFactory = const ComponentFactory<import1.DirectiveContainerTest>('directive-container', viewFactory_DirectiveContainerTestHost0, _DirectiveContainerTestMetadata);
383
208
384
- class ChildDirectiveNgCd extends import18 .DirectiveChangeDetector {
209
+ class ChildDirectiveNgCd extends import11 .DirectiveChangeDetector {
385
210
final import1.ChildDirective instance;
386
211
var _expr_0;
387
212
var _expr_1;
@@ -406,7 +231,7 @@ class ChildDirectiveNgCd extends import18.DirectiveChangeDetector {
406
231
}
407
232
}
408
233
409
- class FastDirectiveNgCd extends import18 .DirectiveChangeDetector {
234
+ class FastDirectiveNgCd extends import11 .DirectiveChangeDetector {
410
235
final import1.FastDirective instance;
411
236
var _expr_0;
412
237
FastDirectiveNgCd(this.instance, AppView v, import3.Element e) {
@@ -425,7 +250,6 @@ class FastDirectiveNgCd extends import18.DirectiveChangeDetector {
425
250
}
426
251
427
252
const _TestFooComponentMetadata = const [];
428
- const _InputFormTestMetadata = const [];
429
253
const _DirectiveContainerTestMetadata = const [];
430
254
var _visited = false;
431
255
void initReflector() {
@@ -436,8 +260,6 @@ void initReflector() {
436
260
437
261
_ngRef.registerComponent(TestFooComponent, TestFooComponentNgFactory);
438
262
_ngRef.registerFactory(MyInjectableClass, () => new MyInjectableClass());
439
- _ngRef.registerComponent(InputFormTest, InputFormTestNgFactory);
440
263
_ngRef.registerComponent(DirectiveContainerTest, DirectiveContainerTestNgFactory);
441
264
_ref0.initReflector();
442
- _ref1.initReflector();
443
265
}
0 commit comments