@po-ui/ng-components 20.4.0 → 20.6.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/index.d.ts CHANGED
@@ -5528,16 +5528,16 @@ interface PoTableColumn {
5528
5528
  */
5529
5529
  disabled?: Function;
5530
5530
  /**
5531
- * Formato de exibição do valor da coluna:
5532
- * - Formato para moeda (currency). Exemplos: 'BRL', 'USD'.
5533
- * - Formato para data (date): aceita apenas os caracteres de dia(dd), mês(MM) e ano (yyyy ou yy),
5534
- * caso não seja informado um formato o mesmo será 'dd/MM/yyyy'. Exemplos: 'dd/MM/yyyy', 'dd-MM-yy', 'mm/dd/yyyy'.
5535
- * - Formato para horário (time): aceita apenas os caracteres de hora(HH), minutos(mm), segundos(ss) e
5536
- * milisegundos(f-ffffff), os milisegundos são opcionais, caso não seja informado um formato o mesmo será
5537
- * 'HH:mm:ss'. Exemplos: 'HH:mm', 'HH:mm:ss.ffffff', 'HH:mm:ss.ff', 'mm:ss.fff'.
5538
- * - Formato para números (number): aceita um valor seguindo o padrão [**DecimalPipe**](https://angular.io/api/common/DecimalPipe)
5539
- * para formatação, e caso não seja informado, o número será exibido na sua forma original. Exemplo:
5540
- * - Com o valor de entrada: `50` e a valor para formatação: `'1.2-5'` o resultado será: `50.00`
5531
+ * Formato de exibição do valor da coluna.
5532
+ *
5533
+ * | Formatação | Type da Coluna | Descrição | Exemplos |
5534
+ * |------------|-----------------|-----------|----------|
5535
+ * | Monetário | `currency` | Formato para valores monetários. Informe o código da moeda (ISO 4217). | `'BRL'`, `'USD'`, `'EUR'`, `'RUB'` |
5536
+ * | 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'` |
5537
+ * | 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'` |
5538
+ * | 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`) |
5539
+ *
5540
+ * Observação: caso não seja informado um formato, o valor será exibido em sua forma original.
5541
5541
  */
5542
5542
  format?: string;
5543
5543
  /**
@@ -18576,6 +18576,20 @@ interface PoUploadLiterals {
18576
18576
  errorOccurred?: string;
18577
18577
  /** Texto a ser exibido quando o envio do arquivo for realizado com sucesso. */
18578
18578
  sentWithSuccess?: string;
18579
+ /** Texto a ser exibido no container de informação quando o estado for de sucesso. */
18580
+ doneText?: string;
18581
+ /** Texto a ser exibido no container de informação quando o estado for enviando. */
18582
+ uploadingText?: string;
18583
+ /** Texto de Tente novamente ao ocorrer erro ao enviar. */
18584
+ tryAgain?: string;
18585
+ /** Texto do leitor de tela ao focar no ícone de fechar. */
18586
+ close?: string;
18587
+ /** Título do modal de pré-visualizar. */
18588
+ preview?: string;
18589
+ /** Texto do leitor da miniatura da imagem. */
18590
+ thumbnail?: string;
18591
+ /** Texto do botão padrão do modal de pré-visualizar. */
18592
+ continue?: string;
18579
18593
  }
18580
18594
 
18581
18595
  declare enum PoUploadStatus {
@@ -18594,6 +18608,12 @@ declare class PoUploadFile {
18594
18608
  size: number;
18595
18609
  displayName?: string;
18596
18610
  percent?: number;
18611
+ sizeNotAllowed?: boolean;
18612
+ extensionNotAllowed?: boolean;
18613
+ hideDoneContent?: boolean;
18614
+ errorMessage?: string;
18615
+ thumbnailUrl?: string;
18616
+ imageError?: boolean;
18597
18617
  constructor(file: any);
18598
18618
  private getExtension;
18599
18619
  private generateUUID;
@@ -18648,6 +18668,44 @@ declare class PoUploadService extends PoUploadBaseService {
18648
18668
  * - Função de sucesso que será disparada quando os arquivos forem enviados com sucesso.
18649
18669
  * - Função de erro que será disparada quando houver erro no envio dos arquivos.
18650
18670
  * - Permite habilitar uma área onde os arquivos podem ser arrastados.
18671
+ *
18672
+ * #### Tokens customizáveis
18673
+ *
18674
+ * É possível alterar o estilo do componente usando os seguintes tokens (CSS):
18675
+ *
18676
+ * > Para maiores informações, acesse o guia [Personalizando o Tema Padrão com Tokens CSS](https://po-ui.io/guides/theme-customization).
18677
+ *
18678
+ * | Propriedade | Descrição | Valor Padrão |
18679
+ * |----------------------------------------|-------------------------------------------------------|---------------------------------------------------|
18680
+ * | **TEXT SUPPORT** | | |
18681
+ * | `--font-family-text-support` | Família tipográfica usada no texto de suporte | `var(--font-family-theme)` |
18682
+ * | `--text-color-text-support` | Cor da fonte no texto de suporte | `var(--color-neutral-dark-90)` |
18683
+ * | **UPLOAD CONTENT** | | |
18684
+ * | `--background-color-content`   | Cor de fundo | `var(--color-neutral-light-10)` |
18685
+ * | `--border-color-content` | Cor da borda | `var(--color-neutral-light-20)` |
18686
+ * | `--border-radius-content` | Contém o valor do raio dos cantos do elemento | `var(--border-radius-md)` |
18687
+ * | `--text-color-file-name` | Cor do texto do nome do arquivo | `var(--color-neutral-dark-90)` |
18688
+ * | `--font-family-file-name` | Família tipográfica usada no texto do arquivo | `var(--font-family-theme)` |
18689
+ * | `--text-color-info-bar` | Cor do texto de informação | `var(--color-neutral-mid-60)` |
18690
+ * | `--font-family-info-bar` | Família tipográfica usada no texto de informação | `var(--font-family-theme)` |
18691
+ * | **ERROR STATE** | | |
18692
+ * | `--background-color-content-error` | Cor de fundo do container de erro | `var(--color-neutral-light-00)` |
18693
+ * | `--border-color-content-error` | Cor da borda do container de erro | `var(--color-feedback-negative-base)` |
18694
+ * | `--text-color-error` | Cor do texto do container de erro | `var(--color-feedback-negative-dark)` |
18695
+ * | `--color-icon-error` | Cor do ícone no estado de erro | `var(--color-feedback-negative-base)` |
18696
+ * | `--font-family-error` | Família tipográfica usada no texto de erro | `var(--font-family-theme)` |
18697
+ * | **UPLOADED STATE** | | |
18698
+ * | `--background-color-content-uploaded` | Cor de fundo do container com status de enviado | `var(--color-neutral-light-00)` |
18699
+ * | `--border-color-content-uploaded` | Cor da borda do container com status de enviado | `var(--color-neutral-light-20)` |
18700
+ * | **INTERACTIVE STATE** | | |
18701
+ * | `--text-color-file-name-interactive` | Cor do texto do nome do arquivo quando interativo | `var(--color-action-default)` |
18702
+ * | **THUMBNAIL** | | |
18703
+ * | `--color-icon-thumbnail` | Cor do ícone na thumbnail | `var(--color-action-default)` |
18704
+ * | `--border-width-thumbnail` | Tamanho da fonte na thumbnail | `var(--border-width-sm)` |
18705
+ * | `--border-radius-thumbnail` | Contém o valor do raio dos cantos na thumbnail | `var(--border-radius-md)` |
18706
+ * | `--background-color-thumbnail` | Cor de fundo na thumbnail | `var(--color-neutral-light-05)` |
18707
+ * | **Focused** | | |
18708
+ * | `--outline-color-focused` | Cor do outline do estado de focus | `var(--color-action-focus)` |
18651
18709
  */
18652
18710
  declare abstract class PoUploadBaseComponent implements ControlValueAccessor, Validator {
18653
18711
  protected uploadService: PoUploadService;
@@ -18750,6 +18808,19 @@ declare abstract class PoUploadBaseComponent implements ControlValueAccessor, Va
18750
18808
  * @default `false`
18751
18809
  */
18752
18810
  optional: boolean;
18811
+ /**
18812
+ * @optional
18813
+ *
18814
+ * @description
18815
+ *
18816
+ * Exibe a pré-visualização de imagens ao anexá-las.
18817
+ *
18818
+ * > Propriedade funciona apenas em arquivos de formato de imagem (`.png`, `.jpg`, `.jpeg` e `.gif`).
18819
+ * Será ignorada em outros tipos de arquivo.
18820
+ *
18821
+ * @default `true`
18822
+ */
18823
+ showThumbnail: boolean;
18753
18824
  /** Objeto que contém os cabeçalhos que será enviado na requisição dos arquivos. */
18754
18825
  headers: {
18755
18826
  [name: string]: string | Array<string>;
@@ -18848,6 +18919,38 @@ declare abstract class PoUploadBaseComponent implements ControlValueAccessor, Va
18848
18919
  * ```
18849
18920
  */
18850
18921
  customAction?: PoProgressAction;
18922
+ /**
18923
+ * @optional
18924
+ *
18925
+ * @description
18926
+ *
18927
+ * 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
18928
+ * do modal.
18929
+ *
18930
+ * A ação deve implementar a interface **PoModalAction**, permitindo configurar propriedades como:
18931
+ * - `label`: Texto do botão.
18932
+ * - `action`: Ícone a ser exibido no botão.
18933
+ * - `danger`: Define a propriedade `p-danger` do botão.
18934
+ * - `disabled`: Indica se o botão deve estar desabilitado.
18935
+ * - `visible`: Indica se o botão deve estar visível.
18936
+ *
18937
+ * **Exemplo de uso:**
18938
+ *
18939
+ * ```html
18940
+ * <po-upload
18941
+ * [p-custom-modal-actions]="customActions"
18942
+ * </po-upload>
18943
+ * ```
18944
+ *
18945
+ * ```typescript
18946
+ * customActions: Array<PoModalAction> = [
18947
+ * { label: 'Confirmar', action: this.confirmModal.bind(this) },
18948
+ * { label: 'Cancelar', action: this.closeModal.bind(this) }
18949
+ *];
18950
+ *
18951
+ * ```
18952
+ */
18953
+ customModalActions?: Array<PoModalAction>;
18851
18954
  /**
18852
18955
  * @optional
18853
18956
  *
@@ -18918,6 +19021,33 @@ declare abstract class PoUploadBaseComponent implements ControlValueAccessor, Va
18918
19021
  * ```
18919
19022
  */
18920
19023
  onUpload: EventEmitter<any>;
19024
+ /**
19025
+ * @optional
19026
+ *
19027
+ * @description
19028
+ *
19029
+ * Evento será disparado ao clicar no ícone de fechar.
19030
+ * > Por parâmetro será passado o objeto do arquivo.
19031
+ */
19032
+ onCancel: EventEmitter<any>;
19033
+ /**
19034
+ * @optional
19035
+ *
19036
+ * @description
19037
+ *
19038
+ * Evento será disparado ao abrir o modal de pré-visualização.
19039
+ * > Por parâmetro será passado o objeto do arquivo.
19040
+ */
19041
+ onOpenModalPreview: EventEmitter<any>;
19042
+ /**
19043
+ * @optional
19044
+ *
19045
+ * @description
19046
+ *
19047
+ * Evento será disparado ao clicar no ícone de remover.
19048
+ * > Por parâmetro será passado o objeto do arquivo.
19049
+ */
19050
+ onRemove: EventEmitter<any>;
18921
19051
  /**
18922
19052
  * @optional
18923
19053
  *
@@ -19169,10 +19299,10 @@ declare abstract class PoUploadBaseComponent implements ControlValueAccessor, Va
19169
19299
  private setAllowedExtensions;
19170
19300
  private initRestrictions;
19171
19301
  private updateExistsFileInFiles;
19172
- abstract sendFeedback(): void;
19302
+ abstract sendFeedback(file?: any): void;
19173
19303
  abstract setDirectoryAttribute(value: boolean): any;
19174
19304
  static ɵfac: i0.ɵɵFactoryDeclaration<PoUploadBaseComponent, never>;
19175
- 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>;
19305
+ 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>;
19176
19306
  static ngAcceptInputType_appendBox: any;
19177
19307
  static ngAcceptInputType_autoFocus: any;
19178
19308
  static ngAcceptInputType_disabledRemoveFile: any;
@@ -19208,14 +19338,20 @@ declare abstract class PoUploadBaseComponent implements ControlValueAccessor, Va
19208
19338
  * <file name="sample-po-upload-download/sample-po-upload-download.component.html"> </file>
19209
19339
  * <file name="sample-po-upload-download/sample-po-upload-download.component.ts"> </file>
19210
19340
  * </example>
19341
+ *
19342
+ * <example name="po-upload-preview" title="PO Upload - with Preview">
19343
+ * <file name="sample-po-upload-preview/sample-po-upload-preview.component.html"> </file>
19344
+ * <file name="sample-po-upload-preview/sample-po-upload-preview.component.ts"> </file>
19345
+ * </example>
19211
19346
  */
19212
- declare class PoUploadComponent extends PoUploadBaseComponent implements AfterViewInit {
19347
+ declare class PoUploadComponent extends PoUploadBaseComponent implements AfterViewInit, OnChanges {
19213
19348
  renderer: Renderer2;
19214
19349
  private i18nPipe;
19215
19350
  private notification;
19216
19351
  private inputFile;
19217
19352
  private poUploadDragDropComponent;
19218
19353
  uploadButton: PoButtonComponent;
19354
+ modalComponent: PoModalComponent;
19219
19355
  id: string;
19220
19356
  infoByUploadStatus: {
19221
19357
  [key: string]: {
@@ -19228,6 +19364,12 @@ declare class PoUploadComponent extends PoUploadBaseComponent implements AfterVi
19228
19364
  2: PoProgressStatus;
19229
19365
  };
19230
19366
  private calledByCleanInputValue;
19367
+ protected modalPrimaryAction: PoModalAction;
19368
+ protected modalSecondaryAction: PoModalAction;
19369
+ protected errorMessage: string;
19370
+ protected tooltipTitle: string;
19371
+ protected modalImageUrl: string;
19372
+ protected errorModalImage: boolean;
19231
19373
  constructor();
19232
19374
  get displayDragDrop(): boolean;
19233
19375
  get displaySendButton(): boolean;
@@ -19237,7 +19379,8 @@ declare class PoUploadComponent extends PoUploadBaseComponent implements AfterVi
19237
19379
  get hasFileNotUploaded(): boolean;
19238
19380
  get isDisabled(): boolean;
19239
19381
  get maxFiles(): number;
19240
- cancel(file: PoUploadFile): void;
19382
+ cancel(file: PoUploadFile, keydown?: KeyboardEvent): void;
19383
+ ngOnChanges(changes: SimpleChanges): void;
19241
19384
  ngAfterViewInit(): void;
19242
19385
  /** Método responsável por **limpar** o(s) arquivo(s) selecionado(s). */
19243
19386
  clear(): void;
@@ -19267,10 +19410,15 @@ declare class PoUploadComponent extends PoUploadBaseComponent implements AfterVi
19267
19410
  onFileChange(event: any): void;
19268
19411
  onFileChangeDragDrop(files: any): void;
19269
19412
  onKeyDown(event: KeyboardEvent): void;
19413
+ /**
19414
+ * Método responsável por fechar o modal.
19415
+ */
19416
+ closeModal(): void;
19417
+ openModal(file: PoUploadFile, keydown?: KeyboardEvent): void;
19270
19418
  removeFile(file: any): void;
19271
19419
  /** Método responsável por **abrir** a janela para seleção de arquivo(s). */
19272
19420
  selectFiles(): void;
19273
- sendFeedback(): void;
19421
+ sendFeedback(file?: any): void;
19274
19422
  /** Método responsável por **enviar** o(s) arquivo(s) selecionado(s). */
19275
19423
  sendFiles(): void;
19276
19424
  setDirectoryAttribute(canHandleDirectory: boolean): void;
@@ -19316,11 +19464,16 @@ declare class PoUploadComponent extends PoUploadBaseComponent implements AfterVi
19316
19464
  hideAdditionalHelp: boolean;
19317
19465
  helperSettings?: any;
19318
19466
  };
19467
+ protected actionIsDisabled(action: any): any;
19468
+ protected isActionVisible(action: any): boolean;
19469
+ protected onImageError(file: any): void;
19470
+ protected showTooltipText(e: MouseEvent, text: string): void;
19319
19471
  private cleanInputValue;
19320
19472
  private isAdditionalHelpEventTriggered;
19321
19473
  private isUploadButtonFocused;
19322
19474
  private responseHandler;
19323
19475
  private setPipeArguments;
19476
+ private setPrimaryActionModal;
19324
19477
  private stopUploadHandler;
19325
19478
  private updateFiles;
19326
19479
  private updateModel;
@@ -20965,7 +21118,7 @@ declare class PoServicesModule {
20965
21118
  */
20966
21119
  declare class PoFieldModule {
20967
21120
  static ɵfac: i0.ɵɵFactoryDeclaration<PoFieldModule, never>;
20968
- static ɵmod: i0.ɵɵNgModuleDeclaration<PoFieldModule, [typeof PoComboComponent, typeof PoComboOptionTemplateDirective, typeof PoMultiselectOptionTemplateDirective, typeof PoDecimalComponent, typeof PoDatepickerRangeComponent, typeof PoEmailComponent, typeof PoInputComponent, typeof PoLoginComponent, typeof PoLookupComponent, typeof PoLookupModalComponent, typeof PoMultiselectComponent, typeof PoMultiselectDropdownComponent, typeof PoNumberComponent, typeof PoPasswordComponent, typeof PoRichTextBodyComponent, typeof PoRichTextComponent, typeof PoRichTextImageModalComponent, typeof PoRichTextLinkModalComponent, typeof PoRichTextToolbarComponent, typeof PoSelectComponent, typeof PoTextareaComponent, typeof PoUploadComponent, typeof PoUploadDragDropComponent, typeof PoUploadDragDropDirective, typeof PoUploadDragDropAreaOverlayComponent, typeof PoUploadDragDropAreaComponent, typeof PoUploadFileRestrictionsComponent, typeof PoUrlComponent], [typeof i2.CommonModule, typeof i3$1.FormsModule, typeof i3$1.FormsModule, typeof i3.OverlayModule, typeof PoButtonGroupModule, typeof PoButtonModule, typeof PoCleanModule, typeof PoCalendarModule, typeof PoCheckboxGroupModule, typeof PoRadioGroupModule, typeof PoContainerModule, typeof PoDatepickerModule, typeof PoDisclaimerGroupModule, typeof PoDisclaimerModule, typeof PoFieldContainerModule, typeof PoLoadingModule, typeof PoModalModule, typeof PoProgressModule, typeof PoServicesModule, typeof PoTableModule, typeof PoTooltipModule, typeof PoIconModule, typeof PoCheckboxModule, typeof PoRadioModule, typeof PoLabelModule, typeof PoListBoxModule, typeof PoSwitchModule, typeof PoTagModule, typeof PoHelperModule], [typeof PoCheckboxGroupModule, typeof PoRadioGroupModule, typeof PoCleanModule, typeof PoDatepickerModule, typeof PoComboComponent, typeof PoComboOptionTemplateDirective, typeof PoMultiselectOptionTemplateDirective, typeof PoDecimalComponent, typeof PoDatepickerRangeComponent, typeof PoEmailComponent, typeof PoFieldContainerModule, typeof PoInputComponent, typeof PoLoginComponent, typeof PoLookupComponent, typeof PoLookupModalComponent, typeof PoMultiselectComponent, typeof PoNumberComponent, typeof PoPasswordComponent, typeof PoRichTextComponent, typeof PoSelectComponent, typeof PoTextareaComponent, typeof PoUploadComponent, typeof PoUrlComponent, typeof PoCheckboxModule, typeof PoRadioModule, typeof PoLabelModule, typeof PoSwitchModule, typeof PoTagModule]>;
21121
+ static ɵmod: i0.ɵɵNgModuleDeclaration<PoFieldModule, [typeof PoComboComponent, typeof PoComboOptionTemplateDirective, typeof PoMultiselectOptionTemplateDirective, typeof PoDecimalComponent, typeof PoDatepickerRangeComponent, typeof PoEmailComponent, typeof PoInputComponent, typeof PoLoginComponent, typeof PoLookupComponent, typeof PoLookupModalComponent, typeof PoMultiselectComponent, typeof PoMultiselectDropdownComponent, typeof PoNumberComponent, typeof PoPasswordComponent, typeof PoRichTextBodyComponent, typeof PoRichTextComponent, typeof PoRichTextImageModalComponent, typeof PoRichTextLinkModalComponent, typeof PoRichTextToolbarComponent, typeof PoSelectComponent, typeof PoTextareaComponent, typeof PoUploadComponent, typeof PoUploadDragDropComponent, typeof PoUploadDragDropDirective, typeof PoUploadDragDropAreaOverlayComponent, typeof PoUploadDragDropAreaComponent, typeof PoUploadFileRestrictionsComponent, typeof PoUrlComponent], [typeof i2.CommonModule, typeof i3$1.FormsModule, typeof i3$1.FormsModule, typeof i3.OverlayModule, typeof PoButtonGroupModule, typeof PoButtonModule, typeof PoCleanModule, typeof PoCalendarModule, typeof PoCheckboxGroupModule, typeof PoRadioGroupModule, typeof PoContainerModule, typeof PoDatepickerModule, typeof PoDisclaimerGroupModule, typeof PoDisclaimerModule, typeof PoFieldContainerModule, typeof PoLoadingModule, typeof PoModalModule, typeof PoProgressModule, typeof PoServicesModule, typeof PoTableModule, typeof PoTooltipModule, typeof PoIconModule, typeof PoCheckboxModule, typeof PoRadioModule, typeof PoLabelModule, typeof PoLinkModule, typeof PoListBoxModule, typeof PoSwitchModule, typeof PoTagModule, typeof PoHelperModule], [typeof PoCheckboxGroupModule, typeof PoRadioGroupModule, typeof PoCleanModule, typeof PoDatepickerModule, typeof PoComboComponent, typeof PoComboOptionTemplateDirective, typeof PoMultiselectOptionTemplateDirective, typeof PoDecimalComponent, typeof PoDatepickerRangeComponent, typeof PoEmailComponent, typeof PoFieldContainerModule, typeof PoInputComponent, typeof PoLoginComponent, typeof PoLookupComponent, typeof PoLookupModalComponent, typeof PoMultiselectComponent, typeof PoNumberComponent, typeof PoPasswordComponent, typeof PoRichTextComponent, typeof PoSelectComponent, typeof PoTextareaComponent, typeof PoUploadComponent, typeof PoUrlComponent, typeof PoCheckboxModule, typeof PoRadioModule, typeof PoLabelModule, typeof PoSwitchModule, typeof PoTagModule]>;
20969
21122
  static ɵinj: i0.ɵɵInjectorDeclaration<PoFieldModule>;
20970
21123
  }
20971
21124
 
@@ -21562,15 +21715,15 @@ interface PoDynamicFormField extends PoDynamicField {
21562
21715
  placeholder?: string;
21563
21716
  /**
21564
21717
  * Define a localidade a ser utilizada no componente.
21565
- * Por padrão o valor será configurado segundo a o módulo [`I18n`](documentation/po-i18n)
21718
+ * Por padrão o valor será configurado segundo o módulo [`I18n`](documentation/po-i18n)
21566
21719
  *
21567
21720
  * Exemplo de utilização:
21568
- * ``
21721
+ * ```
21569
21722
  * [
21570
21723
  * { property: 'birthday', locale: 'en', type: 'date' },
21571
21724
  * { property: 'wage', locale: 'ru', type: 'currency' }
21572
21725
  * ];
21573
- * ``
21726
+ * ```
21574
21727
  *
21575
21728
  * > Para ver quais linguagens suportadas acesse [`I18n`](documentation/po-i18n)
21576
21729
  * > A propriedade será repassada para os componentes que suportam a mesma.
@@ -21844,6 +21997,14 @@ interface PoDynamicFormField extends PoDynamicField {
21844
21997
  * - Não possuir `p-help` e/ou `p-label`.
21845
21998
  */
21846
21999
  showRequired?: boolean;
22000
+ /**
22001
+ * Exibe a pré-visualização de imagens ao anexá-las.
22002
+ *
22003
+ * > Propriedade funciona apenas em arquivos de formato de imagem (`.png`, `.jpg`, `.jpeg` e `.gif`).
22004
+ *
22005
+ * **Componente compatível**: `po-upload`
22006
+ */
22007
+ showThumbnail?: boolean;
21847
22008
  /**
21848
22009
  * Define uma ação personalizada no componente `po-upload`, adicionando um botão no canto inferior direito
21849
22010
  * de cada barra de progresso associada aos arquivos enviados ou em envio.
@@ -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.
@@ -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';
@@ -26,6 +27,44 @@ export declare const poUploadLiteralsDefault: {
26
27
  * - Função de sucesso que será disparada quando os arquivos forem enviados com sucesso.
27
28
  * - Função de erro que será disparada quando houver erro no envio dos arquivos.
28
29
  * - Permite habilitar uma área onde os arquivos podem ser arrastados.
30
+ *
31
+ * #### Tokens customizáveis
32
+ *
33
+ * É possível alterar o estilo do componente usando os seguintes tokens (CSS):
34
+ *
35
+ * > Para maiores informações, acesse o guia [Personalizando o Tema Padrão com Tokens CSS](https://po-ui.io/guides/theme-customization).
36
+ *
37
+ * | Propriedade | Descrição | Valor Padrão |
38
+ * |----------------------------------------|-------------------------------------------------------|---------------------------------------------------|
39
+ * | **TEXT SUPPORT** | | |
40
+ * | `--font-family-text-support` | Família tipográfica usada no texto de suporte | `var(--font-family-theme)` |
41
+ * | `--text-color-text-support` | Cor da fonte no texto de suporte | `var(--color-neutral-dark-90)` |
42
+ * | **UPLOAD CONTENT** | | |
43
+ * | `--background-color-content` &nbsp; | Cor de fundo | `var(--color-neutral-light-10)` |
44
+ * | `--border-color-content` | Cor da borda | `var(--color-neutral-light-20)` |
45
+ * | `--border-radius-content` | Contém o valor do raio dos cantos do elemento | `var(--border-radius-md)` |
46
+ * | `--text-color-file-name` | Cor do texto do nome do arquivo | `var(--color-neutral-dark-90)` |
47
+ * | `--font-family-file-name` | Família tipográfica usada no texto do arquivo | `var(--font-family-theme)` |
48
+ * | `--text-color-info-bar` | Cor do texto de informação | `var(--color-neutral-mid-60)` |
49
+ * | `--font-family-info-bar` | Família tipográfica usada no texto de informação | `var(--font-family-theme)` |
50
+ * | **ERROR STATE** | | |
51
+ * | `--background-color-content-error` | Cor de fundo do container de erro | `var(--color-neutral-light-00)` |
52
+ * | `--border-color-content-error` | Cor da borda do container de erro | `var(--color-feedback-negative-base)` |
53
+ * | `--text-color-error` | Cor do texto do container de erro | `var(--color-feedback-negative-dark)` |
54
+ * | `--color-icon-error` | Cor do ícone no estado de erro | `var(--color-feedback-negative-base)` |
55
+ * | `--font-family-error` | Família tipográfica usada no texto de erro | `var(--font-family-theme)` |
56
+ * | **UPLOADED STATE** | | |
57
+ * | `--background-color-content-uploaded` | Cor de fundo do container com status de enviado | `var(--color-neutral-light-00)` |
58
+ * | `--border-color-content-uploaded` | Cor da borda do container com status de enviado | `var(--color-neutral-light-20)` |
59
+ * | **INTERACTIVE STATE** | | |
60
+ * | `--text-color-file-name-interactive` | Cor do texto do nome do arquivo quando interativo | `var(--color-action-default)` |
61
+ * | **THUMBNAIL** | | |
62
+ * | `--color-icon-thumbnail` | Cor do ícone na thumbnail | `var(--color-action-default)` |
63
+ * | `--border-width-thumbnail` | Tamanho da fonte na thumbnail | `var(--border-width-sm)` |
64
+ * | `--border-radius-thumbnail` | Contém o valor do raio dos cantos na thumbnail | `var(--border-radius-md)` |
65
+ * | `--background-color-thumbnail` | Cor de fundo na thumbnail | `var(--color-neutral-light-05)` |
66
+ * | **Focused** | | |
67
+ * | `--outline-color-focused` | Cor do outline do estado de focus | `var(--color-action-focus)` |
29
68
  */
30
69
  export declare abstract class PoUploadBaseComponent implements ControlValueAccessor, Validator {
31
70
  protected uploadService: PoUploadService;
@@ -128,6 +167,19 @@ export declare abstract class PoUploadBaseComponent implements ControlValueAcces
128
167
  * @default `false`
129
168
  */
130
169
  optional: boolean;
170
+ /**
171
+ * @optional
172
+ *
173
+ * @description
174
+ *
175
+ * Exibe a pré-visualização de imagens ao anexá-las.
176
+ *
177
+ * > Propriedade funciona apenas em arquivos de formato de imagem (`.png`, `.jpg`, `.jpeg` e `.gif`).
178
+ * Será ignorada em outros tipos de arquivo.
179
+ *
180
+ * @default `true`
181
+ */
182
+ showThumbnail: boolean;
131
183
  /** Objeto que contém os cabeçalhos que será enviado na requisição dos arquivos. */
132
184
  headers: {
133
185
  [name: string]: string | Array<string>;
@@ -226,6 +278,38 @@ export declare abstract class PoUploadBaseComponent implements ControlValueAcces
226
278
  * ```
227
279
  */
228
280
  customAction?: PoProgressAction;
281
+ /**
282
+ * @optional
283
+ *
284
+ * @description
285
+ *
286
+ * 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
287
+ * do modal.
288
+ *
289
+ * A ação deve implementar a interface **PoModalAction**, permitindo configurar propriedades como:
290
+ * - `label`: Texto do botão.
291
+ * - `action`: Ícone a ser exibido no botão.
292
+ * - `danger`: Define a propriedade `p-danger` do botão.
293
+ * - `disabled`: Indica se o botão deve estar desabilitado.
294
+ * - `visible`: Indica se o botão deve estar visível.
295
+ *
296
+ * **Exemplo de uso:**
297
+ *
298
+ * ```html
299
+ * <po-upload
300
+ * [p-custom-modal-actions]="customActions"
301
+ * </po-upload>
302
+ * ```
303
+ *
304
+ * ```typescript
305
+ * customActions: Array<PoModalAction> = [
306
+ * { label: 'Confirmar', action: this.confirmModal.bind(this) },
307
+ * { label: 'Cancelar', action: this.closeModal.bind(this) }
308
+ *];
309
+ *
310
+ * ```
311
+ */
312
+ customModalActions?: Array<PoModalAction>;
229
313
  /**
230
314
  * @optional
231
315
  *
@@ -296,6 +380,33 @@ export declare abstract class PoUploadBaseComponent implements ControlValueAcces
296
380
  * ```
297
381
  */
298
382
  onUpload: EventEmitter<any>;
383
+ /**
384
+ * @optional
385
+ *
386
+ * @description
387
+ *
388
+ * Evento será disparado ao clicar no ícone de fechar.
389
+ * > Por parâmetro será passado o objeto do arquivo.
390
+ */
391
+ onCancel: EventEmitter<any>;
392
+ /**
393
+ * @optional
394
+ *
395
+ * @description
396
+ *
397
+ * Evento será disparado ao abrir o modal de pré-visualização.
398
+ * > Por parâmetro será passado o objeto do arquivo.
399
+ */
400
+ onOpenModalPreview: EventEmitter<any>;
401
+ /**
402
+ * @optional
403
+ *
404
+ * @description
405
+ *
406
+ * Evento será disparado ao clicar no ícone de remover.
407
+ * > Por parâmetro será passado o objeto do arquivo.
408
+ */
409
+ onRemove: EventEmitter<any>;
299
410
  /**
300
411
  * @optional
301
412
  *
@@ -547,6 +658,6 @@ export declare abstract class PoUploadBaseComponent implements ControlValueAcces
547
658
  private setAllowedExtensions;
548
659
  private initRestrictions;
549
660
  private updateExistsFileInFiles;
550
- abstract sendFeedback(): void;
661
+ abstract sendFeedback(file?: any): void;
551
662
  abstract setDirectoryAttribute(value: boolean): any;
552
663
  }
@@ -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;