@eui/components 18.2.15 → 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.
- package/docs/changelog.html +6401 -0
- package/docs/classes/BreadCrumbItem.html +3 -3
- package/docs/classes/CdkDragMock.html +3 -3
- package/docs/classes/CdkDropListMock.html +3 -3
- package/docs/classes/CustomNodeSelectFnHelper.html +3 -3
- package/docs/classes/EuiAppShellServiceMock.html +3 -3
- package/docs/classes/EuiChip.html +3 -3
- package/docs/classes/EuiChipTooltip.html +3 -3
- package/docs/classes/EuiDialogComponentInstances.html +3 -3
- package/docs/classes/EuiDialogConfig.html +3 -3
- package/docs/classes/EuiMessageBoxComponentInstances.html +3 -3
- package/docs/classes/EuiMessageBoxConfig.html +3 -3
- package/docs/classes/EuiTimebarItemUI.html +3 -3
- package/docs/classes/EuiTooltipConfig.html +3 -3
- package/docs/classes/EuiTreeHelper.html +3 -3
- package/docs/classes/EuiTreePagination.html +3 -3
- package/docs/classes/EuiWizardStep.html +3 -3
- package/docs/classes/HTMLCollection.html +3 -3
- package/docs/classes/MultisortParam.html +3 -3
- package/docs/classes/OpenedDialog.html +3 -3
- package/docs/classes/RouterMock.html +3 -3
- package/docs/classes/SmoothScroll.html +3 -3
- package/docs/classes/TranslateServiceMock-1.html +3 -3
- package/docs/classes/TranslateServiceMock.html +3 -3
- package/docs/classes/UxAutocompleteTagDragServiceMock.html +3 -3
- package/docs/components/ChartComponent.html +3 -3
- package/docs/components/DefaultComponent-1.html +3 -3
- package/docs/components/DefaultComponent.html +3 -3
- package/docs/components/EuiAccordionComponent.html +3 -3
- package/docs/components/EuiAccordionItemComponent.html +3 -3
- package/docs/components/EuiAlertComponent.html +3 -3
- package/docs/components/EuiAlertTitleComponent.html +3 -3
- package/docs/components/EuiAppBreadcrumbComponent.html +3 -3
- package/docs/components/EuiAppComponent.html +3 -3
- package/docs/components/EuiAppFooterComponent.html +3 -3
- package/docs/components/EuiAppHeaderComponent.html +3 -3
- package/docs/components/EuiAppSidebarBodyComponent.html +3 -3
- package/docs/components/EuiAppSidebarComponent.html +3 -3
- package/docs/components/EuiAppSidebarDrawerComponent.html +3 -3
- package/docs/components/EuiAppSidebarFooterComponent.html +3 -3
- package/docs/components/EuiAppSidebarHeaderComponent.html +3 -3
- package/docs/components/EuiAppSidebarHeaderUserProfileComponent.html +3 -3
- package/docs/components/EuiAppSidebarMenuComponent.html +3 -3
- package/docs/components/EuiAppToolbarComponent.html +3 -3
- package/docs/components/EuiAppTopMessageComponent.html +3 -3
- package/docs/components/EuiAutocompleteAsyncTestComponent.html +3 -3
- package/docs/components/EuiAutocompleteChipsAsyncTestComponent.html +3 -3
- package/docs/components/EuiAutocompleteChipsTestComponent.html +3 -3
- package/docs/components/EuiAutocompleteComponent.html +3 -3
- package/docs/components/EuiAutocompleteOptionComponent.html +3 -3
- package/docs/components/EuiAutocompleteOptionGroupComponent.html +3 -3
- package/docs/components/EuiAutocompleteTestComponent.html +3 -3
- package/docs/components/EuiAvatarBadgeComponent.html +3 -3
- package/docs/components/EuiAvatarComponent.html +3 -3
- package/docs/components/EuiAvatarIconComponent.html +3 -3
- package/docs/components/EuiAvatarImageComponent.html +3 -3
- package/docs/components/EuiAvatarListComponent.html +3 -3
- package/docs/components/EuiAvatarTextComponent.html +3 -3
- package/docs/components/EuiBadgeComponent.html +3 -3
- package/docs/components/EuiBlockContentComponent.html +3 -3
- package/docs/components/EuiBlockDocumentComponent.html +3 -3
- package/docs/components/EuiBreadcrumbComponent.html +3 -3
- package/docs/components/EuiBreadcrumbItemComponent.html +3 -3
- package/docs/components/EuiButtonComponent.html +3 -3
- package/docs/components/EuiButtonGroupComponent.html +3 -3
- package/docs/components/EuiButtonV2Component.html +3 -3
- package/docs/components/EuiCardComponent.html +3 -3
- package/docs/components/EuiCardContentComponent.html +3 -3
- package/docs/components/EuiCardFooterActionButtonsComponent.html +3 -3
- package/docs/components/EuiCardFooterActionIconsComponent.html +3 -3
- package/docs/components/EuiCardFooterComponent.html +3 -3
- package/docs/components/EuiCardFooterMenuComponent.html +3 -3
- package/docs/components/EuiCardFooterMenuContentComponent.html +3 -3
- package/docs/components/EuiCardHeaderBodyComponent.html +3 -3
- package/docs/components/EuiCardHeaderComponent.html +3 -3
- package/docs/components/EuiCardHeaderLeftContentComponent.html +3 -3
- package/docs/components/EuiCardHeaderRightContentComponent.html +3 -3
- package/docs/components/EuiCardHeaderSubtitleComponent.html +3 -3
- package/docs/components/EuiCardHeaderTitleComponent.html +3 -3
- package/docs/components/EuiCardMediaComponent.html +3 -3
- package/docs/components/EuiChipComponent.html +3 -3
- package/docs/components/EuiChipListComponent.html +4 -4
- package/docs/components/EuiDashboardButtonComponent.html +3 -3
- package/docs/components/EuiDashboardCardComponent.html +3 -3
- package/docs/components/EuiDashboardCardContentComponent.html +3 -3
- package/docs/components/EuiDashboardCardStatusContentComponent.html +3 -3
- package/docs/components/EuiDateRangeSelectorComponent.html +3 -3
- package/docs/components/EuiDatepickerComponent.html +3 -3
- package/docs/components/EuiDialogComponent.html +3 -3
- package/docs/components/EuiDialogContainerComponent.html +41 -4
- package/docs/components/EuiDimmerComponent.html +3 -3
- package/docs/components/EuiDisableContentComponent.html +3 -3
- package/docs/components/EuiDiscussionThreadComponent.html +3 -3
- package/docs/components/EuiDiscussionThreadItemComponent.html +3 -3
- package/docs/components/EuiDropdownComponent.html +4 -4
- package/docs/components/EuiDropdownItemComponent.html +78 -5
- package/docs/components/EuiEditorComponent.html +3 -3
- package/docs/components/EuiEditorCountersComponent.html +3 -3
- package/docs/components/EuiEditorHtmlViewComponent.html +3 -3
- package/docs/components/EuiEditorImageDialogComponent.html +3 -3
- package/docs/components/EuiEditorJsonViewComponent.html +3 -3
- package/docs/components/EuiFeedbackMessageComponent.html +3 -3
- package/docs/components/EuiFieldsetComponent.html +3 -3
- package/docs/components/EuiFilePreviewComponent.html +35 -4
- package/docs/components/EuiFileUploadComponent.html +3 -3
- package/docs/components/EuiFileUploadProgressComponent.html +3 -3
- package/docs/components/EuiFooterComponent.html +3 -3
- package/docs/components/EuiGrowlComponent.html +3 -3
- package/docs/components/EuiHeaderAppComponent.html +3 -3
- package/docs/components/EuiHeaderAppNameComponent.html +3 -3
- package/docs/components/EuiHeaderAppNameLogoComponent.html +3 -3
- package/docs/components/EuiHeaderAppSubtitleComponent.html +3 -3
- package/docs/components/EuiHeaderComponent.html +3 -3
- package/docs/components/EuiHeaderEnvironmentComponent.html +3 -3
- package/docs/components/EuiHeaderLogoComponent.html +3 -3
- package/docs/components/EuiHeaderRightContentComponent.html +3 -3
- package/docs/components/EuiHeaderSearchComponent.html +3 -3
- package/docs/components/EuiHeaderUserProfileComponent.html +3 -3
- package/docs/components/EuiIconButtonComponent.html +3 -3
- package/docs/components/EuiIconButtonExpanderComponent.html +3 -3
- package/docs/components/EuiIconColorComponent.html +3 -3
- package/docs/components/EuiIconInputComponent.html +3 -3
- package/docs/components/EuiIconStateComponent.html +3 -3
- package/docs/components/EuiIconSvgComponent.html +3 -3
- package/docs/components/EuiIconToggleComponent.html +3 -3
- package/docs/components/EuiInputCheckboxComponent.html +3 -3
- package/docs/components/EuiInputGroupComponent.html +3 -3
- package/docs/components/EuiInputNumberComponent.html +3 -3
- package/docs/components/EuiInputRadioComponent.html +3 -3
- package/docs/components/EuiInputTextComponent.html +3 -3
- package/docs/components/EuiLabelComponent.html +3 -3
- package/docs/components/EuiLanguageSelectorComponent.html +3 -3
- package/docs/components/EuiListComponent.html +3 -3
- package/docs/components/EuiListItemComponent.html +3 -3
- package/docs/components/EuiMenuComponent.html +3 -3
- package/docs/components/EuiMenuItemComponent.html +3 -3
- package/docs/components/EuiMessageBoxComponent.html +3 -3
- package/docs/components/EuiModalSelectorComponent.html +3 -3
- package/docs/components/EuiNavbarComponent.html +3 -3
- package/docs/components/EuiNavbarItemComponent.html +3 -3
- package/docs/components/EuiNotificationItemComponent.html +3 -3
- package/docs/components/EuiNotificationItemV2Component.html +3 -3
- package/docs/components/EuiNotificationsComponent.html +3 -3
- package/docs/components/EuiNotificationsV2Component.html +3 -3
- package/docs/components/EuiOverlayBodyComponent.html +3 -3
- package/docs/components/EuiOverlayComponent.html +3 -3
- package/docs/components/EuiOverlayFooterComponent.html +3 -3
- package/docs/components/EuiOverlayHeaderComponent.html +3 -3
- package/docs/components/EuiOverlayHeaderTitleComponent.html +3 -3
- package/docs/components/EuiPageBreadcrumbComponent.html +3 -3
- package/docs/components/EuiPageColumnComponent.html +3 -3
- package/docs/components/EuiPageColumnsComponent.html +3 -3
- package/docs/components/EuiPageComponent.html +3 -3
- package/docs/components/EuiPageContentComponent.html +3 -3
- package/docs/components/EuiPageFooterComponent.html +3 -3
- package/docs/components/EuiPageHeaderActionItemsComponent.html +3 -3
- package/docs/components/EuiPageHeaderBodyComponent.html +3 -3
- package/docs/components/EuiPageHeaderComponent.html +3 -3
- package/docs/components/EuiPageHeaderSubLabelComponent.html +3 -3
- package/docs/components/EuiPageHeroHeaderComponent.html +3 -3
- package/docs/components/EuiPageTopContentComponent.html +3 -3
- package/docs/components/EuiPaginatorComponent.html +4 -4
- package/docs/components/EuiPopoverComponent.html +3 -3
- package/docs/components/EuiProgressBarComponent.html +3 -3
- package/docs/components/EuiProgressCircleComponent.html +3 -3
- package/docs/components/EuiResizableComponent.html +3 -3
- package/docs/components/EuiSearchFavouriteQueriesComponent.html +3 -3
- package/docs/components/EuiSelectComponent.html +3 -3
- package/docs/components/EuiSidebarMenuComponent.html +3 -3
- package/docs/components/EuiSidebarToggleComponent.html +3 -3
- package/docs/components/EuiSkeletonComponent.html +3 -3
- package/docs/components/EuiSlideToggleComponent.html +3 -3
- package/docs/components/EuiSlideToggleTestComponent.html +3 -3
- package/docs/components/EuiSplitButtonComponent.html +3 -3
- package/docs/components/EuiTabComponent.html +3 -3
- package/docs/components/EuiTabContentComponent.html +3 -3
- package/docs/components/EuiTabLabelComponent.html +3 -3
- package/docs/components/EuiTableComponent.html +3 -3
- package/docs/components/EuiTableExpandableRowComponent.html +3 -3
- package/docs/components/EuiTableFilterComponent.html +3 -3
- package/docs/components/EuiTableSelectableHeaderComponent.html +3 -3
- package/docs/components/EuiTableSelectableRowComponent.html +3 -3
- package/docs/components/EuiTableSortableColComponent.html +3 -3
- package/docs/components/EuiTableV2Component.html +3 -3
- package/docs/components/EuiTableV2FilterComponent.html +3 -3
- package/docs/components/EuiTableV2SelectableHeaderComponent.html +3 -3
- package/docs/components/EuiTableV2SelectableRowComponent.html +3 -3
- package/docs/components/EuiTableV2SortableColComponent.html +3 -3
- package/docs/components/EuiTabsComponent.html +3 -3
- package/docs/components/EuiTextareaComponent.html +3 -3
- package/docs/components/EuiTimeRangepickerComponent.html +3 -3
- package/docs/components/EuiTimebarComponent.html +3 -3
- package/docs/components/EuiTimelineComponent.html +3 -3
- package/docs/components/EuiTimelineItemComponent.html +3 -3
- package/docs/components/EuiTimepickerComponent.html +3 -3
- package/docs/components/EuiToolbarAppComponent.html +3 -3
- package/docs/components/EuiToolbarCenterComponent.html +3 -3
- package/docs/components/EuiToolbarComponent.html +3 -3
- package/docs/components/EuiToolbarEnvironmentComponent.html +3 -3
- package/docs/components/EuiToolbarItemComponent.html +3 -3
- package/docs/components/EuiToolbarItemsComponent.html +3 -3
- package/docs/components/EuiToolbarLogoComponent.html +3 -3
- package/docs/components/EuiToolbarMenuComponent.html +4 -4
- package/docs/components/EuiToolbarNavbarComponent.html +3 -3
- package/docs/components/EuiToolbarNavbarItemComponent.html +3 -3
- package/docs/components/EuiToolbarSearchComponent.html +3 -3
- package/docs/components/EuiToolbarSelectorComponent.html +3 -3
- package/docs/components/EuiTooltipContainerComponent.html +3 -3
- package/docs/components/EuiTreeComponent.html +3 -3
- package/docs/components/EuiTreeListComponent.html +3 -3
- package/docs/components/EuiTreeListItemComponent.html +3 -3
- package/docs/components/EuiTreeListItemContentComponent.html +3 -3
- package/docs/components/EuiTreeListToolbarComponent.html +3 -3
- package/docs/components/EuiUserProfileCardComponent.html +3 -3
- package/docs/components/EuiUserProfileComponent.html +3 -3
- package/docs/components/EuiUserProfileMenuComponent.html +3 -3
- package/docs/components/EuiUserProfileMenuItemComponent.html +3 -3
- package/docs/components/EuiWizardComponent.html +3 -3
- package/docs/components/EuiWizardStepComponent.html +3 -3
- package/docs/components/PaginationComponent.html +3 -3
- package/docs/components/PlaygroundComponent-1.html +3 -3
- package/docs/components/PlaygroundComponent.html +3 -3
- package/docs/components/PlaygroundStickyLastColumnComponent.html +3 -3
- package/docs/components/QuillEditorComponent.html +3 -3
- package/docs/components/VirtualScrollAsyncComponent.html +3 -3
- package/docs/components/VirtualScrollComponent.html +3 -3
- package/docs/dependencies.html +2 -196
- package/docs/directives/AutoResizeDirective.html +3 -3
- package/docs/directives/BaseStatesDirective.html +3 -3
- package/docs/directives/EuiAccordionItemHeaderDirective.html +3 -3
- package/docs/directives/EuiActionButtonsDirective.html +3 -3
- package/docs/directives/EuiAppPageWrapperDirective.html +3 -3
- package/docs/directives/EuiArrowKeyNavigableDirective.html +3 -3
- package/docs/directives/EuiChipListAppendContentDirective.html +3 -3
- package/docs/directives/EuiClearableDirective.html +3 -3
- package/docs/directives/EuiDashboardButtonIconDirective.html +3 -3
- package/docs/directives/EuiDashboardButtonLabelDirective.html +3 -3
- package/docs/directives/EuiDialogFooterDirective.html +3 -3
- package/docs/directives/EuiDialogHeaderDirective.html +3 -3
- package/docs/directives/EuiDropdownContentDirective.html +3 -3
- package/docs/directives/EuiDropdownTreeDirective.html +3 -3
- package/docs/directives/EuiEditorCustomToolbarTagDirective.html +3 -3
- package/docs/directives/EuiEditorMaxlengthDirective.html +3 -3
- package/docs/directives/EuiFieldsetLabelExtraContentTagDirective.html +3 -3
- package/docs/directives/EuiFieldsetLabelRightContentTagDirective.html +3 -3
- package/docs/directives/EuiHasPermissionDirective.html +3 -3
- package/docs/directives/EuiInputNumberDirective.html +3 -3
- package/docs/directives/EuiLetterFormatDirective.html +3 -3
- package/docs/directives/EuiLoadingDirective.html +3 -3
- package/docs/directives/EuiMaxLengthDirective.html +3 -3
- package/docs/directives/EuiMessageBoxFooterDirective.html +3 -3
- package/docs/directives/EuiMonthYearFormatDirective.html +3 -3
- package/docs/directives/EuiNgSelectOptionDirective.html +3 -3
- package/docs/directives/EuiPageColumnBodyContentDirective.html +3 -3
- package/docs/directives/EuiPageColumnFooterContentDirective.html +3 -3
- package/docs/directives/EuiPageColumnHeaderBodyContentDirective.html +3 -3
- package/docs/directives/EuiPageColumnHeaderCollapsedContentDirective.html +3 -3
- package/docs/directives/EuiPageColumnHeaderLeftContentDirective.html +3 -3
- package/docs/directives/EuiPageColumnHeaderRightContentDirective.html +3 -3
- package/docs/directives/EuiPopoverArrowPositionDirective.html +3 -3
- package/docs/directives/EuiResizableDirective.html +3 -3
- package/docs/directives/EuiScrollHandlerDirective.html +3 -3
- package/docs/directives/EuiScrollHandlerElementDirective.html +3 -3
- package/docs/directives/EuiSelectControlValueAccessor.html +3 -3
- package/docs/directives/EuiSelectMultipleControlValueAccessor.html +3 -3
- package/docs/directives/EuiSelectMultipleOption.html +3 -3
- package/docs/directives/EuiSmoothScrollDirective.html +3 -3
- package/docs/directives/EuiSmoothScrollToDirective.html +3 -3
- package/docs/directives/EuiTabSubLabelDirective.html +3 -3
- package/docs/directives/EuiTableStickyColumnDirective.html +3 -3
- package/docs/directives/EuiTableV2ExpandableRowDirective.html +3 -3
- package/docs/directives/EuiTableV2StickyColDirective.html +3 -3
- package/docs/directives/EuiTabsRightContentTagDirective.html +3 -3
- package/docs/directives/EuiTemplateDirective.html +3 -3
- package/docs/directives/EuiTooltipDirective.html +3 -3
- package/docs/directives/EuiTreeFormControlDirective.html +3 -3
- package/docs/directives/EuiTreeListItemDetailsContentTagDirective.html +3 -3
- package/docs/directives/EuiTreeListItemLabelTagDirective.html +3 -3
- package/docs/directives/EuiTreeListItemSubContainerContentTagDirective.html +3 -3
- package/docs/directives/EuiYearFormatDirective.html +3 -3
- package/docs/directives/InputDirective.html +3 -3
- package/docs/directives/TranslateMockDirective.html +3 -3
- package/docs/index.html +16 -70
- package/docs/injectables/EuiBreadcrumbService.html +3 -3
- package/docs/injectables/EuiChipListDragService.html +3 -3
- package/docs/injectables/EuiDialogService.html +3 -3
- package/docs/injectables/EuiDropdownService.html +3 -3
- package/docs/injectables/EuiFileUploadUtilsService.html +3 -3
- package/docs/injectables/EuiMessageBoxService.html +3 -3
- package/docs/injectables/EuiSearchUsersFavQueriesService.html +3 -3
- package/docs/injectables/EuiTableSelectableRowService.html +3 -3
- package/docs/injectables/EuiTableSortService.html +3 -3
- package/docs/injectables/EuiTableV2SelectableRowService.html +3 -3
- package/docs/injectables/EuiTableV2SortService.html +3 -3
- package/docs/injectables/EuiWizardService.html +3 -3
- package/docs/injectables/LoaderService.html +3 -3
- package/docs/injectables/UiStateService.html +3 -3
- package/docs/interfaces/AnnotationLabel.html +3 -3
- package/docs/interfaces/AnnotationStyle.html +3 -3
- package/docs/interfaces/ApexAnnotations.html +3 -3
- package/docs/interfaces/ApexChart.html +3 -3
- package/docs/interfaces/ApexDataLabels.html +3 -3
- package/docs/interfaces/ApexDiscretePoint.html +3 -3
- package/docs/interfaces/ApexDropShadow.html +3 -3
- package/docs/interfaces/ApexFill.html +3 -3
- package/docs/interfaces/ApexForecastDataPoints.html +3 -3
- package/docs/interfaces/ApexGrid.html +3 -3
- package/docs/interfaces/ApexLegend.html +3 -3
- package/docs/interfaces/ApexLocale.html +3 -3
- package/docs/interfaces/ApexMarkers.html +3 -3
- package/docs/interfaces/ApexNoData.html +3 -3
- package/docs/interfaces/ApexOptions.html +3 -3
- package/docs/interfaces/ApexPlotOptions.html +3 -3
- package/docs/interfaces/ApexResponsive.html +3 -3
- package/docs/interfaces/ApexStates.html +3 -3
- package/docs/interfaces/ApexStroke.html +3 -3
- package/docs/interfaces/ApexTheme.html +3 -3
- package/docs/interfaces/ApexTitleSubtitle.html +3 -3
- package/docs/interfaces/ApexTooltip.html +3 -3
- package/docs/interfaces/ApexXAxis.html +3 -3
- package/docs/interfaces/ApexYAxis.html +3 -3
- package/docs/interfaces/BetterTableModule.html +3 -3
- package/docs/interfaces/Blur.html +3 -3
- package/docs/interfaces/CleaveEventOnChange.html +3 -3
- package/docs/interfaces/CleaveInstance.html +3 -3
- package/docs/interfaces/ContentChange.html +3 -3
- package/docs/interfaces/CustomOption.html +3 -3
- package/docs/interfaces/EuiAutoCompleteItem.html +3 -3
- package/docs/interfaces/EuiChipDragDrop.html +3 -3
- package/docs/interfaces/EuiDateRangeSelectorDates.html +3 -3
- package/docs/interfaces/EuiDateTimePickerConfig.html +3 -3
- package/docs/interfaces/EuiDialogInterface.html +3 -3
- package/docs/interfaces/EuiDiscussionThreadItem.html +3 -3
- package/docs/interfaces/EuiEditorImageDialogConfig.html +3 -3
- package/docs/interfaces/EuiPaginationEvent.html +3 -3
- package/docs/interfaces/EuiTimePicker.html +3 -3
- package/docs/interfaces/EuiTimeRangePickerConfig.html +3 -3
- package/docs/interfaces/EuiTooltipInterface.html +3 -3
- package/docs/interfaces/EuiTreeContentBlockModel.html +3 -3
- package/docs/interfaces/EuiTreeItem.html +3 -3
- package/docs/interfaces/EuiTreeListFilterParams.html +3 -3
- package/docs/interfaces/EuiUploadedFileInterface.html +3 -3
- package/docs/interfaces/Focus.html +3 -3
- package/docs/interfaces/HTMLOption.html +3 -3
- package/docs/interfaces/IEuiWizardStep.html +3 -3
- package/docs/interfaces/ImageAnnotations.html +3 -3
- package/docs/interfaces/MultiSelectionLogic.html +3 -3
- package/docs/interfaces/NotificationMetadata.html +3 -3
- package/docs/interfaces/ObjectConstructor.html +3 -3
- package/docs/interfaces/OpenedDialogInterface.html +3 -3
- package/docs/interfaces/PaginationEvent.html +3 -3
- package/docs/interfaces/PointAnnotations.html +3 -3
- package/docs/interfaces/QuillConfig.html +3 -3
- package/docs/interfaces/QuillDynamicConfig.html +3 -3
- package/docs/interfaces/QuillModules.html +3 -3
- package/docs/interfaces/Range.html +3 -3
- package/docs/interfaces/SelectConfigModel.html +3 -3
- package/docs/interfaces/SelectionChange.html +3 -3
- package/docs/interfaces/SingleSelectionLogic.html +3 -3
- package/docs/interfaces/Sort.html +3 -3
- package/docs/interfaces/SortEvent.html +3 -3
- package/docs/interfaces/TextAnnotations.html +3 -3
- package/docs/interfaces/ToolbarItemConfig.html +3 -3
- package/docs/interfaces/UIState.html +3 -3
- package/docs/interfaces/UserProfile.html +3 -3
- package/docs/interfaces/Window.html +3 -3
- package/docs/interfaces/XAxisAnnotations.html +3 -3
- package/docs/interfaces/YAxisAnnotations.html +3 -3
- package/docs/js/menu-wc.js +12 -7
- package/docs/js/menu-wc_es5.js +1 -1
- package/docs/js/search/search_index.js +2 -2
- package/docs/license.html +2 -2
- package/docs/miscellaneous/enumerations.html +4 -4
- package/docs/miscellaneous/functions.html +9 -9
- package/docs/miscellaneous/typealiases.html +40 -40
- package/docs/miscellaneous/variables.html +617 -189
- package/docs/modules/EuiAccordionModule.html +3 -3
- package/docs/modules/EuiAlertModule.html +3 -3
- package/docs/modules/EuiAllModule.html +3 -3
- package/docs/modules/EuiAppBreadcrumbModule.html +3 -3
- package/docs/modules/EuiAppFooterModule.html +3 -3
- package/docs/modules/EuiAppHeaderModule.html +3 -3
- package/docs/modules/EuiAppModule.html +3 -3
- package/docs/modules/EuiAppSidebarModule.html +3 -3
- package/docs/modules/EuiAppToolbarModule.html +3 -3
- package/docs/modules/EuiAppTopMessageModule.html +3 -3
- package/docs/modules/EuiAutocompleteModule.html +3 -3
- package/docs/modules/EuiAvatarModule.html +3 -3
- package/docs/modules/EuiBadgeModule.html +3 -3
- package/docs/modules/EuiBlockContentModule.html +3 -3
- package/docs/modules/EuiBlockDocumentModule.html +3 -3
- package/docs/modules/EuiBreadcrumbModule.html +3 -3
- package/docs/modules/EuiButtonGroupModule.html +3 -3
- package/docs/modules/EuiButtonModule.html +3 -3
- package/docs/modules/EuiButtonV2Module.html +3 -3
- package/docs/modules/EuiCardModule.html +3 -3
- package/docs/modules/EuiChartsModule.html +3 -3
- package/docs/modules/EuiChipListModule.html +3 -3
- package/docs/modules/EuiChipModule.html +3 -3
- package/docs/modules/EuiCoerceBooleanPipeModule.html +3 -3
- package/docs/modules/EuiDashboardButtonModule.html +3 -3
- package/docs/modules/EuiDashboardCardModule.html +3 -3
- package/docs/modules/EuiDateRangeSelectorModule.html +3 -3
- package/docs/modules/EuiDatepickerModule.html +3 -3
- package/docs/modules/EuiDialogModule.html +3 -3
- package/docs/modules/EuiDimmerModule.html +3 -3
- package/docs/modules/EuiDisableContentModule.html +3 -3
- package/docs/modules/EuiDiscussionThreadModule.html +3 -3
- package/docs/modules/EuiDropdownContentModule.html +3 -3
- package/docs/modules/EuiDropdownModule.html +3 -3
- package/docs/modules/EuiDropdownTreeDirectiveModule.html +3 -3
- package/docs/modules/EuiEditorModule.html +3 -3
- package/docs/modules/EuiFeedbackMessageModule.html +3 -3
- package/docs/modules/EuiFieldsetModule.html +3 -3
- package/docs/modules/EuiFileUploadModule.html +3 -3
- package/docs/modules/EuiFooterModule.html +3 -3
- package/docs/modules/EuiGrowlModule.html +3 -3
- package/docs/modules/EuiHasPermissionDirectiveModule.html +3 -3
- package/docs/modules/EuiHeaderModule.html +3 -3
- package/docs/modules/EuiIconButtonExpanderModule.html +3 -3
- package/docs/modules/EuiIconButtonModule.html +3 -3
- package/docs/modules/EuiIconColorModule.html +3 -3
- package/docs/modules/EuiIconInputModule.html +3 -3
- package/docs/modules/EuiIconModule.html +3 -3
- package/docs/modules/EuiIconStateModule.html +3 -3
- package/docs/modules/EuiIconToggleModule.html +3 -3
- package/docs/modules/EuiInputCheckboxModule.html +3 -3
- package/docs/modules/EuiInputGroupModule.html +3 -3
- package/docs/modules/EuiInputNumberDirectiveModule.html +3 -3
- package/docs/modules/EuiInputNumberModule.html +3 -3
- package/docs/modules/EuiInputRadioModule.html +3 -3
- package/docs/modules/EuiInputTextModule.html +3 -3
- package/docs/modules/EuiLabelModule.html +3 -3
- package/docs/modules/EuiLanguageSelectorModule.html +3 -3
- package/docs/modules/EuiLayoutModule.html +3 -3
- package/docs/modules/EuiListModule.html +3 -3
- package/docs/modules/EuiMaxLengthDirectiveModule.html +3 -3
- package/docs/modules/EuiMenuModule.html +3 -3
- package/docs/modules/EuiMessageBoxModule.html +3 -3
- package/docs/modules/EuiNavbarModule.html +3 -3
- package/docs/modules/EuiNotificationsModule.html +3 -3
- package/docs/modules/EuiNotificationsV2Module.html +3 -3
- package/docs/modules/EuiOverlayModule.html +3 -3
- package/docs/modules/EuiPageModule.html +3 -3
- package/docs/modules/EuiPaginatorModule.html +3 -3
- package/docs/modules/EuiPopoverModule.html +3 -3
- package/docs/modules/EuiProgressBarModule.html +3 -3
- package/docs/modules/EuiProgressCircleModule.html +3 -3
- package/docs/modules/EuiResizableDirectiveModule.html +3 -3
- package/docs/modules/EuiScrollHandlerDirectiveModule.html +3 -3
- package/docs/modules/EuiSearchFavouriteQueriesModule.html +3 -3
- package/docs/modules/EuiSelectModule.html +3 -3
- package/docs/modules/EuiSidebarMenuModule.html +3 -3
- package/docs/modules/EuiSidebarToggleModule.html +3 -3
- package/docs/modules/EuiSkeletonModule.html +3 -3
- package/docs/modules/EuiSlideToggleModule.html +3 -3
- package/docs/modules/EuiSmoothScrollDirectiveModule.html +3 -3
- package/docs/modules/EuiSplitButtonModule.html +3 -3
- package/docs/modules/EuiTableModule.html +3 -3
- package/docs/modules/EuiTableV2Module.html +3 -3
- package/docs/modules/EuiTabsModule.html +3 -3
- package/docs/modules/EuiTemplateDirectiveModule.html +3 -3
- package/docs/modules/EuiTextAreaModule.html +3 -3
- package/docs/modules/EuiTimebarModule.html +3 -3
- package/docs/modules/EuiTimelineModule.html +3 -3
- package/docs/modules/EuiTimepickerModule.html +3 -3
- package/docs/modules/EuiToolbarModule.html +3 -3
- package/docs/modules/EuiTooltipDirectiveModule.html +3 -3
- package/docs/modules/EuiTreeFormControlDirectiveModule.html +3 -3
- package/docs/modules/EuiTreeListModule.html +3 -3
- package/docs/modules/EuiTreeModule.html +3 -3
- package/docs/modules/EuiTruncatePipeModule.html +3 -3
- package/docs/modules/EuiUserProfileModule.html +3 -3
- package/docs/modules/EuiWizardModule.html +3 -3
- package/docs/modules/QuillModule.html +3 -3
- package/docs/modules/TranslateMockModule.html +3 -3
- package/docs/modules.html +2 -2
- package/docs/overview.html +241 -0
- package/docs/pipes/ClassFilterPipe.html +3 -3
- package/docs/pipes/EuiCoerceBooleanPipe.html +3 -3
- package/docs/pipes/EuiFileSizePipe.html +3 -3
- package/docs/pipes/EuiTableHighlightFilterPipe.html +3 -3
- package/docs/pipes/EuiTableV2HighlightPipe.html +3 -3
- package/docs/pipes/EuiTruncatePipe.html +3 -3
- package/docs/pipes/TranslateMockPipe.html +3 -3
- package/docs/properties.html +3 -7
- package/esm2022/eui-chip-list/eui-chip-list.component.mjs +3 -3
- package/esm2022/eui-dialog/container/eui-dialog-container.component.mjs +7 -4
- package/esm2022/eui-dropdown/dropdown-item/eui-dropdown-item.component.mjs +11 -4
- package/esm2022/eui-dropdown/eui-dropdown.component.mjs +27 -6
- package/esm2022/eui-file-upload/file-preview/file-preview.component.mjs +7 -3
- package/esm2022/eui-file-upload/utils/eui-file-upload.validators.mjs +3 -2
- package/esm2022/eui-file-upload/utils/mime-types.mjs +292 -39
- package/esm2022/eui-paginator/eui-paginator.component.mjs +3 -3
- package/esm2022/eui-table-v2/eui-table-v2.component.mjs +17 -11
- package/esm2022/eui-table-v2/selectable-row/eui-table-v2-selectable-row.component.mjs +4 -2
- package/esm2022/layout/eui-toolbar/toolbar-menu/toolbar-menu.component.mjs +3 -3
- package/eui-dialog/container/eui-dialog-container.component.d.ts +2 -1
- package/eui-dialog/container/eui-dialog-container.component.d.ts.map +1 -1
- package/eui-dropdown/dropdown-item/eui-dropdown-item.component.d.ts +4 -3
- package/eui-dropdown/dropdown-item/eui-dropdown-item.component.d.ts.map +1 -1
- package/eui-dropdown/eui-dropdown.component.d.ts.map +1 -1
- package/eui-file-upload/file-preview/file-preview.component.d.ts +1 -0
- package/eui-file-upload/file-preview/file-preview.component.d.ts.map +1 -1
- package/eui-file-upload/utils/mime-types.d.ts.map +1 -1
- package/eui-table-v2/eui-table-v2.component.d.ts.map +1 -1
- package/eui-table-v2/selectable-row/eui-table-v2-selectable-row.component.d.ts.map +1 -1
- package/fesm2022/eui-components-eui-chip-list.mjs +2 -2
- package/fesm2022/eui-components-eui-chip-list.mjs.map +1 -1
- package/fesm2022/eui-components-eui-dialog.mjs +6 -3
- package/fesm2022/eui-components-eui-dialog.mjs.map +1 -1
- package/fesm2022/eui-components-eui-dropdown.mjs +36 -8
- package/fesm2022/eui-components-eui-dropdown.mjs.map +1 -1
- package/fesm2022/eui-components-eui-file-upload.mjs +299 -41
- package/fesm2022/eui-components-eui-file-upload.mjs.map +1 -1
- package/fesm2022/eui-components-eui-paginator.mjs +2 -2
- package/fesm2022/eui-components-eui-paginator.mjs.map +1 -1
- package/fesm2022/eui-components-eui-table-v2.mjs +19 -11
- package/fesm2022/eui-components-eui-table-v2.mjs.map +1 -1
- package/fesm2022/eui-components-layout.mjs +2 -2
- package/fesm2022/eui-components-layout.mjs.map +1 -1
- package/package.json +507 -507
- package/LICENSE +0 -296
- package/README.md +0 -26
- package/directives/package.json +0 -3
- package/eui-accordion/package.json +0 -3
- package/eui-alert/package.json +0 -3
- package/eui-autocomplete/package.json +0 -3
- package/eui-avatar/package.json +0 -3
- package/eui-badge/package.json +0 -3
- package/eui-block-content/package.json +0 -3
- package/eui-block-document/package.json +0 -3
- package/eui-breadcrumb/package.json +0 -3
- package/eui-button/package.json +0 -3
- package/eui-button-group/package.json +0 -3
- package/eui-button-v2/package.json +0 -3
- package/eui-card/package.json +0 -3
- package/eui-chip/package.json +0 -3
- package/eui-chip-list/package.json +0 -3
- package/eui-dashboard-button/package.json +0 -3
- package/eui-dashboard-card/package.json +0 -3
- package/eui-date-range-selector/package.json +0 -3
- package/eui-datepicker/package.json +0 -3
- package/eui-dialog/package.json +0 -3
- package/eui-dimmer/package.json +0 -3
- package/eui-disable-content/package.json +0 -3
- package/eui-discussion-thread/package.json +0 -3
- package/eui-dropdown/package.json +0 -3
- package/eui-feedback-message/package.json +0 -3
- package/eui-fieldset/package.json +0 -3
- package/eui-file-upload/package.json +0 -3
- package/eui-growl/package.json +0 -3
- package/eui-icon/package.json +0 -3
- package/eui-icon-button/package.json +0 -3
- package/eui-icon-button-expander/package.json +0 -3
- package/eui-icon-color/package.json +0 -3
- package/eui-icon-input/package.json +0 -3
- package/eui-icon-state/package.json +0 -3
- package/eui-icon-toggle/package.json +0 -3
- package/eui-input-checkbox/package.json +0 -3
- package/eui-input-group/package.json +0 -3
- package/eui-input-number/package.json +0 -3
- package/eui-input-radio/package.json +0 -3
- package/eui-input-text/package.json +0 -3
- package/eui-label/package.json +0 -3
- package/eui-language-selector/package.json +0 -3
- package/eui-list/package.json +0 -3
- package/eui-menu/package.json +0 -3
- package/eui-message-box/package.json +0 -3
- package/eui-navbar/package.json +0 -3
- package/eui-overlay/package.json +0 -3
- package/eui-page/package.json +0 -3
- package/eui-paginator/package.json +0 -3
- package/eui-popover/package.json +0 -3
- package/eui-progress-bar/package.json +0 -3
- package/eui-progress-circle/package.json +0 -3
- package/eui-select/package.json +0 -3
- package/eui-sidebar-menu/package.json +0 -3
- package/eui-skeleton/package.json +0 -3
- package/eui-slide-toggle/package.json +0 -3
- package/eui-split-button/package.json +0 -3
- package/eui-table/package.json +0 -3
- package/eui-table-v2/package.json +0 -3
- package/eui-tabs/package.json +0 -3
- package/eui-textarea/package.json +0 -3
- package/eui-timebar/package.json +0 -3
- package/eui-timeline/package.json +0 -3
- package/eui-timepicker/package.json +0 -3
- package/eui-tree/package.json +0 -3
- package/eui-tree-list/package.json +0 -3
- package/eui-user-profile/package.json +0 -3
- package/eui-wizard/package.json +0 -3
- package/externals/charts/package.json +0 -3
- package/externals/eui-editor/package.json +0 -3
- package/externals/helpers/package.json +0 -3
- package/externals/quill/package.json +0 -3
- package/externals/search/favourite-queries/package.json +0 -3
- package/layout/package.json +0 -3
- package/pipes/package.json +0 -3
- package/shared/package.json +0 -3
- package/validators/package.json +0 -3
@@ -83,6 +83,7 @@ class EuiFilePreviewComponent {
|
|
83
83
|
};
|
84
84
|
this.removeFromList = new EventEmitter();
|
85
85
|
this.isLoading = false;
|
86
|
+
this.typeFromFileExtension = null;
|
86
87
|
// TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html
|
87
88
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
88
89
|
this.itemClick = new EventEmitter();
|
@@ -108,6 +109,9 @@ class EuiFilePreviewComponent {
|
|
108
109
|
this.url = event.target.result;
|
109
110
|
this.fileExtension = this.getFileExtension(this.file.name);
|
110
111
|
this.icon = this.getIconForMime(this.fileExtension);
|
112
|
+
if (this.fileExtension === 'msg') {
|
113
|
+
this.typeFromFileExtension = 'application/vnd.ms-outlook';
|
114
|
+
}
|
111
115
|
const blob = new Blob([reader.result], { type: this.file.type });
|
112
116
|
const imageUrl = URL.createObjectURL(blob);
|
113
117
|
this.previewData = this.getPreviewForMime(this.fileExtension, imageUrl);
|
@@ -159,11 +163,11 @@ class EuiFilePreviewComponent {
|
|
159
163
|
return !this.previewAsIconConfig[f] ? 'eui-file-empty-o' : this.previewAsIconConfig[f];
|
160
164
|
}
|
161
165
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EuiFilePreviewComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
162
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: EuiFilePreviewComponent, selector: "eui-file-preview", inputs: { file: "file", uploadedFileTemplate: "uploadedFileTemplate", index: "index", previewAsIconConfig: "previewAsIconConfig", hasPreview: ["hasPreview", "hasPreview", booleanAttribute], isFilenameDisplayed: ["isFilenameDisplayed", "isFilenameDisplayed", booleanAttribute], isFilesizeDisplayed: ["isFilesizeDisplayed", "isFilesizeDisplayed", booleanAttribute], isFiletypeDisplayed: ["isFiletypeDisplayed", "isFiletypeDisplayed", booleanAttribute], hasPreviewAsImage: ["hasPreviewAsImage", "hasPreviewAsImage", booleanAttribute], hasPreviewAsIcon: ["hasPreviewAsIcon", "hasPreviewAsIcon", booleanAttribute], isItemsClickable: ["isItemsClickable", "isItemsClickable", booleanAttribute], isFileObject: ["isFileObject", "isFileObject", booleanAttribute] }, outputs: { removeFromList: "removeFromList", itemClick: "itemClick" }, queries: [{ propertyName: "templates", predicate: EuiTemplateDirective }], ngImport: i0, template: "@if (uploadedFileTemplate) {\n <ng-template\n [ngTemplateOutlet]=\"uploadedFileTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: { file: { id: file.id, name: file.name, url: file.url || previewData?.display, size: file.size, type: file.type }, index, isFileObject } }\">\n </ng-template>\n} @else {\n <div class=\"eui-file-upload__preview\">\n <div class=\"eui-file-upload__preview--left\">\n <div class=\"eui-file-upload__preview--left__image\" *ngIf=\"hasPreview && hasPreviewAsImage\">\n <img [src]=\"previewData.display\" *ngIf=\"url && previewData.image\" />\n <eui-icon-svg *ngIf=\"previewData && !previewData.image\" icon=\"{{ previewData.display }}\" size=\"l\" fillColor=\"info-100\" class=\"eui-u-mr-s\"></eui-icon-svg>\n <div *ngIf=\"isLoading\" class=\"loading-container\">\n <eui-icon-svg isLoading size=\"2xl\"></eui-icon-svg>\n </div>\n </div>\n <div *ngIf=\"hasPreview && hasPreviewAsIcon\">\n <eui-icon-svg icon=\"{{ icon }}\" size=\"l\" fillColor=\"info-100\" class=\"eui-u-mr-s\"></eui-icon-svg>\n </div>\n <div class=\"eui-file-upload__preview--left__filename eui-u-text-truncate\" *ngIf=\"isFilenameDisplayed\">\n <ng-container *ngIf=\"!isItemsClickable\">\n {{ file.name }}\n </ng-container>\n <ng-container *ngIf=\"isItemsClickable\">\n <a href=\"#\" (click)=\"onItemClick($event)\" class=\"eui-u-text-link eui-u-text-truncate\">{{ file.name }}</a>\n </ng-container>\n </div>\n </div>\n <div class=\"eui-file-upload__preview--right\">\n <div class=\"eui-u-text-no-wrap eui-u-ml-m\" *ngIf=\"isFilesizeDisplayed\">{{ file.size | filesize }}</div>\n <div class=\"eui-u-ml-m\" *ngIf=\"isFiletypeDisplayed\"><span euiLabel>{{ file.type }}</span></div>\n <div class=\"eui-u-ml-m\">\n <button euiButton euiDanger euiRounded euiIconButton euiBasicButton type=\"button\" (click)=\"onRemoveFromList()\">\n <eui-icon-svg icon=\"eui-ecl-trash\"></eui-icon-svg>\n </button>\n </div>\n </div>\n </div>\n}\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.EuiButtonComponent, selector: "button[euiButton], a[euiButton]", inputs: ["e2eAttr", "id", "euiBasicButton", "euiButtonCall", "euiBlockButton", "euiIconButton", "euiLineWrap", "isChecked", "euiDisabled"], outputs: ["buttonClick"] }, { kind: "component", type: i3.EuiIconSvgComponent, selector: "eui-icon-svg, span[euiIconSvg], i[euiIconSvg]", inputs: ["icon", "fillColor", "set", "size", "style", "iconUrl", "transform", "euiVariant", "aria-label", "ariaHidden", "focusable", "isLoading", "isInputIcon", "euiStart", "euiEnd"] }, { kind: "pipe", type: EuiFileSizePipe, name: "filesize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
166
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: EuiFilePreviewComponent, selector: "eui-file-preview", inputs: { file: "file", uploadedFileTemplate: "uploadedFileTemplate", index: "index", previewAsIconConfig: "previewAsIconConfig", hasPreview: ["hasPreview", "hasPreview", booleanAttribute], isFilenameDisplayed: ["isFilenameDisplayed", "isFilenameDisplayed", booleanAttribute], isFilesizeDisplayed: ["isFilesizeDisplayed", "isFilesizeDisplayed", booleanAttribute], isFiletypeDisplayed: ["isFiletypeDisplayed", "isFiletypeDisplayed", booleanAttribute], hasPreviewAsImage: ["hasPreviewAsImage", "hasPreviewAsImage", booleanAttribute], hasPreviewAsIcon: ["hasPreviewAsIcon", "hasPreviewAsIcon", booleanAttribute], isItemsClickable: ["isItemsClickable", "isItemsClickable", booleanAttribute], isFileObject: ["isFileObject", "isFileObject", booleanAttribute] }, outputs: { removeFromList: "removeFromList", itemClick: "itemClick" }, queries: [{ propertyName: "templates", predicate: EuiTemplateDirective }], ngImport: i0, template: "@if (uploadedFileTemplate) {\n <ng-template\n [ngTemplateOutlet]=\"uploadedFileTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: { file: { id: file.id, name: file.name, url: file.url || previewData?.display, size: file.size, type: file.type }, index, isFileObject } }\">\n </ng-template>\n} @else {\n <div class=\"eui-file-upload__preview\">\n <div class=\"eui-file-upload__preview--left\">\n <div class=\"eui-file-upload__preview--left__image\" *ngIf=\"hasPreview && hasPreviewAsImage\">\n <img [src]=\"previewData.display\" *ngIf=\"url && previewData.image\" />\n <eui-icon-svg *ngIf=\"previewData && !previewData.image\" icon=\"{{ previewData.display }}\" size=\"l\" fillColor=\"info-100\" class=\"eui-u-mr-s\"></eui-icon-svg>\n <div *ngIf=\"isLoading\" class=\"loading-container\">\n <eui-icon-svg isLoading size=\"2xl\"></eui-icon-svg>\n </div>\n </div>\n <div *ngIf=\"hasPreview && hasPreviewAsIcon\">\n <eui-icon-svg icon=\"{{ icon }}\" size=\"l\" fillColor=\"info-100\" class=\"eui-u-mr-s\"></eui-icon-svg>\n </div>\n <div class=\"eui-file-upload__preview--left__filename eui-u-text-truncate\" *ngIf=\"isFilenameDisplayed\">\n <ng-container *ngIf=\"!isItemsClickable\">\n {{ file.name }}\n </ng-container>\n <ng-container *ngIf=\"isItemsClickable\">\n <a href=\"#\" (click)=\"onItemClick($event)\" class=\"eui-u-text-link eui-u-text-truncate\">{{ file.name }}</a>\n </ng-container>\n </div>\n </div>\n <div class=\"eui-file-upload__preview--right\">\n <div class=\"eui-u-text-no-wrap eui-u-ml-m\" *ngIf=\"isFilesizeDisplayed\">{{ file.size | filesize }}</div>\n <div class=\"eui-u-ml-m\" *ngIf=\"isFiletypeDisplayed\"><span euiLabel>{{ file.type.length > 0 ? file.type : typeFromFileExtension }}</span></div>\n <div class=\"eui-u-ml-m\">\n <button euiButton euiDanger euiRounded euiIconButton euiBasicButton type=\"button\" (click)=\"onRemoveFromList()\">\n <eui-icon-svg icon=\"eui-ecl-trash\"></eui-icon-svg>\n </button>\n </div>\n </div>\n </div>\n}\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.EuiButtonComponent, selector: "button[euiButton], a[euiButton]", inputs: ["e2eAttr", "id", "euiBasicButton", "euiButtonCall", "euiBlockButton", "euiIconButton", "euiLineWrap", "isChecked", "euiDisabled"], outputs: ["buttonClick"] }, { kind: "component", type: i3.EuiIconSvgComponent, selector: "eui-icon-svg, span[euiIconSvg], i[euiIconSvg]", inputs: ["icon", "fillColor", "set", "size", "style", "iconUrl", "transform", "euiVariant", "aria-label", "ariaHidden", "focusable", "isLoading", "isInputIcon", "euiStart", "euiEnd"] }, { kind: "pipe", type: EuiFileSizePipe, name: "filesize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
163
167
|
}
|
164
168
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EuiFilePreviewComponent, decorators: [{
|
165
169
|
type: Component,
|
166
|
-
args: [{ selector: 'eui-file-preview', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "@if (uploadedFileTemplate) {\n <ng-template\n [ngTemplateOutlet]=\"uploadedFileTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: { file: { id: file.id, name: file.name, url: file.url || previewData?.display, size: file.size, type: file.type }, index, isFileObject } }\">\n </ng-template>\n} @else {\n <div class=\"eui-file-upload__preview\">\n <div class=\"eui-file-upload__preview--left\">\n <div class=\"eui-file-upload__preview--left__image\" *ngIf=\"hasPreview && hasPreviewAsImage\">\n <img [src]=\"previewData.display\" *ngIf=\"url && previewData.image\" />\n <eui-icon-svg *ngIf=\"previewData && !previewData.image\" icon=\"{{ previewData.display }}\" size=\"l\" fillColor=\"info-100\" class=\"eui-u-mr-s\"></eui-icon-svg>\n <div *ngIf=\"isLoading\" class=\"loading-container\">\n <eui-icon-svg isLoading size=\"2xl\"></eui-icon-svg>\n </div>\n </div>\n <div *ngIf=\"hasPreview && hasPreviewAsIcon\">\n <eui-icon-svg icon=\"{{ icon }}\" size=\"l\" fillColor=\"info-100\" class=\"eui-u-mr-s\"></eui-icon-svg>\n </div>\n <div class=\"eui-file-upload__preview--left__filename eui-u-text-truncate\" *ngIf=\"isFilenameDisplayed\">\n <ng-container *ngIf=\"!isItemsClickable\">\n {{ file.name }}\n </ng-container>\n <ng-container *ngIf=\"isItemsClickable\">\n <a href=\"#\" (click)=\"onItemClick($event)\" class=\"eui-u-text-link eui-u-text-truncate\">{{ file.name }}</a>\n </ng-container>\n </div>\n </div>\n <div class=\"eui-file-upload__preview--right\">\n <div class=\"eui-u-text-no-wrap eui-u-ml-m\" *ngIf=\"isFilesizeDisplayed\">{{ file.size | filesize }}</div>\n <div class=\"eui-u-ml-m\" *ngIf=\"isFiletypeDisplayed\"><span euiLabel>{{ file.type }}</span></div>\n <div class=\"eui-u-ml-m\">\n <button euiButton euiDanger euiRounded euiIconButton euiBasicButton type=\"button\" (click)=\"onRemoveFromList()\">\n <eui-icon-svg icon=\"eui-ecl-trash\"></eui-icon-svg>\n </button>\n </div>\n </div>\n </div>\n}\n" }]
|
170
|
+
args: [{ selector: 'eui-file-preview', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "@if (uploadedFileTemplate) {\n <ng-template\n [ngTemplateOutlet]=\"uploadedFileTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: { file: { id: file.id, name: file.name, url: file.url || previewData?.display, size: file.size, type: file.type }, index, isFileObject } }\">\n </ng-template>\n} @else {\n <div class=\"eui-file-upload__preview\">\n <div class=\"eui-file-upload__preview--left\">\n <div class=\"eui-file-upload__preview--left__image\" *ngIf=\"hasPreview && hasPreviewAsImage\">\n <img [src]=\"previewData.display\" *ngIf=\"url && previewData.image\" />\n <eui-icon-svg *ngIf=\"previewData && !previewData.image\" icon=\"{{ previewData.display }}\" size=\"l\" fillColor=\"info-100\" class=\"eui-u-mr-s\"></eui-icon-svg>\n <div *ngIf=\"isLoading\" class=\"loading-container\">\n <eui-icon-svg isLoading size=\"2xl\"></eui-icon-svg>\n </div>\n </div>\n <div *ngIf=\"hasPreview && hasPreviewAsIcon\">\n <eui-icon-svg icon=\"{{ icon }}\" size=\"l\" fillColor=\"info-100\" class=\"eui-u-mr-s\"></eui-icon-svg>\n </div>\n <div class=\"eui-file-upload__preview--left__filename eui-u-text-truncate\" *ngIf=\"isFilenameDisplayed\">\n <ng-container *ngIf=\"!isItemsClickable\">\n {{ file.name }}\n </ng-container>\n <ng-container *ngIf=\"isItemsClickable\">\n <a href=\"#\" (click)=\"onItemClick($event)\" class=\"eui-u-text-link eui-u-text-truncate\">{{ file.name }}</a>\n </ng-container>\n </div>\n </div>\n <div class=\"eui-file-upload__preview--right\">\n <div class=\"eui-u-text-no-wrap eui-u-ml-m\" *ngIf=\"isFilesizeDisplayed\">{{ file.size | filesize }}</div>\n <div class=\"eui-u-ml-m\" *ngIf=\"isFiletypeDisplayed\"><span euiLabel>{{ file.type.length > 0 ? file.type : typeFromFileExtension }}</span></div>\n <div class=\"eui-u-ml-m\">\n <button euiButton euiDanger euiRounded euiIconButton euiBasicButton type=\"button\" (click)=\"onRemoveFromList()\">\n <eui-icon-svg icon=\"eui-ecl-trash\"></eui-icon-svg>\n </button>\n </div>\n </div>\n </div>\n}\n" }]
|
167
171
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { file: [{
|
168
172
|
type: Input
|
169
173
|
}], uploadedFileTemplate: [{
|
@@ -611,7 +615,7 @@ const getMimeType = (header) => {
|
|
611
615
|
// convert Uint8Array to hex string
|
612
616
|
const hex = uint8ArrayToHexString(header);
|
613
617
|
// map hex string to mime type
|
614
|
-
if (hex.startsWith('
|
618
|
+
if (hex.startsWith('ffd8ff'))
|
615
619
|
return 'image/jpeg';
|
616
620
|
if (hex.startsWith('89504e47'))
|
617
621
|
return 'image/png';
|
@@ -635,24 +639,10 @@ const getMimeType = (header) => {
|
|
635
639
|
return 'image/vnd.adobe.photoshop';
|
636
640
|
if (hex.startsWith('06054b50'))
|
637
641
|
return 'application/x-indesign';
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
if (hex.startsWith('504b0304'))
|
643
|
-
return 'application/vnd.oasis.opendocument.text';
|
644
|
-
if (hex.startsWith('504b0304'))
|
645
|
-
return 'application/vnd.oasis.opendocument.spreadsheet';
|
646
|
-
if (hex.startsWith('504b0304'))
|
647
|
-
return 'application/vnd.oasis.opendocument.presentation';
|
648
|
-
if (hex.startsWith('504b0304'))
|
649
|
-
return 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
|
650
|
-
if (hex.startsWith('504b0304'))
|
651
|
-
return 'application/vnd.openxmlformats-officedocument.presentationml.presentation';
|
652
|
-
if (hex.startsWith('504b0304'))
|
653
|
-
return 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
|
654
|
-
if (hex.startsWith('504b0304'))
|
655
|
-
return 'application/zip';
|
642
|
+
// Handle ZIP-based formats by examining content
|
643
|
+
if (hex.startsWith('504b0304')) {
|
644
|
+
return identifyZipBasedFormat(header);
|
645
|
+
}
|
656
646
|
if (hex.startsWith('7b2274797065223a226a736f6e227d'))
|
657
647
|
return 'application/json';
|
658
648
|
if (hex.startsWith('7573746172'))
|
@@ -684,11 +674,7 @@ const getMimeType = (header) => {
|
|
684
674
|
if (hex.startsWith('0a010301'))
|
685
675
|
return 'audio/qcelp';
|
686
676
|
if (hex.startsWith('3026b2758e66cf11'))
|
687
|
-
return
|
688
|
-
if (hex.startsWith('3026b2758e66cf11'))
|
689
|
-
return 'video/x-ms-asf';
|
690
|
-
if (hex.startsWith('3026b2758e66cf11'))
|
691
|
-
return 'application/vnd.ms-asf';
|
677
|
+
return identifyAsfFormat(header);
|
692
678
|
if (hex.startsWith('000001ba'))
|
693
679
|
return 'video/mpeg';
|
694
680
|
if (hex.startsWith('00000020667479703367'))
|
@@ -700,11 +686,7 @@ const getMimeType = (header) => {
|
|
700
686
|
if (hex.startsWith('4f707573'))
|
701
687
|
return 'audio/opus';
|
702
688
|
if (hex.startsWith('4f676753'))
|
703
|
-
return
|
704
|
-
if (hex.startsWith('4f676753'))
|
705
|
-
return 'audio/ogg';
|
706
|
-
if (hex.startsWith('4f676753'))
|
707
|
-
return 'application/ogg';
|
689
|
+
return identifyOggFormat(header);
|
708
690
|
if (hex.startsWith('664c6143'))
|
709
691
|
return 'audio/x-flac';
|
710
692
|
if (hex.startsWith('4d414320'))
|
@@ -749,8 +731,6 @@ const getMimeType = (header) => {
|
|
749
731
|
return 'application/x-sqlite3';
|
750
732
|
if (hex.startsWith('4e45531a00000001'))
|
751
733
|
return 'application/x-nintendo-nes-rom';
|
752
|
-
if (hex.startsWith('504b0304'))
|
753
|
-
return 'application/x-google-chrome-extension';
|
754
734
|
if (hex.startsWith('4d534346'))
|
755
735
|
return 'application/vnd.ms-cab-compressed';
|
756
736
|
if (hex.startsWith('213c617263683e0a'))
|
@@ -794,13 +774,7 @@ const getMimeType = (header) => {
|
|
794
774
|
if (hex.startsWith('424f4f4b4d4f4249'))
|
795
775
|
return 'application/x-mobipocket-ebook';
|
796
776
|
if (hex.startsWith('667479706174'))
|
797
|
-
return
|
798
|
-
if (hex.startsWith('667479706174'))
|
799
|
-
return 'image/heif-sequence';
|
800
|
-
if (hex.startsWith('667479706174'))
|
801
|
-
return 'image/heic';
|
802
|
-
if (hex.startsWith('667479706174'))
|
803
|
-
return 'image/heic-sequence';
|
777
|
+
return identifyHeifFormat(header);
|
804
778
|
if (hex.startsWith('4b545820'))
|
805
779
|
return 'image/ktx';
|
806
780
|
if (hex.startsWith('4449434d'))
|
@@ -821,9 +795,292 @@ const getMimeType = (header) => {
|
|
821
795
|
return 'audio/vnd.dolby.dd-raw';
|
822
796
|
return null;
|
823
797
|
};
|
798
|
+
const identifyZipBasedFormat = (data) => {
|
799
|
+
try {
|
800
|
+
const fileEntries = extractZipFileList(data);
|
801
|
+
// Chrome extension
|
802
|
+
if (fileEntries.includes('manifest.json')) {
|
803
|
+
return 'application/x-google-chrome-extension';
|
804
|
+
}
|
805
|
+
// EPUB
|
806
|
+
if (fileEntries.includes('META-INF/container.xml') || fileEntries.includes('mimetype')) {
|
807
|
+
return 'application/epub+zip';
|
808
|
+
}
|
809
|
+
// OpenDocument formats
|
810
|
+
if (fileEntries.includes('META-INF/manifest.xml')) {
|
811
|
+
if (fileEntries.some(f => f.endsWith('.odp')))
|
812
|
+
return 'application/vnd.oasis.opendocument.presentation';
|
813
|
+
if (fileEntries.some(f => f.endsWith('.ods')))
|
814
|
+
return 'application/vnd.oasis.opendocument.spreadsheet';
|
815
|
+
if (fileEntries.some(f => f.endsWith('.odt')))
|
816
|
+
return 'application/vnd.oasis.opendocument.text';
|
817
|
+
}
|
818
|
+
// Microsoft Office formats
|
819
|
+
if (fileEntries.includes('[Content_Types].xml')) {
|
820
|
+
if (fileEntries.includes('ppt/presentation.xml'))
|
821
|
+
return 'application/vnd.openxmlformats-officedocument.presentationml.presentation';
|
822
|
+
if (fileEntries.includes('xl/workbook.xml'))
|
823
|
+
return 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
|
824
|
+
if (fileEntries.includes('word/document.xml'))
|
825
|
+
return 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
|
826
|
+
}
|
827
|
+
// Default to generic ZIP
|
828
|
+
return 'application/zip';
|
829
|
+
}
|
830
|
+
catch {
|
831
|
+
return 'application/zip';
|
832
|
+
}
|
833
|
+
};
|
834
|
+
const extractZipFileList = (data) => {
|
835
|
+
// Simplified ZIP parsing - looks for central directory entries
|
836
|
+
const files = [];
|
837
|
+
let offset = 0;
|
838
|
+
while (offset < data.length - 4) {
|
839
|
+
// Look for local file header signature (0x04034b50)
|
840
|
+
if (data[offset] === 0x50 && data[offset + 1] === 0x4b &&
|
841
|
+
data[offset + 2] === 0x03 && data[offset + 3] === 0x04) {
|
842
|
+
const filenameLength = data[offset + 26] | (data[offset + 27] << 8);
|
843
|
+
const extraFieldLength = data[offset + 28] | (data[offset + 29] << 8);
|
844
|
+
if (filenameLength > 0 && offset + 30 + filenameLength <= data.length) {
|
845
|
+
const filename = new TextDecoder().decode(data.slice(offset + 30, offset + 30 + filenameLength));
|
846
|
+
files.push(filename);
|
847
|
+
}
|
848
|
+
offset += 30 + filenameLength + extraFieldLength;
|
849
|
+
}
|
850
|
+
else {
|
851
|
+
offset++;
|
852
|
+
}
|
853
|
+
}
|
854
|
+
return files;
|
855
|
+
};
|
824
856
|
const uint8ArrayToHexString = (uint8Array) => {
|
825
857
|
return Array.prototype.map.call(uint8Array, (byte) => ('00' + byte.toString(16)).slice(-2)).join('');
|
826
858
|
};
|
859
|
+
const identifyAsfFormat = (data) => {
|
860
|
+
// ASF files all start with the same GUID: 3026b2758e66cf11a6d900aa0062ce6c
|
861
|
+
// To distinguish between audio, video, and application ASF, we need to examine
|
862
|
+
// the stream properties in the ASF header
|
863
|
+
try {
|
864
|
+
// Look for stream properties object GUID starting at offset 30
|
865
|
+
// Audio stream properties: b7dc0791a9b711cf8ee600c00c205365
|
866
|
+
// Video stream properties: bc19efc05b4d11cf9b1100aa00bbcb8b
|
867
|
+
if (data.length < 100) {
|
868
|
+
// Not enough data to analyze, default to application
|
869
|
+
return 'application/vnd.ms-asf';
|
870
|
+
}
|
871
|
+
const hex = uint8ArrayToHexString(data);
|
872
|
+
// Look for video stream properties GUID (indicates video content)
|
873
|
+
if (hex.includes('bc19efc05b4d11cf9b1100aa00bbcb8b')) {
|
874
|
+
return 'video/x-ms-asf';
|
875
|
+
}
|
876
|
+
// Look for audio stream properties GUID (indicates audio content)
|
877
|
+
if (hex.includes('b7dc0791a9b711cf8ee600c00c205365')) {
|
878
|
+
return 'audio/x-ms-asf';
|
879
|
+
}
|
880
|
+
// Check for Windows Media Audio/Video codec identifiers
|
881
|
+
// WMA codec: 161 (0xa1) or 162 (0xa2) or 163 (0xa3)
|
882
|
+
// WMV codec: Common values include various Windows Media Video identifiers
|
883
|
+
// Scan through the header for codec information
|
884
|
+
for (let i = 0; i < Math.min(data.length - 4, 1000); i++) {
|
885
|
+
// Look for audio codec indicators
|
886
|
+
if (data[i] === 0xa1 || data[i] === 0xa2 || data[i] === 0xa3) {
|
887
|
+
// Found WMA codec indicator
|
888
|
+
return 'audio/x-ms-asf';
|
889
|
+
}
|
890
|
+
}
|
891
|
+
// Look for common video indicators in the first 1KB
|
892
|
+
const textContent = new TextDecoder('utf-8', { fatal: false }).decode(data.slice(0, Math.min(1000, data.length)));
|
893
|
+
// Check for video-related strings
|
894
|
+
if (textContent.toLowerCase().includes('video') ||
|
895
|
+
textContent.toLowerCase().includes('wmv') ||
|
896
|
+
textContent.toLowerCase().includes('mpeg')) {
|
897
|
+
return 'video/x-ms-asf';
|
898
|
+
}
|
899
|
+
// Check for audio-related strings
|
900
|
+
if (textContent.toLowerCase().includes('audio') ||
|
901
|
+
textContent.toLowerCase().includes('wma') ||
|
902
|
+
textContent.toLowerCase().includes('music')) {
|
903
|
+
return 'audio/x-ms-asf';
|
904
|
+
}
|
905
|
+
// Default to application/vnd.ms-asf if we can't determine the specific type
|
906
|
+
return 'application/vnd.ms-asf';
|
907
|
+
}
|
908
|
+
catch {
|
909
|
+
// If any error occurs during analysis, default to application type
|
910
|
+
return 'application/vnd.ms-asf';
|
911
|
+
}
|
912
|
+
};
|
913
|
+
const identifyHeifFormat = (data) => {
|
914
|
+
// HEIF/HEIC files all start with the same ftyp box signature: 667479706174
|
915
|
+
// To distinguish between formats, we need to examine the brand and compatible brands
|
916
|
+
// in the ftyp (file type) box
|
917
|
+
try {
|
918
|
+
if (data.length < 20) {
|
919
|
+
// Not enough data to analyze, default to HEIF
|
920
|
+
return 'image/heif';
|
921
|
+
}
|
922
|
+
const hex = uint8ArrayToHexString(data);
|
923
|
+
// The ftyp box structure:
|
924
|
+
// Bytes 0-3: Box size (4 bytes)
|
925
|
+
// Bytes 4-7: Box type "ftyp" (4 bytes) - 667479706174
|
926
|
+
// Bytes 8-11: Major brand (4 bytes)
|
927
|
+
// Bytes 12-15: Minor version (4 bytes)
|
928
|
+
// Bytes 16+: Compatible brands (4 bytes each)
|
929
|
+
// Extract major brand (4 bytes starting at offset 8)
|
930
|
+
// Convert to ASCII string for easier comparison
|
931
|
+
const majorBrand = String.fromCharCode(data[8], data[9], data[10], data[11]);
|
932
|
+
// Look for compatible brands in the first 100 bytes
|
933
|
+
const compatibleBrandsHex = hex.substring(32, Math.min(200, hex.length)); // Start after major brand + minor version
|
934
|
+
// HEIC brands: 'heic', 'heix', 'hevc', 'hevx'
|
935
|
+
if (majorBrand === 'heic' ||
|
936
|
+
compatibleBrandsHex.includes('68656963') || // 'heic'
|
937
|
+
compatibleBrandsHex.includes('68656978') || // 'heix'
|
938
|
+
compatibleBrandsHex.includes('68657663') || // 'hevc'
|
939
|
+
compatibleBrandsHex.includes('68657678')) { // 'hevx'
|
940
|
+
// Check for sequence/animation indicators
|
941
|
+
if (compatibleBrandsHex.includes('68657673') || // 'hevs' - HEIC sequence
|
942
|
+
compatibleBrandsHex.includes('6d736631') || // 'msf1' - sequence
|
943
|
+
majorBrand === 'hevs') {
|
944
|
+
return 'image/heic-sequence';
|
945
|
+
}
|
946
|
+
return 'image/heic';
|
947
|
+
}
|
948
|
+
// HEIF brands: 'mif1', 'msf1'
|
949
|
+
if (majorBrand === 'mif1' || majorBrand === 'msf1' ||
|
950
|
+
compatibleBrandsHex.includes('6d696631') || // 'mif1'
|
951
|
+
compatibleBrandsHex.includes('6d736631')) { // 'msf1'
|
952
|
+
// Check for sequence/animation indicators
|
953
|
+
if (majorBrand === 'msf1' ||
|
954
|
+
compatibleBrandsHex.includes('6d736631')) { // 'msf1' - sequence
|
955
|
+
return 'image/heif-sequence';
|
956
|
+
}
|
957
|
+
return 'image/heif';
|
958
|
+
}
|
959
|
+
// Check for specific sequence indicators in the data
|
960
|
+
if (hex.includes('6d736631') || // 'msf1' - multi-image sequence
|
961
|
+
hex.includes('68657673')) { // 'hevs' - HEIC sequence
|
962
|
+
// If we find HEIC-related brands, it's HEIC sequence
|
963
|
+
if (hex.includes('68656963') || hex.includes('68657663')) {
|
964
|
+
return 'image/heic-sequence';
|
965
|
+
}
|
966
|
+
return 'image/heif-sequence';
|
967
|
+
}
|
968
|
+
// If we find HEIC indicators but no sequence, it's single HEIC
|
969
|
+
if (hex.includes('68656963') || // 'heic'
|
970
|
+
hex.includes('68657663') || // 'hevc'
|
971
|
+
hex.includes('68656978') || // 'heix'
|
972
|
+
hex.includes('68657678')) { // 'hevx'
|
973
|
+
return 'image/heic';
|
974
|
+
}
|
975
|
+
// Default to HEIF for any other case
|
976
|
+
return 'image/heif';
|
977
|
+
}
|
978
|
+
catch {
|
979
|
+
// If any error occurs during analysis, default to HEIF
|
980
|
+
return 'image/heif';
|
981
|
+
}
|
982
|
+
};
|
983
|
+
const identifyOggFormat = (data) => {
|
984
|
+
// OGG files all start with "OggS" (4f676753) but can contain different codecs
|
985
|
+
// To distinguish between audio, video, and application OGG, we need to examine
|
986
|
+
// the codec information in the OGG page headers
|
987
|
+
try {
|
988
|
+
if (data.length < 64) {
|
989
|
+
// Not enough data to analyze, default to audio
|
990
|
+
return 'audio/ogg';
|
991
|
+
}
|
992
|
+
const hex = uint8ArrayToHexString(data);
|
993
|
+
// Look for codec identification patterns in the first few hundred bytes
|
994
|
+
// Common video codecs in OGG:
|
995
|
+
// - Theora: "theora" or "\x80theora"
|
996
|
+
// - VP8/VP9: various signatures
|
997
|
+
// - Dirac: "BBCD"
|
998
|
+
// Common audio codecs in OGG:
|
999
|
+
// - Vorbis: "vorbis" or "\x01vorbis"
|
1000
|
+
// - Opus: "OpusHead"
|
1001
|
+
// - FLAC: "fLaC"
|
1002
|
+
// - Speex: "Speex"
|
1003
|
+
// Convert some bytes to text for string matching
|
1004
|
+
const textContent = new TextDecoder('utf-8', { fatal: false }).decode(data.slice(0, Math.min(512, data.length)));
|
1005
|
+
const lowerContent = textContent.toLowerCase();
|
1006
|
+
// Check for video codec indicators first (as they're more specific)
|
1007
|
+
if (lowerContent.includes('theora') ||
|
1008
|
+
hex.includes('8074686f726120') || // "\x80theora "
|
1009
|
+
hex.includes('7468656f7261') || // "theora"
|
1010
|
+
lowerContent.includes('dirac') ||
|
1011
|
+
hex.includes('42424344') || // "BBCD" - Dirac
|
1012
|
+
lowerContent.includes('vp8') ||
|
1013
|
+
lowerContent.includes('vp9')) {
|
1014
|
+
return 'video/ogg';
|
1015
|
+
}
|
1016
|
+
// Check for audio codec indicators
|
1017
|
+
if (lowerContent.includes('vorbis') ||
|
1018
|
+
hex.includes('01766f72626973') || // "\x01vorbis"
|
1019
|
+
hex.includes('766f72626973') || // "vorbis"
|
1020
|
+
lowerContent.includes('opushead') ||
|
1021
|
+
hex.includes('4f7075734865616420') || // "OpusHead "
|
1022
|
+
lowerContent.includes('speex') ||
|
1023
|
+
hex.includes('53706565782020') || // "Speex "
|
1024
|
+
lowerContent.includes('flac') ||
|
1025
|
+
hex.includes('664c6143')) { // "fLaC"
|
1026
|
+
return 'audio/ogg';
|
1027
|
+
}
|
1028
|
+
// Look for OGG stream structure patterns
|
1029
|
+
// OGG pages have a specific structure, look for multiple "OggS" signatures
|
1030
|
+
// which might indicate a complex multimedia container
|
1031
|
+
let oggSCount = 0;
|
1032
|
+
for (let i = 0; i < Math.min(data.length - 4, 1000); i += 4) {
|
1033
|
+
if (data[i] === 0x4f && data[i + 1] === 0x67 &&
|
1034
|
+
data[i + 2] === 0x67 && data[i + 3] === 0x53) {
|
1035
|
+
oggSCount++;
|
1036
|
+
}
|
1037
|
+
}
|
1038
|
+
// Multiple OGG pages might indicate a more complex application format
|
1039
|
+
if (oggSCount > 3) {
|
1040
|
+
// Check if it's likely a multimedia container vs pure audio/video
|
1041
|
+
if (lowerContent.includes('application') ||
|
1042
|
+
lowerContent.includes('metadata') ||
|
1043
|
+
lowerContent.includes('index') ||
|
1044
|
+
(!lowerContent.includes('audio') && !lowerContent.includes('video') &&
|
1045
|
+
!lowerContent.includes('vorbis') && !lowerContent.includes('theora'))) {
|
1046
|
+
return 'application/ogg';
|
1047
|
+
}
|
1048
|
+
}
|
1049
|
+
// Look for file extension hints in metadata (if present)
|
1050
|
+
if (lowerContent.includes('.ogv') || lowerContent.includes('video')) {
|
1051
|
+
return 'video/ogg';
|
1052
|
+
}
|
1053
|
+
if (lowerContent.includes('.oga') || lowerContent.includes('audio') || lowerContent.includes('music')) {
|
1054
|
+
return 'audio/ogg';
|
1055
|
+
}
|
1056
|
+
// Check the OGG page header flags
|
1057
|
+
// Byte 5 in OGG page header contains flags
|
1058
|
+
// If we have enough data, check the stream type
|
1059
|
+
if (data.length > 26) {
|
1060
|
+
const pageHeaderType = data[5];
|
1061
|
+
// Fresh packet start (0x02) often indicates beginning of codec data
|
1062
|
+
if ((pageHeaderType & 0x02) === 0x02) {
|
1063
|
+
// Look at the packet data starting around byte 27
|
1064
|
+
const packetStart = data.slice(27, Math.min(data.length, 50));
|
1065
|
+
const packetHex = uint8ArrayToHexString(packetStart);
|
1066
|
+
// Check for Vorbis identification header
|
1067
|
+
if (packetHex.startsWith('01766f72626973')) {
|
1068
|
+
return 'audio/ogg';
|
1069
|
+
}
|
1070
|
+
// Check for Theora identification header
|
1071
|
+
if (packetHex.startsWith('8074686f726120')) {
|
1072
|
+
return 'video/ogg';
|
1073
|
+
}
|
1074
|
+
}
|
1075
|
+
}
|
1076
|
+
// Default to audio/ogg as it's the most common OGG format
|
1077
|
+
return 'audio/ogg';
|
1078
|
+
}
|
1079
|
+
catch {
|
1080
|
+
// If any error occurs during analysis, default to audio
|
1081
|
+
return 'audio/ogg';
|
1082
|
+
}
|
1083
|
+
};
|
827
1084
|
|
828
1085
|
/**
|
829
1086
|
* @description
|
@@ -953,7 +1210,8 @@ const validateFileMimeType = (file, mimeTypes) => {
|
|
953
1210
|
const reader = new FileReader();
|
954
1211
|
reader.onloadend = () => {
|
955
1212
|
const buffer = reader.result;
|
956
|
-
|
1213
|
+
// Read more bytes to support complex MIME type detection (e.g., ASF format analysis)
|
1214
|
+
const headerBytes = new Uint8Array(buffer).slice(0, Math.min(1024, buffer.byteLength));
|
957
1215
|
const mime = getMimeType(headerBytes);
|
958
1216
|
if (mimeTypes.includes(mime)) {
|
959
1217
|
subscriber.next(null);
|