@eui/components 18.2.16-snapshot-1756456305763 → 18.2.16-snapshot-1756489547144

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.
Files changed (86) hide show
  1. package/docs/js/search/search_index.js +2 -2
  2. package/docs/miscellaneous/variables.html +499 -71
  3. package/docs/properties.html +1 -1
  4. package/esm2022/eui-file-upload/utils/eui-file-upload.validators.mjs +3 -2
  5. package/esm2022/eui-file-upload/utils/mime-types.mjs +292 -39
  6. package/eui-file-upload/utils/mime-types.d.ts.map +1 -1
  7. package/fesm2022/eui-components-eui-file-upload.mjs +293 -39
  8. package/fesm2022/eui-components-eui-file-upload.mjs.map +1 -1
  9. package/package.json +9 -9
  10. package/directives/package.json +0 -3
  11. package/eui-accordion/package.json +0 -3
  12. package/eui-alert/package.json +0 -3
  13. package/eui-autocomplete/package.json +0 -3
  14. package/eui-avatar/package.json +0 -3
  15. package/eui-badge/package.json +0 -3
  16. package/eui-block-content/package.json +0 -3
  17. package/eui-block-document/package.json +0 -3
  18. package/eui-breadcrumb/package.json +0 -3
  19. package/eui-button/package.json +0 -3
  20. package/eui-button-group/package.json +0 -3
  21. package/eui-button-v2/package.json +0 -3
  22. package/eui-card/package.json +0 -3
  23. package/eui-chip/package.json +0 -3
  24. package/eui-chip-list/package.json +0 -3
  25. package/eui-dashboard-button/package.json +0 -3
  26. package/eui-dashboard-card/package.json +0 -3
  27. package/eui-date-range-selector/package.json +0 -3
  28. package/eui-datepicker/package.json +0 -3
  29. package/eui-dialog/package.json +0 -3
  30. package/eui-dimmer/package.json +0 -3
  31. package/eui-disable-content/package.json +0 -3
  32. package/eui-discussion-thread/package.json +0 -3
  33. package/eui-dropdown/package.json +0 -3
  34. package/eui-feedback-message/package.json +0 -3
  35. package/eui-fieldset/package.json +0 -3
  36. package/eui-file-upload/package.json +0 -3
  37. package/eui-growl/package.json +0 -3
  38. package/eui-icon/package.json +0 -3
  39. package/eui-icon-button/package.json +0 -3
  40. package/eui-icon-button-expander/package.json +0 -3
  41. package/eui-icon-color/package.json +0 -3
  42. package/eui-icon-input/package.json +0 -3
  43. package/eui-icon-state/package.json +0 -3
  44. package/eui-icon-toggle/package.json +0 -3
  45. package/eui-input-checkbox/package.json +0 -3
  46. package/eui-input-group/package.json +0 -3
  47. package/eui-input-number/package.json +0 -3
  48. package/eui-input-radio/package.json +0 -3
  49. package/eui-input-text/package.json +0 -3
  50. package/eui-label/package.json +0 -3
  51. package/eui-language-selector/package.json +0 -3
  52. package/eui-list/package.json +0 -3
  53. package/eui-menu/package.json +0 -3
  54. package/eui-message-box/package.json +0 -3
  55. package/eui-navbar/package.json +0 -3
  56. package/eui-overlay/package.json +0 -3
  57. package/eui-page/package.json +0 -3
  58. package/eui-paginator/package.json +0 -3
  59. package/eui-popover/package.json +0 -3
  60. package/eui-progress-bar/package.json +0 -3
  61. package/eui-progress-circle/package.json +0 -3
  62. package/eui-select/package.json +0 -3
  63. package/eui-sidebar-menu/package.json +0 -3
  64. package/eui-skeleton/package.json +0 -3
  65. package/eui-slide-toggle/package.json +0 -3
  66. package/eui-split-button/package.json +0 -3
  67. package/eui-table/package.json +0 -3
  68. package/eui-table-v2/package.json +0 -3
  69. package/eui-tabs/package.json +0 -3
  70. package/eui-textarea/package.json +0 -3
  71. package/eui-timebar/package.json +0 -3
  72. package/eui-timeline/package.json +0 -3
  73. package/eui-timepicker/package.json +0 -3
  74. package/eui-tree/package.json +0 -3
  75. package/eui-tree-list/package.json +0 -3
  76. package/eui-user-profile/package.json +0 -3
  77. package/eui-wizard/package.json +0 -3
  78. package/externals/charts/package.json +0 -3
  79. package/externals/eui-editor/package.json +0 -3
  80. package/externals/helpers/package.json +0 -3
  81. package/externals/quill/package.json +0 -3
  82. package/externals/search/favourite-queries/package.json +0 -3
  83. package/layout/package.json +0 -3
  84. package/pipes/package.json +0 -3
  85. package/shared/package.json +0 -3
  86. package/validators/package.json +0 -3
@@ -194,6 +194,9 @@
194
194
  <li>
195
195
  <a href="#euiStartEndDateValidator" title="packages/components/eui-date-range-selector/eui-date-range-selector.validators.ts" ><b>euiStartEndDateValidator</b>&nbsp;&nbsp;&nbsp;(packages/.../eui-date-range-selector.validators.ts)</a>
196
196
  </li>
197
+ <li>
198
+ <a href="#extractZipFileList" title="packages/components/eui-file-upload/utils/mime-types.ts" ><b>extractZipFileList</b>&nbsp;&nbsp;&nbsp;(packages/.../mime-types.ts)</a>
199
+ </li>
197
200
  <li>
198
201
  <a href="#getFormat" title="packages/components/externals/quill/quill-editor.component.ts" ><b>getFormat</b>&nbsp;&nbsp;&nbsp;(packages/.../quill-editor.component.ts)</a>
199
202
  </li>
@@ -206,6 +209,18 @@
206
209
  <li>
207
210
  <a href="#getViewElement" title="packages/components/externals/helpers/get-view-element.helper.ts" ><b>getViewElement</b>&nbsp;&nbsp;&nbsp;(packages/.../get-view-element.helper.ts)</a>
208
211
  </li>
212
+ <li>
213
+ <a href="#identifyAsfFormat" title="packages/components/eui-file-upload/utils/mime-types.ts" ><b>identifyAsfFormat</b>&nbsp;&nbsp;&nbsp;(packages/.../mime-types.ts)</a>
214
+ </li>
215
+ <li>
216
+ <a href="#identifyHeifFormat" title="packages/components/eui-file-upload/utils/mime-types.ts" ><b>identifyHeifFormat</b>&nbsp;&nbsp;&nbsp;(packages/.../mime-types.ts)</a>
217
+ </li>
218
+ <li>
219
+ <a href="#identifyOggFormat" title="packages/components/eui-file-upload/utils/mime-types.ts" ><b>identifyOggFormat</b>&nbsp;&nbsp;&nbsp;(packages/.../mime-types.ts)</a>
220
+ </li>
221
+ <li>
222
+ <a href="#identifyZipBasedFormat" title="packages/components/eui-file-upload/utils/mime-types.ts" ><b>identifyZipBasedFormat</b>&nbsp;&nbsp;&nbsp;(packages/.../mime-types.ts)</a>
223
+ </li>
209
224
  <li>
210
225
  <a href="#initialState" title="packages/components/eui-card/services/ui-state.service.ts" ><b>initialState</b>&nbsp;&nbsp;&nbsp;(packages/.../ui-state.service.ts)</a>
211
226
  </li>
@@ -517,7 +532,8 @@
517
532
  const reader &#x3D; new FileReader();
518
533
  reader.onloadend &#x3D; (): void &#x3D;&gt; {
519
534
  const buffer &#x3D; reader.result as ArrayBuffer;
520
- const headerBytes &#x3D; new Uint8Array(buffer).slice(0, 8);
535
+ // Read more bytes to support complex MIME type detection (e.g., ASF format analysis)
536
+ const headerBytes &#x3D; new Uint8Array(buffer).slice(0, Math.min(1024, buffer.byteLength));
521
537
  const mime &#x3D; getMimeType(headerBytes);
522
538
  if (mimeTypes.includes(mime)) {
523
539
  subscriber.next(null);
@@ -1567,77 +1583,54 @@
1567
1583
  </tbody>
1568
1584
  </table>
1569
1585
  </section>
1570
- <h3>packages/components/externals/quill/quill-editor.component.ts</h3>
1586
+ <h3>packages/components/eui-file-upload/utils/mime-types.ts</h3>
1571
1587
  <section data-compodoc="block-properties">
1572
1588
  <h3></h3> <table class="table table-sm table-bordered">
1573
1589
  <tbody>
1574
1590
  <tr>
1575
1591
  <td class="col-md-4">
1576
- <a name="getFormat"></a>
1592
+ <a name="extractZipFileList"></a>
1577
1593
  <span class="name">
1578
- <span ><b>getFormat</b></span>
1579
- <a href="#getFormat"><span class="icon ion-ios-link"></span></a>
1594
+ <span ><b>extractZipFileList</b></span>
1595
+ <a href="#extractZipFileList"><span class="icon ion-ios-link"></span></a>
1580
1596
  </span>
1581
1597
  </td>
1582
1598
  </tr>
1583
1599
  <tr>
1584
1600
  <td class="col-md-4">
1585
- <i>Default value : </i><code>(format?: QuillFormat, configFormat?: QuillFormat): QuillFormat &#x3D;&gt; {
1586
- const passedFormat &#x3D; format || configFormat;
1587
- return passedFormat || &#x27;html&#x27;;
1588
- }</code>
1589
- </td>
1590
- </tr>
1601
+ <i>Default value : </i><code>(data: Uint8Array): string[] &#x3D;&gt; {
1602
+ // Simplified ZIP parsing - looks for central directory entries
1603
+ const files: string[] &#x3D; [];
1604
+ let offset &#x3D; 0;
1591
1605
 
1606
+ while (offset &lt; data.length - 4) {
1607
+ // Look for local file header signature (0x04034b50)
1608
+ if (data[offset] &#x3D;&#x3D;&#x3D; 0x50 &amp;&amp; data[offset + 1] &#x3D;&#x3D;&#x3D; 0x4b &amp;&amp;
1609
+ data[offset + 2] &#x3D;&#x3D;&#x3D; 0x03 &amp;&amp; data[offset + 3] &#x3D;&#x3D;&#x3D; 0x04) {
1592
1610
 
1593
- </tbody>
1594
- </table>
1595
- <table class="table table-sm table-bordered">
1596
- <tbody>
1597
- <tr>
1598
- <td class="col-md-4">
1599
- <a name="Quill"></a>
1600
- <span class="name">
1601
- <span ><b>Quill</b></span>
1602
- <a href="#Quill"><span class="icon ion-ios-link"></span></a>
1603
- </span>
1604
- </td>
1605
- </tr>
1606
- <tr>
1607
- <td class="col-md-4">
1608
- <i>Type : </i> <code><a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank" >any</a></code>
1609
-
1610
- </td>
1611
- </tr>
1611
+ const filenameLength &#x3D; data[offset + 26] | (data[offset + 27] &lt;&lt; 8);
1612
+ const extraFieldLength &#x3D; data[offset + 28] | (data[offset + 29] &lt;&lt; 8);
1612
1613
 
1614
+ if (filenameLength &gt; 0 &amp;&amp; offset + 30 + filenameLength &lt;&#x3D; data.length) {
1615
+ const filename &#x3D; new TextDecoder().decode(data.slice(offset + 30, offset + 30 + filenameLength));
1616
+ files.push(filename);
1617
+ }
1613
1618
 
1614
- </tbody>
1615
- </table>
1616
- <table class="table table-sm table-bordered">
1617
- <tbody>
1618
- <tr>
1619
- <td class="col-md-4">
1620
- <a name="require"></a>
1621
- <span class="name">
1622
- <span ><b>require</b></span>
1623
- <a href="#require"><span class="icon ion-ios-link"></span></a>
1624
- </span>
1625
- </td>
1626
- </tr>
1627
- <tr>
1628
- <td class="col-md-4">
1629
- <i>Type : </i> <code><a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank" >any</a></code>
1619
+ offset +&#x3D; 30 + filenameLength + extraFieldLength;
1620
+ } else {
1621
+ offset++;
1622
+ }
1623
+ }
1630
1624
 
1625
+ return files;
1626
+ }</code>
1631
1627
  </td>
1632
1628
  </tr>
1633
1629
 
1634
1630
 
1635
1631
  </tbody>
1636
1632
  </table>
1637
- </section>
1638
- <h3>packages/components/eui-file-upload/utils/mime-types.ts</h3>
1639
- <section data-compodoc="block-properties">
1640
- <h3></h3> <table class="table table-sm table-bordered">
1633
+ <table class="table table-sm table-bordered">
1641
1634
  <tbody>
1642
1635
  <tr>
1643
1636
  <td class="col-md-4">
@@ -1655,7 +1648,7 @@
1655
1648
  const hex &#x3D; uint8ArrayToHexString(header);
1656
1649
 
1657
1650
  // map hex string to mime type
1658
- if (hex.startsWith(&#x27;ffd8ffe000104a46&#x27;)) return &#x27;image/jpeg&#x27;;
1651
+ if (hex.startsWith(&#x27;ffd8ff&#x27;)) return &#x27;image/jpeg&#x27;;
1659
1652
  if (hex.startsWith(&#x27;89504e47&#x27;)) return &#x27;image/png&#x27;;
1660
1653
  if (hex.startsWith(&#x27;464c4946&#x27;)) return &#x27;image/flif&#x27;;
1661
1654
  if (hex.startsWith(&#x27;67696d7020786366&#x27;)) return &#x27;image/x-xcf&#x27;;
@@ -1667,15 +1660,10 @@
1667
1660
  if (hex.startsWith(&#x27;49491a0000004845415050&#x27;)) return &#x27;image/vnd.ms-photo&#x27;;
1668
1661
  if (hex.startsWith(&#x27;38425053&#x27;)) return &#x27;image/vnd.adobe.photoshop&#x27;;
1669
1662
  if (hex.startsWith(&#x27;06054b50&#x27;)) return &#x27;application/x-indesign&#x27;;
1670
- if (hex.startsWith(&#x27;504b0304&#x27;)) return &#x27;application/epub+zip&#x27;;
1671
- if (hex.startsWith(&#x27;504b0304&#x27;)) return &#x27;application/x-xpinstall&#x27;;
1672
- if (hex.startsWith(&#x27;504b0304&#x27;)) return &#x27;application/vnd.oasis.opendocument.text&#x27;;
1673
- if (hex.startsWith(&#x27;504b0304&#x27;)) return &#x27;application/vnd.oasis.opendocument.spreadsheet&#x27;;
1674
- if (hex.startsWith(&#x27;504b0304&#x27;)) return &#x27;application/vnd.oasis.opendocument.presentation&#x27;;
1675
- if (hex.startsWith(&#x27;504b0304&#x27;)) return &#x27;application/vnd.openxmlformats-officedocument.wordprocessingml.document&#x27;;
1676
- if (hex.startsWith(&#x27;504b0304&#x27;)) return &#x27;application/vnd.openxmlformats-officedocument.presentationml.presentation&#x27;;
1677
- if (hex.startsWith(&#x27;504b0304&#x27;)) return &#x27;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet&#x27;;
1678
- if (hex.startsWith(&#x27;504b0304&#x27;)) return &#x27;application/zip&#x27;;
1663
+ // Handle ZIP-based formats by examining content
1664
+ if (hex.startsWith(&#x27;504b0304&#x27;)) {
1665
+ return identifyZipBasedFormat(header);
1666
+ }
1679
1667
  if (hex.startsWith(&#x27;7b2274797065223a226a736f6e227d&#x27;)) return &#x27;application/json&#x27;;
1680
1668
  if (hex.startsWith(&#x27;7573746172&#x27;)) return &#x27;application/x-tar&#x27;;
1681
1669
  if (hex.startsWith(&#x27;526172211a0700&#x27;)) return &#x27;application/x-rar-compressed&#x27;;
@@ -1691,17 +1679,13 @@
1691
1679
  if (hex.startsWith(&#x27;52494646&#x27;)) return &#x27;video/vnd.avi&#x27;;
1692
1680
  if (hex.startsWith(&#x27;52494646&#x27;)) return &#x27;audio/vnd.wave&#x27;;
1693
1681
  if (hex.startsWith(&#x27;0a010301&#x27;)) return &#x27;audio/qcelp&#x27;;
1694
- if (hex.startsWith(&#x27;3026b2758e66cf11&#x27;)) return &#x27;audio/x-ms-asf&#x27;;
1695
- if (hex.startsWith(&#x27;3026b2758e66cf11&#x27;)) return &#x27;video/x-ms-asf&#x27;;
1696
- if (hex.startsWith(&#x27;3026b2758e66cf11&#x27;)) return &#x27;application/vnd.ms-asf&#x27;;
1682
+ if (hex.startsWith(&#x27;3026b2758e66cf11&#x27;)) return identifyAsfFormat(header);
1697
1683
  if (hex.startsWith(&#x27;000001ba&#x27;)) return &#x27;video/mpeg&#x27;;
1698
1684
  if (hex.startsWith(&#x27;00000020667479703367&#x27;)) return &#x27;video/3gpp&#x27;;
1699
1685
  if (hex.startsWith(&#x27;494433&#x27;)) return &#x27;audio/mpeg&#x27;;
1700
1686
  if (hex.startsWith(&#x27;00000020667479704d344120&#x27;)) return &#x27;audio/mp4&#x27;;
1701
1687
  if (hex.startsWith(&#x27;4f707573&#x27;)) return &#x27;audio/opus&#x27;;
1702
- if (hex.startsWith(&#x27;4f676753&#x27;)) return &#x27;video/ogg&#x27;;
1703
- if (hex.startsWith(&#x27;4f676753&#x27;)) return &#x27;audio/ogg&#x27;;
1704
- if (hex.startsWith(&#x27;4f676753&#x27;)) return &#x27;application/ogg&#x27;;
1688
+ if (hex.startsWith(&#x27;4f676753&#x27;)) return identifyOggFormat(header);
1705
1689
  if (hex.startsWith(&#x27;664c6143&#x27;)) return &#x27;audio/x-flac&#x27;;
1706
1690
  if (hex.startsWith(&#x27;4d414320&#x27;)) return &#x27;audio/ape&#x27;;
1707
1691
  if (hex.startsWith(&#x27;7776706b&#x27;)) return &#x27;audio/wavpack&#x27;;
@@ -1724,7 +1708,6 @@
1724
1708
  if (hex.startsWith(&#x27;fd377a585a00&#x27;)) return &#x27;application/x-xz&#x27;;
1725
1709
  if (hex.startsWith(&#x27;53514c69746520666f726d6174203300&#x27;)) return &#x27;application/x-sqlite3&#x27;;
1726
1710
  if (hex.startsWith(&#x27;4e45531a00000001&#x27;)) return &#x27;application/x-nintendo-nes-rom&#x27;;
1727
- if (hex.startsWith(&#x27;504b0304&#x27;)) return &#x27;application/x-google-chrome-extension&#x27;;
1728
1711
  if (hex.startsWith(&#x27;4d534346&#x27;)) return &#x27;application/vnd.ms-cab-compressed&#x27;;
1729
1712
  if (hex.startsWith(&#x27;213c617263683e0a&#x27;)) return &#x27;application/x-deb&#x27;;
1730
1713
  if (hex.startsWith(&#x27;1f8b08&#x27;)) return &#x27;application/x-unix-archive&#x27;;
@@ -1746,10 +1729,7 @@
1746
1729
  if (hex.startsWith(&#x27;464f524d&#x27;)) return &#x27;audio/aiff&#x27;;
1747
1730
  if (hex.startsWith(&#x27;3c3f786d6c20&#x27;)) return &#x27;application/xml&#x27;;
1748
1731
  if (hex.startsWith(&#x27;424f4f4b4d4f4249&#x27;)) return &#x27;application/x-mobipocket-ebook&#x27;;
1749
- if (hex.startsWith(&#x27;667479706174&#x27;)) return &#x27;image/heif&#x27;;
1750
- if (hex.startsWith(&#x27;667479706174&#x27;)) return &#x27;image/heif-sequence&#x27;;
1751
- if (hex.startsWith(&#x27;667479706174&#x27;)) return &#x27;image/heic&#x27;;
1752
- if (hex.startsWith(&#x27;667479706174&#x27;)) return &#x27;image/heic-sequence&#x27;;
1732
+ if (hex.startsWith(&#x27;667479706174&#x27;)) return identifyHeifFormat(header);
1753
1733
  if (hex.startsWith(&#x27;4b545820&#x27;)) return &#x27;image/ktx&#x27;;
1754
1734
  if (hex.startsWith(&#x27;4449434d&#x27;)) return &#x27;application/dicom&#x27;;
1755
1735
  if (hex.startsWith(&#x27;4d50434b&#x27;)) return &#x27;audio/x-musepack&#x27;;
@@ -1766,6 +1746,386 @@
1766
1746
  </tr>
1767
1747
 
1768
1748
 
1749
+ </tbody>
1750
+ </table>
1751
+ <table class="table table-sm table-bordered">
1752
+ <tbody>
1753
+ <tr>
1754
+ <td class="col-md-4">
1755
+ <a name="identifyAsfFormat"></a>
1756
+ <span class="name">
1757
+ <span ><b>identifyAsfFormat</b></span>
1758
+ <a href="#identifyAsfFormat"><span class="icon ion-ios-link"></span></a>
1759
+ </span>
1760
+ </td>
1761
+ </tr>
1762
+ <tr>
1763
+ <td class="col-md-4">
1764
+ <i>Default value : </i><code>(data: Uint8Array): MimeType &#x3D;&gt; {
1765
+ // ASF files all start with the same GUID: 3026b2758e66cf11a6d900aa0062ce6c
1766
+ // To distinguish between audio, video, and application ASF, we need to examine
1767
+ // the stream properties in the ASF header
1768
+
1769
+ try {
1770
+ // Look for stream properties object GUID starting at offset 30
1771
+ // Audio stream properties: b7dc0791a9b711cf8ee600c00c205365
1772
+ // Video stream properties: bc19efc05b4d11cf9b1100aa00bbcb8b
1773
+
1774
+ if (data.length &lt; 100) {
1775
+ // Not enough data to analyze, default to application
1776
+ return &#x27;application/vnd.ms-asf&#x27;;
1777
+ }
1778
+
1779
+ const hex &#x3D; uint8ArrayToHexString(data);
1780
+
1781
+ // Look for video stream properties GUID (indicates video content)
1782
+ if (hex.includes(&#x27;bc19efc05b4d11cf9b1100aa00bbcb8b&#x27;)) {
1783
+ return &#x27;video/x-ms-asf&#x27;;
1784
+ }
1785
+
1786
+ // Look for audio stream properties GUID (indicates audio content)
1787
+ if (hex.includes(&#x27;b7dc0791a9b711cf8ee600c00c205365&#x27;)) {
1788
+ return &#x27;audio/x-ms-asf&#x27;;
1789
+ }
1790
+
1791
+ // Check for Windows Media Audio/Video codec identifiers
1792
+ // WMA codec: 161 (0xa1) or 162 (0xa2) or 163 (0xa3)
1793
+ // WMV codec: Common values include various Windows Media Video identifiers
1794
+
1795
+ // Scan through the header for codec information
1796
+ for (let i &#x3D; 0; i &lt; Math.min(data.length - 4, 1000); i++) {
1797
+ // Look for audio codec indicators
1798
+ if (data[i] &#x3D;&#x3D;&#x3D; 0xa1 || data[i] &#x3D;&#x3D;&#x3D; 0xa2 || data[i] &#x3D;&#x3D;&#x3D; 0xa3) {
1799
+ // Found WMA codec indicator
1800
+ return &#x27;audio/x-ms-asf&#x27;;
1801
+ }
1802
+ }
1803
+
1804
+ // Look for common video indicators in the first 1KB
1805
+ const textContent &#x3D; new TextDecoder(&#x27;utf-8&#x27;, { fatal: false }).decode(data.slice(0, Math.min(1000, data.length)));
1806
+
1807
+ // Check for video-related strings
1808
+ if (textContent.toLowerCase().includes(&#x27;video&#x27;) ||
1809
+ textContent.toLowerCase().includes(&#x27;wmv&#x27;) ||
1810
+ textContent.toLowerCase().includes(&#x27;mpeg&#x27;)) {
1811
+ return &#x27;video/x-ms-asf&#x27;;
1812
+ }
1813
+
1814
+ // Check for audio-related strings
1815
+ if (textContent.toLowerCase().includes(&#x27;audio&#x27;) ||
1816
+ textContent.toLowerCase().includes(&#x27;wma&#x27;) ||
1817
+ textContent.toLowerCase().includes(&#x27;music&#x27;)) {
1818
+ return &#x27;audio/x-ms-asf&#x27;;
1819
+ }
1820
+
1821
+ // Default to application/vnd.ms-asf if we can&#x27;t determine the specific type
1822
+ return &#x27;application/vnd.ms-asf&#x27;;
1823
+
1824
+ } catch {
1825
+ // If any error occurs during analysis, default to application type
1826
+ return &#x27;application/vnd.ms-asf&#x27;;
1827
+ }
1828
+ }</code>
1829
+ </td>
1830
+ </tr>
1831
+
1832
+
1833
+ </tbody>
1834
+ </table>
1835
+ <table class="table table-sm table-bordered">
1836
+ <tbody>
1837
+ <tr>
1838
+ <td class="col-md-4">
1839
+ <a name="identifyHeifFormat"></a>
1840
+ <span class="name">
1841
+ <span ><b>identifyHeifFormat</b></span>
1842
+ <a href="#identifyHeifFormat"><span class="icon ion-ios-link"></span></a>
1843
+ </span>
1844
+ </td>
1845
+ </tr>
1846
+ <tr>
1847
+ <td class="col-md-4">
1848
+ <i>Default value : </i><code>(data: Uint8Array): MimeType &#x3D;&gt; {
1849
+ // HEIF/HEIC files all start with the same ftyp box signature: 667479706174
1850
+ // To distinguish between formats, we need to examine the brand and compatible brands
1851
+ // in the ftyp (file type) box
1852
+
1853
+ try {
1854
+ if (data.length &lt; 20) {
1855
+ // Not enough data to analyze, default to HEIF
1856
+ return &#x27;image/heif&#x27;;
1857
+ }
1858
+
1859
+ const hex &#x3D; uint8ArrayToHexString(data);
1860
+
1861
+ // The ftyp box structure:
1862
+ // Bytes 0-3: Box size (4 bytes)
1863
+ // Bytes 4-7: Box type &quot;ftyp&quot; (4 bytes) - 667479706174
1864
+ // Bytes 8-11: Major brand (4 bytes)
1865
+ // Bytes 12-15: Minor version (4 bytes)
1866
+ // Bytes 16+: Compatible brands (4 bytes each)
1867
+
1868
+ // Extract major brand (4 bytes starting at offset 8)
1869
+ // Convert to ASCII string for easier comparison
1870
+ const majorBrand &#x3D; String.fromCharCode(
1871
+ data[8], data[9], data[10], data[11],
1872
+ );
1873
+
1874
+ // Look for compatible brands in the first 100 bytes
1875
+ const compatibleBrandsHex &#x3D; hex.substring(32, Math.min(200, hex.length)); // Start after major brand + minor version
1876
+
1877
+ // HEIC brands: &#x27;heic&#x27;, &#x27;heix&#x27;, &#x27;hevc&#x27;, &#x27;hevx&#x27;
1878
+ if (majorBrand &#x3D;&#x3D;&#x3D; &#x27;heic&#x27; ||
1879
+ compatibleBrandsHex.includes(&#x27;68656963&#x27;) || // &#x27;heic&#x27;
1880
+ compatibleBrandsHex.includes(&#x27;68656978&#x27;) || // &#x27;heix&#x27;
1881
+ compatibleBrandsHex.includes(&#x27;68657663&#x27;) || // &#x27;hevc&#x27;
1882
+ compatibleBrandsHex.includes(&#x27;68657678&#x27;)) { // &#x27;hevx&#x27;
1883
+
1884
+ // Check for sequence/animation indicators
1885
+ if (compatibleBrandsHex.includes(&#x27;68657673&#x27;) || // &#x27;hevs&#x27; - HEIC sequence
1886
+ compatibleBrandsHex.includes(&#x27;6d736631&#x27;) || // &#x27;msf1&#x27; - sequence
1887
+ majorBrand &#x3D;&#x3D;&#x3D; &#x27;hevs&#x27;) {
1888
+ return &#x27;image/heic-sequence&#x27;;
1889
+ }
1890
+
1891
+ return &#x27;image/heic&#x27;;
1892
+ }
1893
+
1894
+ // HEIF brands: &#x27;mif1&#x27;, &#x27;msf1&#x27;
1895
+ if (majorBrand &#x3D;&#x3D;&#x3D; &#x27;mif1&#x27; || majorBrand &#x3D;&#x3D;&#x3D; &#x27;msf1&#x27; ||
1896
+ compatibleBrandsHex.includes(&#x27;6d696631&#x27;) || // &#x27;mif1&#x27;
1897
+ compatibleBrandsHex.includes(&#x27;6d736631&#x27;)) { // &#x27;msf1&#x27;
1898
+
1899
+ // Check for sequence/animation indicators
1900
+ if (majorBrand &#x3D;&#x3D;&#x3D; &#x27;msf1&#x27; ||
1901
+ compatibleBrandsHex.includes(&#x27;6d736631&#x27;)) { // &#x27;msf1&#x27; - sequence
1902
+ return &#x27;image/heif-sequence&#x27;;
1903
+ }
1904
+
1905
+ return &#x27;image/heif&#x27;;
1906
+ }
1907
+
1908
+ // Check for specific sequence indicators in the data
1909
+ if (hex.includes(&#x27;6d736631&#x27;) || // &#x27;msf1&#x27; - multi-image sequence
1910
+ hex.includes(&#x27;68657673&#x27;)) { // &#x27;hevs&#x27; - HEIC sequence
1911
+
1912
+ // If we find HEIC-related brands, it&#x27;s HEIC sequence
1913
+ if (hex.includes(&#x27;68656963&#x27;) || hex.includes(&#x27;68657663&#x27;)) {
1914
+ return &#x27;image/heic-sequence&#x27;;
1915
+ }
1916
+
1917
+ return &#x27;image/heif-sequence&#x27;;
1918
+ }
1919
+
1920
+ // If we find HEIC indicators but no sequence, it&#x27;s single HEIC
1921
+ if (hex.includes(&#x27;68656963&#x27;) || // &#x27;heic&#x27;
1922
+ hex.includes(&#x27;68657663&#x27;) || // &#x27;hevc&#x27;
1923
+ hex.includes(&#x27;68656978&#x27;) || // &#x27;heix&#x27;
1924
+ hex.includes(&#x27;68657678&#x27;)) { // &#x27;hevx&#x27;
1925
+ return &#x27;image/heic&#x27;;
1926
+ }
1927
+
1928
+ // Default to HEIF for any other case
1929
+ return &#x27;image/heif&#x27;;
1930
+
1931
+ } catch {
1932
+ // If any error occurs during analysis, default to HEIF
1933
+ return &#x27;image/heif&#x27;;
1934
+ }
1935
+ }</code>
1936
+ </td>
1937
+ </tr>
1938
+
1939
+
1940
+ </tbody>
1941
+ </table>
1942
+ <table class="table table-sm table-bordered">
1943
+ <tbody>
1944
+ <tr>
1945
+ <td class="col-md-4">
1946
+ <a name="identifyOggFormat"></a>
1947
+ <span class="name">
1948
+ <span ><b>identifyOggFormat</b></span>
1949
+ <a href="#identifyOggFormat"><span class="icon ion-ios-link"></span></a>
1950
+ </span>
1951
+ </td>
1952
+ </tr>
1953
+ <tr>
1954
+ <td class="col-md-4">
1955
+ <i>Default value : </i><code>(data: Uint8Array): MimeType &#x3D;&gt; {
1956
+ // OGG files all start with &quot;OggS&quot; (4f676753) but can contain different codecs
1957
+ // To distinguish between audio, video, and application OGG, we need to examine
1958
+ // the codec information in the OGG page headers
1959
+
1960
+ try {
1961
+ if (data.length &lt; 64) {
1962
+ // Not enough data to analyze, default to audio
1963
+ return &#x27;audio/ogg&#x27;;
1964
+ }
1965
+
1966
+ const hex &#x3D; uint8ArrayToHexString(data);
1967
+
1968
+ // Look for codec identification patterns in the first few hundred bytes
1969
+ // Common video codecs in OGG:
1970
+ // - Theora: &quot;theora&quot; or &quot;\x80theora&quot;
1971
+ // - VP8/VP9: various signatures
1972
+ // - Dirac: &quot;BBCD&quot;
1973
+
1974
+ // Common audio codecs in OGG:
1975
+ // - Vorbis: &quot;vorbis&quot; or &quot;\x01vorbis&quot;
1976
+ // - Opus: &quot;OpusHead&quot;
1977
+ // - FLAC: &quot;fLaC&quot;
1978
+ // - Speex: &quot;Speex&quot;
1979
+
1980
+ // Convert some bytes to text for string matching
1981
+ const textContent &#x3D; new TextDecoder(&#x27;utf-8&#x27;, { fatal: false }).decode(data.slice(0, Math.min(512, data.length)));
1982
+ const lowerContent &#x3D; textContent.toLowerCase();
1983
+
1984
+ // Check for video codec indicators first (as they&#x27;re more specific)
1985
+ if (lowerContent.includes(&#x27;theora&#x27;) ||
1986
+ hex.includes(&#x27;8074686f726120&#x27;) || // &quot;\x80theora &quot;
1987
+ hex.includes(&#x27;7468656f7261&#x27;) || // &quot;theora&quot;
1988
+ lowerContent.includes(&#x27;dirac&#x27;) ||
1989
+ hex.includes(&#x27;42424344&#x27;) || // &quot;BBCD&quot; - Dirac
1990
+ lowerContent.includes(&#x27;vp8&#x27;) ||
1991
+ lowerContent.includes(&#x27;vp9&#x27;)) {
1992
+ return &#x27;video/ogg&#x27;;
1993
+ }
1994
+
1995
+ // Check for audio codec indicators
1996
+ if (lowerContent.includes(&#x27;vorbis&#x27;) ||
1997
+ hex.includes(&#x27;01766f72626973&#x27;) || // &quot;\x01vorbis&quot;
1998
+ hex.includes(&#x27;766f72626973&#x27;) || // &quot;vorbis&quot;
1999
+ lowerContent.includes(&#x27;opushead&#x27;) ||
2000
+ hex.includes(&#x27;4f7075734865616420&#x27;) || // &quot;OpusHead &quot;
2001
+ lowerContent.includes(&#x27;speex&#x27;) ||
2002
+ hex.includes(&#x27;53706565782020&#x27;) || // &quot;Speex &quot;
2003
+ lowerContent.includes(&#x27;flac&#x27;) ||
2004
+ hex.includes(&#x27;664c6143&#x27;)) { // &quot;fLaC&quot;
2005
+ return &#x27;audio/ogg&#x27;;
2006
+ }
2007
+
2008
+ // Look for OGG stream structure patterns
2009
+ // OGG pages have a specific structure, look for multiple &quot;OggS&quot; signatures
2010
+ // which might indicate a complex multimedia container
2011
+ let oggSCount &#x3D; 0;
2012
+ for (let i &#x3D; 0; i &lt; Math.min(data.length - 4, 1000); i +&#x3D; 4) {
2013
+ if (data[i] &#x3D;&#x3D;&#x3D; 0x4f &amp;&amp; data[i + 1] &#x3D;&#x3D;&#x3D; 0x67 &amp;&amp;
2014
+ data[i + 2] &#x3D;&#x3D;&#x3D; 0x67 &amp;&amp; data[i + 3] &#x3D;&#x3D;&#x3D; 0x53) {
2015
+ oggSCount++;
2016
+ }
2017
+ }
2018
+
2019
+ // Multiple OGG pages might indicate a more complex application format
2020
+ if (oggSCount &gt; 3) {
2021
+ // Check if it&#x27;s likely a multimedia container vs pure audio/video
2022
+ if (lowerContent.includes(&#x27;application&#x27;) ||
2023
+ lowerContent.includes(&#x27;metadata&#x27;) ||
2024
+ lowerContent.includes(&#x27;index&#x27;) ||
2025
+ (!lowerContent.includes(&#x27;audio&#x27;) &amp;&amp; !lowerContent.includes(&#x27;video&#x27;) &amp;&amp;
2026
+ !lowerContent.includes(&#x27;vorbis&#x27;) &amp;&amp; !lowerContent.includes(&#x27;theora&#x27;))) {
2027
+ return &#x27;application/ogg&#x27;;
2028
+ }
2029
+ }
2030
+
2031
+ // Look for file extension hints in metadata (if present)
2032
+ if (lowerContent.includes(&#x27;.ogv&#x27;) || lowerContent.includes(&#x27;video&#x27;)) {
2033
+ return &#x27;video/ogg&#x27;;
2034
+ }
2035
+
2036
+ if (lowerContent.includes(&#x27;.oga&#x27;) || lowerContent.includes(&#x27;audio&#x27;) || lowerContent.includes(&#x27;music&#x27;)) {
2037
+ return &#x27;audio/ogg&#x27;;
2038
+ }
2039
+
2040
+ // Check the OGG page header flags
2041
+ // Byte 5 in OGG page header contains flags
2042
+ // If we have enough data, check the stream type
2043
+ if (data.length &gt; 26) {
2044
+ const pageHeaderType &#x3D; data[5];
2045
+ // Fresh packet start (0x02) often indicates beginning of codec data
2046
+ if ((pageHeaderType &amp; 0x02) &#x3D;&#x3D;&#x3D; 0x02) {
2047
+ // Look at the packet data starting around byte 27
2048
+ const packetStart &#x3D; data.slice(27, Math.min(data.length, 50));
2049
+ const packetHex &#x3D; uint8ArrayToHexString(packetStart);
2050
+
2051
+ // Check for Vorbis identification header
2052
+ if (packetHex.startsWith(&#x27;01766f72626973&#x27;)) {
2053
+ return &#x27;audio/ogg&#x27;;
2054
+ }
2055
+
2056
+ // Check for Theora identification header
2057
+ if (packetHex.startsWith(&#x27;8074686f726120&#x27;)) {
2058
+ return &#x27;video/ogg&#x27;;
2059
+ }
2060
+ }
2061
+ }
2062
+
2063
+ // Default to audio/ogg as it&#x27;s the most common OGG format
2064
+ return &#x27;audio/ogg&#x27;;
2065
+
2066
+ } catch {
2067
+ // If any error occurs during analysis, default to audio
2068
+ return &#x27;audio/ogg&#x27;;
2069
+ }
2070
+ }</code>
2071
+ </td>
2072
+ </tr>
2073
+
2074
+
2075
+ </tbody>
2076
+ </table>
2077
+ <table class="table table-sm table-bordered">
2078
+ <tbody>
2079
+ <tr>
2080
+ <td class="col-md-4">
2081
+ <a name="identifyZipBasedFormat"></a>
2082
+ <span class="name">
2083
+ <span ><b>identifyZipBasedFormat</b></span>
2084
+ <a href="#identifyZipBasedFormat"><span class="icon ion-ios-link"></span></a>
2085
+ </span>
2086
+ </td>
2087
+ </tr>
2088
+ <tr>
2089
+ <td class="col-md-4">
2090
+ <i>Default value : </i><code>(data: Uint8Array): MimeType &#x3D;&gt; {
2091
+ try {
2092
+ const fileEntries &#x3D; extractZipFileList(data);
2093
+
2094
+ // Chrome extension
2095
+ if (fileEntries.includes(&#x27;manifest.json&#x27;)) {
2096
+ return &#x27;application/x-google-chrome-extension&#x27;;
2097
+ }
2098
+
2099
+ // EPUB
2100
+ if (fileEntries.includes(&#x27;META-INF/container.xml&#x27;) || fileEntries.includes(&#x27;mimetype&#x27;)) {
2101
+ return &#x27;application/epub+zip&#x27;;
2102
+ }
2103
+
2104
+ // OpenDocument formats
2105
+ if (fileEntries.includes(&#x27;META-INF/manifest.xml&#x27;)) {
2106
+ if (fileEntries.some(f &#x3D;&gt; f.endsWith(&#x27;.odp&#x27;))) return &#x27;application/vnd.oasis.opendocument.presentation&#x27;;
2107
+ if (fileEntries.some(f &#x3D;&gt; f.endsWith(&#x27;.ods&#x27;))) return &#x27;application/vnd.oasis.opendocument.spreadsheet&#x27;;
2108
+ if (fileEntries.some(f &#x3D;&gt; f.endsWith(&#x27;.odt&#x27;))) return &#x27;application/vnd.oasis.opendocument.text&#x27;;
2109
+ }
2110
+
2111
+ // Microsoft Office formats
2112
+ if (fileEntries.includes(&#x27;[Content_Types].xml&#x27;)) {
2113
+ if (fileEntries.includes(&#x27;ppt/presentation.xml&#x27;)) return &#x27;application/vnd.openxmlformats-officedocument.presentationml.presentation&#x27;;
2114
+ if (fileEntries.includes(&#x27;xl/workbook.xml&#x27;)) return &#x27;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet&#x27;;
2115
+ if (fileEntries.includes(&#x27;word/document.xml&#x27;)) return &#x27;application/vnd.openxmlformats-officedocument.wordprocessingml.document&#x27;;
2116
+ }
2117
+
2118
+ // Default to generic ZIP
2119
+ return &#x27;application/zip&#x27;;
2120
+
2121
+ } catch {
2122
+ return &#x27;application/zip&#x27;;
2123
+ }
2124
+ }</code>
2125
+ </td>
2126
+ </tr>
2127
+
2128
+
1769
2129
  </tbody>
1770
2130
  </table>
1771
2131
  <table class="table table-sm table-bordered">
@@ -1788,6 +2148,74 @@
1788
2148
  </tr>
1789
2149
 
1790
2150
 
2151
+ </tbody>
2152
+ </table>
2153
+ </section>
2154
+ <h3>packages/components/externals/quill/quill-editor.component.ts</h3>
2155
+ <section data-compodoc="block-properties">
2156
+ <h3></h3> <table class="table table-sm table-bordered">
2157
+ <tbody>
2158
+ <tr>
2159
+ <td class="col-md-4">
2160
+ <a name="getFormat"></a>
2161
+ <span class="name">
2162
+ <span ><b>getFormat</b></span>
2163
+ <a href="#getFormat"><span class="icon ion-ios-link"></span></a>
2164
+ </span>
2165
+ </td>
2166
+ </tr>
2167
+ <tr>
2168
+ <td class="col-md-4">
2169
+ <i>Default value : </i><code>(format?: QuillFormat, configFormat?: QuillFormat): QuillFormat &#x3D;&gt; {
2170
+ const passedFormat &#x3D; format || configFormat;
2171
+ return passedFormat || &#x27;html&#x27;;
2172
+ }</code>
2173
+ </td>
2174
+ </tr>
2175
+
2176
+
2177
+ </tbody>
2178
+ </table>
2179
+ <table class="table table-sm table-bordered">
2180
+ <tbody>
2181
+ <tr>
2182
+ <td class="col-md-4">
2183
+ <a name="Quill"></a>
2184
+ <span class="name">
2185
+ <span ><b>Quill</b></span>
2186
+ <a href="#Quill"><span class="icon ion-ios-link"></span></a>
2187
+ </span>
2188
+ </td>
2189
+ </tr>
2190
+ <tr>
2191
+ <td class="col-md-4">
2192
+ <i>Type : </i> <code><a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank" >any</a></code>
2193
+
2194
+ </td>
2195
+ </tr>
2196
+
2197
+
2198
+ </tbody>
2199
+ </table>
2200
+ <table class="table table-sm table-bordered">
2201
+ <tbody>
2202
+ <tr>
2203
+ <td class="col-md-4">
2204
+ <a name="require"></a>
2205
+ <span class="name">
2206
+ <span ><b>require</b></span>
2207
+ <a href="#require"><span class="icon ion-ios-link"></span></a>
2208
+ </span>
2209
+ </td>
2210
+ </tr>
2211
+ <tr>
2212
+ <td class="col-md-4">
2213
+ <i>Type : </i> <code><a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank" >any</a></code>
2214
+
2215
+ </td>
2216
+ </tr>
2217
+
2218
+
1791
2219
  </tbody>
1792
2220
  </table>
1793
2221
  </section>