@verisoft/ui-primeng 18.0.0
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/.eslintrc.json +43 -0
- package/README.md +7 -0
- package/jest.config.ts +22 -0
- package/ng-package.json +7 -0
- package/package.json +21 -0
- package/project.json +36 -0
- package/src/assets/.gitkeep +0 -0
- package/src/assets/fonts/orbitron-black.ttf +0 -0
- package/src/assets/fonts/orbitron-bold.otf +0 -0
- package/src/assets/icons/complex/v-logo.svg +4 -0
- package/src/assets/images/_global/elon.jpg +0 -0
- package/src/assets/images/_global/jara.png +0 -0
- package/src/assets/images/_global/logos/v-logo.webp +0 -0
- package/src/assets/sass/base/_scrollbar.scss +18 -0
- package/src/assets/sass/base/_typography.scss +25 -0
- package/src/assets/sass/layout/_app.scss +27 -0
- package/src/assets/sass/layout/_button.scss +57 -0
- package/src/assets/sass/layout/_checkbox.scss +33 -0
- package/src/assets/sass/layout/_dialog.scss +13 -0
- package/src/assets/sass/layout/_dropdown.scss +9 -0
- package/src/assets/sass/layout/_formField.scss +5 -0
- package/src/assets/sass/layout/_header.scss +63 -0
- package/src/assets/sass/layout/_icons.scss +13 -0
- package/src/assets/sass/layout/_inputSwitch.scss +13 -0
- package/src/assets/sass/layout/_layout.scss +6 -0
- package/src/assets/sass/layout/_loader.scss +9 -0
- package/src/assets/sass/layout/_radiobutton.scss +21 -0
- package/src/assets/sass/layout/_sidemenu.scss +187 -0
- package/src/assets/sass/layout/_snackbar.scss +8 -0
- package/src/assets/sass/layout/_tables.scss +5 -0
- package/src/assets/sass/layout/_tree.scss +12 -0
- package/src/assets/sass/layout/_tristatecheckbox.scss +15 -0
- package/src/assets/sass/main.scss +28 -0
- package/src/assets/sass/themes/_verisoft_theme.scss +46 -0
- package/src/assets/sass/utils/_mixins.scss +0 -0
- package/src/assets/sass/utils/_utils.scss +39 -0
- package/src/assets/sass/utils/_variables.scss +12 -0
- package/src/assets/sass/vendors/_bootstrap.scss +2 -0
- package/src/assets/sass/vendors/_primeng.scss +2 -0
- package/src/index.ts +31 -0
- package/src/lib/components/action-button-group/action-button-group.component.html +29 -0
- package/src/lib/components/action-button-group/action-button-group.component.scss +0 -0
- package/src/lib/components/action-button-group/action-button-group.component.spec.ts +21 -0
- package/src/lib/components/action-button-group/action-button-group.component.ts +104 -0
- package/src/lib/components/action-button-group/components/action-button/action-button.component.html +12 -0
- package/src/lib/components/action-button-group/components/action-button/action-button.component.scss +0 -0
- package/src/lib/components/action-button-group/components/action-button/action-button.component.spec.ts +21 -0
- package/src/lib/components/action-button-group/components/action-button/action-button.component.ts +36 -0
- package/src/lib/components/action-button-group/index.ts +2 -0
- package/src/lib/components/breadcrumb/breadcrumb.component.html +12 -0
- package/src/lib/components/breadcrumb/breadcrumb.component.scss +18 -0
- package/src/lib/components/breadcrumb/breadcrumb.component.spec.ts +21 -0
- package/src/lib/components/breadcrumb/breadcrumb.component.stories.ts +36 -0
- package/src/lib/components/breadcrumb/breadcrumb.component.ts +24 -0
- package/src/lib/components/breadcrumb/index.ts +1 -0
- package/src/lib/components/button/button.component.html +20 -0
- package/src/lib/components/button/button.component.scss +0 -0
- package/src/lib/components/button/button.component.spec.ts +21 -0
- package/src/lib/components/button/button.component.ts +43 -0
- package/src/lib/components/button/directives/shortcut.directive.ts +37 -0
- package/src/lib/components/button/index.ts +2 -0
- package/src/lib/components/calendar/calendar.component.html +53 -0
- package/src/lib/components/calendar/calendar.component.scss +0 -0
- package/src/lib/components/calendar/calendar.component.spec.ts +21 -0
- package/src/lib/components/calendar/calendar.component.ts +67 -0
- package/src/lib/components/calendar/index.ts +1 -0
- package/src/lib/components/checkbox/checkbox.component.html +19 -0
- package/src/lib/components/checkbox/checkbox.component.scss +15 -0
- package/src/lib/components/checkbox/checkbox.component.spec.ts +21 -0
- package/src/lib/components/checkbox/checkbox.component.stories.ts +72 -0
- package/src/lib/components/checkbox/checkbox.component.ts +41 -0
- package/src/lib/components/checkbox/index.ts +1 -0
- package/src/lib/components/confirm-dialog/confirm-dialog.component.html +48 -0
- package/src/lib/components/confirm-dialog/confirm-dialog.component.scss +3 -0
- package/src/lib/components/confirm-dialog/confirm-dialog.component.spec.ts +21 -0
- package/src/lib/components/confirm-dialog/confirm-dialog.component.stories.ts +74 -0
- package/src/lib/components/confirm-dialog/confirm-dialog.component.ts +74 -0
- package/src/lib/components/confirm-dialog/index.ts +2 -0
- package/src/lib/components/confirm-dialog/services/confirm-dialog.service.ts +14 -0
- package/src/lib/components/dropdown/dropdown.component.html +96 -0
- package/src/lib/components/dropdown/dropdown.component.scss +16 -0
- package/src/lib/components/dropdown/dropdown.component.spec.ts +21 -0
- package/src/lib/components/dropdown/dropdown.component.stories.ts +90 -0
- package/src/lib/components/dropdown/dropdown.component.ts +139 -0
- package/src/lib/components/dropdown/index.ts +1 -0
- package/src/lib/components/dynamic-component/dynamic-component-factory.service.ts +90 -0
- package/src/lib/components/dynamic-component/dynamic-component.component.ts +55 -0
- package/src/lib/components/filter/directives/filter-field.directive.ts +25 -0
- package/src/lib/components/filter/directives/table-filter.directive.ts +22 -0
- package/src/lib/components/filter/filter.component.html +67 -0
- package/src/lib/components/filter/filter.component.scss +0 -0
- package/src/lib/components/filter/filter.component.spec.ts +21 -0
- package/src/lib/components/filter/filter.component.stories.ts +23 -0
- package/src/lib/components/filter/filter.component.ts +257 -0
- package/src/lib/components/filter/filter.model.ts +18 -0
- package/src/lib/components/filter/index.ts +3 -0
- package/src/lib/components/form-field/form-field.component.html +41 -0
- package/src/lib/components/form-field/form-field.component.scss +0 -0
- package/src/lib/components/form-field/form-field.component.spec.ts +21 -0
- package/src/lib/components/form-field/form-field.component.stories.ts +69 -0
- package/src/lib/components/form-field/form-field.component.ts +34 -0
- package/src/lib/components/form-field/index.ts +1 -0
- package/src/lib/components/generic-field/generic-field.component.html +54 -0
- package/src/lib/components/generic-field/generic-field.component.spec.ts +21 -0
- package/src/lib/components/generic-field/generic-field.component.ts +76 -0
- package/src/lib/components/generic-field/generic-field.model.ts +9 -0
- package/src/lib/components/generic-field/index.ts +2 -0
- package/src/lib/components/generic-form/generic-form.component.html +33 -0
- package/src/lib/components/generic-form/generic-form.component.spec.ts +21 -0
- package/src/lib/components/generic-form/generic-form.component.ts +48 -0
- package/src/lib/components/generic-form/generic-form.model.spec.ts +82 -0
- package/src/lib/components/generic-form/generic-form.model.ts +76 -0
- package/src/lib/components/generic-form/index.ts +2 -0
- package/src/lib/components/header/header.component.html +85 -0
- package/src/lib/components/header/header.component.scss +0 -0
- package/src/lib/components/header/header.component.spec.ts +21 -0
- package/src/lib/components/header/header.component.stories.ts +24 -0
- package/src/lib/components/header/header.component.ts +64 -0
- package/src/lib/components/header/index.ts +2 -0
- package/src/lib/components/header/services/header-provider.service.ts +15 -0
- package/src/lib/components/input-group/index.ts +1 -0
- package/src/lib/components/input-group/input-group.component.html +32 -0
- package/src/lib/components/input-group/input-group.component.spec.ts +21 -0
- package/src/lib/components/input-group/input-group.component.ts +60 -0
- package/src/lib/components/loader/index.ts +1 -0
- package/src/lib/components/loader/loader.component.html +5 -0
- package/src/lib/components/loader/loader.component.scss +0 -0
- package/src/lib/components/loader/loader.component.spec.ts +21 -0
- package/src/lib/components/loader/loader.component.ts +17 -0
- package/src/lib/components/multiselect/index.ts +1 -0
- package/src/lib/components/multiselect/multiselect.component.html +69 -0
- package/src/lib/components/multiselect/multiselect.component.scss +0 -0
- package/src/lib/components/multiselect/multiselect.component.spec.ts +21 -0
- package/src/lib/components/multiselect/multiselect.component.ts +120 -0
- package/src/lib/components/number-input/index.ts +1 -0
- package/src/lib/components/number-input/number-input.component.html +22 -0
- package/src/lib/components/number-input/number-input.component.spec.ts +21 -0
- package/src/lib/components/number-input/number-input.component.ts +54 -0
- package/src/lib/components/page-header/index.ts +2 -0
- package/src/lib/components/page-header/page-header.component.html +31 -0
- package/src/lib/components/page-header/page-header.component.scss +0 -0
- package/src/lib/components/page-header/page-header.component.spec.ts +21 -0
- package/src/lib/components/page-header/page-header.component.ts +60 -0
- package/src/lib/components/page-header/services/page-header.service.ts +9 -0
- package/src/lib/components/password/index.ts +1 -0
- package/src/lib/components/password/password.component.html +24 -0
- package/src/lib/components/password/password.component.scss +0 -0
- package/src/lib/components/password/password.component.spec.ts +21 -0
- package/src/lib/components/password/password.component.ts +56 -0
- package/src/lib/components/radiobutton/index.ts +1 -0
- package/src/lib/components/radiobutton/radiobutton.component.html +32 -0
- package/src/lib/components/radiobutton/radiobutton.component.scss +6 -0
- package/src/lib/components/radiobutton/radiobutton.component.spec.ts +21 -0
- package/src/lib/components/radiobutton/radiobutton.component.stories.ts +71 -0
- package/src/lib/components/radiobutton/radiobutton.component.ts +60 -0
- package/src/lib/components/section/index.ts +1 -0
- package/src/lib/components/section/section.component.html +24 -0
- package/src/lib/components/section/section.component.scss +0 -0
- package/src/lib/components/section/section.component.spec.ts +21 -0
- package/src/lib/components/section/section.component.ts +30 -0
- package/src/lib/components/side-menu/index.ts +2 -0
- package/src/lib/components/side-menu/side-menu.component.html +55 -0
- package/src/lib/components/side-menu/side-menu.component.scss +0 -0
- package/src/lib/components/side-menu/side-menu.component.spec.ts +21 -0
- package/src/lib/components/side-menu/side-menu.component.ts +97 -0
- package/src/lib/components/side-menu/side-menu.module.ts +66 -0
- package/src/lib/components/slider/index.ts +1 -0
- package/src/lib/components/slider/slider.component.html +19 -0
- package/src/lib/components/slider/slider.component.spec.ts +21 -0
- package/src/lib/components/slider/slider.component.ts +56 -0
- package/src/lib/components/snackbar/index.ts +2 -0
- package/src/lib/components/snackbar/services/snackbar.service.ts +45 -0
- package/src/lib/components/snackbar/snackbar.component.html +3 -0
- package/src/lib/components/snackbar/snackbar.component.scss +0 -0
- package/src/lib/components/snackbar/snackbar.component.spec.ts +21 -0
- package/src/lib/components/snackbar/snackbar.component.stories.ts +70 -0
- package/src/lib/components/snackbar/snackbar.component.ts +26 -0
- package/src/lib/components/stepper/index.ts +1 -0
- package/src/lib/components/stepper/stepper.component.html +43 -0
- package/src/lib/components/stepper/stepper.component.spec.ts +21 -0
- package/src/lib/components/stepper/stepper.component.ts +25 -0
- package/src/lib/components/switch/index.ts +1 -0
- package/src/lib/components/switch/switch.component.html +19 -0
- package/src/lib/components/switch/switch.component.scss +0 -0
- package/src/lib/components/switch/switch.component.spec.ts +21 -0
- package/src/lib/components/switch/switch.component.stories.ts +65 -0
- package/src/lib/components/switch/switch.component.ts +52 -0
- package/src/lib/components/tab-view/index.ts +3 -0
- package/src/lib/components/tab-view/tab-view-item.component.ts +20 -0
- package/src/lib/components/tab-view/tab-view.component.html +24 -0
- package/src/lib/components/tab-view/tab-view.component.ts +50 -0
- package/src/lib/components/tab-view/tab-view.module.ts +18 -0
- package/src/lib/components/table/directives/table-store.directive.ts +61 -0
- package/src/lib/components/table/index.ts +2 -0
- package/src/lib/components/table/table.component.html +183 -0
- package/src/lib/components/table/table.component.scss +0 -0
- package/src/lib/components/table/table.component.spec.ts +21 -0
- package/src/lib/components/table/table.component.stories.ts +55 -0
- package/src/lib/components/table/table.component.ts +256 -0
- package/src/lib/components/table-filter/filter.component.html +205 -0
- package/src/lib/components/table-filter/filter.component.scss +0 -0
- package/src/lib/components/table-filter/filter.component.spec.ts +21 -0
- package/src/lib/components/table-filter/filter.component.stories.ts +23 -0
- package/src/lib/components/textarea/index.ts +1 -0
- package/src/lib/components/textarea/textarea.component.html +40 -0
- package/src/lib/components/textarea/textarea.component.scss +5 -0
- package/src/lib/components/textarea/textarea.component.spec.ts +21 -0
- package/src/lib/components/textarea/textarea.component.stories.ts +98 -0
- package/src/lib/components/textarea/textarea.component.ts +62 -0
- package/src/lib/components/textfield/index.ts +1 -0
- package/src/lib/components/textfield/textfield.component.html +83 -0
- package/src/lib/components/textfield/textfield.component.scss +23 -0
- package/src/lib/components/textfield/textfield.component.spec.ts +21 -0
- package/src/lib/components/textfield/textfield.component.stories.ts +85 -0
- package/src/lib/components/textfield/textfield.component.ts +64 -0
- package/src/lib/components/tristatecheckbox/index.ts +1 -0
- package/src/lib/components/tristatecheckbox/tristatecheckbox.component.html +23 -0
- package/src/lib/components/tristatecheckbox/tristatecheckbox.component.scss +0 -0
- package/src/lib/components/tristatecheckbox/tristatecheckbox.component.spec.ts +21 -0
- package/src/lib/components/tristatecheckbox/tristatecheckbox.component.stories.ts +22 -0
- package/src/lib/components/tristatecheckbox/tristatecheckbox.component.ts +46 -0
- package/src/lib/interceptors/http-error-message.interceptor.ts +35 -0
- package/src/lib/pages/not-found-page/not-found-page.component.html +27 -0
- package/src/lib/pages/not-found-page/not-found-page.component.scss +0 -0
- package/src/lib/pages/not-found-page/not-found-page.component.spec.ts +21 -0
- package/src/lib/pages/not-found-page/not-found-page.component.ts +17 -0
- package/src/lib/services/screen-size.service.ts +25 -0
- package/src/tab-view.ts +1 -0
- package/src/test-setup.ts +8 -0
- package/tsconfig.json +29 -0
- package/tsconfig.lib.json +18 -0
- package/tsconfig.lib.prod.json +9 -0
- package/tsconfig.spec.json +16 -0
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import { AsyncPipe } from '@angular/common';
|
|
2
|
+
import {
|
|
3
|
+
AfterContentInit,
|
|
4
|
+
ChangeDetectionStrategy,
|
|
5
|
+
ChangeDetectorRef,
|
|
6
|
+
Component,
|
|
7
|
+
ContentChildren,
|
|
8
|
+
forwardRef,
|
|
9
|
+
inject,
|
|
10
|
+
Input,
|
|
11
|
+
OnChanges,
|
|
12
|
+
OnInit,
|
|
13
|
+
QueryList,
|
|
14
|
+
SimpleChanges,
|
|
15
|
+
} from '@angular/core';
|
|
16
|
+
import {
|
|
17
|
+
ControlValueAccessor,
|
|
18
|
+
FormGroup,
|
|
19
|
+
NG_VALUE_ACCESSOR,
|
|
20
|
+
ReactiveFormsModule,
|
|
21
|
+
} from '@angular/forms';
|
|
22
|
+
import { BaseHttpService } from '@verisoft/core';
|
|
23
|
+
import {
|
|
24
|
+
DEFAULT_DEBOUNCE_TIME,
|
|
25
|
+
FieldSize,
|
|
26
|
+
UnsubscribeComponent,
|
|
27
|
+
} from '@verisoft/ui-core';
|
|
28
|
+
import { BadgeModule } from 'primeng/badge';
|
|
29
|
+
import {
|
|
30
|
+
BehaviorSubject,
|
|
31
|
+
combineLatestWith,
|
|
32
|
+
debounceTime,
|
|
33
|
+
map,
|
|
34
|
+
Observable,
|
|
35
|
+
startWith,
|
|
36
|
+
takeUntil,
|
|
37
|
+
} from 'rxjs';
|
|
38
|
+
import { ScreenSizeService } from '../../services/screen-size.service';
|
|
39
|
+
import { ButtonComponent, ButtonShortCutDirective } from '../button';
|
|
40
|
+
import { DialogService } from '../confirm-dialog';
|
|
41
|
+
import {
|
|
42
|
+
generateFormGroup,
|
|
43
|
+
GenericFieldDefinition,
|
|
44
|
+
GenericFormComponent,
|
|
45
|
+
} from '../generic-form';
|
|
46
|
+
import { TextfieldComponent } from '../textfield';
|
|
47
|
+
import { FilterFieldDirective } from './directives/filter-field.directive';
|
|
48
|
+
import { getFilledControlCount } from './filter.model';
|
|
49
|
+
|
|
50
|
+
type FilterValueType = { [key: string]: unknown };
|
|
51
|
+
|
|
52
|
+
@Component({
|
|
53
|
+
selector: 'v-filter',
|
|
54
|
+
standalone: true,
|
|
55
|
+
imports: [
|
|
56
|
+
AsyncPipe,
|
|
57
|
+
ReactiveFormsModule,
|
|
58
|
+
BadgeModule,
|
|
59
|
+
TextfieldComponent,
|
|
60
|
+
GenericFormComponent,
|
|
61
|
+
ButtonComponent,
|
|
62
|
+
ButtonShortCutDirective,
|
|
63
|
+
],
|
|
64
|
+
providers: [
|
|
65
|
+
{
|
|
66
|
+
provide: NG_VALUE_ACCESSOR,
|
|
67
|
+
useExisting: forwardRef(() => FilterComponent),
|
|
68
|
+
multi: true,
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
templateUrl: './filter.component.html',
|
|
72
|
+
styleUrl: './filter.component.scss',
|
|
73
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
74
|
+
})
|
|
75
|
+
export class FilterComponent<T extends object>
|
|
76
|
+
extends UnsubscribeComponent
|
|
77
|
+
implements OnChanges, OnInit, AfterContentInit, ControlValueAccessor
|
|
78
|
+
{
|
|
79
|
+
@ContentChildren(FilterFieldDirective)
|
|
80
|
+
fieldDeclarations!: QueryList<FilterFieldDirective>;
|
|
81
|
+
|
|
82
|
+
@Input() fields: GenericFieldDefinition[] = [];
|
|
83
|
+
|
|
84
|
+
@Input() title?: string;
|
|
85
|
+
|
|
86
|
+
@Input() fulltextFieldName = 'searchField';
|
|
87
|
+
|
|
88
|
+
@Input() showFulltext = true;
|
|
89
|
+
|
|
90
|
+
@Input() showFilters = true;
|
|
91
|
+
|
|
92
|
+
@Input() autoBind = true;
|
|
93
|
+
|
|
94
|
+
@Input() debounceTime?: number = DEFAULT_DEBOUNCE_TIME;
|
|
95
|
+
|
|
96
|
+
fieldDefinitios$?: Observable<GenericFieldDefinition[]>;
|
|
97
|
+
|
|
98
|
+
filledFiltersCount$?: Observable<string>;
|
|
99
|
+
|
|
100
|
+
formGroup$?: Observable<FormGroup>;
|
|
101
|
+
|
|
102
|
+
simpleFormFieldDefinitions$?: Observable<GenericFieldDefinition[]>;
|
|
103
|
+
|
|
104
|
+
private searchField: GenericFieldDefinition = {
|
|
105
|
+
name: this.fulltextFieldName,
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
private onTouch?: () => void;
|
|
109
|
+
|
|
110
|
+
private onChange?: (value: FilterValueType) => void;
|
|
111
|
+
|
|
112
|
+
private inputFields$ = new BehaviorSubject<
|
|
113
|
+
GenericFieldDefinition[] | undefined
|
|
114
|
+
>(this.fields);
|
|
115
|
+
|
|
116
|
+
FieldSize = FieldSize;
|
|
117
|
+
|
|
118
|
+
protected screenSizeService = inject(ScreenSizeService);
|
|
119
|
+
protected changeDetectorRef = inject(ChangeDetectorRef);
|
|
120
|
+
protected dialogService = inject(DialogService);
|
|
121
|
+
|
|
122
|
+
service!: BaseHttpService<T>;
|
|
123
|
+
|
|
124
|
+
formGroup = new FormGroup({});
|
|
125
|
+
|
|
126
|
+
private lastFormFields: GenericFieldDefinition[] = [];
|
|
127
|
+
|
|
128
|
+
ngOnInit(): void {
|
|
129
|
+
this.formGroup.valueChanges
|
|
130
|
+
.pipe(
|
|
131
|
+
takeUntil(this.destroyed$),
|
|
132
|
+
debounceTime(this.debounceTime ?? DEFAULT_DEBOUNCE_TIME)
|
|
133
|
+
)
|
|
134
|
+
.subscribe((value) => this.onChange?.(value));
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
ngOnChanges(changes: SimpleChanges): void {
|
|
138
|
+
if (changes['fields']) {
|
|
139
|
+
this.inputFields$.next(this.fields);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
ngAfterContentInit(): void {
|
|
144
|
+
const fieldDeclaratios$: Observable<GenericFieldDefinition[]> =
|
|
145
|
+
this.fieldDeclarations.changes.pipe(
|
|
146
|
+
startWith({}),
|
|
147
|
+
map(() => this.fieldDeclarations.toArray())
|
|
148
|
+
);
|
|
149
|
+
|
|
150
|
+
this.fieldDefinitios$ = this.inputFields$.pipe(
|
|
151
|
+
combineLatestWith(fieldDeclaratios$),
|
|
152
|
+
map(([inputs, views]) => {
|
|
153
|
+
this.searchField.name = this.fulltextFieldName;
|
|
154
|
+
this.lastFormFields = [this.searchField, ...(inputs ?? []), ...views];
|
|
155
|
+
return this.lastFormFields;
|
|
156
|
+
})
|
|
157
|
+
);
|
|
158
|
+
|
|
159
|
+
this.simpleFormFieldDefinitions$ = this.fieldDefinitios$.pipe(
|
|
160
|
+
map((fields) => {
|
|
161
|
+
return fields
|
|
162
|
+
.filter((x) => x.name !== this.fulltextFieldName)
|
|
163
|
+
.map((x) => ({ ...x, floatLabel: true, size: FieldSize.large }));
|
|
164
|
+
})
|
|
165
|
+
);
|
|
166
|
+
|
|
167
|
+
this.formGroup$ = this.fieldDefinitios$.pipe(
|
|
168
|
+
map((fields) =>
|
|
169
|
+
generateFormGroup(fields, this.formGroup, undefined, false)
|
|
170
|
+
)
|
|
171
|
+
);
|
|
172
|
+
|
|
173
|
+
this.filledFiltersCount$ = this.formGroup$.pipe(
|
|
174
|
+
map((formGroup: FormGroup) => getFilledControlCount(formGroup).toString())
|
|
175
|
+
);
|
|
176
|
+
|
|
177
|
+
this.changeDetectorRef.detectChanges();
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
protected openFilter() {
|
|
181
|
+
const fields = this.lastFormFields.map((x) => ({
|
|
182
|
+
...x,
|
|
183
|
+
label:
|
|
184
|
+
x.name === this.fulltextFieldName ? 'Full Text' : x.label || x.name,
|
|
185
|
+
}));
|
|
186
|
+
|
|
187
|
+
const formGroup = generateFormGroup(
|
|
188
|
+
this.lastFormFields,
|
|
189
|
+
undefined,
|
|
190
|
+
undefined,
|
|
191
|
+
false
|
|
192
|
+
);
|
|
193
|
+
formGroup.patchValue(this.formGroup.value);
|
|
194
|
+
this.dialogService.showDialog({
|
|
195
|
+
headerIcon: 'pi pi-filter',
|
|
196
|
+
severity: 'primary',
|
|
197
|
+
componentType: GenericFormComponent,
|
|
198
|
+
data: {
|
|
199
|
+
formGroup,
|
|
200
|
+
fields: fields,
|
|
201
|
+
columns: 1,
|
|
202
|
+
},
|
|
203
|
+
confirmButtonFn: () => this.setFilterValues(formGroup),
|
|
204
|
+
confirmButtonText: 'Apply',
|
|
205
|
+
cancelButtonFn: () => this.clear(),
|
|
206
|
+
cancelButtonText: 'Clear all',
|
|
207
|
+
showCancelButton: true,
|
|
208
|
+
closable: false,
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
protected openSearch() {
|
|
213
|
+
this.dialogService.showDialog({
|
|
214
|
+
headerIcon: 'pi pi-search',
|
|
215
|
+
severity: 'primary',
|
|
216
|
+
innerHTML: 'hovno',
|
|
217
|
+
confirmButtonFn: () => this.submitValue(),
|
|
218
|
+
confirmButtonText: 'Apply',
|
|
219
|
+
cancelButtonFn: () => this.clear(),
|
|
220
|
+
cancelButtonText: 'Clear all',
|
|
221
|
+
showCancelButton: true,
|
|
222
|
+
closable: false,
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
writeValue(data: FilterValueType): void {
|
|
227
|
+
this.formGroup.patchValue(data);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
registerOnChange(fn: (value: FilterValueType) => void): void {
|
|
231
|
+
this.onChange = fn;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
registerOnTouched(fn: () => void): void {
|
|
235
|
+
this.onTouch = fn;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
setDisabledState?(isDisabled: boolean): void {
|
|
239
|
+
isDisabled ? this.formGroup.disable() : this.formGroup.enable();
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
submitValue() {
|
|
243
|
+
if (!this.autoBind) {
|
|
244
|
+
this.onChange?.(this.formGroup.value);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
setFilterValues(dialogFormGroup: FormGroup) {
|
|
249
|
+
this.formGroup.setValue(dialogFormGroup.value);
|
|
250
|
+
this.submitValue();
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
clear() {
|
|
254
|
+
this.formGroup.reset();
|
|
255
|
+
this.submitValue();
|
|
256
|
+
}
|
|
257
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FormGroup } from "@angular/forms";
|
|
2
|
+
|
|
3
|
+
export function getFilledControlCount(formGroup: FormGroup){
|
|
4
|
+
let count = 0;
|
|
5
|
+
Object.keys(formGroup.controls).forEach((key) => {
|
|
6
|
+
const control = formGroup.get(key);
|
|
7
|
+
if (control?.value) {
|
|
8
|
+
if (typeof control.value === 'boolean') {
|
|
9
|
+
count++;
|
|
10
|
+
}
|
|
11
|
+
if (typeof control.value === 'string' && control.value.trim() !== '') {
|
|
12
|
+
count++;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
return count;
|
|
18
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<div class="v-form-field mt-3" [attr.data-testId]="testId">
|
|
2
|
+
<div [ngClass]="{ 'd-block d-md-flex': display === 'flex', 'd-lg-flex': display === 'block' }">
|
|
3
|
+
<div class="col-12 col-md-4 d-flex align-items-center">
|
|
4
|
+
<label
|
|
5
|
+
class="v-formfield-label d-flex align-items-center"
|
|
6
|
+
[ngClass]="{
|
|
7
|
+
'pb-2': display === 'block',
|
|
8
|
+
'text-error': (ngControl?.errors | error) && ngControl?.dirty,
|
|
9
|
+
'text-warning': (ngControl?.errors | warning) && ngControl?.dirty,
|
|
10
|
+
'text-default': !ngControl?.invalid && !ngControl?.dirty,
|
|
11
|
+
'text-secondary': !ngControl?.invalid && ngControl?.dirty
|
|
12
|
+
}"
|
|
13
|
+
>{{ label }}<span *ngIf="label">:</span>
|
|
14
|
+
<span *ngIf="required" class="text-error ps-1">*</span>
|
|
15
|
+
</label>
|
|
16
|
+
<i *ngIf="tooltip"
|
|
17
|
+
[pTooltip]="tooltip"
|
|
18
|
+
class="ps-2 text-default v-tooltip pi pi-info-circle"
|
|
19
|
+
></i>
|
|
20
|
+
</div>
|
|
21
|
+
<div
|
|
22
|
+
class="col-sm-12 col-md-8 col-lg-8"
|
|
23
|
+
>
|
|
24
|
+
<div
|
|
25
|
+
class="v-form-field-content align-items-center w-100"
|
|
26
|
+
[ngClass]="{ 'd-flex': display === 'flex', 'd-block': display === 'block', 'input-warning': ngControl?.errors | warning }"
|
|
27
|
+
>
|
|
28
|
+
<ng-content></ng-content>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="align-content-center">
|
|
32
|
+
<ng-container *ngIf="ngControl?.invalid && ngControl?.dirty">
|
|
33
|
+
<i
|
|
34
|
+
[pTooltip]="(ngControl?.errors | error) || (ngControl?.errors | warning)"
|
|
35
|
+
[ngClass]="{ 'text-error': ngControl?.errors | error, 'text-warning': ngControl?.errors | warning }"
|
|
36
|
+
class="pi pi-times-circle"
|
|
37
|
+
></i>
|
|
38
|
+
</ng-container>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
File without changes
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
import { FormFieldComponent } from './form-field.component';
|
|
3
|
+
|
|
4
|
+
describe('FormFieldComponent', () => {
|
|
5
|
+
let component: FormFieldComponent;
|
|
6
|
+
let fixture: ComponentFixture<FormFieldComponent>;
|
|
7
|
+
|
|
8
|
+
beforeEach(async () => {
|
|
9
|
+
await TestBed.configureTestingModule({
|
|
10
|
+
imports: [FormFieldComponent],
|
|
11
|
+
}).compileComponents();
|
|
12
|
+
|
|
13
|
+
fixture = TestBed.createComponent(FormFieldComponent);
|
|
14
|
+
component = fixture.componentInstance;
|
|
15
|
+
fixture.detectChanges();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('should create', () => {
|
|
19
|
+
expect(component).toBeTruthy();
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { NgControl } from '@angular/forms';
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/angular';
|
|
3
|
+
import { within, expect } from '@storybook/test';
|
|
4
|
+
import { FormFieldComponent } from './form-field.component';
|
|
5
|
+
|
|
6
|
+
const meta: Meta<FormFieldComponent> = {
|
|
7
|
+
component: FormFieldComponent,
|
|
8
|
+
title: 'FormFieldComponent',
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<FormFieldComponent>;
|
|
12
|
+
|
|
13
|
+
export const Primary: Story = {
|
|
14
|
+
parameters: {
|
|
15
|
+
controls: { expanded: true },
|
|
16
|
+
},
|
|
17
|
+
args: {
|
|
18
|
+
label: 'Label showcase',
|
|
19
|
+
tooltip: 'This is a tooltip lorem ipsum',
|
|
20
|
+
required: false,
|
|
21
|
+
testId: '123',
|
|
22
|
+
display: 'flex',
|
|
23
|
+
ngControl: {} as NgControl,
|
|
24
|
+
},
|
|
25
|
+
argTypes: {
|
|
26
|
+
ngControl: {
|
|
27
|
+
control: false,
|
|
28
|
+
description: 'NgControl which is provided from a form component',
|
|
29
|
+
},
|
|
30
|
+
display: {
|
|
31
|
+
options: ['flex', 'block'],
|
|
32
|
+
control: {
|
|
33
|
+
type: 'radio',
|
|
34
|
+
},
|
|
35
|
+
description:
|
|
36
|
+
'Defines if the **FormFieldComponent** is in `flex` or `block` display mode',
|
|
37
|
+
},
|
|
38
|
+
required: {
|
|
39
|
+
control: {
|
|
40
|
+
type: 'boolean',
|
|
41
|
+
},
|
|
42
|
+
description: 'Defines if the **FormFieldComponent** is `required`',
|
|
43
|
+
},
|
|
44
|
+
testId: {
|
|
45
|
+
control: {
|
|
46
|
+
type: 'text',
|
|
47
|
+
},
|
|
48
|
+
description: 'Sets the **FormFieldComponent** `test id`',
|
|
49
|
+
},
|
|
50
|
+
label: {
|
|
51
|
+
control: {
|
|
52
|
+
type: 'text',
|
|
53
|
+
},
|
|
54
|
+
description: 'Sets the **FormFieldComponent** `label`',
|
|
55
|
+
},
|
|
56
|
+
tooltip: {
|
|
57
|
+
control: {
|
|
58
|
+
type: 'text',
|
|
59
|
+
},
|
|
60
|
+
description: 'Sets the **FormFieldComponent** `tooltip`',
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
play: async ({ canvasElement }: any) => {
|
|
64
|
+
const canvas = within(canvasElement);
|
|
65
|
+
expect(canvas.getByText('Label showcase')).toBeTruthy();
|
|
66
|
+
expect(canvas.queryAllByText('This is a tooltip lorem ipsum')).toBeTruthy();
|
|
67
|
+
expect(canvas.findByTestId('123')).toBeTruthy();
|
|
68
|
+
},
|
|
69
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { Component, Input } from '@angular/core';
|
|
3
|
+
import { NgControl, ReactiveFormsModule } from '@angular/forms';
|
|
4
|
+
import { ErrorPipe, FormFieldCore, WarningPipe } from '@verisoft/ui-core';
|
|
5
|
+
import { MessageModule } from 'primeng/message';
|
|
6
|
+
import { TooltipModule } from 'primeng/tooltip';
|
|
7
|
+
|
|
8
|
+
@Component({
|
|
9
|
+
selector: 'v-form-field',
|
|
10
|
+
standalone: true,
|
|
11
|
+
imports: [
|
|
12
|
+
CommonModule,
|
|
13
|
+
ErrorPipe,
|
|
14
|
+
WarningPipe,
|
|
15
|
+
ReactiveFormsModule,
|
|
16
|
+
MessageModule,
|
|
17
|
+
TooltipModule,
|
|
18
|
+
],
|
|
19
|
+
templateUrl: './form-field.component.html',
|
|
20
|
+
styleUrl: './form-field.component.scss',
|
|
21
|
+
})
|
|
22
|
+
export class FormFieldComponent implements FormFieldCore {
|
|
23
|
+
@Input() ngControl?: NgControl;
|
|
24
|
+
|
|
25
|
+
@Input() label?: string;
|
|
26
|
+
|
|
27
|
+
@Input() tooltip?: string;
|
|
28
|
+
|
|
29
|
+
@Input() required = false;
|
|
30
|
+
|
|
31
|
+
@Input() testId?: string;
|
|
32
|
+
|
|
33
|
+
@Input() display: 'flex' | 'block' = 'flex';
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './form-field.component';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
@if (!type || type === fieldTypes.text) {
|
|
2
|
+
<v-textfield
|
|
3
|
+
[label]="label"
|
|
4
|
+
[floatLabel]="floatLabel === true"
|
|
5
|
+
[size]="size"
|
|
6
|
+
[formControl]="formControl"
|
|
7
|
+
></v-textfield>
|
|
8
|
+
} @if (type === fieldTypes.dropdown) {
|
|
9
|
+
<v-dropdown
|
|
10
|
+
[label]="!floatLabel ? label : ''"
|
|
11
|
+
[floatLabel]="floatLabel ? label : ''"
|
|
12
|
+
[testId]="testId"
|
|
13
|
+
[options]="options"
|
|
14
|
+
[optionLabel]="optionLabel"
|
|
15
|
+
[optionValue]="optionValue ?? optionLabel"
|
|
16
|
+
[loading]="loading"
|
|
17
|
+
[formControl]="formControl"
|
|
18
|
+
(changeEvent)="changed.emit($event)"
|
|
19
|
+
(clearEvent)="cleared.emit($event)"
|
|
20
|
+
(lazyLoadEvent)="lazyLoad.emit($any($event))"
|
|
21
|
+
(showEvent)="showed.emit($event)"
|
|
22
|
+
>
|
|
23
|
+
</v-dropdown>
|
|
24
|
+
} @else if (type === fieldTypes.multiselect) {
|
|
25
|
+
<v-multiselect
|
|
26
|
+
[label]="!floatLabel ? label : ''"
|
|
27
|
+
[floatLabel]="floatLabel ? label : ''"
|
|
28
|
+
[testId]="testId"
|
|
29
|
+
[options]="options"
|
|
30
|
+
[optionLabel]="optionLabel"
|
|
31
|
+
[optionValue]="optionValue ?? optionLabel"
|
|
32
|
+
[loading]="loading"
|
|
33
|
+
[formControl]="formControl"
|
|
34
|
+
(changeEvent)="changed.emit($event)"
|
|
35
|
+
(clearEvent)="cleared.emit($event)"
|
|
36
|
+
(lazyLoadEvent)="lazyLoad.emit($any($event))"
|
|
37
|
+
(showEvent)="showed.emit($event)"
|
|
38
|
+
>
|
|
39
|
+
</v-multiselect>
|
|
40
|
+
} @else if (type === fieldTypes.checkbox) {
|
|
41
|
+
<v-tristatecheckbox
|
|
42
|
+
[label]="label"
|
|
43
|
+
[testId]="testId"
|
|
44
|
+
[formControl]="formControl"
|
|
45
|
+
></v-tristatecheckbox>
|
|
46
|
+
} @else if (type === fieldTypes.calendar) {
|
|
47
|
+
<v-calendar
|
|
48
|
+
[label]="!floatLabel ? label : ''"
|
|
49
|
+
[floatLabel]="floatLabel ? label : ''"
|
|
50
|
+
[testId]="testId"
|
|
51
|
+
[formControl]="formControl"
|
|
52
|
+
icon="pi pi-calendar"
|
|
53
|
+
></v-calendar>
|
|
54
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
import { GenericFieldComponent } from './generic-field.component';
|
|
3
|
+
|
|
4
|
+
describe('GenericFieldComponent', () => {
|
|
5
|
+
let component: GenericFieldComponent<string>;
|
|
6
|
+
let fixture: ComponentFixture<GenericFieldComponent<string>>;
|
|
7
|
+
|
|
8
|
+
beforeEach(async () => {
|
|
9
|
+
await TestBed.configureTestingModule({
|
|
10
|
+
imports: [GenericFieldComponent],
|
|
11
|
+
}).compileComponents();
|
|
12
|
+
|
|
13
|
+
fixture = TestBed.createComponent(GenericFieldComponent<string>);
|
|
14
|
+
component = fixture.componentInstance;
|
|
15
|
+
fixture.detectChanges();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('should create', () => {
|
|
19
|
+
expect(component).toBeTruthy();
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChangeDetectionStrategy,
|
|
3
|
+
Component,
|
|
4
|
+
EventEmitter,
|
|
5
|
+
Input,
|
|
6
|
+
Output,
|
|
7
|
+
} from '@angular/core';
|
|
8
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
9
|
+
import {
|
|
10
|
+
FilterEvent,
|
|
11
|
+
LazyLoadEvent,
|
|
12
|
+
} from '@verisoft/core';
|
|
13
|
+
import {
|
|
14
|
+
BaseFormInputComponent,
|
|
15
|
+
FieldSize,
|
|
16
|
+
FieldSizeType,
|
|
17
|
+
GENERIC_FIELD_COMPONENT_TOKEN,
|
|
18
|
+
GenericFieldCore,
|
|
19
|
+
} from '@verisoft/ui-core';
|
|
20
|
+
import { CalendarComponent } from '../calendar/calendar.component';
|
|
21
|
+
import { DropdownComponent } from '../dropdown';
|
|
22
|
+
import { MultiselectComponent } from '../multiselect/multiselect.component';
|
|
23
|
+
import { TextfieldComponent } from '../textfield/textfield.component';
|
|
24
|
+
import { TristatecheckboxComponent } from '../tristatecheckbox';
|
|
25
|
+
import { GenericFieldType, GenericFieldTypeType } from './generic-field.model';
|
|
26
|
+
|
|
27
|
+
@Component({
|
|
28
|
+
selector: 'v-generic-field',
|
|
29
|
+
standalone: true,
|
|
30
|
+
imports: [
|
|
31
|
+
DropdownComponent,
|
|
32
|
+
CalendarComponent,
|
|
33
|
+
TristatecheckboxComponent,
|
|
34
|
+
MultiselectComponent,
|
|
35
|
+
TextfieldComponent,
|
|
36
|
+
ReactiveFormsModule,
|
|
37
|
+
],
|
|
38
|
+
providers: [
|
|
39
|
+
{
|
|
40
|
+
provide: GENERIC_FIELD_COMPONENT_TOKEN,
|
|
41
|
+
useExisting: GenericFieldComponent,
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
templateUrl: './generic-field.component.html',
|
|
45
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
46
|
+
})
|
|
47
|
+
export class GenericFieldComponent<T>
|
|
48
|
+
extends BaseFormInputComponent
|
|
49
|
+
implements GenericFieldCore<T>
|
|
50
|
+
{
|
|
51
|
+
@Input() type?: GenericFieldTypeType = GenericFieldType.text;
|
|
52
|
+
|
|
53
|
+
@Input() floatLabel?: boolean;
|
|
54
|
+
|
|
55
|
+
@Input() optionLabel?: string;
|
|
56
|
+
|
|
57
|
+
@Input() optionValue?: string;
|
|
58
|
+
|
|
59
|
+
@Input() options?: T[];
|
|
60
|
+
|
|
61
|
+
@Input() size?: FieldSizeType = FieldSize.medium;
|
|
62
|
+
|
|
63
|
+
@Input() loading = false;
|
|
64
|
+
|
|
65
|
+
@Input() lazy = false;
|
|
66
|
+
|
|
67
|
+
@Input() filter = true;
|
|
68
|
+
|
|
69
|
+
@Output() changed = new EventEmitter<any>();
|
|
70
|
+
@Output() showed = new EventEmitter<any>();
|
|
71
|
+
@Output() cleared = new EventEmitter<any>();
|
|
72
|
+
@Output() lazyLoad = new EventEmitter<LazyLoadEvent>();
|
|
73
|
+
@Output() filtered = new EventEmitter<FilterEvent>();
|
|
74
|
+
|
|
75
|
+
fieldTypes = GenericFieldType;
|
|
76
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
@if (formGroupComputed) {
|
|
2
|
+
<div class="v-generic-form row" [formGroup]="formGroupComputed">
|
|
3
|
+
@for(field of fields; track field){ @if (columnClass) {
|
|
4
|
+
<div class="v-generic-form__column {{ columnClass }}">
|
|
5
|
+
<v-generic-field
|
|
6
|
+
[type]="field.type"
|
|
7
|
+
[label]="field.label"
|
|
8
|
+
[floatLabel]="field.floatLabel"
|
|
9
|
+
[testId]="field.testId"
|
|
10
|
+
[options]="field.options"
|
|
11
|
+
[optionLabel]="field.optionLabel"
|
|
12
|
+
[optionValue]="field.optionValue ?? field.optionLabel"
|
|
13
|
+
[options]="field.options"
|
|
14
|
+
[size]="field.size"
|
|
15
|
+
[formControlName]="field.name"
|
|
16
|
+
></v-generic-field>
|
|
17
|
+
</div>
|
|
18
|
+
} @else {
|
|
19
|
+
<v-generic-field
|
|
20
|
+
[type]="field.type"
|
|
21
|
+
[label]="field.label"
|
|
22
|
+
[floatLabel]="field.floatLabel"
|
|
23
|
+
[testId]="field.testId"
|
|
24
|
+
[options]="field.options"
|
|
25
|
+
[optionLabel]="field.optionLabel"
|
|
26
|
+
[optionValue]="field.optionValue ?? field.optionLabel"
|
|
27
|
+
[options]="field.options"
|
|
28
|
+
[size]="field.size"
|
|
29
|
+
[formControlName]="field.name"
|
|
30
|
+
></v-generic-field>
|
|
31
|
+
} }
|
|
32
|
+
</div>
|
|
33
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
import { GenericFormComponent } from './generic-form.component';
|
|
3
|
+
|
|
4
|
+
describe('GenericFormComponent', () => {
|
|
5
|
+
let component: GenericFormComponent;
|
|
6
|
+
let fixture: ComponentFixture<GenericFormComponent>;
|
|
7
|
+
|
|
8
|
+
beforeEach(async () => {
|
|
9
|
+
await TestBed.configureTestingModule({
|
|
10
|
+
imports: [GenericFormComponent],
|
|
11
|
+
}).compileComponents();
|
|
12
|
+
|
|
13
|
+
fixture = TestBed.createComponent(GenericFormComponent);
|
|
14
|
+
component = fixture.componentInstance;
|
|
15
|
+
fixture.detectChanges();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('should create', () => {
|
|
19
|
+
expect(component).toBeTruthy();
|
|
20
|
+
});
|
|
21
|
+
});
|