@falcon-ng/tailwind 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/falcon-ng-tailwind.mjs +5 -0
- package/esm2020/lib/base-control.mjs +50 -0
- package/esm2020/lib/base-form-component.mjs +234 -0
- package/esm2020/lib/component/auto-complete/auto-complete.component.mjs +33 -0
- package/esm2020/lib/component/bottom-sheet/bottom-sheet.component.mjs +29 -0
- package/esm2020/lib/component/button/button.component.mjs +27 -0
- package/esm2020/lib/component/button-toggle/button-toggle.component.mjs +32 -0
- package/esm2020/lib/component/checkbox/checkbox.component.mjs +18 -0
- package/esm2020/lib/component/chips/chip.component.mjs +109 -0
- package/esm2020/lib/component/date-picker/date-picker.component.mjs +17 -0
- package/esm2020/lib/component/dialog/dialog.component.mjs +21 -0
- package/esm2020/lib/component/pagination/pagination.component.mjs +95 -0
- package/esm2020/lib/component/progress-bar/progress-bar.component.mjs +20 -0
- package/esm2020/lib/component/progress-spinner/progress-spinner.component.mjs +26 -0
- package/esm2020/lib/component/radio/radio.component.mjs +31 -0
- package/esm2020/lib/component/rich-text-editor/rich-text-editor.component.mjs +15 -0
- package/esm2020/lib/component/select/select.component.mjs +35 -0
- package/esm2020/lib/component/slide-toggle/slide-toggle.component.mjs +14 -0
- package/esm2020/lib/component/slider/slider.component.mjs +15 -0
- package/esm2020/lib/component/snack-bar/snack-bar.component.mjs +11 -0
- package/esm2020/lib/component/table/table.component.mjs +74 -0
- package/esm2020/lib/component/textarea/textarea.component.mjs +16 -0
- package/esm2020/lib/component/textbox/textbox.component.mjs +17 -0
- package/esm2020/lib/control-builder/control-builder.component.mjs +18 -0
- package/esm2020/lib/control-type/select.mjs +8 -0
- package/esm2020/lib/control-type/textarea.mjs +8 -0
- package/esm2020/lib/control-type/textbox.mjs +8 -0
- package/esm2020/lib/falcon-core.module.mjs +232 -0
- package/esm2020/lib/model/constant.mjs +32 -0
- package/esm2020/lib/model/enum.mjs +2 -0
- package/esm2020/lib/model/environments.mjs +3 -0
- package/esm2020/lib/model/interface.mjs +2 -0
- package/esm2020/lib/model/ivalidator.mjs +2 -0
- package/esm2020/lib/module/angularmaterial.module.mjs +189 -0
- package/esm2020/lib/reactive-field.directive.mjs +28 -0
- package/esm2020/lib/service/appsetting.service.mjs +55 -0
- package/esm2020/lib/service/http/generic-http-client.mjs +197 -0
- package/esm2020/lib/service/http/igeneric-http-client.mjs +10 -0
- package/esm2020/lib/service/logger.service.mjs +78 -0
- package/esm2020/lib/service/open-id/TokenHelperService.mjs +71 -0
- package/esm2020/lib/service/open-id/auth-guard.service.mjs +30 -0
- package/esm2020/lib/service/open-id/auth.service.mjs +154 -0
- package/esm2020/public-api.mjs +50 -0
- package/fesm2015/falcon-ng-tailwind.mjs +1906 -0
- package/fesm2015/falcon-ng-tailwind.mjs.map +1 -0
- package/fesm2020/falcon-ng-tailwind.mjs +1880 -0
- package/fesm2020/falcon-ng-tailwind.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/base-control.d.ts +104 -0
- package/lib/base-form-component.d.ts +169 -0
- package/lib/component/auto-complete/auto-complete.component.d.ts +17 -0
- package/lib/component/bottom-sheet/bottom-sheet.component.d.ts +11 -0
- package/lib/component/button/button.component.d.ts +12 -0
- package/lib/component/button-toggle/button-toggle.component.d.ts +14 -0
- package/lib/component/checkbox/checkbox.component.d.ts +10 -0
- package/lib/component/chips/chip.component.d.ts +35 -0
- package/lib/component/date-picker/date-picker.component.d.ts +9 -0
- package/lib/component/dialog/dialog.component.d.ts +8 -0
- package/lib/component/pagination/pagination.component.d.ts +20 -0
- package/lib/component/progress-bar/progress-bar.component.d.ts +11 -0
- package/lib/component/progress-spinner/progress-spinner.component.d.ts +12 -0
- package/lib/component/radio/radio.component.d.ts +14 -0
- package/lib/component/rich-text-editor/rich-text-editor.component.d.ts +9 -0
- package/lib/component/select/select.component.d.ts +15 -0
- package/lib/component/slide-toggle/slide-toggle.component.d.ts +9 -0
- package/lib/component/slider/slider.component.d.ts +9 -0
- package/lib/component/snack-bar/snack-bar.component.d.ts +5 -0
- package/lib/component/table/table.component.d.ts +21 -0
- package/lib/component/textarea/textarea.component.d.ts +9 -0
- package/lib/component/textbox/textbox.component.d.ts +9 -0
- package/lib/control-builder/control-builder.component.d.ts +9 -0
- package/{src/lib/control-type/Chip.ts → lib/control-type/select.d.ts} +2 -3
- package/{src/lib/control-type/Radio.ts → lib/control-type/textarea.d.ts} +2 -3
- package/lib/control-type/textbox.d.ts +5 -0
- package/lib/falcon-core.module.d.ts +35 -0
- package/lib/model/constant.d.ts +5 -0
- package/lib/model/enum.d.ts +144 -0
- package/{src/lib/model/environments.ts → lib/model/environments.d.ts} +5 -7
- package/{src/lib/model/interface.ts → lib/model/interface.d.ts} +80 -91
- package/{src/lib/model/ivalidator.ts → lib/model/ivalidator.d.ts} +3 -3
- package/lib/module/angularmaterial.module.d.ts +49 -0
- package/lib/reactive-field.directive.d.ts +14 -0
- package/lib/service/appsetting.service.d.ts +22 -0
- package/lib/service/http/generic-http-client.d.ts +121 -0
- package/lib/service/http/igeneric-http-client.d.ts +92 -0
- package/lib/service/logger.service.d.ts +18 -0
- package/lib/service/open-id/TokenHelperService.d.ts +11 -0
- package/lib/service/open-id/auth-guard.service.d.ts +11 -0
- package/lib/service/open-id/auth.service.d.ts +36 -0
- package/package.json +22 -2
- package/{src/public-api.ts → public-api.d.ts} +8 -6
- package/ng-package.json +0 -7
- package/src/lib/base-control.ts +0 -142
- package/src/lib/base-form-component.ts +0 -363
- package/src/lib/component/auto-complete/auto-complete.component.html +0 -39
- package/src/lib/component/auto-complete/auto-complete.component.scss +0 -0
- package/src/lib/component/auto-complete/auto-complete.component.spec.ts +0 -23
- package/src/lib/component/auto-complete/auto-complete.component.ts +0 -31
- package/src/lib/component/bottom-sheet/bottom-sheet.component.html +0 -9
- package/src/lib/component/bottom-sheet/bottom-sheet.component.scss +0 -0
- package/src/lib/component/bottom-sheet/bottom-sheet.component.spec.ts +0 -23
- package/src/lib/component/bottom-sheet/bottom-sheet.component.ts +0 -19
- package/src/lib/component/button/button.component.css +0 -0
- package/src/lib/component/button/button.component.html +0 -54
- package/src/lib/component/button/button.component.spec.ts +0 -23
- package/src/lib/component/button/button.component.ts +0 -17
- package/src/lib/component/button-toggle/button-toggle.component.html +0 -21
- package/src/lib/component/button-toggle/button-toggle.component.scss +0 -0
- package/src/lib/component/button-toggle/button-toggle.component.spec.ts +0 -23
- package/src/lib/component/button-toggle/button-toggle.component.ts +0 -26
- package/src/lib/component/checkbox/checkbox.component.html +0 -6
- package/src/lib/component/checkbox/checkbox.component.scss +0 -0
- package/src/lib/component/checkbox/checkbox.component.spec.ts +0 -23
- package/src/lib/component/checkbox/checkbox.component.ts +0 -17
- package/src/lib/component/chips/chip.component.html +0 -75
- package/src/lib/component/chips/chip.component.scss +0 -3
- package/src/lib/component/chips/chip.component.spec.ts +0 -23
- package/src/lib/component/chips/chip.component.ts +0 -125
- package/src/lib/component/date-picker/date-picker.component.html +0 -18
- package/src/lib/component/date-picker/date-picker.component.scss +0 -0
- package/src/lib/component/date-picker/date-picker.component.spec.ts +0 -23
- package/src/lib/component/date-picker/date-picker.component.ts +0 -13
- package/src/lib/component/dialog/dialog.component.html +0 -12
- package/src/lib/component/dialog/dialog.component.scss +0 -3
- package/src/lib/component/dialog/dialog.component.spec.ts +0 -23
- package/src/lib/component/dialog/dialog.component.ts +0 -12
- package/src/lib/component/pagination/pagination.component.html +0 -10
- package/src/lib/component/pagination/pagination.component.scss +0 -0
- package/src/lib/component/pagination/pagination.component.spec.ts +0 -23
- package/src/lib/component/pagination/pagination.component.ts +0 -86
- package/src/lib/component/progress-bar/progress-bar.component.html +0 -1
- package/src/lib/component/progress-bar/progress-bar.component.scss +0 -0
- package/src/lib/component/progress-bar/progress-bar.component.spec.ts +0 -23
- package/src/lib/component/progress-bar/progress-bar.component.ts +0 -15
- package/src/lib/component/progress-spinner/progress-spinner.component.html +0 -7
- package/src/lib/component/progress-spinner/progress-spinner.component.scss +0 -0
- package/src/lib/component/progress-spinner/progress-spinner.component.spec.ts +0 -23
- package/src/lib/component/progress-spinner/progress-spinner.component.ts +0 -16
- package/src/lib/component/radio/radio.component.html +0 -13
- package/src/lib/component/radio/radio.component.scss +0 -14
- package/src/lib/component/radio/radio.component.spec.ts +0 -23
- package/src/lib/component/radio/radio.component.ts +0 -29
- package/src/lib/component/rich-text-editor/rich-text-editor.component.html +0 -10
- package/src/lib/component/rich-text-editor/rich-text-editor.component.scss +0 -0
- package/src/lib/component/rich-text-editor/rich-text-editor.component.spec.ts +0 -23
- package/src/lib/component/rich-text-editor/rich-text-editor.component.ts +0 -13
- package/src/lib/component/select/select.component.html +0 -25
- package/src/lib/component/select/select.component.scss +0 -0
- package/src/lib/component/select/select.component.spec.ts +0 -23
- package/src/lib/component/select/select.component.ts +0 -32
- package/src/lib/component/slide-toggle/slide-toggle.component.html +0 -7
- package/src/lib/component/slide-toggle/slide-toggle.component.scss +0 -0
- package/src/lib/component/slide-toggle/slide-toggle.component.spec.ts +0 -23
- package/src/lib/component/slide-toggle/slide-toggle.component.ts +0 -13
- package/src/lib/component/slider/slider.component.html +0 -11
- package/src/lib/component/slider/slider.component.scss +0 -0
- package/src/lib/component/slider/slider.component.spec.ts +0 -23
- package/src/lib/component/slider/slider.component.ts +0 -13
- package/src/lib/component/snack-bar/snack-bar.component.html +0 -1
- package/src/lib/component/snack-bar/snack-bar.component.scss +0 -0
- package/src/lib/component/snack-bar/snack-bar.component.spec.ts +0 -23
- package/src/lib/component/snack-bar/snack-bar.component.ts +0 -10
- package/src/lib/component/table/table.component.html +0 -82
- package/src/lib/component/table/table.component.scss +0 -17
- package/src/lib/component/table/table.component.spec.ts +0 -23
- package/src/lib/component/table/table.component.ts +0 -54
- package/src/lib/component/textarea/textarea.component.html +0 -22
- package/src/lib/component/textarea/textarea.component.scss +0 -3
- package/src/lib/component/textarea/textarea.component.spec.ts +0 -23
- package/src/lib/component/textarea/textarea.component.ts +0 -13
- package/src/lib/component/textbox/textbox.component.html +0 -27
- package/src/lib/component/textbox/textbox.component.scss +0 -3
- package/src/lib/component/textbox/textbox.component.spec.ts +0 -23
- package/src/lib/component/textbox/textbox.component.ts +0 -13
- package/src/lib/control-builder/control-builder.component.html +0 -5
- package/src/lib/control-builder/control-builder.component.scss +0 -0
- package/src/lib/control-builder/control-builder.component.ts +0 -14
- package/src/lib/control-type/AutoComplete.ts +0 -6
- package/src/lib/control-type/Button.ts +0 -6
- package/src/lib/control-type/ButtonToggle.ts +0 -6
- package/src/lib/control-type/CheckBox.ts +0 -6
- package/src/lib/control-type/DatePicker.ts +0 -6
- package/src/lib/control-type/Divider.ts +0 -6
- package/src/lib/control-type/Editor.ts +0 -6
- package/src/lib/control-type/RichTextEditor.ts +0 -6
- package/src/lib/control-type/SlideToggle.ts +0 -6
- package/src/lib/control-type/Slider.ts +0 -6
- package/src/lib/control-type/select.ts +0 -6
- package/src/lib/control-type/textarea.ts +0 -6
- package/src/lib/control-type/textbox.ts +0 -6
- package/src/lib/falcon-core.module.ts +0 -141
- package/src/lib/model/constant.ts +0 -32
- package/src/lib/model/enum.ts +0 -151
- package/src/lib/module/angularmaterial.module.ts +0 -98
- package/src/lib/reactive-field.directive.ts +0 -24
- package/src/lib/service/appsetting.service.ts +0 -57
- package/src/lib/service/http/generic-http-client.ts +0 -205
- package/src/lib/service/http/httpInterceptor.ts +0 -36
- package/src/lib/service/http/igeneric-http-client.ts +0 -110
- package/src/lib/service/logger.service.ts +0 -75
- package/src/lib/service/open-id/TokenHelperService.ts +0 -76
- package/src/lib/service/open-id/auth-guard.service.ts +0 -25
- package/src/lib/service/open-id/auth.service.ts +0 -179
- package/tsconfig.lib.json +0 -15
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -14
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<div [ngStyle]="control.style" [ngClass]="control.class"
|
|
2
|
-
[formGroup]="formGroup">
|
|
3
|
-
<label class="radio-label-padding">{{control.label | titlecase}}</label>
|
|
4
|
-
<mat-radio-group [attr.aria-label]="control.label"
|
|
5
|
-
[labelPosition]="control.appearance"
|
|
6
|
-
[formControlName]="control.formControlName != undefined ? control.formControlName : 'default'"
|
|
7
|
-
[ngStyle]="control.style" [ngClass]="control.class"
|
|
8
|
-
(change)="radioGroupChangeEvent($event)">
|
|
9
|
-
<mat-radio-button [ngClass]="control.class"
|
|
10
|
-
*ngFor="let item of control.options" [value]="item.value">{{item.viewValue | titlecase}}
|
|
11
|
-
</mat-radio-button>
|
|
12
|
-
</mat-radio-group>
|
|
13
|
-
</div>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { RadioComponent } from './radio.component';
|
|
4
|
-
|
|
5
|
-
describe('RadioComponent', () => {
|
|
6
|
-
let component: RadioComponent;
|
|
7
|
-
let fixture: ComponentFixture<RadioComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
declarations: [ RadioComponent ]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(RadioComponent);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
fixture.detectChanges();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should create', () => {
|
|
21
|
-
expect(component).toBeTruthy();
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import {Component, EventEmitter, Output} from '@angular/core';
|
|
2
|
-
import {FormControl, FormGroup} from '@angular/forms';
|
|
3
|
-
import {MatRadioChange} from "@angular/material/radio";
|
|
4
|
-
import {BaseControl} from "../../base-control";
|
|
5
|
-
|
|
6
|
-
@Component({
|
|
7
|
-
selector: 'falcon-radio',
|
|
8
|
-
templateUrl: './radio.component.html',
|
|
9
|
-
styleUrls: ['./radio.component.scss'],
|
|
10
|
-
})
|
|
11
|
-
export class RadioComponent {
|
|
12
|
-
control!: BaseControl<string>;
|
|
13
|
-
formGroup!: FormGroup;
|
|
14
|
-
@Output() radioGroupChange: EventEmitter<MatRadioChange> =
|
|
15
|
-
new EventEmitter<MatRadioChange>();
|
|
16
|
-
|
|
17
|
-
ngOnInit(): void {
|
|
18
|
-
console.log(this.control.options)
|
|
19
|
-
if (this.formGroup === undefined) {
|
|
20
|
-
this.formGroup = new FormGroup({
|
|
21
|
-
default: new FormControl(),
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
radioGroupChangeEvent($event: any) {
|
|
27
|
-
this.radioGroupChange.emit($event.value);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
<ng-container [formGroup]="formGroup">
|
|
2
|
-
<mat-label>{{control.label}}</mat-label>
|
|
3
|
-
<angular-editor [formControlName]="control.formControlName" [config]="control.editorProperty">
|
|
4
|
-
</angular-editor>
|
|
5
|
-
<mat-hint>{{control.hint.text}}</mat-hint>
|
|
6
|
-
<ng-container *ngFor="let validation of control.validations;" ngProjectAs="mat-error">
|
|
7
|
-
<mat-error *ngIf="formGroup.get(control.formControlName)?.hasError(validation.name)">{{validation.message}}
|
|
8
|
-
</mat-error>
|
|
9
|
-
</ng-container>
|
|
10
|
-
</ng-container>
|
|
File without changes
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { RichTextEditorComponent } from './rich-text-editor.component';
|
|
4
|
-
|
|
5
|
-
describe('RichTextEditorComponent', () => {
|
|
6
|
-
let component: RichTextEditorComponent;
|
|
7
|
-
let fixture: ComponentFixture<RichTextEditorComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
declarations: [ RichTextEditorComponent ]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(RichTextEditorComponent);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
fixture.detectChanges();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should create', () => {
|
|
21
|
-
expect(component).toBeTruthy();
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import {Component, Input} from '@angular/core';
|
|
2
|
-
import {BaseControl} from "../../base-control";
|
|
3
|
-
import {FormGroup} from "@angular/forms";
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'lib-rich-text-editor',
|
|
7
|
-
templateUrl: './rich-text-editor.component.html',
|
|
8
|
-
styleUrls: ['./rich-text-editor.component.scss']
|
|
9
|
-
})
|
|
10
|
-
export class RichTextEditorComponent {
|
|
11
|
-
control!: BaseControl<string>;
|
|
12
|
-
formGroup!: FormGroup;
|
|
13
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
<mat-form-field [appearance]="control.appearance" [formGroup]="formGroup" [floatLabel]="control.floatLabel"
|
|
2
|
-
[ngStyle]="control.style" [ngClass]="control.class">
|
|
3
|
-
<mat-label>{{control.label}}</mat-label>
|
|
4
|
-
<mat-select [multiple]="control.selectProperty.multiple" (selectionChange)="selectChange($event)"
|
|
5
|
-
[formControlName]="control.formControlName != undefined ? control.formControlName : 'default'"
|
|
6
|
-
[placeholder]="control.placeHolder" [ngStyle]="control.style" [ngClass]="control.class" [(value)]="control.value">
|
|
7
|
-
<mat-option *ngFor="let item of control.options" [value]="item.key" [disabled]="item.disabled">
|
|
8
|
-
{{item.value}}
|
|
9
|
-
</mat-option>
|
|
10
|
-
</mat-select>
|
|
11
|
-
<mat-hint *ngIf="control.hint?.show">
|
|
12
|
-
<ng-container *ngIf="control.hint?.link?.isLink; else elseBlock">
|
|
13
|
-
<ng-container *ngIf="control.hint?.link?.queryParams !== undefined; else withoutQueryBlock">
|
|
14
|
-
<a [routerLink]="[control.hint.link?.routerLink]" [queryParams]="{ query: control.hint.link?.queryParams }"
|
|
15
|
-
routerLinkActive="router-link-active">{{control.hint.text}}</a>
|
|
16
|
-
</ng-container>
|
|
17
|
-
</ng-container>
|
|
18
|
-
<ng-template #elseBlock>
|
|
19
|
-
<span>{{control.hint.text}}</span>
|
|
20
|
-
</ng-template>
|
|
21
|
-
<ng-template #withoutQueryBlock>
|
|
22
|
-
<a [routerLink]="[control.hint.link?.routerLink]" routerLinkActive="router-link-active">{{control.hint.text}}</a>
|
|
23
|
-
</ng-template>
|
|
24
|
-
</mat-hint>
|
|
25
|
-
</mat-form-field>
|
|
File without changes
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { SelectComponent } from './select.component';
|
|
4
|
-
|
|
5
|
-
describe('SelectComponent', () => {
|
|
6
|
-
let component: SelectComponent;
|
|
7
|
-
let fixture: ComponentFixture<SelectComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
declarations: [ SelectComponent ]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(SelectComponent);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
fixture.detectChanges();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should create', () => {
|
|
21
|
-
expect(component).toBeTruthy();
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Component, EventEmitter, OnInit, Output } from '@angular/core';
|
|
2
|
-
import { BaseControl } from '../../base-control';
|
|
3
|
-
import { FormControl, FormGroup } from '@angular/forms';
|
|
4
|
-
import { MatSelectChange } from '@angular/material/select';
|
|
5
|
-
|
|
6
|
-
@Component({
|
|
7
|
-
selector: 'falcon-select',
|
|
8
|
-
templateUrl: './select.component.html',
|
|
9
|
-
styleUrls: ['./select.component.scss'],
|
|
10
|
-
})
|
|
11
|
-
export class SelectComponent implements OnInit {
|
|
12
|
-
control!: BaseControl<string>;
|
|
13
|
-
formGroup!: FormGroup;
|
|
14
|
-
@Output() selectionChange: EventEmitter<MatSelectChange> =
|
|
15
|
-
new EventEmitter<MatSelectChange>();
|
|
16
|
-
|
|
17
|
-
constructor() {}
|
|
18
|
-
|
|
19
|
-
ngOnInit(): void {
|
|
20
|
-
if (this.formGroup === undefined) {
|
|
21
|
-
this.formGroup = new FormGroup({
|
|
22
|
-
default: new FormControl(),
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
selectChange($event: any) {
|
|
28
|
-
this.selectionChange.emit($event.value);
|
|
29
|
-
if (this.control.event !== undefined)
|
|
30
|
-
this.control.event.change?.emit($event);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
File without changes
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { SlideToggleComponent } from './slide-toggle.component';
|
|
4
|
-
|
|
5
|
-
describe('SlideToggleComponent', () => {
|
|
6
|
-
let component: SlideToggleComponent;
|
|
7
|
-
let fixture: ComponentFixture<SlideToggleComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
declarations: [ SlideToggleComponent ]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(SlideToggleComponent);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
fixture.detectChanges();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should create', () => {
|
|
21
|
-
expect(component).toBeTruthy();
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Component } from '@angular/core';
|
|
2
|
-
import {BaseControl} from "../../base-control";
|
|
3
|
-
import {FormGroup} from "@angular/forms";
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'falcon-slide-toggle',
|
|
7
|
-
templateUrl: './slide-toggle.component.html',
|
|
8
|
-
styleUrls: ['./slide-toggle.component.scss'],
|
|
9
|
-
})
|
|
10
|
-
export class SlideToggleComponent {
|
|
11
|
-
control!: BaseControl<string>;
|
|
12
|
-
formGroup!: FormGroup;
|
|
13
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
<div [ngStyle]="control.style" [ngClass]="control.class" [formGroup]="formGroup">
|
|
2
|
-
<mat-label>{{control.label}}</mat-label>
|
|
3
|
-
<mat-slider
|
|
4
|
-
[ngStyle]="control.style" [ngClass]="control.class"
|
|
5
|
-
[color]="control.color"
|
|
6
|
-
[max]="control.sliderProperty.max"
|
|
7
|
-
[min]="control.sliderProperty.min"
|
|
8
|
-
[step]="control.sliderProperty.step">
|
|
9
|
-
<input matSliderThumb [formControlName]="control.formControlName">
|
|
10
|
-
</mat-slider>
|
|
11
|
-
</div>
|
|
File without changes
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { SliderComponent } from './slider.component';
|
|
4
|
-
|
|
5
|
-
describe('SliderComponent', () => {
|
|
6
|
-
let component: SliderComponent;
|
|
7
|
-
let fixture: ComponentFixture<SliderComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
declarations: [ SliderComponent ]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(SliderComponent);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
fixture.detectChanges();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should create', () => {
|
|
21
|
-
expect(component).toBeTruthy();
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Component } from '@angular/core';
|
|
2
|
-
import {BaseControl} from "../../base-control";
|
|
3
|
-
import {FormGroup} from "@angular/forms";
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'falcon-slider',
|
|
7
|
-
templateUrl: './slider.component.html',
|
|
8
|
-
styleUrls: ['./slider.component.scss'],
|
|
9
|
-
})
|
|
10
|
-
export class SliderComponent {
|
|
11
|
-
control!: BaseControl<string>;
|
|
12
|
-
formGroup!: FormGroup;
|
|
13
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<span>Pizza party!!! 🍕</span>
|
|
File without changes
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { SnackBarComponent } from './snack-bar.component';
|
|
4
|
-
|
|
5
|
-
describe('SnackBarComponent', () => {
|
|
6
|
-
let component: SnackBarComponent;
|
|
7
|
-
let fixture: ComponentFixture<SnackBarComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
declarations: [ SnackBarComponent ]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(SnackBarComponent);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
fixture.detectChanges();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should create', () => {
|
|
21
|
-
expect(component).toBeTruthy();
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
<div class="flex justify-end">
|
|
2
|
-
<mat-form-field *ngIf="matTableConfig?.filter">
|
|
3
|
-
<mat-label>Filter</mat-label>
|
|
4
|
-
<input matInput (keyup)="applyFilter($event)" #input>
|
|
5
|
-
</mat-form-field>
|
|
6
|
-
</div>
|
|
7
|
-
<falcon-progress-bar *ngIf="matTableConfig?.progressBar" [mode]="'indeterminate'"></falcon-progress-bar>
|
|
8
|
-
<div class="mat-elevation-z8">
|
|
9
|
-
<table mat-table [dataSource]="matTableConfig.dataSource" matSort>
|
|
10
|
-
<ng-container *ngFor="let column of matTableConfig?.columns" matColumnDef={{column.columnDef}}>
|
|
11
|
-
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{ column.header }}</th>
|
|
12
|
-
<ng-container *ngIf="column?.link?.isLink; else elseBlock">
|
|
13
|
-
<td mat-cell *matCellDef="let element">
|
|
14
|
-
<a [routerLink]="column?.link?.routerLink(element)">
|
|
15
|
-
{{column?.cell(element) !== undefined ? column?.cell(element) : '' }}
|
|
16
|
-
</a>
|
|
17
|
-
</td>
|
|
18
|
-
</ng-container>
|
|
19
|
-
<ng-template #elseBlock>
|
|
20
|
-
<td mat-cell *matCellDef="let element">
|
|
21
|
-
{{ column.cell(element) !== undefined ? column.cell(element) : ''}}
|
|
22
|
-
</td>
|
|
23
|
-
</ng-template>
|
|
24
|
-
|
|
25
|
-
</ng-container>
|
|
26
|
-
|
|
27
|
-
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
|
28
|
-
<tr mat-row *matRowDef="let row; columns: displayedColumns;" class="mat-row-element example-expanded-row"></tr>
|
|
29
|
-
|
|
30
|
-
<!– Row shown when there is no matching data. –>
|
|
31
|
-
<tr class="mat-row" *matNoDataRow>
|
|
32
|
-
<td class="mat-cell" colspan="columns.length">No data matching the filter</td>
|
|
33
|
-
</tr>
|
|
34
|
-
|
|
35
|
-
<ng-container matColumnDef="action">
|
|
36
|
-
<th mat-header-cell *matHeaderCellDef style="text-align: center;"></th>
|
|
37
|
-
<td mat-cell *matCellDef="let element">
|
|
38
|
-
|
|
39
|
-
<div *ngIf="matTableConfig?.action?.isMenu; else nonMenuBlock">
|
|
40
|
-
|
|
41
|
-
<button mat-icon-button matTooltip="Action" [matMenuTriggerFor]="tableActionMenu"
|
|
42
|
-
aria-label="Table action menu">
|
|
43
|
-
<mat-icon color="primary">more_horiz</mat-icon>
|
|
44
|
-
</button>
|
|
45
|
-
<mat-menu #tableActionMenu="matMenu">
|
|
46
|
-
<a [routerLink]="item?.link?.routerLink" mat-menu-item
|
|
47
|
-
*ngFor="let item of matTableConfig?.action?.menu" [disabled]="item.disabled">
|
|
48
|
-
<mat-icon [color]="item?.icon?.iconColor">{{item?.icon?.iconText}}</mat-icon>
|
|
49
|
-
<span>{{item.text}}</span>
|
|
50
|
-
</a>
|
|
51
|
-
</mat-menu>
|
|
52
|
-
</div>
|
|
53
|
-
<ng-template #nonMenuBlock>
|
|
54
|
-
<div class="flex justify-between">
|
|
55
|
-
<div>
|
|
56
|
-
<button *ngIf="matTableConfig?.action?.view" mat-icon-button aria-label="view button"
|
|
57
|
-
color="primary" matTooltip="View" (click)="tableAction(element, 0)">
|
|
58
|
-
<mat-icon>visibility</mat-icon>
|
|
59
|
-
</button>
|
|
60
|
-
<button *ngIf="matTableConfig?.action?.edit" mat-icon-button aria-label="edit button"
|
|
61
|
-
color="primary" matTooltip="Edit" (click)="tableAction(element, 1)">
|
|
62
|
-
<mat-icon>create</mat-icon>
|
|
63
|
-
</button>
|
|
64
|
-
<button *ngIf="matTableConfig?.action?.delete" mat-icon-button aria-label="Delete button"
|
|
65
|
-
color="warn" matTooltip="Delete" (click)="tableAction(element, 2)">
|
|
66
|
-
<mat-icon>delete</mat-icon>
|
|
67
|
-
</button>
|
|
68
|
-
</div>
|
|
69
|
-
<button *ngIf="matTableConfig?.action?.arrowRight" mat-icon-button aria-label="Arrow button"
|
|
70
|
-
color="primary" matTooltip="Expand" (click)="tableAction(element, 3)">
|
|
71
|
-
<mat-icon>chevron_right</mat-icon>
|
|
72
|
-
</button>
|
|
73
|
-
</div>
|
|
74
|
-
</ng-template>
|
|
75
|
-
</td>
|
|
76
|
-
</ng-container>
|
|
77
|
-
|
|
78
|
-
</table>
|
|
79
|
-
<mat-paginator *ngIf="matTableConfig?.paginationConfig?.pagination" (page)="page($event)"
|
|
80
|
-
[pageSizeOptions]="matTableConfig.paginationConfig?.pageSizeOptions!" showFirstLastButtons>
|
|
81
|
-
</mat-paginator>
|
|
82
|
-
</div>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
table {
|
|
2
|
-
text-align: center !important;
|
|
3
|
-
width: 100%;
|
|
4
|
-
}
|
|
5
|
-
.mat-form-field {
|
|
6
|
-
font-size: 14px;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
:host ::ng-deep {
|
|
10
|
-
.mat-sort-header-container {
|
|
11
|
-
display: flex;
|
|
12
|
-
justify-content: center;
|
|
13
|
-
}
|
|
14
|
-
.mat-row:hover {
|
|
15
|
-
background-color: whitesmoke;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { TableComponent } from './table.component';
|
|
4
|
-
|
|
5
|
-
describe('TableComponent', () => {
|
|
6
|
-
let component: TableComponent;
|
|
7
|
-
let fixture: ComponentFixture<TableComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
declarations: [ TableComponent ]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(TableComponent);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
fixture.detectChanges();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should create', () => {
|
|
21
|
-
expect(component).toBeTruthy();
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import {Component, EventEmitter, Input, OnInit, Output, ViewChild} from '@angular/core';
|
|
2
|
-
import {MatTableConfig} from "../../model/interface";
|
|
3
|
-
import {MatPaginator, PageEvent} from "@angular/material/paginator";
|
|
4
|
-
import {MatSort} from "@angular/material/sort";
|
|
5
|
-
import {MatTableDataSource} from "@angular/material/table";
|
|
6
|
-
import {TableAction} from "../../model/enum";
|
|
7
|
-
|
|
8
|
-
@Component({
|
|
9
|
-
selector: 'falcon-table',
|
|
10
|
-
templateUrl: './table.component.html',
|
|
11
|
-
styleUrls: ['./table.component.scss']
|
|
12
|
-
})
|
|
13
|
-
export class TableComponent implements OnInit {
|
|
14
|
-
@Input() matTableConfig!: MatTableConfig;
|
|
15
|
-
@ViewChild(MatPaginator, { static: false }) paginator!: MatPaginator;
|
|
16
|
-
@ViewChild(MatSort, { static: false }) sort!: MatSort;
|
|
17
|
-
@Output() pageEvent = new EventEmitter<PageEvent>();
|
|
18
|
-
@Input() displayedColumns!: string[];
|
|
19
|
-
@Output() tableActionRowEvent = new EventEmitter<any>();
|
|
20
|
-
ngOnInit(): void {
|
|
21
|
-
const cols = this.matTableConfig.columns?.map((c) => c.columnDef);
|
|
22
|
-
if (this.displayedColumns !== undefined)
|
|
23
|
-
this.displayedColumns.unshift(...cols as string[]);
|
|
24
|
-
else this.displayedColumns = cols as string[];
|
|
25
|
-
}
|
|
26
|
-
ngAfterViewInit() {
|
|
27
|
-
setTimeout(() => {
|
|
28
|
-
this.matTableConfig.dataSource = new MatTableDataSource(
|
|
29
|
-
this.matTableConfig.dataSource,
|
|
30
|
-
);
|
|
31
|
-
this.matTableConfig.dataSource.paginator = this.paginator;
|
|
32
|
-
this.matTableConfig.dataSource.sort = this.sort;
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
applyFilter(event: Event) {
|
|
36
|
-
const filterValue = (event.target as HTMLInputElement).value;
|
|
37
|
-
this.matTableConfig.dataSource.filter = filterValue
|
|
38
|
-
.trim()
|
|
39
|
-
.toLowerCase();
|
|
40
|
-
|
|
41
|
-
if (this.matTableConfig.dataSource.paginator) {
|
|
42
|
-
this.matTableConfig.dataSource.paginator.firstPage();
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
public page(e: any) {
|
|
47
|
-
this.pageEvent.emit(e);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
public tableAction($item: any, action: TableAction) {
|
|
51
|
-
const item = Object.assign($item, { action: action });
|
|
52
|
-
this.tableActionRowEvent.next(item);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<mat-form-field [appearance]="control.appearance" [formGroup]="formGroup" [floatLabel]="control.floatLabel"
|
|
2
|
-
[ngStyle]="control.style" [ngClass]="control.class" class="textarea-form">
|
|
3
|
-
<mat-label>{{control.label}}</mat-label>
|
|
4
|
-
|
|
5
|
-
<textarea matInput [formControlName]="control.formControlName" [placeholder]="control.placeHolder"
|
|
6
|
-
[ngStyle]="control.style" [ngClass]="control.class"
|
|
7
|
-
[cdkTextareaAutosize]="control.textAreaProperty.cdkTextareaAutosize"
|
|
8
|
-
[cdkAutosizeMinRows]="control.textAreaProperty.cdkAutosizeMinRows"
|
|
9
|
-
[cdkAutosizeMaxRows]="control.textAreaProperty.cdkAutosizeMaxRows" [rows]="control.textAreaProperty.rows"
|
|
10
|
-
[cols]="control.textAreaProperty.cols"></textarea>
|
|
11
|
-
|
|
12
|
-
<span matPrefix [ngClass]="{'material-icons': control.prefix.isIcon}">{{control.prefix.text}}</span>
|
|
13
|
-
<span matSuffix [ngClass]="{'material-icons': control.suffix.isIcon}">{{control.suffix.text}}</span>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
<mat-hint>{{control.hint.text}}</mat-hint>
|
|
17
|
-
|
|
18
|
-
<ng-container *ngFor="let validation of control.validations;" ngProjectAs="mat-error">
|
|
19
|
-
<mat-error *ngIf="formGroup.get(control.formControlName)?.hasError(validation.name)">{{validation.message}}
|
|
20
|
-
</mat-error>
|
|
21
|
-
</ng-container>
|
|
22
|
-
</mat-form-field>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { TextareaComponent } from './textarea.component';
|
|
4
|
-
|
|
5
|
-
describe('TextareaComponent', () => {
|
|
6
|
-
let component: TextareaComponent;
|
|
7
|
-
let fixture: ComponentFixture<TextareaComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
declarations: [ TextareaComponent ]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(TextareaComponent);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
fixture.detectChanges();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should create', () => {
|
|
21
|
-
expect(component).toBeTruthy();
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Component } from '@angular/core';
|
|
2
|
-
import { BaseControl } from '../../base-control';
|
|
3
|
-
import { FormGroup } from '@angular/forms';
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'falcon-textarea',
|
|
7
|
-
templateUrl: './textarea.component.html',
|
|
8
|
-
styleUrls: ['./textarea.component.scss'],
|
|
9
|
-
})
|
|
10
|
-
export class TextareaComponent {
|
|
11
|
-
control!: BaseControl<string>;
|
|
12
|
-
formGroup!: FormGroup;
|
|
13
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<mat-form-field [formGroup]="formGroup" [appearance]="control.appearance" class="textbox-form">
|
|
2
|
-
<mat-label>{{control.label}}</mat-label>
|
|
3
|
-
<input matInput [type]="control.type" [formControlName]="control.formControlName" [class]="control.class"
|
|
4
|
-
[required]="formGroup.get(control.formControlName)?.errors !== null && formGroup.get(control.formControlName)?.errors?.['required']">
|
|
5
|
-
|
|
6
|
-
<span matPrefix [matTooltip]="control.prefix.toolTipText!"
|
|
7
|
-
[ngClass]="{'material-icons': control.prefix.isIcon}">{{control.prefix.text}} </span>
|
|
8
|
-
<span matSuffix [matTooltip]="control.suffix.toolTipText!"
|
|
9
|
-
[ngClass]="{'material-icons': control.suffix.isIcon}">{{control.suffix.text}} </span>
|
|
10
|
-
<mat-hint *ngIf="control.hint.link?.isLink; else elseBlock">
|
|
11
|
-
<ng-container *ngIf="control.hint.link?.queryParams !== undefined; else withoutQueryBlock">
|
|
12
|
-
<a [routerLink]="[control.hint.link?.routerLink]" [queryParams]="{ query: control.hint.link?.queryParams }"
|
|
13
|
-
routerLinkActive="router-link-active">{{control.hint.text}}</a>
|
|
14
|
-
</ng-container>
|
|
15
|
-
</mat-hint>
|
|
16
|
-
<ng-template #elseBlock>
|
|
17
|
-
<mat-hint>{{control.hint.text}}</mat-hint>
|
|
18
|
-
</ng-template>
|
|
19
|
-
<ng-template #withoutQueryBlock>
|
|
20
|
-
<a [routerLink]="[control.hint.link?.routerLink]" routerLinkActive="router-link-active">{{control.hint.text}}</a>
|
|
21
|
-
</ng-template>
|
|
22
|
-
|
|
23
|
-
<ng-container *ngFor="let validation of control.validations;" ngProjectAs="mat-error">
|
|
24
|
-
<mat-error *ngIf="formGroup.get(control.formControlName)?.hasError(validation.name)">{{validation.message}}
|
|
25
|
-
</mat-error>
|
|
26
|
-
</ng-container>
|
|
27
|
-
</mat-form-field>
|