@@ -7,13 +7,7 @@ <h2>Vanilla</h2>
77 [allowCollapse] ="allowCollapse "
88 [persistValueOnFieldChange] ="persistValueOnFieldChange "
99>
10- < ng-container
11- *queryInput ="
12- let rule;
13- type: 'textarea';
14- let getDisabledState = getDisabledState
15- "
16- >
10+ < ng-container *queryInput ="let rule; type: 'textarea'; let getDisabledState = getDisabledState ">
1711 < textarea
1812 class ="text-input text-area "
1913 [(ngModel)] ="rule.value "
@@ -27,42 +21,26 @@ <h2>Vanilla</h2>
2721 < div class ="row ">
2822 < p class ="col-6 "> Control Valid (Vanilla): {{ queryCtrl.valid }}</ p >
2923 < div class ="col-6 ">
30- < label
31- > < input type ="checkbox " (change) ="switchModes($event) " /> Entity
32- Mode</ label
33- >
24+ < label > < input type ="checkbox " (change) ="switchModes($event) " /> Entity Mode</ label >
3425 </ div >
3526 </ div >
3627 < div class ="row ">
3728 < p class ="col-6 "> Control Touched (Vanilla): {{ queryCtrl.touched }}</ p >
3829 < div class ="col-6 ">
39- < label
40- > < input
41- type ="checkbox "
42- (change) ="changeDisabled($event) "
43- /> Disabled</ label
44- >
30+ < label > < input type ="checkbox " (change) ="changeDisabled($event) " /> Disabled</ label >
4531 </ div >
4632 </ div >
4733 < div class ="row ">
4834 < div class ="col-6 ">
49- < label
50- > < input type ="checkbox " [(ngModel)] ="allowRuleset " /> Allow
51- Ruleset</ label
52- >
35+ < label > < input type ="checkbox " [(ngModel)] ="allowRuleset " /> Allow Ruleset</ label >
5336 </ div >
5437 < div class ="col-6 ">
55- < label
56- > < input type ="checkbox " [(ngModel)] ="allowCollapse " /> Allow
57- Collapse</ label
58- >
38+ < label > < input type ="checkbox " [(ngModel)] ="allowCollapse " /> Allow Collapse</ label >
5939 </ div >
6040 < div class ="col-6 ">
6141 < label
62- > < input
63- type ="checkbox "
64- [(ngModel)] ="persistValueOnFieldChange "
65- /> Persist Values on Field Change</ label
42+ > < input type ="checkbox " [(ngModel)] ="persistValueOnFieldChange " /> Persist Values on Field
43+ Change</ label
6644 >
6745 </ div >
6846 </ div >
@@ -113,12 +91,7 @@ <h2>Custom Material</h2>
11391 < mat-icon ngClass ="mat-arrow-icon "> chevron_right</ mat-icon >
11492 </ ng-container >
11593 < ng-container *queryRemoveButton ="let rule; let removeRule = removeRule ">
116- < button
117- type ="button "
118- mat-icon-button
119- color ="accent "
120- (click) ="removeRule(rule) "
121- >
94+ < button type ="button " mat-icon-button color ="accent " (click) ="removeRule(rule) ">
12295 < mat-icon > remove</ mat-icon >
12396 </ button >
12497 </ ng-container >
@@ -128,17 +101,11 @@ <h2>Custom Material</h2>
128101 [(ngModel)] ="ruleset.condition "
129102 (ngModelChange) ="onChange($event) "
130103 >
131- < mat-radio-button [style.padding.px] ="10 " value ="and "
132- > And</ mat-radio-button
133- >
134- < mat-radio-button [style.padding.px] ="10 " value ="or "
135- > Or</ mat-radio-button
136- >
104+ < mat-radio-button [style.padding.px] ="10 " value ="and "> And</ mat-radio-button >
105+ < mat-radio-button [style.padding.px] ="10 " value ="or "> Or</ mat-radio-button >
137106 </ mat-radio-group >
138107 </ ng-container >
139- < ng-container
140- *queryEntity ="let rule; let entities = entities; let onChange = onChange "
141- >
108+ < ng-container *queryEntity ="let rule; let entities = entities; let onChange = onChange ">
142109 < mat-form-field [appearance] ="appearance " subscriptSizing ="dynamic ">
143110 < mat-select
144111 [(ngModel)] ="rule.entity "
@@ -165,27 +132,14 @@ <h2>Custom Material</h2>
165132 (ngModelChange) ="onChange($event, rule) "
166133 [hideSingleSelectionIndicator] ="true "
167134 >
168- < mat-option
169- *ngFor ="let field of getFields(rule.entity) "
170- [value] ="field.value "
171- >
135+ < mat-option *ngFor ="let field of getFields(rule.entity) " [value] ="field.value ">
172136 {{ field.name }}
173137 </ mat-option >
174138 </ mat-select >
175139 </ mat-form-field >
176140 </ ng-container >
177- < ng-container
178- *queryOperator ="
179- let rule;
180- let operators = operators;
181- let onChange = onChange
182- "
183- >
184- < mat-form-field
185- [style.width.px] ="150 "
186- [appearance] ="appearance "
187- subscriptSizing ="dynamic "
188- >
141+ < ng-container *queryOperator ="let rule; let operators = operators; let onChange = onChange ">
142+ < mat-form-field [style.width.px] ="150 " [appearance] ="appearance " subscriptSizing ="dynamic ">
189143 < mat-select
190144 [(ngModel)] ="rule.operator "
191145 (ngModelChange) ="onChange(rule) "
@@ -197,13 +151,8 @@ <h2>Custom Material</h2>
197151 </ mat-select >
198152 </ mat-form-field >
199153 </ ng-container >
200- < ng-container
201- *queryInput ="let rule; type: 'boolean'; let onChange = onChange "
202- >
203- < mat-checkbox
204- [(ngModel)] ="rule.value "
205- (ngModelChange) ="onChange() "
206- > </ mat-checkbox >
154+ < ng-container *queryInput ="let rule; type: 'boolean'; let onChange = onChange ">
155+ < mat-checkbox [(ngModel)] ="rule.value " (ngModelChange) ="onChange() "> </ mat-checkbox >
207156 </ ng-container >
208157 < ng-container
209158 *queryInput ="
@@ -239,18 +188,9 @@ <h2>Custom Material</h2>
239188 </ mat-form-field >
240189 </ ng-container >
241190 < ng-container
242- *queryInput ="
243- let rule;
244- let options = options;
245- type: 'multiselect';
246- let onChange = onChange
247- "
191+ *queryInput ="let rule; let options = options; type: 'multiselect'; let onChange = onChange "
248192 >
249- < mat-form-field
250- [style.width.px] ="300 "
251- [appearance] ="appearance "
252- subscriptSizing ="dynamic "
253- >
193+ < mat-form-field [style.width.px] ="300 " [appearance] ="appearance " subscriptSizing ="dynamic ">
254194 < mat-select
255195 [(ngModel)] ="rule.value "
256196 multiple
@@ -264,53 +204,24 @@ <h2>Custom Material</h2>
264204 </ mat-form-field >
265205 </ ng-container >
266206 < ng-container
267- *queryInput ="
268- let rule;
269- let field = field;
270- type: 'number';
271- let onChange = onChange
272- "
207+ *queryInput ="let rule; let field = field; type: 'number'; let onChange = onChange "
273208 >
274- < mat-form-field
275- [style.width.px] ="100 "
276- [appearance] ="appearance "
277- subscriptSizing ="dynamic "
278- >
279- < input
280- matInput
281- [(ngModel)] ="rule.value "
282- type ="number "
283- (ngModelChange) ="onChange() "
284- />
209+ < mat-form-field [style.width.px] ="100 " [appearance] ="appearance " subscriptSizing ="dynamic ">
210+ < input matInput [(ngModel)] ="rule.value " type ="number " (ngModelChange) ="onChange() " />
285211 </ mat-form-field >
286212 </ ng-container >
287213 < ng-container
288- *queryInput ="
289- let rule;
290- let field = field;
291- type: 'string';
292- let onChange = onChange
293- "
214+ *queryInput ="let rule; let field = field; type: 'string'; let onChange = onChange "
294215 >
295216 < mat-form-field [appearance] ="appearance " subscriptSizing ="dynamic ">
296217 < input matInput [(ngModel)] ="rule.value " (ngModelChange) ="onChange() " />
297218 </ mat-form-field >
298219 </ ng-container >
299220 < ng-container
300- *queryInput ="
301- let rule;
302- let field = field;
303- type: 'textarea';
304- let onChange = onChange
305- "
221+ *queryInput ="let rule; let field = field; type: 'textarea'; let onChange = onChange "
306222 >
307223 < mat-form-field [appearance] ="appearance " subscriptSizing ="dynamic ">
308- < textarea
309- matInput
310- [(ngModel)] ="rule.value "
311- (ngModelChange) ="onChange() "
312- >
313- </ textarea >
224+ < textarea matInput [(ngModel)] ="rule.value " (ngModelChange) ="onChange() "> </ textarea >
314225 </ mat-form-field >
315226 </ ng-container >
316227 </ query-builder >
0 commit comments