appproject-components 1.0.48 → 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.
- package/README.md +24 -24
- package/karma.conf.js +44 -0
- package/ng-package.json +7 -0
- package/package.json +15 -26
- package/src/lib/appproject-components.component.spec.ts +23 -0
- package/src/lib/appproject-components.component.ts +20 -0
- package/src/lib/appproject-components.module.ts +106 -0
- package/src/lib/appproject-components.service.spec.ts +16 -0
- package/src/lib/appproject-components.service.ts +9 -0
- package/src/lib/baseComponent.scss +162 -0
- package/src/lib/baseInputComponent.ts +35 -0
- package/src/lib/buttons/baseBtnComponent.ts +38 -0
- package/src/lib/buttons/btn-action/btn-action.component.html +11 -0
- package/src/lib/buttons/btn-action/btn-action.component.scss +7 -0
- package/src/lib/buttons/btn-action/btn-action.component.spec.ts +24 -0
- package/src/lib/buttons/btn-action/btn-action.component.ts +31 -0
- package/src/lib/buttons/btn-cancelar/btn-cancelar.component.html +14 -0
- package/src/lib/buttons/btn-cancelar/btn-cancelar.component.scss +5 -0
- package/src/lib/buttons/btn-cancelar/btn-cancelar.component.spec.ts +24 -0
- package/src/lib/buttons/btn-cancelar/btn-cancelar.component.ts +19 -0
- package/src/lib/buttons/btn-excluir/btn-excluir.component.html +6 -0
- package/src/lib/buttons/btn-excluir/btn-excluir.component.scss +5 -0
- package/src/lib/buttons/btn-excluir/btn-excluir.component.spec.ts +24 -0
- package/src/lib/buttons/btn-excluir/btn-excluir.component.ts +18 -0
- package/src/lib/buttons/btn-novo/btn-novo.component.html +14 -0
- package/src/lib/buttons/btn-novo/btn-novo.component.scss +8 -0
- package/src/lib/buttons/btn-novo/btn-novo.component.spec.ts +24 -0
- package/src/lib/buttons/btn-novo/btn-novo.component.ts +20 -0
- package/src/lib/buttons/btn-salvar/btn-salvar.component.html +8 -0
- package/src/lib/buttons/btn-salvar/btn-salvar.component.scss +5 -0
- package/src/lib/buttons/btn-salvar/btn-salvar.component.spec.ts +24 -0
- package/src/lib/buttons/btn-salvar/btn-salvar.component.ts +16 -0
- package/src/lib/entity-edit/entity-edit.component.html +143 -0
- package/src/lib/entity-edit/entity-edit.component.scss +4 -0
- package/src/lib/entity-edit/entity-edit.component.spec.ts +23 -0
- package/src/lib/entity-edit/entity-edit.component.ts +43 -0
- package/src/lib/grid-view/grid-view.component.html +116 -0
- package/src/lib/grid-view/grid-view.component.scss +47 -0
- package/src/lib/grid-view/grid-view.component.spec.ts +23 -0
- package/src/lib/grid-view/grid-view.component.ts +292 -0
- package/src/lib/input-area/input-area.component.html +30 -0
- package/src/lib/input-area/input-area.component.scss +68 -0
- package/src/lib/input-area/input-area.component.spec.ts +23 -0
- package/src/lib/input-area/input-area.component.ts +69 -0
- package/src/lib/input-arquivo/input-arquivo.component.html +11 -0
- package/src/lib/input-arquivo/input-arquivo.component.scss +0 -0
- package/src/lib/input-arquivo/input-arquivo.component.spec.ts +23 -0
- package/src/lib/input-arquivo/input-arquivo.component.ts +140 -0
- package/src/lib/input-cep/input-cep.component.html +38 -0
- package/src/lib/input-cep/input-cep.component.scss +0 -0
- package/src/lib/input-cep/input-cep.component.spec.ts +23 -0
- package/src/lib/input-cep/input-cep.component.ts +186 -0
- package/src/lib/input-checkbox/input-checkbox.component.html +12 -0
- package/src/lib/input-checkbox/input-checkbox.component.scss +11 -0
- package/src/lib/input-checkbox/input-checkbox.component.spec.ts +23 -0
- package/src/lib/input-checkbox/input-checkbox.component.ts +48 -0
- package/src/lib/input-format/input-format.component.html +32 -0
- package/src/lib/input-format/input-format.component.scss +47 -0
- package/src/lib/input-format/input-format.component.spec.ts +23 -0
- package/src/lib/input-format/input-format.component.ts +139 -0
- package/src/lib/input-pesquisa/input-pesquisa.component.html +77 -0
- package/src/lib/input-pesquisa/input-pesquisa.component.scss +127 -0
- package/src/lib/input-pesquisa/input-pesquisa.component.spec.ts +23 -0
- package/src/lib/input-pesquisa/input-pesquisa.component.ts +558 -0
- package/src/lib/input-radio/input-radio.component.html +21 -0
- package/src/lib/input-radio/input-radio.component.scss +3 -0
- package/src/lib/input-radio/input-radio.component.spec.ts +23 -0
- package/src/lib/input-radio/input-radio.component.ts +49 -0
- package/src/lib/input-select/input-select.component.html +29 -0
- package/src/lib/input-select/input-select.component.scss +62 -0
- package/src/lib/input-select/input-select.component.spec.ts +23 -0
- package/src/lib/input-select/input-select.component.ts +96 -0
- package/src/lib/input-text/input-text.component.html +48 -0
- package/src/lib/input-text/input-text.component.scss +63 -0
- package/src/lib/input-text/input-text.component.spec.ts +23 -0
- package/src/lib/input-text/input-text.component.ts +78 -0
- package/src/lib/input-valor/input-valor.component.html +32 -0
- package/src/lib/input-valor/input-valor.component.scss +47 -0
- package/src/lib/input-valor/input-valor.component.spec.ts +23 -0
- package/src/lib/input-valor/input-valor.component.ts +164 -0
- package/{lib/lib-config.d.ts → src/lib/lib-config.ts} +4 -3
- package/src/lib/model-treeview/model-treeview.component.html +20 -0
- package/src/lib/model-treeview/model-treeview.component.scss +0 -0
- package/src/lib/model-treeview/model-treeview.component.spec.ts +23 -0
- package/src/lib/model-treeview/model-treeview.component.ts +152 -0
- package/src/lib/tree-view/tree-view.component.html +96 -0
- package/src/lib/tree-view/tree-view.component.scss +50 -0
- package/src/lib/tree-view/tree-view.component.spec.ts +23 -0
- package/src/lib/tree-view/tree-view.component.ts +92 -0
- package/src/lib/tree-view-nivel/tree-view-nivel.component.html +17 -0
- package/src/lib/tree-view-nivel/tree-view-nivel.component.scss +8 -0
- package/src/lib/tree-view-nivel/tree-view-nivel.component.spec.ts +23 -0
- package/src/lib/tree-view-nivel/tree-view-nivel.component.ts +43 -0
- package/{public-api.d.ts → src/public-api.ts} +30 -24
- package/src/test.ts +15 -0
- package/tsconfig.lib.json +15 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +17 -0
- package/esm2022/appproject-components.mjs +0 -5
- package/esm2022/lib/appproject-components.component.mjs +0 -22
- package/esm2022/lib/appproject-components.module.mjs +0 -159
- package/esm2022/lib/appproject-components.service.mjs +0 -14
- package/esm2022/lib/baseInputComponent.mjs +0 -69
- package/esm2022/lib/buttons/baseBtnComponent.mjs +0 -63
- package/esm2022/lib/buttons/btn-action/btn-action.component.mjs +0 -55
- package/esm2022/lib/buttons/btn-cancelar/btn-cancelar.component.mjs +0 -25
- package/esm2022/lib/buttons/btn-excluir/btn-excluir.component.mjs +0 -29
- package/esm2022/lib/buttons/btn-novo/btn-novo.component.mjs +0 -33
- package/esm2022/lib/buttons/btn-salvar/btn-salvar.component.mjs +0 -19
- package/esm2022/lib/entity-edit/entity-edit.component.mjs +0 -53
- package/esm2022/lib/grid-view/grid-view.component.mjs +0 -275
- package/esm2022/lib/input-area/input-area.component.mjs +0 -72
- package/esm2022/lib/input-arquivo/input-arquivo.component.mjs +0 -154
- package/esm2022/lib/input-cep/input-cep.component.mjs +0 -180
- package/esm2022/lib/input-checkbox/input-checkbox.component.mjs +0 -51
- package/esm2022/lib/input-format/input-format.component.mjs +0 -138
- package/esm2022/lib/input-pesquisa/input-pesquisa.component.mjs +0 -557
- package/esm2022/lib/input-radio/input-radio.component.mjs +0 -58
- package/esm2022/lib/input-select/input-select.component.mjs +0 -110
- package/esm2022/lib/input-text/input-text.component.mjs +0 -88
- package/esm2022/lib/input-valor/input-valor.component.mjs +0 -161
- package/esm2022/lib/lib-config.mjs +0 -2
- package/esm2022/lib/model-treeview/model-treeview.component.mjs +0 -126
- package/esm2022/lib/tree-view/tree-view.component.mjs +0 -104
- package/esm2022/lib/tree-view-nivel/tree-view-nivel.component.mjs +0 -50
- package/esm2022/public-api.mjs +0 -30
- package/fesm2022/appproject-components.mjs +0 -2531
- package/fesm2022/appproject-components.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/appproject-components.component.d.ts +0 -8
- package/lib/appproject-components.module.d.ts +0 -36
- package/lib/appproject-components.service.d.ts +0 -6
- package/lib/baseInputComponent.d.ts +0 -28
- package/lib/buttons/baseBtnComponent.d.ts +0 -19
- package/lib/buttons/btn-action/btn-action.component.d.ts +0 -21
- package/lib/buttons/btn-cancelar/btn-cancelar.component.d.ts +0 -10
- package/lib/buttons/btn-excluir/btn-excluir.component.d.ts +0 -12
- package/lib/buttons/btn-novo/btn-novo.component.d.ts +0 -13
- package/lib/buttons/btn-salvar/btn-salvar.component.d.ts +0 -9
- package/lib/entity-edit/entity-edit.component.d.ts +0 -22
- package/lib/grid-view/grid-view.component.d.ts +0 -52
- package/lib/input-area/input-area.component.d.ts +0 -24
- package/lib/input-arquivo/input-arquivo.component.d.ts +0 -43
- package/lib/input-cep/input-cep.component.d.ts +0 -29
- package/lib/input-checkbox/input-checkbox.component.d.ts +0 -21
- package/lib/input-format/input-format.component.d.ts +0 -27
- package/lib/input-pesquisa/input-pesquisa.component.d.ts +0 -69
- package/lib/input-radio/input-radio.component.d.ts +0 -23
- package/lib/input-select/input-select.component.d.ts +0 -32
- package/lib/input-text/input-text.component.d.ts +0 -33
- package/lib/input-valor/input-valor.component.d.ts +0 -29
- package/lib/model-treeview/model-treeview.component.d.ts +0 -39
- package/lib/tree-view/tree-view.component.d.ts +0 -23
- package/lib/tree-view-nivel/tree-view-nivel.component.d.ts +0 -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
ADDED
|
@@ -0,0 +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
|
+
};
|
package/ng-package.json
ADDED
package/package.json
CHANGED
|
@@ -1,26 +1,15 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "appproject-components",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^17.0.7",
|
|
6
|
-
"@angular/core": "^17.0.7",
|
|
7
|
-
"@ionic/angular": "^7.0.0"
|
|
8
|
-
},
|
|
9
|
-
"dependencies": {
|
|
10
|
-
"tslib": "^2.3.0"
|
|
11
|
-
},
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"default": "./package.json"
|
|
17
|
-
},
|
|
18
|
-
".": {
|
|
19
|
-
"types": "./index.d.ts",
|
|
20
|
-
"esm2022": "./esm2022/appproject-components.mjs",
|
|
21
|
-
"esm": "./esm2022/appproject-components.mjs",
|
|
22
|
-
"default": "./fesm2022/appproject-components.mjs"
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
"sideEffects": false
|
|
26
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "appproject-components",
|
|
3
|
+
"version": "1.0.49",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^17.0.7",
|
|
6
|
+
"@angular/core": "^17.0.7",
|
|
7
|
+
"@ionic/angular": "^7.0.0"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"tslib": "^2.3.0"
|
|
11
|
+
},
|
|
12
|
+
"devDependencies": {
|
|
13
|
+
"@ionic/angular": "^7.0.0"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +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
|
+
});
|
|
@@ -0,0 +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
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { CUSTOM_ELEMENTS_SCHEMA, InjectionToken, ModuleWithProviders, NgModule } from '@angular/core';
|
|
2
|
+
import { AppprojectComponentsComponent } from './appproject-components.component';
|
|
3
|
+
import { InputTextComponent } from './input-text/input-text.component';
|
|
4
|
+
import { InputFormatComponent } from './input-format/input-format.component';
|
|
5
|
+
|
|
6
|
+
import { CommonModule } from '@angular/common';
|
|
7
|
+
import { IonicModule } from '@ionic/angular';
|
|
8
|
+
import { HttpClientModule } from '@angular/common/http';
|
|
9
|
+
import { AppprojectComponentsService } from './appproject-components.service';
|
|
10
|
+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
11
|
+
import { InputSelectComponent } from './input-select/input-select.component';
|
|
12
|
+
import { InputPesquisaComponent } from './input-pesquisa/input-pesquisa.component';
|
|
13
|
+
import { ModelTreeviewComponent } from './model-treeview/model-treeview.component';
|
|
14
|
+
import { InputValorComponent } from './input-valor/input-valor.component';
|
|
15
|
+
import { InputAreaComponent } from './input-area/input-area.component';
|
|
16
|
+
import { InputCepComponent } from './input-cep/input-cep.component';
|
|
17
|
+
import { InputArquivoComponent } from './input-arquivo/input-arquivo.component';
|
|
18
|
+
import { BtnActionComponent } from './buttons/btn-action/btn-action.component';
|
|
19
|
+
import { BtnCancelarComponent } from './buttons/btn-cancelar/btn-cancelar.component';
|
|
20
|
+
import { BtnExcluirComponent } from './buttons/btn-excluir/btn-excluir.component';
|
|
21
|
+
import { BtnNovoComponent } from './buttons/btn-novo/btn-novo.component';
|
|
22
|
+
import { BtnSalvarComponent } from './buttons/btn-salvar/btn-salvar.component';
|
|
23
|
+
import { EntityEditComponent } from './entity-edit/entity-edit.component';
|
|
24
|
+
import { LibConfig } from './lib-config';
|
|
25
|
+
import { InputCheckboxComponent } from './input-checkbox/input-checkbox.component';
|
|
26
|
+
import { InputRadioComponent } from './input-radio/input-radio.component';
|
|
27
|
+
import { TreeViewComponent } from './tree-view/tree-view.component';
|
|
28
|
+
import { TreeViewNivelComponent } from './tree-view-nivel/tree-view-nivel.component';
|
|
29
|
+
import { GridViewComponent } from './grid-view/grid-view.component';
|
|
30
|
+
import { SafeHtmlPipe, ValorFormatPipe } from 'appproject-lib';
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
export const LibConfigService = new InjectionToken<LibConfig>('LibConfig');
|
|
34
|
+
|
|
35
|
+
@NgModule({
|
|
36
|
+
declarations: [
|
|
37
|
+
AppprojectComponentsComponent,
|
|
38
|
+
InputTextComponent,
|
|
39
|
+
InputFormatComponent,
|
|
40
|
+
InputSelectComponent,
|
|
41
|
+
InputPesquisaComponent,
|
|
42
|
+
ModelTreeviewComponent,
|
|
43
|
+
InputValorComponent,
|
|
44
|
+
InputAreaComponent,
|
|
45
|
+
InputCepComponent,
|
|
46
|
+
InputArquivoComponent,
|
|
47
|
+
BtnActionComponent,
|
|
48
|
+
BtnCancelarComponent,
|
|
49
|
+
BtnExcluirComponent,
|
|
50
|
+
BtnNovoComponent,
|
|
51
|
+
BtnSalvarComponent,
|
|
52
|
+
EntityEditComponent,
|
|
53
|
+
InputCheckboxComponent,
|
|
54
|
+
InputRadioComponent,
|
|
55
|
+
TreeViewComponent,
|
|
56
|
+
TreeViewNivelComponent,
|
|
57
|
+
GridViewComponent
|
|
58
|
+
],
|
|
59
|
+
imports: [
|
|
60
|
+
CommonModule,
|
|
61
|
+
HttpClientModule,
|
|
62
|
+
IonicModule,
|
|
63
|
+
FormsModule,
|
|
64
|
+
ReactiveFormsModule,
|
|
65
|
+
ValorFormatPipe,
|
|
66
|
+
SafeHtmlPipe
|
|
67
|
+
],
|
|
68
|
+
exports: [
|
|
69
|
+
AppprojectComponentsComponent,
|
|
70
|
+
InputTextComponent,
|
|
71
|
+
InputFormatComponent,
|
|
72
|
+
InputSelectComponent,
|
|
73
|
+
InputPesquisaComponent,
|
|
74
|
+
ModelTreeviewComponent,
|
|
75
|
+
InputValorComponent,
|
|
76
|
+
InputAreaComponent,
|
|
77
|
+
InputCepComponent,
|
|
78
|
+
InputArquivoComponent,
|
|
79
|
+
BtnActionComponent,
|
|
80
|
+
BtnCancelarComponent,
|
|
81
|
+
BtnExcluirComponent,
|
|
82
|
+
BtnNovoComponent,
|
|
83
|
+
BtnSalvarComponent,
|
|
84
|
+
EntityEditComponent,
|
|
85
|
+
InputCheckboxComponent,
|
|
86
|
+
InputRadioComponent,
|
|
87
|
+
TreeViewComponent,
|
|
88
|
+
TreeViewNivelComponent,
|
|
89
|
+
GridViewComponent
|
|
90
|
+
],
|
|
91
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
92
|
+
})
|
|
93
|
+
export class AppprojectComponentsModule {
|
|
94
|
+
static forRoot(config: LibConfig): ModuleWithProviders<AppprojectComponentsModule> {
|
|
95
|
+
return {
|
|
96
|
+
ngModule: AppprojectComponentsModule,
|
|
97
|
+
providers: [
|
|
98
|
+
AppprojectComponentsService,
|
|
99
|
+
{
|
|
100
|
+
provide: 'LibConfigService',
|
|
101
|
+
useValue: config
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
@@ -0,0 +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
|
+
});
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/* estilos compartilhados */
|
|
2
|
+
ion-label {
|
|
3
|
+
margin-bottom: 4px !important;
|
|
4
|
+
/* não precisa, porque desbilitado tem que ficar mais opaco */
|
|
5
|
+
//opacity: 1 !important;
|
|
6
|
+
--color: var(--ion-color-label, auto) !important;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
ion-item {
|
|
10
|
+
ion-label {
|
|
11
|
+
overflow: initial !important;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
ion-input {
|
|
16
|
+
padding: var(--input-padding, 8px) !important;
|
|
17
|
+
//--padding-start: var(--input-padding, 8px) !important;
|
|
18
|
+
border: 1px solid darkgray;
|
|
19
|
+
border-radius: 4px;
|
|
20
|
+
width: 100%;
|
|
21
|
+
margin-top: 2px;
|
|
22
|
+
max-height: var(--input-max-height, 29px);
|
|
23
|
+
transition: .2s ease;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.has-focus {
|
|
27
|
+
border: 1px solid var(--ion-color-bluetool, #1f477d);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
//não acatou
|
|
31
|
+
input:focus {
|
|
32
|
+
border: 1px solid lightblue !important;
|
|
33
|
+
ion-input, ion-textarea {
|
|
34
|
+
border: 1px solid lightblue !important;
|
|
35
|
+
}
|
|
36
|
+
ion-label{
|
|
37
|
+
--color: var(--ion-color-label-focus, blue) !important;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.item-has-focus {
|
|
42
|
+
ion-label {
|
|
43
|
+
color: var(--ion-color-label-focus, blue) !important;
|
|
44
|
+
}
|
|
45
|
+
ion-input, ion-textarea {
|
|
46
|
+
border: 1px solid lightblue !important;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
//opcidade funciona
|
|
51
|
+
.native-input[disabled] {
|
|
52
|
+
opacity: var(--item-disabled-opacity, 0.6) !important;
|
|
53
|
+
background-color: transparent;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.item-interactive-disabled ion-label {
|
|
57
|
+
opacity: var(--item-disabled-opacity, 0.6);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
.error-message {
|
|
62
|
+
font-size: small;
|
|
63
|
+
color: var(--error-text-color, red);
|
|
64
|
+
margin-left: 15px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.padding {
|
|
68
|
+
/*--inner-padding-end: auto; --padding-start: auto;*/
|
|
69
|
+
padding: auto;
|
|
70
|
+
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.no-padding {
|
|
74
|
+
--inner-padding-end: 0px; --padding-start: 0px;
|
|
75
|
+
--padding-bottom: 0px;
|
|
76
|
+
--inner-padding-bottom: 0px;
|
|
77
|
+
height: 55px !important;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.no-padding-end {
|
|
81
|
+
--inner-padding-end: 0px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.no-padding-start {
|
|
85
|
+
--padding-start: 0px !important;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.no-padding-no-height {
|
|
89
|
+
--inner-padding-end: 0px; --padding-start: 0px;
|
|
90
|
+
--padding-bottom: 0px;
|
|
91
|
+
--inner-padding-bottom: 0px;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.padding-top {
|
|
95
|
+
--padding-top: 0px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.item-inner {
|
|
99
|
+
padding-right: 0px !important;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.label-right {
|
|
103
|
+
ion-label{
|
|
104
|
+
transform-origin: right top;
|
|
105
|
+
align-self: flex-end;
|
|
106
|
+
margin-bottom: 4% !important;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.align-to-right {
|
|
111
|
+
ion-label {
|
|
112
|
+
position: relative;
|
|
113
|
+
left: 25%;
|
|
114
|
+
text-align: end;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
@keyframes shake {
|
|
121
|
+
0% { transform: translate(20px); }
|
|
122
|
+
20% { transform: translate(-20px); }
|
|
123
|
+
40% { transform: translate(10px); }
|
|
124
|
+
60% { transform: translate(-10px); }
|
|
125
|
+
80% { transform: translate(4px); }
|
|
126
|
+
100% { transform: translate(0px); }
|
|
127
|
+
}
|
|
128
|
+
.error-input,
|
|
129
|
+
.error-shake {
|
|
130
|
+
ion-label {
|
|
131
|
+
color: var(--error-text-color,red) !important;
|
|
132
|
+
}
|
|
133
|
+
ion-input {
|
|
134
|
+
animation: shake 0.4s 1 linear;
|
|
135
|
+
border: 1px solid var(--error-text-color, red) !important;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
@keyframes shake {
|
|
140
|
+
0% { transform: translate(20px); }
|
|
141
|
+
20% { transform: translate(-20px); }
|
|
142
|
+
40% { transform: translate(10px); }
|
|
143
|
+
60% { transform: translate(-10px); }
|
|
144
|
+
80% { transform: translate(4px); }
|
|
145
|
+
100% { transform: translate(0px); }
|
|
146
|
+
}
|
|
147
|
+
/* animação de erro */
|
|
148
|
+
.error-input,
|
|
149
|
+
.error-shake {
|
|
150
|
+
ion-label {
|
|
151
|
+
color: var(--error-text-color, red) !important;
|
|
152
|
+
}
|
|
153
|
+
ion-input {
|
|
154
|
+
border: 1px solid red !important;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
.error-shake {
|
|
158
|
+
ion-input {
|
|
159
|
+
animation: shake 0.4s 1 linear;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
|
2
|
+
import { FormGroup } from '@angular/forms';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
template: ''
|
|
6
|
+
})
|
|
7
|
+
export abstract class BaseInputComponent implements OnInit {
|
|
8
|
+
@Input() label!: string;
|
|
9
|
+
@Input() labelPosition: string = 'stacked';
|
|
10
|
+
@Input() nome!: string;
|
|
11
|
+
@Input() placeholder: string = '';
|
|
12
|
+
@Input() form!: FormGroup;
|
|
13
|
+
@Input() campo!: string;
|
|
14
|
+
@Input('formControlName') formControlName!: string;
|
|
15
|
+
@Input() max: string = '10';
|
|
16
|
+
@Input() validation_messages!: any[];
|
|
17
|
+
@Input() type: string = "text";
|
|
18
|
+
@Input() readonly: boolean = false;
|
|
19
|
+
@Input() leitura: boolean = false;
|
|
20
|
+
@Input() itemClass: string = "padding";
|
|
21
|
+
@Output() blur = new EventEmitter();
|
|
22
|
+
@Input() botaoLimpar: boolean = false;
|
|
23
|
+
@Input() labelColor: string = 'dark';
|
|
24
|
+
@Input() inputBackgroungColor: string = 'auto';
|
|
25
|
+
@Input() focusField: boolean = false;
|
|
26
|
+
@Input() blurArgs!: any[];
|
|
27
|
+
|
|
28
|
+
constructor() {
|
|
29
|
+
|
|
30
|
+
}
|
|
31
|
+
ngOnInit(): void {
|
|
32
|
+
throw new Error('Method not implemented.');
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Component({
|
|
4
|
+
template: ''
|
|
5
|
+
})
|
|
6
|
+
export abstract class BaseBtnComponent implements OnInit {
|
|
7
|
+
@Input() disabled: boolean = false;
|
|
8
|
+
@Input() type: string = 'submit';
|
|
9
|
+
@Input() icon: string = 'checkmark-outline';
|
|
10
|
+
@Input() iconSrc: string = '';
|
|
11
|
+
@Input() title: string = 'Salvar';
|
|
12
|
+
@Input() fill: string = 'outline';
|
|
13
|
+
@Input() expand: string = 'block';
|
|
14
|
+
@Output() btnClick = new EventEmitter();
|
|
15
|
+
@Input() size: string = 'default';
|
|
16
|
+
@Input() iconSlot: string = 'start';
|
|
17
|
+
|
|
18
|
+
ngOnInit(): void {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
onClick() {
|
|
23
|
+
if (this.btnClick)
|
|
24
|
+
this.btnClick.emit();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
resolveTheme(theme: string) {
|
|
28
|
+
//console.log('resolve theme', theme);
|
|
29
|
+
// if (theme == 'default') {
|
|
30
|
+
// this.fill = 'outline';
|
|
31
|
+
// } else {
|
|
32
|
+
// this.fill = 'solid';
|
|
33
|
+
// }
|
|
34
|
+
if (theme == 'windows-theme') {
|
|
35
|
+
this.fill = 'solid';
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<ion-button [color]="color" [type]="type" [disabled]="disabled" [fill]="fill" [expand]="expand"
|
|
2
|
+
[size]="size"
|
|
3
|
+
[hidden]="hidden"
|
|
4
|
+
(click)="onClick()"
|
|
5
|
+
>
|
|
6
|
+
<ion-icon *ngIf="icon || iconSrc" [slot]="title ? iconSlot : 'icon-only'" [name]="icon" [src]="iconSrc" [style]="iconStyle"></ion-icon>
|
|
7
|
+
<span [style]="titleStyle">{{ title }}</span>
|
|
8
|
+
<img *ngIf="imgSrc" [src]="imgSrc" [slot]="title ? iconSlot : 'icon-only'"/>
|
|
9
|
+
</ion-button>
|
|
10
|
+
|
|
11
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
-->
|