keevo-components 1.8.495 → 1.8.496

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 (22) hide show
  1. package/package.json +1 -1
  2. package/src/lib/components/keevo-components-styles.scss +0 -44
  3. package/src/lib/components/keevo-components.module.ts +2 -5
  4. package/src/lib/components/kv-carousel/kv-carousel.component.html +1 -0
  5. package/src/lib/components/kv-layout/dropdown-master/dropdown-master.component.html +1 -10
  6. package/src/lib/components/kv-layout/dropdown-master/dropdown-master.component.scss +0 -18
  7. package/src/lib/components/kv-layout/kv-layout.module.ts +9 -18
  8. package/src/lib/components/kv-layout/layout/kv-layout.component.html +387 -349
  9. package/src/lib/components/kv-layout/layout/kv-layout.component.scss +230 -356
  10. package/src/lib/components/kv-layout/layout/kv-layout.component.ts +32 -104
  11. package/src/lib/components/kv-pick-list/kv-pick-list.component.html +2 -0
  12. package/src/lib/components/kv-pick-list/kv-pick-list.component.ts +11 -0
  13. package/src/public-api.ts +1 -8
  14. package/src/lib/components/kv-icon/kv-icon.component.html +0 -15
  15. package/src/lib/components/kv-icon/kv-icon.component.scss +0 -48
  16. package/src/lib/components/kv-icon/kv-icon.component.spec.ts +0 -23
  17. package/src/lib/components/kv-icon/kv-icon.component.ts +0 -20
  18. package/src/lib/components/kv-icon/kv-icon.module.ts +0 -18
  19. package/src/lib/components/kv-layout/top-icons/top-icons.component.html +0 -14
  20. package/src/lib/components/kv-layout/top-icons/top-icons.component.scss +0 -7
  21. package/src/lib/components/kv-layout/top-icons/top-icons.component.spec.ts +0 -23
  22. package/src/lib/components/kv-layout/top-icons/top-icons.component.ts +0 -25
@@ -31,29 +31,6 @@ import {
31
31
  transition,
32
32
  trigger,
33
33
  } from '@angular/animations';
34
- import { TopActionsModel } from '../top-icons/top-icons.component';
35
- import { link } from 'd3';
36
- import { MenuItem } from 'primeng/api';
37
-
38
- export interface LayoutMenuItem {
39
- idmenu: number;
40
- idmenupai: number | null;
41
- idaplicativo: number;
42
- descricaomenu: string;
43
- link: string | null;
44
- icone: string | null;
45
- indpublicado: boolean;
46
- indmenupai: boolean;
47
- listaidvisaomenu: number[];
48
- bgColor?: string;
49
- textColor?: string;
50
- }
51
-
52
- export interface PMenuItem{
53
- label: string;
54
-
55
- items: PMenuItem[];
56
- }
57
34
 
58
35
  @Component({
59
36
  selector: 'kv-layout',
@@ -86,43 +63,6 @@ export class KvLayoutComponent implements OnInit, OnChanges {
86
63
 
87
64
  @Input() actions: { icon: string; label: string; action: () => void }[] = [];
88
65
 
89
- topActions = input<TopActionsModel[]>([
90
- {
91
- icon: 'list-check',
92
- tooltip: 'Tarefas',
93
- numNotifications: 2,
94
- action: () => {},
95
- },
96
- {
97
- icon: 'bell',
98
- tooltip: 'Notificações',
99
- numNotifications: 0,
100
- action: () => {},
101
- },
102
- {
103
- icon: 'sparkles',
104
- tooltip: 'Kiara',
105
- numNotifications: 0,
106
- action: () => {},
107
- },
108
- {
109
- icon: 'message',
110
- tooltip: 'Comunicador',
111
- numNotifications: 3,
112
- action: () => {},
113
- },
114
- {
115
- icon: 'person',
116
- tooltip: 'Meus Dados',
117
- numNotifications: 0,
118
- img: 'https://cdn.comunhao.com.br/wp-content/uploads/2022/09/27085403/alexandremoraes.jpg',
119
- action: () => {
120
- this.meusDadosPanel.show(event);
121
- },
122
- }
123
- ]);
124
-
125
-
126
66
  @Input() breadCrumbItems: {
127
67
  label: string;
128
68
  routerLink: string;
@@ -135,27 +75,19 @@ export class KvLayoutComponent implements OnInit, OnChanges {
135
75
  idmasternome: string;
136
76
  }[] = [];
137
77
 
138
- menus = model<LayoutMenuItem[]>([]);
139
-
140
-
141
- menuPModels = computed<MenuItem[]>(() => {
142
- const convertToMenuItem = (menu: LayoutMenuItem): MenuItem => ({
143
- label: menu.descricaomenu,
144
- id: menu.idmenu.toString(),
145
- items: this.returnMenuChild(menu.idmenu).map(convertToMenuItem),
146
- url: menu.link ?? undefined,
147
- });
148
-
149
- return this.menus().map(convertToMenuItem);
150
- });
151
-
152
- ver(x:any){
153
- console.log(x)
154
- }
155
-
156
- returnMenuChilds = computed(() => (idmenu: number) => {
157
- return this.menuPModels().filter((x: MenuItem) => Number(x.id) === idmenu);
158
- });
78
+ @Input() menus: {
79
+ idmenu: number;
80
+ idmenupai: number | null;
81
+ idaplicativo: number;
82
+ descricaomenu: string;
83
+ link: string | null;
84
+ icone: string | null;
85
+ indpublicado: boolean;
86
+ indmenupai: boolean;
87
+ listaidvisaomenu: number[];
88
+ bgColor?: string;
89
+ textColor?: string;
90
+ }[] = [];
159
91
 
160
92
  expandMenu = model<boolean>(true);
161
93
 
@@ -172,7 +104,6 @@ export class KvLayoutComponent implements OnInit, OnChanges {
172
104
  @Input() showDropdownLicenca: boolean = true;
173
105
  @Input() showMenu: boolean = true;
174
106
  @Input() showTrocaEmpresa: boolean = false;
175
- @Input() showBreadcrumb: boolean = true;
176
107
  @Input() userName: string = 'Usuário';
177
108
  @Input() masterName!: string;
178
109
  @Input() empresaName!: string;
@@ -208,6 +139,7 @@ export class KvLayoutComponent implements OnInit, OnChanges {
208
139
  }
209
140
 
210
141
  public accessKeePass(event: any) {
142
+ this.sistemasPanel.hide();
211
143
  this.accessKeePassEmit.emit(event);
212
144
  }
213
145
 
@@ -235,11 +167,11 @@ export class KvLayoutComponent implements OnInit, OnChanges {
235
167
  }
236
168
 
237
169
  public callRoute(e: any, expand?: boolean) {
238
- console.log(e, expand)
239
- if (!expand && !this.expandMenu() && this.showExpandMenu)
170
+
171
+ if (!expand && !this.expandMenu())
240
172
  this.expandMenu.update((currentValue: boolean) => !currentValue);
241
173
 
242
- if (this.widthPage() != 0 && this.widthPage() < 800 && this.expandMenu() && this.showExpandMenu)
174
+ if (this.widthPage() != 0 && this.widthPage() < 800 && this.expandMenu())
243
175
  this.expandMenu.set(false);
244
176
 
245
177
  this.router.navigateByUrl(e);
@@ -263,6 +195,7 @@ export class KvLayoutComponent implements OnInit, OnChanges {
263
195
  }
264
196
 
265
197
  public logout(event: any) {
198
+ this.sistemasPanel.hide();
266
199
  this.logoutEmit.emit(event);
267
200
  }
268
201
 
@@ -271,7 +204,7 @@ export class KvLayoutComponent implements OnInit, OnChanges {
271
204
  if (this.router.url === '/') {
272
205
  // this.navigateToFirstMenu();
273
206
  } else {
274
- const menuSelecionado = this.menus().find(
207
+ const menuSelecionado = this.menus.find(
275
208
  (menu: any) =>
276
209
  menu.link && menu.link.includes(this.router.url.slice(1))
277
210
  );
@@ -294,7 +227,7 @@ export class KvLayoutComponent implements OnInit, OnChanges {
294
227
  }
295
228
 
296
229
  private navigateToFirstMenu(): void {
297
- const firstMenu = this.menus()[0];
230
+ const firstMenu = this.menus[0];
298
231
  if (firstMenu.indmenupai) {
299
232
  const filhos = this.returnMenuChild(firstMenu.idmenu);
300
233
  if (filhos) {
@@ -359,20 +292,18 @@ export class KvLayoutComponent implements OnInit, OnChanges {
359
292
 
360
293
  const paths = purePath![0];
361
294
 
362
- this.menus.set(
363
- this.menus().map((menu) => {
364
- if (menu.link) {
365
- return {
366
- ...menu,
367
- bgColor: paths.includes(menu.link!) ? 'rgb(41, 185, 45)' : '',
368
- textColor: paths.includes(menu.link!) ? 'text-white' : '',
369
- };
370
- }
371
- return menu;
372
- })
373
- )
295
+ this.menus = this.menus.map((menu) => {
296
+ if (menu.link) {
297
+ return {
298
+ ...menu,
299
+ bgColor: paths.includes(menu.link!) ? 'rgb(41, 185, 45)' : '',
300
+ textColor: paths.includes(menu.link!) ? 'text-white' : '',
301
+ };
302
+ }
303
+ return menu;
304
+ });
374
305
 
375
- const menu = this.menus().find((menu: any) => {
306
+ const menu = this.menus.find((menu: any) => {
376
307
  return menu.link && paths.includes(menu.link!);
377
308
  });
378
309
 
@@ -380,10 +311,9 @@ export class KvLayoutComponent implements OnInit, OnChanges {
380
311
  }
381
312
 
382
313
  public returnMenuChild(idmenu: number) {
383
- return this.menus().filter((x: any) => x.idmenupai == idmenu);
314
+ return this.menus.filter((x: any) => x.idmenupai == idmenu);
384
315
  }
385
316
 
386
-
387
317
  public selectApp(idaplicativo: number) {
388
318
  this.selectAppEmit.emit(idaplicativo);
389
319
  }
@@ -411,6 +341,4 @@ export class KvLayoutComponent implements OnInit, OnChanges {
411
341
  get exibirNomes() {
412
342
  return !this.showLicencas() && (this.masterName || this.empresaName);
413
343
  }
414
-
415
-
416
344
  }
@@ -16,6 +16,8 @@
16
16
  (onMoveToTarget)="OnMoveToTarget($event)"
17
17
  (onMoveAllToSource)="OnMoveAllToSource($event)"
18
18
  (onMoveAllToTarget)="OnMoveAllToTarget($event)"
19
+ (onSourceSelect)="OnSourceSelect($event)"
20
+ (onTargetSelect)="OnTargetSelect($event)"
19
21
  >
20
22
  <ng-template let-item pTemplate="item" *ngIf="itemTemplate">
21
23
  <div (click)="selectCheckBox(item)" class="flex mr-5">
@@ -52,6 +52,9 @@ export class KvPickListComponent implements OnInit {
52
52
  @Output() onMoveToTarget: EventEmitter<any> = new EventEmitter();
53
53
  @Output() onMoveAllToSource: EventEmitter<any> = new EventEmitter();
54
54
  @Output() onMoveAllToTarget: EventEmitter<any> = new EventEmitter();
55
+ @Output() onSourceSelect: EventEmitter<any> = new EventEmitter();
56
+ @Output() onTargetSelect: EventEmitter<any> = new EventEmitter();
57
+
55
58
  selectedPreview!: any;
56
59
  ngModel: boolean = false;
57
60
  selectedItems: { [key: number]: boolean } = {};
@@ -78,6 +81,14 @@ export class KvPickListComponent implements OnInit {
78
81
  this.selectedItems = {};
79
82
  }
80
83
 
84
+ OnSourceSelect(event: any) {
85
+ this.onSourceSelect.emit(event);
86
+ }
87
+
88
+ OnTargetSelect(event: any) {
89
+ this.onTargetSelect.emit(event);
90
+ }
91
+
81
92
  onSelectAll() {
82
93
  this.selectAllItems(true);
83
94
  }
package/src/public-api.ts CHANGED
@@ -295,11 +295,4 @@ export * from './lib/components/kv-avatar/kv-avatar.module';
295
295
  * Card Selection
296
296
  */
297
297
  export * from './lib/components/kv-card-selection/kv-card-selection.component';
298
- export * from './lib/components/kv-card-selection/kv-card-selection.module';
299
-
300
-
301
- /**
302
- * Card Selection
303
- */
304
- export * from './lib/components/kv-icon/kv-icon.component';
305
- export * from './lib/components/kv-icon/kv-icon.module';
298
+ export * from './lib/components/kv-card-selection/kv-card-selection.module';
@@ -1,15 +0,0 @@
1
- <div class="kv-icon" (click)="click($event)" [class.clickable]="clickable()" >
2
- @if(img()){
3
- <img
4
- src="{{img()}}"
5
- />
6
- }
7
- @else {
8
- <i [class]="'ti ti-'+icon() "></i>
9
- }
10
- @if(numNotifications() > 0 ){
11
- <div class="notification-badge" >
12
- {{numNotifications()}}
13
- </div>
14
- }
15
- </div>
@@ -1,48 +0,0 @@
1
- .kv-icon {
2
- position: relative;
3
- display: inline-block;
4
- font-size: 1.5rem; /* 24px to rem */
5
- display: flex;
6
- align-items: center;
7
- justify-content: center;
8
-
9
- .material-symbols-outlined {
10
- font-size: inherit;
11
- color: #333;
12
- }
13
-
14
- .notification-badge {
15
- position: absolute;
16
- top: -0.25rem; /* -4px to rem */
17
- right: -0.25rem; /* -4px to rem */
18
- background-color: #f44336;
19
- color: #fff;
20
- font-size: 0.6rem; /* 12px to rem */
21
- width: .9rem; /* 18px to rem */
22
- height: .9rem; /* 18px to rem */
23
- border-radius: 50%;
24
- display: flex;
25
- align-items: center;
26
- justify-content: center;
27
- padding: 0;
28
- }
29
-
30
- img {
31
- height: 2rem;
32
- width: 2rem;
33
- border-radius: 50%;
34
- object-fit: cover;
35
- object-position: center;
36
- }
37
- }
38
-
39
-
40
-
41
-
42
- .clickable {
43
- cursor: pointer;
44
-
45
- &:hover {
46
- text-shadow: 0 0 1px rgba(0, 0, 0);
47
- }
48
- }
@@ -1,23 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { KvIconComponent } from './kv-icon.component';
4
-
5
- describe('KvIconComponent', () => {
6
- let component: KvIconComponent;
7
- let fixture: ComponentFixture<KvIconComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- imports: [KvIconComponent]
12
- })
13
- .compileComponents();
14
-
15
- fixture = TestBed.createComponent(KvIconComponent);
16
- component = fixture.componentInstance;
17
- fixture.detectChanges();
18
- });
19
-
20
- it('should create', () => {
21
- expect(component).toBeTruthy();
22
- });
23
- });
@@ -1,20 +0,0 @@
1
- import { Component, EventEmitter, input, output } from '@angular/core';
2
-
3
- @Component({
4
- selector: 'kv-icon',
5
- templateUrl: './kv-icon.component.html',
6
- styleUrl: './kv-icon.component.scss'
7
- })
8
- export class KvIconComponent {
9
- icon = input<string>();
10
- numNotifications = input<number>(0);
11
- onClick = output<EventEmitter<any>>();
12
- img = input<string>();
13
- clickable = input<boolean>(false);
14
-
15
- click(e: any) {
16
- if(this.clickable()){
17
- this.onClick.emit(e);
18
- }
19
- }
20
- }
@@ -1,18 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
- import { KvIconComponent } from './kv-icon.component';
4
-
5
-
6
-
7
- @NgModule({
8
- declarations: [
9
- KvIconComponent
10
- ],
11
- imports: [
12
- CommonModule,
13
- ],
14
- exports: [
15
- KvIconComponent
16
- ]
17
- })
18
- export class KvIconModule { }
@@ -1,14 +0,0 @@
1
- <div class="top-icons-container">
2
- @for (item of topActions(); track $index) {
3
-
4
- <kv-icon
5
- [icon]="item.icon"
6
- [numNotifications]="item.numNotifications||0"
7
- [pTooltip]="item.tooltip"
8
- [tooltipPosition]="'left'"
9
- (onClick)="item.action()"
10
- [img]="item.img"
11
- [clickable]="true"
12
- />
13
- }
14
- </div>
@@ -1,7 +0,0 @@
1
- .top-icons-container{
2
- display: flex;
3
- flex-direction: row;
4
- justify-content: flex-end;
5
- align-items: center;
6
- gap: .8rem;
7
- }
@@ -1,23 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { TopIconsComponent } from './top-icons.component';
4
-
5
- describe('TopIconsComponent', () => {
6
- let component: TopIconsComponent;
7
- let fixture: ComponentFixture<TopIconsComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- imports: [TopIconsComponent]
12
- })
13
- .compileComponents();
14
-
15
- fixture = TestBed.createComponent(TopIconsComponent);
16
- component = fixture.componentInstance;
17
- fixture.detectChanges();
18
- });
19
-
20
- it('should create', () => {
21
- expect(component).toBeTruthy();
22
- });
23
- });
@@ -1,25 +0,0 @@
1
- import { Component, input } from '@angular/core';
2
- import { KvIconComponent } from "../../kv-icon/kv-icon.component";
3
- import { TooltipModule } from 'primeng/tooltip';
4
- import { KvIconModule } from '../../kv-icon/kv-icon.module';
5
-
6
- export interface TopActionsModel {
7
- icon?: string;
8
- tooltip?: string;
9
- numNotifications?: number;
10
- img?: string;
11
- action: () => void;
12
- }
13
-
14
- @Component({
15
- selector: 'kv-top-icons',
16
- standalone: true,
17
- imports: [TooltipModule, KvIconModule],
18
- templateUrl: './top-icons.component.html',
19
- styleUrl: './top-icons.component.scss'
20
- })
21
- export class TopIconsComponent {
22
-
23
- topActions = input<TopActionsModel[]>([]);
24
-
25
- }