Skip to content

Commit 34dc844

Browse files
authored
Add fieldset to the preview
1 parent f656907 commit 34dc844

File tree

7 files changed

+47
-1
lines changed

7 files changed

+47
-1
lines changed

src/app/left-menu/left-menu.aliases.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,11 @@ export class LeftMenuAlias {
194194
equivalents: 'dxScrollView, dx-scroll-view',
195195
regs: [/scrollable-/i],
196196
route: 'scrollview'
197+
}, {
198+
name: 'FieldSet',
199+
equivalents: 'field set',
200+
regs: [/fieldset-/i],
201+
route: 'fieldset'
197202
}
198203
];
199204

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
:host .dx-fieldset {
2+
margin-left: 0;
3+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<div class="dx-fieldset">
2+
<div class="dx-fieldset-header">Personal Data</div>
3+
<div class="dx-field">
4+
<div class="dx-field-label">First Name</div>
5+
<div class="dx-field-value">
6+
<dx-text-box value="John"></dx-text-box>
7+
</div>
8+
</div>
9+
<div class="dx-field">
10+
<div class="dx-field-label">Last Name</div>
11+
<div class="dx-field-value">
12+
<dx-text-box value="Heart"></dx-text-box>
13+
</div>
14+
</div>
15+
</div>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { Component } from '@angular/core';
2+
import { Subject } from 'rxjs';
3+
4+
@Component({
5+
selector: 'app-fieldset',
6+
templateUrl: './fieldset.component.html',
7+
styleUrls: ['./fieldset.component.css']
8+
})
9+
export class FieldSetComponent {
10+
widgetGroup = 'fieldset';
11+
isExpanded = new Subject<boolean>();
12+
}

src/app/preview/preview.module.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { DatagridComponent } from './datatgrid/datatgrid.component';
99
import { DrawerComponent } from './drawer/drawer.component';
1010
import { EditorsComponent } from './editors/editors.component';
1111
import { FilterbuilderComponent } from './filterbuilder/filterbuilder.component';
12+
import { FieldSetComponent } from './fieldset/fieldset.component';
1213
import { FormComponent } from './form/form.component';
1314
import { GalleryComponent } from './gallery/gallery.component';
1415
import { ListComponent } from './list/list.component';
@@ -40,6 +41,7 @@ import { ButtonDetailedComponent } from './button-detailed/button-detailed.compo
4041
ButtonsComponent,
4142
EditorsComponent,
4243
FilterbuilderComponent,
44+
FieldSetComponent,
4345
FormComponent,
4446
GalleryComponent,
4547
ListComponent,
@@ -66,6 +68,7 @@ import { ButtonDetailedComponent } from './button-detailed/button-detailed.compo
6668
ButtonsComponent,
6769
EditorsComponent,
6870
FilterbuilderComponent,
71+
FieldSetComponent,
6972
FormComponent,
7073
GalleryComponent,
7174
ListComponent,

src/app/preview/preview/preview.component.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,13 @@
158158
<app-drawer #widget></app-drawer>
159159
</div>
160160
</div>
161+
<div class="flex-item">
162+
<app-button-detailed widget="fieldset" [currentWidget]="widgetName" (clicked)="buttonDetailedClick($event)"></app-button-detailed>
163+
<div class="flex-label">FIELDSET</div>
164+
<div class="flex-value">
165+
<app-fieldset #widget></app-fieldset>
166+
</div>
167+
</div>
161168
<div class="flex-item empty"></div>
162169
</div>
163170
</dx-scroll-view>

src/app/preview/preview/preview.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ export class PreviewComponent implements AfterViewInit, OnChanges {
2323
'progressbars',
2424
'sliders',
2525
'scrollview',
26-
'filterbuilder'
26+
'filterbuilder',
27+
'fieldset'
2728
];
2829

2930
isWidgetClosed = true;

0 commit comments

Comments
 (0)