@po-ui/ng-components 19.30.0 → 19.32.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.
@@ -364,15 +364,15 @@ export interface PoDynamicFormField extends PoDynamicField {
364
364
  placeholder?: string;
365
365
  /**
366
366
  * Define a localidade a ser utilizada no componente.
367
- * Por padrão o valor será configurado segundo a o módulo [`I18n`](documentation/po-i18n)
367
+ * Por padrão o valor será configurado segundo o módulo [`I18n`](documentation/po-i18n)
368
368
  *
369
369
  * Exemplo de utilização:
370
- * ``
370
+ * ```
371
371
  * [
372
372
  * { property: 'birthday', locale: 'en', type: 'date' },
373
373
  * { property: 'wage', locale: 'ru', type: 'currency' }
374
374
  * ];
375
- * ``
375
+ * ```
376
376
  *
377
377
  * > Para ver quais linguagens suportadas acesse [`I18n`](documentation/po-i18n)
378
378
  * > A propriedade será repassada para os componentes que suportam a mesma.
@@ -646,6 +646,14 @@ export interface PoDynamicFormField extends PoDynamicField {
646
646
  * - Não possuir `p-help` e/ou `p-label`.
647
647
  */
648
648
  showRequired?: boolean;
649
+ /**
650
+ * Exibe a pré-visualização de imagens ao anexá-las.
651
+ *
652
+ * > Propriedade funciona apenas em arquivos de formato de imagem (`.png`, `.jpg`, `.jpeg` e `.gif`).
653
+ *
654
+ * **Componente compatível**: `po-upload`
655
+ */
656
+ showThumbnail?: boolean;
649
657
  /**
650
658
  * Define uma ação personalizada no componente `po-upload`, adicionando um botão no canto inferior direito
651
659
  * de cada barra de progresso associada aos arquivos enviados ou em envio.
@@ -51,10 +51,11 @@ import * as i49 from "../po-icon/po-icon.module";
51
51
  import * as i50 from "./po-checkbox/po-checkbox.module";
52
52
  import * as i51 from "./po-radio/po-radio.module";
53
53
  import * as i52 from "../po-label/po-label.module";
54
- import * as i53 from "../po-listbox/po-listbox.module";
55
- import * as i54 from "./po-switch/po-switch.module";
56
- import * as i55 from "../po-tag/po-tag.module";
57
- import * as i56 from "../po-helper/po-helper.module";
54
+ import * as i53 from "../po-link/po-link.module";
55
+ import * as i54 from "../po-listbox/po-listbox.module";
56
+ import * as i55 from "./po-switch/po-switch.module";
57
+ import * as i56 from "../po-tag/po-tag.module";
58
+ import * as i57 from "../po-helper/po-helper.module";
58
59
  /**
59
60
  * @description
60
61
  *
@@ -67,6 +68,6 @@ import * as i56 from "../po-helper/po-helper.module";
67
68
  */
68
69
  export declare class PoFieldModule {
69
70
  static ɵfac: i0.ɵɵFactoryDeclaration<PoFieldModule, never>;
70
- static ɵmod: i0.ɵɵNgModuleDeclaration<PoFieldModule, [typeof i1.PoComboComponent, typeof i2.PoComboOptionTemplateDirective, typeof i3.PoMultiselectOptionTemplateDirective, typeof i4.PoDecimalComponent, typeof i5.PoDatepickerRangeComponent, typeof i6.PoEmailComponent, typeof i7.PoInputComponent, typeof i8.PoLoginComponent, typeof i9.PoLookupComponent, typeof i10.PoLookupModalComponent, typeof i11.PoMultiselectComponent, typeof i12.PoMultiselectDropdownComponent, typeof i13.PoNumberComponent, typeof i14.PoPasswordComponent, typeof i15.PoRichTextBodyComponent, typeof i16.PoRichTextComponent, typeof i17.PoRichTextImageModalComponent, typeof i18.PoRichTextLinkModalComponent, typeof i19.PoRichTextToolbarComponent, typeof i20.PoSelectComponent, typeof i21.PoTextareaComponent, typeof i22.PoUploadComponent, typeof i23.PoUploadDragDropComponent, typeof i24.PoUploadDragDropDirective, typeof i25.PoUploadDragDropAreaOverlayComponent, typeof i26.PoUploadDragDropAreaComponent, typeof i27.PoUploadFileRestrictionsComponent, typeof i28.PoUrlComponent], [typeof i29.CommonModule, typeof i30.FormsModule, typeof i30.FormsModule, typeof i31.OverlayModule, typeof i32.PoButtonGroupModule, typeof i33.PoButtonModule, typeof i34.PoCleanModule, typeof i35.PoCalendarModule, typeof i36.PoCheckboxGroupModule, typeof i37.PoRadioGroupModule, typeof i38.PoContainerModule, typeof i39.PoDatepickerModule, typeof i40.PoDisclaimerGroupModule, typeof i41.PoDisclaimerModule, typeof i42.PoFieldContainerModule, typeof i43.PoLoadingModule, typeof i44.PoModalModule, typeof i45.PoProgressModule, typeof i46.PoServicesModule, typeof i47.PoTableModule, typeof i48.PoTooltipModule, typeof i49.PoIconModule, typeof i50.PoCheckboxModule, typeof i51.PoRadioModule, typeof i52.PoLabelModule, typeof i53.PoListBoxModule, typeof i54.PoSwitchModule, typeof i55.PoTagModule, typeof i56.PoHelperModule], [typeof i36.PoCheckboxGroupModule, typeof i37.PoRadioGroupModule, typeof i34.PoCleanModule, typeof i39.PoDatepickerModule, typeof i1.PoComboComponent, typeof i2.PoComboOptionTemplateDirective, typeof i3.PoMultiselectOptionTemplateDirective, typeof i4.PoDecimalComponent, typeof i5.PoDatepickerRangeComponent, typeof i6.PoEmailComponent, typeof i42.PoFieldContainerModule, typeof i7.PoInputComponent, typeof i8.PoLoginComponent, typeof i9.PoLookupComponent, typeof i10.PoLookupModalComponent, typeof i11.PoMultiselectComponent, typeof i13.PoNumberComponent, typeof i14.PoPasswordComponent, typeof i16.PoRichTextComponent, typeof i20.PoSelectComponent, typeof i21.PoTextareaComponent, typeof i22.PoUploadComponent, typeof i28.PoUrlComponent, typeof i50.PoCheckboxModule, typeof i51.PoRadioModule, typeof i52.PoLabelModule, typeof i54.PoSwitchModule, typeof i55.PoTagModule]>;
71
+ static ɵmod: i0.ɵɵNgModuleDeclaration<PoFieldModule, [typeof i1.PoComboComponent, typeof i2.PoComboOptionTemplateDirective, typeof i3.PoMultiselectOptionTemplateDirective, typeof i4.PoDecimalComponent, typeof i5.PoDatepickerRangeComponent, typeof i6.PoEmailComponent, typeof i7.PoInputComponent, typeof i8.PoLoginComponent, typeof i9.PoLookupComponent, typeof i10.PoLookupModalComponent, typeof i11.PoMultiselectComponent, typeof i12.PoMultiselectDropdownComponent, typeof i13.PoNumberComponent, typeof i14.PoPasswordComponent, typeof i15.PoRichTextBodyComponent, typeof i16.PoRichTextComponent, typeof i17.PoRichTextImageModalComponent, typeof i18.PoRichTextLinkModalComponent, typeof i19.PoRichTextToolbarComponent, typeof i20.PoSelectComponent, typeof i21.PoTextareaComponent, typeof i22.PoUploadComponent, typeof i23.PoUploadDragDropComponent, typeof i24.PoUploadDragDropDirective, typeof i25.PoUploadDragDropAreaOverlayComponent, typeof i26.PoUploadDragDropAreaComponent, typeof i27.PoUploadFileRestrictionsComponent, typeof i28.PoUrlComponent], [typeof i29.CommonModule, typeof i30.FormsModule, typeof i30.FormsModule, typeof i31.OverlayModule, typeof i32.PoButtonGroupModule, typeof i33.PoButtonModule, typeof i34.PoCleanModule, typeof i35.PoCalendarModule, typeof i36.PoCheckboxGroupModule, typeof i37.PoRadioGroupModule, typeof i38.PoContainerModule, typeof i39.PoDatepickerModule, typeof i40.PoDisclaimerGroupModule, typeof i41.PoDisclaimerModule, typeof i42.PoFieldContainerModule, typeof i43.PoLoadingModule, typeof i44.PoModalModule, typeof i45.PoProgressModule, typeof i46.PoServicesModule, typeof i47.PoTableModule, typeof i48.PoTooltipModule, typeof i49.PoIconModule, typeof i50.PoCheckboxModule, typeof i51.PoRadioModule, typeof i52.PoLabelModule, typeof i53.PoLinkModule, typeof i54.PoListBoxModule, typeof i55.PoSwitchModule, typeof i56.PoTagModule, typeof i57.PoHelperModule], [typeof i36.PoCheckboxGroupModule, typeof i37.PoRadioGroupModule, typeof i34.PoCleanModule, typeof i39.PoDatepickerModule, typeof i1.PoComboComponent, typeof i2.PoComboOptionTemplateDirective, typeof i3.PoMultiselectOptionTemplateDirective, typeof i4.PoDecimalComponent, typeof i5.PoDatepickerRangeComponent, typeof i6.PoEmailComponent, typeof i42.PoFieldContainerModule, typeof i7.PoInputComponent, typeof i8.PoLoginComponent, typeof i9.PoLookupComponent, typeof i10.PoLookupModalComponent, typeof i11.PoMultiselectComponent, typeof i13.PoNumberComponent, typeof i14.PoPasswordComponent, typeof i16.PoRichTextComponent, typeof i20.PoSelectComponent, typeof i21.PoTextareaComponent, typeof i22.PoUploadComponent, typeof i28.PoUrlComponent, typeof i50.PoCheckboxModule, typeof i51.PoRadioModule, typeof i52.PoLabelModule, typeof i55.PoSwitchModule, typeof i56.PoTagModule]>;
71
72
  static ɵinj: i0.ɵɵInjectorDeclaration<PoFieldModule>;
72
73
  }
@@ -42,4 +42,18 @@ export interface PoUploadLiterals {
42
42
  errorOccurred?: string;
43
43
  /** Texto a ser exibido quando o envio do arquivo for realizado com sucesso. */
44
44
  sentWithSuccess?: string;
45
+ /** Texto a ser exibido no container de informação quando o estado for de sucesso. */
46
+ doneText?: string;
47
+ /** Texto a ser exibido no container de informação quando o estado for enviando. */
48
+ uploadingText?: string;
49
+ /** Texto de Tente novamente ao ocorrer erro ao enviar. */
50
+ tryAgain?: string;
51
+ /** Texto do leitor de tela ao focar no ícone de fechar. */
52
+ close?: string;
53
+ /** Título do modal de pré-visualizar. */
54
+ preview?: string;
55
+ /** Texto do leitor da miniatura da imagem. */
56
+ thumbnail?: string;
57
+ /** Texto do botão padrão do modal de pré-visualizar. */
58
+ continue?: string;
45
59
  }
@@ -1,6 +1,7 @@
1
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
+ import { PoModalAction } from '../../po-modal';
4
5
  import { PoProgressAction } from '../../po-progress';
5
6
  import { PoUploadFileRestrictions } from './interfaces/po-upload-file-restriction.interface';
6
7
  import { PoUploadLiterals } from './interfaces/po-upload-literals.interface';
@@ -27,6 +28,44 @@ export declare const poUploadLiteralsDefault: {
27
28
  * - Função de sucesso que será disparada quando os arquivos forem enviados com sucesso.
28
29
  * - Função de erro que será disparada quando houver erro no envio dos arquivos.
29
30
  * - Permite habilitar uma área onde os arquivos podem ser arrastados.
31
+ *
32
+ * #### Tokens customizáveis
33
+ *
34
+ * É possível alterar o estilo do componente usando os seguintes tokens (CSS):
35
+ *
36
+ * > Para maiores informações, acesse o guia [Personalizando o Tema Padrão com Tokens CSS](https://po-ui.io/guides/theme-customization).
37
+ *
38
+ * | Propriedade | Descrição | Valor Padrão |
39
+ * |----------------------------------------|-------------------------------------------------------|---------------------------------------------------|
40
+ * | **TEXT SUPPORT** | | |
41
+ * | `--font-family-text-support` | Família tipográfica usada no texto de suporte | `var(--font-family-theme)` |
42
+ * | `--text-color-text-support` | Cor da fonte no texto de suporte | `var(--color-neutral-dark-90)` |
43
+ * | **UPLOAD CONTENT** | | |
44
+ * | `--background-color-content` &nbsp; | Cor de fundo | `var(--color-neutral-light-10)` |
45
+ * | `--border-color-content` | Cor da borda | `var(--color-neutral-light-20)` |
46
+ * | `--border-radius-content` | Contém o valor do raio dos cantos do elemento | `var(--border-radius-md)` |
47
+ * | `--text-color-file-name` | Cor do texto do nome do arquivo | `var(--color-neutral-dark-90)` |
48
+ * | `--font-family-file-name` | Família tipográfica usada no texto do arquivo | `var(--font-family-theme)` |
49
+ * | `--text-color-info-bar` | Cor do texto de informação | `var(--color-neutral-mid-60)` |
50
+ * | `--font-family-info-bar` | Família tipográfica usada no texto de informação | `var(--font-family-theme)` |
51
+ * | **ERROR STATE** | | |
52
+ * | `--background-color-content-error` | Cor de fundo do container de erro | `var(--color-neutral-light-00)` |
53
+ * | `--border-color-content-error` | Cor da borda do container de erro | `var(--color-feedback-negative-base)` |
54
+ * | `--text-color-error` | Cor do texto do container de erro | `var(--color-feedback-negative-dark)` |
55
+ * | `--color-icon-error` | Cor do ícone no estado de erro | `var(--color-feedback-negative-base)` |
56
+ * | `--font-family-error` | Família tipográfica usada no texto de erro | `var(--font-family-theme)` |
57
+ * | **UPLOADED STATE** | | |
58
+ * | `--background-color-content-uploaded` | Cor de fundo do container com status de enviado | `var(--color-neutral-light-00)` |
59
+ * | `--border-color-content-uploaded` | Cor da borda do container com status de enviado | `var(--color-neutral-light-20)` |
60
+ * | **INTERACTIVE STATE** | | |
61
+ * | `--text-color-file-name-interactive` | Cor do texto do nome do arquivo quando interativo | `var(--color-action-default)` |
62
+ * | **THUMBNAIL** | | |
63
+ * | `--color-icon-thumbnail` | Cor do ícone na thumbnail | `var(--color-action-default)` |
64
+ * | `--border-width-thumbnail` | Tamanho da fonte na thumbnail | `var(--border-width-sm)` |
65
+ * | `--border-radius-thumbnail` | Contém o valor do raio dos cantos na thumbnail | `var(--border-radius-md)` |
66
+ * | `--background-color-thumbnail` | Cor de fundo na thumbnail | `var(--color-neutral-light-05)` |
67
+ * | **Focused** | | |
68
+ * | `--outline-color-focused` | Cor do outline do estado de focus | `var(--color-action-focus)` |
30
69
  */
31
70
  export declare abstract class PoUploadBaseComponent implements ControlValueAccessor, Validator {
32
71
  protected uploadService: PoUploadService;
@@ -129,6 +168,19 @@ export declare abstract class PoUploadBaseComponent implements ControlValueAcces
129
168
  * @default `false`
130
169
  */
131
170
  optional: boolean;
171
+ /**
172
+ * @optional
173
+ *
174
+ * @description
175
+ *
176
+ * Exibe a pré-visualização de imagens ao anexá-las.
177
+ *
178
+ * > Propriedade funciona apenas em arquivos de formato de imagem (`.png`, `.jpg`, `.jpeg` e `.gif`).
179
+ * Será ignorada em outros tipos de arquivo.
180
+ *
181
+ * @default `true`
182
+ */
183
+ showThumbnail: boolean;
132
184
  /** Objeto que contém os cabeçalhos que será enviado na requisição dos arquivos. */
133
185
  headers: {
134
186
  [name: string]: string | Array<string>;
@@ -227,6 +279,38 @@ export declare abstract class PoUploadBaseComponent implements ControlValueAcces
227
279
  * ```
228
280
  */
229
281
  customAction?: PoProgressAction;
282
+ /**
283
+ * @optional
284
+ *
285
+ * @description
286
+ *
287
+ * Define uma ou duas ações personalizadas do modal de pré-visualização, adicionando um botão ou dois botões no canto inferior direito
288
+ * do modal.
289
+ *
290
+ * A ação deve implementar a interface **PoModalAction**, permitindo configurar propriedades como:
291
+ * - `label`: Texto do botão.
292
+ * - `action`: Ícone a ser exibido no botão.
293
+ * - `danger`: Define a propriedade `p-danger` do botão.
294
+ * - `disabled`: Indica se o botão deve estar desabilitado.
295
+ * - `visible`: Indica se o botão deve estar visível.
296
+ *
297
+ * **Exemplo de uso:**
298
+ *
299
+ * ```html
300
+ * <po-upload
301
+ * [p-custom-modal-actions]="customActions"
302
+ * </po-upload>
303
+ * ```
304
+ *
305
+ * ```typescript
306
+ * customActions: Array<PoModalAction> = [
307
+ * { label: 'Confirmar', action: this.confirmModal.bind(this) },
308
+ * { label: 'Cancelar', action: this.closeModal.bind(this) }
309
+ *];
310
+ *
311
+ * ```
312
+ */
313
+ customModalActions?: Array<PoModalAction>;
230
314
  /**
231
315
  * @optional
232
316
  *
@@ -297,6 +381,33 @@ export declare abstract class PoUploadBaseComponent implements ControlValueAcces
297
381
  * ```
298
382
  */
299
383
  onUpload: EventEmitter<any>;
384
+ /**
385
+ * @optional
386
+ *
387
+ * @description
388
+ *
389
+ * Evento será disparado ao clicar no ícone de fechar.
390
+ * > Por parâmetro será passado o objeto do arquivo.
391
+ */
392
+ onCancel: EventEmitter<any>;
393
+ /**
394
+ * @optional
395
+ *
396
+ * @description
397
+ *
398
+ * Evento será disparado ao abrir o modal de pré-visualização.
399
+ * > Por parâmetro será passado o objeto do arquivo.
400
+ */
401
+ onOpenModalPreview: EventEmitter<any>;
402
+ /**
403
+ * @optional
404
+ *
405
+ * @description
406
+ *
407
+ * Evento será disparado ao clicar no ícone de remover.
408
+ * > Por parâmetro será passado o objeto do arquivo.
409
+ */
410
+ onRemove: EventEmitter<any>;
300
411
  /**
301
412
  * @optional
302
413
  *
@@ -548,10 +659,10 @@ export declare abstract class PoUploadBaseComponent implements ControlValueAcces
548
659
  private setAllowedExtensions;
549
660
  private initRestrictions;
550
661
  private updateExistsFileInFiles;
551
- abstract sendFeedback(): void;
662
+ abstract sendFeedback(file?: any): void;
552
663
  abstract setDirectoryAttribute(value: boolean): any;
553
664
  static ɵfac: i0.ɵɵFactoryDeclaration<PoUploadBaseComponent, 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>;
665
+ 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; }; "showThumbnail": { "alias": "p-show-thumbnail"; "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; }; "customModalActions": { "alias": "p-custom-modal-actions"; "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"; "onCancel": "p-cancel"; "onOpenModalPreview": "p-open-modal-preview"; "onRemove": "p-remove"; "onError": "p-error"; "onSuccess": "p-success"; "ngModelChange": "ngModelChange"; }, never, never, true, never>;
555
666
  static ngAcceptInputType_appendBox: any;
556
667
  static ngAcceptInputType_autoFocus: any;
557
668
  static ngAcceptInputType_disabledRemoveFile: any;
@@ -8,6 +8,12 @@ export declare class PoUploadFile {
8
8
  size: number;
9
9
  displayName?: string;
10
10
  percent?: number;
11
+ sizeNotAllowed?: boolean;
12
+ extensionNotAllowed?: boolean;
13
+ hideDoneContent?: boolean;
14
+ errorMessage?: string;
15
+ thumbnailUrl?: string;
16
+ imageError?: boolean;
11
17
  constructor(file: any);
12
18
  private getExtension;
13
19
  private generateUUID;
@@ -1,6 +1,7 @@
1
- import { AfterViewInit, Renderer2 } from '@angular/core';
1
+ import { AfterViewInit, OnChanges, Renderer2, SimpleChanges } from '@angular/core';
2
2
  import { PoProgressStatus } from '../../po-progress/enums/po-progress-status.enum';
3
3
  import { PoButtonComponent } from './../../po-button/po-button.component';
4
+ import { PoModalAction, PoModalComponent } from '../../po-modal';
4
5
  import { PoUploadBaseComponent } from './po-upload-base.component';
5
6
  import { PoUploadFile } from './po-upload-file';
6
7
  import { PoUploadStatus } from './po-upload-status.enum';
@@ -34,14 +35,20 @@ import * as i0 from "@angular/core";
34
35
  * <file name="sample-po-upload-download/sample-po-upload-download.component.html"> </file>
35
36
  * <file name="sample-po-upload-download/sample-po-upload-download.component.ts"> </file>
36
37
  * </example>
38
+ *
39
+ * <example name="po-upload-preview" title="PO Upload - with Preview">
40
+ * <file name="sample-po-upload-preview/sample-po-upload-preview.component.html"> </file>
41
+ * <file name="sample-po-upload-preview/sample-po-upload-preview.component.ts"> </file>
42
+ * </example>
37
43
  */
38
- export declare class PoUploadComponent extends PoUploadBaseComponent implements AfterViewInit {
44
+ export declare class PoUploadComponent extends PoUploadBaseComponent implements AfterViewInit, OnChanges {
39
45
  renderer: Renderer2;
40
46
  private i18nPipe;
41
47
  private notification;
42
48
  private inputFile;
43
49
  private poUploadDragDropComponent;
44
50
  uploadButton: PoButtonComponent;
51
+ modalComponent: PoModalComponent;
45
52
  id: string;
46
53
  infoByUploadStatus: {
47
54
  [key: string]: {
@@ -54,6 +61,12 @@ export declare class PoUploadComponent extends PoUploadBaseComponent implements
54
61
  2: PoProgressStatus;
55
62
  };
56
63
  private calledByCleanInputValue;
64
+ protected modalPrimaryAction: PoModalAction;
65
+ protected modalSecondaryAction: PoModalAction;
66
+ protected errorMessage: string;
67
+ protected tooltipTitle: string;
68
+ protected modalImageUrl: string;
69
+ protected errorModalImage: boolean;
57
70
  constructor();
58
71
  get displayDragDrop(): boolean;
59
72
  get displaySendButton(): boolean;
@@ -63,7 +76,8 @@ export declare class PoUploadComponent extends PoUploadBaseComponent implements
63
76
  get hasFileNotUploaded(): boolean;
64
77
  get isDisabled(): boolean;
65
78
  get maxFiles(): number;
66
- cancel(file: PoUploadFile): void;
79
+ cancel(file: PoUploadFile, keydown?: KeyboardEvent): void;
80
+ ngOnChanges(changes: SimpleChanges): void;
67
81
  ngAfterViewInit(): void;
68
82
  /** Método responsável por **limpar** o(s) arquivo(s) selecionado(s). */
69
83
  clear(): void;
@@ -93,10 +107,15 @@ export declare class PoUploadComponent extends PoUploadBaseComponent implements
93
107
  onFileChange(event: any): void;
94
108
  onFileChangeDragDrop(files: any): void;
95
109
  onKeyDown(event: KeyboardEvent): void;
110
+ /**
111
+ * Método responsável por fechar o modal.
112
+ */
113
+ closeModal(): void;
114
+ openModal(file: PoUploadFile, keydown?: KeyboardEvent): void;
96
115
  removeFile(file: any): void;
97
116
  /** Método responsável por **abrir** a janela para seleção de arquivo(s). */
98
117
  selectFiles(): void;
99
- sendFeedback(): void;
118
+ sendFeedback(file?: any): void;
100
119
  /** Método responsável por **enviar** o(s) arquivo(s) selecionado(s). */
101
120
  sendFiles(): void;
102
121
  setDirectoryAttribute(canHandleDirectory: boolean): void;
@@ -142,11 +161,16 @@ export declare class PoUploadComponent extends PoUploadBaseComponent implements
142
161
  hideAdditionalHelp: boolean;
143
162
  helperSettings?: any;
144
163
  };
164
+ protected actionIsDisabled(action: any): any;
165
+ protected isActionVisible(action: any): boolean;
166
+ protected onImageError(file: any): void;
167
+ protected showTooltipText(e: MouseEvent, text: string): void;
145
168
  private cleanInputValue;
146
169
  private isAdditionalHelpEventTriggered;
147
170
  private isUploadButtonFocused;
148
171
  private responseHandler;
149
172
  private setPipeArguments;
173
+ private setPrimaryActionModal;
150
174
  private stopUploadHandler;
151
175
  private updateFiles;
152
176
  private updateModel;
@@ -90,16 +90,16 @@ export interface PoTableColumn {
90
90
  */
91
91
  disabled?: Function;
92
92
  /**
93
- * Formato de exibição do valor da coluna:
94
- * - Formato para moeda (currency). Exemplos: 'BRL', 'USD'.
95
- * - Formato para data (date): aceita apenas os caracteres de dia(dd), mês(MM) e ano (yyyy ou yy),
96
- * caso não seja informado um formato o mesmo será 'dd/MM/yyyy'. Exemplos: 'dd/MM/yyyy', 'dd-MM-yy', 'mm/dd/yyyy'.
97
- * - Formato para horário (time): aceita apenas os caracteres de hora(HH), minutos(mm), segundos(ss) e
98
- * milisegundos(f-ffffff), os milisegundos são opcionais, caso não seja informado um formato o mesmo será
99
- * 'HH:mm:ss'. Exemplos: 'HH:mm', 'HH:mm:ss.ffffff', 'HH:mm:ss.ff', 'mm:ss.fff'.
100
- * - Formato para números (number): aceita um valor seguindo o padrão [**DecimalPipe**](https://angular.io/api/common/DecimalPipe)
101
- * para formatação, e caso não seja informado, o número será exibido na sua forma original. Exemplo:
102
- * - Com o valor de entrada: `50` e a valor para formatação: `'1.2-5'` o resultado será: `50.00`
93
+ * Formato de exibição do valor da coluna.
94
+ *
95
+ * | Formatação | Type da Coluna | Descrição | Exemplos |
96
+ * |------------|-----------------|-----------|----------|
97
+ * | Monetário | `currency` | Formato para valores monetários. Informe o código da moeda (ISO 4217). | `'BRL'`, `'USD'`, `'EUR'`, `'RUB'` |
98
+ * | Data | `date` | Aceita apenas os caracteres de dia(dd), mês(MM) e ano (yyyy ou yy), caso não seja informado um formato o mesmo será 'dd/MM/yyyy' | `'dd/MM/yyyy'`, `'dd-MM-yy'`, `'mm/dd/yyyy'` |
99
+ * | Hora | `time` | Aceita apenas os caracteres de hora(HH), minutos(mm), segundos(ss) e milisegundos(f-ffffff), os milisegundos são opcionais, caso não seja informado um formato o mesmo será 'HH:mm:ss' | `'HH:mm'`, `'HH:mm:ss.ffffff'`, `'HH:mm:ss.ff'`, `'mm:ss.fff'` |
100
+ * | Número | `number` | Aceita um valor seguindo o padrão [**DecimalPipe**](https://angular.dev/api/common/DecimalPipe) para formatação, e caso não seja informado, o número será exibido na sua forma original. | `'1.2-5'` (ex.: `50` → `50.00`) |
101
+ *
102
+ * Observação: caso não seja informado um formato, o valor será exibido em sua forma original.
103
103
  */
104
104
  format?: string;
105
105
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@po-ui/ng-components",
3
- "version": "19.30.0",
3
+ "version": "19.32.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": "~19.0.3",
25
- "@po-ui/style": "19.30.0",
26
- "@po-ui/ng-schematics": "19.30.0",
25
+ "@po-ui/style": "19.32.0",
26
+ "@po-ui/ng-schematics": "19.32.0",
27
27
  "echarts": "^5.6.0",
28
28
  "tslib": "^2.6.2"
29
29
  },
@@ -38,7 +38,7 @@
38
38
  "@angular/platform-browser-dynamic": "^19",
39
39
  "@angular/router": "^19",
40
40
  "@angular-devkit/schematics": "^19",
41
- "@po-ui/style": "19.30.0",
41
+ "@po-ui/style": "19.32.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', '19.30.0');
21
+ (0, package_config_1.addPackageToPackageJson)(tree, '@po-ui/ng-components', '19.32.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)('19.30.0', changes_1.updateDepedenciesVersion), postUpdate()]);
9
+ return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.32.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)('19.30.0', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
14
+ return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.32.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)('19.30.0', changes_1.updateDepedenciesVersion), postUpdate()]);
9
+ return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.32.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)('19.30.0', changes_1.updateDepedenciesVersion), postUpdate()]);
9
+ return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.32.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)('19.30.0', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
43
+ return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.32.0', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
44
44
  }
45
45
  else {
46
46
  return (0, schematics_1.chain)([
47
- (0, package_config_1.updatePackageJson)('19.30.0', changes_1.updateDepedenciesVersion),
47
+ (0, package_config_1.updatePackageJson)('19.32.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)('19.30.0', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
43
+ return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.32.0', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
44
44
  }
45
45
  else {
46
46
  return (0, schematics_1.chain)([
47
- (0, package_config_1.updatePackageJson)('19.30.0', changes_1.updateDepedenciesVersion),
47
+ (0, package_config_1.updatePackageJson)('19.32.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('19.30.0', changes_1.dependeciesChanges),
13
+ updatePackageJson('19.32.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(),
@@ -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)('19.30.0', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
10
+ return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.32.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)('19.30.0', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
10
+ return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.32.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)('19.30.0', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
10
+ return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.32.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)('19.30.0', changes_1.updateDepedenciesVersion), postUpdate()]);
9
+ return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.32.0', changes_1.updateDepedenciesVersion), postUpdate()]);
10
10
  }
11
11
  function postUpdate() {
12
12
  return (_, context) => {
Binary file