This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Config-editor-ui: Adding in middle of tab-array + fix overflow bug in…
… textarea + small … (#250) * Adding in middle of tab-array + fix overflow bug in textarea + small lint config change
- Loading branch information
Celie Valentiny
authored and
GitHub Enterprise
committed
Apr 23, 2021
1 parent
254c740
commit 695d9f3
Showing
17 changed files
with
475 additions
and
419 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
"env": { | ||
"jasmine": true | ||
}, | ||
"ignorePatterns": ["src/testing/*"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts"], | ||
|
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
66 changes: 37 additions & 29 deletions
66
config-editor/config-editor-ui/src/app/ngx-formly/admin-tabs.type.component.ts
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,29 +1,37 @@ | ||
import { Component } from '@angular/core'; | ||
import { FieldType } from '@ngx-formly/core'; | ||
|
||
@Component({ | ||
// tslint:disable-next-line:component-selector | ||
selector: 'formly-admintab-type', | ||
template: ` | ||
<mat-tab-group class="admin-tabs" animationDuration="0ms"> | ||
<mat-tab [label]="'General Properties'"> | ||
<ng-container *ngFor="let f of field.fieldGroup"> | ||
<formly-field *ngIf="!tabTypes.includes(f.type) || f.templateOptions.genericSettingTab" [field]="f"></formly-field> | ||
</ng-container> | ||
</mat-tab> | ||
<ng-container *ngFor="let tab of field.fieldGroup"> | ||
<mat-tab *ngIf="tabTypes.includes(tab.type) && !tab.templateOptions.genericSettingTab" [label]="tab?.templateOptions?.label"> | ||
<formly-field [field]="tab"></formly-field> | ||
</mat-tab> | ||
</ng-container> | ||
</mat-tab-group> | ||
`, | ||
styles: [` | ||
::ng-deep .admin-tabs .mat-tab-body-wrapper { | ||
top: 8px !important; | ||
} | ||
`] | ||
}) | ||
export class AdminTabTypeComponent extends FieldType { | ||
tabTypes = ['array', 'object', 'rawobject']; | ||
} | ||
import { Component } from '@angular/core'; | ||
import { FieldType } from '@ngx-formly/core'; | ||
|
||
@Component({ | ||
// tslint:disable-next-line:component-selector | ||
selector: 'formly-admintab-type', | ||
template: ` | ||
<mat-tab-group class="admin-tabs" animationDuration="0ms"> | ||
<mat-tab [label]="'General Properties'"> | ||
<ng-container *ngFor="let f of field.fieldGroup"> | ||
<formly-field | ||
*ngIf="!tabTypes.includes(f.type) || f.templateOptions.genericSettingTab" | ||
[field]="f" | ||
></formly-field> | ||
</ng-container> | ||
</mat-tab> | ||
<ng-container *ngFor="let tab of field.fieldGroup"> | ||
<mat-tab | ||
*ngIf="tabTypes.includes(tab.type) && !tab.templateOptions.genericSettingTab" | ||
[label]="tab?.templateOptions?.label" | ||
> | ||
<formly-field [field]="tab"></formly-field> | ||
</mat-tab> | ||
</ng-container> | ||
</mat-tab-group> | ||
`, | ||
styles: [ | ||
` | ||
::ng-deep .admin-tabs .mat-tab-body-wrapper { | ||
top: 8px !important; | ||
} | ||
`, | ||
], | ||
}) | ||
export class AdminTabTypeComponent extends FieldType { | ||
tabTypes = ['array', 'object', 'rawobject']; | ||
} |
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.