-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
613 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 72 additions & 2 deletions
74
src/app/widget-config/boolean-control-config/boolean-control-config.component.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,73 @@ | ||
.float-right { | ||
float: right; | ||
.ctrl-grid { | ||
display: grid; | ||
width: auto; | ||
height: auto; | ||
margin: 0px; | ||
grid-template-columns: [col-start] calc(100% - 90px) [col1-end] 80px [col2-end]; | ||
grid-template-areas: "controls actions"; | ||
row-gap: 0px; | ||
column-gap: 10px; | ||
justify-items: center; | ||
align-items: center; | ||
justify-content: center; | ||
align-content: center; | ||
margin-bottom: 10px; | ||
} | ||
|
||
.controls { | ||
grid-area: controls; | ||
width: 100%; | ||
} | ||
|
||
.actions { | ||
grid-area: actions; | ||
} | ||
|
||
.btn-grid { | ||
display: grid; | ||
width: 80px; | ||
height: 80px; | ||
margin: 0px; | ||
grid-template-columns: [col-start] 50% [col1-end] 50% [col2-end]; | ||
grid-template-rows: [row-start] 50% [row1-end] 50% [row2-end]; | ||
grid-template-areas: | ||
"up delete" | ||
"down delete"; | ||
row-gap: 0px; | ||
column-gap: 0px; | ||
justify-items: center; | ||
align-items: center; | ||
justify-content: center; | ||
align-content: center; | ||
} | ||
|
||
.up { | ||
grid-area: up; | ||
} | ||
|
||
.down { | ||
grid-area: down; | ||
} | ||
|
||
.delete { | ||
grid-area: delete; | ||
} | ||
|
||
.flex-label { | ||
flex-grow: 2; | ||
flex-shrink: 2; | ||
} | ||
|
||
.flex-settings { | ||
flex-grow: 1; | ||
flex-shrink: 1; | ||
} | ||
|
||
.settings { | ||
min-width: 100px; | ||
} | ||
|
||
.flex-actions { | ||
flex-grow: 0; | ||
flex-shrink: 0; | ||
} |
80 changes: 54 additions & 26 deletions
80
src/app/widget-config/boolean-control-config/boolean-control-config.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,58 @@ | ||
<div [formGroup]="ctrlFormGroup" class="flex-container rounded-card"> | ||
<div class="flex-field-50"> | ||
<mat-form-field class="fields" appearance="outline" floatLabel="always"> | ||
<mat-label>Label</mat-label> | ||
<input matInput | ||
type="string" | ||
placeholder="Enter a display label..." | ||
formControlName="ctrlLabel"> | ||
</mat-form-field> | ||
<div [formGroup]="ctrlFormGroup" class="ctrl-grid rounded-card"> | ||
<div class="controls flex-container"> | ||
<div class="flex-label"> | ||
<mat-form-field class="full-width" appearance="outline" floatLabel="always"> | ||
<mat-label>Label</mat-label> | ||
<input matInput | ||
type="string" | ||
placeholder="Enter a display label..." | ||
formControlName="ctrlLabel"> | ||
</mat-form-field> | ||
</div> | ||
<div class="flex-settings"> | ||
<mat-form-field class="settings" appearance="outline" floatLabel="always"> | ||
<mat-label>Type</mat-label> | ||
<mat-select | ||
placeholder="Select Type..." | ||
formControlName="type" | ||
name="type" | ||
required> | ||
<mat-option value=1>Toggle</mat-option> | ||
<mat-option value=2>Push</mat-option> | ||
<mat-option value=3>Indicator</mat-option> | ||
</mat-select> | ||
</mat-form-field> | ||
</div> | ||
<div class="flex-settings"> | ||
<mat-form-field class="settings" appearance="outline" floatLabel="always"> | ||
<mat-label>Color</mat-label> | ||
<mat-select | ||
placeholder="Select Color..." | ||
formControlName="color" | ||
name="color" | ||
required> | ||
<mat-option value='text'>Font</mat-option> | ||
<mat-option value='primary'>Primary</mat-option> | ||
<mat-option value='accent'>Accent</mat-option> | ||
<mat-option value='warn'>Warn</mat-option> | ||
</mat-select> | ||
</mat-form-field> | ||
</div> | ||
</div> | ||
<div class="flex-field-50"> | ||
<mat-form-field class="full-width" appearance="outline" floatLabel="always"> | ||
<mat-label>Color</mat-label> | ||
<mat-select | ||
placeholder="Select Color..." | ||
formControlName="color" | ||
name="color"> | ||
<mat-option value='text'>Font</mat-option> | ||
<mat-option value='primary'>Primary</mat-option> | ||
<mat-option value='accent'>Accent</mat-option> | ||
<mat-option value='warn'>Warn</mat-option> | ||
</mat-select> | ||
</mat-form-field> | ||
</div> | ||
|
||
<div class="flex-field-100"> | ||
<button class="float-right" type="button" mat-raised-button color="primary" (click)="deleteControl()">Delete</button> | ||
<div class="actions"> | ||
<div class="flex-actions"> | ||
<div class="btn-grid"> | ||
<button class="up" type="button" mat-icon-button color="primary" *ngIf="controlIndex !== 0" (click)="moveCtrlUp()" aria-label="Move control up in the list"> | ||
<i class="fa-solid fa-caret-up fa-2xl"></i> | ||
</button> | ||
<button class="down" type="button" mat-icon-button color="primary" *ngIf="controlIndex !== arrayLength - 1" (click)="moveCtrlDown()" aria-label="Move control down in the list"> | ||
<i class="fa-solid fa-caret-down fa-2xl"></i> | ||
</button> | ||
<button class="delete" type="button" mat-icon-button color="primary" (click)="deleteControl()" aria-label="Delete control"> | ||
<i class="fa-solid fa-trash-can fa-2xl"></i> | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...app/widget-config/boolean-multicontrol-options/boolean-multicontrol-options.component.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
.float-right { | ||
float: right; | ||
.add-btn { | ||
margin-left: calc(50% - 20px); | ||
} |
10 changes: 7 additions & 3 deletions
10
...pp/widget-config/boolean-multicontrol-options/boolean-multicontrol-options.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
<div [formGroup]="multiCtrlArray"> | ||
<button type="button" mat-raised-button color="primary" (click)="addCtrlGroup()">Add Control</button> | ||
<boolean-control-config class="full-width" | ||
*ngFor="let ctrl of multiCtrlArray.controls; index as i" | ||
<boolean-control-config class="full-width" *ngFor="let ctrl of multiCtrlArray.controls; index as i" | ||
[ctrlFormGroup]="ctrl" | ||
[controlIndex]="i" | ||
[arrayLength]="arrayLength" | ||
(moveUp)="moveUp($event)" | ||
(moveDown)="moveDown($event)" | ||
(deleteCtrl)="deletePath($event)"> | ||
</boolean-control-config> | ||
<button class="add-btn" type="button" mat-mini-fab color="primary" (click)="addCtrlGroup()" aria-label="Add control down in the list"> | ||
<i class="fa-solid fa-plus fa-2xl"></i> | ||
</button> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.