@po-ui/ng-components 19.28.0 → 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 +90 -8
- package/fesm2022/po-ui-ng-components.mjs.map +1 -1
- 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.tgz +0 -0
|
@@ -50810,13 +50810,13 @@ class PoContextTabsComponent extends PoTabsComponent {
|
|
|
50810
50810
|
}
|
|
50811
50811
|
if (!currentTab) {
|
|
50812
50812
|
this.initialTabsWidth.push({ id: tab.nativeElement.id, width: tab.nativeElement.offsetWidth });
|
|
50813
|
-
if (index > quantityTabs
|
|
50813
|
+
if (index > quantityTabs) {
|
|
50814
50814
|
tab.nativeElement.style.display = 'none';
|
|
50815
50815
|
tab.nativeElement.hidden = true;
|
|
50816
50816
|
}
|
|
50817
50817
|
this.tabsChildren['_results'] = this.tabsChildren['_results'].filter(item => !item.removed);
|
|
50818
50818
|
}
|
|
50819
|
-
if (tab.nativeElement.hidden && index <= quantityTabs
|
|
50819
|
+
if (tab.nativeElement.hidden && index <= quantityTabs)
|
|
50820
50820
|
return;
|
|
50821
50821
|
index++;
|
|
50822
50822
|
});
|
|
@@ -54841,11 +54841,15 @@ const NO_MESSAGE_HEADER_PARAM = 'X-PO-No-Message';
|
|
|
54841
54841
|
*
|
|
54842
54842
|
* ## Configuração
|
|
54843
54843
|
*
|
|
54844
|
-
* Para o correto funcionamento do interceptor `po-http-interceptor`, deve ser importado o `BrowserAnimationsModule`
|
|
54845
|
-
*
|
|
54846
|
-
*
|
|
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:
|
|
54847
54852
|
*
|
|
54848
|
-
* Módulo da aplicação:
|
|
54849
54853
|
* ```
|
|
54850
54854
|
* import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
54851
54855
|
* import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
|
@@ -54875,6 +54879,32 @@ const NO_MESSAGE_HEADER_PARAM = 'X-PO-No-Message';
|
|
|
54875
54879
|
* Ao importar o módulo `PoModule` na aplicação, o `po-http-interceptor` é automaticamente configurado sem a necessidade
|
|
54876
54880
|
* de qualquer configuração extra.
|
|
54877
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
|
+
*
|
|
54878
54908
|
* Ao realizar requisições utilize o `HttpClient`, conforme exemplo abaixo:
|
|
54879
54909
|
*
|
|
54880
54910
|
* ```
|
|
@@ -54898,8 +54928,6 @@ const NO_MESSAGE_HEADER_PARAM = 'X-PO-No-Message';
|
|
|
54898
54928
|
* }
|
|
54899
54929
|
* ```
|
|
54900
54930
|
*
|
|
54901
|
-
* ## Como usar
|
|
54902
|
-
*
|
|
54903
54931
|
* Para exibir as noticações é necessário informar a mensagem no retorno da requisição. A estrutura da mensagem
|
|
54904
54932
|
* é feita com base no status da resposta, conforme será apresentado nos próximos tópicos.
|
|
54905
54933
|
*
|
|
@@ -55203,9 +55231,63 @@ const screenLock = 'X-PO-Screen-Lock';
|
|
|
55203
55231
|
* ```
|
|
55204
55232
|
* > Após a validação no interceptor, o parâmetro será removido do cabeçalho da requisição.
|
|
55205
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
|
+
*
|
|
55206
55264
|
* Ao importar o módulo `PoModule` na aplicação, o `po-http-request-interceptor` é automaticamente configurado sem a necessidade
|
|
55207
55265
|
* de qualquer configuração extra.
|
|
55208
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
|
|
55209
55291
|
*
|
|
55210
55292
|
* Segue abaixo um exemplo de uso:
|
|
55211
55293
|
*
|