@falcon-ng/tailwind 0.0.2 → 0.0.4
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/AutoComplete.mjs +8 -0
- package/esm2020/lib/control-type/Button.mjs +8 -0
- package/esm2020/lib/control-type/ButtonToggle.mjs +8 -0
- package/esm2020/lib/control-type/CheckBox.mjs +8 -0
- package/esm2020/lib/control-type/Chip.mjs +8 -0
- package/esm2020/lib/control-type/DatePicker.mjs +8 -0
- package/esm2020/lib/control-type/Divider.mjs +8 -0
- package/esm2020/lib/control-type/Editor.mjs +8 -0
- package/esm2020/lib/control-type/Radio.mjs +8 -0
- package/esm2020/lib/control-type/RichTextEditor.mjs +8 -0
- package/esm2020/lib/control-type/SlideToggle.mjs +8 -0
- package/esm2020/lib/control-type/Slider.mjs +8 -0
- package/esm2020/lib/control-type/Textarea.mjs +8 -0
- package/esm2020/lib/control-type/Textbox.mjs +8 -0
- package/esm2020/lib/control-type/select.mjs +8 -0
- package/esm2020/lib/falcon-core.module.mjs +230 -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 +47 -0
- package/fesm2015/falcon-ng-tailwind.mjs +1988 -0
- package/fesm2015/falcon-ng-tailwind.mjs.map +1 -0
- package/fesm2020/falcon-ng-tailwind.mjs +1962 -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/lib/control-type/AutoComplete.d.ts +5 -0
- package/lib/control-type/Button.d.ts +5 -0
- package/lib/control-type/ButtonToggle.d.ts +5 -0
- package/{src/lib/control-type/Chip.ts → lib/control-type/CheckBox.d.ts} +2 -3
- package/lib/control-type/Chip.d.ts +5 -0
- package/lib/control-type/DatePicker.d.ts +5 -0
- package/lib/control-type/Divider.d.ts +5 -0
- package/lib/control-type/Editor.d.ts +5 -0
- package/lib/control-type/Radio.d.ts +5 -0
- package/lib/control-type/RichTextEditor.d.ts +5 -0
- package/{src/lib/control-type/Radio.ts → lib/control-type/SlideToggle.d.ts} +2 -3
- package/lib/control-type/Slider.d.ts +5 -0
- package/lib/control-type/Textarea.d.ts +5 -0
- package/lib/control-type/Textbox.d.ts +5 -0
- package/lib/control-type/select.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/public-api.d.ts +34 -0
- 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/src/public-api.ts +0 -35
- package/tsconfig.lib.json +0 -15
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -14
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import {Component, EventEmitter, OnInit, Output} from '@angular/core';
|
|
2
|
-
import {FormControl, FormGroup} from "@angular/forms";
|
|
3
|
-
import {BaseControl} from "../../base-control";
|
|
4
|
-
import {MatButtonToggleChange} from "@angular/material/button-toggle";
|
|
5
|
-
|
|
6
|
-
@Component({
|
|
7
|
-
selector: 'falcon-button-toggle',
|
|
8
|
-
templateUrl: './button-toggle.component.html',
|
|
9
|
-
styleUrls: ['./button-toggle.component.scss'],
|
|
10
|
-
})
|
|
11
|
-
export class ButtonToggleComponent implements OnInit {
|
|
12
|
-
control!: BaseControl<string>;
|
|
13
|
-
formGroup!: FormGroup;
|
|
14
|
-
@Output() toggleGroupChange: EventEmitter<MatButtonToggleChange> = new EventEmitter<MatButtonToggleChange>();
|
|
15
|
-
ngOnInit(): void {
|
|
16
|
-
if (this.formGroup === undefined) {
|
|
17
|
-
this.formGroup = new FormGroup({
|
|
18
|
-
default: new FormControl()
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
toggleChange($event: any) {
|
|
24
|
-
this.toggleGroupChange.emit($event.value);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
<div [formGroup]="formGroup">
|
|
2
|
-
<mat-checkbox [ngStyle]="control.style" [ngClass]="control.class"
|
|
3
|
-
[color]="control.color != null ? control.color : 'accent'" [labelPosition]="control.labelPosition"
|
|
4
|
-
[formControlName]="control.formControlName" (change)="change($event)">
|
|
5
|
-
{{control.label}}</mat-checkbox>
|
|
6
|
-
</div>
|
|
File without changes
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { CheckboxComponent } from './checkbox.component';
|
|
4
|
-
|
|
5
|
-
describe('CheckboxComponent', () => {
|
|
6
|
-
let component: CheckboxComponent;
|
|
7
|
-
let fixture: ComponentFixture<CheckboxComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
declarations: [ CheckboxComponent ]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(CheckboxComponent);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
fixture.detectChanges();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should create', () => {
|
|
21
|
-
expect(component).toBeTruthy();
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Component } from '@angular/core';
|
|
2
|
-
import { FormGroup } from '@angular/forms';
|
|
3
|
-
import { BaseControl } from '../../base-control';
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'falcon-checkbox',
|
|
7
|
-
templateUrl: './checkbox.component.html',
|
|
8
|
-
styleUrls: ['./checkbox.component.scss'],
|
|
9
|
-
})
|
|
10
|
-
export class CheckboxComponent {
|
|
11
|
-
control!: BaseControl<string>;
|
|
12
|
-
formGroup!: FormGroup;
|
|
13
|
-
change($event: any) {
|
|
14
|
-
if (this.control.event !== undefined)
|
|
15
|
-
this.control?.event?.change?.emit($event);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
<ng-container [ngSwitch]="control.type">
|
|
2
|
-
<mat-form-field class="chip-list" *ngSwitchCase="'search'" [appearance]="control.appearance" [formGroup]="formGroup"
|
|
3
|
-
[ngStyle]="control.style" [ngClass]="control.class">
|
|
4
|
-
<mat-label>{{control.label}}</mat-label>
|
|
5
|
-
<mat-chip-grid #chipGrid aria-label="item selection">
|
|
6
|
-
<mat-chip-row *ngFor="let option of control.chipSelectedOptions" [removable]="removable"
|
|
7
|
-
(removed)="remove(option)">
|
|
8
|
-
{{option.value}}
|
|
9
|
-
<mat-icon matChipRemove *ngIf="removable">cancel</mat-icon>
|
|
10
|
-
</mat-chip-row>
|
|
11
|
-
|
|
12
|
-
<input matInput #chipAutoCompleteInput [formControl]="autoCompleteControl"
|
|
13
|
-
[formArrayName]="control.formControlName" [placeholder]="control.placeHolder" [ngStyle]="control.style"
|
|
14
|
-
[ngClass]="control.class" [matAutocomplete]="auto" [matChipInputFor]="chipGrid"
|
|
15
|
-
[matChipInputSeparatorKeyCodes]="separatorKeysCodes" (matChipInputTokenEnd)="add($event)"
|
|
16
|
-
[required]="formGroup.get(control.formControlName)?.errors !== null && formGroup.get(control.formControlName)?.errors?.['required']"
|
|
17
|
-
(keyup.enter)="keyboardEnterEvent($event)">
|
|
18
|
-
|
|
19
|
-
</mat-chip-grid>
|
|
20
|
-
<mat-autocomplete #auto="matAutocomplete" (optionSelected)="optionSelected($event)">
|
|
21
|
-
<mat-option *ngFor="let item of filteredOptions | async" [value]="item.key">
|
|
22
|
-
{{item.value}}
|
|
23
|
-
</mat-option>
|
|
24
|
-
</mat-autocomplete>
|
|
25
|
-
<mat-hint>
|
|
26
|
-
<ng-container *ngIf="control.hint.link?.isLink; else elseBlock">
|
|
27
|
-
<ng-container *ngIf="control.hint.link?.queryParams !== undefined; else withoutQueryBlock">
|
|
28
|
-
<a [routerLink]="[control.hint.link?.routerLink]" [queryParams]="{ query: control.hint.link?.queryParams }"
|
|
29
|
-
routerLinkActive="router-link-active">{{control.hint.text}}</a>
|
|
30
|
-
</ng-container>
|
|
31
|
-
</ng-container>
|
|
32
|
-
<ng-template #elseBlock>
|
|
33
|
-
<span>{{control.hint.text}}</span>
|
|
34
|
-
</ng-template>
|
|
35
|
-
<ng-template #withoutQueryBlock>
|
|
36
|
-
<a [routerLink]="[control.hint.link?.routerLink]"
|
|
37
|
-
routerLinkActive="router-link-active">{{control.hint.text}}</a>
|
|
38
|
-
</ng-template>
|
|
39
|
-
</mat-hint>
|
|
40
|
-
</mat-form-field>
|
|
41
|
-
|
|
42
|
-
<mat-form-field class="chip-list" *ngSwitchCase="'text'" [appearance]="control.appearance" [formGroup]="formGroup"
|
|
43
|
-
[ngStyle]="control.style" [ngClass]="control.class">
|
|
44
|
-
<mat-label>{{control.label}}</mat-label>
|
|
45
|
-
<mat-chip-grid #chipGrid aria-label="item selection">
|
|
46
|
-
<mat-chip-row *ngFor="let option of control.chipSelectedOptions" [value]="selectable" [removable]="removable"
|
|
47
|
-
(removed)="remove(option)">
|
|
48
|
-
{{option?.value}}
|
|
49
|
-
<mat-icon matChipRemove *ngIf="removable">cancel</mat-icon>
|
|
50
|
-
</mat-chip-row>
|
|
51
|
-
|
|
52
|
-
<input matInput #chipTextInput [formArrayName]="control.formControlName" multiple
|
|
53
|
-
[placeholder]="control.placeHolder"
|
|
54
|
-
[matChipInputFor]="chipGrid" [ngStyle]="control.style" [ngClass]="control.class"
|
|
55
|
-
[matChipInputSeparatorKeyCodes]="separatorKeysCodes" [matChipInputAddOnBlur]="addOnBlur"
|
|
56
|
-
(matChipInputTokenEnd)="add($event)"
|
|
57
|
-
[required]="formGroup.get(control.formControlName)?.errors !== null && formGroup.get(control.formControlName)?.errors?.['required']"
|
|
58
|
-
(keyup.enter)="keyboardEnterEvent($event)">
|
|
59
|
-
|
|
60
|
-
</mat-chip-grid>
|
|
61
|
-
</mat-form-field>
|
|
62
|
-
|
|
63
|
-
<mat-chip-listbox aria-label="Chips selection" *ngSwitchDefault>
|
|
64
|
-
<mat-chip color="{{control.color}}" selected>{{control.label}}</mat-chip>
|
|
65
|
-
</mat-chip-listbox>
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
<mat-chip-set class="chip-list" cdkDropList cdkDropListOrientation="horizontal" (cdkDropListDropped)="drop($event)"
|
|
69
|
-
*ngSwitchCase="'dragDrop'" class="example-chip">
|
|
70
|
-
<mat-chip class="example-box" cdkDrag *ngFor="let option of control?.options">
|
|
71
|
-
{{option?.value}}
|
|
72
|
-
</mat-chip>
|
|
73
|
-
</mat-chip-set>
|
|
74
|
-
|
|
75
|
-
</ng-container>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { ChipComponent } from './chip.component';
|
|
4
|
-
|
|
5
|
-
describe('ChipsComponent', () => {
|
|
6
|
-
let component: ChipComponent;
|
|
7
|
-
let fixture: ComponentFixture<ChipComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
declarations: [ ChipComponent ]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(ChipComponent);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
fixture.detectChanges();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should create', () => {
|
|
21
|
-
expect(component).toBeTruthy();
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import { Component, ElementRef, Input, OnInit, ViewChild } from '@angular/core';
|
|
2
|
-
import { BaseControl } from '../../base-control';
|
|
3
|
-
import { FormArray, FormBuilder, FormControl, FormGroup } from '@angular/forms';
|
|
4
|
-
import { COMMA, ENTER } from '@angular/cdk/keycodes';
|
|
5
|
-
import { Observable } from 'rxjs';
|
|
6
|
-
import { IOptions } from '../../model/interface';
|
|
7
|
-
import {
|
|
8
|
-
MatAutocomplete,
|
|
9
|
-
MatAutocompleteSelectedEvent,
|
|
10
|
-
} from '@angular/material/autocomplete';
|
|
11
|
-
import { map, startWith } from 'rxjs/operators';
|
|
12
|
-
import { MatChipInputEvent } from '@angular/material/chips';
|
|
13
|
-
import { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop';
|
|
14
|
-
|
|
15
|
-
@Component({
|
|
16
|
-
selector: 'falcon-chip',
|
|
17
|
-
templateUrl: './chip.component.html',
|
|
18
|
-
styleUrls: ['./chip.component.scss'],
|
|
19
|
-
})
|
|
20
|
-
export class ChipComponent implements OnInit {
|
|
21
|
-
@Input() control!: BaseControl<any>;
|
|
22
|
-
@Input() formGroup!: FormGroup;
|
|
23
|
-
readonly separatorKeysCodes: number[] = [ENTER, COMMA];
|
|
24
|
-
selectable = true;
|
|
25
|
-
removable = true;
|
|
26
|
-
addOnBlur = true;
|
|
27
|
-
filteredOptions: Observable<IOptions[]>;
|
|
28
|
-
autoCompleteControl = new FormControl('');
|
|
29
|
-
private items: FormArray;
|
|
30
|
-
|
|
31
|
-
@ViewChild('chipAutoCompleteInput')
|
|
32
|
-
chipAutoCompleteInput!: ElementRef<HTMLInputElement>;
|
|
33
|
-
@ViewChild('chipTextInput') chipTextInput!: ElementRef<HTMLInputElement>;
|
|
34
|
-
@ViewChild('auto') matAutocomplete!: MatAutocomplete;
|
|
35
|
-
|
|
36
|
-
constructor(private fb: FormBuilder) {
|
|
37
|
-
this.filteredOptions = this.autoCompleteControl.valueChanges.pipe(
|
|
38
|
-
startWith(null),
|
|
39
|
-
map((value: string | null) =>
|
|
40
|
-
value ? this._filter(value) : this.control?.options.slice()
|
|
41
|
-
)
|
|
42
|
-
);
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
ngOnInit() {
|
|
47
|
-
setTimeout(() => {
|
|
48
|
-
if (this.control.chipSelectedOptions.length > 0) {
|
|
49
|
-
this.items = this.formGroup.controls[
|
|
50
|
-
this.control.formControlName
|
|
51
|
-
] as FormArray;
|
|
52
|
-
this.control.chipSelectedOptions.forEach((value: any) => {
|
|
53
|
-
this.items.controls.push(this.createItem(value.value));
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
add(event: MatChipInputEvent): void {
|
|
60
|
-
const input = event.input;
|
|
61
|
-
const value = event.value;
|
|
62
|
-
if ((value || '').trim()) {
|
|
63
|
-
this.control.chipSelectedOptions.push({
|
|
64
|
-
key: value.trim(),
|
|
65
|
-
value: value.trim(),
|
|
66
|
-
});
|
|
67
|
-
this.items = this.formGroup.get(
|
|
68
|
-
this.control.formControlName
|
|
69
|
-
) as FormArray;
|
|
70
|
-
this.items.push(this.createItem(value));
|
|
71
|
-
}
|
|
72
|
-
if (input) {
|
|
73
|
-
input.value = '';
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
createItem(value: String): FormGroup {
|
|
78
|
-
return this.fb.group({
|
|
79
|
-
key: value,
|
|
80
|
-
value: value,
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
remove(option: IOptions): void {
|
|
85
|
-
const index = this.control.chipSelectedOptions.indexOf(option);
|
|
86
|
-
if (index >= 0) {
|
|
87
|
-
this.control.chipSelectedOptions.splice(index, 1);
|
|
88
|
-
this.items.removeAt(index);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
optionSelected(event: MatAutocompleteSelectedEvent): void {
|
|
93
|
-
this.control.chipSelectedOptions.push({
|
|
94
|
-
key: event.option.value,
|
|
95
|
-
value: event.option.value,
|
|
96
|
-
});
|
|
97
|
-
this.items = this.formGroup.get(this.control.formControlName) as FormArray;
|
|
98
|
-
this.items.push(this.createItem(event.option.value));
|
|
99
|
-
this.chipAutoCompleteInput.nativeElement.value = '';
|
|
100
|
-
this.formGroup.get(this.control.formControlName)?.setValue(null);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
private _filter(value: string): any {
|
|
104
|
-
if (value !== null) {
|
|
105
|
-
const filterValue = value.toLowerCase();
|
|
106
|
-
return this.control?.options?.filter((option: IOptions) =>
|
|
107
|
-
option.value.toLowerCase().includes(filterValue)
|
|
108
|
-
);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
drop(event: CdkDragDrop<IOptions[]>) {
|
|
113
|
-
moveItemInArray(
|
|
114
|
-
this.control.options,
|
|
115
|
-
event.previousIndex,
|
|
116
|
-
event.currentIndex
|
|
117
|
-
);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
keyboardEnterEvent(event: any): void {
|
|
121
|
-
if (this.control.event !== undefined)
|
|
122
|
-
this.control.event.keyboardEnter?.emit(event);
|
|
123
|
-
this.chipTextInput.nativeElement.value = '';
|
|
124
|
-
}
|
|
125
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<mat-form-field [appearance]="control.appearance" [formGroup]="formGroup"
|
|
2
|
-
[floatLabel]="control.floatLabel" [ngStyle]="control.style"
|
|
3
|
-
[ngClass]="control.class">
|
|
4
|
-
<mat-label>{{control.label}}</mat-label>
|
|
5
|
-
<input matInput [matDatepicker]="picker" [formControlName]="control.formControlName"
|
|
6
|
-
[placeholder]="control.placeHolder" [type]="control.type"
|
|
7
|
-
[ngStyle]="control.style" [ngClass]="control.class"
|
|
8
|
-
[required]="formGroup.get(control.formControlName)?.errors !== null && formGroup.get(control.formControlName)?.errors?.['required']">
|
|
9
|
-
<mat-datepicker-toggle matSuffix [for]="picker">
|
|
10
|
-
<mat-icon matDatepickerToggleIcon *ngIf="control.suffix.isIcon">keyboard_arrow_down</mat-icon>
|
|
11
|
-
</mat-datepicker-toggle>
|
|
12
|
-
<mat-datepicker #picker></mat-datepicker>
|
|
13
|
-
<mat-hint>{{control.hint.text}}</mat-hint>
|
|
14
|
-
<ng-container *ngFor="let validation of control.validations;" ngProjectAs="mat-error">
|
|
15
|
-
<mat-error *ngIf="formGroup.get(control.formControlName)?.hasError(validation.name)">{{validation.message}}
|
|
16
|
-
</mat-error>
|
|
17
|
-
</ng-container>
|
|
18
|
-
</mat-form-field>
|
|
File without changes
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { DatePickerComponent } from './date-picker.component';
|
|
4
|
-
|
|
5
|
-
describe('DatePickerComponent', () => {
|
|
6
|
-
let component: DatePickerComponent;
|
|
7
|
-
let fixture: ComponentFixture<DatePickerComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
declarations: [ DatePickerComponent ]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(DatePickerComponent);
|
|
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-date-picker',
|
|
7
|
-
templateUrl: './date-picker.component.html',
|
|
8
|
-
styleUrls: ['./date-picker.component.scss'],
|
|
9
|
-
})
|
|
10
|
-
export class DatePickerComponent {
|
|
11
|
-
control!: BaseControl<string>;
|
|
12
|
-
formGroup!: FormGroup;
|
|
13
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<span mat-dialog-title>{{data.title}}</span>
|
|
2
|
-
<mat-divider></mat-divider>
|
|
3
|
-
<div mat-dialog-content>
|
|
4
|
-
<span class="mat-h3">{{data.bodyMessage}}</span>
|
|
5
|
-
</div>
|
|
6
|
-
<mat-divider></mat-divider>
|
|
7
|
-
<div mat-dialog-actions>
|
|
8
|
-
<button mat-raised-button [mat-dialog-close]="" cdkFocusInitial>{{data.cancelBtnText}}</button>
|
|
9
|
-
<button mat-raised-button [color]="'warn'" [mat-dialog-close]="data">
|
|
10
|
-
{{data.mainbtnText}}
|
|
11
|
-
</button>
|
|
12
|
-
</div>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { DialogComponent } from './dialog.component';
|
|
4
|
-
|
|
5
|
-
describe('DialogComponent', () => {
|
|
6
|
-
let component: DialogComponent;
|
|
7
|
-
let fixture: ComponentFixture<DialogComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
declarations: [ DialogComponent ]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(DialogComponent);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
fixture.detectChanges();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should create', () => {
|
|
21
|
-
expect(component).toBeTruthy();
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import {Component, Inject} from '@angular/core';
|
|
2
|
-
import {IDialogData} from "../../model/interface";
|
|
3
|
-
import {MAT_DIALOG_DATA} from "@angular/material/dialog";
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'lib-dialog',
|
|
7
|
-
templateUrl: './dialog.component.html',
|
|
8
|
-
styleUrls: ['./dialog.component.scss']
|
|
9
|
-
})
|
|
10
|
-
export class DialogComponent {
|
|
11
|
-
constructor(@Inject(MAT_DIALOG_DATA) public data: IDialogData) {}
|
|
12
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
<div class="flex justify-between">
|
|
2
|
-
<span class="mat-h3">Page {{currentPage}} of {{totalPage}}</span>
|
|
3
|
-
<mat-button-toggle-group name="fontStyle" aria-label="Font Style">
|
|
4
|
-
<mat-button-toggle value="bold" *ngFor="let item of paginationSize; index as i;"
|
|
5
|
-
(change)="receiveBtnChange(item)" [checked]="firstLoad && i ==0">
|
|
6
|
-
<span class="mat-h3">{{item}}</span>
|
|
7
|
-
</mat-button-toggle>
|
|
8
|
-
</mat-button-toggle-group>
|
|
9
|
-
|
|
10
|
-
</div>
|
|
File without changes
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { PaginationComponent } from './pagination.component';
|
|
4
|
-
|
|
5
|
-
describe('PaginationComponent', () => {
|
|
6
|
-
let component: PaginationComponent;
|
|
7
|
-
let fixture: ComponentFixture<PaginationComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
declarations: [ PaginationComponent ]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(PaginationComponent);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
fixture.detectChanges();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should create', () => {
|
|
21
|
-
expect(component).toBeTruthy();
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import {Component, EventEmitter, Input, Output} from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Component({
|
|
4
|
-
selector: 'falcon-pagination',
|
|
5
|
-
templateUrl: './pagination.component.html',
|
|
6
|
-
styleUrls: ['./pagination.component.scss']
|
|
7
|
-
})
|
|
8
|
-
export class PaginationComponent {
|
|
9
|
-
@Input() totalPage: number = 10;
|
|
10
|
-
@Input() pageSize: number = 10;
|
|
11
|
-
@Output() paginationEvent = new EventEmitter<number>();
|
|
12
|
-
paginationSize: number[] = new Array(10);
|
|
13
|
-
preDisable: boolean = true;
|
|
14
|
-
nextDisable: boolean = false;
|
|
15
|
-
private start!: number;
|
|
16
|
-
private end!: number;
|
|
17
|
-
currentPage: number = 1;
|
|
18
|
-
firstLoad: boolean = false;
|
|
19
|
-
|
|
20
|
-
constructor() {}
|
|
21
|
-
|
|
22
|
-
ngOnInit(): void {
|
|
23
|
-
this.firstLoad = true;
|
|
24
|
-
this.paginationSize = [
|
|
25
|
-
...Array.from(
|
|
26
|
-
{
|
|
27
|
-
length:
|
|
28
|
-
this.totalPage < this.pageSize
|
|
29
|
-
? this.totalPage
|
|
30
|
-
: this.pageSize,
|
|
31
|
-
},
|
|
32
|
-
(_, i) => i + 1,
|
|
33
|
-
),
|
|
34
|
-
];
|
|
35
|
-
if (this.paginationSize.length == this.totalPage)
|
|
36
|
-
this.nextDisable = true;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
receiveBtnChange($event: any) {
|
|
40
|
-
this.firstLoad = false;
|
|
41
|
-
this.currentPage = $event;
|
|
42
|
-
if ($event == this.totalPage) this.nextDisable = true;
|
|
43
|
-
else if ($event == 1) {
|
|
44
|
-
this.nextDisable = false;
|
|
45
|
-
this.preDisable = true;
|
|
46
|
-
} else {
|
|
47
|
-
this.nextDisable = false;
|
|
48
|
-
this.preDisable = false;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
if ($event === 'previous') {
|
|
52
|
-
this.preDisable = true;
|
|
53
|
-
} else if ($event === 'next') {
|
|
54
|
-
} else {
|
|
55
|
-
if (this.totalPage <= this.pageSize) {
|
|
56
|
-
this.paginationSize = [
|
|
57
|
-
...Array.from({ length: this.totalPage }, (_, i) => i + 1),
|
|
58
|
-
];
|
|
59
|
-
} else {
|
|
60
|
-
// start
|
|
61
|
-
if ($event < 6) {
|
|
62
|
-
this.start = 1;
|
|
63
|
-
} else {
|
|
64
|
-
if ($event + 5 < this.totalPage) {
|
|
65
|
-
this.start = $event - 5;
|
|
66
|
-
} else {
|
|
67
|
-
this.start = this.totalPage - this.pageSize;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
//End
|
|
71
|
-
if ($event + 5 < this.totalPage) {
|
|
72
|
-
this.end = this.start + 9;
|
|
73
|
-
} else {
|
|
74
|
-
this.end = this.totalPage;
|
|
75
|
-
}
|
|
76
|
-
this.paginationSize = this.range(this.start, this.end);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
this.paginationEvent.emit($event);
|
|
80
|
-
}
|
|
81
|
-
private range(start: number, end: number) {
|
|
82
|
-
return Array(Math.abs(start - end) + 1)
|
|
83
|
-
.fill(start)
|
|
84
|
-
.map((v, i) => v + i * (start > end ? -1 : 1));
|
|
85
|
-
}
|
|
86
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<mat-progress-bar [mode]="mode" [bufferValue]="bufferValue" [color]="color" [value]="value"></mat-progress-bar>
|
|
File without changes
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { ProgressBarComponent } from './progress-bar.component';
|
|
4
|
-
|
|
5
|
-
describe('ProgressBarComponent', () => {
|
|
6
|
-
let component: ProgressBarComponent;
|
|
7
|
-
let fixture: ComponentFixture<ProgressBarComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
declarations: [ ProgressBarComponent ]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(ProgressBarComponent);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
fixture.detectChanges();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should create', () => {
|
|
21
|
-
expect(component).toBeTruthy();
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import {Component, Input} from '@angular/core';
|
|
2
|
-
import {ThemePalette} from "@angular/material/core";
|
|
3
|
-
import {ProgressBarMode} from "@angular/material/progress-bar";
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'falcon-progress-bar',
|
|
7
|
-
templateUrl: './progress-bar.component.html',
|
|
8
|
-
styleUrls: ['./progress-bar.component.scss']
|
|
9
|
-
})
|
|
10
|
-
export class ProgressBarComponent {
|
|
11
|
-
@Input() bufferValue!: number;
|
|
12
|
-
@Input() color: ThemePalette;
|
|
13
|
-
@Input() mode!: ProgressBarMode;
|
|
14
|
-
@Input() value!: number;
|
|
15
|
-
}
|
|
File without changes
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { ProgressSpinnerComponent } from './progress-spinner.component';
|
|
4
|
-
|
|
5
|
-
describe('ProgressSpinnerComponent', () => {
|
|
6
|
-
let component: ProgressSpinnerComponent;
|
|
7
|
-
let fixture: ComponentFixture<ProgressSpinnerComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
declarations: [ ProgressSpinnerComponent ]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(ProgressSpinnerComponent);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
fixture.detectChanges();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should create', () => {
|
|
21
|
-
expect(component).toBeTruthy();
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import {Component, Input} from '@angular/core';
|
|
2
|
-
import {ThemePalette} from "@angular/material/core";
|
|
3
|
-
import {ProgressSpinnerMode} from "@angular/material/progress-spinner";
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'falcon-progress-spinner',
|
|
7
|
-
templateUrl: './progress-spinner.component.html',
|
|
8
|
-
styleUrls: ['./progress-spinner.component.scss']
|
|
9
|
-
})
|
|
10
|
-
export class ProgressSpinnerComponent {
|
|
11
|
-
@Input() diameter: number = 100;
|
|
12
|
-
@Input() color: ThemePalette;
|
|
13
|
-
@Input() mode!: ProgressSpinnerMode;
|
|
14
|
-
@Input() value!: number;
|
|
15
|
-
@Input() strokeWidth: number = 5;
|
|
16
|
-
}
|