@unifylib/ui-lib 1.0.3 → 1.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.
Files changed (155) hide show
  1. package/ng-package.json +7 -7
  2. package/package.json +14 -12
  3. package/src/lib/base-model/SearchStrConfig.ts +12 -12
  4. package/src/lib/base-model/api-response.ts +23 -23
  5. package/src/lib/base-model/audit-log-entry.ts +7 -7
  6. package/src/lib/base-model/button-action-settings.ts +29 -25
  7. package/src/lib/base-model/column-def.model.ts +34 -34
  8. package/src/lib/base-model/do-action-request.ts +11 -11
  9. package/src/lib/base-model/feature-item.ts +9 -0
  10. package/src/lib/base-model/field-action.ts +7 -7
  11. package/src/lib/base-model/field-filter.model.ts +7 -14
  12. package/src/lib/base-model/field-info.ts +102 -98
  13. package/src/lib/base-model/field-predicate.model.ts +7 -7
  14. package/src/lib/base-model/filter-request.ts +27 -27
  15. package/src/lib/base-model/filter.model.ts +49 -49
  16. package/src/lib/base-model/get-items-list.ts +24 -24
  17. package/src/lib/base-model/index.ts +11 -11
  18. package/src/lib/base-model/items-total.model.ts +12 -0
  19. package/src/lib/base-model/line-item.model.ts +18 -0
  20. package/src/lib/base-model/lookupItem.ts +21 -21
  21. package/src/lib/base-model/null-snackmessage.ts +9 -9
  22. package/src/lib/base-model/page-info.ts +54 -51
  23. package/src/lib/base-model/report-request.model.ts +33 -33
  24. package/src/lib/base-model/response-envelop.model.ts +15 -15
  25. package/src/lib/base-model/snack-message.model.ts +14 -14
  26. package/src/lib/base-model/snackmessage-interface.ts +7 -7
  27. package/src/lib/base-model/table-column.interface.ts +29 -29
  28. package/src/lib/base-model/table-page-user-action.interface.ts +33 -33
  29. package/src/lib/base-model/workflow/workflow-steps.model.ts +9 -9
  30. package/src/lib/base-model/workflow/workflow.model.ts +52 -52
  31. package/src/lib/components/action-comment/action-comment.component.css +52 -0
  32. package/src/lib/components/action-comment/action-comment.component.html +47 -0
  33. package/src/lib/components/{rejection-comment → action-comment}/action-comment.component.spec.ts +23 -23
  34. package/src/lib/components/{rejection-comment → action-comment}/action-comment.component.ts +102 -86
  35. package/src/lib/components/action-confirmation/action-confirmation.component.css +46 -34
  36. package/src/lib/components/action-confirmation/action-confirmation.component.html +32 -18
  37. package/src/lib/components/action-confirmation/action-confirmation.component.spec.ts +23 -23
  38. package/src/lib/components/action-confirmation/action-confirmation.component.ts +58 -58
  39. package/src/lib/components/activity-report-form/activity-report-form.component.html +110 -109
  40. package/src/lib/components/activity-report-form/activity-report-form.component.scss +69 -0
  41. package/src/lib/components/activity-report-form/activity-report-form.component.spec.ts +25 -25
  42. package/src/lib/components/activity-report-form/activity-report-form.component.ts +616 -605
  43. package/src/lib/components/advanced-filter/field-filter/field-filter.component.html +8 -0
  44. package/src/lib/components/advanced-filter/field-filter/field-filter.component.scss +0 -0
  45. package/src/lib/components/advanced-filter/field-filter/field-filter.component.spec.ts +25 -0
  46. package/src/lib/components/advanced-filter/field-filter/field-filter.component.ts +55 -0
  47. package/src/lib/components/advanced-filter/filter-builder/filter-builder.component.html +36 -0
  48. package/src/lib/components/advanced-filter/filter-builder/filter-builder.component.scss +130 -0
  49. package/src/lib/components/advanced-filter/filter-builder/filter-builder.component.spec.ts +25 -0
  50. package/src/lib/components/advanced-filter/filter-builder/filter-builder.component.ts +186 -0
  51. package/src/lib/components/audit-log-details-dialog/audit-log-details-dialog.component.css +51 -51
  52. package/src/lib/components/audit-log-details-dialog/audit-log-details-dialog.component.html +23 -23
  53. package/src/lib/components/audit-log-details-dialog/audit-log-details-dialog.component.spec.ts +23 -23
  54. package/src/lib/components/audit-log-details-dialog/audit-log-details-dialog.component.ts +69 -69
  55. package/src/lib/components/audit-log-list/audit-log.component.html +26 -23
  56. package/src/lib/components/audit-log-list/audit-log.component.scss +50 -0
  57. package/src/lib/components/audit-log-list/audit-log.component.spec.ts +25 -25
  58. package/src/lib/components/audit-log-list/audit-log.component.ts +114 -116
  59. package/src/lib/components/auto-complete/auto-complete.component.css +55 -14
  60. package/src/lib/components/auto-complete/auto-complete.component.html +45 -29
  61. package/src/lib/components/auto-complete/auto-complete.component.spec.ts +23 -23
  62. package/src/lib/components/auto-complete/auto-complete.component.ts +331 -330
  63. package/src/lib/components/base-form/base-form.component.html +59 -58
  64. package/src/lib/components/base-form/base-form.component.scss +68 -0
  65. package/src/lib/components/base-form/base-form.component.spec.ts +25 -25
  66. package/src/lib/components/base-form/base-form.component.ts +323 -305
  67. package/src/lib/components/base-form-canvas/base-form-canvas.component.css +196 -22
  68. package/src/lib/components/base-form-canvas/base-form-canvas.component.html +1095 -1006
  69. package/src/lib/components/base-form-canvas/base-form-canvas.component.spec.ts +23 -23
  70. package/src/lib/components/base-form-canvas/base-form-canvas.component.ts +680 -573
  71. package/src/lib/components/base-input-dialog/base-input-dialog.component.css +67 -0
  72. package/src/lib/components/base-input-dialog/base-input-dialog.component.html +47 -42
  73. package/src/lib/components/base-input-dialog/base-input-dialog.component.spec.ts +23 -23
  74. package/src/lib/components/base-input-dialog/base-input-dialog.component.ts +77 -78
  75. package/src/lib/components/base-table/base-table.component.html +268 -242
  76. package/src/lib/components/base-table/base-table.component.scss +140 -31
  77. package/src/lib/components/base-table/base-table.component.spec.ts +25 -25
  78. package/src/lib/components/base-table/base-table.component.ts +621 -568
  79. package/src/lib/components/button-actions/button-actions.component.html +27 -28
  80. package/src/lib/components/button-actions/button-actions.component.scss +101 -6
  81. package/src/lib/components/button-actions/button-actions.component.spec.ts +23 -23
  82. package/src/lib/components/button-actions/button-actions.component.ts +70 -72
  83. package/src/lib/components/editable-base-table/editable-base-table.component.html +337 -372
  84. package/src/lib/components/editable-base-table/editable-base-table.component.scss +126 -44
  85. package/src/lib/components/editable-base-table/editable-base-table.component.spec.ts +25 -25
  86. package/src/lib/components/editable-base-table/editable-base-table.component.ts +579 -570
  87. package/src/lib/components/equation-builder/equation-builder.component.css +39 -0
  88. package/src/lib/components/equation-builder/equation-builder.component.html +31 -31
  89. package/src/lib/components/equation-builder/equation-builder.component.spec.ts +23 -23
  90. package/src/lib/components/equation-builder/equation-builder.component.ts +119 -121
  91. package/src/lib/components/item-line-editor/item-line-editor.component.html +102 -0
  92. package/src/lib/components/item-line-editor/item-line-editor.component.scss +152 -0
  93. package/src/lib/components/item-line-editor/item-line-editor.component.spec.ts +23 -0
  94. package/src/lib/components/item-line-editor/item-line-editor.component.ts +306 -0
  95. package/src/lib/components/multi-auto-complete/multi-auto-complete.component.css +19 -11
  96. package/src/lib/components/multi-auto-complete/multi-auto-complete.component.html +38 -38
  97. package/src/lib/components/multi-auto-complete/multi-auto-complete.component.spec.ts +23 -23
  98. package/src/lib/components/multi-auto-complete/multi-auto-complete.component.ts +315 -317
  99. package/src/lib/components/paginator/paginator.component.css +65 -25
  100. package/src/lib/components/paginator/paginator.component.html +30 -34
  101. package/src/lib/components/paginator/paginator.component.ts +87 -94
  102. package/src/lib/components/report-details-dialog/report-details-dialog.component.css +17 -17
  103. package/src/lib/components/report-details-dialog/report-details-dialog.component.html +16 -16
  104. package/src/lib/components/report-details-dialog/report-details-dialog.component.spec.ts +23 -23
  105. package/src/lib/components/report-details-dialog/report-details-dialog.component.ts +111 -113
  106. package/src/lib/components/report-form/report-form.component.html +92 -94
  107. package/src/lib/components/report-form/report-form.component.scss +51 -0
  108. package/src/lib/components/report-form/report-form.component.spec.ts +25 -25
  109. package/src/lib/components/report-form/report-form.component.ts +599 -588
  110. package/src/lib/components/search-bar/search-bar.component.html +51 -62
  111. package/src/lib/components/search-bar/search-bar.component.scss +63 -8
  112. package/src/lib/components/search-bar/search-bar.component.spec.ts +25 -25
  113. package/src/lib/components/search-bar/search-bar.component.ts +68 -70
  114. package/src/lib/components/section-form-canvas/section-form-canvas.component.html +43 -0
  115. package/src/lib/components/section-form-canvas/section-form-canvas.component.scss +81 -0
  116. package/src/lib/components/section-form-canvas/section-form-canvas.component.spec.ts +23 -0
  117. package/src/lib/components/section-form-canvas/section-form-canvas.component.ts +67 -0
  118. package/src/lib/components/shared/action-button/action-button.component.html +12 -0
  119. package/src/lib/components/shared/action-button/action-button.component.scss +45 -0
  120. package/src/lib/components/shared/action-button/action-button.component.ts +51 -0
  121. package/src/lib/components/shared/action-card/action-card.component.html +78 -0
  122. package/src/lib/components/shared/action-card/action-card.component.scss +238 -0
  123. package/src/lib/components/shared/action-card/action-card.component.ts +56 -0
  124. package/src/lib/components/shared/attachment-uploader/attachment-uploader.component.css +135 -54
  125. package/src/lib/components/shared/attachment-uploader/attachment-uploader.component.html +36 -22
  126. package/src/lib/components/shared/attachment-uploader/attachment-uploader.component.spec.ts +23 -23
  127. package/src/lib/components/shared/attachment-uploader/attachment-uploader.component.ts +71 -45
  128. package/src/lib/components/shared-list/shared-list.component.html +17 -17
  129. package/src/lib/components/shared-list/shared-list.component.spec.ts +23 -23
  130. package/src/lib/components/shared-list/shared-list.component.ts +53 -53
  131. package/src/lib/components/snackbar-static/snackbar-static.component.html +20 -0
  132. package/src/lib/components/snackbar-static/snackbar-static.component.scss +135 -0
  133. package/src/lib/components/snackbar-static/snackbar-static.component.ts +26 -0
  134. package/src/lib/components/title-bar/title-bar.component.html +35 -31
  135. package/src/lib/components/title-bar/title-bar.component.scss +126 -23
  136. package/src/lib/components/title-bar/title-bar.component.spec.ts +23 -23
  137. package/src/lib/components/title-bar/title-bar.component.ts +126 -119
  138. package/src/lib/services/backend-service.ts +287 -286
  139. package/src/lib/services/index.ts +3 -3
  140. package/src/lib/services/top-panel.ts +17 -17
  141. package/src/lib/services/trigger-form.service.ts +11 -11
  142. package/src/lib/share-module/shared-module.ts +10 -10
  143. package/src/lib/utils/base-utils.ts +102 -102
  144. package/src/lib/validators/date-range-validator.ts +31 -31
  145. package/src/lib/validators/index.ts +3 -3
  146. package/src/lib/validators/match-list.validator.ts +10 -10
  147. package/src/lib/validators/multi-email-validator.ts +15 -15
  148. package/src/public-api.ts +29 -21
  149. package/tsconfig.lib.json +15 -15
  150. package/tsconfig.lib.prod.json +11 -11
  151. package/tsconfig.spec.json +15 -15
  152. package/src/lib/components/rejection-comment/action-comment.component.css +0 -33
  153. package/src/lib/components/rejection-comment/action-comment.component.html +0 -46
  154. package/src/lib/styles/invoiceq-theme.scss +0 -252
  155. package/src/lib/styles/styles.scss +0 -1723
@@ -1,23 +1,23 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { AttachmentUploaderComponent } from './attachment-uploader.component';
4
-
5
- describe('AttachmentUploaderComponent', () => {
6
- let component: AttachmentUploaderComponent;
7
- let fixture: ComponentFixture<AttachmentUploaderComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- imports: [AttachmentUploaderComponent]
12
- })
13
- .compileComponents();
14
-
15
- fixture = TestBed.createComponent(AttachmentUploaderComponent);
16
- component = fixture.componentInstance;
17
- fixture.detectChanges();
18
- });
19
-
20
- it('should create', () => {
21
- expect(component).toBeTruthy();
22
- });
23
- });
1
+ import { ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+ import { AttachmentUploaderComponent } from './attachment-uploader.component';
4
+
5
+ describe('AttachmentUploaderComponent', () => {
6
+ let component: AttachmentUploaderComponent;
7
+ let fixture: ComponentFixture<AttachmentUploaderComponent>;
8
+
9
+ beforeEach(async () => {
10
+ await TestBed.configureTestingModule({
11
+ imports: [AttachmentUploaderComponent]
12
+ })
13
+ .compileComponents();
14
+
15
+ fixture = TestBed.createComponent(AttachmentUploaderComponent);
16
+ component = fixture.componentInstance;
17
+ fixture.detectChanges();
18
+ });
19
+
20
+ it('should create', () => {
21
+ expect(component).toBeTruthy();
22
+ });
23
+ });
@@ -1,45 +1,71 @@
1
- import {Component, ElementRef, EventEmitter, Output, ViewChild} from '@angular/core';
2
- import {MatIcon} from "@angular/material/icon";
3
- import {TranslateModule} from "@ngx-translate/core";
4
- import {MatButton, MatIconButton} from "@angular/material/button";
5
- import {NgIf} from "@angular/common";
6
- import {MatTooltip} from "@angular/material/tooltip";
7
-
8
- @Component({
9
- selector: 'app-attachment-uploader',
10
- standalone: true,
11
- imports: [
12
- MatIcon,
13
- TranslateModule,
14
- MatButton,
15
- NgIf,
16
- MatTooltip,
17
- MatIconButton,
18
- ],
19
- templateUrl: './attachment-uploader.component.html',
20
- styleUrl: './attachment-uploader.component.css'
21
- })
22
- export class AttachmentUploaderComponent {
23
- @ViewChild('fileUpload') fileUpload!: ElementRef<HTMLInputElement>;
24
- @Output() fileSelected = new EventEmitter<File | null>();
25
-
26
- selectedFile: File | null = null;
27
-
28
- triggerAttachmentUpload(): void {
29
- this.fileUpload.nativeElement.click();
30
- }
31
-
32
- uploadFileToServer(): void {
33
- const file = this.fileUpload.nativeElement.files?.[0];
34
- if (file) {
35
- this.selectedFile = file;
36
- this.fileSelected.emit(file);
37
- }
38
- }
39
-
40
- clearFile(): void {
41
- this.selectedFile = null;
42
- this.fileUpload.nativeElement.value = '';
43
- this.fileSelected.emit(null);
44
- }
45
- }
1
+ import {Component, ElementRef, EventEmitter, Output, ViewChild} from '@angular/core';
2
+ import {MatIcon} from "@angular/material/icon";
3
+ import {TranslateModule} from "@ngx-translate/core";
4
+ import {MatButton, MatIconButton} from "@angular/material/button";
5
+ import {NgIf} from "@angular/common";
6
+ import {MatTooltip} from "@angular/material/tooltip";
7
+
8
+ @Component({
9
+ selector: 'app-attachment-uploader',
10
+ standalone: true,
11
+ imports: [
12
+ MatIcon,
13
+ TranslateModule,
14
+ MatButton,
15
+ NgIf,
16
+ MatTooltip,
17
+ MatIconButton,
18
+ ],
19
+ templateUrl: './attachment-uploader.component.html',
20
+ styleUrl: './attachment-uploader.component.css'
21
+ })
22
+ export class AttachmentUploaderComponent {
23
+ @ViewChild('fileUpload') fileUpload!: ElementRef<HTMLInputElement>;
24
+ @Output() fileSelected = new EventEmitter<File | null>();
25
+
26
+ selectedFile: File | null = null;
27
+ isDragOver = false;
28
+
29
+ triggerAttachmentUpload(): void {
30
+ this.fileUpload.nativeElement.click();
31
+ }
32
+
33
+ uploadFileToServer(): void {
34
+ const file = this.fileUpload.nativeElement.files?.[0];
35
+ if (file) {
36
+ this.selectedFile = file;
37
+ this.fileSelected.emit(file);
38
+ }
39
+ }
40
+
41
+ clearFile(): void {
42
+ this.selectedFile = null;
43
+ this.fileUpload.nativeElement.value = '';
44
+ this.fileSelected.emit(null);
45
+ }
46
+
47
+ onDragOver(event: DragEvent): void {
48
+ event.preventDefault();
49
+ event.stopPropagation();
50
+ this.isDragOver = true;
51
+ }
52
+
53
+ onDragLeave(event: DragEvent): void {
54
+ event.preventDefault();
55
+ event.stopPropagation();
56
+ this.isDragOver = false;
57
+ }
58
+
59
+ onDrop(event: DragEvent): void {
60
+ event.preventDefault();
61
+ event.stopPropagation();
62
+ this.isDragOver = false;
63
+
64
+ const files = event.dataTransfer?.files;
65
+ if (files && files.length > 0) {
66
+ const file = files[0];
67
+ this.selectedFile = file;
68
+ this.fileSelected.emit(file);
69
+ }
70
+ }
71
+ }
@@ -1,17 +1,17 @@
1
- <ng-container *ngIf="readyToLoad">
2
- @if (editableTable) {
3
- <app-editable-base-table [filterRequest]="filterRequest" [pageInfo]="pageInfo"
4
- [fields]="fields"
5
- [isPending]="isPending"
6
- ></app-editable-base-table>
7
-
8
- } @else {
9
-
10
- <app-base-table [filters]="filters" [pageInfo]="pageInfo"
11
- [columns]="columnsDefinition"
12
- [listAction]="listAction"
13
- [isPending]="isPending"
14
- ></app-base-table>
15
-
16
- }
17
- </ng-container>
1
+ <ng-container *ngIf="readyToLoad">
2
+ @if (editableTable) {
3
+ <app-editable-base-table [filterRequest]="filterRequest" [pageInfo]="pageInfo"
4
+ [fields]="fields"
5
+ [isPending]="isPending"
6
+ ></app-editable-base-table>
7
+
8
+ } @else {
9
+
10
+ <app-base-table [filters]="filters" [pageInfo]="pageInfo"
11
+ [columns]="columnsDefinition"
12
+ [listAction]="listAction"
13
+ [isPending]="isPending"
14
+ ></app-base-table>
15
+
16
+ }
17
+ </ng-container>
@@ -1,23 +1,23 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { SharedListComponent } from './shared-list.component';
4
-
5
- describe('SharedListComponent', () => {
6
- let component: SharedListComponent;
7
- let fixture: ComponentFixture<SharedListComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- imports: [SharedListComponent]
12
- })
13
- .compileComponents();
14
-
15
- fixture = TestBed.createComponent(SharedListComponent);
16
- component = fixture.componentInstance;
17
- fixture.detectChanges();
18
- });
19
-
20
- it('should create', () => {
21
- expect(component).toBeTruthy();
22
- });
23
- });
1
+ import { ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+ import { SharedListComponent } from './shared-list.component';
4
+
5
+ describe('SharedListComponent', () => {
6
+ let component: SharedListComponent;
7
+ let fixture: ComponentFixture<SharedListComponent>;
8
+
9
+ beforeEach(async () => {
10
+ await TestBed.configureTestingModule({
11
+ imports: [SharedListComponent]
12
+ })
13
+ .compileComponents();
14
+
15
+ fixture = TestBed.createComponent(SharedListComponent);
16
+ component = fixture.componentInstance;
17
+ fixture.detectChanges();
18
+ });
19
+
20
+ it('should create', () => {
21
+ expect(component).toBeTruthy();
22
+ });
23
+ });
@@ -1,53 +1,53 @@
1
- import {Component, OnInit} from '@angular/core';
2
- import {ActivatedRoute} from "@angular/router";
3
- import {NgIf} from "@angular/common";
4
- import {BaseTableComponent} from "../base-table/base-table.component";
5
- import {ButtonActionSettings, EMPTY_PAGE_INFO, FieldInfo, FilterRequest, PageInfo, TableColumn} from "../../base-model";
6
- import {Filter} from "../../base-model";
7
- import {EditableBaseTableComponent} from "../editable-base-table/editable-base-table.component";
8
-
9
- @Component({
10
- selector: 'app-shared-list',
11
- standalone: true,
12
- imports: [
13
- BaseTableComponent,
14
- NgIf,
15
- EditableBaseTableComponent
16
- ],
17
- templateUrl: './shared-list.component.html',
18
- styleUrls:[ './shared-list.component.css']
19
- })
20
- export class SharedListComponent implements OnInit {
21
- pageInfo: PageInfo = EMPTY_PAGE_INFO;
22
- columnsDefinition: TableColumn<any>[] = [];
23
- fields: FieldInfo[] = [];
24
- filters: Filter[] = [];
25
- readyToLoad: boolean = false;
26
- isPending: boolean = false;
27
- listAction: ButtonActionSettings[] = [];
28
- editableTable : boolean = false;
29
- filterRequest: FilterRequest = new FilterRequest();
30
- constructor(private activatedRoute: ActivatedRoute) { }
31
-
32
- ngOnInit(): void {
33
- this.activatedRoute.data.subscribe(data => {
34
- this.pageInfo = data['pageInfo'];
35
- this.columnsDefinition = data["columnsDefinition"];
36
- this.filters = data["filters"] || [];
37
-
38
- this.isPending = 'pending' === data["mode"];
39
- this.listAction = data['actions'];
40
- this.editableTable = data['editableTable'] || false;
41
- this.fields = data['fields'];
42
-
43
- this.filterRequest = new FilterRequest();
44
- this.filterRequest.columns = this.fields?.filter(c => c.type !== 'button').map(c => c.property) || [];
45
- this.filterRequest.filters = this.filters;
46
-
47
- this.readyToLoad = true;
48
-
49
- });
50
- }
51
-
52
-
53
- }
1
+ import {Component, OnInit} from '@angular/core';
2
+ import {ActivatedRoute} from "@angular/router";
3
+ import {NgIf} from "@angular/common";
4
+ import {BaseTableComponent} from "../base-table/base-table.component";
5
+ import {ButtonActionSettings, EMPTY_PAGE_INFO, FieldInfo, FilterRequest, PageInfo, TableColumn} from "../../base-model";
6
+ import {Filter} from "../../base-model";
7
+ import {EditableBaseTableComponent} from "../editable-base-table/editable-base-table.component";
8
+
9
+ @Component({
10
+ selector: 'app-shared-list',
11
+ standalone: true,
12
+ imports: [
13
+ BaseTableComponent,
14
+ NgIf,
15
+ EditableBaseTableComponent
16
+ ],
17
+ templateUrl: './shared-list.component.html',
18
+ styleUrls:[ './shared-list.component.css']
19
+ })
20
+ export class SharedListComponent implements OnInit {
21
+ pageInfo: PageInfo = EMPTY_PAGE_INFO;
22
+ columnsDefinition: TableColumn<any>[] = [];
23
+ fields: FieldInfo[] = [];
24
+ filters: Filter[] = [];
25
+ readyToLoad: boolean = false;
26
+ isPending: boolean = false;
27
+ listAction: ButtonActionSettings[] = [];
28
+ editableTable : boolean = false;
29
+ filterRequest: FilterRequest = new FilterRequest();
30
+ constructor(private activatedRoute: ActivatedRoute) { }
31
+
32
+ ngOnInit(): void {
33
+ this.activatedRoute.data.subscribe(data => {
34
+ this.pageInfo = data['pageInfo'];
35
+ this.columnsDefinition = data["columnsDefinition"];
36
+ this.filters = data["filters"] || [];
37
+
38
+ this.isPending = 'pending' === data["mode"];
39
+ this.listAction = data['actions'];
40
+ this.editableTable = data['editableTable'] || false;
41
+ this.fields = data['fields'];
42
+
43
+ this.filterRequest = new FilterRequest();
44
+ this.filterRequest.columns = this.fields?.filter(c => c.type !== 'button').map(c => c.property) || [];
45
+ this.filterRequest.filters = this.filters;
46
+
47
+ this.readyToLoad = true;
48
+
49
+ });
50
+ }
51
+
52
+
53
+ }
@@ -0,0 +1,20 @@
1
+ <div class="snackbar snackbar-{{type}}" [ngStyle]="{'width': width == 'auto' ? 'auto' : width}">
2
+ <div class="sub-snackbar">
3
+ <mat-icon *ngIf="type === 'error'">error</mat-icon>
4
+ <mat-icon *ngIf="type === 'success'">check_box</mat-icon>
5
+ <mat-icon *ngIf="type === 'warning'">warning</mat-icon>
6
+ <mat-icon *ngIf="type === 'info'">info</mat-icon>
7
+ <mat-icon *ngIf="type === 'help'">help</mat-icon>
8
+
9
+ <div class="text-content">
10
+ <div class="title">{{ titleKey | translate : paramsTitle }}</div>
11
+ <div class="subtitle">{{ messageKey | translate: params }}</div>
12
+ </div>
13
+
14
+ </div>
15
+ <div class="action" *ngIf="textBtn">
16
+ <button mat-stroked-button class="btn-none-background-primary action-btn" (click)="submit()" id="snackbar-action-btn">
17
+ {{ textBtn | translate}}
18
+ </button>
19
+ </div>
20
+ </div>
@@ -0,0 +1,135 @@
1
+ .snackbar {
2
+ position: relative;
3
+ width: auto;
4
+ max-width: 100%;
5
+ box-sizing: border-box;
6
+ background: #fff;
7
+ border: 1.5px solid #1c8c7a;
8
+ border-radius: 10px;
9
+ padding: 12px 20px;
10
+ display: flex;
11
+ flex-direction: column;
12
+ color: #1c8c7a;
13
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
14
+ overflow: hidden;
15
+ word-break: break-word;
16
+ overflow-wrap: anywhere;
17
+ --snackbar-icon-size: clamp(16px, 2.4vw, 20px);
18
+ --snackbar-title-size: clamp(14px, 2.6vw, 16px);
19
+ --snackbar-subtitle-size: clamp(12px, 2.3vw, 14px);
20
+
21
+ .sub-snackbar {
22
+ display: flex;
23
+ gap: 10px;
24
+ align-items: start;
25
+
26
+ mat-icon {
27
+ font-size: var(--snackbar-icon-size);
28
+ line-height: 1;
29
+ width: 1em;
30
+ height: 1em;
31
+ flex: 0 0 auto;
32
+ }
33
+
34
+ .text-content {
35
+ display: flex;
36
+ flex-direction: column;
37
+ line-height: 24px;
38
+
39
+ .title {
40
+ font-weight: 400;
41
+ color: inherit;
42
+ font-family: 'lusail-regular', sans-serif;
43
+ font-size: var(--snackbar-title-size);
44
+ }
45
+
46
+ .subtitle {
47
+ font-weight: 400;
48
+ color: #888;
49
+ font-family: 'lusail-light', sans-serif;
50
+ font-size: var(--snackbar-subtitle-size);
51
+ }
52
+ }
53
+ }
54
+
55
+ .action {
56
+ display: flex;
57
+ justify-content: flex-end;
58
+
59
+ .action-btn {
60
+ font-size: var(--snackbar-title-size);
61
+ font-weight: 400;
62
+ border-radius: 8px;
63
+ min-height: 19px !important;
64
+ margin: 0 !important;
65
+ max-width: 100%;
66
+
67
+ mat-icon {
68
+ font-size: var(--snackbar-icon-size);
69
+ }
70
+ }
71
+ }
72
+ }
73
+
74
+ .snackbar-success {
75
+ border-color: #0D7D6A;
76
+ color: #0D7D6A;
77
+ }
78
+
79
+ .snackbar-error {
80
+ border-color: #a42b2b;
81
+ color: #a42b2b;
82
+ }
83
+
84
+ .snackbar-warning {
85
+ border-color: #B54708;
86
+ color: #B54708;
87
+ }
88
+
89
+ .snackbar-info {
90
+ border-color: #0d47a1;
91
+ color: #0d47a1;
92
+ }
93
+ .snackbar-help {
94
+ border-color: var(--primary-color-3nd);
95
+ color: var(--primary-color-3nd);
96
+ }
97
+
98
+ /* Responsive adjustments */
99
+ @media (max-width: 600px) {
100
+ .snackbar {
101
+ padding: 10px 14px;
102
+ /* tighten fluid sizes a bit on small screens */
103
+ --snackbar-icon-size: clamp(16px, 3.6vw, 18px);
104
+ --snackbar-title-size: clamp(14px, 3.8vw, 15px);
105
+ --snackbar-subtitle-size: clamp(12px, 3.4vw, 13px);
106
+ }
107
+
108
+ .snackbar .sub-snackbar {
109
+ gap: 8px;
110
+ }
111
+
112
+ .snackbar .sub-snackbar .text-content {
113
+ line-height: 22px;
114
+ }
115
+
116
+ .snackbar .action {
117
+ margin-top: 8px;
118
+ }
119
+
120
+ .snackbar .action .action-btn {
121
+ width: 100%;
122
+ font-size: var(--snackbar-title-size);
123
+ }
124
+ }
125
+
126
+ @media (max-width: 360px) {
127
+ .snackbar {
128
+ padding: 8px 10px;
129
+ border-radius: 8px;
130
+ /* even tighter bounds for very small devices */
131
+ --snackbar-icon-size: clamp(14px, 4.5vw, 16px);
132
+ --snackbar-title-size: clamp(13px, 4.6vw, 14px);
133
+ --snackbar-subtitle-size: clamp(11px, 4.2vw, 12px);
134
+ }
135
+ }
@@ -0,0 +1,26 @@
1
+ import {Component, EventEmitter, Input, Output} from '@angular/core';
2
+ import {MatButton, MatIconButton} from '@angular/material/button';
3
+ import { MatIcon } from '@angular/material/icon';
4
+ import {NgIf, NgStyle} from '@angular/common';
5
+ import { TranslateModule } from '@ngx-translate/core';
6
+
7
+ @Component({
8
+ selector: 'app-snackbar-static',
9
+ standalone: true,
10
+ imports: [MatIcon, NgIf, TranslateModule, MatIconButton, MatButton, NgStyle],
11
+ templateUrl: './snackbar-static.component.html',
12
+ styleUrls: ['./snackbar-static.component.scss']
13
+ })
14
+ export class SnackbarStaticComponent {
15
+ @Input() messageKey = '';
16
+ @Input() titleKey = '';
17
+ @Input() params: Record<string, any> = {};
18
+ @Input() paramsTitle: Record<string, any> = {};
19
+ @Input() type: 'error' | 'success' | 'warning' | 'info' | 'help'
20
+ @Output() actionBtn: EventEmitter<void> = new EventEmitter();
21
+ @Input() width: string = 'auto';
22
+ @Input() textBtn: string;
23
+ submit() {
24
+ this.actionBtn.emit()
25
+ }
26
+ }
@@ -1,31 +1,35 @@
1
- <div [fxLayout]="!hideBackButton ? 'row' : 'column'" fxLayout.lt-md="column" fxLayoutGap="20px" fxLayoutGap.xs="1px" fxLayoutAlign="start center" fxLayoutAlign.lt-lg="start end" class="mainTitleBar">
2
- <div fxLayout="column" fxFlex="auto" class="textTitle">
3
- <h2><span class="textTitle__titleMode">{{titleMode | translate}}</span>
4
- {{listTitle | translate}} <span *ngIf="titleCorporateAdmin&&isRoot">({{titleCorporateAdmin}})</span> {{extraData}}</h2>
5
- </div>
6
- <div fxLayout="column" fxFlex="auto" style="place-items: end">
7
- <button mat-flat-button color="primary" style="width: 100px" *ngIf="!hideBackButton" (click)="goBack()">
8
- <mat-icon color="second">{{ backIcon }}</mat-icon>
9
- <span style="font-weight: bold">{{ 'back' | translate }}</span>
10
- </button>
11
- </div>
12
- </div>
13
- <div fxLayout="row" fxLayout.lt-md="column" fxLayoutGap="20px" fxLayoutGap.xs="1px" fxLayoutAlign="start center" class="mainTitleBar" style="width: 100% !important;">
14
- <button mat-raised-button class="btn-none-background-primary" (click)="publishEvent()" color="primary"
15
- *ngIf="newAction">
16
- {{ 'add_new' | translate }}
17
- </button>
18
-
19
- <button [disabled]="totalElements == 0" mat-stroked-button [matMenuTriggerFor]="appMenu" *ngIf="showExtractButton">
20
- {{ 'extract' | translate }}
21
- <mat-icon class="expand_more actionButton__expand">expand_more</mat-icon>
22
- </button>
23
-
24
-
25
- </div>
26
- <mat-menu #appMenu="matMenu">
27
- <button mat-menu-item (click)="doExtractReport('pdf')">PDF</button>
28
- <button mat-menu-item (click)="doExtractReport('xlsx')">Excel</button>
29
- <button mat-menu-item (click)="doExtractReport('csv')">CSV</button>
30
- <button mat-menu-item *ngFor="let detail of showDetails" (click)="doExtractReport(detail.type)">{{detail.title}}</button>
31
- </mat-menu>
1
+ <div class="row mainTitleBar gap-20 default-align">
2
+
3
+ <div class="column flex-auto textTitle" >
4
+ <h2 *ngIf="false">
5
+ <span class="textTitle__titleMode">{{ titleMode | translate }}</span>
6
+ {{ listTitle | translate }}
7
+ <span *ngIf="titleCorporateAdmin && isRoot">({{ titleCorporateAdmin }})</span>
8
+ {{ extraData }}
9
+ </h2>
10
+ <span *ngIf="false" class="textTitle__subTitle">{{ subTitle | translate }}</span>
11
+ </div>
12
+
13
+ <div class="column end-items gap-20">
14
+ <button mat-flat-button color="primary" style="width: 100px" *ngIf="!hideBackButton" (click)="goBack()" id="title-bar-back-btn">
15
+ <mat-icon color="second">{{ backIcon }}</mat-icon>
16
+ <span style="font-weight: bold">{{ 'back' | translate }}</span>
17
+ </button>
18
+
19
+ <div class="row flex-auto gap-20 buttons-wrapper">
20
+ <button
21
+ mat-flat-button
22
+ *ngFor="let btn of buttons"
23
+ [color]="btn.color || 'primary'"
24
+ (click)="onButtonClick(btn)"
25
+ class="btn-background-primary action-btn"
26
+ [attr.id]="btn.id || ('title-bar-btn-' + (btn.action || btn.label || btn.key))"
27
+ >
28
+ <div class="button-text">
29
+ <mat-icon>{{ btn.icon }}</mat-icon>
30
+ <span>{{ btn.label | translate }}</span>
31
+ </div>
32
+ </button>
33
+ </div>
34
+ </div>
35
+ </div>