appproject-components 1.0.47 → 1.0.49

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 (42) hide show
  1. package/README.md +24 -24
  2. package/karma.conf.js +44 -44
  3. package/ng-package.json +6 -6
  4. package/package.json +1 -1
  5. package/src/lib/appproject-components.component.spec.ts +23 -23
  6. package/src/lib/appproject-components.component.ts +20 -20
  7. package/src/lib/appproject-components.service.spec.ts +16 -16
  8. package/src/lib/appproject-components.service.ts +9 -9
  9. package/src/lib/entity-edit/entity-edit.component.html +142 -142
  10. package/src/lib/entity-edit/entity-edit.component.spec.ts +23 -23
  11. package/src/lib/entity-edit/entity-edit.component.ts +43 -43
  12. package/src/lib/grid-view/grid-view.component.html +115 -115
  13. package/src/lib/grid-view/grid-view.component.spec.ts +23 -23
  14. package/src/lib/grid-view/grid-view.component.ts +292 -292
  15. package/src/lib/input-area/input-area.component.spec.ts +23 -23
  16. package/src/lib/input-area/input-area.component.ts +69 -69
  17. package/src/lib/input-cep/input-cep.component.spec.ts +23 -23
  18. package/src/lib/input-cep/input-cep.component.ts +186 -186
  19. package/src/lib/input-checkbox/input-checkbox.component.html +11 -11
  20. package/src/lib/input-checkbox/input-checkbox.component.spec.ts +23 -23
  21. package/src/lib/input-checkbox/input-checkbox.component.ts +48 -48
  22. package/src/lib/input-format/input-format.component.spec.ts +23 -23
  23. package/src/lib/input-pesquisa/input-pesquisa.component.spec.ts +23 -23
  24. package/src/lib/input-pesquisa/input-pesquisa.component.ts +2 -2
  25. package/src/lib/input-radio/input-radio.component.html +20 -20
  26. package/src/lib/input-radio/input-radio.component.spec.ts +23 -23
  27. package/src/lib/input-radio/input-radio.component.ts +49 -49
  28. package/src/lib/input-select/input-select.component.spec.ts +23 -23
  29. package/src/lib/input-text/input-text.component.spec.ts +23 -23
  30. package/src/lib/input-valor/input-valor.component.spec.ts +23 -23
  31. package/src/lib/model-treeview/model-treeview.component.html +19 -19
  32. package/src/lib/model-treeview/model-treeview.component.spec.ts +23 -23
  33. package/src/lib/model-treeview/model-treeview.component.ts +152 -152
  34. package/src/lib/tree-view/tree-view.component.html +95 -95
  35. package/src/lib/tree-view/tree-view.component.spec.ts +23 -23
  36. package/src/lib/tree-view/tree-view.component.ts +92 -92
  37. package/src/lib/tree-view-nivel/tree-view-nivel.component.html +17 -17
  38. package/src/lib/tree-view-nivel/tree-view-nivel.component.spec.ts +23 -23
  39. package/src/lib/tree-view-nivel/tree-view-nivel.component.ts +43 -43
  40. package/tsconfig.lib.json +15 -15
  41. package/tsconfig.lib.prod.json +10 -10
  42. package/tsconfig.spec.json +17 -17
package/README.md CHANGED
@@ -1,24 +1,24 @@
1
- # AppprojectComponents
2
-
3
- This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.1.0.
4
-
5
- ## Code scaffolding
6
-
7
- Run `ng generate component component-name --project appproject-components` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project appproject-components`.
8
- > Note: Don't forget to add `--project appproject-components` or else it will be added to the default project in your `angular.json` file.
9
-
10
- ## Build
11
-
12
- Run `ng build appproject-components` to build the project. The build artifacts will be stored in the `dist/` directory.
13
-
14
- ## Publishing
15
-
16
- After building your library with `ng build appproject-components`, go to the dist folder `cd dist/appproject-components` and run `npm publish`.
17
-
18
- ## Running unit tests
19
-
20
- Run `ng test appproject-components` to execute the unit tests via [Karma](https://karma-runner.github.io).
21
-
22
- ## Further help
23
-
24
- To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
1
+ # AppprojectComponents
2
+
3
+ This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.1.0.
4
+
5
+ ## Code scaffolding
6
+
7
+ Run `ng generate component component-name --project appproject-components` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project appproject-components`.
8
+ > Note: Don't forget to add `--project appproject-components` or else it will be added to the default project in your `angular.json` file.
9
+
10
+ ## Build
11
+
12
+ Run `ng build appproject-components` to build the project. The build artifacts will be stored in the `dist/` directory.
13
+
14
+ ## Publishing
15
+
16
+ After building your library with `ng build appproject-components`, go to the dist folder `cd dist/appproject-components` and run `npm publish`.
17
+
18
+ ## Running unit tests
19
+
20
+ Run `ng test appproject-components` to execute the unit tests via [Karma](https://karma-runner.github.io).
21
+
22
+ ## Further help
23
+
24
+ To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
package/karma.conf.js CHANGED
@@ -1,44 +1,44 @@
1
- // Karma configuration file, see link for more information
2
- // https://karma-runner.github.io/1.0/config/configuration-file.html
3
-
4
- module.exports = function (config) {
5
- config.set({
6
- basePath: '',
7
- frameworks: ['jasmine', '@angular-devkit/build-angular'],
8
- plugins: [
9
- require('karma-jasmine'),
10
- require('karma-chrome-launcher'),
11
- require('karma-jasmine-html-reporter'),
12
- require('karma-coverage'),
13
- require('@angular-devkit/build-angular/plugins/karma')
14
- ],
15
- client: {
16
- jasmine: {
17
- // you can add configuration options for Jasmine here
18
- // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19
- // for example, you can disable the random execution with `random: false`
20
- // or set a specific seed with `seed: 4321`
21
- },
22
- clearContext: false // leave Jasmine Spec Runner output visible in browser
23
- },
24
- jasmineHtmlReporter: {
25
- suppressAll: true // removes the duplicated traces
26
- },
27
- coverageReporter: {
28
- dir: require('path').join(__dirname, '../../coverage/appproject-components'),
29
- subdir: '.',
30
- reporters: [
31
- { type: 'html' },
32
- { type: 'text-summary' }
33
- ]
34
- },
35
- reporters: ['progress', 'kjhtml'],
36
- port: 9876,
37
- colors: true,
38
- logLevel: config.LOG_INFO,
39
- autoWatch: true,
40
- browsers: ['Chrome'],
41
- singleRun: false,
42
- restartOnFileChange: true
43
- });
44
- };
1
+ // Karma configuration file, see link for more information
2
+ // https://karma-runner.github.io/1.0/config/configuration-file.html
3
+
4
+ module.exports = function (config) {
5
+ config.set({
6
+ basePath: '',
7
+ frameworks: ['jasmine', '@angular-devkit/build-angular'],
8
+ plugins: [
9
+ require('karma-jasmine'),
10
+ require('karma-chrome-launcher'),
11
+ require('karma-jasmine-html-reporter'),
12
+ require('karma-coverage'),
13
+ require('@angular-devkit/build-angular/plugins/karma')
14
+ ],
15
+ client: {
16
+ jasmine: {
17
+ // you can add configuration options for Jasmine here
18
+ // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19
+ // for example, you can disable the random execution with `random: false`
20
+ // or set a specific seed with `seed: 4321`
21
+ },
22
+ clearContext: false // leave Jasmine Spec Runner output visible in browser
23
+ },
24
+ jasmineHtmlReporter: {
25
+ suppressAll: true // removes the duplicated traces
26
+ },
27
+ coverageReporter: {
28
+ dir: require('path').join(__dirname, '../../coverage/appproject-components'),
29
+ subdir: '.',
30
+ reporters: [
31
+ { type: 'html' },
32
+ { type: 'text-summary' }
33
+ ]
34
+ },
35
+ reporters: ['progress', 'kjhtml'],
36
+ port: 9876,
37
+ colors: true,
38
+ logLevel: config.LOG_INFO,
39
+ autoWatch: true,
40
+ browsers: ['Chrome'],
41
+ singleRun: false,
42
+ restartOnFileChange: true
43
+ });
44
+ };
package/ng-package.json CHANGED
@@ -1,7 +1,7 @@
1
- {
2
- "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
- "dest": "../../dist/appproject-components",
4
- "lib": {
5
- "entryFile": "src/public-api.ts"
6
- }
1
+ {
2
+ "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
+ "dest": "../../dist/appproject-components",
4
+ "lib": {
5
+ "entryFile": "src/public-api.ts"
6
+ }
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appproject-components",
3
- "version": "1.0.47",
3
+ "version": "1.0.49",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.0.7",
6
6
  "@angular/core": "^17.0.7",
@@ -1,23 +1,23 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { AppprojectComponentsComponent } from './appproject-components.component';
4
-
5
- describe('AppprojectComponentsComponent', () => {
6
- let component: AppprojectComponentsComponent;
7
- let fixture: ComponentFixture<AppprojectComponentsComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- declarations: [ AppprojectComponentsComponent ]
12
- })
13
- .compileComponents();
14
-
15
- fixture = TestBed.createComponent(AppprojectComponentsComponent);
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 { AppprojectComponentsComponent } from './appproject-components.component';
4
+
5
+ describe('AppprojectComponentsComponent', () => {
6
+ let component: AppprojectComponentsComponent;
7
+ let fixture: ComponentFixture<AppprojectComponentsComponent>;
8
+
9
+ beforeEach(async () => {
10
+ await TestBed.configureTestingModule({
11
+ declarations: [ AppprojectComponentsComponent ]
12
+ })
13
+ .compileComponents();
14
+
15
+ fixture = TestBed.createComponent(AppprojectComponentsComponent);
16
+ component = fixture.componentInstance;
17
+ fixture.detectChanges();
18
+ });
19
+
20
+ it('should create', () => {
21
+ expect(component).toBeTruthy();
22
+ });
23
+ });
@@ -1,20 +1,20 @@
1
- import { Component, OnInit } from '@angular/core';
2
-
3
- @Component({
4
- selector: 'kb-appproject-components',
5
- template: `
6
- <p>
7
- appproject-components works!
8
- </p>
9
- `,
10
- styles: [
11
- ]
12
- })
13
- export class AppprojectComponentsComponent implements OnInit {
14
-
15
- constructor() { }
16
-
17
- ngOnInit(): void {
18
- }
19
-
20
- }
1
+ import { Component, OnInit } from '@angular/core';
2
+
3
+ @Component({
4
+ selector: 'kb-appproject-components',
5
+ template: `
6
+ <p>
7
+ appproject-components works!
8
+ </p>
9
+ `,
10
+ styles: [
11
+ ]
12
+ })
13
+ export class AppprojectComponentsComponent implements OnInit {
14
+
15
+ constructor() { }
16
+
17
+ ngOnInit(): void {
18
+ }
19
+
20
+ }
@@ -1,16 +1,16 @@
1
- import { TestBed } from '@angular/core/testing';
2
-
3
- import { AppprojectComponentsService } from './appproject-components.service';
4
-
5
- describe('AppprojectComponentsService', () => {
6
- let service: AppprojectComponentsService;
7
-
8
- beforeEach(() => {
9
- TestBed.configureTestingModule({});
10
- service = TestBed.inject(AppprojectComponentsService);
11
- });
12
-
13
- it('should be created', () => {
14
- expect(service).toBeTruthy();
15
- });
16
- });
1
+ import { TestBed } from '@angular/core/testing';
2
+
3
+ import { AppprojectComponentsService } from './appproject-components.service';
4
+
5
+ describe('AppprojectComponentsService', () => {
6
+ let service: AppprojectComponentsService;
7
+
8
+ beforeEach(() => {
9
+ TestBed.configureTestingModule({});
10
+ service = TestBed.inject(AppprojectComponentsService);
11
+ });
12
+
13
+ it('should be created', () => {
14
+ expect(service).toBeTruthy();
15
+ });
16
+ });
@@ -1,9 +1,9 @@
1
- import { Injectable } from '@angular/core';
2
-
3
- @Injectable({
4
- providedIn: 'root'
5
- })
6
- export class AppprojectComponentsService {
7
-
8
- constructor() { }
9
- }
1
+ import { Injectable } from '@angular/core';
2
+
3
+ @Injectable({
4
+ providedIn: 'root'
5
+ })
6
+ export class AppprojectComponentsService {
7
+
8
+ constructor() { }
9
+ }
@@ -1,143 +1,143 @@
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
- -->
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
143
  </form>
@@ -1,23 +1,23 @@
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
+ 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
+ });