@po-ui/ng-components 20.9.0 → 20.11.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 +132 -139
- package/fesm2022/po-ui-ng-components.mjs.map +1 -1
- package/index.d.ts +105 -39
- package/lib/components/po-button/po-button-base.component.d.ts +3 -2
- package/lib/components/po-dynamic/po-dynamic-form/interfaces/po-dynamic-form-field.interface.d.ts +33 -6
- package/lib/components/po-field/po-checkbox/po-checkbox.component.d.ts +0 -1
- package/lib/components/po-field/po-checkbox-group/po-checkbox-group.component.d.ts +0 -1
- package/lib/components/po-field/po-combo/po-combo.component.d.ts +0 -1
- package/lib/components/po-field/po-datepicker/po-datepicker.component.d.ts +0 -1
- package/lib/components/po-field/po-datepicker-range/po-datepicker-range.component.d.ts +0 -1
- package/lib/components/po-field/po-field-container/po-field-container-bottom/po-field-container-bottom.component.d.ts +8 -15
- package/lib/components/po-field/po-field.model.d.ts +0 -1
- package/lib/components/po-field/po-input/po-input-base.component.d.ts +2 -3
- package/lib/components/po-field/po-lookup/po-lookup-base.component.d.ts +4 -1
- package/lib/components/po-field/po-lookup/po-lookup.component.d.ts +1 -3
- package/lib/components/po-field/po-multiselect/po-multiselect-base.component.d.ts +4 -1
- package/lib/components/po-field/po-multiselect/po-multiselect.component.d.ts +0 -2
- package/lib/components/po-field/po-number/po-number.component.d.ts +11 -0
- package/lib/components/po-field/po-radio-group/po-radio-group.component.d.ts +0 -1
- package/lib/components/po-field/po-textarea/po-textarea.component.d.ts +0 -1
- package/lib/components/po-field/po-upload/po-upload.component.d.ts +0 -1
- package/lib/components/po-modal/po-modal-action.interface.d.ts +44 -0
- package/package.json +4 -4
- package/po-ui-ng-components-20.11.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.9.0.tgz +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeDetectorRef, EventEmitter, OnInit } from '@angular/core';
|
|
1
|
+
import { ChangeDetectorRef, ElementRef, EventEmitter, OnInit } from '@angular/core';
|
|
2
2
|
import { AbstractControl, ControlValueAccessor, Validator } from '@angular/forms';
|
|
3
3
|
import { Observable, Subject, Subscription } from 'rxjs';
|
|
4
4
|
import { PoLanguageService } from '../../../services/po-language/po-language.service';
|
|
@@ -72,6 +72,7 @@ export declare const poMultiselectLiteralsDefault: {
|
|
|
72
72
|
*/
|
|
73
73
|
export declare abstract class PoMultiselectBaseComponent implements ControlValueAccessor, OnInit, Validator {
|
|
74
74
|
protected cd?: ChangeDetectorRef;
|
|
75
|
+
inputElement: ElementRef;
|
|
75
76
|
additionalHelpEventTrigger: string | undefined;
|
|
76
77
|
/**
|
|
77
78
|
*
|
|
@@ -274,6 +275,7 @@ export declare abstract class PoMultiselectBaseComponent implements ControlValue
|
|
|
274
275
|
protected clickOutListener: () => void;
|
|
275
276
|
protected resizeListener: () => void;
|
|
276
277
|
protected getObjectsByValuesSubscription: Subscription;
|
|
278
|
+
protected isExpandedHeight: boolean;
|
|
277
279
|
private _filterService?;
|
|
278
280
|
private _debounceTime?;
|
|
279
281
|
private _disabled?;
|
|
@@ -554,6 +556,7 @@ export declare abstract class PoMultiselectBaseComponent implements ControlValue
|
|
|
554
556
|
private getValueWrite;
|
|
555
557
|
private setLabelsAndValuesOptions;
|
|
556
558
|
private validateModel;
|
|
559
|
+
private updateInputHeight;
|
|
557
560
|
abstract applyFilter(value?: string): Observable<Array<PoMultiselectOption | any>>;
|
|
558
561
|
abstract updateVisibleItems(): void;
|
|
559
562
|
}
|
|
@@ -57,7 +57,6 @@ export declare class PoMultiselectComponent extends PoMultiselectBaseComponent i
|
|
|
57
57
|
dropdownElement: ElementRef;
|
|
58
58
|
dropdown: any;
|
|
59
59
|
iconElement: ElementRef;
|
|
60
|
-
inputElement: ElementRef;
|
|
61
60
|
outerContainer: ElementRef;
|
|
62
61
|
helperEl?: PoHelperComponent;
|
|
63
62
|
literalsTag: any;
|
|
@@ -144,7 +143,6 @@ export declare class PoMultiselectComponent extends PoMultiselectBaseComponent i
|
|
|
144
143
|
* ```
|
|
145
144
|
*/
|
|
146
145
|
showAdditionalHelp(): boolean;
|
|
147
|
-
showAdditionalHelpIcon(): boolean;
|
|
148
146
|
wasClickedOnToggle(event: MouseEvent): void;
|
|
149
147
|
applyFilter(value?: string): Observable<Array<PoMultiselectOption | any>>;
|
|
150
148
|
setHelper(label?: string, additionalHelpTooltip?: string): {
|
|
@@ -28,6 +28,17 @@ import { PoNumberBaseComponent } from './po-number-base.component';
|
|
|
28
28
|
* </example>
|
|
29
29
|
*/
|
|
30
30
|
export declare class PoNumberComponent extends PoNumberBaseComponent implements AfterViewInit, OnChanges {
|
|
31
|
+
/**
|
|
32
|
+
* @optional
|
|
33
|
+
*
|
|
34
|
+
* @description
|
|
35
|
+
*
|
|
36
|
+
* Indica uma máscara para o campo, porém é incompatível com o `po-number`.
|
|
37
|
+
* > **Componentes compatíveis:** `po-input`,`po-decimal`.
|
|
38
|
+
*
|
|
39
|
+
* @override
|
|
40
|
+
*/
|
|
41
|
+
mask?: string;
|
|
31
42
|
/**
|
|
32
43
|
* @optional
|
|
33
44
|
*
|
|
@@ -97,7 +97,6 @@ export declare class PoRadioGroupComponent extends PoRadioGroupBaseComponent imp
|
|
|
97
97
|
* ```
|
|
98
98
|
*/
|
|
99
99
|
showAdditionalHelp(): boolean;
|
|
100
|
-
showAdditionalHelpIcon(): boolean;
|
|
101
100
|
setHelper(label?: string, additionalHelpTooltip?: string): {
|
|
102
101
|
hideAdditionalHelp: boolean;
|
|
103
102
|
helperSettings?: any;
|
|
@@ -92,7 +92,6 @@ export declare class PoTextareaComponent extends PoTextareaBaseComponent impleme
|
|
|
92
92
|
* ```
|
|
93
93
|
*/
|
|
94
94
|
showAdditionalHelp(): boolean;
|
|
95
|
-
showAdditionalHelpIcon(): boolean;
|
|
96
95
|
private isAdditionalHelpEventTriggered;
|
|
97
96
|
setHelper(label?: string, additionalHelpTooltip?: string): {
|
|
98
97
|
hideAdditionalHelp: boolean;
|
|
@@ -145,7 +145,6 @@ export declare class PoUploadComponent extends PoUploadBaseComponent implements
|
|
|
145
145
|
* ```
|
|
146
146
|
*/
|
|
147
147
|
showAdditionalHelp(): boolean;
|
|
148
|
-
showAdditionalHelpIcon(): boolean;
|
|
149
148
|
stopUpload(file: PoUploadFile): void;
|
|
150
149
|
trackByFn(index: any, file: PoUploadFile): string;
|
|
151
150
|
uploadFiles(files: Array<PoUploadFile>): void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
1
2
|
/**
|
|
2
3
|
* @usedBy PoModalComponent
|
|
3
4
|
*
|
|
@@ -16,6 +17,49 @@ export interface PoModalAction {
|
|
|
16
17
|
danger?: boolean;
|
|
17
18
|
/** Desabilita o botão impossibilitando que sua ação seja executada. */
|
|
18
19
|
disabled?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Ícone exibido ao lado esquerdo do label do botão.
|
|
22
|
+
*
|
|
23
|
+
* É possível usar qualquer um dos ícones da [Biblioteca de ícones](https://po-ui.io/icons), conforme exemplo:
|
|
24
|
+
* ```
|
|
25
|
+
* modalAction: PoModalAction = {
|
|
26
|
+
* action: () => {},
|
|
27
|
+
* label: 'Botão com ícone PO',
|
|
28
|
+
* icon: 'an an-user'
|
|
29
|
+
* };
|
|
30
|
+
* ```
|
|
31
|
+
* Também é possível utilizar outras fontes de ícones, por exemplo a biblioteca *Font Awesome*, desde que a biblioteca
|
|
32
|
+
* esteja carregada no projeto:
|
|
33
|
+
* ```
|
|
34
|
+
* modalAction: PoModalAction = {
|
|
35
|
+
* action: () => {},
|
|
36
|
+
* label: 'Botão com ícone Font Awesome',
|
|
37
|
+
* icon: 'fa fa-user'
|
|
38
|
+
* };
|
|
39
|
+
* ```
|
|
40
|
+
* Outra opção seria a customização do ícone através do `TemplateRef`, conforme exemplo abaixo:
|
|
41
|
+
* ```
|
|
42
|
+
* // Template HTML
|
|
43
|
+
* <ng-template #customIcon>
|
|
44
|
+
* <span class="fa fa-user"></span>
|
|
45
|
+
* </ng-template>
|
|
46
|
+
*
|
|
47
|
+
* // Componente TypeScript
|
|
48
|
+
* @ViewChild('customIcon', { static: true }) customIcon: TemplateRef<void>;
|
|
49
|
+
*
|
|
50
|
+
* modalAction: PoModalAction = {
|
|
51
|
+
* action: () => {},
|
|
52
|
+
* label: 'Botão com ícone customizado',
|
|
53
|
+
* };
|
|
54
|
+
*
|
|
55
|
+
* // Atribuição do TemplateRef à propriedade icon após a inicialização da view
|
|
56
|
+
* ngAfterViewInit() {
|
|
57
|
+
* this.modalAction.icon = this.customIcon;
|
|
58
|
+
* }
|
|
59
|
+
* ```
|
|
60
|
+
* > Para o ícone enquadrar corretamente, deve-se utilizar `font-size: inherit` caso o ícone utilizado não aplique-o.
|
|
61
|
+
*/
|
|
62
|
+
icon?: string | TemplateRef<void>;
|
|
19
63
|
/** Rótulo do botão. */
|
|
20
64
|
label: string;
|
|
21
65
|
/** Habilita um estado de carregamento ao botão, desabilitando-o e exibindo um ícone de carregamento à esquerda de seu rótulo. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@po-ui/ng-components",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.11.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.11.0",
|
|
26
|
+
"@po-ui/ng-schematics": "20.11.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.11.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.11.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.11.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.11.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.11.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.11.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.11.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.11.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.11.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.11.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.11.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.11.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.11.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.11.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.11.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.11.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.11.0', changes_1.updateDepedenciesVersion), postUpdate()]);
|
|
10
10
|
}
|
|
11
11
|
function postUpdate() {
|
|
12
12
|
return (_, context) => {
|
|
Binary file
|