@eui/components 18.0.0-next.63 → 18.0.0-next.64
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/components/CollapsedBreadcrumbComponent.html +1 -1
- package/docs/components/EuiAppSidebarHeaderUserProfileComponent.html +1 -1
- package/docs/components/EuiAppTopMessageComponent.html +1 -1
- package/docs/components/EuiBreadcrumbItemComponent.html +1 -1
- package/docs/components/EuiCardFooterMenuContentComponent.html +1 -1
- package/docs/components/EuiCardHeaderComponent.html +1 -1
- package/docs/components/EuiChipListComponent.html +1 -1
- package/docs/components/EuiDialogContainerComponent.html +1 -1
- package/docs/components/EuiDiscussionThreadItemComponent.html +1 -1
- package/docs/components/EuiDropdownItemComponent.html +1 -1
- package/docs/components/EuiEditorComponent.html +1 -1
- package/docs/components/EuiFilePreviewComponent.html +1 -1
- package/docs/components/EuiGrowlComponent.html +1 -1
- package/docs/components/EuiIconButtonExpanderComponent.html +1 -1
- package/docs/components/EuiListItemComponent.html +1 -1
- package/docs/components/EuiMenuComponent.html +1 -1
- package/docs/components/EuiMenuItemComponent.html +1 -1
- package/docs/components/EuiNotificationItemComponent.html +1 -1
- package/docs/components/EuiNotificationItemV2Component.html +1 -1
- package/docs/components/EuiNotificationsComponent.html +1 -1
- package/docs/components/EuiNotificationsV2Component.html +1 -1
- package/docs/components/EuiOverlayHeaderTitleComponent.html +1 -1
- package/docs/components/EuiPageColumnComponent.html +1 -1
- package/docs/components/EuiPageHeaderComponent.html +1 -1
- package/docs/components/EuiPaginatorComponent.html +1 -1
- package/docs/components/EuiPopoverComponent.html +1 -1
- package/docs/components/EuiSearchComponent.html +1 -1
- package/docs/components/EuiTableFilterComponent.html +1 -1
- package/docs/components/EuiTableSortableColComponent.html +1 -1
- package/docs/components/EuiTableV2FilterComponent.html +1 -1
- package/docs/components/EuiTableV2SortableColComponent.html +1 -1
- package/docs/components/EuiTabsComponent.html +1 -1
- package/docs/components/EuiTimebarComponent.html +1 -1
- package/docs/components/EuiTimepickerComponent.html +1 -1
- package/docs/components/EuiToolbarMenuComponent.html +1 -1
- package/docs/components/EuiToolbarNavbarComponent.html +1 -1
- package/docs/components/EuiTreeComponent.html +3 -3
- package/docs/components/EuiTreeListToolbarComponent.html +1 -1
- package/docs/components/EuiUserProfileCardComponent.html +1 -1
- package/docs/components/EuiUserProfileComponent.html +1 -1
- package/docs/components/EuiWizardComponent.html +1 -1
- package/docs/dependencies.html +1 -1
- package/docs/js/menu-wc.js +3 -3
- package/docs/js/menu-wc_es5.js +1 -1
- package/docs/js/search/search_index.js +2 -2
- package/esm2022/eui-card/components/eui-card-footer/eui-card-footer-menu-content.component.mjs +3 -3
- package/esm2022/eui-card/components/eui-card-header/eui-card-header.component.mjs +3 -3
- package/esm2022/eui-card/eui-card.component.mjs +2 -2
- package/esm2022/eui-chip-list/eui-chip-list.component.mjs +3 -3
- package/esm2022/eui-dialog/container/eui-dialog-container.component.mjs +3 -3
- package/esm2022/eui-dialog/eui-dialog.component.mjs +2 -2
- package/esm2022/eui-discussion-thread/eui-discussion-thread-item.component.mjs +3 -3
- package/esm2022/eui-dropdown/dropdown-item/eui-dropdown-item.component.mjs +3 -3
- package/esm2022/eui-file-upload/file-preview/file-preview.component.mjs +3 -3
- package/esm2022/eui-growl/eui-growl.component.mjs +3 -3
- package/esm2022/eui-icon/eui-icon-button-expander/eui-icon-button-expander.component.mjs +3 -3
- package/esm2022/eui-icon/eui-icon-svg.component.mjs +2 -2
- package/esm2022/eui-list/eui-list-item/eui-list-item.component.mjs +3 -3
- package/esm2022/eui-list/eui-list.component.mjs +2 -2
- package/esm2022/eui-menu/eui-menu-item.component.mjs +3 -3
- package/esm2022/eui-menu/eui-menu.component.mjs +3 -3
- package/esm2022/eui-overlay/components/eui-overlay-header/eui-overlay-header-title/eui-overlay-header-title.component.mjs +3 -3
- package/esm2022/eui-page/components/eui-page-column/eui-page-column.component.mjs +3 -3
- package/esm2022/eui-page/components/eui-page-header/eui-page-header.component.mjs +3 -3
- package/esm2022/eui-paginator/eui-paginator.component.mjs +3 -3
- package/esm2022/eui-popover/eui-popover.component.mjs +3 -3
- package/esm2022/eui-table/filter/eui-table-filter.component.mjs +3 -3
- package/esm2022/eui-table/sortable-col/eui-table-sortable-col.component.mjs +3 -3
- package/esm2022/eui-table-v2/filter/eui-table-v2-filter.component.mjs +3 -3
- package/esm2022/eui-table-v2/sortable-col/eui-table-v2-sortable-col.component.mjs +3 -3
- package/esm2022/eui-tabs/eui-tabs.component.mjs +3 -3
- package/esm2022/eui-timebar/eui-timebar.component.mjs +3 -3
- package/esm2022/eui-timepicker/eui-timepicker.component.mjs +3 -3
- package/esm2022/eui-tree/eui-tree.component.mjs +5 -5
- package/esm2022/eui-tree-list/toolbar/toolbar.component.mjs +3 -3
- package/esm2022/eui-user-profile/user-profile-card/user-profile-card.component.mjs +3 -3
- package/esm2022/eui-user-profile/user-profile.component.mjs +3 -3
- package/esm2022/eui-wizard/eui-wizard.component.mjs +3 -3
- package/esm2022/externals/eui-editor/eui-editor.component.mjs +3 -3
- package/esm2022/layout/eui-app/eui-app-sidebar/sidebar-header-user-profile/sidebar-header-user-profile.component.mjs +3 -3
- package/esm2022/layout/eui-app/eui-app-top-message/top-message.component.mjs +3 -3
- package/esm2022/layout/eui-breadcrumb/collapsed-breadcrumb/collapsed-breadcrumb.component.mjs +3 -3
- package/esm2022/layout/eui-breadcrumb/item/breadcrumb-item.component.mjs +3 -3
- package/esm2022/layout/eui-notifications/eui-notification-item.component.mjs +3 -3
- package/esm2022/layout/eui-notifications/eui-notifications.component.mjs +3 -3
- package/esm2022/layout/eui-notifications-v2/eui-notification-item.component.mjs +3 -3
- package/esm2022/layout/eui-notifications-v2/eui-notifications.component.mjs +3 -3
- package/esm2022/layout/eui-search/search.component.mjs +3 -3
- package/esm2022/layout/eui-toolbar/toolbar-menu/toolbar-menu.component.mjs +3 -3
- package/esm2022/layout/eui-toolbar/toolbar-navbar/toolbar-navbar.component.mjs +3 -3
- package/eui-list/eui-list-item/eui-list-item.component.d.ts +1 -1
- package/eui-tree/eui-tree.component.d.ts.map +1 -1
- package/fesm2022/eui-components-eui-card.mjs +6 -6
- package/fesm2022/eui-components-eui-card.mjs.map +2 -2
- package/fesm2022/eui-components-eui-chip-list.mjs +4 -4
- package/fesm2022/eui-components-eui-chip-list.mjs.map +1 -1
- package/fesm2022/eui-components-eui-dialog.mjs +18 -18
- package/fesm2022/eui-components-eui-dialog.mjs.map +2 -2
- package/fesm2022/eui-components-eui-discussion-thread.mjs +8 -8
- package/fesm2022/eui-components-eui-discussion-thread.mjs.map +1 -1
- package/fesm2022/eui-components-eui-dropdown.mjs +2 -2
- package/fesm2022/eui-components-eui-dropdown.mjs.map +2 -2
- package/fesm2022/eui-components-eui-file-upload.mjs +2 -2
- package/fesm2022/eui-components-eui-file-upload.mjs.map +2 -2
- package/fesm2022/eui-components-eui-growl.mjs +2 -2
- package/fesm2022/eui-components-eui-growl.mjs.map +1 -1
- package/fesm2022/eui-components-eui-icon.mjs +10 -10
- package/fesm2022/eui-components-eui-icon.mjs.map +2 -2
- package/fesm2022/eui-components-eui-list.mjs +4 -4
- package/fesm2022/eui-components-eui-list.mjs.map +2 -2
- package/fesm2022/eui-components-eui-menu.mjs +18 -18
- package/fesm2022/eui-components-eui-menu.mjs.map +2 -2
- package/fesm2022/eui-components-eui-overlay.mjs +2 -2
- package/fesm2022/eui-components-eui-overlay.mjs.map +2 -2
- package/fesm2022/eui-components-eui-page.mjs +4 -4
- package/fesm2022/eui-components-eui-page.mjs.map +2 -2
- package/fesm2022/eui-components-eui-paginator.mjs +8 -8
- package/fesm2022/eui-components-eui-paginator.mjs.map +1 -1
- package/fesm2022/eui-components-eui-popover.mjs +2 -2
- package/fesm2022/eui-components-eui-popover.mjs.map +2 -2
- package/fesm2022/eui-components-eui-table-v2.mjs +8 -8
- package/fesm2022/eui-components-eui-table-v2.mjs.map +1 -1
- package/fesm2022/eui-components-eui-table.mjs +14 -14
- package/fesm2022/eui-components-eui-table.mjs.map +1 -1
- package/fesm2022/eui-components-eui-tabs.mjs +2 -2
- package/fesm2022/eui-components-eui-tabs.mjs.map +2 -2
- package/fesm2022/eui-components-eui-timebar.mjs +6 -6
- package/fesm2022/eui-components-eui-timebar.mjs.map +1 -1
- package/fesm2022/eui-components-eui-timepicker.mjs +12 -12
- package/fesm2022/eui-components-eui-timepicker.mjs.map +1 -1
- package/fesm2022/eui-components-eui-tree-list.mjs +6 -6
- package/fesm2022/eui-components-eui-tree-list.mjs.map +1 -1
- package/fesm2022/eui-components-eui-tree.mjs +6 -6
- package/fesm2022/eui-components-eui-tree.mjs.map +1 -1
- package/fesm2022/eui-components-eui-user-profile.mjs +4 -4
- package/fesm2022/eui-components-eui-user-profile.mjs.map +2 -2
- package/fesm2022/eui-components-eui-wizard.mjs +2 -2
- package/fesm2022/eui-components-eui-wizard.mjs.map +2 -2
- package/fesm2022/eui-components-externals-eui-editor.mjs +8 -8
- package/fesm2022/eui-components-externals-eui-editor.mjs.map +1 -1
- package/fesm2022/eui-components-layout.mjs +36 -36
- package/fesm2022/eui-components-layout.mjs.map +2 -2
- package/package.json +21 -21
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../eui-dropdown/dropdown-item/eui-dropdown-item.component.ts", "../../eui-dropdown/dropdown-item/eui-dropdown-item.component.html", "../../eui-dropdown/directives/eui-dropdown-content.directive.ts", "../../eui-dropdown/animations/open-close.ts", "../../eui-dropdown/eui-dropdown.service.ts", "../../eui-dropdown/eui-dropdown.component.ts", "../../eui-dropdown/eui-dropdown.component.html", "../../eui-dropdown/eui-dropdown.module.ts"],
|
4
|
-
"sourcesContent": ["import { Component, HostBinding, ChangeDetectionStrategy, ViewEncapsulation, Input, ElementRef } from '@angular/core';\nimport { coerceBooleanProperty, BooleanInput } from '@angular/cdk/coercion';\nimport { FocusableOption, Highlightable } from '@angular/cdk/a11y';\n\nimport { EuiDropdownComponent } from '../eui-dropdown.component';\n\n@Component({\n selector: 'eui-dropdown-item, [euiDropdownItem]',\n templateUrl: './eui-dropdown-item.component.html',\n styleUrls: ['../styles/_index.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class EuiDropdownItemComponent implements Highlightable, FocusableOption {\n @Input() subDropdown: EuiDropdownComponent;\n\n @HostBinding('attr.role') role = 'menuitem';\n @HostBinding('class')\n get cssClasses(): string {\n return [\n 'eui-dropdown-item',\n this.isActive ? 'eui-dropdown-item--active' : '',\n this.subDropdown ? 'eui-dropdown-item--has-subdropdown' : '',\n ]\n .join(' ')\n .trim();\n }\n\n @Input()\n get isActive(): boolean {\n return this._isActive;\n }\n set isActive(value: BooleanInput) {\n this._isActive = coerceBooleanProperty(value);\n }\n private _isActive = false;\n\n constructor(public elementRef: ElementRef) {}\n\n public setActiveStyles(): void {\n this.isActive = true;\n }\n\n public setInactiveStyles(): void {\n this.isActive = false;\n }\n\n public focus(): void {\n this.elementRef.nativeElement.focus();\n }\n\n public click(): void {\n this.elementRef.nativeElement.click();\n }\n\n public mouseenter(): void {\n const mouseenterEvent = new Event('mouseenter');\n this.elementRef.nativeElement.dispatchEvent(mouseenterEvent);\n }\n}\n", "<div class=\"eui-dropdown-item__container\">\n <div class=\"eui-dropdown-item__content\">\n <div class=\"eui-dropdown-item__content-text\">\n <ng-content></ng-content>\n </div>\n <div *ngIf=\"subDropdown\" class=\"eui-dropdown-item__content-icon\">\n <eui-icon-svg icon=\"eui-chevron-forward\" set=\"eui\" size=\"s\" fillColor=\"neutral\"></eui-icon-svg>\n </div>\n </div>\n</div>\n", "import { Directive, HostBinding } from '@angular/core';\n\n// eslint-disable-next-line @angular-eslint/directive-selector\n@Directive({ selector: 'eui-dropdown-content' })\nexport class EuiDropdownContentDirective {\n @HostBinding('attr.role') role = 'menu';\n}\n", "import { animate, state, style, transition, trigger } from '@angular/animations';\n\nexport const openClose = trigger('openClose', [\n state(\n 'open',\n style({\n opacity: 1,\n transform: 'scale(1)',\n }),\n ),\n state(\n 'closed',\n style({\n opacity: 0,\n transform: 'scale(0.9)',\n }),\n ),\n transition('closed => open', [animate('100ms 25ms linear')]),\n]);\n", "import { EventEmitter, Injectable } from '@angular/core';\n\n@Injectable()\nexport class EuiDropdownService {\n isDropdownOpen = new EventEmitter<boolean>();\n}\n", "import {\n Component,\n ChangeDetectionStrategy,\n HostBinding,\n ViewEncapsulation,\n Input,\n OnInit,\n OnDestroy,\n AfterViewInit,\n ViewContainerRef,\n ViewChild,\n TemplateRef,\n ContentChildren,\n QueryList,\n ElementRef,\n Renderer2,\n booleanAttribute,\n} from '@angular/core';\nimport {\n CdkScrollable,\n ConnectionPositionPair,\n FlexibleConnectedPositionStrategy,\n FlexibleConnectedPositionStrategyOrigin,\n GlobalPositionStrategy,\n Overlay,\n OverlayRef,\n ScrollDispatcher,\n} from '@angular/cdk/overlay';\nimport { BehaviorSubject, fromEvent, Subject, Subscription, takeUntil } from 'rxjs';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { ActiveDescendantKeyManager, Highlightable } from '@angular/cdk/a11y';\n\nimport { openClose } from './animations/open-close';\nimport { EuiDropdownItemComponent } from './dropdown-item/eui-dropdown-item.component';\nimport { EuiDropdownService } from './eui-dropdown.service';\n@Component({\n selector: 'eui-dropdown',\n templateUrl: './eui-dropdown.component.html',\n styleUrls: ['./styles/_index.scss'],\n animations: [openClose],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class EuiDropdownComponent implements OnInit, OnDestroy, AfterViewInit {\n @Input() e2eAttr = 'eui-dropdown';\n @Input() tabIndex = -1;\n @Input() width = 'auto';\n @Input() position: 'top' | 'right' | 'bottom' | 'left' = 'bottom';\n @Input({ transform: booleanAttribute }) isBlock = false;\n @Input({ transform: booleanAttribute }) isDropDownRightAligned = false;\n @Input({ transform: booleanAttribute }) hasClosedOnClickInside = true;\n @Input({ transform: booleanAttribute }) isLabelUpdatedFromSelectedItem = false;\n @Input({ transform: booleanAttribute }) isExpandOnHover = false;\n @Input({ transform: booleanAttribute }) hasTabNavigation = false;\n @Input({ transform: booleanAttribute }) isRightClickEnabled = false;\n @Input({ transform: booleanAttribute }) euiDisabled = false;\n\n @ViewChild('templatePortalContent') templatePortalContent: TemplateRef<unknown>;\n @ViewChild('triggerRef') triggerRef: ElementRef<HTMLElement>;\n @ContentChildren(EuiDropdownItemComponent, { descendants: true }) euiDropdownItems: QueryList<Highlightable & EuiDropdownItemComponent>;\n\n public trapFocusAutoCapture = true;\n public parentDropdown: EuiDropdownComponent;\n\n private mousePositionX = 0;\n private mousePositionY = 0;\n private initialScrollX = 0;\n private initialScrollY = 0;\n private originX: 'start' | 'end' | 'center' = 'start';\n private originY: 'top' | 'bottom' | 'center' = 'bottom';\n private overlayX: 'start' | 'end' | 'center' = 'start';\n private overlayY: 'top' | 'bottom' | 'center' = 'top';\n private templatePortal: TemplatePortal;\n private overlayRef: OverlayRef;\n private destroy$ = new Subject<boolean>();\n private isOpen$ = new BehaviorSubject<boolean>(false);\n private scrollDispatcherSubscription = new Subscription();\n private keydownListenerSubscription = new Subscription();\n private euiDropdownItemsEventSubscriptions: Subscription[] = [];\n private activeDescendantKeyManagerChangeSubscription = new Subscription();\n private activeDescendantKeyManager: ActiveDescendantKeyManager<EuiDropdownItemComponent>;\n private origin: HTMLElement;\n private positionStrategy: FlexibleConnectedPositionStrategy;\n private scrollSubscription = new Subscription();\n\n @HostBinding('class')\n get cssClasses(): string {\n return [\n 'eui-dropdown',\n this.isBlock ? 'eui-dropdown--block' : '',\n this.isRightClickEnabled ? 'eui-dropdown--contextual-menu' : '',\n ].join(' ').trim();\n }\n\n constructor(\n private overlay: Overlay,\n private viewContainerRef: ViewContainerRef,\n private scrollDispatcher: ScrollDispatcher,\n private dropdownService: EuiDropdownService,\n protected _renderer: Renderer2,\n ) {\n }\n\n ngOnInit(): void {\n // Currently the `cdkTrapFocusAutoCapture` is only checked once on init.\n if (this.hasDropdownItems) {\n this.trapFocusAutoCapture = false;\n } else {\n this.trapFocusAutoCapture = true;\n }\n\n if (this.hasTabNavigation) {\n this.trapFocusAutoCapture = true;\n this.hasClosedOnClickInside = false;\n }\n\n if (this.isRightClickEnabled) {\n this.hasTabNavigation = false; // UX wise, contextual menu contains only menu items accessible through arrow keys nav\n }\n\n this.setPosition();\n }\n\n ngAfterViewInit(): void {\n this.templatePortal = new TemplatePortal(this.templatePortalContent, this.viewContainerRef);\n\n if(this.triggerRef && this.triggerRef.nativeElement.firstChild){\n this._renderer.setAttribute(this.triggerRef.nativeElement.firstChild, 'aria-haspopup', 'true');\n }\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n this.euiDropdownItemsEventSubscriptions.forEach((euiDropdownItemsEventSubscription) => {\n euiDropdownItemsEventSubscription.unsubscribe();\n });\n this.keydownListenerSubscription.unsubscribe();\n this.scrollDispatcherSubscription.unsubscribe();\n this.activeDescendantKeyManagerChangeSubscription.unsubscribe();\n this.overlayRef?.dispose();\n this.overlayRef = null;\n this.activeDescendantKeyManager = null;\n this.scrollSubscription.unsubscribe();\n }\n\n /**\n * Whether the eui-dropdown is open.\n *\n * @usageNotes\n * ```html\n * <eui-dropdown #dropdown>\n * <my-component *ngIf=\"dropdown.isOpen\"></my-component>\n * </eui-dropdown>\n * ```\n * @returns A boolean with value `true` when open, otherwise `false`.\n */\n get isOpen(): boolean {\n return this.isOpen$.value;\n }\n\n public onTriggerClicked(e: Event): void {\n if (\n !(e.target as HTMLElement).querySelector('.disabled') &&\n !(e.target as HTMLElement).querySelector(':disabled') &&\n !this.isOpen\n ) {\n if (this.isBlock) {\n this.width = this.triggerRef.nativeElement.offsetWidth + 'px';\n }\n\n this.openDropdown(e.target as HTMLElement);\n e.stopPropagation();\n }\n }\n\n public onTriggerRightClicked(e: Event): void {\n if (\n !(e.target as HTMLElement).querySelector('.disabled') &&\n !(e.target as HTMLElement).querySelector(':disabled') &&\n !this.isOpen\n ) {\n if (this.isBlock) {\n this.width = this.triggerRef.nativeElement.offsetWidth + 'px';\n }\n\n this.mousePositionX = (e as PointerEvent).clientX;\n this.mousePositionY = (e as PointerEvent).clientY;\n this.initialScrollX = window.pageXOffset;\n this.initialScrollY = window.pageYOffset;\n\n this.openDropdown(e.target as HTMLElement);\n e.preventDefault();\n e.stopPropagation();\n }\n }\n\n public onClick(): void {\n if (\n this.hasClosedOnClickInside &&\n !this.activeDescendantKeyManager?.activeItem.subDropdown &&\n !this.activeDescendantKeyManager?.activeItem.elementRef?.nativeElement?.disabled\n ) {\n this.closeDropdown(true);\n }\n }\n\n /**\n * Open a dropdown\n *\n * @param origin Origin of the dropdown position\n */\n public openDropdown(origin: HTMLElement, position?: { x: number, y: number }): void {\n this.origin = origin;\n\n if (position) {\n this.mousePositionX = position.x;\n this.mousePositionY = position.y;\n this.initialScrollX = window.pageXOffset;\n this.initialScrollY = window.pageYOffset;\n }\n\n if (this.isRightClickEnabled) {\n this.scrollSubscription = fromEvent(window, 'scroll').subscribe((event: Event) => {\n this.overlayRef?.updatePositionStrategy(this.getContextualMenuPositionStrategy());\n });\n }\n\n if (!this.isTriggerFocusableOnClose(origin)) {\n this.origin = origin.closest('button:not([disabled])') || (this.triggerRef.nativeElement.firstChild as HTMLElement);\n\n if (!this.origin) {\n this.origin = origin.closest('a');\n }\n\n if (!this.origin) {\n this.origin = origin;\n }\n }\n\n if (!this.isOpen) {\n this.scrollDispatcherSubscription = this.scrollDispatcher\n .ancestorScrolled(this.origin)\n .pipe(takeUntil(this.destroy$))\n .subscribe((event: CdkScrollable) => {\n if (!this.isVisible(this.origin, event ? event.getElementRef().nativeElement : document.querySelector('body'))) {\n this.closeDropdown();\n }\n });\n\n const positionStrategy = this.isRightClickEnabled ? this.getContextualMenuPositionStrategy() : this.getPositionStrategy();\n const scrollStrategy = this.overlay.scrollStrategies.reposition({ scrollThrottle: 10 });\n\n this.overlayRef = this.overlay.create({\n hasBackdrop: false,\n backdropClass: 'eui-dropdown__backdrop',\n panelClass: 'eui-dropdown__panel',\n positionStrategy,\n scrollStrategy,\n disposeOnNavigation: true,\n });\n this.overlayRef.attach(this.templatePortal);\n\n if (this.isRightClickEnabled) {\n this.overlayRef?.updatePositionStrategy(this.getContextualMenuPositionStrategy());\n }\n\n this.overlayRef\n .outsidePointerEvents()\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => {\n this.closeDropdown();\n });\n this.overlayRef\n .backdropClick()\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => {\n this.closeDropdown();\n });\n this.overlayRef\n .keydownEvents()\n .pipe(takeUntil(this.destroy$))\n .subscribe((keyboardEvent) => {\n if (keyboardEvent.key?.toLowerCase() === 'escape') {\n this.closeDropdown();\n }\n });\n\n if (this.hasDropdownItems) {\n this.euiDropdownItems.toArray().forEach((euiDropdownItem, i) => {\n if (this.isExpandOnHover) {\n this.euiDropdownItemsEventSubscriptions[i] = fromEvent(\n euiDropdownItem.elementRef.nativeElement,\n 'mouseenter',\n ).subscribe((e: MouseEvent) => {\n this.activeDescendantKeyManager.setActiveItem(euiDropdownItem);\n if (this.activeDescendantKeyManager.activeItem.subDropdown) {\n this.activeDescendantKeyManager.activeItem.subDropdown.setParentDropdown(this);\n this.activeDescendantKeyManager.activeItem.subDropdown.overlayRef.detachBackdrop();\n this.keydownListenerSubscription.unsubscribe();\n }\n\n const triggerOutsidePointerEvents = (subDropdown: EuiDropdownComponent): void => {\n subDropdown?.overlayRef?._outsidePointerEvents.next(e);\n\n if (subDropdown?.hasDropdownItems) {\n subDropdown.euiDropdownItems.toArray().forEach((s) => {\n triggerOutsidePointerEvents(s.subDropdown);\n });\n }\n };\n\n this.euiDropdownItems\n .filter((item) => !item.isActive)\n .forEach((euiDropdownItemHavingSubDropdown) => {\n triggerOutsidePointerEvents(euiDropdownItemHavingSubDropdown.subDropdown);\n });\n });\n } else {\n this.euiDropdownItemsEventSubscriptions[i] = fromEvent(euiDropdownItem.elementRef.nativeElement, 'click').subscribe(\n () => {\n this.activeDescendantKeyManager.setActiveItem(euiDropdownItem);\n if (this.activeDescendantKeyManager.activeItem.subDropdown) {\n this.activeDescendantKeyManager.activeItem.subDropdown.setParentDropdown(this);\n this.activeDescendantKeyManager.activeItem.subDropdown.overlayRef.detachBackdrop();\n this.keydownListenerSubscription.unsubscribe();\n }\n\n const labelElement = this.triggerRef.nativeElement.querySelector('button .eui-label');\n if (this.isLabelUpdatedFromSelectedItem && labelElement) {\n (labelElement as HTMLElement).innerText = euiDropdownItem.elementRef.nativeElement.innerText;\n }\n },\n );\n }\n });\n\n this.activeDescendantKeyManager = new ActiveDescendantKeyManager(this.euiDropdownItems)\n .withHomeAndEnd(true)\n .withVerticalOrientation(true)\n .withWrap();\n this.activeDescendantKeyManager.setFirstItemActive();\n }\n\n this.createKeyboardHandlerSubscription();\n this.isOpen$.next(true);\n this.dropdownService.isDropdownOpen.emit(true);\n }\n }\n\n /**\n * Close a dropdown\n */\n public closeDropdown(recursively = false): void {\n this.isOpen$.next(false);\n this.euiDropdownItemsEventSubscriptions.forEach((euiDropdownItemsEventSubscription) => {\n euiDropdownItemsEventSubscription.unsubscribe();\n });\n this.keydownListenerSubscription.unsubscribe();\n if (this.hasDropdownItems) {\n this.activeDescendantKeyManager?.setFirstItemActive();\n }\n this.scrollDispatcherSubscription.unsubscribe();\n this.activeDescendantKeyManagerChangeSubscription.unsubscribe();\n this.scrollSubscription.unsubscribe();\n this.overlayRef?.dispose();\n this.overlayRef = null;\n this.activeDescendantKeyManager = null;\n if (this.trapFocusAutoCapture) {\n this.origin.focus();\n }\n if (recursively && this.parentDropdown) {\n this.parentDropdown.closeDropdown(true);\n }\n\n this.dropdownService.isDropdownOpen.emit(false);\n }\n\n public projectContentChanged(): void {\n if (!this.isRightClickEnabled) {\n this.positionStrategy = this.getPositionStrategy();\n this.overlayRef.updatePositionStrategy(this.positionStrategy);\n }\n }\n\n public createKeyboardHandlerSubscription(): void {\n this.keydownListenerSubscription = fromEvent(document, 'keydown').subscribe((event: KeyboardEvent) => {\n if (this.isOpen) {\n if (\n event.code === 'Enter' &&\n !this.hasTabNavigation &&\n !this.activeDescendantKeyManager?.activeItem.elementRef?.nativeElement?.disabled\n ) {\n this.activeDescendantKeyManager?.activeItem.focus();\n this.isExpandOnHover\n ? this.activeDescendantKeyManager?.activeItem.mouseenter()\n : this.activeDescendantKeyManager?.activeItem.click();\n\n if (this.activeDescendantKeyManager?.activeItem.subDropdown) {\n this.activeDescendantKeyManager.activeItem.subDropdown.setParentDropdown(this);\n this.keydownListenerSubscription.unsubscribe();\n } else {\n this.closeDropdown();\n }\n event.preventDefault();\n } else if (event.code === 'ArrowLeft') {\n if (this.parentDropdown) {\n this.parentDropdown.createKeyboardHandlerSubscription();\n this.closeDropdown();\n }\n event.preventDefault();\n } else if (event.code === 'ArrowRight') {\n if (this.activeDescendantKeyManager?.activeItem.subDropdown) {\n this.activeDescendantKeyManager.activeItem.focus();\n this.isExpandOnHover\n ? this.activeDescendantKeyManager.activeItem.mouseenter()\n : this.activeDescendantKeyManager.activeItem.click();\n this.activeDescendantKeyManager.activeItem.subDropdown.setParentDropdown(this);\n this.keydownListenerSubscription.unsubscribe();\n }\n event.preventDefault();\n } else if (event.code === 'Tab' && !this.hasTabNavigation) {\n this.closeDropdown(true);\n } else {\n this.activeDescendantKeyManager?.onKeydown(event);\n }\n }\n });\n }\n\n public setParentDropdown(parentDropdown: EuiDropdownComponent): void {\n this.parentDropdown = parentDropdown;\n this.position = 'right';\n this.setPosition();\n\n const positionStrategy = this.getPositionStrategy();\n this.overlayRef.updatePositionStrategy(positionStrategy);\n }\n\n private get hasDropdownItems(): boolean {\n return this.euiDropdownItems?.length > 0;\n }\n\n private getPositionStrategy(): FlexibleConnectedPositionStrategy {\n return this.overlay\n .position()\n .flexibleConnectedTo(this.origin as FlexibleConnectedPositionStrategyOrigin)\n .withPositions([\n new ConnectionPositionPair(\n { originX: this.originX, originY: this.originY },\n { overlayX: this.overlayX, overlayY: this.overlayY },\n ),\n ])\n .withFlexibleDimensions(false)\n .withLockedPosition(true);\n }\n\n private getContextualMenuPositionStrategy(): GlobalPositionStrategy {\n const panelHeight = this.overlayRef?.overlayElement.clientHeight || 0;\n const scrollX = window.scrollX || window.pageXOffset;\n const scrollY = window.scrollY || window.pageYOffset;\n const newX = this.mousePositionX + (this.initialScrollX - scrollX);\n const newY = this.mousePositionY + (this.initialScrollY - scrollY);\n const menuBottomPosition = newY + panelHeight;\n const isMenuBelowWindowBottom = menuBottomPosition > window.innerHeight;\n\n const positionStrategy = this.overlay\n .position()\n .global()\n .left(newX + 'px');\n\n if (isMenuBelowWindowBottom) {\n positionStrategy.bottom(window.innerHeight - newY + 'px');\n } else {\n positionStrategy.top(newY + 'px');\n }\n\n return positionStrategy;\n }\n\n private isVisible(origin: HTMLElement, scrollableParent: HTMLElement): boolean {\n const originY = origin.getBoundingClientRect().y;\n const scrollableParentY = Math.abs(scrollableParent.getBoundingClientRect().y);\n const scrollableParentHeight = scrollableParent.getBoundingClientRect().height - 50;\n\n return (\n (originY > 0 && originY < scrollableParentHeight) ||\n (originY - scrollableParentY > 0 && originY < scrollableParentY + scrollableParentHeight)\n );\n }\n\n private isTriggerFocusableOnClose(origin: HTMLElement): boolean {\n return origin.matches('button:not([disabled])') || origin.matches('a');\n }\n\n private setPosition(): void {\n if (this.position === 'top') {\n this.originY = 'top';\n this.overlayY = 'bottom';\n\n if (this.isDropDownRightAligned) {\n this.originX = 'end';\n this.overlayX = 'end';\n }\n }\n if (this.position === 'right') {\n this.originX = 'end';\n this.overlayX = 'start';\n this.overlayY = 'center';\n }\n if (this.position === 'bottom') {\n this.originY = 'bottom';\n this.overlayY = 'top';\n\n if (this.isDropDownRightAligned) {\n this.originX = 'end';\n this.overlayX = 'end';\n }\n }\n if (this.position === 'left') {\n this.originX = 'start';\n this.overlayX = 'end';\n this.overlayY = 'center';\n }\n }\n}\n", "<div #triggerRef class=\"eui-dropdown__trigger-container\"\n (click)=\"!isRightClickEnabled ? onTriggerClicked($event) : null\"\n (contextmenu)=\"isRightClickEnabled ? onTriggerRightClicked($event) : null\">\n <ng-content></ng-content>\n</div>\n\n<ng-template #templatePortalContent>\n <div\n attr.data-e2e=\"{{ e2eAttr }}\"\n [@openClose]=\"isOpen ? 'open' : 'closed'\"\n cdkTrapFocus\n [cdkTrapFocusAutoCapture]=\"trapFocusAutoCapture\"\n role=\"dialog\"\n aria-label=\"eUI dropdown panel\"\n class=\"eui-dropdown__panel-container\"\n [style.width]=\"width\"\n [tabindex]=\"tabIndex\"\n (click)=\"onClick()\"\n (cdkObserveContent)=\"projectContentChanged()\">\n <ng-content select=\"eui-dropdown-content\"></ng-content>\n </div>\n</ng-template>\n", "import { NgModule } from '@angular/core';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { CommonModule } from '@angular/common';\nimport { ScrollingModule } from '@angular/cdk/scrolling';\nimport { EuiIconModule } from '@eui/components/eui-icon';\nimport { ObserversModule } from '@angular/cdk/observers';\n\nimport { EuiDropdownComponent } from './eui-dropdown.component';\nimport { EuiDropdownItemComponent } from './dropdown-item/eui-dropdown-item.component';\nimport { EuiDropdownContentDirective } from './directives/eui-dropdown-content.directive';\nimport { EuiDropdownService } from './eui-dropdown.service';\n\n@NgModule({\n imports: [CommonModule, OverlayModule, ScrollingModule, A11yModule, EuiIconModule, ObserversModule],\n declarations: [EuiDropdownComponent, EuiDropdownItemComponent, EuiDropdownContentDirective],\n exports: [EuiDropdownComponent, EuiDropdownItemComponent, EuiDropdownContentDirective],\n providers: [EuiDropdownService],\n})\nexport class EuiDropdownModule {}\n\n@NgModule({})\nexport class EuiDropdownContentModule {}\n"],
|
5
|
-
"mappings": ";AAAA,SAAS,WAAW,aAAa,yBAAyB,mBAAmB,aAAyB;AACtG,SAAS,6BAA2C;;;;AAY9C,IAAO,2BAAP,MAAO,0BAAwB;EAIjC,IACI,aAAU;AACV,WAAO;MACH;MACA,KAAK,WAAW,8BAA8B;MAC9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A;;6GAAxB,0BAAwB,CAAA;EAAA;;kGAAxB,0BAAwB,YAAA,CAAA;QADpC;SAAS,CAAA,CAAE;;",
|
4
|
+
"sourcesContent": ["import { Component, HostBinding, ChangeDetectionStrategy, ViewEncapsulation, Input, ElementRef } from '@angular/core';\nimport { coerceBooleanProperty, BooleanInput } from '@angular/cdk/coercion';\nimport { FocusableOption, Highlightable } from '@angular/cdk/a11y';\n\nimport { EuiDropdownComponent } from '../eui-dropdown.component';\n\n@Component({\n selector: 'eui-dropdown-item, [euiDropdownItem]',\n templateUrl: './eui-dropdown-item.component.html',\n styleUrls: ['../styles/_index.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class EuiDropdownItemComponent implements Highlightable, FocusableOption {\n @Input() subDropdown: EuiDropdownComponent;\n\n @HostBinding('attr.role') role = 'menuitem';\n @HostBinding('class')\n get cssClasses(): string {\n return [\n 'eui-dropdown-item',\n this.isActive ? 'eui-dropdown-item--active' : '',\n this.subDropdown ? 'eui-dropdown-item--has-subdropdown' : '',\n ]\n .join(' ')\n .trim();\n }\n\n @Input()\n get isActive(): boolean {\n return this._isActive;\n }\n set isActive(value: BooleanInput) {\n this._isActive = coerceBooleanProperty(value);\n }\n private _isActive = false;\n\n constructor(public elementRef: ElementRef) {}\n\n public setActiveStyles(): void {\n this.isActive = true;\n }\n\n public setInactiveStyles(): void {\n this.isActive = false;\n }\n\n public focus(): void {\n this.elementRef.nativeElement.focus();\n }\n\n public click(): void {\n this.elementRef.nativeElement.click();\n }\n\n public mouseenter(): void {\n const mouseenterEvent = new Event('mouseenter');\n this.elementRef.nativeElement.dispatchEvent(mouseenterEvent);\n }\n}\n", "<div class=\"eui-dropdown-item__container\">\n <div class=\"eui-dropdown-item__content\">\n <div class=\"eui-dropdown-item__content-text\">\n <ng-content></ng-content>\n </div>\n <div *ngIf=\"subDropdown\" class=\"eui-dropdown-item__content-icon\">\n <eui-icon-svg icon=\"chevron-forward:sharp\" size=\"s\" fillColor=\"neutral\"></eui-icon-svg>\n </div>\n </div>\n</div>\n", "import { Directive, HostBinding } from '@angular/core';\n\n// eslint-disable-next-line @angular-eslint/directive-selector\n@Directive({ selector: 'eui-dropdown-content' })\nexport class EuiDropdownContentDirective {\n @HostBinding('attr.role') role = 'menu';\n}\n", "import { animate, state, style, transition, trigger } from '@angular/animations';\n\nexport const openClose = trigger('openClose', [\n state(\n 'open',\n style({\n opacity: 1,\n transform: 'scale(1)',\n }),\n ),\n state(\n 'closed',\n style({\n opacity: 0,\n transform: 'scale(0.9)',\n }),\n ),\n transition('closed => open', [animate('100ms 25ms linear')]),\n]);\n", "import { EventEmitter, Injectable } from '@angular/core';\n\n@Injectable()\nexport class EuiDropdownService {\n isDropdownOpen = new EventEmitter<boolean>();\n}\n", "import {\n Component,\n ChangeDetectionStrategy,\n HostBinding,\n ViewEncapsulation,\n Input,\n OnInit,\n OnDestroy,\n AfterViewInit,\n ViewContainerRef,\n ViewChild,\n TemplateRef,\n ContentChildren,\n QueryList,\n ElementRef,\n Renderer2,\n booleanAttribute,\n} from '@angular/core';\nimport {\n CdkScrollable,\n ConnectionPositionPair,\n FlexibleConnectedPositionStrategy,\n FlexibleConnectedPositionStrategyOrigin,\n GlobalPositionStrategy,\n Overlay,\n OverlayRef,\n ScrollDispatcher,\n} from '@angular/cdk/overlay';\nimport { BehaviorSubject, fromEvent, Subject, Subscription, takeUntil } from 'rxjs';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { ActiveDescendantKeyManager, Highlightable } from '@angular/cdk/a11y';\n\nimport { openClose } from './animations/open-close';\nimport { EuiDropdownItemComponent } from './dropdown-item/eui-dropdown-item.component';\nimport { EuiDropdownService } from './eui-dropdown.service';\n@Component({\n selector: 'eui-dropdown',\n templateUrl: './eui-dropdown.component.html',\n styleUrls: ['./styles/_index.scss'],\n animations: [openClose],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class EuiDropdownComponent implements OnInit, OnDestroy, AfterViewInit {\n @Input() e2eAttr = 'eui-dropdown';\n @Input() tabIndex = -1;\n @Input() width = 'auto';\n @Input() position: 'top' | 'right' | 'bottom' | 'left' = 'bottom';\n @Input({ transform: booleanAttribute }) isBlock = false;\n @Input({ transform: booleanAttribute }) isDropDownRightAligned = false;\n @Input({ transform: booleanAttribute }) hasClosedOnClickInside = true;\n @Input({ transform: booleanAttribute }) isLabelUpdatedFromSelectedItem = false;\n @Input({ transform: booleanAttribute }) isExpandOnHover = false;\n @Input({ transform: booleanAttribute }) hasTabNavigation = false;\n @Input({ transform: booleanAttribute }) isRightClickEnabled = false;\n @Input({ transform: booleanAttribute }) euiDisabled = false;\n\n @ViewChild('templatePortalContent') templatePortalContent: TemplateRef<unknown>;\n @ViewChild('triggerRef') triggerRef: ElementRef<HTMLElement>;\n @ContentChildren(EuiDropdownItemComponent, { descendants: true }) euiDropdownItems: QueryList<Highlightable & EuiDropdownItemComponent>;\n\n public trapFocusAutoCapture = true;\n public parentDropdown: EuiDropdownComponent;\n\n private mousePositionX = 0;\n private mousePositionY = 0;\n private initialScrollX = 0;\n private initialScrollY = 0;\n private originX: 'start' | 'end' | 'center' = 'start';\n private originY: 'top' | 'bottom' | 'center' = 'bottom';\n private overlayX: 'start' | 'end' | 'center' = 'start';\n private overlayY: 'top' | 'bottom' | 'center' = 'top';\n private templatePortal: TemplatePortal;\n private overlayRef: OverlayRef;\n private destroy$ = new Subject<boolean>();\n private isOpen$ = new BehaviorSubject<boolean>(false);\n private scrollDispatcherSubscription = new Subscription();\n private keydownListenerSubscription = new Subscription();\n private euiDropdownItemsEventSubscriptions: Subscription[] = [];\n private activeDescendantKeyManagerChangeSubscription = new Subscription();\n private activeDescendantKeyManager: ActiveDescendantKeyManager<EuiDropdownItemComponent>;\n private origin: HTMLElement;\n private positionStrategy: FlexibleConnectedPositionStrategy;\n private scrollSubscription = new Subscription();\n\n @HostBinding('class')\n get cssClasses(): string {\n return [\n 'eui-dropdown',\n this.isBlock ? 'eui-dropdown--block' : '',\n this.isRightClickEnabled ? 'eui-dropdown--contextual-menu' : '',\n ].join(' ').trim();\n }\n\n constructor(\n private overlay: Overlay,\n private viewContainerRef: ViewContainerRef,\n private scrollDispatcher: ScrollDispatcher,\n private dropdownService: EuiDropdownService,\n protected _renderer: Renderer2,\n ) {\n }\n\n ngOnInit(): void {\n // Currently the `cdkTrapFocusAutoCapture` is only checked once on init.\n if (this.hasDropdownItems) {\n this.trapFocusAutoCapture = false;\n } else {\n this.trapFocusAutoCapture = true;\n }\n\n if (this.hasTabNavigation) {\n this.trapFocusAutoCapture = true;\n this.hasClosedOnClickInside = false;\n }\n\n if (this.isRightClickEnabled) {\n this.hasTabNavigation = false; // UX wise, contextual menu contains only menu items accessible through arrow keys nav\n }\n\n this.setPosition();\n }\n\n ngAfterViewInit(): void {\n this.templatePortal = new TemplatePortal(this.templatePortalContent, this.viewContainerRef);\n\n if(this.triggerRef && this.triggerRef.nativeElement.firstChild){\n this._renderer.setAttribute(this.triggerRef.nativeElement.firstChild, 'aria-haspopup', 'true');\n }\n }\n\n ngOnDestroy(): void {\n this.destroy$.next(true);\n this.destroy$.unsubscribe();\n this.euiDropdownItemsEventSubscriptions.forEach((euiDropdownItemsEventSubscription) => {\n euiDropdownItemsEventSubscription.unsubscribe();\n });\n this.keydownListenerSubscription.unsubscribe();\n this.scrollDispatcherSubscription.unsubscribe();\n this.activeDescendantKeyManagerChangeSubscription.unsubscribe();\n this.overlayRef?.dispose();\n this.overlayRef = null;\n this.activeDescendantKeyManager = null;\n this.scrollSubscription.unsubscribe();\n }\n\n /**\n * Whether the eui-dropdown is open.\n *\n * @usageNotes\n * ```html\n * <eui-dropdown #dropdown>\n * <my-component *ngIf=\"dropdown.isOpen\"></my-component>\n * </eui-dropdown>\n * ```\n * @returns A boolean with value `true` when open, otherwise `false`.\n */\n get isOpen(): boolean {\n return this.isOpen$.value;\n }\n\n public onTriggerClicked(e: Event): void {\n if (\n !(e.target as HTMLElement).querySelector('.disabled') &&\n !(e.target as HTMLElement).querySelector(':disabled') &&\n !this.isOpen\n ) {\n if (this.isBlock) {\n this.width = this.triggerRef.nativeElement.offsetWidth + 'px';\n }\n\n this.openDropdown(e.target as HTMLElement);\n e.stopPropagation();\n }\n }\n\n public onTriggerRightClicked(e: Event): void {\n if (\n !(e.target as HTMLElement).querySelector('.disabled') &&\n !(e.target as HTMLElement).querySelector(':disabled') &&\n !this.isOpen\n ) {\n if (this.isBlock) {\n this.width = this.triggerRef.nativeElement.offsetWidth + 'px';\n }\n\n this.mousePositionX = (e as PointerEvent).clientX;\n this.mousePositionY = (e as PointerEvent).clientY;\n this.initialScrollX = window.pageXOffset;\n this.initialScrollY = window.pageYOffset;\n\n this.openDropdown(e.target as HTMLElement);\n e.preventDefault();\n e.stopPropagation();\n }\n }\n\n public onClick(): void {\n if (\n this.hasClosedOnClickInside &&\n !this.activeDescendantKeyManager?.activeItem.subDropdown &&\n !this.activeDescendantKeyManager?.activeItem.elementRef?.nativeElement?.disabled\n ) {\n this.closeDropdown(true);\n }\n }\n\n /**\n * Open a dropdown\n *\n * @param origin Origin of the dropdown position\n */\n public openDropdown(origin: HTMLElement, position?: { x: number, y: number }): void {\n this.origin = origin;\n\n if (position) {\n this.mousePositionX = position.x;\n this.mousePositionY = position.y;\n this.initialScrollX = window.pageXOffset;\n this.initialScrollY = window.pageYOffset;\n }\n\n if (this.isRightClickEnabled) {\n this.scrollSubscription = fromEvent(window, 'scroll').subscribe((event: Event) => {\n this.overlayRef?.updatePositionStrategy(this.getContextualMenuPositionStrategy());\n });\n }\n\n if (!this.isTriggerFocusableOnClose(origin)) {\n this.origin = origin.closest('button:not([disabled])') || (this.triggerRef.nativeElement.firstChild as HTMLElement);\n\n if (!this.origin) {\n this.origin = origin.closest('a');\n }\n\n if (!this.origin) {\n this.origin = origin;\n }\n }\n\n if (!this.isOpen) {\n this.scrollDispatcherSubscription = this.scrollDispatcher\n .ancestorScrolled(this.origin)\n .pipe(takeUntil(this.destroy$))\n .subscribe((event: CdkScrollable) => {\n if (!this.isVisible(this.origin, event ? event.getElementRef().nativeElement : document.querySelector('body'))) {\n this.closeDropdown();\n }\n });\n\n const positionStrategy = this.isRightClickEnabled ? this.getContextualMenuPositionStrategy() : this.getPositionStrategy();\n const scrollStrategy = this.overlay.scrollStrategies.reposition({ scrollThrottle: 10 });\n\n this.overlayRef = this.overlay.create({\n hasBackdrop: false,\n backdropClass: 'eui-dropdown__backdrop',\n panelClass: 'eui-dropdown__panel',\n positionStrategy,\n scrollStrategy,\n disposeOnNavigation: true,\n });\n this.overlayRef.attach(this.templatePortal);\n\n if (this.isRightClickEnabled) {\n this.overlayRef?.updatePositionStrategy(this.getContextualMenuPositionStrategy());\n }\n\n this.overlayRef\n .outsidePointerEvents()\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => {\n this.closeDropdown();\n });\n this.overlayRef\n .backdropClick()\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => {\n this.closeDropdown();\n });\n this.overlayRef\n .keydownEvents()\n .pipe(takeUntil(this.destroy$))\n .subscribe((keyboardEvent) => {\n if (keyboardEvent.key?.toLowerCase() === 'escape') {\n this.closeDropdown();\n }\n });\n\n if (this.hasDropdownItems) {\n this.euiDropdownItems.toArray().forEach((euiDropdownItem, i) => {\n if (this.isExpandOnHover) {\n this.euiDropdownItemsEventSubscriptions[i] = fromEvent(\n euiDropdownItem.elementRef.nativeElement,\n 'mouseenter',\n ).subscribe((e: MouseEvent) => {\n this.activeDescendantKeyManager.setActiveItem(euiDropdownItem);\n if (this.activeDescendantKeyManager.activeItem.subDropdown) {\n this.activeDescendantKeyManager.activeItem.subDropdown.setParentDropdown(this);\n this.activeDescendantKeyManager.activeItem.subDropdown.overlayRef.detachBackdrop();\n this.keydownListenerSubscription.unsubscribe();\n }\n\n const triggerOutsidePointerEvents = (subDropdown: EuiDropdownComponent): void => {\n subDropdown?.overlayRef?._outsidePointerEvents.next(e);\n\n if (subDropdown?.hasDropdownItems) {\n subDropdown.euiDropdownItems.toArray().forEach((s) => {\n triggerOutsidePointerEvents(s.subDropdown);\n });\n }\n };\n\n this.euiDropdownItems\n .filter((item) => !item.isActive)\n .forEach((euiDropdownItemHavingSubDropdown) => {\n triggerOutsidePointerEvents(euiDropdownItemHavingSubDropdown.subDropdown);\n });\n });\n } else {\n this.euiDropdownItemsEventSubscriptions[i] = fromEvent(euiDropdownItem.elementRef.nativeElement, 'click').subscribe(\n () => {\n this.activeDescendantKeyManager.setActiveItem(euiDropdownItem);\n if (this.activeDescendantKeyManager.activeItem.subDropdown) {\n this.activeDescendantKeyManager.activeItem.subDropdown.setParentDropdown(this);\n this.activeDescendantKeyManager.activeItem.subDropdown.overlayRef.detachBackdrop();\n this.keydownListenerSubscription.unsubscribe();\n }\n\n const labelElement = this.triggerRef.nativeElement.querySelector('button .eui-label');\n if (this.isLabelUpdatedFromSelectedItem && labelElement) {\n (labelElement as HTMLElement).innerText = euiDropdownItem.elementRef.nativeElement.innerText;\n }\n },\n );\n }\n });\n\n this.activeDescendantKeyManager = new ActiveDescendantKeyManager(this.euiDropdownItems)\n .withHomeAndEnd(true)\n .withVerticalOrientation(true)\n .withWrap();\n this.activeDescendantKeyManager.setFirstItemActive();\n }\n\n this.createKeyboardHandlerSubscription();\n this.isOpen$.next(true);\n this.dropdownService.isDropdownOpen.emit(true);\n }\n }\n\n /**\n * Close a dropdown\n */\n public closeDropdown(recursively = false): void {\n this.isOpen$.next(false);\n this.euiDropdownItemsEventSubscriptions.forEach((euiDropdownItemsEventSubscription) => {\n euiDropdownItemsEventSubscription.unsubscribe();\n });\n this.keydownListenerSubscription.unsubscribe();\n if (this.hasDropdownItems) {\n this.activeDescendantKeyManager?.setFirstItemActive();\n }\n this.scrollDispatcherSubscription.unsubscribe();\n this.activeDescendantKeyManagerChangeSubscription.unsubscribe();\n this.scrollSubscription.unsubscribe();\n this.overlayRef?.dispose();\n this.overlayRef = null;\n this.activeDescendantKeyManager = null;\n if (this.trapFocusAutoCapture) {\n this.origin.focus();\n }\n if (recursively && this.parentDropdown) {\n this.parentDropdown.closeDropdown(true);\n }\n\n this.dropdownService.isDropdownOpen.emit(false);\n }\n\n public projectContentChanged(): void {\n if (!this.isRightClickEnabled) {\n this.positionStrategy = this.getPositionStrategy();\n this.overlayRef.updatePositionStrategy(this.positionStrategy);\n }\n }\n\n public createKeyboardHandlerSubscription(): void {\n this.keydownListenerSubscription = fromEvent(document, 'keydown').subscribe((event: KeyboardEvent) => {\n if (this.isOpen) {\n if (\n event.code === 'Enter' &&\n !this.hasTabNavigation &&\n !this.activeDescendantKeyManager?.activeItem.elementRef?.nativeElement?.disabled\n ) {\n this.activeDescendantKeyManager?.activeItem.focus();\n this.isExpandOnHover\n ? this.activeDescendantKeyManager?.activeItem.mouseenter()\n : this.activeDescendantKeyManager?.activeItem.click();\n\n if (this.activeDescendantKeyManager?.activeItem.subDropdown) {\n this.activeDescendantKeyManager.activeItem.subDropdown.setParentDropdown(this);\n this.keydownListenerSubscription.unsubscribe();\n } else {\n this.closeDropdown();\n }\n event.preventDefault();\n } else if (event.code === 'ArrowLeft') {\n if (this.parentDropdown) {\n this.parentDropdown.createKeyboardHandlerSubscription();\n this.closeDropdown();\n }\n event.preventDefault();\n } else if (event.code === 'ArrowRight') {\n if (this.activeDescendantKeyManager?.activeItem.subDropdown) {\n this.activeDescendantKeyManager.activeItem.focus();\n this.isExpandOnHover\n ? this.activeDescendantKeyManager.activeItem.mouseenter()\n : this.activeDescendantKeyManager.activeItem.click();\n this.activeDescendantKeyManager.activeItem.subDropdown.setParentDropdown(this);\n this.keydownListenerSubscription.unsubscribe();\n }\n event.preventDefault();\n } else if (event.code === 'Tab' && !this.hasTabNavigation) {\n this.closeDropdown(true);\n } else {\n this.activeDescendantKeyManager?.onKeydown(event);\n }\n }\n });\n }\n\n public setParentDropdown(parentDropdown: EuiDropdownComponent): void {\n this.parentDropdown = parentDropdown;\n this.position = 'right';\n this.setPosition();\n\n const positionStrategy = this.getPositionStrategy();\n this.overlayRef.updatePositionStrategy(positionStrategy);\n }\n\n private get hasDropdownItems(): boolean {\n return this.euiDropdownItems?.length > 0;\n }\n\n private getPositionStrategy(): FlexibleConnectedPositionStrategy {\n return this.overlay\n .position()\n .flexibleConnectedTo(this.origin as FlexibleConnectedPositionStrategyOrigin)\n .withPositions([\n new ConnectionPositionPair(\n { originX: this.originX, originY: this.originY },\n { overlayX: this.overlayX, overlayY: this.overlayY },\n ),\n ])\n .withFlexibleDimensions(false)\n .withLockedPosition(true);\n }\n\n private getContextualMenuPositionStrategy(): GlobalPositionStrategy {\n const panelHeight = this.overlayRef?.overlayElement.clientHeight || 0;\n const scrollX = window.scrollX || window.pageXOffset;\n const scrollY = window.scrollY || window.pageYOffset;\n const newX = this.mousePositionX + (this.initialScrollX - scrollX);\n const newY = this.mousePositionY + (this.initialScrollY - scrollY);\n const menuBottomPosition = newY + panelHeight;\n const isMenuBelowWindowBottom = menuBottomPosition > window.innerHeight;\n\n const positionStrategy = this.overlay\n .position()\n .global()\n .left(newX + 'px');\n\n if (isMenuBelowWindowBottom) {\n positionStrategy.bottom(window.innerHeight - newY + 'px');\n } else {\n positionStrategy.top(newY + 'px');\n }\n\n return positionStrategy;\n }\n\n private isVisible(origin: HTMLElement, scrollableParent: HTMLElement): boolean {\n const originY = origin.getBoundingClientRect().y;\n const scrollableParentY = Math.abs(scrollableParent.getBoundingClientRect().y);\n const scrollableParentHeight = scrollableParent.getBoundingClientRect().height - 50;\n\n return (\n (originY > 0 && originY < scrollableParentHeight) ||\n (originY - scrollableParentY > 0 && originY < scrollableParentY + scrollableParentHeight)\n );\n }\n\n private isTriggerFocusableOnClose(origin: HTMLElement): boolean {\n return origin.matches('button:not([disabled])') || origin.matches('a');\n }\n\n private setPosition(): void {\n if (this.position === 'top') {\n this.originY = 'top';\n this.overlayY = 'bottom';\n\n if (this.isDropDownRightAligned) {\n this.originX = 'end';\n this.overlayX = 'end';\n }\n }\n if (this.position === 'right') {\n this.originX = 'end';\n this.overlayX = 'start';\n this.overlayY = 'center';\n }\n if (this.position === 'bottom') {\n this.originY = 'bottom';\n this.overlayY = 'top';\n\n if (this.isDropDownRightAligned) {\n this.originX = 'end';\n this.overlayX = 'end';\n }\n }\n if (this.position === 'left') {\n this.originX = 'start';\n this.overlayX = 'end';\n this.overlayY = 'center';\n }\n }\n}\n", "<div #triggerRef class=\"eui-dropdown__trigger-container\"\n (click)=\"!isRightClickEnabled ? onTriggerClicked($event) : null\"\n (contextmenu)=\"isRightClickEnabled ? onTriggerRightClicked($event) : null\">\n <ng-content></ng-content>\n</div>\n\n<ng-template #templatePortalContent>\n <div\n attr.data-e2e=\"{{ e2eAttr }}\"\n [@openClose]=\"isOpen ? 'open' : 'closed'\"\n cdkTrapFocus\n [cdkTrapFocusAutoCapture]=\"trapFocusAutoCapture\"\n role=\"dialog\"\n aria-label=\"eUI dropdown panel\"\n class=\"eui-dropdown__panel-container\"\n [style.width]=\"width\"\n [tabindex]=\"tabIndex\"\n (click)=\"onClick()\"\n (cdkObserveContent)=\"projectContentChanged()\">\n <ng-content select=\"eui-dropdown-content\"></ng-content>\n </div>\n</ng-template>\n", "import { NgModule } from '@angular/core';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { CommonModule } from '@angular/common';\nimport { ScrollingModule } from '@angular/cdk/scrolling';\nimport { EuiIconModule } from '@eui/components/eui-icon';\nimport { ObserversModule } from '@angular/cdk/observers';\n\nimport { EuiDropdownComponent } from './eui-dropdown.component';\nimport { EuiDropdownItemComponent } from './dropdown-item/eui-dropdown-item.component';\nimport { EuiDropdownContentDirective } from './directives/eui-dropdown-content.directive';\nimport { EuiDropdownService } from './eui-dropdown.service';\n\n@NgModule({\n imports: [CommonModule, OverlayModule, ScrollingModule, A11yModule, EuiIconModule, ObserversModule],\n declarations: [EuiDropdownComponent, EuiDropdownItemComponent, EuiDropdownContentDirective],\n exports: [EuiDropdownComponent, EuiDropdownItemComponent, EuiDropdownContentDirective],\n providers: [EuiDropdownService],\n})\nexport class EuiDropdownModule {}\n\n@NgModule({})\nexport class EuiDropdownContentModule {}\n"],
|
5
|
+
"mappings": ";AAAA,SAAS,WAAW,aAAa,yBAAyB,mBAAmB,aAAyB;AACtG,SAAS,6BAA2C;;;;AAY9C,IAAO,2BAAP,MAAO,0BAAwB;EAIjC,IACI,aAAU;AACV,WAAO;MACH;MACA,KAAK,WAAW,8BAA8B;MAC9C,KAAK,cAAc,uCAAuC;MAEzD,KAAK,GAAG,EACR,KAAI;EACb;EAEA,IACI,WAAQ;AACR,WAAO,KAAK;EAChB;EACA,IAAI,SAAS,OAAmB;AAC5B,SAAK,YAAY,sBAAsB,KAAK;EAChD;EAGA,YAAmB,YAAsB;AAAtB,SAAA,aAAA;AArBO,SAAA,OAAO;AAmBzB,SAAA,YAAY;EAEwB;EAErC,kBAAe;AAClB,SAAK,WAAW;EACpB;EAEO,oBAAiB;AACpB,SAAK,WAAW;EACpB;EAEO,QAAK;AACR,SAAK,WAAW,cAAc,MAAK;EACvC;EAEO,QAAK;AACR,SAAK,WAAW,cAAc,MAAK;EACvC;EAEO,aAAU;AACb,UAAM,kBAAkB,IAAI,MAAM,YAAY;AAC9C,SAAK,WAAW,cAAc,cAAc,eAAe;EAC/D;;0GA7CS,2BAAwB,MAAA,CAAA,EAAA,OAAA,cAAA,CAAA,GAAA,QAAA,mBAAA,UAAA,CAAA;EAAA;;8FAAxB,2BAAwB,UAAA,wCAAA,QAAA,EAAA,aAAA,eAAA,UAAA,WAAA,GAAA,MAAA,EAAA,YAAA,EAAA,aAAA,aAAA,SAAA,kBAAA,EAAA,GAAA,UAAA,IAAA,UCbrC,gaAUA,QAAA,CAAA,2pHAAA,GAAA,cAAA,CAAA,EAAA,MAAA,aAAA,MAAA,SAAA,UAAA,UAAA,QAAA,CAAA,QAAA,YAAA,UAAA,EAAA,GAAA,EAAA,MAAA,aAAA,MAAA,wBAAA,UAAA,iDAAA,QAAA,CAAA,QAAA,aA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eAAe,iBAAiB,YAAY,eAAe,eAAe;IAClG,cAAc,CAAC,sBAAsB,0BAA0B,2BAA2B;IAC1F,SAAS,CAAC,sBAAsB,0BAA0B,2BAA2B;IACrF,WAAW,CAAC,kBAAkB;GACjC;;AAIK,IAAO,2BAAP,MAAO,0BAAwB;;4GAAxB,2BAAwB,MAAA,CAAA,GAAA,QAAA,oBAAA,SAAA,CAAA;EAAA;;6GAAxB,0BAAwB,CAAA;EAAA;;6GAAxB,0BAAwB,CAAA;EAAA;;kGAAxB,0BAAwB,YAAA,CAAA;QADpC;SAAS,CAAA,CAAE;;",
|
6
6
|
"names": ["HostBinding", "i0", "Component", "ChangeDetectionStrategy", "HostBinding", "ViewEncapsulation", "Input", "i0"]
|
7
7
|
}
|
@@ -209,12 +209,12 @@ var EuiFilePreviewComponent = class _EuiFilePreviewComponent {
|
|
209
209
|
this.ɵfac = i03.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i03, type: _EuiFilePreviewComponent, deps: [{ token: i03.ChangeDetectorRef }], target: i03.ɵɵFactoryTarget.Component });
|
210
210
|
}
|
211
211
|
static {
|
212
|
-
this.ɵcmp = i03.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.0-rc.1", type: _EuiFilePreviewComponent, selector: "eui-file-preview", inputs: { file: "file", index: "index", previewAsIconConfig: "previewAsIconConfig", hasPreview: "hasPreview", isFilenameDisplayed: "isFilenameDisplayed", isFilesizeDisplayed: "isFilesizeDisplayed", isFiletypeDisplayed: "isFiletypeDisplayed", hasPreviewAsImage: "hasPreviewAsImage", hasPreviewAsIcon: "hasPreviewAsIcon", isItemsClickable: "isItemsClickable" }, outputs: { removeFromList: "removeFromList", itemClick: "itemClick" }, ngImport: i03, template: '<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-
|
212
|
+
this.ɵcmp = i03.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.0-rc.1", type: _EuiFilePreviewComponent, selector: "eui-file-preview", inputs: { file: "file", index: "index", previewAsIconConfig: "previewAsIconConfig", hasPreview: "hasPreview", isFilenameDisplayed: "isFilenameDisplayed", isFilesizeDisplayed: "isFilesizeDisplayed", isFiletypeDisplayed: "isFiletypeDisplayed", hasPreviewAsImage: "hasPreviewAsImage", hasPreviewAsIcon: "hasPreviewAsIcon", isItemsClickable: "isItemsClickable" }, outputs: { removeFromList: "removeFromList", itemClick: "itemClick" }, ngImport: i03, template: '<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', dependencies: [{ kind: "directive", type: i12.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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", "ariaLabelledby", "role", "style", "iconUrl", "transform", "aria-label", "ariaHidden", "focusable", "isLoading", "isInputIcon", "euiStart", "euiEnd"] }, { kind: "pipe", type: EuiFileSizePipe, name: "filesize" }], changeDetection: i03.ChangeDetectionStrategy.OnPush, encapsulation: i03.ViewEncapsulation.None });
|
213
213
|
}
|
214
214
|
};
|
215
215
|
i03.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-rc.1", ngImport: i03, type: EuiFilePreviewComponent, decorators: [{
|
216
216
|
type: Component2,
|
217
|
-
args: [{ selector: "eui-file-preview", changeDetection: ChangeDetectionStrategy3.OnPush, encapsulation: ViewEncapsulation3.None, template: '<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-
|
217
|
+
args: [{ selector: "eui-file-preview", changeDetection: ChangeDetectionStrategy3.OnPush, encapsulation: ViewEncapsulation3.None, template: '<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' }]
|
218
218
|
}], ctorParameters: () => [{ type: i03.ChangeDetectorRef }], propDecorators: { file: [{
|
219
219
|
type: Input2
|
220
220
|
}], index: [{
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../eui-file-upload/progress/eui-file-upload-progress.component.ts", "../../eui-file-upload/progress/eui-file-upload-progress.component.html", "../../eui-file-upload/pipes/filesize.pipe.ts", "../../eui-file-upload/file-preview/file-preview.component.ts", "../../eui-file-upload/file-preview/file-preview.component.html", "../../eui-file-upload/eui-file-upload.component.ts", "../../eui-file-upload/eui-file-upload.component.html", "../../eui-file-upload/utils/eui-file-upload.utils.ts", "../../eui-file-upload/eui-file-upload.module.ts", "../../eui-file-upload/utils/mime-types.ts", "../../eui-file-upload/utils/eui-file-upload.validators.ts"],
|
4
|
-
"sourcesContent": ["import { Component, Input, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'eui-file-upload-progress',\n templateUrl: './eui-file-upload-progress.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class EuiFileUploadProgressComponent {\n @Input() progress = 0;\n}\n", "<div *ngIf=\"progress > 0\">\n <div class=\"eui-file-upload__progress-bar-container\">\n <div class=\"progress-bar\" [style.width]=\"progress + '%'\"></div>\n </div>\n <div>{{ progress }}%</div>\n</div>\n", "import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'filesize',\n})\nexport class EuiFileSizePipe implements PipeTransform {\n private units = ['bytes', 'KB', 'MB', 'GB', 'TB', 'PB'];\n\n transform(bytes = 0, precision = 2): string {\n if (isNaN(parseFloat(String(bytes))) || !isFinite(bytes)) {\n return '?';\n }\n\n let unit = 0;\n\n while (bytes >= 1024) {\n bytes /= 1024;\n unit++;\n }\n\n return bytes.toFixed(+precision) + ' ' + this.units[unit];\n }\n}\n", "import {\n Component,\n OnInit,\n Input,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n ChangeDetectorRef,\n Output,\n EventEmitter,\n} from '@angular/core';\nimport { coerceBooleanProperty, BooleanInput } from '@angular/cdk/coercion';\n\nimport { EuiUploadedFileInterface } from '../models/uploaded-file.model';\n\n@Component({\n selector: 'eui-file-preview',\n templateUrl: './file-preview.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class EuiFilePreviewComponent implements OnInit {\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Input() file: Blob | EuiUploadedFileInterface | any;\n @Input() index: number;\n\n @Input() previewAsIconConfig = {\n avi: 'eui-file-video',\n html: 'eui-file-html',\n htm: 'eui-file-code',\n js: 'eui-file-code',\n json: 'eui-file-code',\n mp3: 'eui-file-audio',\n mp4: 'eui-file-video',\n pdf: 'eui-file-pdf',\n png: 'eui-file-image',\n svg: 'eui-file-image',\n txt: 'eui-file-text',\n xml: 'eui-file-code',\n jpeg: 'eui-file-image',\n jpg: 'eui-file-image',\n zip: 'eui-file-archive',\n doc: 'eui-file-word',\n docx: 'eui-file-word-o',\n xls: 'eui-file-excel-o',\n xlsx: 'eui-file-excel-o',\n ppt: 'eui-file-powerpoint',\n csv: 'eui-file-text',\n rtf: 'eui-file-text',\n };\n\n @Output() removeFromList = new EventEmitter<number>();\n\n public url: string;\n public icon: string;\n public fileExtension: string;\n public previewData: { image: boolean; display: string };\n public isLoading = false;\n\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Output() itemClick = new EventEmitter<Blob | EuiUploadedFileInterface | any>();\n\n @Input()\n get hasPreview(): boolean {\n return this._hasPreview;\n }\n set hasPreview(value: BooleanInput) {\n this._hasPreview = coerceBooleanProperty(value);\n }\n private _hasPreview = true;\n @Input()\n get isFilenameDisplayed(): boolean {\n return this._isFilenameDisplayed;\n }\n set isFilenameDisplayed(value: BooleanInput) {\n this._isFilenameDisplayed = coerceBooleanProperty(value);\n }\n private _isFilenameDisplayed = true;\n @Input()\n get isFilesizeDisplayed(): boolean {\n return this._isFilesizeDisplayed;\n }\n set isFilesizeDisplayed(value: BooleanInput) {\n this._isFilesizeDisplayed = coerceBooleanProperty(value);\n }\n private _isFilesizeDisplayed = true;\n @Input()\n get isFiletypeDisplayed(): boolean {\n return this._isFiletypeDisplayed;\n }\n set isFiletypeDisplayed(value: BooleanInput) {\n this._isFiletypeDisplayed = coerceBooleanProperty(value);\n }\n private _isFiletypeDisplayed = true;\n @Input()\n get hasPreviewAsImage(): boolean {\n return this._hasPreviewAsImage;\n }\n set hasPreviewAsImage(value: BooleanInput) {\n this._hasPreviewAsImage = coerceBooleanProperty(value);\n }\n private _hasPreviewAsImage = true;\n @Input()\n get hasPreviewAsIcon(): boolean {\n return this._hasPreviewAsIcon;\n }\n set hasPreviewAsIcon(value: BooleanInput) {\n this._hasPreviewAsIcon = coerceBooleanProperty(value);\n }\n private _hasPreviewAsIcon = false;\n @Input()\n get isItemsClickable(): boolean {\n return this._isItemsClickable;\n }\n set isItemsClickable(value: BooleanInput) {\n this._isItemsClickable = coerceBooleanProperty(value);\n }\n private _isItemsClickable = false;\n\n constructor(private cd: ChangeDetectorRef) {}\n\n // imageUrl\n ngOnInit(): void {\n if (this.hasPreviewAsIcon) {\n this.hasPreviewAsImage = false;\n }\n\n if (this.file instanceof Blob) {\n const reader = new FileReader();\n reader.readAsArrayBuffer(this.file as Blob);\n // reader.readAsDataURL(this.file as Blob);\n\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n reader.onload = (event: any): void => {\n this.url = event.target.result;\n this.fileExtension = this.getFileExtension(this.file.name);\n this.icon = this.getIconForMime(this.fileExtension);\n\n const blob = new Blob([reader.result], { type: this.file.type });\n const imageUrl = URL.createObjectURL(blob);\n\n this.previewData = this.getPreviewForMime(this.fileExtension, imageUrl);\n\n this.cd.detectChanges();\n };\n reader.onloadstart = (event: ProgressEvent): void => {\n this.isLoading = true;\n this.cd.detectChanges();\n };\n reader.onloadend = (event: ProgressEvent): void => {\n this.isLoading = false;\n this.cd.detectChanges();\n };\n } else {\n this.url = (this.file as EuiUploadedFileInterface).url;\n this.fileExtension = this.getFileExtension(this.file.name);\n this.icon = this.getIconForMime(this.fileExtension);\n\n this.previewData = this.getPreviewForMime(this.fileExtension, this.url);\n\n this.cd.detectChanges();\n }\n }\n\n public onRemoveFromList(): void {\n this.removeFromList.emit(this.index);\n }\n\n public onItemClick(e: Event): void {\n this.itemClick.emit(this.file);\n e.preventDefault();\n }\n\n private getFileExtension(fileName: string): string {\n const ext = fileName.split('.');\n\n return ext[ext.length - 1];\n }\n\n private getPreviewForMime(fileExtension: string, imgUrl: string): { image: boolean; display: string } {\n const f = fileExtension.toLowerCase();\n const image = f === 'jpeg' || f === 'jpg' || f === 'png' || f === 'gif' ? true : false;\n const display = f === 'jpeg' || f === 'jpg' || f === 'png' || f === 'gif' ? imgUrl : this.getIconForMime(f);\n\n return { image, display };\n }\n\n private getIconForMime(fileExtension: string): string {\n const f = fileExtension.toLowerCase();\n return !this.previewAsIconConfig[f] ? 'eui-file-empty-o' : this.previewAsIconConfig[f];\n }\n}\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-delete-forever\"></eui-icon-svg>\n </button>\n </div>\n </div>\n</div>\n", "import {\n Component,\n ElementRef,\n HostBinding,\n HostListener,\n Input,\n ViewEncapsulation,\n OnInit,\n ViewChildren,\n QueryList,\n Output,\n EventEmitter,\n booleanAttribute,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { EuiUploadedFileInterface } from './models/uploaded-file.model';\n\n@Component({\n selector: 'eui-file-upload',\n templateUrl: './eui-file-upload.component.html',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: EuiFileUploadComponent,\n multi: true,\n },\n ],\n styleUrls: ['./styles/_index.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class EuiFileUploadComponent implements ControlValueAccessor, OnInit {\n @Input() e2eAttr = 'eui-file-upload';\n @Input() progress: number;\n @Input() accept = '*';\n @Input() maxFiles: number;\n @Output() fileDrop = new EventEmitter();\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Output() itemClick = new EventEmitter<Blob | EuiUploadedFileInterface | any>();\n\n @HostBinding('class')\n public get cssClasses(): string {\n return [\n 'eui-file-upload',\n ]\n .join(' ')\n .trim();\n }\n\n public files: File[] = [];\n public filesTotalSize = 0;\n public randomNumberId = Math.floor(Math.random() * 10000);\n public uploadedFiles: EuiUploadedFileInterface[] = [];\n public dragEntered = false;\n @ViewChildren('input') fileInputs: QueryList<ElementRef<HTMLInputElement>>;\n\n @Input({ transform: booleanAttribute }) isMultiple = false;\n @Input({ transform: booleanAttribute }) hasProgressBar = true;\n @Input({ transform: booleanAttribute }) hasPreview = true;\n @Input({ transform: booleanAttribute }) hasPreviewAsImage = true;\n @Input({ transform: booleanAttribute }) hasPreviewAsIcon = false;\n @Input({ transform: booleanAttribute }) hasTotalSizeDisplayed = true;\n @Input({ transform: booleanAttribute }) hasResetButton = true;\n @Input({ transform: booleanAttribute }) hasDragArea = false;\n @Input({ transform: booleanAttribute }) isItemsClickable = false;\n\n @HostListener('change', ['$event.target.files']) emitFiles(fileList: FileList): void {\n let i = [...this.uploadedFiles, ...this.files].length;\n for (const property in fileList) {\n if (fileList[property] && typeof fileList[property] === 'object' && (!this.maxFiles || i < this.maxFiles)) {\n const fileName = fileList[property].name.split('.');\n const fileExtension = fileName[fileName.length - 1];\n\n if (this.accept.indexOf(fileExtension.toLowerCase()) !== -1 || this.accept === '*') {\n this.files.push(fileList[property]);\n }\n\n i++;\n }\n \n }\n\n this.getTotalSize();\n this.uploadedFiles ? this.onChange([...this.uploadedFiles, ...this.files]) : this.onChange(this.files);\n if (this.fileInputs) {\n this.fileInputs.first.nativeElement.value = '';\n this.fileInputs.last.nativeElement.value = '';\n }\n\n this.dragEntered = false;\n this.fileDrop.emit();\n }\n\n get showResetBtn(): boolean {\n return this.hasResetButton && this.isMultiple && (this.files.length > 0 || this.uploadedFiles.length > 0);\n }\n\n get isDropAreaDisabled(): boolean {\n return (!this.isMultiple && this.files.length === 1) || [...this.uploadedFiles, ...this.files].length === this.maxFiles;\n }\n\n // TODO check this function has never called (not implemented class level)\n // ngOnChanges(c: SimpleChanges): void {\n // if (c?.isMultiple) {\n // this.maxFiles = 1;\n // }\n // }\n\n ngOnInit(): void {\n if (this.hasPreviewAsIcon) {\n this.hasPreviewAsImage = false;\n }\n }\n\n onDragEnter(): void {\n if (!this.isDropAreaDisabled) {\n this.dragEntered = true;\n }\n }\n\n onDragLeave(): void {\n this.dragEntered = false;\n }\n\n public removeFromList(index: number): void {\n this.files = this.files.filter((f, i) => i !== index);\n\n if (this.files.length === 0) {\n this.progress = 0;\n }\n this.getTotalSize();\n this.onChange([...this.uploadedFiles, ...this.files]);\n }\n\n public removeFromUploadedList(index: number): void {\n this.uploadedFiles = this.uploadedFiles.filter((f, i) => i !== index);\n\n if (this.files.length === 0) {\n this.progress = 0;\n }\n\n this.getTotalSize();\n this.onChange([...this.uploadedFiles, ...this.files]);\n }\n\n public resetList(): void {\n this.files = [];\n this.uploadedFiles = [];\n this.getTotalSize();\n this.progress = 0;\n this.onChange([...this.uploadedFiles, ...this.files]);\n }\n\n public openBrowseWindow(): void {\n this.fileInputs.first.nativeElement.click();\n }\n\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public onItemClick(e: Blob | EuiUploadedFileInterface | any): void {\n this.itemClick.emit(e);\n }\n\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n writeValue(value: any): void {\n this.uploadedFiles = value || [];\n this.files = [];\n this.getTotalSize();\n }\n\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n registerOnTouched(fn: any): void {/* Nothing to be Done so far */}\n\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private onChange: any = (): void => {/* Nothing to be Done so far */};\n\n private getTotalSize(): void {\n this.filesTotalSize = 0;\n this.files.forEach((f) => {\n this.filesTotalSize += f.size;\n });\n }\n}\n", "<div\n class=\"eui-file-upload__drop-area\"\n [class.eui-file-upload__drop-area--active]=\"dragEntered\"\n [class.eui-file-upload__drop-area--disabled]=\"isDropAreaDisabled\"\n *ngIf=\"hasDragArea\">\n <span class=\"eui-file-upload__fake-btn\">{{ 'eui.euifileupload.CHOOSE-FILE' | translate }}</span>\n <span>{{ 'eui.euifileupload.DRAG-AND-DROP-FILE-HERE' | translate }}</span>\n <input\n #input\n class=\"eui-file-upload__file-input\"\n attr.aria-label=\"{{ 'eui.euifileupload.CHOOSE-FILE' | translate }} 'or' {{\n 'eui.euifileupload.DRAG-AND-DROP-FILE-HERE' | translate\n }}\"\n type=\"file\"\n accept=\"{{ accept }}\"\n [attr.disabled]=\"isDropAreaDisabled ? 'disabled' : null\"\n [multiple]=\"isMultiple\"\n (dragenter)=\"onDragEnter()\"\n (dragleave)=\"onDragLeave()\" />\n</div>\n<div class=\"eui-file-upload__simple-input-file\" *ngIf=\"!hasDragArea\">\n <label for=\"file-{{ randomNumberId }}\">\n <button euiButton type=\"button\" (click)=\"openBrowseWindow()\">{{ 'eui.euifileupload.CHOOSE-FILE' | translate }}</button>\n </label>\n\n <input\n #input\n *ngIf=\"isMultiple\"\n aria-label=\"Choose Multiple Files\"\n class=\"file-input\"\n id=\"file-{{ randomNumberId }}\"\n type=\"file\"\n accept=\"{{ accept }}\"\n multiple />\n <input\n #input\n *ngIf=\"!isMultiple\"\n aria-label=\"Choose a single file\"\n class=\"file-input\"\n id=\"file-{{ randomNumberId }}\"\n type=\"file\"\n accept=\"{{ accept }}\" />\n</div>\n<eui-file-upload-progress *ngIf=\"hasProgressBar\" [progress]=\"progress\"></eui-file-upload-progress>\n\n<div *ngFor=\"let uploadedFile of uploadedFiles; let i = index\">\n <eui-file-preview\n [isItemsClickable]=\"isItemsClickable\"\n [index]=\"i\"\n [file]=\"uploadedFile\"\n [hasPreview]=\"hasPreview\"\n [hasPreviewAsImage]=\"hasPreviewAsImage\"\n [hasPreviewAsIcon]=\"hasPreviewAsIcon\"\n (itemClick)=\"onItemClick($event)\"\n (removeFromList)=\"removeFromUploadedList($event)\">\n </eui-file-preview>\n</div>\n\n<div *ngFor=\"let file of files; let i = index\">\n <eui-file-preview\n [isItemsClickable]=\"isItemsClickable\"\n [index]=\"i\"\n [file]=\"file\"\n [hasPreview]=\"hasPreview\"\n [hasPreviewAsImage]=\"hasPreviewAsImage\"\n [hasPreviewAsIcon]=\"hasPreviewAsIcon\"\n (itemClick)=\"onItemClick($event)\"\n (removeFromList)=\"removeFromList($event)\">\n </eui-file-preview>\n</div>\n\n<div class=\"eui-file-upload__total-size\" *ngIf=\"filesTotalSize && hasTotalSizeDisplayed\">\n {{ filesTotalSize | filesize }} {{ 'eui.euifileupload.TOTAL-SIZE' | translate }}\n</div>\n\n<ng-content></ng-content>\n<button euiButton type=\"button\" (click)=\"resetList()\" *ngIf=\"showResetBtn\">\n {{ 'eui.euifileupload.RESET-LIST' | translate }}\n</button>\n", "import { Injectable } from '@angular/core';\nimport { HttpClient, HttpEvent, HttpEventType, HttpResponse } from '@angular/common/http';\nimport { filter, map, tap } from 'rxjs/operators';\nimport { pipe, Observable, UnaryFunction, MonoTypeOperatorFunction } from 'rxjs';\n\n@Injectable()\nexport class EuiFileUploadUtilsService {\n constructor(private httpClient: HttpClient) {}\n\n /**\n * @param data Data to send to backend\n * @param APIEndPoint Endpoint URL\n *\n * @description\n * Method that will format data in `FormData` and send them to backend.\n *\n * @usageNotes\n * Call the method and log the response in the console.\n *\n * ```typescript\n * this.euiFileUploadUtilsService.sendData(this.form.value, 'http://localhost:3000/api/fake-api').pipe(\n * this.euiFileUploadUtilsService.uploadProgress((progress) => {\n * console.log(progress);\n * }),\n * this.euiFileUploadUtilsService.toResponseBody(),\n * ).subscribe((response) => {\n * console.log(response);\n * });\n * ```\n *\n * @returns The backend response.\n */\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public sendData(data: any, APIEndPoint: string): Observable<any> {\n return this.httpClient.post(APIEndPoint, this.toFormData(data), {\n reportProgress: true,\n observe: 'events',\n });\n }\n\n /**\n * @param cb A method to execute on each progress step.\n *\n * @description\n * Method that will return the upload progress.\n *\n * @usageNotes\n * Call the method and log the progress in the console.\n *\n * ```typescript\n * this.euiFileUploadUtilsService.sendData(this.form.value, 'http://localhost:3000/api/fake-api').pipe(\n * this.euiFileUploadUtilsService.uploadProgress((progress) => {\n * console.log(progress);\n * }),\n * this.euiFileUploadUtilsService.toResponseBody(),\n * ).subscribe((response) => {\n * console.log(response);\n * });\n * ```\n *\n * @returns A number between 0 and 100.\n */\n public uploadProgress<T>(cb: (progress: number) => void): MonoTypeOperatorFunction<HttpEvent<T>> {\n return tap((event: HttpEvent<T>) => {\n if (event.type === HttpEventType.UploadProgress) {\n cb(Math.round((100 * event.loaded) / event.total));\n }\n });\n }\n\n /**\n * @description\n * Method that will return only the body of the backend response.\n *\n * @usageNotes\n * Call the method and log the response in the console.\n *\n * ```typescript\n * this.euiFileUploadUtilsService.sendData(this.form.value, 'http://localhost:3000/api/fake-api').pipe(\n * this.euiFileUploadUtilsService.uploadProgress((progress) => {\n * console.log(progress);\n * }),\n * this.euiFileUploadUtilsService.toResponseBody(),\n * ).subscribe((response) => {\n * console.log(response);\n * });\n * ```\n *\n * @returns The backend response.\n */\n public toResponseBody<T>(): UnaryFunction<Observable<HttpEvent<T>>, Observable<T>> {\n return pipe(\n filter((event: HttpEvent<T>) => event.type === HttpEventType.Response),\n map((res: HttpResponse<T>) => res.body),\n );\n }\n\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private toFormData(formValue: any): FormData {\n const formData = new FormData();\n\n for (const key of Object.keys(formValue)) {\n if (Array.isArray(formValue[key])) {\n let fileIndex = 0;\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n formValue[key].forEach((value: any) => {\n if (value instanceof File) {\n formData.append(key + fileIndex, value);\n fileIndex++;\n }\n });\n\n const a = [];\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n formValue[key].forEach((value: any): void => {\n a.push(value);\n });\n\n formData.append(key, JSON.stringify(a));\n } else {\n if (typeof formValue[key] === 'string') {\n formData.set(key, formValue[key]);\n } else {\n formData.set(key, JSON.stringify(formValue[key]));\n }\n }\n }\n\n return formData;\n }\n}\n", "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { TranslateModule } from '@ngx-translate/core';\n\nimport { EuiButtonModule } from '@eui/components/eui-button';\nimport { EuiIconModule } from '@eui/components/eui-icon';\n\nimport { EuiFileUploadComponent } from './eui-file-upload.component';\nimport { EuiFileUploadProgressComponent } from './progress/eui-file-upload-progress.component';\nimport { EuiFilePreviewComponent } from './file-preview/file-preview.component';\nimport { EuiFileSizePipe } from './pipes/filesize.pipe';\nimport { EuiFileUploadUtilsService } from './utils/eui-file-upload.utils';\n\n@NgModule({\n imports: [CommonModule, EuiButtonModule, EuiIconModule, TranslateModule],\n declarations: [EuiFileUploadComponent, EuiFileUploadProgressComponent, EuiFilePreviewComponent, EuiFileSizePipe],\n providers: [EuiFileUploadUtilsService],\n exports: [EuiFileUploadComponent],\n})\nexport class EuiFileUploadModule {}\n", "export type MimeType =\n | 'image/jpeg'\n | 'image/png'\n | 'image/gif'\n | 'image/webp'\n | 'image/flif'\n | 'image/x-xcf'\n | 'image/x-canon-cr2'\n | 'image/x-canon-cr3'\n | 'image/tiff'\n | 'image/bmp'\n | 'image/icns'\n | 'image/vnd.ms-photo'\n | 'image/vnd.adobe.photoshop'\n | 'application/x-indesign'\n | 'application/epub+zip'\n | 'application/x-xpinstall'\n | 'application/vnd.oasis.opendocument.text'\n | 'application/vnd.oasis.opendocument.spreadsheet'\n | 'application/vnd.oasis.opendocument.presentation'\n | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'\n | 'application/vnd.openxmlformats-officedocument.presentationml.presentation'\n | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'\n | 'application/zip'\n | 'application/json'\n | 'application/x-tar'\n | 'application/x-rar-compressed'\n | 'application/gzip'\n | 'application/x-bzip2'\n | 'application/x-7z-compressed'\n | 'application/x-apple-diskimage'\n | 'video/mp4'\n | 'audio/midi'\n | 'video/x-matroska'\n | 'video/webm'\n | 'video/quicktime'\n | 'video/vnd.avi'\n | 'audio/vnd.wave'\n | 'audio/qcelp'\n | 'audio/x-ms-asf'\n | 'video/x-ms-asf'\n | 'application/vnd.ms-asf'\n | 'video/mpeg'\n | 'video/3gpp'\n | 'audio/mpeg'\n | 'audio/mp4'\n | 'audio/opus'\n | 'video/ogg'\n | 'audio/ogg'\n | 'application/ogg'\n | 'audio/x-flac'\n | 'audio/ape'\n | 'audio/wavpack'\n | 'audio/amr'\n | 'application/pdf'\n | 'application/x-elf'\n | 'application/x-msdownload'\n | 'application/x-shockwave-flash'\n | 'application/rtf'\n | 'application/wasm'\n | 'font/woff'\n | 'font/woff2'\n | 'application/vnd.ms-fontobject'\n | 'font/ttf'\n | 'font/otf'\n | 'image/x-icon'\n | 'video/x-flv'\n | 'application/postscript'\n | 'application/eps'\n | 'application/x-xz'\n | 'application/x-sqlite3'\n | 'application/x-nintendo-nes-rom'\n | 'application/x-google-chrome-extension'\n | 'application/vnd.ms-cab-compressed'\n | 'application/x-deb'\n | 'application/x-unix-archive'\n | 'application/x-rpm'\n | 'application/x-compress'\n | 'application/x-lzip'\n | 'application/x-cfb'\n | 'application/x-mie'\n | 'application/x-apache-arrow'\n | 'application/mxf'\n | 'video/mp2t'\n | 'application/x-blender'\n | 'image/bpg'\n | 'image/j2c'\n | 'image/jp2'\n | 'image/jpx'\n | 'image/jpm'\n | 'image/mj2'\n | 'audio/aiff'\n | 'application/xml'\n | 'application/x-mobipocket-ebook'\n | 'image/heif'\n | 'image/heif-sequence'\n | 'image/heic'\n | 'image/heic-sequence'\n | 'image/ktx'\n | 'application/dicom'\n | 'audio/x-musepack'\n | 'text/calendar'\n | 'text/vcard'\n | 'model/gltf-binary'\n | 'application/vnd.tcpdump.pcap'\n | 'audio/x-voc'\n | 'audio/vnd.dolby.dd-raw'\n | 'audio/x-m4a'\n | 'image/apng'\n | 'image/x-olympus-orf'\n | 'image/x-sony-arw'\n | 'image/x-adobe-dng'\n | 'image/x-nikon-nef'\n | 'image/x-panasonic-rw2'\n | 'image/x-fujifilm-raf'\n | 'video/x-m4v'\n | 'video/3gpp2'\n | 'application/x-esri-shape'\n | 'audio/aac'\n | 'audio/x-it'\n | 'audio/x-s3m'\n | 'audio/x-xm'\n | 'video/MP1S'\n | 'video/MP2P'\n | 'application/vnd.sketchup.skp'\n | 'image/avif'\n | 'application/x-lzh-compressed'\n | 'application/pgp-encrypted'\n | 'application/x-asar'\n | 'model/stl'\n | 'application/vnd.ms-htmlhelp'\n | 'model/3mf'\n | 'image/jxl'\n | 'application/zstd'\n | 'image/jls'\n | 'application/vnd.ms-outlook'\n | 'image/vnd.dwg'\n | 'application/x-parquet'\n | 'application/java-vm'\n | 'application/x-arj'\n | 'application/x-cpio'\n | 'application/x-ace-compressed'\n | 'application/avro'\n | 'application/vnd.iccprofile'; // eslint-disable-line semi-style\n\nexport const getMimeType = (header: Uint8Array): MimeType => {\n // convert Uint8Array to hex string\n const hex = uint8ArrayToHexString(header);\n\n // map hex string to mime type\n if (hex.startsWith('ffd8ffe000104a46')) return 'image/jpeg';\n if (hex.startsWith('89504e47')) return 'image/png';\n if (hex.startsWith('464c4946')) return 'image/flif';\n if (hex.startsWith('67696d7020786366')) return 'image/x-xcf';\n if (hex.startsWith('49492a00')) return 'image/x-canon-cr2';\n if (hex.startsWith('49492a00')) return 'image/x-canon-cr3';\n if (hex.startsWith('49492a00')) return 'image/tiff';\n if (hex.startsWith('424d')) return 'image/bmp';\n if (hex.startsWith('69636e73')) return 'image/icns';\n if (hex.startsWith('49491a0000004845415050')) return 'image/vnd.ms-photo';\n if (hex.startsWith('38425053')) return 'image/vnd.adobe.photoshop';\n if (hex.startsWith('06054b50')) return 'application/x-indesign';\n if (hex.startsWith('504b0304')) return 'application/epub+zip';\n if (hex.startsWith('504b0304')) return 'application/x-xpinstall';\n if (hex.startsWith('504b0304')) return 'application/vnd.oasis.opendocument.text';\n if (hex.startsWith('504b0304')) return 'application/vnd.oasis.opendocument.spreadsheet';\n if (hex.startsWith('504b0304')) return 'application/vnd.oasis.opendocument.presentation';\n if (hex.startsWith('504b0304')) return 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';\n if (hex.startsWith('504b0304')) return 'application/vnd.openxmlformats-officedocument.presentationml.presentation';\n if (hex.startsWith('504b0304')) return 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';\n if (hex.startsWith('504b0304')) return 'application/zip';\n if (hex.startsWith('7b2274797065223a226a736f6e227d')) return 'application/json';\n if (hex.startsWith('7573746172')) return 'application/x-tar';\n if (hex.startsWith('526172211a0700')) return 'application/x-rar-compressed';\n if (hex.startsWith('1f8b08')) return 'application/gzip';\n if (hex.startsWith('425a68')) return 'application/x-bzip2';\n if (hex.startsWith('377abcaf271c')) return 'application/x-7z-compressed';\n if (hex.startsWith('78da')) return 'application/x-apple-diskimage';\n if (hex.startsWith('00000020667479706d70')) return 'video/mp4';\n if (hex.startsWith('4d546864')) return 'audio/midi';\n if (hex.startsWith('1a45dfa393428288')) return 'video/x-matroska';\n if (hex.startsWith('1a45dfa3')) return 'video/webm';\n if (hex.startsWith('00000014667479707174')) return 'video/quicktime';\n if (hex.startsWith('52494646')) return 'video/vnd.avi';\n if (hex.startsWith('52494646')) return 'audio/vnd.wave';\n if (hex.startsWith('0a010301')) return 'audio/qcelp';\n if (hex.startsWith('3026b2758e66cf11')) return 'audio/x-ms-asf';\n if (hex.startsWith('3026b2758e66cf11')) return 'video/x-ms-asf';\n if (hex.startsWith('3026b2758e66cf11')) return 'application/vnd.ms-asf';\n if (hex.startsWith('000001ba')) return 'video/mpeg';\n if (hex.startsWith('00000020667479703367')) return 'video/3gpp';\n if (hex.startsWith('494433')) return 'audio/mpeg';\n if (hex.startsWith('00000020667479704d344120')) return 'audio/mp4';\n if (hex.startsWith('4f707573')) return 'audio/opus';\n if (hex.startsWith('4f676753')) return 'video/ogg';\n if (hex.startsWith('4f676753')) return 'audio/ogg';\n if (hex.startsWith('4f676753')) return 'application/ogg';\n if (hex.startsWith('664c6143')) return 'audio/x-flac';\n if (hex.startsWith('4d414320')) return 'audio/ape';\n if (hex.startsWith('7776706b')) return 'audio/wavpack';\n if (hex.startsWith('2321414d520a')) return 'audio/amr';\n if (hex.startsWith('255044462d312e')) return 'application/pdf';\n if (hex.startsWith('7f454c46')) return 'application/x-elf';\n if (hex.startsWith('4d5a')) return 'application/x-msdownload';\n if (hex.startsWith('435753')) return 'application/x-shockwave-flash';\n if (hex.startsWith('7b5c72746631')) return 'application/rtf';\n if (hex.startsWith('0061736d')) return 'application/wasm';\n if (hex.startsWith('774f4646')) return 'font/woff';\n if (hex.startsWith('774f4632')) return 'font/woff2';\n if (hex.startsWith('000100000008')) return 'application/vnd.ms-fontobject';\n if (hex.startsWith('0001000000')) return 'font/ttf';\n if (hex.startsWith('4f54544f00')) return 'font/otf';\n if (hex.startsWith('000001000100')) return 'image/x-icon';\n if (hex.startsWith('464c560105')) return 'video/x-flv';\n if (hex.startsWith('25215053')) return 'application/postscript';\n if (hex.startsWith('25215053')) return 'application/eps';\n if (hex.startsWith('fd377a585a00')) return 'application/x-xz';\n if (hex.startsWith('53514c69746520666f726d6174203300')) return 'application/x-sqlite3';\n if (hex.startsWith('4e45531a00000001')) return 'application/x-nintendo-nes-rom';\n if (hex.startsWith('504b0304')) return 'application/x-google-chrome-extension';\n if (hex.startsWith('4d534346')) return 'application/vnd.ms-cab-compressed';\n if (hex.startsWith('213c617263683e0a')) return 'application/x-deb';\n if (hex.startsWith('1f8b08')) return 'application/x-unix-archive';\n if (hex.startsWith('edabeedb')) return 'application/x-rpm';\n if (hex.startsWith('1f9d90')) return 'application/x-compress';\n if (hex.startsWith('4c5a4950')) return 'application/x-lzip';\n if (hex.startsWith('d0cf11e0a1b11ae1')) return 'application/x-cfb';\n if (hex.startsWith('4d49455f')) return 'application/x-mie';\n if (hex.startsWith('4141523146')) return 'application/x-apache-arrow';\n if (hex.startsWith('060e2b3402050101')) return 'application/mxf';\n if (hex.startsWith('47')) return 'video/mp2t';\n if (hex.startsWith('4250e4')) return 'application/x-blender';\n if (hex.startsWith('425047fb')) return 'image/bpg';\n if (hex.startsWith('ff4fff51')) return 'image/j2c';\n if (hex.startsWith('0000000c6a5020200d0a')) return 'image/jp2';\n if (hex.startsWith('6a5020200d0a870a')) return 'image/jpx';\n if (hex.startsWith('6a5020200d0a870a')) return 'image/jpm';\n if (hex.startsWith('0000000c6a5020200d0a')) return 'image/mj2';\n if (hex.startsWith('464f524d')) return 'audio/aiff';\n if (hex.startsWith('3c3f786d6c20')) return 'application/xml';\n if (hex.startsWith('424f4f4b4d4f4249')) return 'application/x-mobipocket-ebook';\n if (hex.startsWith('667479706174')) return 'image/heif';\n if (hex.startsWith('667479706174')) return 'image/heif-sequence';\n if (hex.startsWith('667479706174')) return 'image/heic';\n if (hex.startsWith('667479706174')) return 'image/heic-sequence';\n if (hex.startsWith('4b545820')) return 'image/ktx';\n if (hex.startsWith('4449434d')) return 'application/dicom';\n if (hex.startsWith('4d50434b')) return 'audio/x-musepack';\n if (hex.startsWith('56656e64')) return 'text/calendar';\n if (hex.startsWith('424547494e3a5643415244')) return 'text/vcard';\n if (hex.startsWith('676c5458')) return 'model/gltf-binary';\n if (hex.startsWith('d4c3b2a1')) return 'application/vnd.tcpdump.pcap';\n if (hex.startsWith('464f524d')) return 'audio/x-voc';\n if (hex.startsWith('64646f6c')) return 'audio/vnd.dolby.dd-raw';\n\n return null;\n};\n\nconst uint8ArrayToHexString = (uint8Array): string => {\n return Array.prototype.map.call(uint8Array, (byte) => ('00' + byte.toString(16)).slice(-2)).join('');\n};\n", "import { AbstractControl, AsyncValidatorFn, ValidationErrors, ValidatorFn } from '@angular/forms';\nimport { Observable, of, zip } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { getMimeType, MimeType } from './mime-types';\n\n/**\n * @description\n * Validator that requires the maximum length of files that can be uploaded.\n *\n * @usageNotes\n * Validate that the user selected maximum 3 files:\n *\n * ```typescript\n * const fileUpload = new FormControl(null, maxFilesValidator(3));\n * console.log(fileUpload.errors); // { maxFiles: 3 }\n * ```\n *\n * @returns A validator function that returns an error map with the\n * `maxFiles` if the validation check fails, otherwise `null`.\n */\nexport const maxFilesValidator =\n (maxFiles: number): ValidatorFn =>\n (control: AbstractControl): { maxFiles: number } | null =>\n control.value && control.value.length > maxFiles ? { maxFiles } : null;\n\n/**\n * @description\n * Validator that requires the maximum size (in bytes) of files that can be uploaded.\n *\n * @usageNotes\n * Validate that the user doesn't select a file have a size up to 300Kb:\n *\n * ```typescript\n * const fileUpload = new FormControl(null, maxSizeValidator(300000));\n * console.log(fileUpload.errors); // { maxSize: 300000 }\n * ```\n *\n * @returns A validator function that returns an error map with the\n * `maxSize` if the validation check fails, otherwise `null`.\n */\nexport const maxSizeValidator =\n (maxSize: number): ValidatorFn =>\n (control: AbstractControl): { maxSize: number } | null => {\n let totalSize = 0;\n if (control.value) {\n control.value.forEach((file: File) => {\n totalSize += file.size;\n });\n }\n\n return control.value && totalSize > maxSize * 1.024 ? { maxSize } : null;\n };\n/**\n * @description\n * Validator that requires an array of mime type that can be uploaded.\n *\n * @usageNotes\n * Validate that the user doesn't select a file having another extension than .jpg or .jpeg:\n *\n * ```typescript\n * const fileUpload = new FormControl(null, mimeTypeExtensionValidator(['image/jpeg'])),\n * console.log(fileUpload.errors); // { invalidFileExtension: ['image/jpeg'] }\n * ```\n *\n * @returns A validator function that returns an error map with the\n * `invalidFileExtension` if the validation check fails, otherwise `null`.\n */\nexport const mimeTypeExtensionValidator =\n (mimeTypes: string[]): ValidatorFn =>\n (control: AbstractControl): { invalidFileExtension: string[] } | null => {\n const invalidFileExtension: string[] = [];\n if (control.value) {\n control.value.forEach((file: File) => {\n if (mimeTypes.indexOf(file.type) === -1) {\n invalidFileExtension.push(file.name);\n }\n });\n }\n\n return control.value && invalidFileExtension.length > 0 ? { invalidFileExtension } : null;\n };\n\n/**\n * @description\n * Validator that requires an array of mime type that can be uploaded.\n *\n * @usageNotes\n * Validate that the user doesn't select a file having another extension than .jpg or .jpeg:\n *\n * ```typescript\n * const fileUpload = new FormControl(null, mimeTypeExtensionValidator(['image/jpeg'])),\n * console.log(fileUpload.errors); // { invalidMimeFileType: ['image/jpeg'] }\n * ```\n *\n * @returns An Async validator function that returns an error map with the\n * `invalidMimeFileType` if the validation check fails, otherwise `null`.\n */\nexport const asyncMimeTypeExtensionValidator =\n (mimeTypes: MimeType[]): AsyncValidatorFn =>\n (control: AbstractControl): Promise<ValidationErrors | null> | Observable<ValidationErrors | null> => {\n if (control.value) {\n const fileErrorObservables: Observable<ValidationErrors | null>[] = [];\n // iterate over files\n control.value.forEach((file: File) => {\n // push observable which will check the mime validation type\n fileErrorObservables.push(validateFileMimeType(file, mimeTypes));\n });\n return zip(...fileErrorObservables).pipe(\n map((fileErrors) => {\n const errors = fileErrors.filter((fileError) => fileError !== null);\n // Error should be { fileName: FileType }\n return { invalidMimeFileType: errors };\n }),\n );\n }\n return of(null);\n };\n\nconst validateFileMimeType = (file: File, mimeTypes: MimeType[]): Observable<{ [key: string]: MimeType }> => {\n return new Observable<{ [p: string]: MimeType }>((subscriber) => {\n const reader = new FileReader();\n reader.onloadend = (): void => {\n const buffer = reader.result as ArrayBuffer;\n const headerBytes = new Uint8Array(buffer).slice(0, 8);\n const mime = getMimeType(headerBytes);\n if (mimeTypes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, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'eui-file-upload-progress',\n templateUrl: './eui-file-upload-progress.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class EuiFileUploadProgressComponent {\n @Input() progress = 0;\n}\n", "<div *ngIf=\"progress > 0\">\n <div class=\"eui-file-upload__progress-bar-container\">\n <div class=\"progress-bar\" [style.width]=\"progress + '%'\"></div>\n </div>\n <div>{{ progress }}%</div>\n</div>\n", "import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'filesize',\n})\nexport class EuiFileSizePipe implements PipeTransform {\n private units = ['bytes', 'KB', 'MB', 'GB', 'TB', 'PB'];\n\n transform(bytes = 0, precision = 2): string {\n if (isNaN(parseFloat(String(bytes))) || !isFinite(bytes)) {\n return '?';\n }\n\n let unit = 0;\n\n while (bytes >= 1024) {\n bytes /= 1024;\n unit++;\n }\n\n return bytes.toFixed(+precision) + ' ' + this.units[unit];\n }\n}\n", "import {\n Component,\n OnInit,\n Input,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n ChangeDetectorRef,\n Output,\n EventEmitter,\n} from '@angular/core';\nimport { coerceBooleanProperty, BooleanInput } from '@angular/cdk/coercion';\n\nimport { EuiUploadedFileInterface } from '../models/uploaded-file.model';\n\n@Component({\n selector: 'eui-file-preview',\n templateUrl: './file-preview.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class EuiFilePreviewComponent implements OnInit {\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Input() file: Blob | EuiUploadedFileInterface | any;\n @Input() index: number;\n\n @Input() previewAsIconConfig = {\n avi: 'eui-file-video',\n html: 'eui-file-html',\n htm: 'eui-file-code',\n js: 'eui-file-code',\n json: 'eui-file-code',\n mp3: 'eui-file-audio',\n mp4: 'eui-file-video',\n pdf: 'eui-file-pdf',\n png: 'eui-file-image',\n svg: 'eui-file-image',\n txt: 'eui-file-text',\n xml: 'eui-file-code',\n jpeg: 'eui-file-image',\n jpg: 'eui-file-image',\n zip: 'eui-file-archive',\n doc: 'eui-file-word',\n docx: 'eui-file-word-o',\n xls: 'eui-file-excel-o',\n xlsx: 'eui-file-excel-o',\n ppt: 'eui-file-powerpoint',\n csv: 'eui-file-text',\n rtf: 'eui-file-text',\n };\n\n @Output() removeFromList = new EventEmitter<number>();\n\n public url: string;\n public icon: string;\n public fileExtension: string;\n public previewData: { image: boolean; display: string };\n public isLoading = false;\n\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Output() itemClick = new EventEmitter<Blob | EuiUploadedFileInterface | any>();\n\n @Input()\n get hasPreview(): boolean {\n return this._hasPreview;\n }\n set hasPreview(value: BooleanInput) {\n this._hasPreview = coerceBooleanProperty(value);\n }\n private _hasPreview = true;\n @Input()\n get isFilenameDisplayed(): boolean {\n return this._isFilenameDisplayed;\n }\n set isFilenameDisplayed(value: BooleanInput) {\n this._isFilenameDisplayed = coerceBooleanProperty(value);\n }\n private _isFilenameDisplayed = true;\n @Input()\n get isFilesizeDisplayed(): boolean {\n return this._isFilesizeDisplayed;\n }\n set isFilesizeDisplayed(value: BooleanInput) {\n this._isFilesizeDisplayed = coerceBooleanProperty(value);\n }\n private _isFilesizeDisplayed = true;\n @Input()\n get isFiletypeDisplayed(): boolean {\n return this._isFiletypeDisplayed;\n }\n set isFiletypeDisplayed(value: BooleanInput) {\n this._isFiletypeDisplayed = coerceBooleanProperty(value);\n }\n private _isFiletypeDisplayed = true;\n @Input()\n get hasPreviewAsImage(): boolean {\n return this._hasPreviewAsImage;\n }\n set hasPreviewAsImage(value: BooleanInput) {\n this._hasPreviewAsImage = coerceBooleanProperty(value);\n }\n private _hasPreviewAsImage = true;\n @Input()\n get hasPreviewAsIcon(): boolean {\n return this._hasPreviewAsIcon;\n }\n set hasPreviewAsIcon(value: BooleanInput) {\n this._hasPreviewAsIcon = coerceBooleanProperty(value);\n }\n private _hasPreviewAsIcon = false;\n @Input()\n get isItemsClickable(): boolean {\n return this._isItemsClickable;\n }\n set isItemsClickable(value: BooleanInput) {\n this._isItemsClickable = coerceBooleanProperty(value);\n }\n private _isItemsClickable = false;\n\n constructor(private cd: ChangeDetectorRef) {}\n\n // imageUrl\n ngOnInit(): void {\n if (this.hasPreviewAsIcon) {\n this.hasPreviewAsImage = false;\n }\n\n if (this.file instanceof Blob) {\n const reader = new FileReader();\n reader.readAsArrayBuffer(this.file as Blob);\n // reader.readAsDataURL(this.file as Blob);\n\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n reader.onload = (event: any): void => {\n this.url = event.target.result;\n this.fileExtension = this.getFileExtension(this.file.name);\n this.icon = this.getIconForMime(this.fileExtension);\n\n const blob = new Blob([reader.result], { type: this.file.type });\n const imageUrl = URL.createObjectURL(blob);\n\n this.previewData = this.getPreviewForMime(this.fileExtension, imageUrl);\n\n this.cd.detectChanges();\n };\n reader.onloadstart = (event: ProgressEvent): void => {\n this.isLoading = true;\n this.cd.detectChanges();\n };\n reader.onloadend = (event: ProgressEvent): void => {\n this.isLoading = false;\n this.cd.detectChanges();\n };\n } else {\n this.url = (this.file as EuiUploadedFileInterface).url;\n this.fileExtension = this.getFileExtension(this.file.name);\n this.icon = this.getIconForMime(this.fileExtension);\n\n this.previewData = this.getPreviewForMime(this.fileExtension, this.url);\n\n this.cd.detectChanges();\n }\n }\n\n public onRemoveFromList(): void {\n this.removeFromList.emit(this.index);\n }\n\n public onItemClick(e: Event): void {\n this.itemClick.emit(this.file);\n e.preventDefault();\n }\n\n private getFileExtension(fileName: string): string {\n const ext = fileName.split('.');\n\n return ext[ext.length - 1];\n }\n\n private getPreviewForMime(fileExtension: string, imgUrl: string): { image: boolean; display: string } {\n const f = fileExtension.toLowerCase();\n const image = f === 'jpeg' || f === 'jpg' || f === 'png' || f === 'gif' ? true : false;\n const display = f === 'jpeg' || f === 'jpg' || f === 'png' || f === 'gif' ? imgUrl : this.getIconForMime(f);\n\n return { image, display };\n }\n\n private getIconForMime(fileExtension: string): string {\n const f = fileExtension.toLowerCase();\n return !this.previewAsIconConfig[f] ? 'eui-file-empty-o' : this.previewAsIconConfig[f];\n }\n}\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", "import {\n Component,\n ElementRef,\n HostBinding,\n HostListener,\n Input,\n ViewEncapsulation,\n OnInit,\n ViewChildren,\n QueryList,\n Output,\n EventEmitter,\n booleanAttribute,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { EuiUploadedFileInterface } from './models/uploaded-file.model';\n\n@Component({\n selector: 'eui-file-upload',\n templateUrl: './eui-file-upload.component.html',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: EuiFileUploadComponent,\n multi: true,\n },\n ],\n styleUrls: ['./styles/_index.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class EuiFileUploadComponent implements ControlValueAccessor, OnInit {\n @Input() e2eAttr = 'eui-file-upload';\n @Input() progress: number;\n @Input() accept = '*';\n @Input() maxFiles: number;\n @Output() fileDrop = new EventEmitter();\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Output() itemClick = new EventEmitter<Blob | EuiUploadedFileInterface | any>();\n\n @HostBinding('class')\n public get cssClasses(): string {\n return [\n 'eui-file-upload',\n ]\n .join(' ')\n .trim();\n }\n\n public files: File[] = [];\n public filesTotalSize = 0;\n public randomNumberId = Math.floor(Math.random() * 10000);\n public uploadedFiles: EuiUploadedFileInterface[] = [];\n public dragEntered = false;\n @ViewChildren('input') fileInputs: QueryList<ElementRef<HTMLInputElement>>;\n\n @Input({ transform: booleanAttribute }) isMultiple = false;\n @Input({ transform: booleanAttribute }) hasProgressBar = true;\n @Input({ transform: booleanAttribute }) hasPreview = true;\n @Input({ transform: booleanAttribute }) hasPreviewAsImage = true;\n @Input({ transform: booleanAttribute }) hasPreviewAsIcon = false;\n @Input({ transform: booleanAttribute }) hasTotalSizeDisplayed = true;\n @Input({ transform: booleanAttribute }) hasResetButton = true;\n @Input({ transform: booleanAttribute }) hasDragArea = false;\n @Input({ transform: booleanAttribute }) isItemsClickable = false;\n\n @HostListener('change', ['$event.target.files']) emitFiles(fileList: FileList): void {\n let i = [...this.uploadedFiles, ...this.files].length;\n for (const property in fileList) {\n if (fileList[property] && typeof fileList[property] === 'object' && (!this.maxFiles || i < this.maxFiles)) {\n const fileName = fileList[property].name.split('.');\n const fileExtension = fileName[fileName.length - 1];\n\n if (this.accept.indexOf(fileExtension.toLowerCase()) !== -1 || this.accept === '*') {\n this.files.push(fileList[property]);\n }\n\n i++;\n }\n \n }\n\n this.getTotalSize();\n this.uploadedFiles ? this.onChange([...this.uploadedFiles, ...this.files]) : this.onChange(this.files);\n if (this.fileInputs) {\n this.fileInputs.first.nativeElement.value = '';\n this.fileInputs.last.nativeElement.value = '';\n }\n\n this.dragEntered = false;\n this.fileDrop.emit();\n }\n\n get showResetBtn(): boolean {\n return this.hasResetButton && this.isMultiple && (this.files.length > 0 || this.uploadedFiles.length > 0);\n }\n\n get isDropAreaDisabled(): boolean {\n return (!this.isMultiple && this.files.length === 1) || [...this.uploadedFiles, ...this.files].length === this.maxFiles;\n }\n\n // TODO check this function has never called (not implemented class level)\n // ngOnChanges(c: SimpleChanges): void {\n // if (c?.isMultiple) {\n // this.maxFiles = 1;\n // }\n // }\n\n ngOnInit(): void {\n if (this.hasPreviewAsIcon) {\n this.hasPreviewAsImage = false;\n }\n }\n\n onDragEnter(): void {\n if (!this.isDropAreaDisabled) {\n this.dragEntered = true;\n }\n }\n\n onDragLeave(): void {\n this.dragEntered = false;\n }\n\n public removeFromList(index: number): void {\n this.files = this.files.filter((f, i) => i !== index);\n\n if (this.files.length === 0) {\n this.progress = 0;\n }\n this.getTotalSize();\n this.onChange([...this.uploadedFiles, ...this.files]);\n }\n\n public removeFromUploadedList(index: number): void {\n this.uploadedFiles = this.uploadedFiles.filter((f, i) => i !== index);\n\n if (this.files.length === 0) {\n this.progress = 0;\n }\n\n this.getTotalSize();\n this.onChange([...this.uploadedFiles, ...this.files]);\n }\n\n public resetList(): void {\n this.files = [];\n this.uploadedFiles = [];\n this.getTotalSize();\n this.progress = 0;\n this.onChange([...this.uploadedFiles, ...this.files]);\n }\n\n public openBrowseWindow(): void {\n this.fileInputs.first.nativeElement.click();\n }\n\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public onItemClick(e: Blob | EuiUploadedFileInterface | any): void {\n this.itemClick.emit(e);\n }\n\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n writeValue(value: any): void {\n this.uploadedFiles = value || [];\n this.files = [];\n this.getTotalSize();\n }\n\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n registerOnTouched(fn: any): void {/* Nothing to be Done so far */}\n\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private onChange: any = (): void => {/* Nothing to be Done so far */};\n\n private getTotalSize(): void {\n this.filesTotalSize = 0;\n this.files.forEach((f) => {\n this.filesTotalSize += f.size;\n });\n }\n}\n", "<div\n class=\"eui-file-upload__drop-area\"\n [class.eui-file-upload__drop-area--active]=\"dragEntered\"\n [class.eui-file-upload__drop-area--disabled]=\"isDropAreaDisabled\"\n *ngIf=\"hasDragArea\">\n <span class=\"eui-file-upload__fake-btn\">{{ 'eui.euifileupload.CHOOSE-FILE' | translate }}</span>\n <span>{{ 'eui.euifileupload.DRAG-AND-DROP-FILE-HERE' | translate }}</span>\n <input\n #input\n class=\"eui-file-upload__file-input\"\n attr.aria-label=\"{{ 'eui.euifileupload.CHOOSE-FILE' | translate }} 'or' {{\n 'eui.euifileupload.DRAG-AND-DROP-FILE-HERE' | translate\n }}\"\n type=\"file\"\n accept=\"{{ accept }}\"\n [attr.disabled]=\"isDropAreaDisabled ? 'disabled' : null\"\n [multiple]=\"isMultiple\"\n (dragenter)=\"onDragEnter()\"\n (dragleave)=\"onDragLeave()\" />\n</div>\n<div class=\"eui-file-upload__simple-input-file\" *ngIf=\"!hasDragArea\">\n <label for=\"file-{{ randomNumberId }}\">\n <button euiButton type=\"button\" (click)=\"openBrowseWindow()\">{{ 'eui.euifileupload.CHOOSE-FILE' | translate }}</button>\n </label>\n\n <input\n #input\n *ngIf=\"isMultiple\"\n aria-label=\"Choose Multiple Files\"\n class=\"file-input\"\n id=\"file-{{ randomNumberId }}\"\n type=\"file\"\n accept=\"{{ accept }}\"\n multiple />\n <input\n #input\n *ngIf=\"!isMultiple\"\n aria-label=\"Choose a single file\"\n class=\"file-input\"\n id=\"file-{{ randomNumberId }}\"\n type=\"file\"\n accept=\"{{ accept }}\" />\n</div>\n<eui-file-upload-progress *ngIf=\"hasProgressBar\" [progress]=\"progress\"></eui-file-upload-progress>\n\n<div *ngFor=\"let uploadedFile of uploadedFiles; let i = index\">\n <eui-file-preview\n [isItemsClickable]=\"isItemsClickable\"\n [index]=\"i\"\n [file]=\"uploadedFile\"\n [hasPreview]=\"hasPreview\"\n [hasPreviewAsImage]=\"hasPreviewAsImage\"\n [hasPreviewAsIcon]=\"hasPreviewAsIcon\"\n (itemClick)=\"onItemClick($event)\"\n (removeFromList)=\"removeFromUploadedList($event)\">\n </eui-file-preview>\n</div>\n\n<div *ngFor=\"let file of files; let i = index\">\n <eui-file-preview\n [isItemsClickable]=\"isItemsClickable\"\n [index]=\"i\"\n [file]=\"file\"\n [hasPreview]=\"hasPreview\"\n [hasPreviewAsImage]=\"hasPreviewAsImage\"\n [hasPreviewAsIcon]=\"hasPreviewAsIcon\"\n (itemClick)=\"onItemClick($event)\"\n (removeFromList)=\"removeFromList($event)\">\n </eui-file-preview>\n</div>\n\n<div class=\"eui-file-upload__total-size\" *ngIf=\"filesTotalSize && hasTotalSizeDisplayed\">\n {{ filesTotalSize | filesize }} {{ 'eui.euifileupload.TOTAL-SIZE' | translate }}\n</div>\n\n<ng-content></ng-content>\n<button euiButton type=\"button\" (click)=\"resetList()\" *ngIf=\"showResetBtn\">\n {{ 'eui.euifileupload.RESET-LIST' | translate }}\n</button>\n", "import { Injectable } from '@angular/core';\nimport { HttpClient, HttpEvent, HttpEventType, HttpResponse } from '@angular/common/http';\nimport { filter, map, tap } from 'rxjs/operators';\nimport { pipe, Observable, UnaryFunction, MonoTypeOperatorFunction } from 'rxjs';\n\n@Injectable()\nexport class EuiFileUploadUtilsService {\n constructor(private httpClient: HttpClient) {}\n\n /**\n * @param data Data to send to backend\n * @param APIEndPoint Endpoint URL\n *\n * @description\n * Method that will format data in `FormData` and send them to backend.\n *\n * @usageNotes\n * Call the method and log the response in the console.\n *\n * ```typescript\n * this.euiFileUploadUtilsService.sendData(this.form.value, 'http://localhost:3000/api/fake-api').pipe(\n * this.euiFileUploadUtilsService.uploadProgress((progress) => {\n * console.log(progress);\n * }),\n * this.euiFileUploadUtilsService.toResponseBody(),\n * ).subscribe((response) => {\n * console.log(response);\n * });\n * ```\n *\n * @returns The backend response.\n */\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public sendData(data: any, APIEndPoint: string): Observable<any> {\n return this.httpClient.post(APIEndPoint, this.toFormData(data), {\n reportProgress: true,\n observe: 'events',\n });\n }\n\n /**\n * @param cb A method to execute on each progress step.\n *\n * @description\n * Method that will return the upload progress.\n *\n * @usageNotes\n * Call the method and log the progress in the console.\n *\n * ```typescript\n * this.euiFileUploadUtilsService.sendData(this.form.value, 'http://localhost:3000/api/fake-api').pipe(\n * this.euiFileUploadUtilsService.uploadProgress((progress) => {\n * console.log(progress);\n * }),\n * this.euiFileUploadUtilsService.toResponseBody(),\n * ).subscribe((response) => {\n * console.log(response);\n * });\n * ```\n *\n * @returns A number between 0 and 100.\n */\n public uploadProgress<T>(cb: (progress: number) => void): MonoTypeOperatorFunction<HttpEvent<T>> {\n return tap((event: HttpEvent<T>) => {\n if (event.type === HttpEventType.UploadProgress) {\n cb(Math.round((100 * event.loaded) / event.total));\n }\n });\n }\n\n /**\n * @description\n * Method that will return only the body of the backend response.\n *\n * @usageNotes\n * Call the method and log the response in the console.\n *\n * ```typescript\n * this.euiFileUploadUtilsService.sendData(this.form.value, 'http://localhost:3000/api/fake-api').pipe(\n * this.euiFileUploadUtilsService.uploadProgress((progress) => {\n * console.log(progress);\n * }),\n * this.euiFileUploadUtilsService.toResponseBody(),\n * ).subscribe((response) => {\n * console.log(response);\n * });\n * ```\n *\n * @returns The backend response.\n */\n public toResponseBody<T>(): UnaryFunction<Observable<HttpEvent<T>>, Observable<T>> {\n return pipe(\n filter((event: HttpEvent<T>) => event.type === HttpEventType.Response),\n map((res: HttpResponse<T>) => res.body),\n );\n }\n\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private toFormData(formValue: any): FormData {\n const formData = new FormData();\n\n for (const key of Object.keys(formValue)) {\n if (Array.isArray(formValue[key])) {\n let fileIndex = 0;\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n formValue[key].forEach((value: any) => {\n if (value instanceof File) {\n formData.append(key + fileIndex, value);\n fileIndex++;\n }\n });\n\n const a = [];\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n formValue[key].forEach((value: any): void => {\n a.push(value);\n });\n\n formData.append(key, JSON.stringify(a));\n } else {\n if (typeof formValue[key] === 'string') {\n formData.set(key, formValue[key]);\n } else {\n formData.set(key, JSON.stringify(formValue[key]));\n }\n }\n }\n\n return formData;\n }\n}\n", "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { TranslateModule } from '@ngx-translate/core';\n\nimport { EuiButtonModule } from '@eui/components/eui-button';\nimport { EuiIconModule } from '@eui/components/eui-icon';\n\nimport { EuiFileUploadComponent } from './eui-file-upload.component';\nimport { EuiFileUploadProgressComponent } from './progress/eui-file-upload-progress.component';\nimport { EuiFilePreviewComponent } from './file-preview/file-preview.component';\nimport { EuiFileSizePipe } from './pipes/filesize.pipe';\nimport { EuiFileUploadUtilsService } from './utils/eui-file-upload.utils';\n\n@NgModule({\n imports: [CommonModule, EuiButtonModule, EuiIconModule, TranslateModule],\n declarations: [EuiFileUploadComponent, EuiFileUploadProgressComponent, EuiFilePreviewComponent, EuiFileSizePipe],\n providers: [EuiFileUploadUtilsService],\n exports: [EuiFileUploadComponent],\n})\nexport class EuiFileUploadModule {}\n", "export type MimeType =\n | 'image/jpeg'\n | 'image/png'\n | 'image/gif'\n | 'image/webp'\n | 'image/flif'\n | 'image/x-xcf'\n | 'image/x-canon-cr2'\n | 'image/x-canon-cr3'\n | 'image/tiff'\n | 'image/bmp'\n | 'image/icns'\n | 'image/vnd.ms-photo'\n | 'image/vnd.adobe.photoshop'\n | 'application/x-indesign'\n | 'application/epub+zip'\n | 'application/x-xpinstall'\n | 'application/vnd.oasis.opendocument.text'\n | 'application/vnd.oasis.opendocument.spreadsheet'\n | 'application/vnd.oasis.opendocument.presentation'\n | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'\n | 'application/vnd.openxmlformats-officedocument.presentationml.presentation'\n | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'\n | 'application/zip'\n | 'application/json'\n | 'application/x-tar'\n | 'application/x-rar-compressed'\n | 'application/gzip'\n | 'application/x-bzip2'\n | 'application/x-7z-compressed'\n | 'application/x-apple-diskimage'\n | 'video/mp4'\n | 'audio/midi'\n | 'video/x-matroska'\n | 'video/webm'\n | 'video/quicktime'\n | 'video/vnd.avi'\n | 'audio/vnd.wave'\n | 'audio/qcelp'\n | 'audio/x-ms-asf'\n | 'video/x-ms-asf'\n | 'application/vnd.ms-asf'\n | 'video/mpeg'\n | 'video/3gpp'\n | 'audio/mpeg'\n | 'audio/mp4'\n | 'audio/opus'\n | 'video/ogg'\n | 'audio/ogg'\n | 'application/ogg'\n | 'audio/x-flac'\n | 'audio/ape'\n | 'audio/wavpack'\n | 'audio/amr'\n | 'application/pdf'\n | 'application/x-elf'\n | 'application/x-msdownload'\n | 'application/x-shockwave-flash'\n | 'application/rtf'\n | 'application/wasm'\n | 'font/woff'\n | 'font/woff2'\n | 'application/vnd.ms-fontobject'\n | 'font/ttf'\n | 'font/otf'\n | 'image/x-icon'\n | 'video/x-flv'\n | 'application/postscript'\n | 'application/eps'\n | 'application/x-xz'\n | 'application/x-sqlite3'\n | 'application/x-nintendo-nes-rom'\n | 'application/x-google-chrome-extension'\n | 'application/vnd.ms-cab-compressed'\n | 'application/x-deb'\n | 'application/x-unix-archive'\n | 'application/x-rpm'\n | 'application/x-compress'\n | 'application/x-lzip'\n | 'application/x-cfb'\n | 'application/x-mie'\n | 'application/x-apache-arrow'\n | 'application/mxf'\n | 'video/mp2t'\n | 'application/x-blender'\n | 'image/bpg'\n | 'image/j2c'\n | 'image/jp2'\n | 'image/jpx'\n | 'image/jpm'\n | 'image/mj2'\n | 'audio/aiff'\n | 'application/xml'\n | 'application/x-mobipocket-ebook'\n | 'image/heif'\n | 'image/heif-sequence'\n | 'image/heic'\n | 'image/heic-sequence'\n | 'image/ktx'\n | 'application/dicom'\n | 'audio/x-musepack'\n | 'text/calendar'\n | 'text/vcard'\n | 'model/gltf-binary'\n | 'application/vnd.tcpdump.pcap'\n | 'audio/x-voc'\n | 'audio/vnd.dolby.dd-raw'\n | 'audio/x-m4a'\n | 'image/apng'\n | 'image/x-olympus-orf'\n | 'image/x-sony-arw'\n | 'image/x-adobe-dng'\n | 'image/x-nikon-nef'\n | 'image/x-panasonic-rw2'\n | 'image/x-fujifilm-raf'\n | 'video/x-m4v'\n | 'video/3gpp2'\n | 'application/x-esri-shape'\n | 'audio/aac'\n | 'audio/x-it'\n | 'audio/x-s3m'\n | 'audio/x-xm'\n | 'video/MP1S'\n | 'video/MP2P'\n | 'application/vnd.sketchup.skp'\n | 'image/avif'\n | 'application/x-lzh-compressed'\n | 'application/pgp-encrypted'\n | 'application/x-asar'\n | 'model/stl'\n | 'application/vnd.ms-htmlhelp'\n | 'model/3mf'\n | 'image/jxl'\n | 'application/zstd'\n | 'image/jls'\n | 'application/vnd.ms-outlook'\n | 'image/vnd.dwg'\n | 'application/x-parquet'\n | 'application/java-vm'\n | 'application/x-arj'\n | 'application/x-cpio'\n | 'application/x-ace-compressed'\n | 'application/avro'\n | 'application/vnd.iccprofile'; // eslint-disable-line semi-style\n\nexport const getMimeType = (header: Uint8Array): MimeType => {\n // convert Uint8Array to hex string\n const hex = uint8ArrayToHexString(header);\n\n // map hex string to mime type\n if (hex.startsWith('ffd8ffe000104a46')) return 'image/jpeg';\n if (hex.startsWith('89504e47')) return 'image/png';\n if (hex.startsWith('464c4946')) return 'image/flif';\n if (hex.startsWith('67696d7020786366')) return 'image/x-xcf';\n if (hex.startsWith('49492a00')) return 'image/x-canon-cr2';\n if (hex.startsWith('49492a00')) return 'image/x-canon-cr3';\n if (hex.startsWith('49492a00')) return 'image/tiff';\n if (hex.startsWith('424d')) return 'image/bmp';\n if (hex.startsWith('69636e73')) return 'image/icns';\n if (hex.startsWith('49491a0000004845415050')) return 'image/vnd.ms-photo';\n if (hex.startsWith('38425053')) return 'image/vnd.adobe.photoshop';\n if (hex.startsWith('06054b50')) return 'application/x-indesign';\n if (hex.startsWith('504b0304')) return 'application/epub+zip';\n if (hex.startsWith('504b0304')) return 'application/x-xpinstall';\n if (hex.startsWith('504b0304')) return 'application/vnd.oasis.opendocument.text';\n if (hex.startsWith('504b0304')) return 'application/vnd.oasis.opendocument.spreadsheet';\n if (hex.startsWith('504b0304')) return 'application/vnd.oasis.opendocument.presentation';\n if (hex.startsWith('504b0304')) return 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';\n if (hex.startsWith('504b0304')) return 'application/vnd.openxmlformats-officedocument.presentationml.presentation';\n if (hex.startsWith('504b0304')) return 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';\n if (hex.startsWith('504b0304')) return 'application/zip';\n if (hex.startsWith('7b2274797065223a226a736f6e227d')) return 'application/json';\n if (hex.startsWith('7573746172')) return 'application/x-tar';\n if (hex.startsWith('526172211a0700')) return 'application/x-rar-compressed';\n if (hex.startsWith('1f8b08')) return 'application/gzip';\n if (hex.startsWith('425a68')) return 'application/x-bzip2';\n if (hex.startsWith('377abcaf271c')) return 'application/x-7z-compressed';\n if (hex.startsWith('78da')) return 'application/x-apple-diskimage';\n if (hex.startsWith('00000020667479706d70')) return 'video/mp4';\n if (hex.startsWith('4d546864')) return 'audio/midi';\n if (hex.startsWith('1a45dfa393428288')) return 'video/x-matroska';\n if (hex.startsWith('1a45dfa3')) return 'video/webm';\n if (hex.startsWith('00000014667479707174')) return 'video/quicktime';\n if (hex.startsWith('52494646')) return 'video/vnd.avi';\n if (hex.startsWith('52494646')) return 'audio/vnd.wave';\n if (hex.startsWith('0a010301')) return 'audio/qcelp';\n if (hex.startsWith('3026b2758e66cf11')) return 'audio/x-ms-asf';\n if (hex.startsWith('3026b2758e66cf11')) return 'video/x-ms-asf';\n if (hex.startsWith('3026b2758e66cf11')) return 'application/vnd.ms-asf';\n if (hex.startsWith('000001ba')) return 'video/mpeg';\n if (hex.startsWith('00000020667479703367')) return 'video/3gpp';\n if (hex.startsWith('494433')) return 'audio/mpeg';\n if (hex.startsWith('00000020667479704d344120')) return 'audio/mp4';\n if (hex.startsWith('4f707573')) return 'audio/opus';\n if (hex.startsWith('4f676753')) return 'video/ogg';\n if (hex.startsWith('4f676753')) return 'audio/ogg';\n if (hex.startsWith('4f676753')) return 'application/ogg';\n if (hex.startsWith('664c6143')) return 'audio/x-flac';\n if (hex.startsWith('4d414320')) return 'audio/ape';\n if (hex.startsWith('7776706b')) return 'audio/wavpack';\n if (hex.startsWith('2321414d520a')) return 'audio/amr';\n if (hex.startsWith('255044462d312e')) return 'application/pdf';\n if (hex.startsWith('7f454c46')) return 'application/x-elf';\n if (hex.startsWith('4d5a')) return 'application/x-msdownload';\n if (hex.startsWith('435753')) return 'application/x-shockwave-flash';\n if (hex.startsWith('7b5c72746631')) return 'application/rtf';\n if (hex.startsWith('0061736d')) return 'application/wasm';\n if (hex.startsWith('774f4646')) return 'font/woff';\n if (hex.startsWith('774f4632')) return 'font/woff2';\n if (hex.startsWith('000100000008')) return 'application/vnd.ms-fontobject';\n if (hex.startsWith('0001000000')) return 'font/ttf';\n if (hex.startsWith('4f54544f00')) return 'font/otf';\n if (hex.startsWith('000001000100')) return 'image/x-icon';\n if (hex.startsWith('464c560105')) return 'video/x-flv';\n if (hex.startsWith('25215053')) return 'application/postscript';\n if (hex.startsWith('25215053')) return 'application/eps';\n if (hex.startsWith('fd377a585a00')) return 'application/x-xz';\n if (hex.startsWith('53514c69746520666f726d6174203300')) return 'application/x-sqlite3';\n if (hex.startsWith('4e45531a00000001')) return 'application/x-nintendo-nes-rom';\n if (hex.startsWith('504b0304')) return 'application/x-google-chrome-extension';\n if (hex.startsWith('4d534346')) return 'application/vnd.ms-cab-compressed';\n if (hex.startsWith('213c617263683e0a')) return 'application/x-deb';\n if (hex.startsWith('1f8b08')) return 'application/x-unix-archive';\n if (hex.startsWith('edabeedb')) return 'application/x-rpm';\n if (hex.startsWith('1f9d90')) return 'application/x-compress';\n if (hex.startsWith('4c5a4950')) return 'application/x-lzip';\n if (hex.startsWith('d0cf11e0a1b11ae1')) return 'application/x-cfb';\n if (hex.startsWith('4d49455f')) return 'application/x-mie';\n if (hex.startsWith('4141523146')) return 'application/x-apache-arrow';\n if (hex.startsWith('060e2b3402050101')) return 'application/mxf';\n if (hex.startsWith('47')) return 'video/mp2t';\n if (hex.startsWith('4250e4')) return 'application/x-blender';\n if (hex.startsWith('425047fb')) return 'image/bpg';\n if (hex.startsWith('ff4fff51')) return 'image/j2c';\n if (hex.startsWith('0000000c6a5020200d0a')) return 'image/jp2';\n if (hex.startsWith('6a5020200d0a870a')) return 'image/jpx';\n if (hex.startsWith('6a5020200d0a870a')) return 'image/jpm';\n if (hex.startsWith('0000000c6a5020200d0a')) return 'image/mj2';\n if (hex.startsWith('464f524d')) return 'audio/aiff';\n if (hex.startsWith('3c3f786d6c20')) return 'application/xml';\n if (hex.startsWith('424f4f4b4d4f4249')) return 'application/x-mobipocket-ebook';\n if (hex.startsWith('667479706174')) return 'image/heif';\n if (hex.startsWith('667479706174')) return 'image/heif-sequence';\n if (hex.startsWith('667479706174')) return 'image/heic';\n if (hex.startsWith('667479706174')) return 'image/heic-sequence';\n if (hex.startsWith('4b545820')) return 'image/ktx';\n if (hex.startsWith('4449434d')) return 'application/dicom';\n if (hex.startsWith('4d50434b')) return 'audio/x-musepack';\n if (hex.startsWith('56656e64')) return 'text/calendar';\n if (hex.startsWith('424547494e3a5643415244')) return 'text/vcard';\n if (hex.startsWith('676c5458')) return 'model/gltf-binary';\n if (hex.startsWith('d4c3b2a1')) return 'application/vnd.tcpdump.pcap';\n if (hex.startsWith('464f524d')) return 'audio/x-voc';\n if (hex.startsWith('64646f6c')) return 'audio/vnd.dolby.dd-raw';\n\n return null;\n};\n\nconst uint8ArrayToHexString = (uint8Array): string => {\n return Array.prototype.map.call(uint8Array, (byte) => ('00' + byte.toString(16)).slice(-2)).join('');\n};\n", "import { AbstractControl, AsyncValidatorFn, ValidationErrors, ValidatorFn } from '@angular/forms';\nimport { Observable, of, zip } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { getMimeType, MimeType } from './mime-types';\n\n/**\n * @description\n * Validator that requires the maximum length of files that can be uploaded.\n *\n * @usageNotes\n * Validate that the user selected maximum 3 files:\n *\n * ```typescript\n * const fileUpload = new FormControl(null, maxFilesValidator(3));\n * console.log(fileUpload.errors); // { maxFiles: 3 }\n * ```\n *\n * @returns A validator function that returns an error map with the\n * `maxFiles` if the validation check fails, otherwise `null`.\n */\nexport const maxFilesValidator =\n (maxFiles: number): ValidatorFn =>\n (control: AbstractControl): { maxFiles: number } | null =>\n control.value && control.value.length > maxFiles ? { maxFiles } : null;\n\n/**\n * @description\n * Validator that requires the maximum size (in bytes) of files that can be uploaded.\n *\n * @usageNotes\n * Validate that the user doesn't select a file have a size up to 300Kb:\n *\n * ```typescript\n * const fileUpload = new FormControl(null, maxSizeValidator(300000));\n * console.log(fileUpload.errors); // { maxSize: 300000 }\n * ```\n *\n * @returns A validator function that returns an error map with the\n * `maxSize` if the validation check fails, otherwise `null`.\n */\nexport const maxSizeValidator =\n (maxSize: number): ValidatorFn =>\n (control: AbstractControl): { maxSize: number } | null => {\n let totalSize = 0;\n if (control.value) {\n control.value.forEach((file: File) => {\n totalSize += file.size;\n });\n }\n\n return control.value && totalSize > maxSize * 1.024 ? { maxSize } : null;\n };\n/**\n * @description\n * Validator that requires an array of mime type that can be uploaded.\n *\n * @usageNotes\n * Validate that the user doesn't select a file having another extension than .jpg or .jpeg:\n *\n * ```typescript\n * const fileUpload = new FormControl(null, mimeTypeExtensionValidator(['image/jpeg'])),\n * console.log(fileUpload.errors); // { invalidFileExtension: ['image/jpeg'] }\n * ```\n *\n * @returns A validator function that returns an error map with the\n * `invalidFileExtension` if the validation check fails, otherwise `null`.\n */\nexport const mimeTypeExtensionValidator =\n (mimeTypes: string[]): ValidatorFn =>\n (control: AbstractControl): { invalidFileExtension: string[] } | null => {\n const invalidFileExtension: string[] = [];\n if (control.value) {\n control.value.forEach((file: File) => {\n if (mimeTypes.indexOf(file.type) === -1) {\n invalidFileExtension.push(file.name);\n }\n });\n }\n\n return control.value && invalidFileExtension.length > 0 ? { invalidFileExtension } : null;\n };\n\n/**\n * @description\n * Validator that requires an array of mime type that can be uploaded.\n *\n * @usageNotes\n * Validate that the user doesn't select a file having another extension than .jpg or .jpeg:\n *\n * ```typescript\n * const fileUpload = new FormControl(null, mimeTypeExtensionValidator(['image/jpeg'])),\n * console.log(fileUpload.errors); // { invalidMimeFileType: ['image/jpeg'] }\n * ```\n *\n * @returns An Async validator function that returns an error map with the\n * `invalidMimeFileType` if the validation check fails, otherwise `null`.\n */\nexport const asyncMimeTypeExtensionValidator =\n (mimeTypes: MimeType[]): AsyncValidatorFn =>\n (control: AbstractControl): Promise<ValidationErrors | null> | Observable<ValidationErrors | null> => {\n if (control.value) {\n const fileErrorObservables: Observable<ValidationErrors | null>[] = [];\n // iterate over files\n control.value.forEach((file: File) => {\n // push observable which will check the mime validation type\n fileErrorObservables.push(validateFileMimeType(file, mimeTypes));\n });\n return zip(...fileErrorObservables).pipe(\n map((fileErrors) => {\n const errors = fileErrors.filter((fileError) => fileError !== null);\n // Error should be { fileName: FileType }\n return { invalidMimeFileType: errors };\n }),\n );\n }\n return of(null);\n };\n\nconst validateFileMimeType = (file: File, mimeTypes: MimeType[]): Observable<{ [key: string]: MimeType }> => {\n return new Observable<{ [p: string]: MimeType }>((subscriber) => {\n const reader = new FileReader();\n reader.onloadend = (): void => {\n const buffer = reader.result as ArrayBuffer;\n const headerBytes = new Uint8Array(buffer).slice(0, 8);\n const mime = getMimeType(headerBytes);\n if (mimeTypes.indexOf(mime) === -1) {\n subscriber.next({ [file.name]: mime });\n }\n subscriber.complete();\n };\n reader.readAsArrayBuffer(file);\n });\n};\n"],
|
5
|
+
"mappings": ";AAAA,SAAS,WAAW,OAAO,yBAAyB,yBAAyB;;;AAQvE,IAAO,iCAAP,MAAO,gCAA8B;EAN3C,cAAA;AAOa,SAAA,WAAW;;;0GADX,iCAA8B,MAAA,CAAA,GAAA,QAAA,mBAAA,UAAA,CAAA;EAAA;;8FAA9B,iCAA8B,UAAA,4BAAA,QAAA,EAAA,UAAA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B,SAAS,IAAI,EAAE,qBAAoB,IAAK;AACzF;AAiBG,IAAM,kCACT,CAAC,cACD,CAAC,YAAoG;AACjG,MAAI,QAAQ,OAAO;AACf,UAAM,uBAA8D,CAAA;AAEpE,YAAQ,MAAM,QAAQ,CAAC,SAAc;AAEjC,2BAAqB,KAAK,qBAAqB,MAAM,SAAS,CAAC;IACnE,CAAC;AACD,WAAO,IAAI,GAAG,oBAAoB,EAAE,KAChCA,KAAI,CAAC,eAAc;AACf,YAAM,SAAS,WAAW,OAAO,CAAC,cAAc,cAAc,IAAI;AAElE,aAAO,EAAE,qBAAqB,OAAM;IACxC,CAAC,CAAC;EAEV;AACA,SAAO,GAAG,IAAI;AAClB;AAEJ,IAAM,uBAAuB,CAAC,MAAY,cAAkE;AACxG,SAAO,IAAI,WAAsC,CAAC,eAAc;AAC5D,UAAM,SAAS,IAAI,WAAU;AAC7B,WAAO,YAAY,MAAW;AAC1B,YAAM,SAAS,OAAO;AACtB,YAAM,cAAc,IAAI,WAAW,MAAM,EAAE,MAAM,GAAG,CAAC;AACrD,YAAM,OAAO,YAAY,WAAW;AACpC,UAAI,UAAU,QAAQ,IAAI,MAAM,IAAI;AAChC,mBAAW,KAAK,EAAE,CAAC,KAAK,IAAI,GAAG,KAAI,CAAE;MACzC;AACA,iBAAW,SAAQ;IACvB;AACA,WAAO,kBAAkB,IAAI;EACjC,CAAC;AACL;",
|
6
6
|
"names": ["Component", "Input", "ChangeDetectionStrategy", "ViewEncapsulation", "i0", "Component", "Input", "ViewEncapsulation", "Output", "EventEmitter", "i0", "map"]
|
7
7
|
}
|
@@ -109,7 +109,7 @@ var EuiGrowlComponent = class _EuiGrowlComponent {
|
|
109
109
|
</div>
|
110
110
|
<eui-icon-button
|
111
111
|
(click)="remove(msg)"
|
112
|
-
icon="eui-close"
|
112
|
+
icon="eui-ecl-close"
|
113
113
|
ariaLabel="Close growl icon"
|
114
114
|
class="eui-growl-item-close">
|
115
115
|
</eui-icon-button>
|
@@ -155,7 +155,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-rc.1", ng
|
|
155
155
|
</div>
|
156
156
|
<eui-icon-button
|
157
157
|
(click)="remove(msg)"
|
158
|
-
icon="eui-close"
|
158
|
+
icon="eui-ecl-close"
|
159
159
|
ariaLabel="Close growl icon"
|
160
160
|
class="eui-growl-item-close">
|
161
161
|
</eui-icon-button>
|