@po-ui/ng-components 20.5.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/fesm2022/po-ui-ng-components.mjs +400 -74
- package/fesm2022/po-ui-ng-components.mjs.map +1 -1
- package/index.d.ts +167 -6
- package/lib/components/po-dynamic/po-dynamic-form/interfaces/po-dynamic-form-field.interface.d.ts +8 -0
- package/lib/components/po-field/po-upload/interfaces/po-upload-literals.interface.d.ts +14 -0
- package/lib/components/po-field/po-upload/po-upload-base.component.d.ts +112 -1
- package/lib/components/po-field/po-upload/po-upload-file.d.ts +6 -0
- package/lib/components/po-field/po-upload/po-upload.component.d.ts +28 -4
- package/package.json +4 -4
- package/po-ui-ng-components-20.6.0.tgz +0 -0
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-update/v14/index.js +1 -1
- package/schematics/ng-update/v15/index.js +1 -1
- package/schematics/ng-update/v16/index.js +1 -1
- package/schematics/ng-update/v17/index.js +1 -1
- package/schematics/ng-update/v18/index.js +2 -2
- package/schematics/ng-update/v19/index.js +2 -2
- package/schematics/ng-update/v2/index.js +1 -1
- package/schematics/ng-update/v20/index.js +2 -2
- package/schematics/ng-update/v3/index.js +1 -1
- package/schematics/ng-update/v4/index.js +1 -1
- package/schematics/ng-update/v5/index.js +1 -1
- package/schematics/ng-update/v6/index.js +1 -1
- package/po-ui-ng-components-20.5.0.tgz +0 -0
package/index.d.ts
CHANGED
|
@@ -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
|
|
|
@@ -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.
|
package/lib/components/po-dynamic/po-dynamic-form/interfaces/po-dynamic-form-field.interface.d.ts
CHANGED
|
@@ -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` | 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;
|
|
@@ -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';
|
|
@@ -33,14 +34,20 @@ import { PoUploadStatus } from './po-upload-status.enum';
|
|
|
33
34
|
* <file name="sample-po-upload-download/sample-po-upload-download.component.html"> </file>
|
|
34
35
|
* <file name="sample-po-upload-download/sample-po-upload-download.component.ts"> </file>
|
|
35
36
|
* </example>
|
|
37
|
+
*
|
|
38
|
+
* <example name="po-upload-preview" title="PO Upload - with Preview">
|
|
39
|
+
* <file name="sample-po-upload-preview/sample-po-upload-preview.component.html"> </file>
|
|
40
|
+
* <file name="sample-po-upload-preview/sample-po-upload-preview.component.ts"> </file>
|
|
41
|
+
* </example>
|
|
36
42
|
*/
|
|
37
|
-
export declare class PoUploadComponent extends PoUploadBaseComponent implements AfterViewInit {
|
|
43
|
+
export declare class PoUploadComponent extends PoUploadBaseComponent implements AfterViewInit, OnChanges {
|
|
38
44
|
renderer: Renderer2;
|
|
39
45
|
private i18nPipe;
|
|
40
46
|
private notification;
|
|
41
47
|
private inputFile;
|
|
42
48
|
private poUploadDragDropComponent;
|
|
43
49
|
uploadButton: PoButtonComponent;
|
|
50
|
+
modalComponent: PoModalComponent;
|
|
44
51
|
id: string;
|
|
45
52
|
infoByUploadStatus: {
|
|
46
53
|
[key: string]: {
|
|
@@ -53,6 +60,12 @@ export declare class PoUploadComponent extends PoUploadBaseComponent implements
|
|
|
53
60
|
2: PoProgressStatus;
|
|
54
61
|
};
|
|
55
62
|
private calledByCleanInputValue;
|
|
63
|
+
protected modalPrimaryAction: PoModalAction;
|
|
64
|
+
protected modalSecondaryAction: PoModalAction;
|
|
65
|
+
protected errorMessage: string;
|
|
66
|
+
protected tooltipTitle: string;
|
|
67
|
+
protected modalImageUrl: string;
|
|
68
|
+
protected errorModalImage: boolean;
|
|
56
69
|
constructor();
|
|
57
70
|
get displayDragDrop(): boolean;
|
|
58
71
|
get displaySendButton(): boolean;
|
|
@@ -62,7 +75,8 @@ export declare class PoUploadComponent extends PoUploadBaseComponent implements
|
|
|
62
75
|
get hasFileNotUploaded(): boolean;
|
|
63
76
|
get isDisabled(): boolean;
|
|
64
77
|
get maxFiles(): number;
|
|
65
|
-
cancel(file: PoUploadFile): void;
|
|
78
|
+
cancel(file: PoUploadFile, keydown?: KeyboardEvent): void;
|
|
79
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
66
80
|
ngAfterViewInit(): void;
|
|
67
81
|
/** Método responsável por **limpar** o(s) arquivo(s) selecionado(s). */
|
|
68
82
|
clear(): void;
|
|
@@ -92,10 +106,15 @@ export declare class PoUploadComponent extends PoUploadBaseComponent implements
|
|
|
92
106
|
onFileChange(event: any): void;
|
|
93
107
|
onFileChangeDragDrop(files: any): void;
|
|
94
108
|
onKeyDown(event: KeyboardEvent): void;
|
|
109
|
+
/**
|
|
110
|
+
* Método responsável por fechar o modal.
|
|
111
|
+
*/
|
|
112
|
+
closeModal(): void;
|
|
113
|
+
openModal(file: PoUploadFile, keydown?: KeyboardEvent): void;
|
|
95
114
|
removeFile(file: any): void;
|
|
96
115
|
/** Método responsável por **abrir** a janela para seleção de arquivo(s). */
|
|
97
116
|
selectFiles(): void;
|
|
98
|
-
sendFeedback(): void;
|
|
117
|
+
sendFeedback(file?: any): void;
|
|
99
118
|
/** Método responsável por **enviar** o(s) arquivo(s) selecionado(s). */
|
|
100
119
|
sendFiles(): void;
|
|
101
120
|
setDirectoryAttribute(canHandleDirectory: boolean): void;
|
|
@@ -141,11 +160,16 @@ export declare class PoUploadComponent extends PoUploadBaseComponent implements
|
|
|
141
160
|
hideAdditionalHelp: boolean;
|
|
142
161
|
helperSettings?: any;
|
|
143
162
|
};
|
|
163
|
+
protected actionIsDisabled(action: any): any;
|
|
164
|
+
protected isActionVisible(action: any): boolean;
|
|
165
|
+
protected onImageError(file: any): void;
|
|
166
|
+
protected showTooltipText(e: MouseEvent, text: string): void;
|
|
144
167
|
private cleanInputValue;
|
|
145
168
|
private isAdditionalHelpEventTriggered;
|
|
146
169
|
private isUploadButtonFocused;
|
|
147
170
|
private responseHandler;
|
|
148
171
|
private setPipeArguments;
|
|
172
|
+
private setPrimaryActionModal;
|
|
149
173
|
private stopUploadHandler;
|
|
150
174
|
private updateFiles;
|
|
151
175
|
private updateModel;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@po-ui/ng-components",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.6.0",
|
|
4
4
|
"description": "PO UI - Components",
|
|
5
5
|
"author": "PO UI",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@angular/cdk": "~20.0.3",
|
|
25
|
-
"@po-ui/style": "20.
|
|
26
|
-
"@po-ui/ng-schematics": "20.
|
|
25
|
+
"@po-ui/style": "20.6.0",
|
|
26
|
+
"@po-ui/ng-schematics": "20.6.0",
|
|
27
27
|
"echarts": "^5.6.0",
|
|
28
28
|
"tslib": "^2.3.0"
|
|
29
29
|
},
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@angular/platform-browser-dynamic": "^20",
|
|
39
39
|
"@angular/router": "^20",
|
|
40
40
|
"@angular-devkit/schematics": "^20",
|
|
41
|
-
"@po-ui/style": "20.
|
|
41
|
+
"@po-ui/style": "20.6.0",
|
|
42
42
|
"rxjs": "~7.8.1",
|
|
43
43
|
"zone.js": "~0.15.0"
|
|
44
44
|
},
|
|
Binary file
|
|
@@ -18,7 +18,7 @@ function default_1(options) {
|
|
|
18
18
|
}
|
|
19
19
|
function addPoPackageAndInstall() {
|
|
20
20
|
return (tree, context) => {
|
|
21
|
-
(0, package_config_1.addPackageToPackageJson)(tree, '@po-ui/ng-components', '20.
|
|
21
|
+
(0, package_config_1.addPackageToPackageJson)(tree, '@po-ui/ng-components', '20.6.0');
|
|
22
22
|
// install packages
|
|
23
23
|
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
24
24
|
};
|
|
@@ -6,7 +6,7 @@ const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
|
6
6
|
const package_config_1 = require("@po-ui/ng-schematics/package-config");
|
|
7
7
|
const changes_1 = require("./changes");
|
|
8
8
|
function default_1() {
|
|
9
|
-
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('20.
|
|
9
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('20.6.0', changes_1.updateDepedenciesVersion), postUpdate()]);
|
|
10
10
|
}
|
|
11
11
|
function postUpdate() {
|
|
12
12
|
return (_, context) => {
|
|
@@ -11,7 +11,7 @@ const changes_1 = require("./changes");
|
|
|
11
11
|
const httpClientModuleName = 'HttpClientModule';
|
|
12
12
|
const httpClientModuleSourcePath = '@angular/common/http';
|
|
13
13
|
function default_1() {
|
|
14
|
-
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('20.
|
|
14
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('20.6.0', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
|
|
15
15
|
}
|
|
16
16
|
function postUpdate() {
|
|
17
17
|
return (_, context) => {
|