appproject-components 1.0.47 → 1.0.48

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 (153) hide show
  1. package/esm2022/appproject-components.mjs +5 -0
  2. package/esm2022/lib/appproject-components.component.mjs +22 -0
  3. package/esm2022/lib/appproject-components.module.mjs +159 -0
  4. package/esm2022/lib/appproject-components.service.mjs +14 -0
  5. package/esm2022/lib/baseInputComponent.mjs +69 -0
  6. package/esm2022/lib/buttons/baseBtnComponent.mjs +63 -0
  7. package/esm2022/lib/buttons/btn-action/btn-action.component.mjs +55 -0
  8. package/esm2022/lib/buttons/btn-cancelar/btn-cancelar.component.mjs +25 -0
  9. package/esm2022/lib/buttons/btn-excluir/btn-excluir.component.mjs +29 -0
  10. package/esm2022/lib/buttons/btn-novo/btn-novo.component.mjs +33 -0
  11. package/esm2022/lib/buttons/btn-salvar/btn-salvar.component.mjs +19 -0
  12. package/esm2022/lib/entity-edit/entity-edit.component.mjs +53 -0
  13. package/esm2022/lib/grid-view/grid-view.component.mjs +275 -0
  14. package/esm2022/lib/input-area/input-area.component.mjs +72 -0
  15. package/esm2022/lib/input-arquivo/input-arquivo.component.mjs +154 -0
  16. package/esm2022/lib/input-cep/input-cep.component.mjs +180 -0
  17. package/esm2022/lib/input-checkbox/input-checkbox.component.mjs +51 -0
  18. package/esm2022/lib/input-format/input-format.component.mjs +138 -0
  19. package/esm2022/lib/input-pesquisa/input-pesquisa.component.mjs +557 -0
  20. package/esm2022/lib/input-radio/input-radio.component.mjs +58 -0
  21. package/esm2022/lib/input-select/input-select.component.mjs +110 -0
  22. package/esm2022/lib/input-text/input-text.component.mjs +88 -0
  23. package/esm2022/lib/input-valor/input-valor.component.mjs +161 -0
  24. package/esm2022/lib/lib-config.mjs +2 -0
  25. package/esm2022/lib/model-treeview/model-treeview.component.mjs +126 -0
  26. package/esm2022/lib/tree-view/tree-view.component.mjs +104 -0
  27. package/esm2022/lib/tree-view-nivel/tree-view-nivel.component.mjs +50 -0
  28. package/esm2022/public-api.mjs +30 -0
  29. package/fesm2022/appproject-components.mjs +2531 -0
  30. package/fesm2022/appproject-components.mjs.map +1 -0
  31. package/index.d.ts +5 -0
  32. package/lib/appproject-components.component.d.ts +8 -0
  33. package/lib/appproject-components.module.d.ts +36 -0
  34. package/lib/appproject-components.service.d.ts +6 -0
  35. package/lib/baseInputComponent.d.ts +28 -0
  36. package/lib/buttons/baseBtnComponent.d.ts +19 -0
  37. package/lib/buttons/btn-action/btn-action.component.d.ts +21 -0
  38. package/lib/buttons/btn-cancelar/btn-cancelar.component.d.ts +10 -0
  39. package/lib/buttons/btn-excluir/btn-excluir.component.d.ts +12 -0
  40. package/lib/buttons/btn-novo/btn-novo.component.d.ts +13 -0
  41. package/lib/buttons/btn-salvar/btn-salvar.component.d.ts +9 -0
  42. package/lib/entity-edit/entity-edit.component.d.ts +22 -0
  43. package/lib/grid-view/grid-view.component.d.ts +52 -0
  44. package/lib/input-area/input-area.component.d.ts +24 -0
  45. package/lib/input-arquivo/input-arquivo.component.d.ts +43 -0
  46. package/lib/input-cep/input-cep.component.d.ts +29 -0
  47. package/lib/input-checkbox/input-checkbox.component.d.ts +21 -0
  48. package/lib/input-format/input-format.component.d.ts +27 -0
  49. package/lib/input-pesquisa/input-pesquisa.component.d.ts +69 -0
  50. package/lib/input-radio/input-radio.component.d.ts +23 -0
  51. package/lib/input-select/input-select.component.d.ts +32 -0
  52. package/lib/input-text/input-text.component.d.ts +33 -0
  53. package/lib/input-valor/input-valor.component.d.ts +29 -0
  54. package/{src/lib/lib-config.ts → lib/lib-config.d.ts} +3 -4
  55. package/lib/model-treeview/model-treeview.component.d.ts +39 -0
  56. package/lib/tree-view/tree-view.component.d.ts +23 -0
  57. package/lib/tree-view-nivel/tree-view-nivel.component.d.ts +17 -0
  58. package/package.json +26 -15
  59. package/{src/public-api.ts → public-api.d.ts} +24 -30
  60. package/karma.conf.js +0 -44
  61. package/ng-package.json +0 -7
  62. package/src/lib/appproject-components.component.spec.ts +0 -23
  63. package/src/lib/appproject-components.component.ts +0 -20
  64. package/src/lib/appproject-components.module.ts +0 -106
  65. package/src/lib/appproject-components.service.spec.ts +0 -16
  66. package/src/lib/appproject-components.service.ts +0 -9
  67. package/src/lib/baseComponent.scss +0 -162
  68. package/src/lib/baseInputComponent.ts +0 -35
  69. package/src/lib/buttons/baseBtnComponent.ts +0 -38
  70. package/src/lib/buttons/btn-action/btn-action.component.html +0 -11
  71. package/src/lib/buttons/btn-action/btn-action.component.scss +0 -7
  72. package/src/lib/buttons/btn-action/btn-action.component.spec.ts +0 -24
  73. package/src/lib/buttons/btn-action/btn-action.component.ts +0 -31
  74. package/src/lib/buttons/btn-cancelar/btn-cancelar.component.html +0 -14
  75. package/src/lib/buttons/btn-cancelar/btn-cancelar.component.scss +0 -5
  76. package/src/lib/buttons/btn-cancelar/btn-cancelar.component.spec.ts +0 -24
  77. package/src/lib/buttons/btn-cancelar/btn-cancelar.component.ts +0 -19
  78. package/src/lib/buttons/btn-excluir/btn-excluir.component.html +0 -6
  79. package/src/lib/buttons/btn-excluir/btn-excluir.component.scss +0 -5
  80. package/src/lib/buttons/btn-excluir/btn-excluir.component.spec.ts +0 -24
  81. package/src/lib/buttons/btn-excluir/btn-excluir.component.ts +0 -18
  82. package/src/lib/buttons/btn-novo/btn-novo.component.html +0 -14
  83. package/src/lib/buttons/btn-novo/btn-novo.component.scss +0 -8
  84. package/src/lib/buttons/btn-novo/btn-novo.component.spec.ts +0 -24
  85. package/src/lib/buttons/btn-novo/btn-novo.component.ts +0 -20
  86. package/src/lib/buttons/btn-salvar/btn-salvar.component.html +0 -8
  87. package/src/lib/buttons/btn-salvar/btn-salvar.component.scss +0 -5
  88. package/src/lib/buttons/btn-salvar/btn-salvar.component.spec.ts +0 -24
  89. package/src/lib/buttons/btn-salvar/btn-salvar.component.ts +0 -16
  90. package/src/lib/entity-edit/entity-edit.component.html +0 -143
  91. package/src/lib/entity-edit/entity-edit.component.scss +0 -4
  92. package/src/lib/entity-edit/entity-edit.component.spec.ts +0 -23
  93. package/src/lib/entity-edit/entity-edit.component.ts +0 -43
  94. package/src/lib/grid-view/grid-view.component.html +0 -116
  95. package/src/lib/grid-view/grid-view.component.scss +0 -47
  96. package/src/lib/grid-view/grid-view.component.spec.ts +0 -23
  97. package/src/lib/grid-view/grid-view.component.ts +0 -292
  98. package/src/lib/input-area/input-area.component.html +0 -30
  99. package/src/lib/input-area/input-area.component.scss +0 -68
  100. package/src/lib/input-area/input-area.component.spec.ts +0 -23
  101. package/src/lib/input-area/input-area.component.ts +0 -69
  102. package/src/lib/input-arquivo/input-arquivo.component.html +0 -11
  103. package/src/lib/input-arquivo/input-arquivo.component.scss +0 -0
  104. package/src/lib/input-arquivo/input-arquivo.component.spec.ts +0 -23
  105. package/src/lib/input-arquivo/input-arquivo.component.ts +0 -140
  106. package/src/lib/input-cep/input-cep.component.html +0 -38
  107. package/src/lib/input-cep/input-cep.component.scss +0 -0
  108. package/src/lib/input-cep/input-cep.component.spec.ts +0 -23
  109. package/src/lib/input-cep/input-cep.component.ts +0 -186
  110. package/src/lib/input-checkbox/input-checkbox.component.html +0 -12
  111. package/src/lib/input-checkbox/input-checkbox.component.scss +0 -11
  112. package/src/lib/input-checkbox/input-checkbox.component.spec.ts +0 -23
  113. package/src/lib/input-checkbox/input-checkbox.component.ts +0 -48
  114. package/src/lib/input-format/input-format.component.html +0 -32
  115. package/src/lib/input-format/input-format.component.scss +0 -47
  116. package/src/lib/input-format/input-format.component.spec.ts +0 -23
  117. package/src/lib/input-format/input-format.component.ts +0 -139
  118. package/src/lib/input-pesquisa/input-pesquisa.component.html +0 -77
  119. package/src/lib/input-pesquisa/input-pesquisa.component.scss +0 -127
  120. package/src/lib/input-pesquisa/input-pesquisa.component.spec.ts +0 -23
  121. package/src/lib/input-pesquisa/input-pesquisa.component.ts +0 -558
  122. package/src/lib/input-radio/input-radio.component.html +0 -21
  123. package/src/lib/input-radio/input-radio.component.scss +0 -3
  124. package/src/lib/input-radio/input-radio.component.spec.ts +0 -23
  125. package/src/lib/input-radio/input-radio.component.ts +0 -49
  126. package/src/lib/input-select/input-select.component.html +0 -29
  127. package/src/lib/input-select/input-select.component.scss +0 -62
  128. package/src/lib/input-select/input-select.component.spec.ts +0 -23
  129. package/src/lib/input-select/input-select.component.ts +0 -96
  130. package/src/lib/input-text/input-text.component.html +0 -48
  131. package/src/lib/input-text/input-text.component.scss +0 -63
  132. package/src/lib/input-text/input-text.component.spec.ts +0 -23
  133. package/src/lib/input-text/input-text.component.ts +0 -78
  134. package/src/lib/input-valor/input-valor.component.html +0 -32
  135. package/src/lib/input-valor/input-valor.component.scss +0 -47
  136. package/src/lib/input-valor/input-valor.component.spec.ts +0 -23
  137. package/src/lib/input-valor/input-valor.component.ts +0 -164
  138. package/src/lib/model-treeview/model-treeview.component.html +0 -20
  139. package/src/lib/model-treeview/model-treeview.component.scss +0 -0
  140. package/src/lib/model-treeview/model-treeview.component.spec.ts +0 -23
  141. package/src/lib/model-treeview/model-treeview.component.ts +0 -152
  142. package/src/lib/tree-view/tree-view.component.html +0 -96
  143. package/src/lib/tree-view/tree-view.component.scss +0 -50
  144. package/src/lib/tree-view/tree-view.component.spec.ts +0 -23
  145. package/src/lib/tree-view/tree-view.component.ts +0 -92
  146. package/src/lib/tree-view-nivel/tree-view-nivel.component.html +0 -17
  147. package/src/lib/tree-view-nivel/tree-view-nivel.component.scss +0 -8
  148. package/src/lib/tree-view-nivel/tree-view-nivel.component.spec.ts +0 -23
  149. package/src/lib/tree-view-nivel/tree-view-nivel.component.ts +0 -43
  150. package/src/test.ts +0 -15
  151. package/tsconfig.lib.json +0 -15
  152. package/tsconfig.lib.prod.json +0 -10
  153. package/tsconfig.spec.json +0 -17
@@ -1,24 +0,0 @@
1
- import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
2
- import { IonicModule } from '@ionic/angular';
3
-
4
- import { BtnActionComponent } from './btn-action.component';
5
-
6
- describe('BtnActionComponent', () => {
7
- let component: BtnActionComponent;
8
- let fixture: ComponentFixture<BtnActionComponent>;
9
-
10
- beforeEach(waitForAsync(() => {
11
- TestBed.configureTestingModule({
12
- declarations: [ BtnActionComponent ],
13
- imports: [IonicModule.forRoot()]
14
- }).compileComponents();
15
-
16
- fixture = TestBed.createComponent(BtnActionComponent);
17
- component = fixture.componentInstance;
18
- fixture.detectChanges();
19
- }));
20
-
21
- it('should create', () => {
22
- expect(component).toBeTruthy();
23
- });
24
- });
@@ -1,31 +0,0 @@
1
- import { Component, Input, OnInit } from '@angular/core';
2
- import { BaseBtnComponent } from '../baseBtnComponent';
3
-
4
- @Component({
5
- selector: 'kb-btn-action',
6
- templateUrl: './btn-action.component.html',
7
- styleUrls: ['./btn-action.component.scss'],
8
- })
9
- export class BtnActionComponent extends BaseBtnComponent implements OnInit {
10
- @Input() override title: string = 'Abrir';
11
- @Input() color: string = 'primary';
12
- @Input() hidden: boolean = false;
13
- @Input() override icon: string = '';
14
- @Input() override iconSrc: string = '';
15
- @Input() imgSrc: string = '';
16
- @Input() boxColor: string = '#4c8dff';
17
- @Input() btnMargin: string = '4px';
18
- @Input() override expand: string = 'block';
19
- @Input() iconStyle: string = '';
20
- @Input() titleStyle: string = '';
21
- buttonStyle: string = '';
22
- constructor() {
23
- super();
24
- this.type = 'button';
25
- }
26
-
27
- override ngOnInit() {
28
- this.buttonStyle = '';
29
- }
30
-
31
- }
@@ -1,14 +0,0 @@
1
- <ion-button color="tertiary" [type]="type" [disabled]="disabled" [fill]="fill" [expand]="expand"
2
- [size]="size"
3
- (click)="onClick()"
4
- >
5
- <ion-icon [slot]="title ? 'start' : 'icon-only'" [src]="iconSrc" [name]="icon"></ion-icon>
6
- {{ title }}
7
- </ion-button>
8
- <!--
9
- <ion-button color="tertiary" fill="outline" (click)="cancelarContato()" style="box-shadow: #6370ff 0px 3px 3px 0.05px"
10
- [disabled]="!selectedContato">
11
- <ion-icon src="/assets/icon/limpar_purple_24dp.svg"></ion-icon>
12
- Cancelar
13
- </ion-button>
14
- -->
@@ -1,5 +0,0 @@
1
- ion-button {
2
- //width: 100%;
3
- margin: 4px;
4
- box-shadow: #6370ff 0px 3px 3px 0.05px;
5
- }
@@ -1,24 +0,0 @@
1
- import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
2
- import { IonicModule } from '@ionic/angular';
3
-
4
- import { BtnCancelarComponent } from './btn-cancelar.component';
5
-
6
- describe('BtnCancelarComponent', () => {
7
- let component: BtnCancelarComponent;
8
- let fixture: ComponentFixture<BtnCancelarComponent>;
9
-
10
- beforeEach(waitForAsync(() => {
11
- TestBed.configureTestingModule({
12
- declarations: [ BtnCancelarComponent ],
13
- imports: [IonicModule.forRoot()]
14
- }).compileComponents();
15
-
16
- fixture = TestBed.createComponent(BtnCancelarComponent);
17
- component = fixture.componentInstance;
18
- fixture.detectChanges();
19
- }));
20
-
21
- it('should create', () => {
22
- expect(component).toBeTruthy();
23
- });
24
- });
@@ -1,19 +0,0 @@
1
- import { Component, Input, OnInit } from '@angular/core';
2
- import { BaseBtnComponent } from '../baseBtnComponent';
3
-
4
- @Component({
5
- selector: 'kb-btn-cancelar',
6
- templateUrl: './btn-cancelar.component.html',
7
- styleUrls: ['./btn-cancelar.component.scss'],
8
- })
9
- export class BtnCancelarComponent extends BaseBtnComponent implements OnInit {
10
- //@Input() override iconSrc = "/assets/icon/limpar_purple_24dp.svg";
11
- @Input() override icon = "close-outline";
12
- @Input() override title: string = 'Cancelar';
13
- //@Input() override icon: string = '';
14
- constructor() {
15
- super();
16
- this.type = 'button';
17
- }
18
-
19
- }
@@ -1,6 +0,0 @@
1
- <ion-button color="danger" [type]="type" [disabled]="disabled" [fill]="fill" [expand]="expand" [size]="size"
2
- (click)="onClick()"
3
- >
4
- <ion-icon *ngIf="icon" [slot]="title ? 'start' : 'icon-only'" [name]="icon"></ion-icon>
5
- {{ title }}
6
- </ion-button>
@@ -1,5 +0,0 @@
1
- ion-button {
2
- //width: 100%;
3
- margin: 4px;
4
- box-shadow: #ed576b 0px 3px 3px 0.05px;
5
- }
@@ -1,24 +0,0 @@
1
- import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
2
- import { IonicModule } from '@ionic/angular';
3
-
4
- import { BtnExcluirComponent } from './btn-excluir.component';
5
-
6
- describe('BtnExcluirComponent', () => {
7
- let component: BtnExcluirComponent;
8
- let fixture: ComponentFixture<BtnExcluirComponent>;
9
-
10
- beforeEach(waitForAsync(() => {
11
- TestBed.configureTestingModule({
12
- declarations: [ BtnExcluirComponent ],
13
- imports: [IonicModule.forRoot()]
14
- }).compileComponents();
15
-
16
- fixture = TestBed.createComponent(BtnExcluirComponent);
17
- component = fixture.componentInstance;
18
- fixture.detectChanges();
19
- }));
20
-
21
- it('should create', () => {
22
- expect(component).toBeTruthy();
23
- });
24
- });
@@ -1,18 +0,0 @@
1
- import { Component, Input, OnInit } from '@angular/core';
2
- import { BaseBtnComponent } from '../baseBtnComponent';
3
-
4
- @Component({
5
- selector: 'kb-btn-excluir',
6
- templateUrl: './btn-excluir.component.html',
7
- styleUrls: ['./btn-excluir.component.scss'],
8
- })
9
- export class BtnExcluirComponent extends BaseBtnComponent implements OnInit {
10
- @Input() override type: string = 'button';
11
- @Input() override expand: string = 'inline';
12
- @Input() override icon: string = 'trash';
13
- @Input() override title: string = 'Excluir';
14
- constructor() {
15
- super();
16
- }
17
-
18
- }
@@ -1,14 +0,0 @@
1
- <ion-button color="primary" [type]="type" [disabled]="disabled" [fill]="fill" [expand]="expand"
2
- [size]="size"
3
- (click)="onClick()"
4
- >
5
- <ion-icon *ngIf="icon || iconSrc" [slot]="title ? 'start' : 'icon-only'" [name]="icon" [src]="iconSrc"></ion-icon>
6
- {{ title }}
7
- <img *ngIf="imgSrc" [src]="imgSrc" [slot]="title ? 'start' : 'icon-only'"/>
8
- </ion-button>
9
- <!--
10
- <ion-button (click)="novoContato()" fill="outline" style="box-shadow: #4c8dff 0px 3px 3px 0.05px">
11
- <ion-icon slot="start" name="person-add"></ion-icon>
12
- Novo
13
- </ion-button>
14
- -->
@@ -1,8 +0,0 @@
1
- ion-button {
2
- //width: 100%;
3
- box-shadow: #4c8dff 0px 3px 3px 0.05px;
4
- }
5
-
6
- img {
7
- width: 24px;margin-right: 6px;
8
- }
@@ -1,24 +0,0 @@
1
- import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
2
- import { IonicModule } from '@ionic/angular';
3
-
4
- import { BtnNovoComponent } from './btn-novo.component';
5
-
6
- describe('BtnNovoComponent', () => {
7
- let component: BtnNovoComponent;
8
- let fixture: ComponentFixture<BtnNovoComponent>;
9
-
10
- beforeEach(waitForAsync(() => {
11
- TestBed.configureTestingModule({
12
- declarations: [ BtnNovoComponent ],
13
- imports: [IonicModule.forRoot()]
14
- }).compileComponents();
15
-
16
- fixture = TestBed.createComponent(BtnNovoComponent);
17
- component = fixture.componentInstance;
18
- fixture.detectChanges();
19
- }));
20
-
21
- it('should create', () => {
22
- expect(component).toBeTruthy();
23
- });
24
- });
@@ -1,20 +0,0 @@
1
- import { Component, Input, OnInit } from '@angular/core';
2
- import { BaseBtnComponent } from '../baseBtnComponent';
3
-
4
- @Component({
5
- selector: 'kb-btn-novo',
6
- templateUrl: './btn-novo.component.html',
7
- styleUrls: ['./btn-novo.component.scss'],
8
- })
9
- export class BtnNovoComponent extends BaseBtnComponent implements OnInit {
10
- @Input() override title: string = 'Novo';
11
- @Input() override icon: string = 'person-add';
12
- @Input() override iconSrc: string = '';
13
- @Input() override expand: string = 'block';
14
- @Input() imgSrc: string = '';
15
- constructor() {
16
- super();
17
- this.type = 'button';
18
- }
19
-
20
- }
@@ -1,8 +0,0 @@
1
- <ion-button color="success" [type]="type" [disabled]="disabled" [fill]="fill" [expand]="expand"
2
- [size]="size"
3
- (click)="onClick()"
4
- [style.margin]="btnMargin"
5
- >
6
- <ion-icon [slot]="title ? 'start' : 'icon-only'" [name]="icon"></ion-icon>
7
- {{ title }}
8
- </ion-button>
@@ -1,5 +0,0 @@
1
- ion-button {
2
- //width: 100%;
3
- //margin: 4px;
4
- box-shadow: #42d77d 0px 3px 3px 0.05px
5
- }
@@ -1,24 +0,0 @@
1
- import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
2
- import { IonicModule } from '@ionic/angular';
3
-
4
- import { BtnSalvarComponent } from './btn-salvar.component';
5
-
6
- describe('BtnSalvarComponent', () => {
7
- let component: BtnSalvarComponent;
8
- let fixture: ComponentFixture<BtnSalvarComponent>;
9
-
10
- beforeEach(waitForAsync(() => {
11
- TestBed.configureTestingModule({
12
- declarations: [ BtnSalvarComponent ],
13
- imports: [IonicModule.forRoot()]
14
- }).compileComponents();
15
-
16
- fixture = TestBed.createComponent(BtnSalvarComponent);
17
- component = fixture.componentInstance;
18
- fixture.detectChanges();
19
- }));
20
-
21
- it('should create', () => {
22
- expect(component).toBeTruthy();
23
- });
24
- });
@@ -1,16 +0,0 @@
1
- import { Component, Input, OnInit, Output } from '@angular/core';
2
- import { EventEmitter } from '@angular/core';
3
- import { BaseBtnComponent } from '../baseBtnComponent';
4
-
5
- @Component({
6
- selector: 'kb-btn-salvar',
7
- templateUrl: './btn-salvar.component.html',
8
- styleUrls: ['./btn-salvar.component.scss'],
9
- })
10
- export class BtnSalvarComponent extends BaseBtnComponent implements OnInit {
11
- @Input() btnMargin: string = '4px';
12
- constructor() {
13
- super();
14
- }
15
-
16
- }
@@ -1,143 +0,0 @@
1
- <form *ngIf="campos && campos.length" [formGroup]="entidadeForm" style="width: 100%;">
2
-
3
-
4
- <ion-row *ngFor="let linha of campos" [class]="rowClass">
5
- <ng-container *ngFor="let campo of linha.Linha">
6
- <!-- {{ campo.Nome }} {{ campo.Tipo }} -->
7
-
8
- <ion-col [sizeMd]="campo.Size" *ngIf="campo.Tipo == 'input-text'">
9
- <kb-input-text label="{{campo.Label ?? campo.Nome}}" [placeholder]="campo.PlaceHolderVisivel ? (campo.Label ?? campo.Nome + '...') : ''"
10
- [form]="entidadeForm" [max]="campo.Tamanho ?? '50'" [validation_messages]="validation_messages[campo.Nome]"
11
- [formControlName]="campo.Nome" [campoFoco]="campo.CampoFoco" [readonly]="campo.ReadOnly"
12
- [type]="campo.TipoInput ?? 'text'"
13
- [showSeePassword]="campo.TipoInput == 'password'"
14
- [showCustomAction]="campo.InputAction"
15
- [customActionIcon]="campo.InputActionIcon ?? 'search-outline'"
16
- (customActionClick)="campo.click ? campo.click($event) : emptyHandler()"
17
-
18
- [itemClass]="itemClass">
19
- </kb-input-text>
20
- </ion-col>
21
-
22
- <ion-col [sizeMd]="campo.Size" *ngIf="campo.Tipo == 'input-area'">
23
- <kb-input-area label="{{campo.Label ?? campo.Nome}}" [placeholder]="campo.PlaceHolderVisivel ? (campo.Label ?? campo.Nome + '...') : ''"
24
- [form]="entidadeForm" [max]="campo.Tamanho ?? '50'" [validation_messages]="validation_messages[campo.Nome]"
25
- [formControlName]="campo.Nome" [campoFoco]="campo.CampoFoco" [readonly]="campo.ReadOnly" [linhas]="campo.Linhas ?? 5"
26
- [itemClass]="itemClass">
27
- </kb-input-area>
28
- </ion-col>
29
-
30
- <ion-col [sizeMd]="campo.Size" *ngIf="campo.Tipo == 'input-cep'">
31
- <kb-input-cep label="{{campo.Label ?? campo.Nome}}" [form]="entidadeForm"
32
- [validation_messages]="validation_messages[campo.Nome]" [formControlName]="campo.Nome"
33
- [campoFoco]="campo.CampoFoco" [readonly]="campo.ReadOnly"
34
- [itemClass]="itemClass"
35
- (getResultados)="campo.change ? campo.change($event) : emptyHandler()"
36
- >
37
- </kb-input-cep>
38
- </ion-col>
39
-
40
- <ion-col [sizeMd]="campo.Size" *ngIf="campo.Tipo == 'input-valor'">
41
- <kb-input-valor label="{{campo.Label ?? campo.Nome}}" [form]="entidadeForm" [max]="campo.Tamanho ?? '50'"
42
- [validation_messages]="validation_messages[campo.Nome]" [formControlName]="campo.Nome"
43
- [campoFoco]="campo.CampoFoco" [readonly]="campo.ReadOnly"
44
- [itemClass]="itemClass">
45
- </kb-input-valor>
46
- </ion-col>
47
-
48
- <ion-col [sizeMd]="campo.Size" *ngIf="campo.Tipo == 'input-format'">
49
- <kb-input-format label="{{campo.Label ?? campo.Nome}}" [form]="entidadeForm" [max]="campo.Tamanho ?? '50'"
50
- [validation_messages]="validation_messages[campo.Nome]" [formControlName]="campo.Nome"
51
- [campoFoco]="campo.CampoFoco" [readonly]="campo.ReadOnly" [formato]="campo.Formato ?? ''"
52
- [itemClass]="itemClass">
53
- </kb-input-format>
54
- </ion-col>
55
-
56
- <ion-col [sizeMd]="campo.Size" *ngIf="campo.Tipo == 'input-checkbox'">
57
- <kb-input-checkbox label="{{ campo.Label }}" [form]="entidadeForm"
58
- [validation_messages]="validation_messages[campo.Nome]" [formControlName]="campo.Nome"
59
- [campoFoco]="campo.CampoFoco" [readonly]="campo.ReadOnly"
60
- [itemClass]="itemClass"
61
- [labelColor]="campo.BtnColor">
62
-
63
- </kb-input-checkbox>
64
- </ion-col>
65
-
66
- <ion-col [sizeMd]="campo.Size" *ngIf="campo.Tipo == 'input-select'">
67
- <kb-input-select [label]="campo.Label ?? campo.Nome" [placeholder]="'Selecionar...'"
68
- [formControlName]="campo.Nome" [form]="entidadeForm" [itens]="campo.Itens" [itemId]="campo.ItemId ?? 'Id'"
69
- [itemNome]="campo.ItemNome ?? 'Nome'" [validation_messages]="validation_messages[campo.Nome]"
70
- (selectChangeEntity)="campo.change ? campo.change($event) : emptyHandler()" [readonly]="campo.ReadOnly"
71
- [itemClass]="itemClass">
72
- </kb-input-select>
73
- </ion-col>
74
-
75
- <ion-col [sizeMd]="campo.Size" *ngIf="campo.Tipo == 'input-radio'">
76
- <kb-input-radio [label]="campo.Label ?? campo.Nome" [formControlName]="campo.Nome" [form]="entidadeForm"
77
- [itens]="campo.Itens" [itemId]="campo.ItemId" [itemNome]="campo.ItemNome" [readonly]="campo.ReadOnly"
78
- [itemClass]="itemClass">
79
- </kb-input-radio>
80
- </ion-col>
81
-
82
- <ion-col [sizeMd]="campo.Size" *ngIf="campo.Tipo == 'input-pesquisa'">
83
- <kb-input-pesquisa #pesquisaCentroCustoPai
84
- [label]="campo.Label ?? campo.Nome"
85
- [campoId]="campo.ItemId"
86
- [focusField]="campo.focusField"
87
- [formControlName]="campo.Nome"
88
- placeholder="Pesquisar..."
89
- [campoDisplay]="campo.ItemNome ?? 'Nome'"
90
- [form]="entidadeForm"
91
- [tipo]="campo.TipoPesquisa"
92
- [urlItem]="campo.UrlItem"
93
- [max]="campo.Tamanho ?? '50'"
94
- [url]="campo.UrlPesquisa"
95
- [readonly]="campo.ReadOnly"
96
- (pesquisaChange)="campo.change ? campo.change($event) : emptyHandler()"
97
- [itemClass]="itemClass">
98
- </kb-input-pesquisa>
99
- </ion-col>
100
-
101
- <ion-col [sizeMd]="campo.Size" *ngIf="campo.Tipo == 'input-button'">
102
- <!--
103
- <kb-btn-action [title]="campo.Label" [icon]="campo.Icon" [iconSrc]="campo.IconSrc" [color]="campo.BtnColor ?? 'light'"
104
- [expand]="campo.BtnExpand ?? 'block'" style="margin-top: var(--btn-action-margin-top, auto);">
105
- </kb-btn-action>
106
- -->
107
- <ion-button [expand]="campo.BtnExpand ?? 'block'" [color]="campo.BtnColor ?? 'light'"
108
- (click)="campo.click ? campo.click($event) : emptyHandler()" [size]="campo.BtnSize ?? 'default'"
109
- [disabled]="campo.ReadOnly">
110
- <ion-icon *ngIf="campo.Icon || campo.IconSrc" [name]="campo.Icon" [src]="campo.IconSrc"></ion-icon>
111
- {{ campo.Label }}
112
- </ion-button>
113
- </ion-col>
114
-
115
- <ion-col *ngIf="campo.Tipo == 'col'" size-md="1" size-xs="0">
116
-
117
- </ion-col>
118
-
119
- <ion-col *ngIf="campo.Tipo == 'sub-titulo'" size="12">
120
- <ion-list lines="none" class="ion-no-padding">
121
- <ion-list-header color="primary" [style]="campo.CampoStyle ?? ''">
122
- <ion-label [style]="campo.LabelStyle ?? ''">{{ campo.Label }}</ion-label>
123
- </ion-list-header>
124
- </ion-list>
125
- </ion-col>
126
- </ng-container>
127
- </ion-row>
128
-
129
- <!--
130
- <ion-col class="select ion-no-margin ion-no-padding">
131
- <ion-item lines="none">
132
- <ion-label>Totalizador</ion-label>
133
- <ion-checkbox slot="start" formControlName="Totalizador"></ion-checkbox>
134
- </ion-item>
135
- </ion-col>
136
- <ion-col class="select ion-no-margin ion-no-padding">
137
- <ion-item lines="none">
138
- <ion-label>Inativo</ion-label>
139
- <ion-checkbox slot="start" formControlName="Inativo"></ion-checkbox>
140
- </ion-item>
141
- </ion-col>
142
- -->
143
- </form>
@@ -1,4 +0,0 @@
1
- ion-list-header {
2
- text-align: center;
3
- font-size: large;
4
- }
@@ -1,23 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { EntityEditComponent } from './entity-edit.component';
4
-
5
- describe('EntityEditComponent', () => {
6
- let component: EntityEditComponent;
7
- let fixture: ComponentFixture<EntityEditComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- imports: [EntityEditComponent]
12
- })
13
- .compileComponents();
14
-
15
- fixture = TestBed.createComponent(EntityEditComponent);
16
- component = fixture.componentInstance;
17
- fixture.detectChanges();
18
- });
19
-
20
- it('should create', () => {
21
- expect(component).toBeTruthy();
22
- });
23
- });
@@ -1,43 +0,0 @@
1
- import { Component, Input, NgZone, OnInit } from '@angular/core';
2
- import { FormGroup } from '@angular/forms';
3
- import { BaseModel, HtmlRow } from 'appproject-lib';
4
-
5
- @Component({
6
- selector: 'kb-entity-edit',
7
- //standalone: true,
8
- templateUrl: './entity-edit.component.html',
9
- styleUrl: './entity-edit.component.scss'
10
- })
11
- export class EntityEditComponent<T extends BaseModel> implements OnInit {
12
- @Input() entidade: T | null;
13
- //entidade: any;
14
- /**
15
- * Vai receber montado do base cadastro
16
- */
17
- @Input() campos: HtmlRow[];
18
- @Input() entidadeForm: FormGroup;
19
- @Input() validation_messages: any;
20
- @Input() itemClass: string = "";
21
- @Input() rowClass: string = "";
22
- constructor(private ngZone: NgZone) {
23
-
24
- }
25
-
26
- ngOnInit() {
27
- //this.getEntidadeCampos();
28
- }
29
-
30
- getEntidadeCampos() {
31
- //this.entidade = new this.entidadeTipo();
32
-
33
- // console.log(this.entidade);
34
- // this.ngZone.run(() =>
35
- // this.campos = this.entidade.getHtmlForm()
36
- // );
37
- // console.log(this.campos);
38
- }
39
-
40
- emptyHandler() {
41
-
42
- }
43
- }
@@ -1,116 +0,0 @@
1
- <div style="font-size: 14px;">
2
- <div id="painelExportacao">
3
- <ion-row *ngIf="inMemoryPagination">
4
- <!--
5
- <ion-col size="2">
6
- <ion-button *ngIf="tabelaCampos.Selecionar === true" size="small" fill="outline" color="medium"
7
- (click)="selecionarTodos()">Selecionar Todos</ion-button>
8
- </ion-col>
9
- -->
10
- <ion-col size="3">
11
- <ion-button *ngIf="inMemoryPagination === true" size="small" fill="outline" color="bluetool"
12
- (click)="anterior()">
13
- <ion-icon name="chevron-back-outline" slot="start"></ion-icon>
14
- Anterior
15
- </ion-button>
16
- <ion-button *ngIf="inMemoryPagination === true" size="small" fill="outline" color="bluetool"
17
- (click)="proximo()">
18
- Próximo
19
- <ion-icon name="chevron-forward-outline" slot="end"></ion-icon>
20
- </ion-button>
21
- </ion-col>
22
- <ion-col size="2">
23
- <span style="display: block; margin-top: 10px;" *ngIf="inMemoryPagination && totalRec > 0">Exibindo {{ start + 1 }} - {{ (start + pageOffset) < totalRec ? (start + pageOffset) : totalRec }} total de {{ totalRec }}
24
- </span>
25
- </ion-col>
26
- </ion-row>
27
- </div>
28
- <div style="width: 100%;" [style.min-height]="minHeight">
29
- <table class="grid">
30
- <thead>
31
- <tr style="background-color: var(--ion-color-bluetool); color: white;">
32
- <td *ngIf="tabelaCampos.Selecionar === true" style="width: 3%; text-align: center;">
33
- <input type="checkbox" [(ngModel)]="todosSelecionados" (change)="selecionarTodos()">
34
- </td>
35
- <td *ngFor="let col of tabelaCampos.Colunas" [style.width]="col.Tamanho">
36
- <div style="position: relative;">
37
- <div style="display: flex; justify-content: space-between; align-items: end;">
38
- <strong>{{ col.Titulo }}</strong>
39
- <div>
40
- <ion-icon *ngIf="col.Ordem" slot="end" (click)="ordenar(col)" style="cursor: pointer;"
41
- [name]="col.OrdemStatus == 0 ? 'swap-vertical' : (col.OrdemStatus == 1 ? 'arrow-up': 'arrow-down')"></ion-icon>
42
-
43
- <ion-icon *ngIf="col.Filtrar" name="funnel" (click)="setFiltroOpen(col)" slot="end"></ion-icon>
44
- </div>
45
- </div>
46
-
47
-
48
- <div class="caixaGrande" [hidden]="!col.FiltroVisivel" tabindex="-1"
49
- style="color: black; display: block; position: absolute; z-index: 800; width: 210px; right: 0px; opacity: 0.9;">
50
- Filtrar:
51
- <div>
52
- <div style="display: flex; justify-content: space-between; align-items: start;">
53
- <select style="width: 80px;" [(ngModel)]="col.FiltroOperador">
54
- <option>=</option>
55
- <option>&gt;=</option>
56
- <option>&lt;=</option>
57
- <option>tem</option>
58
- </select>
59
- <input style="width: 100px;" type="text" [(ngModel)]="col.FiltroValor">
60
- </div>
61
- <ion-button size="small" color="medium" expand="block" (click)="filtrar(col)">Filtrar</ion-button>
62
- <ion-button size="small" color="light" expand="block" (click)="limpar()">Limpar</ion-button>
63
- </div>
64
- <div *ngIf="col.Valores" class="scroll-container" style="height: 200px; overflow-y: scroll;">
65
- <div *ngFor="let valor of col.Valores">
66
- <input type="checkbox" [(ngModel)]="valor.Selecionado">
67
- <span>{{ valor.Valor }}</span>
68
- </div>
69
- </div>
70
- </div>
71
-
72
- </div>
73
- </td>
74
- <td *ngIf="tabelaCampos.Excluir === true">
75
-
76
- </td>
77
- </tr>
78
- </thead>
79
- <tbody>
80
- <tr *ngFor="let item of pageDataSet" [class]="item == selectedItem ? 'item-selecionado' : '' ">
81
- <td *ngIf="tabelaCampos.Selecionar === true" style="text-align: center; cursor: auto;">
82
- <input type="checkbox" [(ngModel)]="item[tabelaCampos.CampoSelecionar]" (change)="selecionadoChecked()">
83
- </td>
84
- <td class="col" *ngFor="let col of tabelaCampos.Colunas" [style.width]="col.Tamanho"
85
- [style.text-align]="col.Tipo == 'number' ? 'right' : (col.Alinhamento ?? 'left')"
86
- (click)="col.ClickFunction ? col.ClickFunction(item) : selecionarLinha(item)">
87
- <span *ngIf="col.Pipe == 'date'">{{ item[col.Campo] | date: 'dd/MM/yyyy' }}</span>
88
- <span *ngIf="col.Pipe == 'valor'">{{ item[col.Campo] | valorFormat }}</span>
89
- <span *ngIf="col.RenderFunction" [innerHtml]="col.RenderFunction(item) | safeHtml"></span>
90
- <span *ngIf="!col.Pipe && !col.RenderFunction">{{ item[col.Campo] ?? col.Default }}</span>
91
- </td>
92
- <td *ngIf="tabelaCampos.Excluir === true" style="padding: 0px; text-align: center;">
93
- <ion-button size="small" color="danger" fill="outline" style="transform: scale(0.85);" (click)="excluirLinha(item)">
94
- <ion-icon name="trash"></ion-icon>
95
- </ion-button>
96
- </td>
97
- </tr>
98
- </tbody>
99
- </table>
100
- </div>
101
-
102
- <ion-modal [isOpen]="isFiltroOpen" (didDismiss)="isFiltroOpen = false;">
103
- <ng-template>
104
- <ion-content class="ion-padding">
105
- <div class="caixaGrande">
106
- Filtrar:
107
- <div *ngIf="selectedColuna.Valores">
108
- <div *ngFor="let valor of selectedColuna.Valores">
109
- <span>{{ valor }}</span>
110
- </div>
111
- </div>
112
- </div>
113
- </ion-content>
114
- </ng-template>
115
- </ion-modal>
116
- </div>