@verisoft/ui-primeng 18.0.0 → 18.3.1
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/{src/assets → assets}/sass/base/_typography.scss +2 -2
- package/assets/sass/layout/_button.scss +57 -0
- package/{src/assets → assets}/sass/layout/_sidemenu.scss +1 -15
- package/package.json +5 -4
- package/src/index.ts +2 -4
- package/src/lib/components/breadcrumb/breadcrumb.component.html +2 -2
- package/src/lib/components/breadcrumb/breadcrumb.component.ts +6 -1
- package/src/lib/components/breadcrumb/breadcrumb.pipe.ts +13 -0
- package/src/lib/components/button/button.component.html +2 -2
- package/src/lib/components/button/button.component.ts +7 -1
- package/src/lib/components/button/index.ts +0 -1
- package/src/lib/components/calendar/calendar.component.html +2 -2
- package/src/lib/components/calendar/calendar.component.ts +7 -2
- package/src/lib/components/checkbox/checkbox.component.html +1 -1
- package/src/lib/components/checkbox/checkbox.component.ts +5 -1
- package/src/lib/components/confirm-dialog/confirm-dialog.component.ts +3 -3
- package/src/lib/components/confirm-dialog/index.ts +0 -1
- package/src/lib/components/dropdown/dropdown.component.html +1 -1
- package/src/lib/components/dropdown/dropdown.component.ts +8 -3
- package/src/lib/components/errors/error.component.html +6 -0
- package/src/lib/components/errors/error.component.scss +3 -0
- package/src/lib/components/errors/error.component.ts +35 -0
- package/src/lib/components/errors/index.ts +1 -0
- package/src/lib/components/form-field/form-field.component.html +3 -8
- package/src/lib/components/form-field/form-field.component.ts +17 -13
- package/src/lib/components/header/header.component.html +2 -3
- package/src/lib/components/header/header.component.ts +3 -1
- package/src/lib/components/header/services/header-provider.service.ts +1 -1
- package/src/lib/components/input-group/input-group.component.html +1 -3
- package/src/lib/components/multiselect/multiselect.component.html +2 -1
- package/src/lib/components/multiselect/multiselect.component.ts +5 -3
- package/src/lib/components/number-input/number-input.component.html +1 -1
- package/src/lib/components/number-input/number-input.component.ts +3 -0
- package/src/lib/components/page-header/index.ts +0 -1
- package/src/lib/components/page-header/page-header.component.html +1 -1
- package/src/lib/components/page-header/page-header.component.ts +6 -34
- package/src/lib/components/password/password.component.html +1 -1
- package/src/lib/components/password/password.component.ts +3 -1
- package/src/lib/components/radiobutton/radiobutton.component.html +1 -1
- package/src/lib/components/radiobutton/radiobutton.component.ts +2 -0
- package/src/lib/components/section/section.component.html +1 -2
- package/src/lib/components/section/section.component.ts +4 -2
- package/src/lib/components/{action-button-group → shared-components/action-button-group}/action-button-group.component.html +2 -4
- package/src/lib/components/{action-button-group → shared-components/action-button-group}/action-button-group.component.ts +21 -11
- package/src/lib/components/{action-button-group → shared-components/action-button-group}/components/action-button/action-button.component.html +1 -2
- package/src/lib/components/shared-components/action-button-group/components/action-button/action-button.component.ts +71 -0
- package/src/lib/components/shared-components/dynamic-component/dynamic-component-factory.service.ts +142 -0
- package/src/lib/components/{dynamic-component → shared-components/dynamic-component}/dynamic-component.component.ts +5 -4
- package/src/lib/components/shared-components/dynamic-component/index.ts +2 -0
- package/src/lib/components/shared-components/feature-list/directives/feature-list-column.directive.ts +32 -0
- package/src/lib/components/shared-components/feature-list/directives/feature-list-filter-field.directive.ts +8 -0
- package/src/lib/components/shared-components/feature-list/feature-list-filter.pipe.ts +21 -0
- package/src/lib/components/shared-components/feature-list/feature-list-page.component.ts +31 -0
- package/src/lib/components/shared-components/feature-list/feature-list-page.model.ts +42 -0
- package/src/lib/components/shared-components/feature-list/feature-list.component.html +59 -0
- package/src/lib/components/shared-components/feature-list/feature-list.component.scss +10 -0
- package/src/lib/components/shared-components/feature-list/feature-list.component.ts +342 -0
- package/src/lib/components/shared-components/feature-list/index.ts +5 -0
- package/src/lib/components/shared-components/filter/directives/filter-field.directive.ts +35 -0
- package/src/lib/components/{filter → shared-components/filter}/filter.component.html +8 -7
- package/src/lib/components/{filter → shared-components/filter}/filter.component.ts +53 -26
- package/src/lib/components/shared-components/filter/filter.model.ts +18 -0
- package/src/lib/components/{filter → shared-components/filter}/index.ts +0 -1
- package/src/lib/components/shared-components/generic-field/generic-field.component.html +97 -0
- package/src/lib/components/{generic-field → shared-components/generic-field}/generic-field.component.ts +28 -10
- package/src/lib/components/{generic-field → shared-components/generic-field}/index.ts +0 -1
- package/src/lib/components/shared-components/generic-form/generic-form.component.html +46 -0
- package/src/lib/components/{generic-form → shared-components/generic-form}/generic-form.component.ts +11 -2
- package/src/lib/components/{generic-form → shared-components/generic-form}/generic-form.model.ts +11 -19
- package/src/lib/components/shared-components/index.ts +6 -0
- package/src/lib/components/side-menu/side-menu.component.html +7 -10
- package/src/lib/components/side-menu/side-menu.component.ts +7 -6
- package/src/lib/components/slider/slider.component.html +2 -2
- package/src/lib/components/slider/slider.component.ts +2 -0
- package/src/lib/components/stepper/stepper.component.html +2 -2
- package/src/lib/components/stepper/stepper.component.ts +16 -1
- package/src/lib/components/switch/switch.component.html +1 -2
- package/src/lib/components/switch/switch.component.ts +2 -0
- package/src/lib/components/tab-view/tab-menu.pipe.ts +22 -0
- package/src/lib/components/tab-view/tab-view-item.component.ts +2 -0
- package/src/lib/components/tab-view/tab-view.component.html +2 -3
- package/src/lib/components/tab-view/tab-view.component.ts +4 -4
- package/src/lib/components/tab-view/tab-view.module.ts +2 -1
- package/src/lib/components/table/index.ts +0 -1
- package/src/lib/components/table/table-filter.pipe.ts +59 -0
- package/src/lib/components/table/table.component.html +120 -180
- package/src/lib/components/table/table.component.scss +11 -0
- package/src/lib/components/table/table.component.ts +131 -98
- package/src/lib/components/table/table.models.ts +26 -0
- package/src/lib/components/textarea/textarea.component.html +1 -1
- package/src/lib/components/textarea/textarea.component.ts +2 -0
- package/src/lib/components/textfield/textfield.component.html +1 -1
- package/src/lib/components/textfield/textfield.component.ts +6 -1
- package/src/lib/components/tristatecheckbox/tristatecheckbox.component.html +2 -2
- package/src/lib/components/tristatecheckbox/tristatecheckbox.component.ts +4 -0
- package/src/lib/icons.ts +36 -0
- package/src/lib/pages/not-found-page/not-found-page.component.html +1 -2
- package/src/assets/sass/layout/_button.scss +0 -57
- package/src/lib/components/action-button-group/components/action-button/action-button.component.ts +0 -36
- package/src/lib/components/button/directives/shortcut.directive.ts +0 -37
- package/src/lib/components/confirm-dialog/services/confirm-dialog.service.ts +0 -14
- package/src/lib/components/dynamic-component/dynamic-component-factory.service.ts +0 -90
- package/src/lib/components/filter/directives/filter-field.directive.ts +0 -25
- package/src/lib/components/filter/directives/table-filter.directive.ts +0 -22
- package/src/lib/components/filter/filter.model.ts +0 -18
- package/src/lib/components/generic-field/generic-field.component.html +0 -54
- package/src/lib/components/generic-field/generic-field.model.ts +0 -9
- package/src/lib/components/generic-form/generic-form.component.html +0 -33
- package/src/lib/components/page-header/services/page-header.service.ts +0 -9
- package/src/lib/components/table/directives/table-store.directive.ts +0 -61
- package/src/lib/components/table-filter/filter.component.html +0 -205
- package/src/lib/components/table-filter/filter.component.scss +0 -0
- package/src/lib/components/table-filter/filter.component.spec.ts +0 -21
- package/src/lib/components/table-filter/filter.component.stories.ts +0 -23
- package/src/lib/services/screen-size.service.ts +0 -25
- /package/{src/assets → assets}/.gitkeep +0 -0
- /package/{src/assets → assets}/fonts/orbitron-black.ttf +0 -0
- /package/{src/assets → assets}/fonts/orbitron-bold.otf +0 -0
- /package/{src/assets → assets}/icons/complex/v-logo.svg +0 -0
- /package/{src/assets → assets}/images/_global/elon.jpg +0 -0
- /package/{src/assets → assets}/images/_global/jara.png +0 -0
- /package/{src/assets → assets}/images/_global/logos/v-logo.webp +0 -0
- /package/{src/assets → assets}/sass/base/_scrollbar.scss +0 -0
- /package/{src/assets → assets}/sass/layout/_app.scss +0 -0
- /package/{src/assets → assets}/sass/layout/_checkbox.scss +0 -0
- /package/{src/assets → assets}/sass/layout/_dialog.scss +0 -0
- /package/{src/assets → assets}/sass/layout/_dropdown.scss +0 -0
- /package/{src/assets → assets}/sass/layout/_formField.scss +0 -0
- /package/{src/assets → assets}/sass/layout/_header.scss +0 -0
- /package/{src/assets → assets}/sass/layout/_icons.scss +0 -0
- /package/{src/assets → assets}/sass/layout/_inputSwitch.scss +0 -0
- /package/{src/assets → assets}/sass/layout/_layout.scss +0 -0
- /package/{src/assets → assets}/sass/layout/_loader.scss +0 -0
- /package/{src/assets → assets}/sass/layout/_radiobutton.scss +0 -0
- /package/{src/assets → assets}/sass/layout/_snackbar.scss +0 -0
- /package/{src/assets → assets}/sass/layout/_tables.scss +0 -0
- /package/{src/assets → assets}/sass/layout/_tree.scss +0 -0
- /package/{src/assets → assets}/sass/layout/_tristatecheckbox.scss +0 -0
- /package/{src/assets → assets}/sass/main.scss +0 -0
- /package/{src/assets → assets}/sass/themes/_verisoft_theme.scss +0 -0
- /package/{src/assets → assets}/sass/utils/_mixins.scss +0 -0
- /package/{src/assets → assets}/sass/utils/_utils.scss +0 -0
- /package/{src/assets → assets}/sass/utils/_variables.scss +0 -0
- /package/{src/assets → assets}/sass/vendors/_bootstrap.scss +0 -0
- /package/{src/assets → assets}/sass/vendors/_primeng.scss +0 -0
- /package/src/lib/components/{action-button-group → shared-components/action-button-group}/action-button-group.component.scss +0 -0
- /package/src/lib/components/{action-button-group → shared-components/action-button-group}/action-button-group.component.spec.ts +0 -0
- /package/src/lib/components/{action-button-group → shared-components/action-button-group}/components/action-button/action-button.component.scss +0 -0
- /package/src/lib/components/{action-button-group → shared-components/action-button-group}/components/action-button/action-button.component.spec.ts +0 -0
- /package/src/lib/components/{action-button-group → shared-components/action-button-group}/index.ts +0 -0
- /package/src/lib/components/{filter → shared-components/filter}/filter.component.scss +0 -0
- /package/src/lib/components/{filter → shared-components/filter}/filter.component.spec.ts +0 -0
- /package/src/lib/components/{filter → shared-components/filter}/filter.component.stories.ts +0 -0
- /package/src/lib/components/{generic-field → shared-components/generic-field}/generic-field.component.spec.ts +0 -0
- /package/src/lib/components/{generic-form → shared-components/generic-form}/generic-form.component.spec.ts +0 -0
- /package/src/lib/components/{generic-form → shared-components/generic-form}/generic-form.model.spec.ts +0 -0
- /package/src/lib/components/{generic-form → shared-components/generic-form}/index.ts +0 -0
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<v-button
|
|
23
23
|
*ngIf="index > 0"
|
|
24
24
|
label="Back"
|
|
25
|
-
icon="
|
|
25
|
+
[icon]="icons.arrowLeft"
|
|
26
26
|
size="small"
|
|
27
27
|
[outlined]="true"
|
|
28
28
|
(click)="prevCallback.emit()"
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
*ngIf="index < items.length - 1"
|
|
33
33
|
label="Next"
|
|
34
34
|
size="small"
|
|
35
|
-
icon="
|
|
35
|
+
[icon]="icons.arrowRight"
|
|
36
36
|
iconPos="right"
|
|
37
37
|
(click)="nextCallback.emit()"
|
|
38
38
|
/>
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { CommonModule } from '@angular/common';
|
|
2
|
-
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|
2
|
+
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
|
|
3
3
|
import {
|
|
4
4
|
StepperCore,
|
|
5
5
|
STEPPER_COMPONENT_TOKEN,
|
|
6
6
|
StepperItem,
|
|
7
|
+
LayoutType,
|
|
8
|
+
LayoutTypeType,
|
|
9
|
+
FieldSizeType,
|
|
10
|
+
FieldSize
|
|
7
11
|
} from '@verisoft/ui-core';
|
|
8
12
|
import { StepperModule } from 'primeng/stepper';
|
|
13
|
+
import { Icons } from '../../icons';
|
|
9
14
|
import { ButtonComponent } from '../button';
|
|
10
15
|
|
|
11
16
|
@Component({
|
|
@@ -22,4 +27,14 @@ export class StepperComponent
|
|
|
22
27
|
implements StepperCore
|
|
23
28
|
{
|
|
24
29
|
@Input() items!: StepperItem[];
|
|
30
|
+
|
|
31
|
+
icons = Icons;
|
|
32
|
+
@Input() prefix!: string;
|
|
33
|
+
@Input() label!: string;
|
|
34
|
+
@Input() size: FieldSizeType | undefined = FieldSize.medium;
|
|
35
|
+
@Input() layout: LayoutTypeType = LayoutType.horizontal;
|
|
36
|
+
@Input() icon!: string;
|
|
37
|
+
@Input() activeIndex = 0;
|
|
38
|
+
@Input() annotation!: string;
|
|
39
|
+
@Output() activeIndexChange = new EventEmitter<number>();
|
|
25
40
|
}
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
[label]="label"
|
|
5
5
|
[tooltip]="tooltip"
|
|
6
6
|
[required]="isRequired()"
|
|
7
|
-
[ngControl]="ngControl"
|
|
8
7
|
[testId]="testId"
|
|
9
8
|
[display]="formDisplay"
|
|
10
9
|
>
|
|
@@ -14,6 +13,6 @@
|
|
|
14
13
|
[title]="label"
|
|
15
14
|
[readonly]="readonly"
|
|
16
15
|
[inputId]="id"
|
|
17
|
-
|
|
16
|
+
/><v-validation-message [ngControl]="ngControl"></v-validation-message>
|
|
18
17
|
</v-form-field>
|
|
19
18
|
</div>
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
import { BaseFormInputComponent, BaseInputControls, SWITCH_COMPONENT_TOKEN, SwitchCore } from '@verisoft/ui-core';
|
|
15
15
|
import { InputSwitchModule } from 'primeng/inputswitch';
|
|
16
16
|
import { v4 as uuidv4 } from 'uuid';
|
|
17
|
+
import { ErrorComponent } from '../errors';
|
|
17
18
|
import { FormFieldComponent } from '../form-field';
|
|
18
19
|
|
|
19
20
|
@Component({
|
|
@@ -24,6 +25,7 @@ import { FormFieldComponent } from '../form-field';
|
|
|
24
25
|
InputSwitchModule,
|
|
25
26
|
ReactiveFormsModule,
|
|
26
27
|
FormFieldComponent,
|
|
28
|
+
ErrorComponent
|
|
27
29
|
],
|
|
28
30
|
templateUrl: './switch.component.html',
|
|
29
31
|
styleUrl: './switch.component.scss',
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Pipe, PipeTransform } from '@angular/core';
|
|
2
|
+
import { TabViewItemCore } from '@verisoft/ui-core';
|
|
3
|
+
import { MenuItem } from 'primeng/api';
|
|
4
|
+
|
|
5
|
+
@Pipe({
|
|
6
|
+
name: 'tabMenu',
|
|
7
|
+
pure: true,
|
|
8
|
+
})
|
|
9
|
+
export class TabMenuPipe implements PipeTransform {
|
|
10
|
+
transform(value: TabViewItemCore[] | undefined): MenuItem[] | undefined {
|
|
11
|
+
if (!value) {
|
|
12
|
+
return undefined;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
return value.map((x) => ({
|
|
16
|
+
label: x.title,
|
|
17
|
+
icon: x.icon,
|
|
18
|
+
disabled: x.disabled,
|
|
19
|
+
routerLink: x.url,
|
|
20
|
+
}));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
<div class="v-tab-view">
|
|
2
2
|
@if (useRouting) {
|
|
3
3
|
<p-tabMenu
|
|
4
|
-
|
|
5
|
-
[model]="items"
|
|
4
|
+
[model]="mergedItems | tabMenu"
|
|
6
5
|
[activeItem]="items[activeIndex]"
|
|
7
6
|
(activeItemChange)="activeItemChanged($event)"
|
|
8
7
|
>
|
|
@@ -11,7 +10,7 @@
|
|
|
11
10
|
} @else {
|
|
12
11
|
<p-tabView (activeIndexChange)="activeItemChanged($event)">
|
|
13
12
|
@for (item of mergedItems; track item; let index = $index) {
|
|
14
|
-
<p-tabPanel [selected]="activeIndex === index" [header]="item.title">
|
|
13
|
+
<p-tabPanel [selected]="activeIndex === index" [header]="item.title" [disabled]="item.disabled === true">
|
|
15
14
|
@if (item.contentTemplate){
|
|
16
15
|
<ng-container *ngTemplateOutlet="item.contentTemplate"></ng-container>
|
|
17
16
|
} @else if (item.content) {
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
Output,
|
|
8
8
|
QueryList,
|
|
9
9
|
} from '@angular/core';
|
|
10
|
-
import { TabViewCore,
|
|
10
|
+
import { TabViewCore, TabViewItemCore } from '@verisoft/ui-core';
|
|
11
11
|
import { MenuItem } from 'primeng/api';
|
|
12
12
|
import { TabViewItemComponent } from './tab-view-item.component';
|
|
13
13
|
|
|
@@ -21,7 +21,7 @@ export class TabViewComponent
|
|
|
21
21
|
@ContentChildren(TabViewItemComponent)
|
|
22
22
|
children!: QueryList<TabViewItemComponent>;
|
|
23
23
|
|
|
24
|
-
@Input() items:
|
|
24
|
+
@Input() items: TabViewItemCore[] = [];
|
|
25
25
|
|
|
26
26
|
@Input() useRouting = false;
|
|
27
27
|
|
|
@@ -29,7 +29,7 @@ export class TabViewComponent
|
|
|
29
29
|
|
|
30
30
|
@Output() activeIndexChange = new EventEmitter<number>();
|
|
31
31
|
|
|
32
|
-
mergedItems:
|
|
32
|
+
mergedItems: TabViewItemCore[] = [];
|
|
33
33
|
|
|
34
34
|
ngAfterContentInit(): void {
|
|
35
35
|
this.mergedItems = [...this.items, ...this.children.toArray()];
|
|
@@ -40,7 +40,7 @@ export class TabViewComponent
|
|
|
40
40
|
if (typeof item === 'number') {
|
|
41
41
|
index = item;
|
|
42
42
|
} else {
|
|
43
|
-
index = this.items.indexOf(item as
|
|
43
|
+
index = this.items.indexOf(item as TabViewItemCore);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
if (index != -1) {
|
|
@@ -4,12 +4,13 @@ import { RouterOutlet } from '@angular/router';
|
|
|
4
4
|
import { TAB_VIEW_COMPONENT_TOKEN } from '@verisoft/ui-core';
|
|
5
5
|
import { TabMenuModule } from 'primeng/tabmenu';
|
|
6
6
|
import { TabViewModule as PrimeTabViewModule } from 'primeng/tabview';
|
|
7
|
+
import { TabMenuPipe } from './tab-menu.pipe';
|
|
7
8
|
import { TabViewItemComponent } from './tab-view-item.component';
|
|
8
9
|
import { TabViewComponent } from './tab-view.component';
|
|
9
10
|
|
|
10
11
|
@NgModule({
|
|
11
12
|
imports: [RouterOutlet, TabMenuModule, PrimeTabViewModule, NgTemplateOutlet],
|
|
12
|
-
declarations: [TabViewComponent, TabViewItemComponent],
|
|
13
|
+
declarations: [TabViewComponent, TabViewItemComponent, TabMenuPipe],
|
|
13
14
|
exports: [TabViewComponent, TabViewItemComponent],
|
|
14
15
|
providers: [
|
|
15
16
|
{ provide: TAB_VIEW_COMPONENT_TOKEN, useExisting: TabViewComponent },
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Pipe, PipeTransform } from '@angular/core';
|
|
2
|
+
import { FilterMetadata } from 'primeng/api';
|
|
3
|
+
|
|
4
|
+
type PrimeNgFilterDefinition = {
|
|
5
|
+
[s: string]: FilterMetadata | FilterMetadata[];
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
@Pipe({
|
|
9
|
+
name: 'primengFilter',
|
|
10
|
+
standalone: true,
|
|
11
|
+
})
|
|
12
|
+
export class TableFilterPipe<T> implements PipeTransform {
|
|
13
|
+
transform(value: Partial<T>): PrimeNgFilterDefinition | undefined {
|
|
14
|
+
if (value == undefined) {
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return Object.entries(value)
|
|
19
|
+
.filter((x) => x[0] != undefined)
|
|
20
|
+
.reduce((currentFilter: PrimeNgFilterDefinition, [key, value]) => {
|
|
21
|
+
const filterValue = this.convertToFilterMetadata(value);
|
|
22
|
+
if (filterValue) {
|
|
23
|
+
if (key === 'searchField') {
|
|
24
|
+
key = 'global';
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
currentFilter[key] = filterValue;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return currentFilter;
|
|
31
|
+
}, {});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
private convertToFilterMetadata(
|
|
35
|
+
value: unknown
|
|
36
|
+
): FilterMetadata | FilterMetadata[] | undefined {
|
|
37
|
+
if (value == undefined) {
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (typeof value == 'string') {
|
|
42
|
+
return {
|
|
43
|
+
matchMode: 'contains',
|
|
44
|
+
value: value,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (Array.isArray(value)) {
|
|
49
|
+
return value.map((x) =>
|
|
50
|
+
this.convertToFilterMetadata(x)
|
|
51
|
+
) as FilterMetadata[];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return {
|
|
55
|
+
matchMode: 'equals',
|
|
56
|
+
value: value,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -1,183 +1,123 @@
|
|
|
1
|
-
<div class="
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
[
|
|
53
|
-
(dblclick)="
|
|
54
|
-
router.navigate(['./' + row.row[entityId]], { relativeTo: route })
|
|
55
|
-
"
|
|
1
|
+
<div class="v-table">
|
|
2
|
+
<p-table
|
|
3
|
+
#table
|
|
4
|
+
class="v-table"
|
|
5
|
+
[value]="tableRows"
|
|
6
|
+
[filters]="filter | primengFilter"
|
|
7
|
+
[paginator]="showPaginator"
|
|
8
|
+
[rows]="pageSize"
|
|
9
|
+
[totalRecords]="total"
|
|
10
|
+
[loading]="loading"
|
|
11
|
+
[lazy]="lazy"
|
|
12
|
+
dataKey="id"
|
|
13
|
+
[scrollable]="scrollable"
|
|
14
|
+
[sortMode]="sortMultiple ? 'multiple' : 'single'"
|
|
15
|
+
[scrollHeight]="'flex'"
|
|
16
|
+
[selectionMode]="selectionMode"
|
|
17
|
+
[selection]="tableSelection"
|
|
18
|
+
[rowsPerPageOptions]="[10, 25, 50, 100]"
|
|
19
|
+
[expandedRowKeys]="expandedRows"
|
|
20
|
+
[showCurrentPageReport]="true"
|
|
21
|
+
currentPageReportTemplate="Showing {first} to {last} of {totalRecords} entries"
|
|
22
|
+
[customSort]="lazy"
|
|
23
|
+
[multiSortMeta]="sortMeta"
|
|
24
|
+
[resizableColumns]="true"
|
|
25
|
+
columnResizeMode="expand"
|
|
26
|
+
[globalFilterFields]="globalFilterFields"
|
|
27
|
+
(onPage)="pageChanged($event)"
|
|
28
|
+
(onSort)="sortChanged($event)"
|
|
29
|
+
(selectionChange)="selectionChanged($event)"
|
|
30
|
+
(onLazyLoad)="fireLazyLoad($event)"
|
|
31
|
+
>
|
|
32
|
+
<ng-template pTemplate="header">
|
|
33
|
+
<tr>
|
|
34
|
+
@if (selectionMode === 'multiple') {
|
|
35
|
+
<th>
|
|
36
|
+
<p-tableHeaderCheckbox></p-tableHeaderCheckbox>
|
|
37
|
+
</th>
|
|
38
|
+
} @for (column of tableColumns; track column; let index = $index) {
|
|
39
|
+
<th
|
|
40
|
+
*ngIf="column.sortable"
|
|
41
|
+
pResizableColumn
|
|
42
|
+
[pSortableColumn]="'row.' + column.id"
|
|
43
|
+
[style.width]="column.width"
|
|
44
|
+
>
|
|
45
|
+
{{ column.headerGetter(column.id, index) }}
|
|
46
|
+
<p-sortIcon [field]="'row.' + column.id"></p-sortIcon>
|
|
47
|
+
</th>
|
|
48
|
+
<th
|
|
49
|
+
*ngIf="!column.sortable"
|
|
50
|
+
pResizableColumn
|
|
51
|
+
[class.v-auto-cell]="column.template"
|
|
52
|
+
[style.width]="column.width"
|
|
56
53
|
>
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
<td>
|
|
84
|
-
<p-button
|
|
85
|
-
type="button"
|
|
86
|
-
pRipple
|
|
87
|
-
severity="primary"
|
|
88
|
-
[pRowToggler]="row"
|
|
89
|
-
[text]="true"
|
|
90
|
-
[rounded]="true"
|
|
91
|
-
[plain]="true"
|
|
92
|
-
[icon]="expanded ? 'pi pi-chevron-down' : 'pi pi-chevron-right'"
|
|
93
|
-
/>
|
|
94
|
-
</td>
|
|
95
|
-
</tr>
|
|
96
|
-
</ng-template>
|
|
97
|
-
<ng-template pTemplate="rowexpansion" let-row>
|
|
98
|
-
<span
|
|
99
|
-
class="w-100"
|
|
100
|
-
*ngTemplateOutlet="
|
|
101
|
-
expansionTemplate.template;
|
|
102
|
-
context: { $implicit: row.row }
|
|
103
|
-
"
|
|
104
|
-
></span>
|
|
105
|
-
</ng-template>
|
|
106
|
-
</p-table>
|
|
107
|
-
</ng-container>
|
|
108
|
-
<ng-container *ngIf="screenSizeService.isMobileBlock | async">
|
|
109
|
-
<p-table
|
|
110
|
-
[value]="tableRows"
|
|
111
|
-
[paginator]="showPaginator"
|
|
112
|
-
[rows]="pageSize"
|
|
113
|
-
[totalRecords]="total"
|
|
114
|
-
[loading]="loading"
|
|
115
|
-
[lazy]="lazy"
|
|
116
|
-
[scrollable]="scrollable"
|
|
117
|
-
[sortMode]="sortMultiple ? 'multiple' : 'single'"
|
|
118
|
-
[scrollHeight]="scrollHeight"
|
|
119
|
-
[selectionMode]="selectionMode"
|
|
120
|
-
rowExpandMode="multiple"
|
|
121
|
-
[dataKey]="'row.id'"
|
|
122
|
-
[(selection)]="selection"
|
|
123
|
-
(selectionChange)="selectionChanged($event)"
|
|
124
|
-
[rowsPerPageOptions]="[10, 25, 50, 100]"
|
|
125
|
-
(onPage)="pageChanged($event)"
|
|
126
|
-
[showCurrentPageReport]="true"
|
|
127
|
-
currentPageReportTemplate="Showing {first} to {last} of {totalRecords} entries"
|
|
128
|
-
metaKeySelection="true"
|
|
129
|
-
[customSort]="true"
|
|
130
|
-
(onSort)="sortChanged($event)"
|
|
131
|
-
>
|
|
132
|
-
<ng-template pTemplate="body" let-row>
|
|
133
|
-
<tr
|
|
134
|
-
class="d-block"
|
|
135
|
-
[pSelectableRow]="row"
|
|
136
|
-
(dblclick)="
|
|
137
|
-
router.navigate(['./' + row.row[entityId]], { relativeTo: route })
|
|
138
|
-
"
|
|
54
|
+
{{ column.headerGetter(column.id, index) }}
|
|
55
|
+
</th>
|
|
56
|
+
} @if (rowDetailTemplate){
|
|
57
|
+
<th></th>
|
|
58
|
+
}
|
|
59
|
+
</tr>
|
|
60
|
+
</ng-template>
|
|
61
|
+
<ng-template pTemplate="body" let-row let-expanded="expanded">
|
|
62
|
+
<tr
|
|
63
|
+
[pSelectableRow]="row"
|
|
64
|
+
[pSelectableRowDisabled]="selectionMode !== 'single'"
|
|
65
|
+
(dblclick)="
|
|
66
|
+
router.navigate(['./' + row.row[entityKey ?? 'id']], {
|
|
67
|
+
relativeTo: route
|
|
68
|
+
})
|
|
69
|
+
"
|
|
70
|
+
>
|
|
71
|
+
@if (selectionMode === 'multiple'){
|
|
72
|
+
<td>
|
|
73
|
+
<p-tableCheckbox [value]="row"></p-tableCheckbox>
|
|
74
|
+
</td>
|
|
75
|
+
}
|
|
76
|
+
<td
|
|
77
|
+
*ngFor="let cd of tableColumns; let index = index"
|
|
78
|
+
[class]="cd.columnClass!"
|
|
79
|
+
[class.v-auto-cell]="cd.template"
|
|
139
80
|
>
|
|
140
|
-
<
|
|
141
|
-
<
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
</ng-container>
|
|
81
|
+
<ng-container *ngIf="cd.template">
|
|
82
|
+
<ng-container
|
|
83
|
+
*ngTemplateOutlet="cd.template; context: { $implicit: row.row }"
|
|
84
|
+
></ng-container>
|
|
85
|
+
</ng-container>
|
|
86
|
+
<span
|
|
87
|
+
*ngIf="!row.template"
|
|
88
|
+
[queryParams]="cd.queryParams ? cd.queryParams : undefined"
|
|
89
|
+
[routerLink]="cd.routerLink ? cd.routerLink(row.row) : undefined"
|
|
90
|
+
[innerHTML]="cd.valueGetter(row.row, index)"
|
|
91
|
+
></span>
|
|
92
|
+
</td>
|
|
93
|
+
@if (rowDetailTemplate){
|
|
94
|
+
<td>
|
|
95
|
+
<p-button
|
|
96
|
+
type="button"
|
|
97
|
+
pRipple
|
|
98
|
+
severity="primary"
|
|
99
|
+
[pRowToggler]="row"
|
|
100
|
+
[text]="true"
|
|
101
|
+
[rounded]="true"
|
|
102
|
+
[plain]="true"
|
|
103
|
+
[icon]="expanded ? icons.chevronDown : icons.chevronRight"
|
|
104
|
+
/>
|
|
105
|
+
</td>
|
|
106
|
+
}
|
|
107
|
+
</tr>
|
|
108
|
+
</ng-template>
|
|
109
|
+
<ng-template pTemplate="rowexpansion" let-row>
|
|
110
|
+
<tr>
|
|
111
|
+
<td [attr.colspan]="tableColumns.length + 1">
|
|
112
|
+
<ng-container
|
|
113
|
+
class="w-100"
|
|
114
|
+
*ngTemplateOutlet="
|
|
115
|
+
expansionTemplate.template;
|
|
116
|
+
context: { $implicit: row.row }
|
|
117
|
+
"
|
|
118
|
+
></ng-container>
|
|
119
|
+
</td>
|
|
120
|
+
</tr>
|
|
121
|
+
</ng-template>
|
|
122
|
+
</p-table>
|
|
183
123
|
</div>
|