@po-ui/ng-components 20.2.0 → 20.3.0
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 +120 -35
- package/fesm2022/po-ui-ng-components.mjs.map +1 -1
- package/index.d.ts +95 -10
- package/lib/components/po-field/po-checkbox/po-checkbox-base.component.d.ts +3 -1
- package/lib/components/po-field/po-checkbox/po-checkbox.component.d.ts +1 -1
- package/lib/components/po-field/po-field.model.d.ts +3 -2
- package/lib/components/po-field/po-upload/po-upload-base.component.d.ts +3 -2
- package/lib/components/po-field/po-upload/po-upload.component.d.ts +0 -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-20.3.0.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.2.0.tgz +0 -0
package/index.d.ts
CHANGED
|
@@ -2061,6 +2061,7 @@ declare class PoListBoxComponent extends PoListBoxBaseComponent implements After
|
|
|
2061
2061
|
*
|
|
2062
2062
|
*/
|
|
2063
2063
|
declare abstract class PoCheckboxBaseComponent implements ControlValueAccessor {
|
|
2064
|
+
private readonly cd;
|
|
2064
2065
|
additionalHelpEventTrigger: string | undefined;
|
|
2065
2066
|
/**
|
|
2066
2067
|
* @optional
|
|
@@ -2178,6 +2179,7 @@ declare abstract class PoCheckboxBaseComponent implements ControlValueAccessor {
|
|
|
2178
2179
|
*/
|
|
2179
2180
|
set size(value: string);
|
|
2180
2181
|
get size(): string;
|
|
2182
|
+
constructor(cd: ChangeDetectorRef);
|
|
2181
2183
|
changeValue(): void;
|
|
2182
2184
|
checkOption(value: boolean | null | string): void;
|
|
2183
2185
|
setDisabledState(isDisabled: boolean): void;
|
|
@@ -2214,7 +2216,7 @@ declare abstract class PoCheckboxBaseComponent implements ControlValueAccessor {
|
|
|
2214
2216
|
* </example>
|
|
2215
2217
|
*/
|
|
2216
2218
|
declare class PoCheckboxComponent extends PoCheckboxBaseComponent implements AfterViewInit {
|
|
2217
|
-
private changeDetector;
|
|
2219
|
+
private readonly changeDetector;
|
|
2218
2220
|
private _iconToken;
|
|
2219
2221
|
checkboxLabel: ElementRef;
|
|
2220
2222
|
constructor();
|
|
@@ -8563,6 +8565,7 @@ declare class PoTimeModule {
|
|
|
8563
8565
|
}
|
|
8564
8566
|
|
|
8565
8567
|
declare abstract class PoFieldModel<T> implements ControlValueAccessor {
|
|
8568
|
+
private readonly cd;
|
|
8566
8569
|
additionalHelpEventTrigger: string | undefined;
|
|
8567
8570
|
/**
|
|
8568
8571
|
* @optional
|
|
@@ -8632,7 +8635,7 @@ declare abstract class PoFieldModel<T> implements ControlValueAccessor {
|
|
|
8632
8635
|
value: T;
|
|
8633
8636
|
protected onTouched: any;
|
|
8634
8637
|
private propagateChange;
|
|
8635
|
-
constructor();
|
|
8638
|
+
constructor(cd: ChangeDetectorRef);
|
|
8636
8639
|
setDisabledState(isDisabled: boolean): void;
|
|
8637
8640
|
registerOnChange(fn: any): void;
|
|
8638
8641
|
registerOnTouched(fn: any): void;
|
|
@@ -17766,6 +17769,7 @@ declare class PoUploadService extends PoUploadBaseService {
|
|
|
17766
17769
|
*/
|
|
17767
17770
|
declare abstract class PoUploadBaseComponent implements ControlValueAccessor, Validator {
|
|
17768
17771
|
protected uploadService: PoUploadService;
|
|
17772
|
+
protected cd: ChangeDetectorRef;
|
|
17769
17773
|
additionalHelpEventTrigger: string | undefined;
|
|
17770
17774
|
/**
|
|
17771
17775
|
* @optional
|
|
@@ -18226,7 +18230,7 @@ declare abstract class PoUploadBaseComponent implements ControlValueAccessor, Va
|
|
|
18226
18230
|
*/
|
|
18227
18231
|
set size(value: string);
|
|
18228
18232
|
get size(): string;
|
|
18229
|
-
constructor(uploadService: PoUploadService, languageService: PoLanguageService);
|
|
18233
|
+
constructor(uploadService: PoUploadService, languageService: PoLanguageService, cd: ChangeDetectorRef);
|
|
18230
18234
|
setDisabledState(isDisabled: boolean): void;
|
|
18231
18235
|
registerOnChange(fn: any): void;
|
|
18232
18236
|
registerOnTouched(fn: any): void;
|
|
@@ -18290,7 +18294,6 @@ declare class PoUploadComponent extends PoUploadBaseComponent implements AfterVi
|
|
|
18290
18294
|
renderer: Renderer2;
|
|
18291
18295
|
private i18nPipe;
|
|
18292
18296
|
private notification;
|
|
18293
|
-
private cd;
|
|
18294
18297
|
private inputFile;
|
|
18295
18298
|
private poUploadDragDropComponent;
|
|
18296
18299
|
uploadButton: PoButtonComponent;
|
|
@@ -31338,11 +31341,15 @@ declare function InputRequired(): (target: any, property: string) => void;
|
|
|
31338
31341
|
*
|
|
31339
31342
|
* ## Configuração
|
|
31340
31343
|
*
|
|
31341
|
-
* Para o correto funcionamento do interceptor `po-http-interceptor`, deve ser importado o `BrowserAnimationsModule`
|
|
31342
|
-
*
|
|
31343
|
-
*
|
|
31344
|
+
* Para o correto funcionamento do interceptor `po-http-interceptor`, deve ser importado o `BrowserAnimationsModule` na
|
|
31345
|
+
* aplicação. Além disso, é necessário configurar o `HttpClient` para utilizar os interceptors registrados via Dependency
|
|
31346
|
+
* Injection (DI) por meio da função `provideHttpClient(withInterceptorsFromDi())`.
|
|
31347
|
+
*
|
|
31348
|
+
* ### 1) NgModule
|
|
31349
|
+
*
|
|
31350
|
+
* No módulo principal da aplicação (geralmente `AppModule`), importe o `BrowserAnimationsModule` e configure o `HttpClient`,
|
|
31351
|
+
* como no exemplo abaixo:
|
|
31344
31352
|
*
|
|
31345
|
-
* Módulo da aplicação:
|
|
31346
31353
|
* ```
|
|
31347
31354
|
* import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
31348
31355
|
* import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
|
@@ -31372,6 +31379,32 @@ declare function InputRequired(): (target: any, property: string) => void;
|
|
|
31372
31379
|
* Ao importar o módulo `PoModule` na aplicação, o `po-http-interceptor` é automaticamente configurado sem a necessidade
|
|
31373
31380
|
* de qualquer configuração extra.
|
|
31374
31381
|
*
|
|
31382
|
+
* ### 2) Standalone
|
|
31383
|
+
*
|
|
31384
|
+
* No arquivo contendo a configuração da aplicação (geralmente `src/app/app.config.ts`), adicione os providers e configure o `HttpClient`,
|
|
31385
|
+
* como no exemplo abaixo:
|
|
31386
|
+
*
|
|
31387
|
+
* ```
|
|
31388
|
+
* import { ApplicationConfig, importProvidersFrom } from '@angular/core';
|
|
31389
|
+
* import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
|
31390
|
+
* import { provideAnimations } from '@angular/platform-browser/animations';
|
|
31391
|
+
* import { PoHttpInterceptorModule } from '@po-ui/ng-components';
|
|
31392
|
+
*
|
|
31393
|
+
* export const appConfig: ApplicationConfig = {
|
|
31394
|
+
* providers: [
|
|
31395
|
+
* ...
|
|
31396
|
+
* provideAnimations(),
|
|
31397
|
+
* provideHttpClient(withInterceptorsFromDi()),
|
|
31398
|
+
* importProvidersFrom([
|
|
31399
|
+
* PoHttpInterceptorModule
|
|
31400
|
+
* ]),
|
|
31401
|
+
* ...
|
|
31402
|
+
* ]
|
|
31403
|
+
* };
|
|
31404
|
+
* ```
|
|
31405
|
+
*
|
|
31406
|
+
* ## Como usar
|
|
31407
|
+
*
|
|
31375
31408
|
* Ao realizar requisições utilize o `HttpClient`, conforme exemplo abaixo:
|
|
31376
31409
|
*
|
|
31377
31410
|
* ```
|
|
@@ -31395,8 +31428,6 @@ declare function InputRequired(): (target: any, property: string) => void;
|
|
|
31395
31428
|
* }
|
|
31396
31429
|
* ```
|
|
31397
31430
|
*
|
|
31398
|
-
* ## Como usar
|
|
31399
|
-
*
|
|
31400
31431
|
* Para exibir as noticações é necessário informar a mensagem no retorno da requisição. A estrutura da mensagem
|
|
31401
31432
|
* é feita com base no status da resposta, conforme será apresentado nos próximos tópicos.
|
|
31402
31433
|
*
|
|
@@ -31551,9 +31582,63 @@ declare class PoHttpRequesControltService {
|
|
|
31551
31582
|
* ```
|
|
31552
31583
|
* > Após a validação no interceptor, o parâmetro será removido do cabeçalho da requisição.
|
|
31553
31584
|
*
|
|
31585
|
+
* ## Configuração
|
|
31586
|
+
*
|
|
31587
|
+
* É necessário configurar o `HttpClient` para utilizar os interceptors registrados via Dependency Injection (DI)
|
|
31588
|
+
* por meio da função `provideHttpClient(withInterceptorsFromDi())`.
|
|
31589
|
+
*
|
|
31590
|
+
* ### 1) NgModule
|
|
31591
|
+
*
|
|
31592
|
+
* ```
|
|
31593
|
+
* import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
|
31594
|
+
* import { PoModule } from '@po-ui/ng-components';
|
|
31595
|
+
* ...
|
|
31596
|
+
*
|
|
31597
|
+
* @NgModule({
|
|
31598
|
+
* imports: [
|
|
31599
|
+
* ...
|
|
31600
|
+
* PoModule
|
|
31601
|
+
* ],
|
|
31602
|
+
* declarations: [
|
|
31603
|
+
* AppComponent,
|
|
31604
|
+
* ...
|
|
31605
|
+
* ],
|
|
31606
|
+
* providers: [
|
|
31607
|
+
* provideHttpClient(withInterceptorsFromDi()),
|
|
31608
|
+
* ...
|
|
31609
|
+
* ],
|
|
31610
|
+
* bootstrap: [AppComponent]
|
|
31611
|
+
* })
|
|
31612
|
+
* export class AppModule { }
|
|
31613
|
+
* ```
|
|
31614
|
+
*
|
|
31554
31615
|
* Ao importar o módulo `PoModule` na aplicação, o `po-http-request-interceptor` é automaticamente configurado sem a necessidade
|
|
31555
31616
|
* de qualquer configuração extra.
|
|
31556
31617
|
*
|
|
31618
|
+
* ### 2) Standalone
|
|
31619
|
+
*
|
|
31620
|
+
* No arquivo contendo a configuração da aplicação (geralmente `src/app/app.config.ts`), adicione os providers e configure o `HttpClient`,
|
|
31621
|
+
* como no exemplo abaixo:
|
|
31622
|
+
*
|
|
31623
|
+
* ```
|
|
31624
|
+
* import { ApplicationConfig, importProvidersFrom } from '@angular/core';
|
|
31625
|
+
* import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
|
31626
|
+
* import { provideAnimations } from '@angular/platform-browser/animations';
|
|
31627
|
+
* import { PoHttpRequestModule } from '@po-ui/ng-components';
|
|
31628
|
+
*
|
|
31629
|
+
* export const appConfig: ApplicationConfig = {
|
|
31630
|
+
* providers: [
|
|
31631
|
+
* ...
|
|
31632
|
+
* provideHttpClient(withInterceptorsFromDi()),
|
|
31633
|
+
* importProvidersFrom([
|
|
31634
|
+
* PoHttpRequestModule
|
|
31635
|
+
* ]),
|
|
31636
|
+
* ...
|
|
31637
|
+
* ]
|
|
31638
|
+
* };
|
|
31639
|
+
* ```
|
|
31640
|
+
*
|
|
31641
|
+
* ## Como usar
|
|
31557
31642
|
*
|
|
31558
31643
|
* Segue abaixo um exemplo de uso:
|
|
31559
31644
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
1
|
+
import { ChangeDetectorRef, EventEmitter } from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor } from '@angular/forms';
|
|
3
3
|
/**
|
|
4
4
|
* @description
|
|
@@ -42,6 +42,7 @@ import { ControlValueAccessor } from '@angular/forms';
|
|
|
42
42
|
*
|
|
43
43
|
*/
|
|
44
44
|
export declare abstract class PoCheckboxBaseComponent implements ControlValueAccessor {
|
|
45
|
+
private readonly cd;
|
|
45
46
|
additionalHelpEventTrigger: string | undefined;
|
|
46
47
|
/**
|
|
47
48
|
* @optional
|
|
@@ -159,6 +160,7 @@ export declare abstract class PoCheckboxBaseComponent implements ControlValueAcc
|
|
|
159
160
|
*/
|
|
160
161
|
set size(value: string);
|
|
161
162
|
get size(): string;
|
|
163
|
+
constructor(cd: ChangeDetectorRef);
|
|
162
164
|
changeValue(): void;
|
|
163
165
|
checkOption(value: boolean | null | string): void;
|
|
164
166
|
setDisabledState(isDisabled: boolean): void;
|
|
@@ -21,7 +21,7 @@ import { PoCheckboxBaseComponent } from './po-checkbox-base.component';
|
|
|
21
21
|
* </example>
|
|
22
22
|
*/
|
|
23
23
|
export declare class PoCheckboxComponent extends PoCheckboxBaseComponent implements AfterViewInit {
|
|
24
|
-
private changeDetector;
|
|
24
|
+
private readonly changeDetector;
|
|
25
25
|
private _iconToken;
|
|
26
26
|
checkboxLabel: ElementRef;
|
|
27
27
|
constructor();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
1
|
+
import { ChangeDetectorRef, EventEmitter } from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor } from '@angular/forms';
|
|
3
3
|
export declare abstract class PoFieldModel<T> implements ControlValueAccessor {
|
|
4
|
+
private readonly cd;
|
|
4
5
|
additionalHelpEventTrigger: string | undefined;
|
|
5
6
|
/**
|
|
6
7
|
* @optional
|
|
@@ -70,7 +71,7 @@ export declare abstract class PoFieldModel<T> implements ControlValueAccessor {
|
|
|
70
71
|
value: T;
|
|
71
72
|
protected onTouched: any;
|
|
72
73
|
private propagateChange;
|
|
73
|
-
constructor();
|
|
74
|
+
constructor(cd: ChangeDetectorRef);
|
|
74
75
|
setDisabledState(isDisabled: boolean): void;
|
|
75
76
|
registerOnChange(fn: any): void;
|
|
76
77
|
registerOnTouched(fn: any): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
1
|
+
import { ChangeDetectorRef, EventEmitter } from '@angular/core';
|
|
2
2
|
import { AbstractControl, ControlValueAccessor, Validator } from '@angular/forms';
|
|
3
3
|
import { PoLanguageService } from '../../../services/po-language/po-language.service';
|
|
4
4
|
import { PoProgressAction } from '../../po-progress';
|
|
@@ -28,6 +28,7 @@ export declare const poUploadLiteralsDefault: {
|
|
|
28
28
|
*/
|
|
29
29
|
export declare abstract class PoUploadBaseComponent implements ControlValueAccessor, Validator {
|
|
30
30
|
protected uploadService: PoUploadService;
|
|
31
|
+
protected cd: ChangeDetectorRef;
|
|
31
32
|
additionalHelpEventTrigger: string | undefined;
|
|
32
33
|
/**
|
|
33
34
|
* @optional
|
|
@@ -488,7 +489,7 @@ export declare abstract class PoUploadBaseComponent implements ControlValueAcces
|
|
|
488
489
|
*/
|
|
489
490
|
set size(value: string);
|
|
490
491
|
get size(): string;
|
|
491
|
-
constructor(uploadService: PoUploadService, languageService: PoLanguageService);
|
|
492
|
+
constructor(uploadService: PoUploadService, languageService: PoLanguageService, cd: ChangeDetectorRef);
|
|
492
493
|
setDisabledState(isDisabled: boolean): void;
|
|
493
494
|
registerOnChange(fn: any): void;
|
|
494
495
|
registerOnTouched(fn: any): void;
|
|
@@ -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
|
*
|
|
@@ -38,9 +38,63 @@ import { PoHttpRequesControltService } from './po-http-request-control-service';
|
|
|
38
38
|
* ```
|
|
39
39
|
* > Após a validação no interceptor, o parâmetro será removido do cabeçalho da requisição.
|
|
40
40
|
*
|
|
41
|
+
* ## Configuração
|
|
42
|
+
*
|
|
43
|
+
* É necessário configurar o `HttpClient` para utilizar os interceptors registrados via Dependency Injection (DI)
|
|
44
|
+
* por meio da função `provideHttpClient(withInterceptorsFromDi())`.
|
|
45
|
+
*
|
|
46
|
+
* ### 1) NgModule
|
|
47
|
+
*
|
|
48
|
+
* ```
|
|
49
|
+
* import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
|
50
|
+
* import { PoModule } from '@po-ui/ng-components';
|
|
51
|
+
* ...
|
|
52
|
+
*
|
|
53
|
+
* @NgModule({
|
|
54
|
+
* imports: [
|
|
55
|
+
* ...
|
|
56
|
+
* PoModule
|
|
57
|
+
* ],
|
|
58
|
+
* declarations: [
|
|
59
|
+
* AppComponent,
|
|
60
|
+
* ...
|
|
61
|
+
* ],
|
|
62
|
+
* providers: [
|
|
63
|
+
* provideHttpClient(withInterceptorsFromDi()),
|
|
64
|
+
* ...
|
|
65
|
+
* ],
|
|
66
|
+
* bootstrap: [AppComponent]
|
|
67
|
+
* })
|
|
68
|
+
* export class AppModule { }
|
|
69
|
+
* ```
|
|
70
|
+
*
|
|
41
71
|
* Ao importar o módulo `PoModule` na aplicação, o `po-http-request-interceptor` é automaticamente configurado sem a necessidade
|
|
42
72
|
* de qualquer configuração extra.
|
|
43
73
|
*
|
|
74
|
+
* ### 2) Standalone
|
|
75
|
+
*
|
|
76
|
+
* No arquivo contendo a configuração da aplicação (geralmente `src/app/app.config.ts`), adicione os providers e configure o `HttpClient`,
|
|
77
|
+
* como no exemplo abaixo:
|
|
78
|
+
*
|
|
79
|
+
* ```
|
|
80
|
+
* import { ApplicationConfig, importProvidersFrom } from '@angular/core';
|
|
81
|
+
* import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
|
82
|
+
* import { provideAnimations } from '@angular/platform-browser/animations';
|
|
83
|
+
* import { PoHttpRequestModule } from '@po-ui/ng-components';
|
|
84
|
+
*
|
|
85
|
+
* export const appConfig: ApplicationConfig = {
|
|
86
|
+
* providers: [
|
|
87
|
+
* ...
|
|
88
|
+
* provideHttpClient(withInterceptorsFromDi()),
|
|
89
|
+
* importProvidersFrom([
|
|
90
|
+
* PoHttpRequestModule
|
|
91
|
+
* ]),
|
|
92
|
+
* ...
|
|
93
|
+
* ]
|
|
94
|
+
* };
|
|
95
|
+
* ```
|
|
96
|
+
*
|
|
97
|
+
* ## Como usar
|
|
44
98
|
*
|
|
45
99
|
* Segue abaixo um exemplo de uso:
|
|
46
100
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@po-ui/ng-components",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.3.0",
|
|
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": "~20.0.3",
|
|
25
|
-
"@po-ui/style": "20.
|
|
26
|
-
"@po-ui/ng-schematics": "20.
|
|
25
|
+
"@po-ui/style": "20.3.0",
|
|
26
|
+
"@po-ui/ng-schematics": "20.3.0",
|
|
27
27
|
"echarts": "^5.6.0",
|
|
28
28
|
"tslib": "^2.3.0"
|
|
29
29
|
},
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@angular/platform-browser-dynamic": "^20",
|
|
39
39
|
"@angular/router": "^20",
|
|
40
40
|
"@angular-devkit/schematics": "^20",
|
|
41
|
-
"@po-ui/style": "20.
|
|
41
|
+
"@po-ui/style": "20.3.0",
|
|
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', '20.
|
|
21
|
+
(0, package_config_1.addPackageToPackageJson)(tree, '@po-ui/ng-components', '20.3.0');
|
|
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)('20.
|
|
9
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('20.3.0', 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)('20.
|
|
14
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('20.3.0', 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)('20.
|
|
9
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('20.3.0', 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)('20.
|
|
9
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('20.3.0', 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)('20.
|
|
43
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('20.3.0', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
|
|
44
44
|
}
|
|
45
45
|
else {
|
|
46
46
|
return (0, schematics_1.chain)([
|
|
47
|
-
(0, package_config_1.updatePackageJson)('20.
|
|
47
|
+
(0, package_config_1.updatePackageJson)('20.3.0', 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)('20.
|
|
43
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('20.3.0', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
|
|
44
44
|
}
|
|
45
45
|
else {
|
|
46
46
|
return (0, schematics_1.chain)([
|
|
47
|
-
(0, package_config_1.updatePackageJson)('20.
|
|
47
|
+
(0, package_config_1.updatePackageJson)('20.3.0', 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('20.
|
|
13
|
+
updatePackageJson('20.3.0', 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(),
|
|
@@ -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)('20.
|
|
43
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('20.3.0', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
|
|
44
44
|
}
|
|
45
45
|
else {
|
|
46
46
|
return (0, schematics_1.chain)([
|
|
47
|
-
(0, package_config_1.updatePackageJson)('20.
|
|
47
|
+
(0, package_config_1.updatePackageJson)('20.3.0', changes_1.updateDepedenciesVersion),
|
|
48
48
|
addImportOnly(options, [IconsDictionaryName, poIconDictionary], poModuleSourcePath),
|
|
49
49
|
addProviderToAppModule(options, newProviderDictionary),
|
|
50
50
|
updateAppConfigFileRule(),
|
|
@@ -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)('20.
|
|
10
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('20.3.0', 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)('20.
|
|
10
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('20.3.0', 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)('20.
|
|
10
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('20.3.0', 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)('20.
|
|
9
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('20.3.0', changes_1.updateDepedenciesVersion), postUpdate()]);
|
|
10
10
|
}
|
|
11
11
|
function postUpdate() {
|
|
12
12
|
return (_, context) => {
|
|
Binary file
|