@po-ui/ng-components 19.28.0-beta.1 → 19.28.1
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/fesm2022/po-ui-ng-components.mjs +95 -16
- package/fesm2022/po-ui-ng-components.mjs.map +1 -1
- package/lib/components/po-dropdown/po-dropdown.component.d.ts +1 -1
- package/lib/components/po-modal/po-modal-action.interface.d.ts +0 -2
- package/lib/interceptors/po-http-interceptor/po-http-interceptor-base.service.d.ts +34 -6
- package/lib/interceptors/po-http-request/po-http-request-interceptor.service.d.ts +54 -0
- package/package.json +4 -4
- package/po-ui-ng-components-19.28.1.tgz +0 -0
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-update/v14/index.js +1 -1
- package/schematics/ng-update/v15/index.js +1 -1
- package/schematics/ng-update/v16/index.js +1 -1
- package/schematics/ng-update/v17/index.js +1 -1
- package/schematics/ng-update/v18/index.js +2 -2
- package/schematics/ng-update/v19/index.js +2 -2
- package/schematics/ng-update/v2/index.js +1 -1
- package/schematics/ng-update/v3/index.js +1 -1
- package/schematics/ng-update/v4/index.js +1 -1
- package/schematics/ng-update/v5/index.js +1 -1
- package/schematics/ng-update/v6/index.js +1 -1
- package/po-ui-ng-components-19.28.0-beta.1.tgz +0 -0
|
@@ -31,7 +31,7 @@ export declare class PoDropdownComponent extends PoDropdownBaseComponent {
|
|
|
31
31
|
onKeyDown(event: any): void;
|
|
32
32
|
toggleDropdown(): void;
|
|
33
33
|
private checkClickArea;
|
|
34
|
-
|
|
34
|
+
private hideDropdown;
|
|
35
35
|
private initializeListeners;
|
|
36
36
|
private onScroll;
|
|
37
37
|
private isDropdownClosed;
|
|
@@ -16,8 +16,6 @@ export interface PoModalAction {
|
|
|
16
16
|
danger?: boolean;
|
|
17
17
|
/** Desabilita o botão impossibilitando que sua ação seja executada. */
|
|
18
18
|
disabled?: boolean;
|
|
19
|
-
/** Define o ícone do botão. */
|
|
20
|
-
icon?: string;
|
|
21
19
|
/** Rótulo do botão. */
|
|
22
20
|
label: string;
|
|
23
21
|
/** Habilita um estado de carregamento ao botão, desabilitando-o e exibindo um ícone de carregamento à esquerda de seu rótulo. */
|
|
@@ -12,11 +12,15 @@ import { PoLanguageService } from '../../services/po-language/po-language.servic
|
|
|
12
12
|
*
|
|
13
13
|
* ## Configuração
|
|
14
14
|
*
|
|
15
|
-
* Para o correto funcionamento do interceptor `po-http-interceptor`, deve ser importado o `BrowserAnimationsModule`
|
|
16
|
-
*
|
|
17
|
-
*
|
|
15
|
+
* Para o correto funcionamento do interceptor `po-http-interceptor`, deve ser importado o `BrowserAnimationsModule` na
|
|
16
|
+
* aplicação. Além disso, é necessário configurar o `HttpClient` para utilizar os interceptors registrados via Dependency
|
|
17
|
+
* Injection (DI) por meio da função `provideHttpClient(withInterceptorsFromDi())`.
|
|
18
|
+
*
|
|
19
|
+
* ### 1) NgModule
|
|
20
|
+
*
|
|
21
|
+
* No módulo principal da aplicação (geralmente `AppModule`), importe o `BrowserAnimationsModule` e configure o `HttpClient`,
|
|
22
|
+
* como no exemplo abaixo:
|
|
18
23
|
*
|
|
19
|
-
* Módulo da aplicação:
|
|
20
24
|
* ```
|
|
21
25
|
* import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
22
26
|
* import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
|
@@ -46,6 +50,32 @@ import { PoLanguageService } from '../../services/po-language/po-language.servic
|
|
|
46
50
|
* Ao importar o módulo `PoModule` na aplicação, o `po-http-interceptor` é automaticamente configurado sem a necessidade
|
|
47
51
|
* de qualquer configuração extra.
|
|
48
52
|
*
|
|
53
|
+
* ### 2) Standalone
|
|
54
|
+
*
|
|
55
|
+
* No arquivo contendo a configuração da aplicação (geralmente `src/app/app.config.ts`), adicione os providers e configure o `HttpClient`,
|
|
56
|
+
* como no exemplo abaixo:
|
|
57
|
+
*
|
|
58
|
+
* ```
|
|
59
|
+
* import { ApplicationConfig, importProvidersFrom } from '@angular/core';
|
|
60
|
+
* import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
|
61
|
+
* import { provideAnimations } from '@angular/platform-browser/animations';
|
|
62
|
+
* import { PoHttpInterceptorModule } from '@po-ui/ng-components';
|
|
63
|
+
*
|
|
64
|
+
* export const appConfig: ApplicationConfig = {
|
|
65
|
+
* providers: [
|
|
66
|
+
* ...
|
|
67
|
+
* provideAnimations(),
|
|
68
|
+
* provideHttpClient(withInterceptorsFromDi()),
|
|
69
|
+
* importProvidersFrom([
|
|
70
|
+
* PoHttpInterceptorModule
|
|
71
|
+
* ]),
|
|
72
|
+
* ...
|
|
73
|
+
* ]
|
|
74
|
+
* };
|
|
75
|
+
* ```
|
|
76
|
+
*
|
|
77
|
+
* ## Como usar
|
|
78
|
+
*
|
|
49
79
|
* Ao realizar requisições utilize o `HttpClient`, conforme exemplo abaixo:
|
|
50
80
|
*
|
|
51
81
|
* ```
|
|
@@ -69,8 +99,6 @@ import { PoLanguageService } from '../../services/po-language/po-language.servic
|
|
|
69
99
|
* }
|
|
70
100
|
* ```
|
|
71
101
|
*
|
|
72
|
-
* ## Como usar
|
|
73
|
-
*
|
|
74
102
|
* Para exibir as noticações é necessário informar a mensagem no retorno da requisição. A estrutura da mensagem
|
|
75
103
|
* é feita com base no status da resposta, conforme será apresentado nos próximos tópicos.
|
|
76
104
|
*
|
|
@@ -39,9 +39,63 @@ import * as i0 from "@angular/core";
|
|
|
39
39
|
* ```
|
|
40
40
|
* > Após a validação no interceptor, o parâmetro será removido do cabeçalho da requisição.
|
|
41
41
|
*
|
|
42
|
+
* ## Configuração
|
|
43
|
+
*
|
|
44
|
+
* É necessário configurar o `HttpClient` para utilizar os interceptors registrados via Dependency Injection (DI)
|
|
45
|
+
* por meio da função `provideHttpClient(withInterceptorsFromDi())`.
|
|
46
|
+
*
|
|
47
|
+
* ### 1) NgModule
|
|
48
|
+
*
|
|
49
|
+
* ```
|
|
50
|
+
* import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
|
51
|
+
* import { PoModule } from '@po-ui/ng-components';
|
|
52
|
+
* ...
|
|
53
|
+
*
|
|
54
|
+
* @NgModule({
|
|
55
|
+
* imports: [
|
|
56
|
+
* ...
|
|
57
|
+
* PoModule
|
|
58
|
+
* ],
|
|
59
|
+
* declarations: [
|
|
60
|
+
* AppComponent,
|
|
61
|
+
* ...
|
|
62
|
+
* ],
|
|
63
|
+
* providers: [
|
|
64
|
+
* provideHttpClient(withInterceptorsFromDi()),
|
|
65
|
+
* ...
|
|
66
|
+
* ],
|
|
67
|
+
* bootstrap: [AppComponent]
|
|
68
|
+
* })
|
|
69
|
+
* export class AppModule { }
|
|
70
|
+
* ```
|
|
71
|
+
*
|
|
42
72
|
* Ao importar o módulo `PoModule` na aplicação, o `po-http-request-interceptor` é automaticamente configurado sem a necessidade
|
|
43
73
|
* de qualquer configuração extra.
|
|
44
74
|
*
|
|
75
|
+
* ### 2) Standalone
|
|
76
|
+
*
|
|
77
|
+
* No arquivo contendo a configuração da aplicação (geralmente `src/app/app.config.ts`), adicione os providers e configure o `HttpClient`,
|
|
78
|
+
* como no exemplo abaixo:
|
|
79
|
+
*
|
|
80
|
+
* ```
|
|
81
|
+
* import { ApplicationConfig, importProvidersFrom } from '@angular/core';
|
|
82
|
+
* import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
|
83
|
+
* import { provideAnimations } from '@angular/platform-browser/animations';
|
|
84
|
+
* import { PoHttpRequestModule } from '@po-ui/ng-components';
|
|
85
|
+
*
|
|
86
|
+
* export const appConfig: ApplicationConfig = {
|
|
87
|
+
* providers: [
|
|
88
|
+
* ...
|
|
89
|
+
* provideHttpClient(withInterceptorsFromDi()),
|
|
90
|
+
* importProvidersFrom([
|
|
91
|
+
* PoHttpRequestModule
|
|
92
|
+
* ]),
|
|
93
|
+
* ...
|
|
94
|
+
* ]
|
|
95
|
+
* };
|
|
96
|
+
* ```
|
|
97
|
+
*
|
|
98
|
+
* ## Como usar
|
|
45
99
|
*
|
|
46
100
|
* Segue abaixo um exemplo de uso:
|
|
47
101
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@po-ui/ng-components",
|
|
3
|
-
"version": "19.28.
|
|
3
|
+
"version": "19.28.1",
|
|
4
4
|
"description": "PO UI - Components",
|
|
5
5
|
"author": "PO UI",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@angular/cdk": "~19.0.3",
|
|
25
|
-
"@po-ui/style": "19.28.
|
|
26
|
-
"@po-ui/ng-schematics": "19.28.
|
|
25
|
+
"@po-ui/style": "19.28.1",
|
|
26
|
+
"@po-ui/ng-schematics": "19.28.1",
|
|
27
27
|
"echarts": "^5.6.0",
|
|
28
28
|
"tslib": "^2.6.2"
|
|
29
29
|
},
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@angular/platform-browser-dynamic": "^19",
|
|
39
39
|
"@angular/router": "^19",
|
|
40
40
|
"@angular-devkit/schematics": "^19",
|
|
41
|
-
"@po-ui/style": "19.28.
|
|
41
|
+
"@po-ui/style": "19.28.1",
|
|
42
42
|
"rxjs": "~7.8.1",
|
|
43
43
|
"zone.js": "~0.15.0"
|
|
44
44
|
},
|
|
Binary file
|
|
@@ -18,7 +18,7 @@ function default_1(options) {
|
|
|
18
18
|
}
|
|
19
19
|
function addPoPackageAndInstall() {
|
|
20
20
|
return (tree, context) => {
|
|
21
|
-
(0, package_config_1.addPackageToPackageJson)(tree, '@po-ui/ng-components', '19.28.
|
|
21
|
+
(0, package_config_1.addPackageToPackageJson)(tree, '@po-ui/ng-components', '19.28.1');
|
|
22
22
|
// install packages
|
|
23
23
|
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
24
24
|
};
|
|
@@ -6,7 +6,7 @@ const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
|
6
6
|
const package_config_1 = require("@po-ui/ng-schematics/package-config");
|
|
7
7
|
const changes_1 = require("./changes");
|
|
8
8
|
function default_1() {
|
|
9
|
-
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.28.
|
|
9
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.28.1', changes_1.updateDepedenciesVersion), postUpdate()]);
|
|
10
10
|
}
|
|
11
11
|
function postUpdate() {
|
|
12
12
|
return (_, context) => {
|
|
@@ -11,7 +11,7 @@ const changes_1 = require("./changes");
|
|
|
11
11
|
const httpClientModuleName = 'HttpClientModule';
|
|
12
12
|
const httpClientModuleSourcePath = '@angular/common/http';
|
|
13
13
|
function default_1() {
|
|
14
|
-
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.28.
|
|
14
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.28.1', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
|
|
15
15
|
}
|
|
16
16
|
function postUpdate() {
|
|
17
17
|
return (_, context) => {
|
|
@@ -6,7 +6,7 @@ const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
|
6
6
|
const package_config_1 = require("@po-ui/ng-schematics/package-config");
|
|
7
7
|
const changes_1 = require("./changes");
|
|
8
8
|
function default_1() {
|
|
9
|
-
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.28.
|
|
9
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.28.1', changes_1.updateDepedenciesVersion), postUpdate()]);
|
|
10
10
|
}
|
|
11
11
|
function postUpdate() {
|
|
12
12
|
return (_, context) => {
|
|
@@ -6,7 +6,7 @@ const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
|
6
6
|
const package_config_1 = require("@po-ui/ng-schematics/package-config");
|
|
7
7
|
const changes_1 = require("./changes");
|
|
8
8
|
function default_1() {
|
|
9
|
-
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.28.
|
|
9
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.28.1', changes_1.updateDepedenciesVersion), postUpdate()]);
|
|
10
10
|
}
|
|
11
11
|
function postUpdate() {
|
|
12
12
|
return (_, context) => {
|
|
@@ -40,11 +40,11 @@ function main(options) {
|
|
|
40
40
|
configureNewIcon.toLowerCase() === 'y' ||
|
|
41
41
|
configureNewIcon.toLowerCase() === 'sim' ||
|
|
42
42
|
configureNewIcon.toLowerCase() === '') {
|
|
43
|
-
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.28.
|
|
43
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.28.1', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
|
|
44
44
|
}
|
|
45
45
|
else {
|
|
46
46
|
return (0, schematics_1.chain)([
|
|
47
|
-
(0, package_config_1.updatePackageJson)('19.28.
|
|
47
|
+
(0, package_config_1.updatePackageJson)('19.28.1', changes_1.updateDepedenciesVersion),
|
|
48
48
|
addImportOnly(options, [IconsDictionaryName, poIconDictionary], poModuleSourcePath),
|
|
49
49
|
addProviderToAppModule(options, newProviderDictionary),
|
|
50
50
|
updateAppConfigFileRule(),
|
|
@@ -40,11 +40,11 @@ function main(options) {
|
|
|
40
40
|
configureNewIcon.toLowerCase() === 'y' ||
|
|
41
41
|
configureNewIcon.toLowerCase() === 'sim' ||
|
|
42
42
|
configureNewIcon.toLowerCase() === '') {
|
|
43
|
-
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.28.
|
|
43
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.28.1', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
|
|
44
44
|
}
|
|
45
45
|
else {
|
|
46
46
|
return (0, schematics_1.chain)([
|
|
47
|
-
(0, package_config_1.updatePackageJson)('19.28.
|
|
47
|
+
(0, package_config_1.updatePackageJson)('19.28.1', changes_1.updateDepedenciesVersion),
|
|
48
48
|
addImportOnly(options, [IconsDictionaryName, poIconDictionary], poModuleSourcePath),
|
|
49
49
|
addProviderToAppModule(options, newProviderDictionary),
|
|
50
50
|
updateAppConfigFileRule(),
|
|
@@ -10,7 +10,7 @@ const package_config_1 = require("@po-ui/ng-schematics/package-config");
|
|
|
10
10
|
const changes_1 = require("./changes");
|
|
11
11
|
function updateToV2() {
|
|
12
12
|
return (0, schematics_1.chain)([
|
|
13
|
-
updatePackageJson('19.28.
|
|
13
|
+
updatePackageJson('19.28.1', changes_1.dependeciesChanges),
|
|
14
14
|
(0, replace_1.replaceInFile)('tslint.json', changes_1.tsLintReplaces),
|
|
15
15
|
(0, replace_1.replaceInFile)('angular.json', changes_1.angularJsonReplaces),
|
|
16
16
|
createUpgradeRule(),
|
|
@@ -7,7 +7,7 @@ const project_1 = require("@po-ui/ng-schematics/project");
|
|
|
7
7
|
const package_config_1 = require("@po-ui/ng-schematics/package-config");
|
|
8
8
|
const changes_1 = require("./changes");
|
|
9
9
|
function updateToV3() {
|
|
10
|
-
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.28.
|
|
10
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.28.1', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
|
|
11
11
|
}
|
|
12
12
|
function postUpdate() {
|
|
13
13
|
return (_, context) => {
|
|
@@ -7,7 +7,7 @@ const project_1 = require("@po-ui/ng-schematics/project");
|
|
|
7
7
|
const package_config_1 = require("@po-ui/ng-schematics/package-config");
|
|
8
8
|
const changes_1 = require("./changes");
|
|
9
9
|
function default_1() {
|
|
10
|
-
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.28.
|
|
10
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.28.1', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
|
|
11
11
|
}
|
|
12
12
|
function postUpdate() {
|
|
13
13
|
return (_, context) => {
|
|
@@ -7,7 +7,7 @@ const project_1 = require("@po-ui/ng-schematics/project");
|
|
|
7
7
|
const package_config_1 = require("@po-ui/ng-schematics/package-config");
|
|
8
8
|
const changes_1 = require("./changes");
|
|
9
9
|
function default_1() {
|
|
10
|
-
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.28.
|
|
10
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.28.1', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
|
|
11
11
|
}
|
|
12
12
|
function postUpdate() {
|
|
13
13
|
return (_, context) => {
|
|
@@ -6,7 +6,7 @@ const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
|
6
6
|
const package_config_1 = require("@po-ui/ng-schematics/package-config");
|
|
7
7
|
const changes_1 = require("./changes");
|
|
8
8
|
function default_1() {
|
|
9
|
-
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.28.
|
|
9
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.28.1', changes_1.updateDepedenciesVersion), postUpdate()]);
|
|
10
10
|
}
|
|
11
11
|
function postUpdate() {
|
|
12
12
|
return (_, context) => {
|
|
Binary file
|