@po-ui/ng-components 20.1.0 → 20.2.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 +91 -8
- package/fesm2022/po-ui-ng-components.mjs.map +1 -1
- package/index.d.ts +88 -6
- 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-20.2.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/v20/index.js +2 -2
- 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-20.1.0.tgz +0 -0
|
@@ -30162,6 +30162,7 @@ class PoInputGeneric extends PoInputBaseComponent {
|
|
|
30162
30162
|
else {
|
|
30163
30163
|
// Se o valor for indefinido, deve limpar o campo.
|
|
30164
30164
|
this.inputEl.nativeElement.value = '';
|
|
30165
|
+
this.modelLastUpdate = '';
|
|
30165
30166
|
}
|
|
30166
30167
|
}
|
|
30167
30168
|
// Emite evento quando o model é atualizado, inclusive a primeira vez
|
|
@@ -50809,13 +50810,13 @@ class PoContextTabsComponent extends PoTabsComponent {
|
|
|
50809
50810
|
}
|
|
50810
50811
|
if (!currentTab) {
|
|
50811
50812
|
this.initialTabsWidth.push({ id: tab.nativeElement.id, width: tab.nativeElement.offsetWidth });
|
|
50812
|
-
if (index > quantityTabs
|
|
50813
|
+
if (index > quantityTabs) {
|
|
50813
50814
|
tab.nativeElement.style.display = 'none';
|
|
50814
50815
|
tab.nativeElement.hidden = true;
|
|
50815
50816
|
}
|
|
50816
50817
|
this.tabsChildren['_results'] = this.tabsChildren['_results'].filter(item => !item.removed);
|
|
50817
50818
|
}
|
|
50818
|
-
if (tab.nativeElement.hidden && index <= quantityTabs
|
|
50819
|
+
if (tab.nativeElement.hidden && index <= quantityTabs)
|
|
50819
50820
|
return;
|
|
50820
50821
|
index++;
|
|
50821
50822
|
});
|
|
@@ -54840,11 +54841,15 @@ const NO_MESSAGE_HEADER_PARAM = 'X-PO-No-Message';
|
|
|
54840
54841
|
*
|
|
54841
54842
|
* ## Configuração
|
|
54842
54843
|
*
|
|
54843
|
-
* Para o correto funcionamento do interceptor `po-http-interceptor`, deve ser importado o `BrowserAnimationsModule`
|
|
54844
|
-
*
|
|
54845
|
-
*
|
|
54844
|
+
* Para o correto funcionamento do interceptor `po-http-interceptor`, deve ser importado o `BrowserAnimationsModule` na
|
|
54845
|
+
* aplicação. Além disso, é necessário configurar o `HttpClient` para utilizar os interceptors registrados via Dependency
|
|
54846
|
+
* Injection (DI) por meio da função `provideHttpClient(withInterceptorsFromDi())`.
|
|
54847
|
+
*
|
|
54848
|
+
* ### 1) NgModule
|
|
54849
|
+
*
|
|
54850
|
+
* No módulo principal da aplicação (geralmente `AppModule`), importe o `BrowserAnimationsModule` e configure o `HttpClient`,
|
|
54851
|
+
* como no exemplo abaixo:
|
|
54846
54852
|
*
|
|
54847
|
-
* Módulo da aplicação:
|
|
54848
54853
|
* ```
|
|
54849
54854
|
* import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
54850
54855
|
* import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
|
@@ -54874,6 +54879,32 @@ const NO_MESSAGE_HEADER_PARAM = 'X-PO-No-Message';
|
|
|
54874
54879
|
* Ao importar o módulo `PoModule` na aplicação, o `po-http-interceptor` é automaticamente configurado sem a necessidade
|
|
54875
54880
|
* de qualquer configuração extra.
|
|
54876
54881
|
*
|
|
54882
|
+
* ### 2) Standalone
|
|
54883
|
+
*
|
|
54884
|
+
* No arquivo contendo a configuração da aplicação (geralmente `src/app/app.config.ts`), adicione os providers e configure o `HttpClient`,
|
|
54885
|
+
* como no exemplo abaixo:
|
|
54886
|
+
*
|
|
54887
|
+
* ```
|
|
54888
|
+
* import { ApplicationConfig, importProvidersFrom } from '@angular/core';
|
|
54889
|
+
* import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
|
54890
|
+
* import { provideAnimations } from '@angular/platform-browser/animations';
|
|
54891
|
+
* import { PoHttpInterceptorModule } from '@po-ui/ng-components';
|
|
54892
|
+
*
|
|
54893
|
+
* export const appConfig: ApplicationConfig = {
|
|
54894
|
+
* providers: [
|
|
54895
|
+
* ...
|
|
54896
|
+
* provideAnimations(),
|
|
54897
|
+
* provideHttpClient(withInterceptorsFromDi()),
|
|
54898
|
+
* importProvidersFrom([
|
|
54899
|
+
* PoHttpInterceptorModule
|
|
54900
|
+
* ]),
|
|
54901
|
+
* ...
|
|
54902
|
+
* ]
|
|
54903
|
+
* };
|
|
54904
|
+
* ```
|
|
54905
|
+
*
|
|
54906
|
+
* ## Como usar
|
|
54907
|
+
*
|
|
54877
54908
|
* Ao realizar requisições utilize o `HttpClient`, conforme exemplo abaixo:
|
|
54878
54909
|
*
|
|
54879
54910
|
* ```
|
|
@@ -54897,8 +54928,6 @@ const NO_MESSAGE_HEADER_PARAM = 'X-PO-No-Message';
|
|
|
54897
54928
|
* }
|
|
54898
54929
|
* ```
|
|
54899
54930
|
*
|
|
54900
|
-
* ## Como usar
|
|
54901
|
-
*
|
|
54902
54931
|
* Para exibir as noticações é necessário informar a mensagem no retorno da requisição. A estrutura da mensagem
|
|
54903
54932
|
* é feita com base no status da resposta, conforme será apresentado nos próximos tópicos.
|
|
54904
54933
|
*
|
|
@@ -55202,9 +55231,63 @@ const screenLock = 'X-PO-Screen-Lock';
|
|
|
55202
55231
|
* ```
|
|
55203
55232
|
* > Após a validação no interceptor, o parâmetro será removido do cabeçalho da requisição.
|
|
55204
55233
|
*
|
|
55234
|
+
* ## Configuração
|
|
55235
|
+
*
|
|
55236
|
+
* É necessário configurar o `HttpClient` para utilizar os interceptors registrados via Dependency Injection (DI)
|
|
55237
|
+
* por meio da função `provideHttpClient(withInterceptorsFromDi())`.
|
|
55238
|
+
*
|
|
55239
|
+
* ### 1) NgModule
|
|
55240
|
+
*
|
|
55241
|
+
* ```
|
|
55242
|
+
* import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
|
55243
|
+
* import { PoModule } from '@po-ui/ng-components';
|
|
55244
|
+
* ...
|
|
55245
|
+
*
|
|
55246
|
+
* @NgModule({
|
|
55247
|
+
* imports: [
|
|
55248
|
+
* ...
|
|
55249
|
+
* PoModule
|
|
55250
|
+
* ],
|
|
55251
|
+
* declarations: [
|
|
55252
|
+
* AppComponent,
|
|
55253
|
+
* ...
|
|
55254
|
+
* ],
|
|
55255
|
+
* providers: [
|
|
55256
|
+
* provideHttpClient(withInterceptorsFromDi()),
|
|
55257
|
+
* ...
|
|
55258
|
+
* ],
|
|
55259
|
+
* bootstrap: [AppComponent]
|
|
55260
|
+
* })
|
|
55261
|
+
* export class AppModule { }
|
|
55262
|
+
* ```
|
|
55263
|
+
*
|
|
55205
55264
|
* Ao importar o módulo `PoModule` na aplicação, o `po-http-request-interceptor` é automaticamente configurado sem a necessidade
|
|
55206
55265
|
* de qualquer configuração extra.
|
|
55207
55266
|
*
|
|
55267
|
+
* ### 2) Standalone
|
|
55268
|
+
*
|
|
55269
|
+
* No arquivo contendo a configuração da aplicação (geralmente `src/app/app.config.ts`), adicione os providers e configure o `HttpClient`,
|
|
55270
|
+
* como no exemplo abaixo:
|
|
55271
|
+
*
|
|
55272
|
+
* ```
|
|
55273
|
+
* import { ApplicationConfig, importProvidersFrom } from '@angular/core';
|
|
55274
|
+
* import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
|
55275
|
+
* import { provideAnimations } from '@angular/platform-browser/animations';
|
|
55276
|
+
* import { PoHttpRequestModule } from '@po-ui/ng-components';
|
|
55277
|
+
*
|
|
55278
|
+
* export const appConfig: ApplicationConfig = {
|
|
55279
|
+
* providers: [
|
|
55280
|
+
* ...
|
|
55281
|
+
* provideHttpClient(withInterceptorsFromDi()),
|
|
55282
|
+
* importProvidersFrom([
|
|
55283
|
+
* PoHttpRequestModule
|
|
55284
|
+
* ]),
|
|
55285
|
+
* ...
|
|
55286
|
+
* ]
|
|
55287
|
+
* };
|
|
55288
|
+
* ```
|
|
55289
|
+
*
|
|
55290
|
+
* ## Como usar
|
|
55208
55291
|
*
|
|
55209
55292
|
* Segue abaixo um exemplo de uso:
|
|
55210
55293
|
*
|