ngx-vector-components 6.16.0 → 6.17.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.
@@ -52,8 +52,13 @@ export declare class InputFileComponent {
52
52
  acceptExtensions: InputFileAcceptExtension[];
53
53
  /** Tamanho máximo por arquivo em **MB** (ex: `5` = 5MB). `null` = sem limite. Convertido internamente pra bytes. */
54
54
  maxFileSize: number | null;
55
- /** Quantidade máxima de arquivos no modo multiple (1 à 10). Ignorado em single (sempre 1). Default: `10`. */
56
- maxFileNumberUploaded: number;
55
+ private _maxFileNumberUploaded;
56
+ /**
57
+ * Quantidade máxima de arquivos no modo multiple (1 à 10). Ignorado em single (sempre 1). Default: `10`.
58
+ * Valores acima de {@link MAX_FILE_NUMBER_UPLOADED} são reduzidos ao teto do componente e geram um toast de aviso.
59
+ */
60
+ set maxFileNumberUploaded(value: number);
61
+ get maxFileNumberUploaded(): number;
57
62
  /** Renderiza o botão "Enviar" ao lado de "Anexar". Default: `false`. */
58
63
  uploadButtonSendEnabled: boolean;
59
64
  /** Renderiza o botão "Cancelar" (limpa todos os arquivos ao clicar). Default: `false`. */
@@ -81,6 +86,7 @@ export declare class InputFileComponent {
81
86
  /** Multiple: arquivos originais por índice + objectURLs por índice, paralelo ao FormArray. */
82
87
  private _multipleFiles;
83
88
  private _multiplePreviewObjectUrls;
89
+ private readonly messageService;
84
90
  constructor(sanitizer: DomSanitizer);
85
91
  private _uploadButtonAttach;
86
92
  /** Customiza o botão "Anexar" (`label`, `type`, `leftIcon`, `rightIcon`). */
@@ -102,6 +108,10 @@ export declare class InputFileComponent {
102
108
  get canSend(): boolean;
103
109
  /** Limite atingido — desabilita Attach em modo multiple. */
104
110
  get isAttachAtLimit(): boolean;
111
+ /** Tooltip da badge do arquivo, no formato `nome-do-arquivo.png (1.2MB)`. */
112
+ fileTooltip(control: UploadSingleFormGroup): string;
113
+ /** Bytes → MB. Usa 2 casas abaixo de 0.1MB para arquivos pequenos não virarem `0.0MB`. */
114
+ private formatFileSizeMb;
105
115
  get acceptString(): string;
106
116
  get maxFileSizeBytes(): number;
107
117
  /** Passado para o p-fileUpload — 1 em modo single, o input em modo multiple. */
@@ -127,6 +137,12 @@ export declare class InputFileComponent {
127
137
  get previewUrl(): string;
128
138
  get safePreviewUrl(): SafeResourceUrl;
129
139
  private triggerAttach;
140
+ /** Descarta os arquivos que excedem `maxFileSize` e notifica o usuário. */
141
+ private rejectOversizedFiles;
142
+ private notifyOversizedFiles;
143
+ private rejectFilesOverLimit;
144
+ private notifyFileNumberExceeded;
145
+ private notifyConfiguredLimitExceeded;
130
146
  private buildValueFromFile;
131
147
  private toFriendlyName;
132
148
  private extractExtension;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-vector-components",
3
- "version": "6.16.0",
3
+ "version": "6.17.0",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "^19.2.0",
6
6
  "@angular/cdk": "^19.2.0",