@eui/components 17.3.5-snapshot-1716340702453 → 17.3.5

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.
@@ -233,6 +233,9 @@
233
233
  <li>
234
234
  <a href="#LETTER_FORMAT" title="packages/eui/packages/components/eui-datepicker/eui-datepicker.component.ts" ><b>LETTER_FORMAT</b>&nbsp;&nbsp;&nbsp;(packages/.../eui-datepicker.component.ts)</a>
235
235
  </li>
236
+ <li>
237
+ <a href="#maxFileSizeValidator" title="packages/eui/packages/components/eui-file-upload/utils/eui-file-upload.validators.ts" ><b>maxFileSizeValidator</b>&nbsp;&nbsp;&nbsp;(packages/.../eui-file-upload.validators.ts)</a>
238
+ </li>
236
239
  <li>
237
240
  <a href="#maxFilesValidator" title="packages/eui/packages/components/eui-file-upload/utils/eui-file-upload.validators.ts" ><b>maxFilesValidator</b>&nbsp;&nbsp;&nbsp;(packages/.../eui-file-upload.validators.ts)</a>
238
241
  </li>
@@ -392,6 +395,40 @@
392
395
  </tr>
393
396
 
394
397
 
398
+ </tbody>
399
+ </table>
400
+ <table class="table table-sm table-bordered">
401
+ <tbody>
402
+ <tr>
403
+ <td class="col-md-4">
404
+ <a name="maxFileSizeValidator"></a>
405
+ <span class="name">
406
+ <span ><b>maxFileSizeValidator</b></span>
407
+ <a href="#maxFileSizeValidator"><span class="icon ion-ios-link"></span></a>
408
+ </span>
409
+ </td>
410
+ </tr>
411
+ <tr>
412
+ <td class="col-md-4">
413
+ <i>Default value : </i><code>(maxFileSize: number): ValidatorFn &#x3D;&gt;
414
+ (control: AbstractControl): { maxFileSize: number, indexes: Array&lt;number&gt; } | null &#x3D;&gt; {
415
+ const fileIndexes &#x3D;[];
416
+ let maxFileExceeded &#x3D; false;
417
+ if (control.value) {
418
+ control.value.forEach((file: File, index: number) &#x3D;&gt; {
419
+ if (file.size &gt; maxFileSize * 1.024) {
420
+ fileIndexes.push(index);
421
+ maxFileExceeded &#x3D; true;
422
+ }
423
+ });
424
+ }
425
+
426
+ return control.value &amp;&amp; maxFileExceeded ? { maxFileSize, indexes: fileIndexes } : null;
427
+ }</code>
428
+ </td>
429
+ </tr>
430
+
431
+
395
432
  </tbody>
396
433
  </table>
397
434
  <table class="table table-sm table-bordered">