@po-ui/ng-components 20.12.0 → 21.0.0-next.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/README.md +1 -1
- package/fesm2022/{po-ui-ng-components-po-chart-modal-table.component-C8jlPZLV.mjs → po-ui-ng-components-po-chart-modal-table.component-CbaQDNei.mjs} +4 -4
- package/fesm2022/{po-ui-ng-components-po-chart-modal-table.component-C8jlPZLV.mjs.map → po-ui-ng-components-po-chart-modal-table.component-CbaQDNei.mjs.map} +1 -1
- package/fesm2022/po-ui-ng-components.mjs +1420 -1573
- package/fesm2022/po-ui-ng-components.mjs.map +1 -1
- package/lib/components/po-accordion/po-accordion-base.component.d.ts +17 -0
- package/lib/components/po-field/po-checkbox/po-checkbox.component.d.ts +0 -2
- package/lib/components/po-field/po-select/po-select.component.d.ts +0 -2
- package/lib/components/po-field/validators.d.ts +3 -0
- package/lib/components/po-icon/po-icon-dictionary.d.ts +0 -7
- package/lib/components/po-icon/po-icon.component.d.ts +1 -3
- package/lib/components/po-search/po-search-base.component.d.ts +20 -1
- package/lib/components/po-search/po-search.component.d.ts +1 -0
- package/lib/components/po-table/po-table-list-manager/po-table-list-manager.component.d.ts +1 -5
- package/lib/components/po-table/po-table.component.d.ts +2 -6
- package/lib/components/po-widget/po-widget.component.d.ts +1 -1
- package/lib/interceptors/po-http-request/po-http-request-interceptor.service.d.ts +1 -1
- package/lib/services/po-theme/po-theme.service.d.ts +1 -5
- package/lib/utils/util.d.ts +27 -0
- package/package.json +18 -18
- package/po-ui-ng-components-21.0.0-next.0.tgz +0 -0
- package/schematics/migrations.json +5 -0
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/setup-project.js +28 -4
- package/schematics/ng-add/setup-project.js.map +1 -1
- package/schematics/ng-generate/sidemenu/files/app.spec.ts.template +4 -4
- package/schematics/ng-generate/sidemenu/files-standalone/app.spec.ts.template +7 -7
- 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/v21/changes.d.ts +12 -0
- package/schematics/ng-update/v21/changes.js +200 -0
- package/schematics/ng-update/v21/changes.js.map +1 -0
- package/schematics/ng-update/v21/index.d.ts +2 -0
- package/schematics/ng-update/v21/index.js +93 -0
- package/schematics/ng-update/v21/index.js.map +1 -0
- 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/{index.d.ts → types/po-ui-ng-components.d.ts} +55 -41
- package/po-ui-ng-components-20.12.0.tgz +0 -0
|
@@ -81,6 +81,7 @@ export declare const poAccordionLiteralsDefault: {
|
|
|
81
81
|
export declare class PoAccordionBaseComponent {
|
|
82
82
|
private language;
|
|
83
83
|
private _literals;
|
|
84
|
+
private _size?;
|
|
84
85
|
/**
|
|
85
86
|
* @optional
|
|
86
87
|
*
|
|
@@ -139,6 +140,22 @@ export declare class PoAccordionBaseComponent {
|
|
|
139
140
|
* @default `false`
|
|
140
141
|
*/
|
|
141
142
|
allowExpandItems: boolean;
|
|
143
|
+
/**
|
|
144
|
+
* @optional
|
|
145
|
+
*
|
|
146
|
+
* @description
|
|
147
|
+
*
|
|
148
|
+
* Define o tamanho do componente:
|
|
149
|
+
* - `small`: altura de 32px (disponível apenas para acessibilidade AA).
|
|
150
|
+
* - `medium`: altura de 44px.
|
|
151
|
+
*
|
|
152
|
+
* > Caso a acessibilidade AA não esteja configurada, o tamanho `medium` será mantido.
|
|
153
|
+
* Para mais detalhes, consulte a documentação do [po-theme](https://po-ui.io/documentation/po-theme).
|
|
154
|
+
*
|
|
155
|
+
* @default `medium`
|
|
156
|
+
*/
|
|
157
|
+
set size(value: string);
|
|
158
|
+
get size(): string;
|
|
142
159
|
/**
|
|
143
160
|
* @optional
|
|
144
161
|
*
|
|
@@ -23,7 +23,6 @@ import { PoHelperComponent } from '../../po-helper';
|
|
|
23
23
|
*/
|
|
24
24
|
export declare class PoCheckboxComponent extends PoCheckboxBaseComponent implements AfterViewInit, OnChanges, OnInit {
|
|
25
25
|
private readonly changeDetector;
|
|
26
|
-
private _iconToken;
|
|
27
26
|
showTip: boolean;
|
|
28
27
|
checkboxLabel: ElementRef;
|
|
29
28
|
labelEl: ElementRef<HTMLElement>;
|
|
@@ -89,5 +88,4 @@ export declare class PoCheckboxComponent extends PoCheckboxBaseComponent impleme
|
|
|
89
88
|
protected changeModelValue(value: boolean | null | string): void;
|
|
90
89
|
private isAdditionalHelpEventTriggered;
|
|
91
90
|
handleLabelTooltip(): void;
|
|
92
|
-
get iconNameLib(): string;
|
|
93
91
|
}
|
|
@@ -75,7 +75,6 @@ import { PoHelperComponent, PoHelperOptions } from '../../po-helper';
|
|
|
75
75
|
export declare class PoSelectComponent extends PoFieldValidateModel<any> implements AfterViewInit, OnChanges {
|
|
76
76
|
private el;
|
|
77
77
|
renderer: Renderer2;
|
|
78
|
-
private _iconToken;
|
|
79
78
|
selectElement: ElementRef;
|
|
80
79
|
helperEl?: PoHelperComponent;
|
|
81
80
|
/**
|
|
@@ -190,7 +189,6 @@ export declare class PoSelectComponent extends PoFieldValidateModel<any> impleme
|
|
|
190
189
|
*/
|
|
191
190
|
controlValueWithLabel?: boolean;
|
|
192
191
|
get fieldValue(): string;
|
|
193
|
-
get iconNameLib(): string;
|
|
194
192
|
/**
|
|
195
193
|
* @optional
|
|
196
194
|
*
|
|
@@ -6,3 +6,6 @@ export declare function patternFailed(pattern: string, value: string): boolean;
|
|
|
6
6
|
export declare function minFailed(min: number, value: number): boolean;
|
|
7
7
|
export declare function maxFailed(max: number, value: number): boolean;
|
|
8
8
|
export declare function dateFailed(value: string): boolean;
|
|
9
|
+
export declare const PoValidators: {
|
|
10
|
+
requiredFailed: typeof requiredFailed;
|
|
11
|
+
};
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
export declare const ICONS_DICTIONARY: InjectionToken<{
|
|
3
|
-
[key: string]: string;
|
|
4
|
-
}>;
|
|
5
|
-
export declare const PoIconDictionary: {
|
|
6
|
-
[key: string]: string;
|
|
7
|
-
};
|
|
8
1
|
export declare const AnimaliaIconDictionary: {
|
|
9
2
|
[key: string]: string;
|
|
10
3
|
};
|
|
@@ -75,9 +75,9 @@ export type searchMode = 'action' | 'trigger' | 'locate' | 'execute';
|
|
|
75
75
|
*
|
|
76
76
|
*/
|
|
77
77
|
export declare class PoSearchBaseComponent {
|
|
78
|
+
protected language: string;
|
|
78
79
|
private _literals?;
|
|
79
80
|
private _ariaLabel?;
|
|
80
|
-
protected language: string;
|
|
81
81
|
private _filterSelect?;
|
|
82
82
|
private _size?;
|
|
83
83
|
private _keysLabel?;
|
|
@@ -177,6 +177,7 @@ export declare class PoSearchBaseComponent {
|
|
|
177
177
|
* ```
|
|
178
178
|
*/
|
|
179
179
|
icon: string | TemplateRef<void>;
|
|
180
|
+
id: string;
|
|
180
181
|
/**
|
|
181
182
|
* @optional
|
|
182
183
|
*
|
|
@@ -231,6 +232,24 @@ export declare class PoSearchBaseComponent {
|
|
|
231
232
|
* > Compatível com a propriedade `p-search-type` do tipo `locate`.
|
|
232
233
|
*/
|
|
233
234
|
locateSummary: PoSearchLocateSummary;
|
|
235
|
+
/**
|
|
236
|
+
* @optional
|
|
237
|
+
*
|
|
238
|
+
* @description
|
|
239
|
+
* Nome e identificador do campo.
|
|
240
|
+
*
|
|
241
|
+
*/
|
|
242
|
+
name: string;
|
|
243
|
+
/**
|
|
244
|
+
* @optional
|
|
245
|
+
*
|
|
246
|
+
* @description
|
|
247
|
+
*
|
|
248
|
+
* Define a propriedade nativa `autocomplete` do campo como `off`.
|
|
249
|
+
*
|
|
250
|
+
* @default `false`
|
|
251
|
+
*/
|
|
252
|
+
noAutocomplete: boolean;
|
|
234
253
|
/**
|
|
235
254
|
* @optional
|
|
236
255
|
*
|
|
@@ -103,6 +103,7 @@ export declare class PoSearchComponent extends PoSearchBaseComponent implements
|
|
|
103
103
|
label: string;
|
|
104
104
|
value: string;
|
|
105
105
|
}[];
|
|
106
|
+
get autocomplete(): string;
|
|
106
107
|
onCloseListbox(): void;
|
|
107
108
|
onListboxClick(option: PoSearchOption | any, event?: any): void;
|
|
108
109
|
onBlur(): void;
|
|
@@ -31,7 +31,6 @@ export declare const poTableListManagerLiterals: {
|
|
|
31
31
|
type Direction = 'up' | 'down';
|
|
32
32
|
export declare class PoTableListManagerComponent extends PoCheckboxGroupComponent {
|
|
33
33
|
private _componentsSize?;
|
|
34
|
-
private _iconToken;
|
|
35
34
|
private changePosition;
|
|
36
35
|
private changeColumnFixed;
|
|
37
36
|
columnsManager: Array<PoTableColumn>;
|
|
@@ -53,10 +52,7 @@ export declare class PoTableListManagerComponent extends PoCheckboxGroupComponen
|
|
|
53
52
|
get componentsSize(): string;
|
|
54
53
|
hideActionFixedColumns: boolean;
|
|
55
54
|
literals: any;
|
|
56
|
-
|
|
57
|
-
constructor(languageService: PoLanguageService, changeDetector: ChangeDetectorRef, value: {
|
|
58
|
-
[key: string]: string;
|
|
59
|
-
});
|
|
55
|
+
constructor(languageService: PoLanguageService, changeDetector: ChangeDetectorRef);
|
|
60
56
|
emitChangePosition(option: any, direction: Direction): void;
|
|
61
57
|
verifyArrowDisabled(option: any, direction: Direction): boolean;
|
|
62
58
|
emitFixed(option: any): void;
|
|
@@ -72,7 +72,7 @@ import { PoTableColumnSpacing } from './enums/po-table-spacing.enum';
|
|
|
72
72
|
export declare class PoTableComponent extends PoTableBaseComponent implements AfterViewInit, DoCheck, OnDestroy, OnInit {
|
|
73
73
|
private changeDetector;
|
|
74
74
|
private decimalPipe;
|
|
75
|
-
private defaultService;
|
|
75
|
+
private readonly defaultService;
|
|
76
76
|
tableRowTemplate: PoTableRowTemplateDirective;
|
|
77
77
|
tableCellTemplate: PoTableCellTemplateDirective;
|
|
78
78
|
tableColumnTemplates: QueryList<PoTableColumnTemplateDirective>;
|
|
@@ -111,7 +111,6 @@ export declare class PoTableComponent extends PoTableBaseComponent implements Af
|
|
|
111
111
|
confirm: PoModalAction;
|
|
112
112
|
private _columnManagerTarget;
|
|
113
113
|
private _columnManagerTargetFixed;
|
|
114
|
-
private _iconToken;
|
|
115
114
|
private differ;
|
|
116
115
|
private footerHeight;
|
|
117
116
|
private headerHeight;
|
|
@@ -126,10 +125,7 @@ export declare class PoTableComponent extends PoTableBaseComponent implements Af
|
|
|
126
125
|
get columnManagerTarget(): ElementRef;
|
|
127
126
|
set columnManagerTargetFixed(value: ElementRef);
|
|
128
127
|
get columnManagerTargetFixed(): ElementRef;
|
|
129
|
-
|
|
130
|
-
constructor(poDate: PoDateService, differs: IterableDiffers, renderer: Renderer2, poLanguageService: PoLanguageService, changeDetector: ChangeDetectorRef, decimalPipe: DecimalPipe, defaultService: PoTableService, value: {
|
|
131
|
-
[key: string]: string;
|
|
132
|
-
});
|
|
128
|
+
constructor(poDate: PoDateService, differs: IterableDiffers, renderer: Renderer2, poLanguageService: PoLanguageService, changeDetector: ChangeDetectorRef, decimalPipe: DecimalPipe, defaultService: PoTableService);
|
|
133
129
|
get hasRowTemplateWithArrowDirectionRight(): boolean;
|
|
134
130
|
get columnCount(): number;
|
|
135
131
|
get columnCountForMasterDetail(): number;
|
|
@@ -44,7 +44,7 @@ export declare class PoWidgetComponent extends PoWidgetBaseComponent implements
|
|
|
44
44
|
get showTitleAction(): boolean;
|
|
45
45
|
constructor();
|
|
46
46
|
ngAfterViewInit(): void;
|
|
47
|
-
get a11Level(): import("
|
|
47
|
+
get a11Level(): import("../..").PoThemeA11yEnum;
|
|
48
48
|
ngOnChanges(changes: SimpleChanges): void;
|
|
49
49
|
ngOnInit(): void;
|
|
50
50
|
hasTitleHelpOrSetting(): boolean;
|
|
@@ -148,7 +148,7 @@ export declare class PoHttpRequestInterceptorService implements HttpInterceptor
|
|
|
148
148
|
private pendingRequests;
|
|
149
149
|
private overlayRequests;
|
|
150
150
|
constructor(controlHttpRequest: PoHttpRequesControltService, poComponentInjector: PoComponentInjectorService);
|
|
151
|
-
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<import("@angular/common/
|
|
151
|
+
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<import("@angular/common/http").HttpEvent<any>>;
|
|
152
152
|
getCountPendingRequests(): Observable<any>;
|
|
153
153
|
private buildLoading;
|
|
154
154
|
private destroyLoading;
|
|
@@ -34,11 +34,7 @@ export declare class PoThemeService {
|
|
|
34
34
|
private document;
|
|
35
35
|
private renderer;
|
|
36
36
|
private theme;
|
|
37
|
-
|
|
38
|
-
get iconNameLib(): string;
|
|
39
|
-
constructor(document: Document, rendererFactory: RendererFactory2, value: {
|
|
40
|
-
[key: string]: string;
|
|
41
|
-
});
|
|
37
|
+
constructor(document: Document, rendererFactory: RendererFactory2);
|
|
42
38
|
/**
|
|
43
39
|
* Aplica um tema ao componente de acordo com o tipo de tema e o nível de acessibilidade especificados.
|
|
44
40
|
*
|
package/lib/utils/util.d.ts
CHANGED
|
@@ -314,3 +314,30 @@ export declare function getTextColor(type: 'lightest' | 'darkest'): string;
|
|
|
314
314
|
* @returns Valor da cor do texto (por exemplo, '#ffffff', 'rgb(255,255,255)') baseado no brilho percebido da cor de fundo usando a fórmula do espaço de cor YIQ.
|
|
315
315
|
*/
|
|
316
316
|
export declare function getTextColorFromBackgroundColor(backgroundColor: string): string;
|
|
317
|
+
export declare const PoUtils: {
|
|
318
|
+
capitalizeFirstLetter: typeof capitalizeFirstLetter;
|
|
319
|
+
convertDateToISODate: typeof convertDateToISODate;
|
|
320
|
+
convertDateToISOExtended: typeof convertDateToISOExtended;
|
|
321
|
+
convertImageToBase64: typeof convertImageToBase64;
|
|
322
|
+
convertToBoolean: typeof convertToBoolean;
|
|
323
|
+
convertToInt: typeof convertToInt;
|
|
324
|
+
formatYear: typeof formatYear;
|
|
325
|
+
isExternalLink: typeof isExternalLink;
|
|
326
|
+
isFirefox: typeof isFirefox;
|
|
327
|
+
isIE: typeof isIE;
|
|
328
|
+
isIEOrEdge: typeof isIEOrEdge;
|
|
329
|
+
isKeyCodeEnter: typeof isKeyCodeEnter;
|
|
330
|
+
isMobile: typeof isMobile;
|
|
331
|
+
isTypeof: typeof isTypeof;
|
|
332
|
+
openExternalLink: typeof openExternalLink;
|
|
333
|
+
removeDuplicatedOptions: typeof removeDuplicatedOptions;
|
|
334
|
+
removeDuplicatedOptionsWithFieldValue: typeof removeDuplicatedOptionsWithFieldValue;
|
|
335
|
+
removeUndefinedAndNullOptions: typeof removeUndefinedAndNullOptions;
|
|
336
|
+
removeUndefinedAndNullOptionsWithFieldValue: typeof removeUndefinedAndNullOptionsWithFieldValue;
|
|
337
|
+
replaceFormatSeparator: typeof replaceFormatSeparator;
|
|
338
|
+
setYearFrom0To100: typeof setYearFrom0To100;
|
|
339
|
+
sortOptionsByProperty: typeof sortOptionsByProperty;
|
|
340
|
+
sortValues: typeof sortValues;
|
|
341
|
+
uuid: typeof uuid;
|
|
342
|
+
validateDateRange: typeof validateDateRange;
|
|
343
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@po-ui/ng-components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "21.0.0-next.0",
|
|
4
4
|
"description": "PO UI - Components",
|
|
5
5
|
"author": "PO UI",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,35 +21,35 @@
|
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@angular/cdk": "~
|
|
25
|
-
"@po-ui/style": "
|
|
26
|
-
"@po-ui/ng-schematics": "
|
|
24
|
+
"@angular/cdk": "~21.0.3",
|
|
25
|
+
"@po-ui/style": "21.0.0-next.0",
|
|
26
|
+
"@po-ui/ng-schematics": "21.0.0-next.0",
|
|
27
27
|
"echarts": "^5.6.0",
|
|
28
|
-
"tslib": "^2.
|
|
28
|
+
"tslib": "^2.6.2"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@angular/animations": "^
|
|
32
|
-
"@angular/cdk": "^
|
|
33
|
-
"@angular/common": "^
|
|
34
|
-
"@angular/compiler": "^
|
|
35
|
-
"@angular/core": "^
|
|
36
|
-
"@angular/forms": "^
|
|
37
|
-
"@angular/platform-browser": "^
|
|
38
|
-
"@angular/platform-browser-dynamic": "^
|
|
39
|
-
"@angular/router": "^
|
|
40
|
-
"@angular-devkit/schematics": "^
|
|
41
|
-
"@po-ui/style": "
|
|
31
|
+
"@angular/animations": "^21",
|
|
32
|
+
"@angular/cdk": "^21",
|
|
33
|
+
"@angular/common": "^21",
|
|
34
|
+
"@angular/compiler": "^21",
|
|
35
|
+
"@angular/core": "^21",
|
|
36
|
+
"@angular/forms": "^21",
|
|
37
|
+
"@angular/platform-browser": "^21",
|
|
38
|
+
"@angular/platform-browser-dynamic": "^21",
|
|
39
|
+
"@angular/router": "^21",
|
|
40
|
+
"@angular-devkit/schematics": "^21",
|
|
41
|
+
"@po-ui/style": "21.0.0-next.0",
|
|
42
42
|
"rxjs": "~7.8.1",
|
|
43
43
|
"zone.js": "~0.15.0"
|
|
44
44
|
},
|
|
45
45
|
"module": "fesm2022/po-ui-ng-components.mjs",
|
|
46
|
-
"typings": "
|
|
46
|
+
"typings": "types/po-ui-ng-components.d.ts",
|
|
47
47
|
"exports": {
|
|
48
48
|
"./package.json": {
|
|
49
49
|
"default": "./package.json"
|
|
50
50
|
},
|
|
51
51
|
".": {
|
|
52
|
-
"types": "./
|
|
52
|
+
"types": "./types/po-ui-ng-components.d.ts",
|
|
53
53
|
"default": "./fesm2022/po-ui-ng-components.mjs"
|
|
54
54
|
}
|
|
55
55
|
}
|
|
Binary file
|
|
@@ -60,6 +60,11 @@
|
|
|
60
60
|
"version": "20",
|
|
61
61
|
"description": "Atualiza @po-ui/ng-components para v20",
|
|
62
62
|
"factory": "./ng-update/v20/index"
|
|
63
|
+
},
|
|
64
|
+
"migration-v21": {
|
|
65
|
+
"version": "21",
|
|
66
|
+
"description": "Atualiza @po-ui/ng-components para v21",
|
|
67
|
+
"factory": "./ng-update/v21/index"
|
|
63
68
|
}
|
|
64
69
|
}
|
|
65
70
|
}
|
|
@@ -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', '
|
|
21
|
+
(0, package_config_1.addPackageToPackageJson)(tree, '@po-ui/ng-components', '21.0.0-next.0');
|
|
22
22
|
// install packages
|
|
23
23
|
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
24
24
|
};
|
|
@@ -27,8 +27,9 @@ function default_1(options) {
|
|
|
27
27
|
return (0, schematics_1.chain)([
|
|
28
28
|
(0, module_1.addModuleImportToRootModule)(options, poModuleName, poModuleSourcePath),
|
|
29
29
|
addImportOnly(options, [httpProvideHttpClientName, httpWithInterceptorsFromDiName], httpClientModuleSourcePath),
|
|
30
|
-
addProviderToAppModule(options, 'provideHttpClient(withInterceptorsFromDi())
|
|
30
|
+
addProviderToAppModule(options, 'provideHttpClient(withInterceptorsFromDi())'),
|
|
31
31
|
addThemeToAppStyles(options),
|
|
32
|
+
addPolyfillsZoneJS(options),
|
|
32
33
|
updateAppConfigFileRule(options),
|
|
33
34
|
configureSideMenu(options)
|
|
34
35
|
]);
|
|
@@ -67,7 +68,6 @@ function addThemeToAppStyles(options) {
|
|
|
67
68
|
// Path needs to be always relative to the `package.json` or workspace root.
|
|
68
69
|
const themePath = './node_modules/@po-ui/style/css/po-theme-default.min.css';
|
|
69
70
|
addThemeStyleToTarget(project, 'build', tree, themePath, workspace);
|
|
70
|
-
addThemeStyleToTarget(project, 'test', tree, themePath, workspace);
|
|
71
71
|
return tree;
|
|
72
72
|
};
|
|
73
73
|
}
|
|
@@ -145,8 +145,8 @@ import { PoHttpRequestModule } from '@po-ui/ng-components';
|
|
|
145
145
|
`;
|
|
146
146
|
const providersBlock = `
|
|
147
147
|
providers: [
|
|
148
|
+
provideBrowserGlobalErrorListeners(),
|
|
148
149
|
provideRouter(routes),
|
|
149
|
-
provideHttpClient(),
|
|
150
150
|
importProvidersFrom([PoHttpRequestModule]),
|
|
151
151
|
provideZoneChangeDetection({ eventCoalescing: true }),
|
|
152
152
|
provideHttpClient(withInterceptorsFromDi())
|
|
@@ -156,8 +156,32 @@ import { PoHttpRequestModule } from '@po-ui/ng-components';
|
|
|
156
156
|
// Remove imports e providers existentes
|
|
157
157
|
let modifiedContent = content.replace(regexImport, '').replace(regexProviders, '');
|
|
158
158
|
// Adiciona os novos imports e providers
|
|
159
|
-
modifiedContent = modifiedContent.replace(/export const appConfig: ApplicationConfig = {/, `import { ApplicationConfig, importProvidersFrom, provideZoneChangeDetection } from '@angular/core';${importBlock}
|
|
159
|
+
modifiedContent = modifiedContent.replace(/export const appConfig: ApplicationConfig = {/, `import { ApplicationConfig, importProvidersFrom, provideBrowserGlobalErrorListeners, provideZoneChangeDetection } from '@angular/core';${importBlock}
|
|
160
160
|
export const appConfig: ApplicationConfig = {${providersBlock}`);
|
|
161
161
|
return modifiedContent.trim();
|
|
162
162
|
}
|
|
163
|
+
// Adiciona zone.js ao polyfills, caso não exista
|
|
164
|
+
function addPolyfillsZoneJS(options) {
|
|
165
|
+
return function (tree) {
|
|
166
|
+
var _a;
|
|
167
|
+
const workspace = (_a = (0, project_1.getWorkspaceConfigGracefully)(tree)) !== null && _a !== void 0 ? _a : {};
|
|
168
|
+
const project = (0, project_1.getProjectFromWorkspace)(workspace, options.project);
|
|
169
|
+
const targetOptions = (0, project_1.getProjectTargetOptions)(project, 'build');
|
|
170
|
+
const zoneJs = 'zone.js';
|
|
171
|
+
if (!targetOptions.polyfills) {
|
|
172
|
+
targetOptions.polyfills = [zoneJs];
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
const existingZoneJs = targetOptions.polyfills.map((s) => (typeof s === 'string' ? s : s.input));
|
|
176
|
+
for (const [, polyfillsName] of existingZoneJs.entries()) {
|
|
177
|
+
if (polyfillsName === zoneJs) {
|
|
178
|
+
return tree;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
targetOptions.polyfills.unshift(zoneJs);
|
|
182
|
+
}
|
|
183
|
+
tree.overwrite('angular.json', JSON.stringify(workspace, null, 2));
|
|
184
|
+
return tree;
|
|
185
|
+
};
|
|
186
|
+
}
|
|
163
187
|
//# sourceMappingURL=setup-project.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup-project.js","sourceRoot":"","sources":["../../../../projects/ui/schematics/ng-add/setup-project.ts"],"names":[],"mappings":";;AA4BA,
|
|
1
|
+
{"version":3,"file":"setup-project.js","sourceRoot":"","sources":["../../../../projects/ui/schematics/ng-add/setup-project.ts"],"names":[],"mappings":";;AA4BA,4BAUC;AAGD,sCA2BC;AAmED,wDAgBC;AAGD,kEAeC;AAeD,kDA8BC;AAtND,2DAAgF;AAChF,2EAA6F;AAG7F,wDAAyF;AACzF,0DAKsC;AACtC,qEAA4E;AAE5E,yDAAyD;AACzD,MAAM,YAAY,GAAG,UAAU,CAAC;AAChC,MAAM,kBAAkB,GAAG,sBAAsB,CAAC;AAElD,iEAAiE;AACjE,MAAM,yBAAyB,GAAG,mBAAmB,CAAC;AACtD,MAAM,8BAA8B,GAAG,wBAAwB,CAAC;AAChE,MAAM,0BAA0B,GAAG,sBAAsB,CAAC;AAE1D;;;;;GAKG;AACH,mBAAyB,OAAY;IACnC,OAAO,IAAA,kBAAK,EAAC;QACX,IAAA,oCAA2B,EAAC,OAAO,EAAE,YAAY,EAAE,kBAAkB,CAAC;QACtE,aAAa,CAAC,OAAO,EAAE,CAAC,yBAAyB,EAAE,8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K,MAAM,EAAE,CAAC;oBAC7B,OAAO,IAAI,CAAC;gBACd,CAAC;YACH,CAAC;YAED,aAAa,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAC1C,CAAC;QAED,IAAI,CAAC,SAAS,CAAC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAEnE,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
|
2
|
-
import { TestBed
|
|
2
|
+
import { TestBed } from '@angular/core/testing';
|
|
3
3
|
import { RouterTestingModule } from '@angular/router/testing';
|
|
4
4
|
|
|
5
5
|
import {
|
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
import { App } from './app';
|
|
12
12
|
|
|
13
13
|
describe('App', () => {
|
|
14
|
-
beforeEach(
|
|
15
|
-
TestBed.configureTestingModule({
|
|
14
|
+
beforeEach(async () => {
|
|
15
|
+
await TestBed.configureTestingModule({
|
|
16
16
|
imports: [
|
|
17
17
|
PoMenuModule,
|
|
18
18
|
PoPageModule,
|
|
@@ -22,7 +22,7 @@ describe('App', () => {
|
|
|
22
22
|
],
|
|
23
23
|
declarations: [App],
|
|
24
24
|
}).compileComponents();
|
|
25
|
-
})
|
|
25
|
+
});
|
|
26
26
|
|
|
27
27
|
it('should create the app', () => {
|
|
28
28
|
const fixture = TestBed.createComponent(App);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { TestBed
|
|
2
|
-
|
|
1
|
+
import { TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { PoMenuModule, PoPageModule, PoToolbarModule } from '@po-ui/ng-components';
|
|
3
4
|
|
|
4
5
|
import { App } from './app';
|
|
5
6
|
|
|
6
7
|
describe('App', () => {
|
|
7
|
-
beforeEach(
|
|
8
|
-
TestBed.configureTestingModule({
|
|
9
|
-
imports: [App],
|
|
10
|
-
providers: [provideHttpClient()],
|
|
8
|
+
beforeEach(async () => {
|
|
9
|
+
await TestBed.configureTestingModule({
|
|
10
|
+
imports: [PoToolbarModule, PoMenuModule, PoPageModule, App],
|
|
11
11
|
}).compileComponents();
|
|
12
|
-
})
|
|
12
|
+
});
|
|
13
13
|
|
|
14
14
|
it('should create the app', () => {
|
|
15
15
|
const fixture = TestBed.createComponent(App);
|
|
@@ -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)('
|
|
9
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('21.0.0-next.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)('
|
|
14
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('21.0.0-next.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)('
|
|
9
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('21.0.0-next.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)('
|
|
9
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('21.0.0-next.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)('
|
|
43
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('21.0.0-next.0', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
|
|
44
44
|
}
|
|
45
45
|
else {
|
|
46
46
|
return (0, schematics_1.chain)([
|
|
47
|
-
(0, package_config_1.updatePackageJson)('
|
|
47
|
+
(0, package_config_1.updatePackageJson)('21.0.0-next.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)('
|
|
43
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('21.0.0-next.0', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
|
|
44
44
|
}
|
|
45
45
|
else {
|
|
46
46
|
return (0, schematics_1.chain)([
|
|
47
|
-
(0, package_config_1.updatePackageJson)('
|
|
47
|
+
(0, package_config_1.updatePackageJson)('21.0.0-next.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('
|
|
13
|
+
updatePackageJson('21.0.0-next.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)('
|
|
43
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('21.0.0-next.0', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
|
|
44
44
|
}
|
|
45
45
|
else {
|
|
46
46
|
return (0, schematics_1.chain)([
|
|
47
|
-
(0, package_config_1.updatePackageJson)('
|
|
47
|
+
(0, package_config_1.updatePackageJson)('21.0.0-next.0', changes_1.updateDepedenciesVersion),
|
|
48
48
|
addImportOnly(options, [IconsDictionaryName, poIconDictionary], poModuleSourcePath),
|
|
49
49
|
addProviderToAppModule(options, newProviderDictionary),
|
|
50
50
|
updateAppConfigFileRule(),
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { UpdateDependencies } from '@po-ui/ng-schematics/package-config';
|
|
2
|
+
export declare const iconsReplaced: Array<ReplaceChanges>;
|
|
3
|
+
export interface ReplaceChanges {
|
|
4
|
+
replace: string | RegExp;
|
|
5
|
+
replaceWith: string | Function;
|
|
6
|
+
fill?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const updateDepedenciesVersion: UpdateDependencies;
|
|
9
|
+
export declare const poIconInsideReplaces: Array<ReplaceChanges>;
|
|
10
|
+
export declare const poIconReplaces: Array<ReplaceChanges>;
|
|
11
|
+
export declare const phIconReplaces: Array<ReplaceChanges>;
|
|
12
|
+
export declare const phIconHifenReplaces: Array<ReplaceChanges>;
|