@verisoft/ui-primeng 20.1.1 → 20.1.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/fesm2022/verisoft-ui-primeng.mjs +3005 -0
- package/fesm2022/verisoft-ui-primeng.mjs.map +1 -0
- package/index.d.ts +752 -0
- package/package.json +18 -6
- package/.eslintrc.json +0 -43
- package/assets/.gitkeep +0 -0
- package/jest.config.ts +0 -22
- package/ng-package.json +0 -14
- package/project.json +0 -36
- package/src/index.ts +0 -34
- package/src/lib/components/breadcrumb/breadcrumb.component.html +0 -11
- package/src/lib/components/breadcrumb/breadcrumb.component.scss +0 -18
- package/src/lib/components/breadcrumb/breadcrumb.component.spec.ts +0 -21
- package/src/lib/components/breadcrumb/breadcrumb.component.stories.ts +0 -36
- package/src/lib/components/breadcrumb/breadcrumb.component.ts +0 -27
- package/src/lib/components/breadcrumb/breadcrumb.pipe.ts +0 -13
- package/src/lib/components/breadcrumb/index.ts +0 -1
- package/src/lib/components/button/button-severity.pipe.ts +0 -20
- package/src/lib/components/button/button.component.html +0 -20
- package/src/lib/components/button/button.component.scss +0 -0
- package/src/lib/components/button/button.component.spec.ts +0 -21
- package/src/lib/components/button/button.component.ts +0 -49
- package/src/lib/components/button/index.ts +0 -1
- package/src/lib/components/calendar/calendar.component.html +0 -53
- package/src/lib/components/calendar/calendar.component.scss +0 -0
- package/src/lib/components/calendar/calendar.component.spec.ts +0 -21
- package/src/lib/components/calendar/calendar.component.ts +0 -70
- package/src/lib/components/calendar/index.ts +0 -1
- package/src/lib/components/checkbox/checkbox.component.html +0 -20
- package/src/lib/components/checkbox/checkbox.component.scss +0 -15
- package/src/lib/components/checkbox/checkbox.component.spec.ts +0 -21
- package/src/lib/components/checkbox/checkbox.component.stories.ts +0 -72
- package/src/lib/components/checkbox/checkbox.component.ts +0 -46
- package/src/lib/components/checkbox/index.ts +0 -1
- package/src/lib/components/confirm-dialog/confirm-dialog.component.html +0 -51
- package/src/lib/components/confirm-dialog/confirm-dialog.component.scss +0 -3
- package/src/lib/components/confirm-dialog/confirm-dialog.component.spec.ts +0 -21
- package/src/lib/components/confirm-dialog/confirm-dialog.component.stories.ts +0 -74
- package/src/lib/components/confirm-dialog/confirm-dialog.component.ts +0 -73
- package/src/lib/components/confirm-dialog/index.ts +0 -1
- package/src/lib/components/dropdown/dropdown.component.html +0 -93
- package/src/lib/components/dropdown/dropdown.component.scss +0 -16
- package/src/lib/components/dropdown/dropdown.component.spec.ts +0 -21
- package/src/lib/components/dropdown/dropdown.component.ts +0 -139
- package/src/lib/components/dropdown/index.ts +0 -1
- package/src/lib/components/dropdown-button/dropdown-button.component.html +0 -1
- package/src/lib/components/dropdown-button/dropdown-button.component.ts +0 -20
- package/src/lib/components/dropdown-button/index.ts +0 -1
- package/src/lib/components/errors/error.component.html +0 -7
- package/src/lib/components/errors/error.component.scss +0 -3
- package/src/lib/components/errors/error.component.ts +0 -34
- package/src/lib/components/errors/index.ts +0 -1
- package/src/lib/components/feature-list/directives/feature-list-column.directive.ts +0 -32
- package/src/lib/components/feature-list/directives/feature-list-filter-field.directive.ts +0 -8
- package/src/lib/components/feature-list/feature-list-filter.pipe.ts +0 -21
- package/src/lib/components/feature-list/feature-list-page.component.ts +0 -32
- package/src/lib/components/feature-list/feature-list-page.model.ts +0 -42
- package/src/lib/components/feature-list/feature-list.component.html +0 -59
- package/src/lib/components/feature-list/feature-list.component.scss +0 -10
- package/src/lib/components/feature-list/feature-list.component.ts +0 -341
- package/src/lib/components/feature-list/index.ts +0 -5
- package/src/lib/components/filter/directives/filter-field.directive.ts +0 -34
- package/src/lib/components/filter/filter.component.html +0 -68
- package/src/lib/components/filter/filter.component.scss +0 -0
- package/src/lib/components/filter/filter.component.spec.ts +0 -21
- package/src/lib/components/filter/filter.component.stories.ts +0 -23
- package/src/lib/components/filter/filter.component.ts +0 -281
- package/src/lib/components/filter/filter.model.ts +0 -18
- package/src/lib/components/filter/index.ts +0 -2
- package/src/lib/components/form-field/form-field.component.html +0 -42
- package/src/lib/components/form-field/form-field.component.scss +0 -0
- package/src/lib/components/form-field/form-field.component.spec.ts +0 -21
- package/src/lib/components/form-field/form-field.component.stories.ts +0 -69
- package/src/lib/components/form-field/form-field.component.ts +0 -37
- package/src/lib/components/form-field/index.ts +0 -1
- package/src/lib/components/header/header.component.html +0 -84
- package/src/lib/components/header/header.component.scss +0 -0
- package/src/lib/components/header/header.component.spec.ts +0 -21
- package/src/lib/components/header/header.component.stories.ts +0 -24
- package/src/lib/components/header/header.component.ts +0 -65
- package/src/lib/components/header/index.ts +0 -2
- package/src/lib/components/header/services/header-provider.service.ts +0 -15
- package/src/lib/components/icon/icon.component.html +0 -2
- package/src/lib/components/icon/icon.component.scss +0 -51
- package/src/lib/components/icon/icon.component.ts +0 -86
- package/src/lib/components/icon/index.ts +0 -2
- package/src/lib/components/input-group/index.ts +0 -1
- package/src/lib/components/input-group/input-group.component.html +0 -34
- package/src/lib/components/input-group/input-group.component.spec.ts +0 -21
- package/src/lib/components/input-group/input-group.component.ts +0 -58
- package/src/lib/components/loader/index.ts +0 -1
- package/src/lib/components/loader/loader.component.html +0 -5
- package/src/lib/components/loader/loader.component.scss +0 -0
- package/src/lib/components/loader/loader.component.spec.ts +0 -21
- package/src/lib/components/loader/loader.component.ts +0 -16
- package/src/lib/components/multiselect/index.ts +0 -1
- package/src/lib/components/multiselect/multiselect.component.html +0 -67
- package/src/lib/components/multiselect/multiselect.component.scss +0 -0
- package/src/lib/components/multiselect/multiselect.component.spec.ts +0 -21
- package/src/lib/components/multiselect/multiselect.component.ts +0 -120
- package/src/lib/components/number-input/index.ts +0 -1
- package/src/lib/components/number-input/number-input.component.html +0 -22
- package/src/lib/components/number-input/number-input.component.spec.ts +0 -21
- package/src/lib/components/number-input/number-input.component.ts +0 -55
- package/src/lib/components/page-header/index.ts +0 -1
- package/src/lib/components/page-header/page-header.component.html +0 -35
- package/src/lib/components/page-header/page-header.component.scss +0 -0
- package/src/lib/components/page-header/page-header.component.spec.ts +0 -21
- package/src/lib/components/page-header/page-header.component.ts +0 -31
- package/src/lib/components/password/index.ts +0 -1
- package/src/lib/components/password/password.component.html +0 -24
- package/src/lib/components/password/password.component.scss +0 -0
- package/src/lib/components/password/password.component.spec.ts +0 -21
- package/src/lib/components/password/password.component.ts +0 -56
- package/src/lib/components/radiobutton/index.ts +0 -1
- package/src/lib/components/radiobutton/radiobutton.component.html +0 -34
- package/src/lib/components/radiobutton/radiobutton.component.scss +0 -6
- package/src/lib/components/radiobutton/radiobutton.component.spec.ts +0 -21
- package/src/lib/components/radiobutton/radiobutton.component.stories.ts +0 -71
- package/src/lib/components/radiobutton/radiobutton.component.ts +0 -61
- package/src/lib/components/section/index.ts +0 -1
- package/src/lib/components/section/section.component.html +0 -25
- package/src/lib/components/section/section.component.scss +0 -0
- package/src/lib/components/section/section.component.spec.ts +0 -21
- package/src/lib/components/section/section.component.ts +0 -31
- package/src/lib/components/shared-components/.eslintrc.json +0 -42
- package/src/lib/components/shared-components/action-button-group/action-button-group.component.html +0 -25
- package/src/lib/components/shared-components/action-button-group/action-button-group.component.scss +0 -0
- package/src/lib/components/shared-components/action-button-group/action-button-group.component.spec.ts +0 -21
- package/src/lib/components/shared-components/action-button-group/action-button-group.component.ts +0 -111
- package/src/lib/components/shared-components/action-button-group/components/action-button/action-button.component.html +0 -10
- package/src/lib/components/shared-components/action-button-group/components/action-button/action-button.component.scss +0 -0
- package/src/lib/components/shared-components/action-button-group/components/action-button/action-button.component.spec.ts +0 -21
- package/src/lib/components/shared-components/action-button-group/components/action-button/action-button.component.ts +0 -69
- package/src/lib/components/shared-components/action-button-group/index.ts +0 -2
- package/src/lib/components/shared-components/dynamic-component/dynamic-component-factory.service.ts +0 -142
- package/src/lib/components/shared-components/dynamic-component/dynamic-component.component.ts +0 -56
- package/src/lib/components/shared-components/dynamic-component/index.ts +0 -2
- package/src/lib/components/shared-components/generic-field/generic-field.component.html +0 -98
- package/src/lib/components/shared-components/generic-field/generic-field.component.spec.ts +0 -21
- package/src/lib/components/shared-components/generic-field/generic-field.component.ts +0 -90
- package/src/lib/components/shared-components/generic-field/index.ts +0 -1
- package/src/lib/components/shared-components/generic-form/generic-form.component.html +0 -46
- package/src/lib/components/shared-components/generic-form/generic-form.component.spec.ts +0 -21
- package/src/lib/components/shared-components/generic-form/generic-form.component.ts +0 -56
- package/src/lib/components/shared-components/generic-form/generic-form.model.spec.ts +0 -82
- package/src/lib/components/shared-components/generic-form/generic-form.model.ts +0 -68
- package/src/lib/components/shared-components/generic-form/index.ts +0 -2
- package/src/lib/components/shared-components/index.ts +0 -4
- package/src/lib/components/side-menu/index.ts +0 -2
- package/src/lib/components/side-menu/side-menu.component.html +0 -53
- package/src/lib/components/side-menu/side-menu.component.scss +0 -0
- package/src/lib/components/side-menu/side-menu.component.spec.ts +0 -21
- package/src/lib/components/side-menu/side-menu.component.ts +0 -96
- package/src/lib/components/side-menu/side-menu.module.ts +0 -66
- package/src/lib/components/slider/index.ts +0 -1
- package/src/lib/components/slider/slider.component.html +0 -19
- package/src/lib/components/slider/slider.component.spec.ts +0 -21
- package/src/lib/components/slider/slider.component.ts +0 -56
- package/src/lib/components/snackbar/index.ts +0 -2
- package/src/lib/components/snackbar/services/snackbar.service.ts +0 -45
- package/src/lib/components/snackbar/snackbar.component.html +0 -3
- package/src/lib/components/snackbar/snackbar.component.scss +0 -0
- package/src/lib/components/snackbar/snackbar.component.spec.ts +0 -21
- package/src/lib/components/snackbar/snackbar.component.stories.ts +0 -70
- package/src/lib/components/snackbar/snackbar.component.ts +0 -25
- package/src/lib/components/stepper/index.ts +0 -1
- package/src/lib/components/stepper/stepper.component.html +0 -35
- package/src/lib/components/stepper/stepper.component.spec.ts +0 -21
- package/src/lib/components/stepper/stepper.component.ts +0 -39
- package/src/lib/components/switch/index.ts +0 -1
- package/src/lib/components/switch/switch.component.html +0 -18
- package/src/lib/components/switch/switch.component.scss +0 -0
- package/src/lib/components/switch/switch.component.spec.ts +0 -21
- package/src/lib/components/switch/switch.component.stories.ts +0 -65
- package/src/lib/components/switch/switch.component.ts +0 -52
- package/src/lib/components/tab-view/index.ts +0 -2
- package/src/lib/components/tab-view/tab-view-item.component.ts +0 -22
- package/src/lib/components/tab-view/tab-view.component.html +0 -41
- package/src/lib/components/tab-view/tab-view.component.ts +0 -55
- package/src/lib/components/table/index.ts +0 -1
- package/src/lib/components/table/table-filter.pipe.ts +0 -59
- package/src/lib/components/table/table.component.html +0 -127
- package/src/lib/components/table/table.component.scss +0 -11
- package/src/lib/components/table/table.component.spec.ts +0 -21
- package/src/lib/components/table/table.component.stories.ts +0 -55
- package/src/lib/components/table/table.component.ts +0 -288
- package/src/lib/components/table/table.models.ts +0 -26
- package/src/lib/components/tag/index.ts +0 -2
- package/src/lib/components/tag/tag.component.html +0 -12
- package/src/lib/components/tag/tag.component.scss +0 -33
- package/src/lib/components/tag/tag.component.ts +0 -83
- package/src/lib/components/textarea/index.ts +0 -1
- package/src/lib/components/textarea/textarea.component.html +0 -40
- package/src/lib/components/textarea/textarea.component.scss +0 -5
- package/src/lib/components/textarea/textarea.component.spec.ts +0 -21
- package/src/lib/components/textarea/textarea.component.stories.ts +0 -98
- package/src/lib/components/textarea/textarea.component.ts +0 -62
- package/src/lib/components/textfield/index.ts +0 -1
- package/src/lib/components/textfield/textfield.component.html +0 -82
- package/src/lib/components/textfield/textfield.component.scss +0 -23
- package/src/lib/components/textfield/textfield.component.spec.ts +0 -21
- package/src/lib/components/textfield/textfield.component.stories.ts +0 -85
- package/src/lib/components/textfield/textfield.component.ts +0 -68
- package/src/lib/components/tooltip/index.ts +0 -1
- package/src/lib/components/tooltip/tooltip.component.html +0 -3
- package/src/lib/components/tooltip/tooltip.component.ts +0 -17
- package/src/lib/icons.ts +0 -36
- package/src/lib/interceptors/http-error-message.interceptor.ts +0 -35
- package/src/lib/pages/not-found-page/not-found-page.component.html +0 -26
- 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 +0 -21
- package/src/lib/pages/not-found-page/not-found-page.component.ts +0 -16
- package/src/tab-view.ts +0 -1
- package/src/test-setup.ts +0 -8
- package/tsconfig.json +0 -29
- package/tsconfig.lib.json +0 -18
- package/tsconfig.lib.prod.json +0 -9
- package/tsconfig.spec.json +0 -16
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
-
import {
|
|
3
|
-
ChangeDetectionStrategy,
|
|
4
|
-
ChangeDetectorRef,
|
|
5
|
-
Component,
|
|
6
|
-
Input,
|
|
7
|
-
OnInit,
|
|
8
|
-
} from '@angular/core';
|
|
9
|
-
import { RouterModule } from '@angular/router';
|
|
10
|
-
import {
|
|
11
|
-
HEADER_COMPONENT_TOKEN,
|
|
12
|
-
HeaderCore,
|
|
13
|
-
ScreenSizeService,
|
|
14
|
-
UnsubscribeComponent,
|
|
15
|
-
} from '@verisoft/ui-core';
|
|
16
|
-
import { AvatarModule } from 'primeng/avatar';
|
|
17
|
-
import { Icons } from '../../icons';
|
|
18
|
-
import { ButtonComponent } from '../button';
|
|
19
|
-
import { HeaderProviderService } from './services/header-provider.service';
|
|
20
|
-
|
|
21
|
-
@Component({
|
|
22
|
-
selector: 'v-header',
|
|
23
|
-
imports: [CommonModule, AvatarModule, ButtonComponent, RouterModule],
|
|
24
|
-
templateUrl: './header.component.html',
|
|
25
|
-
styleUrl: './header.component.scss',
|
|
26
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
27
|
-
providers: [
|
|
28
|
-
{ provide: HEADER_COMPONENT_TOKEN, useExisting: HeaderComponent },
|
|
29
|
-
]
|
|
30
|
-
})
|
|
31
|
-
export class HeaderComponent
|
|
32
|
-
extends UnsubscribeComponent
|
|
33
|
-
implements OnInit, HeaderCore
|
|
34
|
-
{
|
|
35
|
-
constructor(
|
|
36
|
-
readonly providerService: HeaderProviderService,
|
|
37
|
-
readonly screenSizeService: ScreenSizeService,
|
|
38
|
-
readonly cdr: ChangeDetectorRef
|
|
39
|
-
) {
|
|
40
|
-
super();
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
@Input() title!: string;
|
|
44
|
-
@Input() logoUrl!: string;
|
|
45
|
-
@Input() userName!: string;
|
|
46
|
-
@Input() userRole!: any | any[] | undefined;
|
|
47
|
-
@Input() menuRef!: HTMLDivElement;
|
|
48
|
-
@Input() exampleHeader = false;
|
|
49
|
-
|
|
50
|
-
icons = Icons;
|
|
51
|
-
protected menuVisible = false;
|
|
52
|
-
protected logoRouterLink!: string;
|
|
53
|
-
|
|
54
|
-
ngOnInit(): void {
|
|
55
|
-
this.providerService.init();
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
toggleMenu() {
|
|
59
|
-
if (this.menuRef) {
|
|
60
|
-
this.menuVisible = !this.menuVisible;
|
|
61
|
-
this.menuRef.classList.toggle('menu-visible');
|
|
62
|
-
this.cdr.detectChanges();
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Inject, Injectable } from '@angular/core';
|
|
2
|
-
import { SETTINGS_MENU } from '@verisoft/ui-core';
|
|
3
|
-
import { MenuItem } from '@verisoft/ui-core';
|
|
4
|
-
|
|
5
|
-
@Injectable({
|
|
6
|
-
providedIn: 'root',
|
|
7
|
-
})
|
|
8
|
-
export class HeaderProviderService {
|
|
9
|
-
constructor(@Inject(SETTINGS_MENU) private settingsMenu: MenuItem[]) {}
|
|
10
|
-
menu: MenuItem[] = [];
|
|
11
|
-
|
|
12
|
-
init(): void {
|
|
13
|
-
this.menu = this.settingsMenu;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: inline-flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
|
|
5
|
-
.pi {
|
|
6
|
-
line-height: 1;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
&.v-primeng-icon--small .pi {
|
|
10
|
-
font-size: 0.75rem;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
&.v-primeng-icon--medium .pi {
|
|
14
|
-
font-size: 1rem;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
&.v-primeng-icon--large .pi {
|
|
18
|
-
font-size: 1.5rem;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
&.v-primeng-icon--xl .pi {
|
|
22
|
-
font-size: 2rem;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
&.v-primeng-icon--primary .pi {
|
|
26
|
-
color: var(--primary-color);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&.v-primeng-icon--secondary .pi {
|
|
30
|
-
color: var(--secondary-color);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
&.v-primeng-icon--success .pi {
|
|
34
|
-
color: var(--success-color);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
&.v-primeng-icon--danger .pi {
|
|
38
|
-
color: var(--error-color);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
&.v-primeng-icon--warning .pi {
|
|
42
|
-
color: var(--details-color);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
&.v-primeng-icon--info .pi,
|
|
46
|
-
&.v-primeng-icon--help .pi,
|
|
47
|
-
&.v-primeng-icon--contrast .pi {
|
|
48
|
-
color: var(--secondary-color);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
-
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
-
import { ControlSeverity, ControlSeverityType, IconsComponent } from '@verisoft/ui-core';
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'v-icon',
|
|
7
|
-
imports: [CommonModule],
|
|
8
|
-
templateUrl: './icon.component.html',
|
|
9
|
-
styleUrl: './icon.component.scss',
|
|
10
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
11
|
-
host: {
|
|
12
|
-
'[class]': 'hostClasses',
|
|
13
|
-
},
|
|
14
|
-
})
|
|
15
|
-
export class IconComponent extends IconsComponent {
|
|
16
|
-
get primeIconClasses(): string {
|
|
17
|
-
return ['pi', `pi-${this.name()}`].join(' ');
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
get hostClasses(): string {
|
|
21
|
-
const classes = ['v-primeng-icon'];
|
|
22
|
-
const sizeClass = this.primeSizeClass;
|
|
23
|
-
const colorClass = this.primeColorClass;
|
|
24
|
-
const customClass = this.class() ?? '';
|
|
25
|
-
|
|
26
|
-
if (sizeClass) {
|
|
27
|
-
classes.push(sizeClass);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
if (colorClass) {
|
|
31
|
-
classes.push(colorClass);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
if (customClass) {
|
|
35
|
-
classes.push(customClass);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
return classes.join(' ');
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
private get primeSizeClass(): string {
|
|
42
|
-
switch (this.size()) {
|
|
43
|
-
case 'small':
|
|
44
|
-
return 'v-primeng-icon--small';
|
|
45
|
-
case 'medium':
|
|
46
|
-
return 'v-primeng-icon--medium';
|
|
47
|
-
case 'large':
|
|
48
|
-
return 'v-primeng-icon--large';
|
|
49
|
-
case 'xl':
|
|
50
|
-
return 'v-primeng-icon--xl';
|
|
51
|
-
default:
|
|
52
|
-
return '';
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
private get primeColorClass(): string {
|
|
57
|
-
const color = this.mapSeverityToPrimeClass(this.severity());
|
|
58
|
-
return color ? `v-primeng-icon--${color}` : '';
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
private mapSeverityToPrimeClass(severity: ControlSeverityType | undefined): string | undefined {
|
|
62
|
-
if (!severity) {
|
|
63
|
-
return undefined;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
switch (severity) {
|
|
67
|
-
case ControlSeverity.success:
|
|
68
|
-
return 'success';
|
|
69
|
-
case ControlSeverity.danger:
|
|
70
|
-
return 'danger';
|
|
71
|
-
case ControlSeverity.warning:
|
|
72
|
-
return 'warning';
|
|
73
|
-
case ControlSeverity.info:
|
|
74
|
-
return 'info';
|
|
75
|
-
case ControlSeverity.secondary:
|
|
76
|
-
return 'secondary';
|
|
77
|
-
case ControlSeverity.help:
|
|
78
|
-
case ControlSeverity.primary:
|
|
79
|
-
case ControlSeverity.contrast:
|
|
80
|
-
return 'primary';
|
|
81
|
-
default:
|
|
82
|
-
return severity;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './input-group.component';
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<div class="v-input-group w-100">
|
|
2
|
-
<v-form-field
|
|
3
|
-
[label]="label"
|
|
4
|
-
[required]="required"
|
|
5
|
-
[tooltip]="tooltip" >
|
|
6
|
-
<p-inputGroup>
|
|
7
|
-
@for (item of items; track item) {
|
|
8
|
-
@if (item.position === 'left') {
|
|
9
|
-
<p-inputGroupAddon>
|
|
10
|
-
@if (item.icon) {
|
|
11
|
-
<i [class]="item.icon"></i>
|
|
12
|
-
}
|
|
13
|
-
@if (item.text) {
|
|
14
|
-
{{ item.text }}
|
|
15
|
-
}
|
|
16
|
-
</p-inputGroupAddon>
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
<input pInputText [formControl]="formControl" class="w-100" />
|
|
20
|
-
@for (item of items; track item) {
|
|
21
|
-
@if (item.position === 'right') {
|
|
22
|
-
<p-inputGroupAddon>
|
|
23
|
-
@if (item.icon) {
|
|
24
|
-
<i [class]="item.icon"></i>
|
|
25
|
-
}
|
|
26
|
-
@if (item.text) {
|
|
27
|
-
{{ item.text }}
|
|
28
|
-
}
|
|
29
|
-
</p-inputGroupAddon>
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
</p-inputGroup>
|
|
33
|
-
</v-form-field>
|
|
34
|
-
</div>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
import { InputGroupComponent } from './input-group.component';
|
|
3
|
-
|
|
4
|
-
describe('InputGroupComponent', () => {
|
|
5
|
-
let component: InputGroupComponent;
|
|
6
|
-
let fixture: ComponentFixture<InputGroupComponent>;
|
|
7
|
-
|
|
8
|
-
beforeEach(async () => {
|
|
9
|
-
await TestBed.configureTestingModule({
|
|
10
|
-
imports: [InputGroupComponent],
|
|
11
|
-
}).compileComponents();
|
|
12
|
-
|
|
13
|
-
fixture = TestBed.createComponent(InputGroupComponent);
|
|
14
|
-
component = fixture.componentInstance;
|
|
15
|
-
fixture.detectChanges();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('should create', () => {
|
|
19
|
-
expect(component).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
});
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
ChangeDetectionStrategy,
|
|
4
|
-
Component,
|
|
5
|
-
forwardRef,
|
|
6
|
-
Input,
|
|
7
|
-
Optional,
|
|
8
|
-
Self,
|
|
9
|
-
} from '@angular/core';
|
|
10
|
-
import {
|
|
11
|
-
ControlValueAccessor,
|
|
12
|
-
NgControl,
|
|
13
|
-
ReactiveFormsModule,
|
|
14
|
-
} from '@angular/forms';
|
|
15
|
-
import {
|
|
16
|
-
BaseFormInputComponent,
|
|
17
|
-
BaseInputControls,
|
|
18
|
-
INPUT_GROUP_COMPONENT_TOKEN,
|
|
19
|
-
InputGroupCore,
|
|
20
|
-
InputGroupItem,
|
|
21
|
-
} from '@verisoft/ui-core';
|
|
22
|
-
import { InputGroupModule } from 'primeng/inputgroup';
|
|
23
|
-
import { InputGroupAddonModule } from 'primeng/inputgroupaddon';
|
|
24
|
-
import { InputTextModule } from 'primeng/inputtext';
|
|
25
|
-
import { FormFieldComponent } from '../form-field';
|
|
26
|
-
|
|
27
|
-
@Component({
|
|
28
|
-
selector: 'v-input-group',
|
|
29
|
-
imports: [
|
|
30
|
-
InputGroupAddonModule,
|
|
31
|
-
InputGroupModule,
|
|
32
|
-
InputTextModule,
|
|
33
|
-
ReactiveFormsModule,
|
|
34
|
-
FormFieldComponent
|
|
35
|
-
],
|
|
36
|
-
templateUrl: './input-group.component.html',
|
|
37
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
38
|
-
providers: [
|
|
39
|
-
{
|
|
40
|
-
provide: BaseInputControls,
|
|
41
|
-
useExisting: forwardRef(() => InputGroupComponent),
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
provide: INPUT_GROUP_COMPONENT_TOKEN,
|
|
45
|
-
useExisting: InputGroupComponent,
|
|
46
|
-
},
|
|
47
|
-
]
|
|
48
|
-
})
|
|
49
|
-
export class InputGroupComponent
|
|
50
|
-
extends BaseFormInputComponent
|
|
51
|
-
implements ControlValueAccessor, InputGroupCore
|
|
52
|
-
{
|
|
53
|
-
constructor(@Optional() @Self() ngControl: NgControl) {
|
|
54
|
-
super(ngControl);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
@Input() items!: InputGroupItem[];
|
|
58
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './loader.component';
|
|
File without changes
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
import { LoaderComponent } from './loader.component';
|
|
3
|
-
|
|
4
|
-
describe('LoaderComponent', () => {
|
|
5
|
-
let component: LoaderComponent;
|
|
6
|
-
let fixture: ComponentFixture<LoaderComponent>;
|
|
7
|
-
|
|
8
|
-
beforeEach(async () => {
|
|
9
|
-
await TestBed.configureTestingModule({
|
|
10
|
-
imports: [LoaderComponent],
|
|
11
|
-
}).compileComponents();
|
|
12
|
-
|
|
13
|
-
fixture = TestBed.createComponent(LoaderComponent);
|
|
14
|
-
component = fixture.componentInstance;
|
|
15
|
-
fixture.detectChanges();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('should create', () => {
|
|
19
|
-
expect(component).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
-
import { LOADER_COMPONENT_TOKEN, LoaderCore } from '@verisoft/ui-core';
|
|
4
|
-
import { ProgressSpinnerModule } from 'primeng/progressspinner';
|
|
5
|
-
|
|
6
|
-
@Component({
|
|
7
|
-
selector: 'v-loader',
|
|
8
|
-
imports: [ProgressSpinnerModule],
|
|
9
|
-
templateUrl: './loader.component.html',
|
|
10
|
-
styleUrl: './loader.component.scss',
|
|
11
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
12
|
-
providers: [
|
|
13
|
-
{ provide: LOADER_COMPONENT_TOKEN, useExisting: LoaderComponent },
|
|
14
|
-
]
|
|
15
|
-
})
|
|
16
|
-
export class LoaderComponent implements LoaderCore {}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './multiselect.component';
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
<div class="v-multiple-select">
|
|
2
|
-
@if (label && !floatLabel) {
|
|
3
|
-
<v-form-field
|
|
4
|
-
class="w-100"
|
|
5
|
-
[label]="label"
|
|
6
|
-
[tooltip]="tooltip"
|
|
7
|
-
[required]="isRequired()"
|
|
8
|
-
[testId]="testId"
|
|
9
|
-
[display]="formDisplay"
|
|
10
|
-
>
|
|
11
|
-
<p-multiSelect
|
|
12
|
-
class="w-100"
|
|
13
|
-
appendTo="body"
|
|
14
|
-
[formControl]="formControl"
|
|
15
|
-
[title]="label"
|
|
16
|
-
display="chip"
|
|
17
|
-
[options]="options"
|
|
18
|
-
[optionLabel]="optionLabel"
|
|
19
|
-
[optionValue]="optionValue"
|
|
20
|
-
[loading]="loading"
|
|
21
|
-
[placeholder]="placeholder ? placeholder : label"
|
|
22
|
-
[virtualScrollItemSize]="25"
|
|
23
|
-
[lazy]="true"
|
|
24
|
-
[tooltip]="tooltip"
|
|
25
|
-
[required]="isRequired()"
|
|
26
|
-
[showClear]="formControl && clearable && !readonly"
|
|
27
|
-
[virtualScroll]="lazy"
|
|
28
|
-
[virtualScrollItemSize]="virtualOptionSize"
|
|
29
|
-
[virtualScrollOptions]="virtualScrollOptions"
|
|
30
|
-
(showEvent)="onDropdownShow()"
|
|
31
|
-
(clearEvent)="onDropdownClear()"
|
|
32
|
-
(changeEvent)="selectionChange($event)"
|
|
33
|
-
(lazyLoadEvent)="onLazyLoad($any($event))"
|
|
34
|
-
></p-multiSelect>
|
|
35
|
-
</v-form-field>
|
|
36
|
-
<v-validation-message [ngControl]="ngControl"></v-validation-message>
|
|
37
|
-
}
|
|
38
|
-
@if (floatLabel) {
|
|
39
|
-
<p-floatLabel>
|
|
40
|
-
<p-multiSelect
|
|
41
|
-
class="w-100"
|
|
42
|
-
appendTo="body"
|
|
43
|
-
[formControl]="formControl"
|
|
44
|
-
[title]="label"
|
|
45
|
-
[options]="options"
|
|
46
|
-
[optionLabel]="optionLabel"
|
|
47
|
-
[optionValue]="optionValue"
|
|
48
|
-
[loading]="loading"
|
|
49
|
-
[placeholder]="placeholder ? placeholder : label"
|
|
50
|
-
[virtualScrollItemSize]="25"
|
|
51
|
-
[lazy]="true"
|
|
52
|
-
[tooltip]="tooltip"
|
|
53
|
-
[required]="isRequired()"
|
|
54
|
-
[inputId]="inputId"
|
|
55
|
-
[showClear]="formControl && clearable && !readonly"
|
|
56
|
-
[virtualScroll]="lazy"
|
|
57
|
-
[virtualScrollItemSize]="virtualOptionSize"
|
|
58
|
-
[virtualScrollOptions]="virtualScrollOptions"
|
|
59
|
-
(showEvent)="onDropdownShow()"
|
|
60
|
-
(clearEvent)="onDropdownClear()"
|
|
61
|
-
(changeEvent)="selectionChange($event)"
|
|
62
|
-
(lazyLoadEvent)="onLazyLoad($any($event))"
|
|
63
|
-
></p-multiSelect>
|
|
64
|
-
<label [for]="inputId">{{ floatLabel }}</label>
|
|
65
|
-
</p-floatLabel>
|
|
66
|
-
}
|
|
67
|
-
</div>
|
|
File without changes
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
import { MultiselectComponent } from './multiselect.component';
|
|
3
|
-
|
|
4
|
-
describe('MultiselectComponent', () => {
|
|
5
|
-
let component: MultiselectComponent<any>;
|
|
6
|
-
let fixture: ComponentFixture<MultiselectComponent<any>>;
|
|
7
|
-
|
|
8
|
-
beforeEach(async () => {
|
|
9
|
-
await TestBed.configureTestingModule({
|
|
10
|
-
imports: [MultiselectComponent],
|
|
11
|
-
}).compileComponents();
|
|
12
|
-
|
|
13
|
-
fixture = TestBed.createComponent(MultiselectComponent);
|
|
14
|
-
component = fixture.componentInstance;
|
|
15
|
-
fixture.detectChanges();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('should create', () => {
|
|
19
|
-
expect(component).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
});
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
ChangeDetectionStrategy,
|
|
4
|
-
Component,
|
|
5
|
-
EventEmitter,
|
|
6
|
-
forwardRef,
|
|
7
|
-
Input,
|
|
8
|
-
OnChanges,
|
|
9
|
-
Optional,
|
|
10
|
-
Output,
|
|
11
|
-
Self,
|
|
12
|
-
SimpleChanges,
|
|
13
|
-
} from '@angular/core';
|
|
14
|
-
import {
|
|
15
|
-
ControlValueAccessor,
|
|
16
|
-
NgControl,
|
|
17
|
-
ReactiveFormsModule,
|
|
18
|
-
} from '@angular/forms';
|
|
19
|
-
import {
|
|
20
|
-
FilterEvent,
|
|
21
|
-
LazyLoadEvent,
|
|
22
|
-
} from '@verisoft/core';
|
|
23
|
-
import {
|
|
24
|
-
BaseFormInputComponent,
|
|
25
|
-
BaseInputControls,
|
|
26
|
-
MULTISELECT_COMPONENT_TOKEN,
|
|
27
|
-
MultiselectCore,
|
|
28
|
-
FieldSize,
|
|
29
|
-
FieldSizeType,
|
|
30
|
-
} from '@verisoft/ui-core';
|
|
31
|
-
import { ScrollerOptions } from 'primeng/api';
|
|
32
|
-
import { FloatLabelModule } from 'primeng/floatlabel';
|
|
33
|
-
import { MultiSelectModule } from 'primeng/multiselect';
|
|
34
|
-
import { ScrollerLazyLoadEvent } from 'primeng/scroller';
|
|
35
|
-
import { ErrorComponent } from '../errors';
|
|
36
|
-
import { FormFieldComponent } from '../form-field';
|
|
37
|
-
|
|
38
|
-
@Component({
|
|
39
|
-
selector: 'v-multiselect',
|
|
40
|
-
imports: [
|
|
41
|
-
ReactiveFormsModule,
|
|
42
|
-
FloatLabelModule,
|
|
43
|
-
MultiSelectModule,
|
|
44
|
-
ErrorComponent,
|
|
45
|
-
FormFieldComponent
|
|
46
|
-
],
|
|
47
|
-
templateUrl: './multiselect.component.html',
|
|
48
|
-
styleUrl: './multiselect.component.scss',
|
|
49
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
50
|
-
providers: [
|
|
51
|
-
{
|
|
52
|
-
provide: BaseInputControls,
|
|
53
|
-
useExisting: forwardRef(() => MultiselectComponent),
|
|
54
|
-
multi: true,
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
provide: MULTISELECT_COMPONENT_TOKEN,
|
|
58
|
-
useExisting: MultiselectComponent,
|
|
59
|
-
},
|
|
60
|
-
]
|
|
61
|
-
})
|
|
62
|
-
export class MultiselectComponent<T>
|
|
63
|
-
extends BaseFormInputComponent
|
|
64
|
-
implements ControlValueAccessor, MultiselectCore<T>, OnChanges
|
|
65
|
-
{
|
|
66
|
-
constructor(@Optional() @Self() ngControl: NgControl) {
|
|
67
|
-
super(ngControl);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
@Input() options: T[] | undefined = [];
|
|
71
|
-
@Input() optionLabel: string | undefined;
|
|
72
|
-
@Input() optionValue: string | undefined;
|
|
73
|
-
@Input() dropdownIcon?: string;
|
|
74
|
-
@Input() floatLabel?: string;
|
|
75
|
-
@Input() editable = true;
|
|
76
|
-
@Input() loading = false;
|
|
77
|
-
@Input() lazy = false;
|
|
78
|
-
@Input() filter = true;
|
|
79
|
-
@Input() size: FieldSizeType = FieldSize.medium;
|
|
80
|
-
|
|
81
|
-
@Output() changed = new EventEmitter<any>();
|
|
82
|
-
@Output() showed = new EventEmitter<any>();
|
|
83
|
-
@Output() cleared = new EventEmitter<any>();
|
|
84
|
-
@Output() lazyLoad = new EventEmitter<LazyLoadEvent>();
|
|
85
|
-
@Output() filtered = new EventEmitter<FilterEvent>();
|
|
86
|
-
|
|
87
|
-
virtualScrollOptions!: ScrollerOptions | undefined;
|
|
88
|
-
virtualOptionSize = 37.5;
|
|
89
|
-
|
|
90
|
-
ngOnChanges(changes: SimpleChanges): void {
|
|
91
|
-
if (changes['lazy'] || changes['loading']) {
|
|
92
|
-
this.virtualScrollOptions = this.lazy
|
|
93
|
-
? {
|
|
94
|
-
showLoader: this.loading,
|
|
95
|
-
lazy: true,
|
|
96
|
-
onLazyLoad: this.onLazyLoad.bind(this),
|
|
97
|
-
}
|
|
98
|
-
: undefined;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
onLazyLoad(event: ScrollerLazyLoadEvent): void {
|
|
103
|
-
this.lazyLoad.emit({
|
|
104
|
-
offset: event.first,
|
|
105
|
-
limit: event.last - event.first,
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
selectionChange(event: any): void {
|
|
110
|
-
this.cleared.emit(event);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
onDropdownShow(): void {
|
|
114
|
-
this.showed.emit();
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
onDropdownClear(): void {
|
|
118
|
-
this.cleared.emit();
|
|
119
|
-
}
|
|
120
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './number-input.component';
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<div class="v-number-input">
|
|
2
|
-
<v-form-field
|
|
3
|
-
class="w-100"
|
|
4
|
-
[label]="label"
|
|
5
|
-
[tooltip]="tooltip"
|
|
6
|
-
[required]="isRequired()"
|
|
7
|
-
[testId]="testId"
|
|
8
|
-
>
|
|
9
|
-
<p-inputNumber
|
|
10
|
-
class="w-100"
|
|
11
|
-
[formControl]="formControl"
|
|
12
|
-
[showButtons]="true"
|
|
13
|
-
[inputId]="inputId"
|
|
14
|
-
[mode]="mode"
|
|
15
|
-
[min]="min"
|
|
16
|
-
[max]="max"
|
|
17
|
-
[step]="step"
|
|
18
|
-
[currency]="currency"
|
|
19
|
-
/>
|
|
20
|
-
<v-validation-message [ngControl]="ngControl"></v-validation-message>
|
|
21
|
-
</v-form-field>
|
|
22
|
-
</div>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
import { NumberInputComponent } from './number-input.component';
|
|
3
|
-
|
|
4
|
-
describe('NumberInputComponent', () => {
|
|
5
|
-
let component: NumberInputComponent;
|
|
6
|
-
let fixture: ComponentFixture<NumberInputComponent>;
|
|
7
|
-
|
|
8
|
-
beforeEach(async () => {
|
|
9
|
-
await TestBed.configureTestingModule({
|
|
10
|
-
imports: [NumberInputComponent],
|
|
11
|
-
}).compileComponents();
|
|
12
|
-
|
|
13
|
-
fixture = TestBed.createComponent(NumberInputComponent);
|
|
14
|
-
component = fixture.componentInstance;
|
|
15
|
-
fixture.detectChanges();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('should create', () => {
|
|
19
|
-
expect(component).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
});
|