easy-mat-ui 0.0.6 → 0.0.7

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 (40) hide show
  1. package/fesm2022/easy-mat-ui.mjs +1119 -0
  2. package/fesm2022/easy-mat-ui.mjs.map +1 -0
  3. package/index.d.ts +279 -0
  4. package/package.json +15 -6
  5. package/ng-package.json +0 -19
  6. package/src/lib/easy-mat-ui.component.spec.ts +0 -23
  7. package/src/lib/easy-mat-ui.component.ts +0 -16
  8. package/src/lib/easy-mat-ui.service.spec.ts +0 -16
  9. package/src/lib/easy-mat-ui.service.ts +0 -9
  10. package/src/lib/easy-multi-select/easy-multi-select.css +0 -102
  11. package/src/lib/easy-multi-select/easy-multi-select.html +0 -51
  12. package/src/lib/easy-multi-select/easy-multi-select.spec.ts +0 -23
  13. package/src/lib/easy-multi-select/easy-multi-select.ts +0 -181
  14. package/src/lib/easy-table/easy-table.component.css +0 -117
  15. package/src/lib/easy-table/easy-table.component.html +0 -221
  16. package/src/lib/easy-table/easy-table.component.spec.ts +0 -23
  17. package/src/lib/easy-table/easy-table.component.ts +0 -568
  18. package/src/lib/model/dictionary.model.ts +0 -4
  19. package/src/lib/model/mat-column-typed.model.ts +0 -41
  20. package/src/lib/model/mat-column.model.ts +0 -35
  21. package/src/lib/model/tuple.model.ts +0 -8
  22. package/src/lib/shared/table-toolbar/table-toolbar.css +0 -26
  23. package/src/lib/shared/table-toolbar/table-toolbar.html +0 -80
  24. package/src/lib/shared/table-toolbar/table-toolbar.ts +0 -130
  25. package/src/lib/styles/_backgrounds.scss +0 -39
  26. package/src/lib/styles/_buttons.scss +0 -90
  27. package/src/lib/styles/_colors.scss +0 -67
  28. package/src/lib/styles/_effects.scss +0 -44
  29. package/src/lib/styles/_material-overrides.scss +0 -87
  30. package/src/lib/styles/_spacing.scss +0 -68
  31. package/src/lib/styles/_tables.scss +0 -71
  32. package/src/lib/styles/_typography.scss +0 -105
  33. package/src/lib/styles.scss +0 -30
  34. package/src/lib/utils/enums.ts +0 -49
  35. package/src/lib/utils/matTabCommon.ts +0 -59
  36. package/src/lib/utils/utils.ts +0 -68
  37. package/src/public-api.ts +0 -8
  38. package/tsconfig.lib.json +0 -18
  39. package/tsconfig.lib.prod.json +0 -11
  40. package/tsconfig.spec.json +0 -15
@@ -1,80 +0,0 @@
1
- <div class="row p-0">
2
- <div class="col-12 p-0 d-flex flex-wrap align-items-center gap-3">
3
-
4
- @if (withTitle) {
5
- <div class="d-flex align-items-center flex-grow-1 flex-shrink-0 min-width-250">
6
- <div class="card-pricing d-flex align-items-center p-2">
7
- <div class="card-icon icon-rose" >
8
- <i class="material-icons" [ngClass]="iconClass">{{ icon }}</i>
9
- </div>
10
- <h6 class="bold text-uppercase ms-2 mb-0">{{ source | translate }}</h6>
11
- </div>
12
- </div>
13
- }
14
-
15
- @if (withGlobalFilter) {
16
- <div class="flex-grow-1 flex-shrink-0 min-width-300" [ngClass]="isPreview ? 'opacity-0' : ''">
17
- <div class="d-flex flex-wrap align-items-center gap-2">
18
-
19
- <mat-form-field class="underline-style flex-grow-1 min-width-200">
20
- <mat-label>{{ 'SEARCH' | translate }}</mat-label>
21
- <input matInput [(ngModel)]="searchTableField" (keyup)="applyFilter($event)" autocomplete="off"/>
22
- <button mat-icon-button matSuffix (click)="filterType()" [title]="getTitleFilterOperator() | translate">
23
- <mat-icon [ngClass]="getIconFilterOperator()">{{ getIconFilterOperator() }}</mat-icon>
24
- </button>
25
- </mat-form-field>
26
-
27
- <div class="d-flex flex-wrap gap-1">
28
- <button class="btn-mini-fab bg-yellow" [ngClass]="[btnSize]" title="{{ 'CLEAR' | translate }}"
29
- (click)="clearTableFilter()">
30
- <mat-icon>cleaning_services</mat-icon>
31
- </button>
32
-
33
- @if (!readonly && canCreate) {
34
- <button class="btn-mini-fab bg-taupe" [ngClass]="[btnSize]" title="{{ 'ADD' | translate }}"
35
- (click)="addItem()">
36
- <mat-icon>add</mat-icon>
37
- </button>
38
- }
39
-
40
- @if (canExport) {
41
- <button class="btn-mini-fab bg-info" [ngClass]="[btnSize]" title="{{ 'DOWNLOAD' | translate }}"
42
- (click)="exportToCsv()">
43
- <mat-icon>file_download</mat-icon>
44
- </button>
45
- }
46
-
47
- @if (customActionEnable) {
48
- <button class="btn-mini-fab" [ngClass]="[btnSize, customRowActionClass]"
49
- title="{{ customActionTitle | translate }}" (click)="onClickCustomAction()">
50
- <mat-icon>{{ customActionIcon ?? 'rocket_launch' }}</mat-icon>
51
- </button>
52
- }
53
-
54
- @if (logout) {
55
- <button class="btn-mini-fab bg-red" [ngClass]="[btnSize]" title="{{ 'CLOSE' | translate }}"
56
- (click)="close()">
57
- <mat-icon>logout</mat-icon>
58
- </button>
59
- }
60
- </div>
61
-
62
- @if (customColumnFilter && customColumnFilter.length > 1) {
63
- <div class="w-100 text-end">
64
- <mat-button-toggle-group class="no-border" #group="matButtonToggleGroup" multiple
65
- (change)="onToggleChanged(group.value)">
66
- <mat-button-toggle *ngFor="let item of customColumnFilter"
67
- [value]="item"
68
- [ngClass]="getFilterColor(item)">
69
- <mat-icon class="xx-large">{{ getFilterIcon(item) }}</mat-icon>
70
- </mat-button-toggle>
71
- </mat-button-toggle-group>
72
- </div>
73
- }
74
-
75
- </div>
76
- </div>
77
- }
78
-
79
- </div>
80
- </div>
@@ -1,130 +0,0 @@
1
- import {Component, EventEmitter, Input, Output} from '@angular/core';
2
- import {Dictionary} from '../../model/dictionary.model';
3
- import {TranslatePipe} from '@ngx-translate/core';
4
- import {MatColumn} from '../../model/mat-column.model';
5
- import {MatFormField, MatInput} from '@angular/material/input';
6
- import {MatIconButton} from '@angular/material/button';
7
- import {MatButtonToggle, MatButtonToggleGroup} from '@angular/material/button-toggle';
8
- import {MatIcon} from '@angular/material/icon';
9
- import {CommonModule, NgClass} from '@angular/common';
10
- import {FormsModule} from '@angular/forms';
11
- import {MatFormFieldModule} from '@angular/material/form-field';
12
-
13
- @Component({
14
- selector: 'lib-table-toolbar',
15
- standalone: true,
16
- imports: [
17
- MatButtonToggle,
18
- TranslatePipe,
19
- MatInput,
20
- MatFormField,
21
- MatIconButton,
22
- MatIcon,
23
- MatButtonToggleGroup,
24
- MatButtonToggle,
25
- NgClass,
26
- FormsModule,
27
- CommonModule,
28
- MatFormFieldModule
29
- ],
30
- templateUrl: './table-toolbar.html',
31
- styleUrls: ['./table-toolbar.css', '../../styles.scss'],
32
- })
33
- export class TableToolbarComponent {
34
- @Input() withTitle = true;
35
- @Input() icon = '';
36
- @Input() source = '';
37
- @Input() withGlobalFilter = true;
38
- @Input() isPreview = false;
39
- @Input() searchTableField = '';
40
- @Input() readonly = false;
41
- @Input() canCreate = true;
42
- @Input() canExport = true;
43
- @Input() customActionEnable = false;
44
- @Input() customActionTitle = '';
45
- @Input() customActionIcon?: string;
46
- @Input() customRowActionClass = '';
47
- @Input() logout = false;
48
- @Input() isAndFilterOperator = true;
49
- @Input() btnSize = 'btn-small';
50
- @Input() iconClass = 'taupe';
51
- @Input() customColumnFilter: Dictionary[] = [];
52
-
53
- @Output() searchTableFieldChange = new EventEmitter<string>();
54
- @Output() applyFilterEvent = new EventEmitter<KeyboardEvent>();
55
- @Output() filterTypeEvent = new EventEmitter<void>();
56
- @Output() clearTableFilterEvent = new EventEmitter<void>();
57
- @Output() addItemEvent = new EventEmitter<void>();
58
- @Output() exportToCsvEvent = new EventEmitter<void>();
59
- @Output() customActionEvent = new EventEmitter<void>();
60
- @Output() closeEvent = new EventEmitter<void>();
61
- @Output() toggleChangedEvent = new EventEmitter<any>();
62
-
63
- filterColumn!: MatColumn;
64
-
65
- onSearchChange(value: string) {
66
- this.searchTableFieldChange.emit(value);
67
- }
68
-
69
- applyFilter(event: KeyboardEvent) {
70
- this.applyFilterEvent.emit(event);
71
- }
72
-
73
- filterType() {
74
- this.filterTypeEvent.emit();
75
- }
76
-
77
- clearTableFilter() {
78
- this.searchTableField = '';
79
- this.clearTableFilterEvent.emit();
80
- }
81
-
82
- addItem() {
83
- this.addItemEvent.emit();
84
- }
85
-
86
- exportToCsv() {
87
- this.exportToCsvEvent.emit();
88
- }
89
-
90
- onClickCustomAction() {
91
- this.customActionEvent.emit();
92
- }
93
-
94
- close() {
95
- this.closeEvent.emit();
96
- }
97
-
98
- onToggleChanged(value: any) {
99
- this.toggleChangedEvent.emit(value);
100
- }
101
-
102
- getTitleFilterOperator() {
103
- return this.isAndFilterOperator ? 'FILTER_BY_AND_OPERATOR' : 'FILTER_BY_OR_OPERATOR';
104
- }
105
-
106
- getIconFilterOperator() {
107
- return this.isAndFilterOperator ? 'zoom_out' : 'zoom_in';
108
- }
109
-
110
- getFilterColor(filter: Dictionary): string | undefined {
111
- const filterValue = String(filter.value).toLowerCase();
112
- const filterKey = String(filter.key).toLowerCase();
113
-
114
- switch (filterValue) {
115
- case 'true':
116
- return filterKey === 'true'
117
- ? this.filterColumn.enableColor
118
- : this.filterColumn.disableColor;
119
- case 'false':
120
- return 'grey';
121
- default:
122
- return 'black';
123
- }
124
- }
125
-
126
- getFilterIcon(filter: Dictionary) {
127
- return String(filter.key) === 'true' ? this.filterColumn.enableIcon : this.filterColumn.disableIcon;
128
- }
129
-
130
- }
@@ -1,39 +0,0 @@
1
- .bg-yellow {
2
- background-color: #ffb804 !important;
3
- }
4
-
5
- .bg-morning-blue {
6
- background-color: #82a7a6 !important;
7
- }
8
-
9
- .bg-blue {
10
- background-color: #6b95aa !important;
11
- }
12
-
13
- .bg-morning-clear-green {
14
- background-color: #d1e0e0 !important;
15
- }
16
-
17
- .bg-taupe {
18
- background-color: #785964 !important;
19
- }
20
-
21
- .bg-red {
22
- background-color: #f44438 !important;
23
- }
24
-
25
- .bg-orange {
26
- background-color: tomato !important;
27
- }
28
-
29
- .bg-green {
30
- background-color: #4caf50 !important;
31
- }
32
-
33
- .bg-info {
34
- background-color: #00bcd4 !important;
35
- }
36
-
37
- .bg-white{
38
- background-color: white;
39
- }
@@ -1,90 +0,0 @@
1
- button.mat-mdc-mini-fab {
2
- --mdc-fab-small-container-size: 32px;
3
- --mdc-icon-button-icon-size: 18px;
4
- }
5
-
6
- button.mat-mdc-icon-button {
7
- --mdc-icon-button-icon-size: 20px;
8
- }
9
-
10
- .btn-mini-fab {
11
- border-radius: 50%;
12
- color: white;
13
- border: none;
14
- cursor: pointer;
15
- box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
16
- display: inline-flex;
17
- align-items: center;
18
- justify-content: center;
19
- transition: transform 0.2s, filter 0.2s;
20
-
21
- &:hover {
22
- filter: brightness(90%);
23
- }
24
-
25
- &:focus {
26
- outline: none;
27
- box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.3);
28
- }
29
- }
30
-
31
- .btn-small {
32
- width: 32px;
33
- height: 32px;
34
- font-size: 16px;
35
-
36
- .material-icons,
37
- .mat-icon {
38
- font-size: 16px !important;
39
- height: 16px !important;
40
- width: 16px !important;
41
- }
42
- }
43
-
44
- .btn-medium {
45
- width: 40px;
46
- height: 40px;
47
- font-size: 18px;
48
-
49
- .material-icons,
50
- .mat-icon {
51
- font-size: 20px !important;
52
- height: 20px !important;
53
- width: 20px !important;
54
- }
55
- }
56
-
57
- .btn-large {
58
- width: 56px;
59
- height: 56px;
60
- font-size: 22px;
61
-
62
- .material-icons,
63
- .mat-icon {
64
- font-size: 28px !important;
65
- height: 28px !important;
66
- width: 28px !important;
67
- }
68
- }
69
-
70
- .icon-only {
71
- background: transparent;
72
- border: none;
73
- box-shadow: none;
74
- padding: 0;
75
- margin: 0;
76
- width: auto;
77
- height: auto;
78
- min-width: unset;
79
- min-height: unset;
80
-
81
- .mat-icon {
82
- font-size: 20px;
83
- line-height: 20px;
84
- }
85
- }
86
-
87
- .btn-action-upload {
88
- color: purple !important;
89
- border-color: purple !important;
90
- }
@@ -1,67 +0,0 @@
1
- .taupe{
2
- color: #550015 !important;
3
- }
4
-
5
- .taupe-light{
6
- color: #785964 !important;
7
- }
8
-
9
- .blue{
10
- color: #0275d8 !important;
11
- }
12
-
13
- .royal-blue{
14
- color: #6b95aa !important;
15
- }
16
-
17
- .green{
18
- color: #4CAF50 !important;
19
- }
20
-
21
- .red{
22
- color: #f44336 !important;
23
- }
24
-
25
- .light-blue {
26
- color: #b1cdee !important;
27
- }
28
-
29
- .yellow{
30
- color: #ffb804 !important;
31
- }
32
-
33
- .info{
34
- color: #00bcd4 !important;
35
- }
36
-
37
- .grey{
38
- color: #999999 !important;
39
- }
40
-
41
- .success {
42
- color: #198754 !important;
43
- }
44
-
45
- .primary {
46
- color: #0d6efd !important;
47
- }
48
-
49
- .danger {
50
- color: #dc3545 !important;
51
- }
52
-
53
- .error {
54
- color: #ff6347 !important;
55
- }
56
-
57
- .secondary {
58
- color: #6c757d !important;
59
- }
60
-
61
- .warning {
62
- color: #ffc107 !important;
63
- }
64
-
65
- .dark {
66
- color: #212529 !important;
67
- }
@@ -1,44 +0,0 @@
1
- .box-shadow {
2
- box-shadow: 5px 5px 5px #555555;
3
- }
4
-
5
- .box-shadow-5 {
6
- box-shadow: 0px 5px 5px #555555 !important;
7
- }
8
-
9
- .box-shadow-5-1 {
10
- box-shadow: 0px 0px 5px 1px #555555 !important;
11
- }
12
-
13
- .bg-enable {
14
- background: -webkit-gradient(linear, left top, left bottom, from(#ecf1fc), to(#FFF));
15
- box-shadow: 5px 5px 5px #555555;
16
- animation: blinker 3s linear infinite;
17
- font-weight: bold;
18
- }
19
-
20
- .text-animation {
21
- animation: blinker 3s linear infinite;
22
- }
23
-
24
- @keyframes blinker {
25
- from {
26
- font-size: 0.9em;
27
- }
28
- 10% {
29
- font-size: 0.5em;
30
- }
31
- 50% {
32
- font-size: 0.7em;
33
- }
34
- 70% {
35
- font-size: 0.8em;
36
- }
37
- to {
38
- font-size: 0.9em;
39
- }
40
- }
41
-
42
- .d-contents {
43
- display: contents !important;
44
- }
@@ -1,87 +0,0 @@
1
- .mat-mdc-form-field-appearance-legacy .mat-mdc-form-field-underline {
2
- background-color: #4caf50 !important;
3
- }
4
-
5
- .mat-mdc-form-field-hint-wrapper {
6
- display: none !important;
7
- }
8
-
9
- .mat-mdc-form-field.mat-focused .mat-mdc-form-field-ripple {
10
- background-color: transparent !important;
11
- }
12
-
13
- .mat-mdc-form-field.mat-focused .mat-mdc-form-field-label {
14
- color: #4caf50 !important;
15
- }
16
-
17
- .vertical-center {
18
- align-items: center !important;
19
- justify-content: space-between;
20
- }
21
-
22
- .audit {
23
- background-color: transparent;
24
- box-shadow: 1px 2px #b4b3b3;
25
- color: #e91e63;
26
- }
27
-
28
- /* Height Fix Safari */
29
- .h-17 {
30
- height: 17px;
31
- box-sizing: border-box;
32
- line-height: normal;
33
- }
34
-
35
- @supports (-webkit-appearance: none) and (not (-moz-appearance: none)) {
36
- .h-17 {
37
- padding-top: 15px;
38
- }
39
- }
40
-
41
- input.password {
42
- border: none;
43
- background: transparent;
44
- font-family: monospace;
45
- }
46
-
47
- ::ng-deep .mat-mdc-form-field.mat-form-field-appearance-fill .mat-mdc-text-field-wrapper {
48
- background-color: white !important;
49
- }
50
-
51
- ::ng-deep .mat-mdc-form-field.mat-form-field-appearance-fill .mat-mdc-text-field-wrapper:hover {
52
- background-color: white !important;
53
- }
54
-
55
- ::ng-deep .mat-mdc-form-field.mat-form-field-appearance-fill .mat-mdc-text-field-wrapper:focus-within {
56
- background-color: white !important;
57
- }
58
-
59
- ::ng-deep .mat-mdc-form-field.mat-form-field-appearance-fill .mat-mdc-form-field-focus-overlay {
60
- background-color: transparent !important;
61
- }
62
-
63
- ::ng-deep .mat-mdc-text-field-wrapper {
64
- border-radius: 4px !important;
65
- box-shadow: none !important;
66
- }
67
-
68
-
69
- .input-overwrite {
70
- width: 50px;
71
- margin: 2px;
72
- background-image: none;
73
- }
74
-
75
- .overwrite {
76
- background-color: white;
77
- text-align: center;
78
- border-radius: 5px;
79
- font-weight: bold;
80
- color: #f44336;
81
- box-shadow:0px 0px 5px #6192D1;
82
- -webkit-box-shadow: 0px 0px 5px #6192D1;
83
- -webkit-padding: 3px;
84
- border-width: 2px;
85
- border-color: transparent;
86
- border-style: inset;
87
- }
@@ -1,68 +0,0 @@
1
- .mg-t-100 {
2
- margin-top: -100px;
3
- margin-bottom: -35px;
4
- }
5
-
6
- .mg-b-20 {
7
- margin-top: 20px;
8
- margin-bottom: 20px;
9
- }
10
-
11
- .mg-b-15 {
12
- margin-bottom: 15px;
13
- }
14
-
15
- .pd-l-r-0 {
16
- padding-left: 0;
17
- padding-right: 0;
18
- }
19
-
20
- .pd-0 {
21
- padding: 0 !important;
22
- }
23
-
24
- .pd-lr-40 {
25
- padding-left: 40px !important;
26
- padding-right: 40px !important;
27
- }
28
-
29
- .pd-r-1 {
30
- padding-right: 1px;
31
- }
32
-
33
- .pd-l-1 {
34
- padding-left: 1px;
35
- }
36
-
37
- .pd-t-l-5 {
38
- padding-top: 5px;
39
- padding-bottom: 5px;
40
- }
41
-
42
- .h-30 {
43
- height: 30px !important;
44
- }
45
-
46
- .h-35 {
47
- height: 35px !important;
48
- }
49
-
50
- .h-40 {
51
- height: 40px !important;
52
- }
53
-
54
- .h-45 {
55
- height: 45px !important;
56
- }
57
-
58
- .h-50 {
59
- height: 49px !important;
60
- }
61
-
62
- .h-55 {
63
- height: 50px !important;
64
- }
65
-
66
- .h-60 {
67
- height: 60px !important;
68
- }
@@ -1,71 +0,0 @@
1
- .mat-mdc-table {
2
- width: 100% !important;
3
- table-layout: auto;
4
- }
5
-
6
- .table-responsive {
7
- overflow-x: auto;
8
- -webkit-overflow-scrolling: touch;
9
- }
10
-
11
- .mat-mdc-header-cell {
12
- font-size: 14px;
13
- font-weight: bold;
14
- color: black;
15
- }
16
-
17
- tr.mat-mdc-header-row {
18
- height: 56px;
19
- font-weight: bold;
20
- }
21
-
22
- tr.mat-mdc-row,
23
- tr.mat-mdc-footer-row {
24
- height: 48px;
25
- }
26
-
27
- th.mat-mdc-header-cell,
28
- td.mat-mdc-cell,
29
- td.mat-mdc-footer-cell {
30
- border-bottom: 1px solid rgba(0, 0, 0, 0.12);
31
- }
32
-
33
- tr.mat-mdc-row:nth-child(odd),
34
- .mat-row:nth-child(2n+1),
35
- .gray {
36
- background-color: #f5f5f5;
37
- }
38
-
39
- mat-paginator {
40
- color: #6b95aa;
41
- font-weight: bold;
42
- }
43
-
44
- .disable {
45
- background-color: lightgray;
46
- opacity: 0.5;
47
- color: #a09e9e;
48
- }
49
-
50
- .selected-row {
51
- background-color: #f1f6fb !important;
52
- box-shadow: 0px 5px 5px #555555 !important;
53
- font-weight: bold;
54
- text-shadow: 0 5px 5px #c2c0c0;
55
- }
56
-
57
- .mat-row:hover {
58
- background-color: #f1f6fb !important;
59
- }
60
-
61
- .sticky-left {
62
- position: sticky;
63
- left: 0;
64
- z-index: 10;
65
- }
66
-
67
- .sticky-right {
68
- position: sticky;
69
- right: 0;
70
- z-index: 10;
71
- }