@po-ui/ng-components 19.28.1 → 19.30.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 +3736 -2468
- package/fesm2022/po-ui-ng-components.mjs.map +1 -1
- package/lib/components/components.module.d.ts +3 -2
- package/lib/components/index.d.ts +1 -0
- package/lib/components/po-field/po-checkbox/po-checkbox-base.component.d.ts +43 -3
- package/lib/components/po-field/po-checkbox/po-checkbox.component.d.ts +27 -3
- package/lib/components/po-field/po-checkbox/po-checkbox.module.d.ts +3 -1
- package/lib/components/po-field/po-checkbox-group/po-checkbox-group-base.component.d.ts +37 -1
- package/lib/components/po-field/po-checkbox-group/po-checkbox-group.component.d.ts +16 -0
- package/lib/components/po-field/po-combo/po-combo-base.component.d.ts +39 -1
- package/lib/components/po-field/po-combo/po-combo.component.d.ts +17 -0
- package/lib/components/po-field/po-datepicker/po-datepicker-base.component.d.ts +39 -1
- package/lib/components/po-field/po-datepicker/po-datepicker.component.d.ts +18 -0
- package/lib/components/po-field/po-datepicker-range/po-datepicker-range-base.component.d.ts +39 -1
- package/lib/components/po-field/po-datepicker-range/po-datepicker-range.component.d.ts +18 -0
- package/lib/components/po-field/po-decimal/po-decimal.component.d.ts +6 -0
- package/lib/components/po-field/po-email/po-email.component.d.ts +3 -2
- package/lib/components/po-field/po-field-container/po-field-container-bottom/po-field-container-bottom.component.d.ts +7 -1
- package/lib/components/po-field/po-field-container/po-field-container.component.d.ts +23 -3
- package/lib/components/po-field/po-field-container/po-field-container.module.d.ts +2 -1
- package/lib/components/po-field/po-field.model.d.ts +26 -3
- package/lib/components/po-field/po-field.module.d.ts +2 -1
- package/lib/components/po-field/po-input/po-input-base.component.d.ts +53 -2
- package/lib/components/po-field/po-input/po-input.component.d.ts +3 -2
- package/lib/components/po-field/po-input-generic/po-input-generic.d.ts +6 -0
- package/lib/components/po-field/po-lookup/po-lookup-base.component.d.ts +39 -1
- package/lib/components/po-field/po-lookup/po-lookup.component.d.ts +18 -0
- package/lib/components/po-field/po-multiselect/po-multiselect-base.component.d.ts +39 -1
- package/lib/components/po-field/po-multiselect/po-multiselect.component.d.ts +18 -0
- package/lib/components/po-field/po-number/po-number.component.d.ts +3 -1
- package/lib/components/po-field/po-radio-group/po-radio-group-base.component.d.ts +39 -1
- package/lib/components/po-field/po-radio-group/po-radio-group.component.d.ts +17 -0
- package/lib/components/po-field/po-rich-text/po-rich-text-base.component.d.ts +39 -1
- package/lib/components/po-field/po-rich-text/po-rich-text.component.d.ts +16 -0
- package/lib/components/po-field/po-select/po-select.component.d.ts +48 -3
- package/lib/components/po-field/po-switch/po-switch.component.d.ts +32 -1
- package/lib/components/po-field/po-switch/po-switch.module.d.ts +2 -1
- package/lib/components/po-field/po-textarea/po-textarea-base.component.d.ts +39 -1
- package/lib/components/po-field/po-textarea/po-textarea.component.d.ts +16 -0
- package/lib/components/po-field/po-upload/po-upload-base.component.d.ts +42 -3
- package/lib/components/po-field/po-upload/po-upload.component.d.ts +15 -1
- package/lib/components/po-helper/index.d.ts +3 -0
- package/lib/components/po-helper/interfaces/po-helper.interface.d.ts +87 -0
- package/lib/components/po-helper/po-helper-base.component.d.ts +112 -0
- package/lib/components/po-helper/po-helper.component.d.ts +52 -0
- package/lib/components/po-helper/po-helper.module.d.ts +16 -0
- package/lib/components/po-label/po-label.component.d.ts +14 -1
- package/lib/components/po-label/po-label.module.d.ts +2 -1
- package/lib/components/po-popover/po-popover.component.d.ts +5 -3
- package/lib/services/po-theme/po-theme.service.d.ts +1 -0
- package/lib/utils/util.d.ts +23 -0
- package/package.json +4 -4
- package/po-ui-ng-components-19.30.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/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.1.tgz +0 -0
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { ElementRef, EventEmitter, OnChanges, Renderer2, SimpleChanges } from '@angular/core';
|
|
1
|
+
import { ElementRef, EventEmitter, OnChanges, Renderer2, SimpleChanges, AfterViewInit } from '@angular/core';
|
|
2
2
|
import { AbstractControl } from '@angular/forms';
|
|
3
3
|
import { PoFieldValidateModel } from '../po-field-validate.model';
|
|
4
4
|
import { PoSelectOptionGroup } from './po-select-option-group.interface';
|
|
5
5
|
import { PoSelectOption } from './po-select-option.interface';
|
|
6
|
+
import { PoHelperOptions } from '../../po-helper';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
/**
|
|
8
9
|
* @docsExtends PoFieldValidateModel
|
|
@@ -72,7 +73,7 @@ import * as i0 from "@angular/core";
|
|
|
72
73
|
* | `--background-color-disabled` | Cor de background no estado disabled | `var(--color-neutral-light-20)` |
|
|
73
74
|
*
|
|
74
75
|
*/
|
|
75
|
-
export declare class PoSelectComponent extends PoFieldValidateModel<any> implements OnChanges {
|
|
76
|
+
export declare class PoSelectComponent extends PoFieldValidateModel<any> implements AfterViewInit, OnChanges {
|
|
76
77
|
private el;
|
|
77
78
|
renderer: Renderer2;
|
|
78
79
|
private _iconToken;
|
|
@@ -206,8 +207,36 @@ export declare class PoSelectComponent extends PoFieldValidateModel<any> impleme
|
|
|
206
207
|
*/
|
|
207
208
|
set size(value: string);
|
|
208
209
|
get size(): string;
|
|
210
|
+
/**
|
|
211
|
+
* @Input
|
|
212
|
+
*
|
|
213
|
+
* @optional
|
|
214
|
+
*
|
|
215
|
+
* @description
|
|
216
|
+
*
|
|
217
|
+
* Define as opções do componente de ajuda (po-helper) que será exibido ao lado do label.
|
|
218
|
+
*
|
|
219
|
+
* > Caso o `p-label` não esteja definido, o componente po-helper não será exibido.
|
|
220
|
+
* Ao configurar esta propriedade, o antigo ícone de ajuda adicional (`p-additional-help-tooltip` e `p-additional-help`) será ignorado.
|
|
221
|
+
*/
|
|
222
|
+
poHelperComponent: import("@angular/core").InputSignal<string | PoHelperOptions>;
|
|
223
|
+
/**
|
|
224
|
+
* @Input
|
|
225
|
+
*
|
|
226
|
+
* @optional
|
|
227
|
+
*
|
|
228
|
+
* @description
|
|
229
|
+
*
|
|
230
|
+
* Habilita a quebra automática do texto da propriedade `p-label`. Quando `p-label-text-wrap` for verdadeiro, o texto que excede
|
|
231
|
+
* o espaço disponível é transferido para a próxima linha em pontos apropriados para uma
|
|
232
|
+
* leitura clara.
|
|
233
|
+
*
|
|
234
|
+
* @default `false`
|
|
235
|
+
*/
|
|
236
|
+
labelTextWrap: import("@angular/core").InputSignal<boolean>;
|
|
209
237
|
constructor();
|
|
210
238
|
ngOnChanges(changes: SimpleChanges): void;
|
|
239
|
+
ngAfterViewInit(): void;
|
|
211
240
|
/**
|
|
212
241
|
* Função que atribui foco ao componente.
|
|
213
242
|
*
|
|
@@ -243,6 +272,8 @@ export declare class PoSelectComponent extends PoFieldValidateModel<any> impleme
|
|
|
243
272
|
* Método que exibe `p-additionalHelpTooltip` ou executa a ação definida em `p-additionalHelp`.
|
|
244
273
|
* Para isso, será necessário configurar uma tecla de atalho utilizando o evento `p-keydown`.
|
|
245
274
|
*
|
|
275
|
+
* > Exibe ou oculta o conteúdo do componente `po-helper` quando o componente estiver com foco e com label visível.
|
|
276
|
+
*
|
|
246
277
|
* ```html
|
|
247
278
|
* <po-select
|
|
248
279
|
* #select
|
|
@@ -251,6 +282,16 @@ export declare class PoSelectComponent extends PoFieldValidateModel<any> impleme
|
|
|
251
282
|
* (p-keydown)="onKeyDown($event, select)"
|
|
252
283
|
* ></po-select>
|
|
253
284
|
* ```
|
|
285
|
+
* ```
|
|
286
|
+
* //Exemplo com p-label e p-helper
|
|
287
|
+
* <po-select
|
|
288
|
+
* #select
|
|
289
|
+
* ...
|
|
290
|
+
* p-label="Label do select"
|
|
291
|
+
* [p-helper]="helperOptions"
|
|
292
|
+
* (p-keydown)="onKeyDown($event, select)"
|
|
293
|
+
* ></po-select>
|
|
294
|
+
* ```
|
|
254
295
|
* ```typescript
|
|
255
296
|
* onKeyDown(event: KeyboardEvent, inp: PoSelectComponent): void {
|
|
256
297
|
* if (event.code === 'F9') {
|
|
@@ -260,6 +301,10 @@ export declare class PoSelectComponent extends PoFieldValidateModel<any> impleme
|
|
|
260
301
|
* ```
|
|
261
302
|
*/
|
|
262
303
|
showAdditionalHelp(): boolean;
|
|
304
|
+
setHelper(label?: string, additionalHelpTooltip?: string): {
|
|
305
|
+
hideAdditionalHelp: boolean;
|
|
306
|
+
helperSettings?: any;
|
|
307
|
+
};
|
|
263
308
|
private isEqual;
|
|
264
309
|
private findOptionValue;
|
|
265
310
|
private getValueUpdate;
|
|
@@ -268,7 +313,7 @@ export declare class PoSelectComponent extends PoFieldValidateModel<any> impleme
|
|
|
268
313
|
private separateOptions;
|
|
269
314
|
private validateOptions;
|
|
270
315
|
static ɵfac: i0.ɵɵFactoryDeclaration<PoSelectComponent, never>;
|
|
271
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PoSelectComponent, "po-select", never, { "readonly": { "alias": "p-readonly"; "required": false; }; "placeholder": { "alias": "p-placeholder"; "required": false; }; "options": { "alias": "p-options"; "required": false; }; "fieldLabel": { "alias": "p-field-label"; "required": false; }; "fieldValue": { "alias": "p-field-value"; "required": false; }; "controlValueWithLabel": { "alias": "p-control-value-with-label"; "required": false; }; "size": { "alias": "p-size"; "required": false; }; }, { "blur": "p-blur"; "ngModelChange": "ngModelChange"; }, never, never, false, never>;
|
|
316
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PoSelectComponent, "po-select", never, { "readonly": { "alias": "p-readonly"; "required": false; }; "placeholder": { "alias": "p-placeholder"; "required": false; }; "options": { "alias": "p-options"; "required": false; }; "fieldLabel": { "alias": "p-field-label"; "required": false; }; "fieldValue": { "alias": "p-field-value"; "required": false; }; "controlValueWithLabel": { "alias": "p-control-value-with-label"; "required": false; }; "size": { "alias": "p-size"; "required": false; }; "poHelperComponent": { "alias": "p-helper"; "required": false; "isSignal": true; }; "labelTextWrap": { "alias": "p-label-text-wrap"; "required": false; "isSignal": true; }; }, { "blur": "p-blur"; "ngModelChange": "ngModelChange"; }, never, never, false, never>;
|
|
272
317
|
static ngAcceptInputType_readonly: any;
|
|
273
318
|
static ngAcceptInputType_controlValueWithLabel: any;
|
|
274
319
|
}
|
|
@@ -2,6 +2,7 @@ import { AfterViewInit, ElementRef, OnDestroy } from '@angular/core';
|
|
|
2
2
|
import { AbstractControl, ValidationErrors, Validator } from '@angular/forms';
|
|
3
3
|
import { PoFieldModel } from '../po-field.model';
|
|
4
4
|
import { PoSwitchLabelPosition } from './po-switch-label-position.enum';
|
|
5
|
+
import { PoHelperOptions } from '../../po-helper';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
/**
|
|
7
8
|
* @docsExtends PoFieldModel
|
|
@@ -189,6 +190,32 @@ export declare class PoSwitchComponent extends PoFieldModel<any> implements Vali
|
|
|
189
190
|
*/
|
|
190
191
|
set size(value: string);
|
|
191
192
|
get size(): string;
|
|
193
|
+
/**
|
|
194
|
+
* @Input
|
|
195
|
+
*
|
|
196
|
+
* @optional
|
|
197
|
+
*
|
|
198
|
+
* @description
|
|
199
|
+
*
|
|
200
|
+
* Define as opções do componente de ajuda (po-helper) que será exibido ao lado do label.
|
|
201
|
+
*
|
|
202
|
+
* > Caso o `p-label` não esteja definido, o componente po-helper não será exibido.
|
|
203
|
+
* Ao configurar esta propriedade, o antigo ícone de ajuda adicional (`p-additional-help-tooltip` e `p-additional-help`) será ignorado.
|
|
204
|
+
*/
|
|
205
|
+
poHelperComponent: import("@angular/core").InputSignal<string | PoHelperOptions>;
|
|
206
|
+
/**
|
|
207
|
+
* @Input
|
|
208
|
+
*
|
|
209
|
+
* @optional
|
|
210
|
+
*
|
|
211
|
+
* @description
|
|
212
|
+
* Habilita a quebra automática do texto da propriedade `p-label`. Quando `p-label-text-wrap` for verdadeiro, o texto que excede
|
|
213
|
+
* o espaço disponível é transferido para a próxima linha em pontos apropriados para uma
|
|
214
|
+
* leitura clara.
|
|
215
|
+
*
|
|
216
|
+
* @default `false`
|
|
217
|
+
*/
|
|
218
|
+
labelTextWrap: import("@angular/core").InputSignal<boolean>;
|
|
192
219
|
private readonly el;
|
|
193
220
|
private readonly injectOptions;
|
|
194
221
|
private control;
|
|
@@ -222,8 +249,12 @@ export declare class PoSwitchComponent extends PoFieldModel<any> implements Vali
|
|
|
222
249
|
private setControl;
|
|
223
250
|
getErrorPattern(): string;
|
|
224
251
|
hasInvalidClass(): boolean;
|
|
252
|
+
setHelper(label?: string, additionalHelpTooltip?: string): {
|
|
253
|
+
hideAdditionalHelp: boolean;
|
|
254
|
+
helperSettings?: any;
|
|
255
|
+
};
|
|
225
256
|
static ɵfac: i0.ɵɵFactoryDeclaration<PoSwitchComponent, never>;
|
|
226
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PoSwitchComponent, "po-switch", never, { "value": { "alias": "p-value"; "required": false; }; "formatModel": { "alias": "p-format-model"; "required": false; }; "hideLabelStatus": { "alias": "p-hide-label-status"; "required": false; }; "labelPosition": { "alias": "p-label-position"; "required": false; }; "labelOff": { "alias": "p-label-off"; "required": false; }; "labelOn": { "alias": "p-label-on"; "required": false; }; "fieldErrorMessage": { "alias": "p-field-error-message"; "required": false; }; "errorLimit": { "alias": "p-error-limit"; "required": false; }; "invalidValue": { "alias": "p-invalid-value"; "required": false; }; "size": { "alias": "p-size"; "required": false; }; }, {}, never, never, false, never>;
|
|
257
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PoSwitchComponent, "po-switch", never, { "value": { "alias": "p-value"; "required": false; }; "formatModel": { "alias": "p-format-model"; "required": false; }; "hideLabelStatus": { "alias": "p-hide-label-status"; "required": false; }; "labelPosition": { "alias": "p-label-position"; "required": false; }; "labelOff": { "alias": "p-label-off"; "required": false; }; "labelOn": { "alias": "p-label-on"; "required": false; }; "fieldErrorMessage": { "alias": "p-field-error-message"; "required": false; }; "errorLimit": { "alias": "p-error-limit"; "required": false; }; "invalidValue": { "alias": "p-invalid-value"; "required": false; }; "size": { "alias": "p-size"; "required": false; }; "poHelperComponent": { "alias": "p-helper"; "required": false; "isSignal": true; }; "labelTextWrap": { "alias": "p-label-text-wrap"; "required": false; "isSignal": true; }; }, {}, never, never, false, never>;
|
|
227
258
|
static ngAcceptInputType_value: any;
|
|
228
259
|
static ngAcceptInputType_formatModel: any;
|
|
229
260
|
static ngAcceptInputType_hideLabelStatus: any;
|
|
@@ -5,8 +5,9 @@ import * as i3 from "@angular/forms";
|
|
|
5
5
|
import * as i4 from "../po-field-container/po-field-container.module";
|
|
6
6
|
import * as i5 from "../../po-label/po-label.module";
|
|
7
7
|
import * as i6 from "../../po-icon/po-icon.module";
|
|
8
|
+
import * as i7 from "../../po-helper/po-helper.module";
|
|
8
9
|
export declare class PoSwitchModule {
|
|
9
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<PoSwitchModule, never>;
|
|
10
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<PoSwitchModule, [typeof i1.PoSwitchComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4.PoFieldContainerModule, typeof i5.PoLabelModule, typeof i6.PoIconModule], [typeof i1.PoSwitchComponent]>;
|
|
11
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<PoSwitchModule, [typeof i1.PoSwitchComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4.PoFieldContainerModule, typeof i5.PoLabelModule, typeof i6.PoIconModule, typeof i7.PoHelperModule], [typeof i1.PoSwitchComponent]>;
|
|
11
12
|
static ɵinj: i0.ɵɵInjectorDeclaration<PoSwitchModule>;
|
|
12
13
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ChangeDetectorRef, EventEmitter } from '@angular/core';
|
|
2
2
|
import { AbstractControl, ControlValueAccessor, Validator } from '@angular/forms';
|
|
3
|
+
import { PoHelperOptions } from '../../po-helper';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
/**
|
|
5
6
|
* @description
|
|
@@ -49,6 +50,9 @@ export declare abstract class PoTextareaBaseComponent implements ControlValueAcc
|
|
|
49
50
|
cd: ChangeDetectorRef;
|
|
50
51
|
additionalHelpEventTrigger: string | undefined;
|
|
51
52
|
/**
|
|
53
|
+
*
|
|
54
|
+
* @deprecated v23.x.x use `p-helper`
|
|
55
|
+
*
|
|
52
56
|
* @optional
|
|
53
57
|
*
|
|
54
58
|
* @description
|
|
@@ -56,6 +60,8 @@ export declare abstract class PoTextareaBaseComponent implements ControlValueAcc
|
|
|
56
60
|
* Se o evento `p-additional-help` estiver definido, o tooltip não será exibido.
|
|
57
61
|
* **Como boa prática, indica-se utilizar um texto com até 140 caracteres.**
|
|
58
62
|
* > Requer um recuo mínimo de 8px se o componente estiver próximo à lateral da tela.
|
|
63
|
+
*
|
|
64
|
+
* > Essa propriedade está **depreciada** e será removida na versão `23.x.x`. Recomendamos utilizar a propriedade `p-helper` que oferece mais recursos e flexibilidade.
|
|
59
65
|
*/
|
|
60
66
|
additionalHelpTooltip?: string;
|
|
61
67
|
/**
|
|
@@ -129,11 +135,43 @@ export declare abstract class PoTextareaBaseComponent implements ControlValueAcc
|
|
|
129
135
|
*/
|
|
130
136
|
errorLimit: boolean;
|
|
131
137
|
/**
|
|
138
|
+
* @Input
|
|
139
|
+
*
|
|
140
|
+
* @optional
|
|
141
|
+
*
|
|
142
|
+
* @description
|
|
143
|
+
*
|
|
144
|
+
* Define as opções do componente de ajuda (po-helper) que será exibido ao lado do label.
|
|
145
|
+
*
|
|
146
|
+
* > Caso o `p-label` não esteja definido, o componente po-helper não será exibido.
|
|
147
|
+
* Ao configurar esta propriedade, o antigo ícone de ajuda adicional (`p-additional-help-tooltip` e `p-additional-help`) será ignorado.
|
|
148
|
+
*/
|
|
149
|
+
poHelperComponent: import("@angular/core").InputSignal<string | PoHelperOptions>;
|
|
150
|
+
/**
|
|
151
|
+
* @Input
|
|
152
|
+
*
|
|
153
|
+
* @optional
|
|
154
|
+
*
|
|
155
|
+
* @description
|
|
156
|
+
*
|
|
157
|
+
* Habilita a quebra automática do texto da propriedade `p-label`. Quando `p-label-text-wrap` for verdadeiro, o texto que excede
|
|
158
|
+
* o espaço disponível é transferido para a próxima linha em pontos apropriados para uma
|
|
159
|
+
* leitura clara.
|
|
160
|
+
*
|
|
161
|
+
* @default `false`
|
|
162
|
+
*/
|
|
163
|
+
labelTextWrap: import("@angular/core").InputSignal<boolean>;
|
|
164
|
+
/**
|
|
165
|
+
*
|
|
166
|
+
* @deprecated v23.x.x use `p-helper`
|
|
167
|
+
*
|
|
132
168
|
* @optional
|
|
133
169
|
*
|
|
134
170
|
* @description
|
|
135
171
|
* Evento disparado ao clicar no ícone de ajuda adicional.
|
|
136
172
|
* Este evento ativa automaticamente a exibição do ícone de ajuda adicional ao `p-help`.
|
|
173
|
+
*
|
|
174
|
+
* > Essa propriedade está **depreciada** e será removida na versão `23.x.x`. Recomendamos utilizar a propriedade `p-helper` que oferece mais recursos e flexibilidade.
|
|
137
175
|
*/
|
|
138
176
|
additionalHelp: EventEmitter<any>;
|
|
139
177
|
/**
|
|
@@ -293,7 +331,7 @@ export declare abstract class PoTextareaBaseComponent implements ControlValueAcc
|
|
|
293
331
|
protected validateModel(): void;
|
|
294
332
|
abstract writeValueModel(value: any): void;
|
|
295
333
|
static ɵfac: i0.ɵɵFactoryDeclaration<PoTextareaBaseComponent, never>;
|
|
296
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<PoTextareaBaseComponent, never, never, { "additionalHelpEventTrigger": { "alias": "additionalHelpEventTrigger"; "required": false; }; "additionalHelpTooltip": { "alias": "p-additional-help-tooltip"; "required": false; }; "appendBox": { "alias": "p-append-in-body"; "required": false; }; "autoFocus": { "alias": "p-auto-focus"; "required": false; }; "label": { "alias": "p-label"; "required": false; }; "help": { "alias": "p-help"; "required": false; }; "name": { "alias": "name"; "required": false; }; "optional": { "alias": "p-optional"; "required": false; }; "fieldErrorMessage": { "alias": "p-field-error-message"; "required": false; }; "errorLimit": { "alias": "p-error-limit"; "required": false; }; "placeholder": { "alias": "p-placeholder"; "required": false; }; "disabled": { "alias": "p-disabled"; "required": false; }; "readonly": { "alias": "p-readonly"; "required": false; }; "required": { "alias": "p-required"; "required": false; }; "showRequired": { "alias": "p-show-required"; "required": false; }; "minlength": { "alias": "p-minlength"; "required": false; }; "maxlength": { "alias": "p-maxlength"; "required": false; }; "rows": { "alias": "p-rows"; "required": false; }; "size": { "alias": "p-size"; "required": false; }; }, { "additionalHelp": "p-additional-help"; "blur": "p-blur"; "enter": "p-enter"; "change": "p-change"; "changeModel": "p-change-model"; "keydown": "p-keydown"; }, never, never, true, never>;
|
|
334
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<PoTextareaBaseComponent, never, never, { "additionalHelpEventTrigger": { "alias": "additionalHelpEventTrigger"; "required": false; }; "additionalHelpTooltip": { "alias": "p-additional-help-tooltip"; "required": false; }; "appendBox": { "alias": "p-append-in-body"; "required": false; }; "autoFocus": { "alias": "p-auto-focus"; "required": false; }; "label": { "alias": "p-label"; "required": false; }; "help": { "alias": "p-help"; "required": false; }; "name": { "alias": "name"; "required": false; }; "optional": { "alias": "p-optional"; "required": false; }; "fieldErrorMessage": { "alias": "p-field-error-message"; "required": false; }; "errorLimit": { "alias": "p-error-limit"; "required": false; }; "poHelperComponent": { "alias": "p-helper"; "required": false; "isSignal": true; }; "labelTextWrap": { "alias": "p-label-text-wrap"; "required": false; "isSignal": true; }; "placeholder": { "alias": "p-placeholder"; "required": false; }; "disabled": { "alias": "p-disabled"; "required": false; }; "readonly": { "alias": "p-readonly"; "required": false; }; "required": { "alias": "p-required"; "required": false; }; "showRequired": { "alias": "p-show-required"; "required": false; }; "minlength": { "alias": "p-minlength"; "required": false; }; "maxlength": { "alias": "p-maxlength"; "required": false; }; "rows": { "alias": "p-rows"; "required": false; }; "size": { "alias": "p-size"; "required": false; }; }, { "additionalHelp": "p-additional-help"; "blur": "p-blur"; "enter": "p-enter"; "change": "p-change"; "changeModel": "p-change-model"; "keydown": "p-keydown"; }, never, never, true, never>;
|
|
297
335
|
static ngAcceptInputType_appendBox: any;
|
|
298
336
|
static ngAcceptInputType_autoFocus: any;
|
|
299
337
|
}
|
|
@@ -68,6 +68,8 @@ export declare class PoTextareaComponent extends PoTextareaBaseComponent impleme
|
|
|
68
68
|
* Método que exibe `p-additionalHelpTooltip` ou executa a ação definida em `p-additionalHelp`.
|
|
69
69
|
* Para isso, será necessário configurar uma tecla de atalho utilizando o evento `p-keydown`.
|
|
70
70
|
*
|
|
71
|
+
* > Exibe ou oculta o conteúdo do componente `po-helper` quando o componente estiver com foco e com label visível.
|
|
72
|
+
*
|
|
71
73
|
* ```
|
|
72
74
|
* <po-textarea
|
|
73
75
|
* #textarea
|
|
@@ -77,6 +79,16 @@ export declare class PoTextareaComponent extends PoTextareaBaseComponent impleme
|
|
|
77
79
|
* ></po-textarea>
|
|
78
80
|
* ```
|
|
79
81
|
* ```
|
|
82
|
+
* //Exemplo com p-label e p-helper
|
|
83
|
+
* <po-textarea
|
|
84
|
+
* #textarea
|
|
85
|
+
* ...
|
|
86
|
+
* p-label="Label do textarea"
|
|
87
|
+
* [p-helper]="helperOptions"
|
|
88
|
+
* (p-keydown)="onKeyDown($event, textarea)"
|
|
89
|
+
* ></po-textarea>
|
|
90
|
+
* ```
|
|
91
|
+
* ```
|
|
80
92
|
* ...
|
|
81
93
|
* onKeyDown(event: KeyboardEvent, inp: PoTextareaComponent): void {
|
|
82
94
|
* if (event.code === 'F9') {
|
|
@@ -88,6 +100,10 @@ export declare class PoTextareaComponent extends PoTextareaBaseComponent impleme
|
|
|
88
100
|
showAdditionalHelp(): boolean;
|
|
89
101
|
showAdditionalHelpIcon(): boolean;
|
|
90
102
|
private isAdditionalHelpEventTriggered;
|
|
103
|
+
setHelper(label?: string, additionalHelpTooltip?: string): {
|
|
104
|
+
hideAdditionalHelp: boolean;
|
|
105
|
+
helperSettings?: any;
|
|
106
|
+
};
|
|
91
107
|
static ɵfac: i0.ɵɵFactoryDeclaration<PoTextareaComponent, never>;
|
|
92
108
|
static ɵcmp: i0.ɵɵComponentDeclaration<PoTextareaComponent, "po-textarea", never, {}, {}, never, never, false, never>;
|
|
93
109
|
}
|
|
@@ -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';
|
|
@@ -6,6 +6,7 @@ import { PoUploadFileRestrictions } from './interfaces/po-upload-file-restrictio
|
|
|
6
6
|
import { PoUploadLiterals } from './interfaces/po-upload-literals.interface';
|
|
7
7
|
import { PoUploadFile } from './po-upload-file';
|
|
8
8
|
import { PoUploadService } from './po-upload.service';
|
|
9
|
+
import { PoHelperOptions } from '../../po-helper';
|
|
9
10
|
import * as i0 from "@angular/core";
|
|
10
11
|
export declare const poUploadLiteralsDefault: {
|
|
11
12
|
en: PoUploadLiterals;
|
|
@@ -29,8 +30,12 @@ export declare const poUploadLiteralsDefault: {
|
|
|
29
30
|
*/
|
|
30
31
|
export declare abstract class PoUploadBaseComponent implements ControlValueAccessor, Validator {
|
|
31
32
|
protected uploadService: PoUploadService;
|
|
33
|
+
protected cd: ChangeDetectorRef;
|
|
32
34
|
additionalHelpEventTrigger: string | undefined;
|
|
33
35
|
/**
|
|
36
|
+
*
|
|
37
|
+
* @deprecated v23.x.x use `p-helper`
|
|
38
|
+
*
|
|
34
39
|
* @optional
|
|
35
40
|
*
|
|
36
41
|
* @description
|
|
@@ -38,6 +43,8 @@ export declare abstract class PoUploadBaseComponent implements ControlValueAcces
|
|
|
38
43
|
* Se o evento `p-additional-help` estiver definido, o tooltip não será exibido.
|
|
39
44
|
* **Como boa prática, indica-se utilizar um texto com até 140 caracteres.**
|
|
40
45
|
* > Requer um recuo mínimo de 8px se o componente estiver próximo à lateral da tela.
|
|
46
|
+
*
|
|
47
|
+
* > Essa propriedade está **depreciada** e será removida na versão `23.x.x`. Recomendamos utilizar a propriedade `p-helper` que oferece mais recursos e flexibilidade.
|
|
41
48
|
*/
|
|
42
49
|
additionalHelpTooltip?: string;
|
|
43
50
|
/**
|
|
@@ -143,11 +150,43 @@ export declare abstract class PoUploadBaseComponent implements ControlValueAcces
|
|
|
143
150
|
*/
|
|
144
151
|
requiredUrl: boolean;
|
|
145
152
|
/**
|
|
153
|
+
* @Input
|
|
154
|
+
*
|
|
155
|
+
* @optional
|
|
156
|
+
*
|
|
157
|
+
* @description
|
|
158
|
+
*
|
|
159
|
+
* Define as opções do componente de ajuda (po-helper) que será exibido ao lado do label.
|
|
160
|
+
*
|
|
161
|
+
* > Caso o `p-label` não esteja definido, o componente po-helper não será exibido.
|
|
162
|
+
* Ao configurar esta propriedade, o antigo ícone de ajuda adicional (`p-additional-help-tooltip` e `p-additional-help`) será ignorado.
|
|
163
|
+
*/
|
|
164
|
+
poHelperComponent: import("@angular/core").InputSignal<string | PoHelperOptions>;
|
|
165
|
+
/**
|
|
166
|
+
* @Input
|
|
167
|
+
*
|
|
168
|
+
* @optional
|
|
169
|
+
*
|
|
170
|
+
* @description
|
|
171
|
+
*
|
|
172
|
+
* Habilita a quebra automática do texto da propriedade `p-label`. Quando `p-label-text-wrap` for verdadeiro, o texto que excede
|
|
173
|
+
* o espaço disponível é transferido para a próxima linha em pontos apropriados para uma
|
|
174
|
+
* leitura clara.
|
|
175
|
+
*
|
|
176
|
+
* @default `false`
|
|
177
|
+
*/
|
|
178
|
+
labelTextWrap: import("@angular/core").InputSignal<boolean>;
|
|
179
|
+
/**
|
|
180
|
+
*
|
|
181
|
+
* @deprecated v23.x.x use `p-helper`
|
|
182
|
+
*
|
|
146
183
|
* @optional
|
|
147
184
|
*
|
|
148
185
|
* @description
|
|
149
186
|
* Evento disparado ao clicar no ícone de ajuda adicional.
|
|
150
187
|
* Este evento ativa automaticamente a exibição do ícone de ajuda adicional ao `p-help`.
|
|
188
|
+
*
|
|
189
|
+
* > Essa propriedade está **depreciada** e será removida na versão `23.x.x`. Recomendamos utilizar a propriedade `p-helper` que oferece mais recursos e flexibilidade.
|
|
151
190
|
*/
|
|
152
191
|
additionalHelp: EventEmitter<any>;
|
|
153
192
|
/**
|
|
@@ -489,7 +528,7 @@ export declare abstract class PoUploadBaseComponent implements ControlValueAcces
|
|
|
489
528
|
*/
|
|
490
529
|
set size(value: string);
|
|
491
530
|
get size(): string;
|
|
492
|
-
constructor(uploadService: PoUploadService, languageService: PoLanguageService);
|
|
531
|
+
constructor(uploadService: PoUploadService, languageService: PoLanguageService, cd: ChangeDetectorRef);
|
|
493
532
|
setDisabledState(isDisabled: boolean): void;
|
|
494
533
|
registerOnChange(fn: any): void;
|
|
495
534
|
registerOnTouched(fn: any): void;
|
|
@@ -512,7 +551,7 @@ export declare abstract class PoUploadBaseComponent implements ControlValueAcces
|
|
|
512
551
|
abstract sendFeedback(): void;
|
|
513
552
|
abstract setDirectoryAttribute(value: boolean): any;
|
|
514
553
|
static ɵfac: i0.ɵɵFactoryDeclaration<PoUploadBaseComponent, never>;
|
|
515
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<PoUploadBaseComponent, never, never, { "additionalHelpEventTrigger": { "alias": "additionalHelpEventTrigger"; "required": false; }; "additionalHelpTooltip": { "alias": "p-additional-help-tooltip"; "required": false; }; "appendBox": { "alias": "p-append-in-body"; "required": false; }; "autoFocus": { "alias": "p-auto-focus"; "required": false; }; "dragDropHeight": { "alias": "p-drag-drop-height"; "required": false; }; "label": { "alias": "p-label"; "required": false; }; "help": { "alias": "p-help"; "required": false; }; "url": { "alias": "p-url"; "required": false; }; "name": { "alias": "name"; "required": false; }; "autoUpload": { "alias": "p-auto-upload"; "required": false; }; "disabledRemoveFile": { "alias": "p-disabled-remove-file"; "required": false; }; "optional": { "alias": "p-optional"; "required": false; }; "headers": { "alias": "p-headers"; "required": false; }; "requiredUrl": { "alias": "p-required-url"; "required": false; }; "customAction": { "alias": "p-custom-action"; "required": false; }; "directory": { "alias": "p-directory"; "required": false; }; "dragDrop": { "alias": "p-drag-drop"; "required": false; }; "hideRestrictionsInfo": { "alias": "p-hide-restrictions-info"; "required": false; }; "hideSelectButton": { "alias": "p-hide-select-button"; "required": false; }; "hideSendButton": { "alias": "p-hide-send-button"; "required": false; }; "literals": { "alias": "p-literals"; "required": false; }; "fileRestrictions": { "alias": "p-restrictions"; "required": false; }; "formField": { "alias": "p-form-field"; "required": false; }; "disabled": { "alias": "p-disabled"; "required": false; }; "isMultiple": { "alias": "p-multiple"; "required": false; }; "required": { "alias": "p-required"; "required": false; }; "showRequired": { "alias": "p-show-required"; "required": false; }; "size": { "alias": "p-size"; "required": false; }; }, { "additionalHelp": "p-additional-help"; "customActionClick": "p-custom-action-click"; "keydown": "p-keydown"; "onUpload": "p-upload"; "onError": "p-error"; "onSuccess": "p-success"; "ngModelChange": "ngModelChange"; }, never, never, true, never>;
|
|
554
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<PoUploadBaseComponent, never, never, { "additionalHelpEventTrigger": { "alias": "additionalHelpEventTrigger"; "required": false; }; "additionalHelpTooltip": { "alias": "p-additional-help-tooltip"; "required": false; }; "appendBox": { "alias": "p-append-in-body"; "required": false; }; "autoFocus": { "alias": "p-auto-focus"; "required": false; }; "dragDropHeight": { "alias": "p-drag-drop-height"; "required": false; }; "label": { "alias": "p-label"; "required": false; }; "help": { "alias": "p-help"; "required": false; }; "url": { "alias": "p-url"; "required": false; }; "name": { "alias": "name"; "required": false; }; "autoUpload": { "alias": "p-auto-upload"; "required": false; }; "disabledRemoveFile": { "alias": "p-disabled-remove-file"; "required": false; }; "optional": { "alias": "p-optional"; "required": false; }; "headers": { "alias": "p-headers"; "required": false; }; "requiredUrl": { "alias": "p-required-url"; "required": false; }; "poHelperComponent": { "alias": "p-helper"; "required": false; "isSignal": true; }; "labelTextWrap": { "alias": "p-label-text-wrap"; "required": false; "isSignal": true; }; "customAction": { "alias": "p-custom-action"; "required": false; }; "directory": { "alias": "p-directory"; "required": false; }; "dragDrop": { "alias": "p-drag-drop"; "required": false; }; "hideRestrictionsInfo": { "alias": "p-hide-restrictions-info"; "required": false; }; "hideSelectButton": { "alias": "p-hide-select-button"; "required": false; }; "hideSendButton": { "alias": "p-hide-send-button"; "required": false; }; "literals": { "alias": "p-literals"; "required": false; }; "fileRestrictions": { "alias": "p-restrictions"; "required": false; }; "formField": { "alias": "p-form-field"; "required": false; }; "disabled": { "alias": "p-disabled"; "required": false; }; "isMultiple": { "alias": "p-multiple"; "required": false; }; "required": { "alias": "p-required"; "required": false; }; "showRequired": { "alias": "p-show-required"; "required": false; }; "size": { "alias": "p-size"; "required": false; }; }, { "additionalHelp": "p-additional-help"; "customActionClick": "p-custom-action-click"; "keydown": "p-keydown"; "onUpload": "p-upload"; "onError": "p-error"; "onSuccess": "p-success"; "ngModelChange": "ngModelChange"; }, never, never, true, never>;
|
|
516
555
|
static ngAcceptInputType_appendBox: any;
|
|
517
556
|
static ngAcceptInputType_autoFocus: any;
|
|
518
557
|
static ngAcceptInputType_disabledRemoveFile: any;
|
|
@@ -39,7 +39,6 @@ export declare class PoUploadComponent extends PoUploadBaseComponent implements
|
|
|
39
39
|
renderer: Renderer2;
|
|
40
40
|
private i18nPipe;
|
|
41
41
|
private notification;
|
|
42
|
-
private cd;
|
|
43
42
|
private inputFile;
|
|
44
43
|
private poUploadDragDropComponent;
|
|
45
44
|
uploadButton: PoButtonComponent;
|
|
@@ -105,6 +104,7 @@ export declare class PoUploadComponent extends PoUploadBaseComponent implements
|
|
|
105
104
|
* Método que exibe `p-additionalHelpTooltip` ou executa a ação definida em `p-additionalHelp`.
|
|
106
105
|
* Para isso, será necessário configurar uma tecla de atalho utilizando o evento `p-keydown`.
|
|
107
106
|
*
|
|
107
|
+
* > Exibe ou oculta o conteúdo do componente `po-helper` quando o componente estiver com foco e com label visível.
|
|
108
108
|
* ```
|
|
109
109
|
* <po-upload
|
|
110
110
|
* #upload
|
|
@@ -114,6 +114,16 @@ export declare class PoUploadComponent extends PoUploadBaseComponent implements
|
|
|
114
114
|
* ></po-upload>
|
|
115
115
|
* ```
|
|
116
116
|
* ```
|
|
117
|
+
* //Exemplo com p-label e p-helper
|
|
118
|
+
* <po-upload
|
|
119
|
+
* #upload
|
|
120
|
+
* ...
|
|
121
|
+
* p-label="Label do upload"
|
|
122
|
+
* [p-helper]="helperOptions"
|
|
123
|
+
* (p-keydown)="onKeyDown($event, upload)"
|
|
124
|
+
* ></po-upload>
|
|
125
|
+
* ```
|
|
126
|
+
* ```
|
|
117
127
|
* ...
|
|
118
128
|
* onKeyDown(event: KeyboardEvent, inp: PoUploadComponent): void {
|
|
119
129
|
* if (event.code === 'F9') {
|
|
@@ -128,6 +138,10 @@ export declare class PoUploadComponent extends PoUploadBaseComponent implements
|
|
|
128
138
|
trackByFn(index: any, file: PoUploadFile): string;
|
|
129
139
|
uploadFiles(files: Array<PoUploadFile>): void;
|
|
130
140
|
customClick(file: PoUploadFile): void;
|
|
141
|
+
setHelper(label?: string, additionalHelpTooltip?: string): {
|
|
142
|
+
hideAdditionalHelp: boolean;
|
|
143
|
+
helperSettings?: any;
|
|
144
|
+
};
|
|
131
145
|
private cleanInputValue;
|
|
132
146
|
private isAdditionalHelpEventTriggered;
|
|
133
147
|
private isUploadButtonFocused;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @usedBy PoHelperComponent
|
|
3
|
+
*
|
|
4
|
+
* @description
|
|
5
|
+
*
|
|
6
|
+
* *Interface* que define as opções de configuração do componente po-helper.
|
|
7
|
+
*
|
|
8
|
+
* Permite customizar o conteúdo, título, tipo do ícone, modo de abertura do popover, ações customizadas e eventos.
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
export interface PoHelperOptions {
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @optional
|
|
15
|
+
*
|
|
16
|
+
* @description
|
|
17
|
+
*
|
|
18
|
+
* Título do helper exibido no popover.
|
|
19
|
+
*/
|
|
20
|
+
title?: string;
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @optional
|
|
24
|
+
*
|
|
25
|
+
* @description
|
|
26
|
+
*
|
|
27
|
+
* Texto explicativo exibido no popover.
|
|
28
|
+
*/
|
|
29
|
+
content?: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @optional
|
|
33
|
+
*
|
|
34
|
+
* @description
|
|
35
|
+
*
|
|
36
|
+
* Tipo do ícone exibido: `info` ou `help`.
|
|
37
|
+
*
|
|
38
|
+
* Quando o valor é `info`, o popover exibe apenas informações e não permite ações customizadas.
|
|
39
|
+
*
|
|
40
|
+
* Quando o valor é `help`, o popover pode exibir ações customizadas no rodapé.
|
|
41
|
+
*
|
|
42
|
+
* @default `help`
|
|
43
|
+
*/
|
|
44
|
+
type?: 'info' | 'help';
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @optional
|
|
48
|
+
*
|
|
49
|
+
* @description
|
|
50
|
+
*
|
|
51
|
+
* Ação customizada exibida no rodapé do popover.
|
|
52
|
+
* Compatível apenas com a propriedade type com o valor `help` e desconsiderada quando o type for `info`.
|
|
53
|
+
*
|
|
54
|
+
* Deve ser um objeto com as propriedades:
|
|
55
|
+
* - `label`: Texto do botão.
|
|
56
|
+
* - `action`: Função executada ao clicar no botão.
|
|
57
|
+
*
|
|
58
|
+
* Exemplo:
|
|
59
|
+
* ```typescript
|
|
60
|
+
* { label: 'Saiba mais', action: this.footerAction.bind(this)) }
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
footerAction?: {
|
|
64
|
+
label: string;
|
|
65
|
+
action: Function;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* @optional
|
|
69
|
+
*
|
|
70
|
+
* @description
|
|
71
|
+
* Evento disparado ao clicar no ícone do helper.
|
|
72
|
+
*
|
|
73
|
+
* O conteúdo do popover não é exibido quando esta propriedade é definida, para controle total do evento pelo desenvolvedor.
|
|
74
|
+
*
|
|
75
|
+
* Pode ser uma função ou um `EventEmitter`.
|
|
76
|
+
*
|
|
77
|
+
* Exemplo:
|
|
78
|
+
* ```
|
|
79
|
+
* eventOnClick: (event) => {
|
|
80
|
+
* alert('Clicou no helper');
|
|
81
|
+
* console.log(event);
|
|
82
|
+
* }
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
eventOnClick?: Function;
|
|
86
|
+
size?: string;
|
|
87
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { PoHelperOptions } from './interfaces/po-helper.interface';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* @description
|
|
5
|
+
*
|
|
6
|
+
* O componente `po-helper` exibe um ícone de ajuda ou informação ao lado de campos, botões ou outros elementos, permitindo ao usuário acessar conteúdos explicativos em um popover.
|
|
7
|
+
*
|
|
8
|
+
* Principais funcionalidades:
|
|
9
|
+
* - Exibe ícone de ajuda (`help`) ou informação (`info`) conforme configuração.
|
|
10
|
+
* - Permite definir título, conteúdo e ações no popover via propriedade `p-helper`.
|
|
11
|
+
* - Suporte a acessibilidade: navegação por teclado, atributos ARIA e leitura do conteúdo por leitores de tela.
|
|
12
|
+
* - Controle do tamanho do componente via propriedade `p-size` (`small` ou `medium`).
|
|
13
|
+
* - Permite customizar ações no rodapé do popover.
|
|
14
|
+
*
|
|
15
|
+
* Exemplo de uso:
|
|
16
|
+
* ```html
|
|
17
|
+
* <po-helper
|
|
18
|
+
* [p-helper]="{ title: 'Ajuda', content: 'Texto explicativo', type: 'help' }"
|
|
19
|
+
* [p-size]="'medium'"
|
|
20
|
+
* ></po-helper>
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* Também é possível passar apenas uma string para o conteúdo:
|
|
24
|
+
* ```html
|
|
25
|
+
* <po-helper p-helper="Texto explicativo"></po-helper>
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* A propriedade `p-helper` aceita um objeto do tipo `PoHelperOptions`:
|
|
29
|
+
* ```typescript
|
|
30
|
+
* interface PoHelperOptions {
|
|
31
|
+
* title?: string;
|
|
32
|
+
* content: string;
|
|
33
|
+
* type?: 'help' | 'info';
|
|
34
|
+
* eventOnClick?: Function;
|
|
35
|
+
* footerAction?: { label: string; action: Function };
|
|
36
|
+
* }
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* > **Importante:** A propriedade `footerAction` não pode ser utilizada quando o tipo do helper for `info`, pois o ícone de informação é destinado apenas para exibir informações estáticas sem ações adicionais.
|
|
40
|
+
*
|
|
41
|
+
* #### Tokens customizáveis
|
|
42
|
+
*
|
|
43
|
+
* É possível alterar o estilo do componente usando os seguintes tokens (CSS):
|
|
44
|
+
*
|
|
45
|
+
* > Para maiores informações, acesse o guia [Personalizando o Tema Padrão com Tokens CSS](https://po-ui.io/guides/theme-customization).
|
|
46
|
+
*
|
|
47
|
+
* | Propriedade | Descrição | Valor Padrão |
|
|
48
|
+
* |--------------------------------------------|---------------------------------------------------------------|---------------------------------------------------|
|
|
49
|
+
* | `--color` | Cor principal do ícone | `var(--color-action-default)` |
|
|
50
|
+
* | `--border-color-hover` | Cor da borda no estado hover | `var(--color-brand-01-darkest)` |
|
|
51
|
+
* | `--background-pressed` | Cor de background no estado de pressionado | `var(--color-brand-01-light)` |
|
|
52
|
+
* | `--color-disabled` | Cor principal no estado disabled | `var(--color-action-disabled)` |
|
|
53
|
+
*
|
|
54
|
+
*/
|
|
55
|
+
export declare class PoHelperBaseComponent {
|
|
56
|
+
/**
|
|
57
|
+
* @Input
|
|
58
|
+
*
|
|
59
|
+
* @optional
|
|
60
|
+
*
|
|
61
|
+
* @description
|
|
62
|
+
*
|
|
63
|
+
* Define o conteúdo e as opções do popover de ajuda/informação.
|
|
64
|
+
*
|
|
65
|
+
* Aceita uma string simples (exibida como conteúdo) ou um objeto do tipo `PoHelperOptions` para configuração avançada:
|
|
66
|
+
* - `title`: Título do popover.
|
|
67
|
+
* - `content`: Conteúdo explicativo exibido no popover.
|
|
68
|
+
* - `type`: Tipo do ícone (`help` ou `info`).
|
|
69
|
+
* - `eventOnClick`: Função chamada ao clicar no ícone.
|
|
70
|
+
* - `footerAction`: Objeto com `label` e `action` para ação customizada no rodapé do popover.
|
|
71
|
+
*
|
|
72
|
+
* Exemplo de uso:
|
|
73
|
+
* ```html
|
|
74
|
+
* <po-helper p-helper="Texto explicativo"></po-helper>
|
|
75
|
+
* <po-helper [p-helper]="{ title: 'Ajuda', content: 'Texto', type: 'help' }"></po-helper>
|
|
76
|
+
* ```
|
|
77
|
+
*
|
|
78
|
+
*/
|
|
79
|
+
helper: import("@angular/core").InputSignal<string | PoHelperOptions>;
|
|
80
|
+
/**
|
|
81
|
+
* @Input
|
|
82
|
+
*
|
|
83
|
+
* @optional
|
|
84
|
+
*
|
|
85
|
+
* @description
|
|
86
|
+
*
|
|
87
|
+
* Define o tamanho do componente:
|
|
88
|
+
* - `small`: altura do ícone com seu valor de 16px (disponível apenas para acessibilidade AA).
|
|
89
|
+
* - `medium`: altura do ícone com seu valor de 24px.
|
|
90
|
+
*
|
|
91
|
+
* > Caso a acessibilidade AA não esteja configurada, o tamanho `medium` será mantido.
|
|
92
|
+
* Para mais detalhes, consulte a documentação do [po-theme](https://po-ui.io/documentation/po-theme).
|
|
93
|
+
*
|
|
94
|
+
* @default `medium`
|
|
95
|
+
*/
|
|
96
|
+
size: import("@angular/core").InputSignal<string>;
|
|
97
|
+
/**
|
|
98
|
+
* @Input
|
|
99
|
+
*
|
|
100
|
+
* @optional
|
|
101
|
+
*
|
|
102
|
+
* @description
|
|
103
|
+
*
|
|
104
|
+
* Indica se o helper deve ser exibido no estado desativado, desabilitando interações do usuário.
|
|
105
|
+
*
|
|
106
|
+
* @default `false`
|
|
107
|
+
*/
|
|
108
|
+
disabled: import("@angular/core").InputSignal<boolean>;
|
|
109
|
+
private transformHelper;
|
|
110
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PoHelperBaseComponent, never>;
|
|
111
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PoHelperBaseComponent, "po-helper-base", never, { "helper": { "alias": "p-helper"; "required": false; "isSignal": true; }; "size": { "alias": "p-size"; "required": false; "isSignal": true; }; "disabled": { "alias": "p-disabled"; "required": false; "isSignal": true; }; }, {}, never, never, false, never>;
|
|
112
|
+
}
|