@eui/components 18.0.0-next.13 → 18.0.0-next.14
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/classes/EuiDialogConfig.html +34 -34
- package/docs/classes/EuiMessageBoxConfig.html +46 -46
- package/docs/components/EuiAppSidebarDrawerComponent.html +84 -1
- package/docs/components/EuiDialogComponent.html +48 -37
- package/docs/components/EuiDropdownComponent.html +11 -11
- package/docs/components/EuiMessageBoxComponent.html +0 -119
- package/docs/components/EuiOverlayComponent.html +198 -0
- package/docs/components/EuiTableSortableColComponent.html +1 -1
- package/docs/components/EuiTimelineItemComponent.html +1 -1
- package/docs/dependencies.html +18 -18
- package/docs/interfaces/EuiAutoCompleteItem.html +18 -1
- package/docs/interfaces/EuiDialogInterface.html +60 -60
- package/docs/js/menu-wc.js +4 -4
- package/docs/js/menu-wc_es5.js +1 -1
- package/docs/js/search/search_index.js +2 -2
- package/esm2022/directives/eui-clearable.directive.mjs +3 -3
- package/esm2022/directives/eui-has-permission.directive.mjs +7 -7
- package/esm2022/directives/eui-loading.directive.mjs +3 -3
- package/esm2022/directives/eui-maxlength.directive.mjs +7 -7
- package/esm2022/directives/eui-resizable/eui-resizable.component.mjs +3 -3
- package/esm2022/directives/eui-resizable/eui-resizable.directive.mjs +3 -3
- package/esm2022/directives/eui-resizable/eui-resizable.module.mjs +4 -4
- package/esm2022/directives/eui-scroll-handler.directive.mjs +10 -10
- package/esm2022/directives/eui-smooth-scroll.directive.mjs +10 -10
- package/esm2022/directives/eui-template.directive.mjs +7 -7
- package/esm2022/directives/eui-tooltip/container/eui-tooltip-container.component.mjs +3 -3
- package/esm2022/directives/eui-tooltip/eui-tooltip.directive.mjs +3 -3
- package/esm2022/directives/eui-tooltip/eui-tooltip.module.mjs +4 -4
- package/esm2022/eui-alert/eui-alert.component.mjs +6 -6
- package/esm2022/eui-alert/eui-alert.module.mjs +4 -4
- package/esm2022/eui-all/eui-all.module.mjs +4 -4
- package/esm2022/eui-autocomplete/eui-autocomplete-option/eui-autocomplete-option.component.mjs +3 -3
- package/esm2022/eui-autocomplete/eui-autocomplete-option-group/eui-autocomplete-option-group.component.mjs +3 -3
- package/esm2022/eui-autocomplete/eui-autocomplete.component.mjs +3 -3
- package/esm2022/eui-autocomplete/eui-autocomplete.module.mjs +4 -4
- package/esm2022/eui-autocomplete/models/eui-autocomplete-item.model.mjs +1 -1
- package/esm2022/eui-avatar/avatar-badge/avatar-badge.component.mjs +3 -3
- package/esm2022/eui-avatar/avatar-icon/avatar-icon.component.mjs +3 -3
- package/esm2022/eui-avatar/avatar-image/avatar-image.component.mjs +3 -3
- package/esm2022/eui-avatar/avatar-text/avatar-text.component.mjs +3 -3
- package/esm2022/eui-avatar/eui-avatar-list.component.mjs +3 -3
- package/esm2022/eui-avatar/eui-avatar.component.mjs +3 -3
- package/esm2022/eui-avatar/eui-avatar.module.mjs +4 -4
- package/esm2022/eui-badge/eui-badge.component.mjs +3 -3
- package/esm2022/eui-badge/eui-badge.module.mjs +4 -4
- package/esm2022/eui-block-content/eui-block-content.component.mjs +3 -3
- package/esm2022/eui-block-content/eui-block-content.module.mjs +4 -4
- package/esm2022/eui-block-document/eui-block-document.component.mjs +3 -3
- package/esm2022/eui-block-document/eui-block-document.module.mjs +4 -4
- package/esm2022/eui-button/eui-button.component.mjs +7 -7
- package/esm2022/eui-button-group/eui-button-group.component.mjs +7 -7
- package/esm2022/eui-buttons/eui-buttons.component.mjs +13 -13
- package/esm2022/eui-card/components/eui-card-content/eui-card-content.component.mjs +3 -3
- package/esm2022/eui-card/components/eui-card-footer/eui-card-footer-action-buttons.component.mjs +3 -3
- package/esm2022/eui-card/components/eui-card-footer/eui-card-footer-action-icons.component.mjs +3 -3
- package/esm2022/eui-card/components/eui-card-footer/eui-card-footer-menu-content.component.mjs +3 -3
- package/esm2022/eui-card/components/eui-card-footer/eui-card-footer.component.mjs +3 -3
- package/esm2022/eui-card/components/eui-card-header/eui-card-header-left-content.component.mjs +3 -3
- package/esm2022/eui-card/components/eui-card-header/eui-card-header-right-content.component.mjs +3 -3
- package/esm2022/eui-card/components/eui-card-header/eui-card-header-subtitle.component.mjs +3 -3
- package/esm2022/eui-card/components/eui-card-header/eui-card-header-title.component.mjs +3 -3
- package/esm2022/eui-card/components/eui-card-header/eui-card-header.component.mjs +3 -3
- package/esm2022/eui-card/components/eui-card-header-body/eui-card-header-body.component.mjs +3 -3
- package/esm2022/eui-card/components/eui-card-media/eui-card-media.component.mjs +3 -3
- package/esm2022/eui-card/eui-card.component.mjs +3 -3
- package/esm2022/eui-card/eui-card.module.mjs +4 -4
- package/esm2022/eui-card/services/ui-state.service.mjs +3 -3
- package/esm2022/eui-chip/eui-chip.component.mjs +3 -3
- package/esm2022/eui-chip/eui-chip.module.mjs +4 -4
- package/esm2022/eui-chip-list/eui-chip-list.component.mjs +6 -6
- package/esm2022/eui-chip-list/eui-chip-list.module.mjs +4 -4
- package/esm2022/eui-chip-list/services/eui-chip-list-drag.service.mjs +3 -3
- package/esm2022/eui-dashboard-button/eui-dashboard-button.component.mjs +13 -13
- package/esm2022/eui-dashboard-card/eui-dashboard-card.component.mjs +7 -7
- package/esm2022/eui-date-range-selector/eui-date-range-selector.component.mjs +3 -3
- package/esm2022/eui-date-range-selector/eui-date-range-selector.module.mjs +4 -4
- package/esm2022/eui-datepicker/eui-datepicker.component.mjs +15 -15
- package/esm2022/eui-datepicker/eui-datepicker.module.mjs +4 -4
- package/esm2022/eui-dialog/container/eui-dialog-container.component.mjs +3 -3
- package/esm2022/eui-dialog/eui-dialog.component.mjs +28 -27
- package/esm2022/eui-dialog/eui-dialog.module.mjs +4 -4
- package/esm2022/eui-dialog/models/eui-dialog.config.mjs +3 -3
- package/esm2022/eui-dialog/services/eui-dialog.service.mjs +8 -8
- package/esm2022/eui-dimmer/dimmer.component.mjs +3 -3
- package/esm2022/eui-dimmer/dimmer.module.mjs +4 -4
- package/esm2022/eui-disable-content/eui-disable-content.component.mjs +7 -7
- package/esm2022/eui-discussion-thread/eui-discussion-thread-item.component.mjs +3 -3
- package/esm2022/eui-discussion-thread/eui-discussion-thread.component.mjs +3 -3
- package/esm2022/eui-discussion-thread/eui-discussion-thread.module.mjs +4 -4
- package/esm2022/eui-dropdown/directives/eui-dropdown-content.directive.mjs +3 -3
- package/esm2022/eui-dropdown/dropdown-item/eui-dropdown-item.component.mjs +3 -3
- package/esm2022/eui-dropdown/eui-dropdown.component.mjs +8 -8
- package/esm2022/eui-dropdown/eui-dropdown.module.mjs +8 -8
- package/esm2022/eui-dropdown/eui-dropdown.service.mjs +3 -3
- package/esm2022/eui-feedback-message/eui-feedback-message.component.mjs +3 -3
- package/esm2022/eui-feedback-message/eui-feedback-message.module.mjs +4 -4
- package/esm2022/eui-fieldset/eui-fieldset.component.mjs +9 -9
- package/esm2022/eui-fieldset/eui-fieldset.module.mjs +4 -4
- package/esm2022/eui-file-upload/eui-file-upload.component.mjs +4 -4
- package/esm2022/eui-file-upload/eui-file-upload.module.mjs +4 -4
- package/esm2022/eui-file-upload/file-preview/file-preview.component.mjs +3 -3
- package/esm2022/eui-file-upload/pipes/filesize.pipe.mjs +3 -3
- package/esm2022/eui-file-upload/progress/eui-file-upload-progress.component.mjs +3 -3
- package/esm2022/eui-file-upload/utils/eui-file-upload.utils.mjs +3 -3
- package/esm2022/eui-growl/eui-growl.component.mjs +3 -3
- package/esm2022/eui-growl/eui-growl.module.mjs +4 -4
- package/esm2022/eui-icon/eui-icon-color.component.mjs +3 -3
- package/esm2022/eui-icon/eui-icon-svg-button/eui-icon-svg-button.component.mjs +3 -3
- package/esm2022/eui-icon/eui-icon-svg.component.mjs +3 -3
- package/esm2022/eui-icon/eui-icon.component.mjs +3 -3
- package/esm2022/eui-icon/eui-icon.module.mjs +4 -4
- package/esm2022/eui-icon-toggle/eui-icon-toggle.component.mjs +3 -3
- package/esm2022/eui-icon-toggle/eui-icon-toggle.module.mjs +4 -4
- package/esm2022/eui-input-checkbox/eui-input-checkbox.component.mjs +3 -3
- package/esm2022/eui-input-checkbox/eui-input-checkbox.module.mjs +4 -4
- package/esm2022/eui-input-group/eui-input-group.component.mjs +3 -3
- package/esm2022/eui-input-group/eui-input-group.module.mjs +4 -4
- package/esm2022/eui-input-number/eui-input-number.component.mjs +3 -3
- package/esm2022/eui-input-number/eui-input-number.module.mjs +4 -4
- package/esm2022/eui-input-number/eui-number-control.directive.mjs +3 -3
- package/esm2022/eui-input-radio/eui-input-radio.component.mjs +3 -3
- package/esm2022/eui-input-radio/eui-input-radio.module.mjs +4 -4
- package/esm2022/eui-input-text/eui-input-text.component.mjs +3 -3
- package/esm2022/eui-input-text/eui-input-text.module.mjs +4 -4
- package/esm2022/eui-label/eui-label.component.mjs +3 -3
- package/esm2022/eui-label/eui-label.module.mjs +4 -4
- package/esm2022/eui-list/eui-list-item/eui-list-item.component.mjs +3 -3
- package/esm2022/eui-list/eui-list.component.mjs +3 -3
- package/esm2022/eui-list/eui-list.module.mjs +4 -4
- package/esm2022/eui-list/services/eui-list.service.mjs +3 -3
- package/esm2022/eui-menu/eui-menu-item.component.mjs +3 -3
- package/esm2022/eui-menu/eui-menu.component.mjs +3 -3
- package/esm2022/eui-menu/eui-menu.module.mjs +4 -4
- package/esm2022/eui-message-box/eui-message-box.component.mjs +10 -30
- package/esm2022/eui-message-box/eui-message-box.module.mjs +4 -4
- package/esm2022/eui-message-box/models/eui-message-box.config.mjs +3 -3
- package/esm2022/eui-message-box/services/eui-message-box.service.mjs +6 -6
- package/esm2022/eui-overlay/components/eui-overlay-body/eui-overlay-body.component.mjs +4 -4
- package/esm2022/eui-overlay/components/eui-overlay-footer/eui-overlay-footer.component.mjs +4 -4
- package/esm2022/eui-overlay/components/eui-overlay-header/eui-overlay-header-title/eui-overlay-header-title.component.mjs +3 -3
- package/esm2022/eui-overlay/components/eui-overlay-header/eui-overlay-header.component.mjs +4 -4
- package/esm2022/eui-overlay/eui-overlay.component.mjs +50 -22
- package/esm2022/eui-page/components/eui-page-breadcrumb/eui-page-breadcrumb.component.mjs +3 -3
- package/esm2022/eui-page/components/eui-page-column/eui-page-column.component.mjs +21 -21
- package/esm2022/eui-page/components/eui-page-columns/eui-page-columns.component.mjs +3 -3
- package/esm2022/eui-page/components/eui-page-content/eui-page-content.component.mjs +3 -3
- package/esm2022/eui-page/components/eui-page-footer/eui-page-footer.component.mjs +3 -3
- package/esm2022/eui-page/components/eui-page-header/eui-page-header.component.mjs +9 -9
- package/esm2022/eui-page/components/eui-page-hero-header/eui-page-hero-header.component.mjs +3 -3
- package/esm2022/eui-page/components/eui-page-top-content/eui-page-top-content.component.mjs +3 -3
- package/esm2022/eui-page/eui-page.component.mjs +3 -3
- package/esm2022/eui-page/eui-page.module.mjs +4 -4
- package/esm2022/eui-paginator/eui-paginator.component.mjs +3 -3
- package/esm2022/eui-paginator/eui-paginator.module.mjs +4 -4
- package/esm2022/eui-popover/directives/eui-popover-arrow-position.directive.mjs +3 -3
- package/esm2022/eui-popover/eui-popover.component.mjs +3 -3
- package/esm2022/eui-popover/eui-popover.module.mjs +4 -4
- package/esm2022/eui-progress-bar/eui-progress-bar.component.mjs +3 -3
- package/esm2022/eui-progress-bar/eui-progress-bar.module.mjs +4 -4
- package/esm2022/eui-progress-circle/eui-progress-circle.component.mjs +7 -7
- package/esm2022/eui-select/eui-select-control.directive.mjs +3 -3
- package/esm2022/eui-select/eui-select-multiple.directive.mjs +3 -3
- package/esm2022/eui-select/eui-select-mutli-option.directive.mjs +3 -3
- package/esm2022/eui-select/eui-select-option.directive.mjs +3 -3
- package/esm2022/eui-select/eui-select.component.mjs +3 -3
- package/esm2022/eui-select/eui-select.module.mjs +4 -4
- package/esm2022/eui-sidebar-menu/eui-sidebar-menu.component.mjs +3 -3
- package/esm2022/eui-sidebar-menu/eui-sidebar-menu.module.mjs +4 -4
- package/esm2022/eui-skeleton/eui-skeleton.component.mjs +3 -3
- package/esm2022/eui-skeleton/eui-skeleton.module.mjs +4 -4
- package/esm2022/eui-slide-toggle/eui-slide-toggle.component.mjs +3 -3
- package/esm2022/eui-slide-toggle/eui-slide-toggle.module.mjs +4 -4
- package/esm2022/eui-table/directives/eui-table-sticky-columns.directive.mjs +3 -3
- package/esm2022/eui-table/eui-table.component.mjs +3 -3
- package/esm2022/eui-table/eui-table.module.mjs +4 -4
- package/esm2022/eui-table/expandable-row/eui-table-expandable-row.component.mjs +3 -3
- package/esm2022/eui-table/filter/eui-table-filter.component.mjs +3 -3
- package/esm2022/eui-table/pipes/eui-table-highlight-filter.pipe.mjs +3 -3
- package/esm2022/eui-table/selectable-header/eui-table-selectable-header.component.mjs +3 -3
- package/esm2022/eui-table/selectable-row/eui-table-selectable-row.component.mjs +3 -3
- package/esm2022/eui-table/services/eui-table-selectable-row.service.mjs +3 -3
- package/esm2022/eui-table/services/eui-table-sort.service.mjs +3 -3
- package/esm2022/eui-table/sortable-col/eui-table-sortable-col.component.mjs +5 -5
- package/esm2022/eui-tabs/eui-tab/eui-tab.component.mjs +3 -3
- package/esm2022/eui-tabs/eui-tab-content/eui-tab-content.component.mjs +3 -3
- package/esm2022/eui-tabs/eui-tab-label/eui-tab-label.component.mjs +6 -6
- package/esm2022/eui-tabs/eui-tabs.component.mjs +6 -6
- package/esm2022/eui-tabs/eui-tabs.module.mjs +4 -4
- package/esm2022/eui-textarea/auto-resize.directive.mjs +3 -3
- package/esm2022/eui-textarea/eui-textarea.component.mjs +3 -3
- package/esm2022/eui-textarea/eui-textarea.module.mjs +4 -4
- package/esm2022/eui-timebar/eui-timebar.component.mjs +7 -7
- package/esm2022/eui-timeline/eui-timeline-item.component.mjs +5 -5
- package/esm2022/eui-timeline/eui-timeline.component.mjs +4 -4
- package/esm2022/eui-timeline/eui-timeline.module.mjs +4 -4
- package/esm2022/eui-timepicker/eui-timepicker.component.mjs +3 -3
- package/esm2022/eui-timepicker/eui-timepicker.module.mjs +4 -4
- package/esm2022/eui-tree/eui-dropdown-tree.directive.mjs +7 -7
- package/esm2022/eui-tree/eui-tree-form-control.directive.mjs +7 -7
- package/esm2022/eui-tree/eui-tree.component.mjs +7 -7
- package/esm2022/eui-tree-list/eui-tree-list-item.component.mjs +12 -12
- package/esm2022/eui-tree-list/eui-tree-list.component.mjs +3 -3
- package/esm2022/eui-tree-list/eui-tree-list.module.mjs +4 -4
- package/esm2022/eui-tree-list/item-content/item-content.component.mjs +3 -3
- package/esm2022/eui-tree-list/toolbar/toolbar.component.mjs +6 -6
- package/esm2022/eui-wizard/eui-wizard-step.component.mjs +3 -3
- package/esm2022/eui-wizard/eui-wizard.component.mjs +3 -3
- package/esm2022/eui-wizard/eui-wizard.module.mjs +4 -4
- package/esm2022/eui-wizard/services/eui-wizard.service.mjs +3 -3
- package/esm2022/externals/charts/chart/chart.component.mjs +3 -3
- package/esm2022/externals/charts/eui-charts.module.mjs +4 -4
- package/esm2022/externals/eui-editor/counters/eui-editor-counters.component.mjs +3 -3
- package/esm2022/externals/eui-editor/directives/eui-editor-maxlength.directive.mjs +3 -3
- package/esm2022/externals/eui-editor/eui-editor.component.mjs +6 -6
- package/esm2022/externals/eui-editor/eui-editor.module.mjs +4 -4
- package/esm2022/externals/eui-editor/html-view/eui-editor-html-view.component.mjs +3 -3
- package/esm2022/externals/eui-editor/image-url-dialog/image-url-dialog.component.mjs +3 -3
- package/esm2022/externals/eui-editor/json-view/eui-editor-json-view.component.mjs +3 -3
- package/esm2022/externals/quill/loader.service.mjs +3 -3
- package/esm2022/externals/quill/quill-editor.component.mjs +3 -3
- package/esm2022/externals/quill/quill.module.mjs +4 -4
- package/esm2022/layout/eui-app/eui-app-breadcrumb/breadcrumb.component.mjs +3 -3
- package/esm2022/layout/eui-app/eui-app-breadcrumb/breadcrumb.module.mjs +4 -4
- package/esm2022/layout/eui-app/eui-app-footer/footer.component.mjs +3 -3
- package/esm2022/layout/eui-app/eui-app-footer/footer.module.mjs +4 -4
- package/esm2022/layout/eui-app/eui-app-header/header.component.mjs +3 -3
- package/esm2022/layout/eui-app/eui-app-header/header.module.mjs +4 -4
- package/esm2022/layout/eui-app/eui-app-sidebar/sidebar-body/sidebar-body.component.mjs +3 -3
- package/esm2022/layout/eui-app/eui-app-sidebar/sidebar-drawer/sidebar-drawer.component.mjs +8 -5
- package/esm2022/layout/eui-app/eui-app-sidebar/sidebar-footer/sidebar-footer.component.mjs +3 -3
- package/esm2022/layout/eui-app/eui-app-sidebar/sidebar-header/sidebar-header.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-sidebar/sidebar-menu/sidebar-menu.component.mjs +3 -3
- package/esm2022/layout/eui-app/eui-app-sidebar/sidebar.component.mjs +4 -4
- package/esm2022/layout/eui-app/eui-app-sidebar/sidebar.module.mjs +4 -4
- package/esm2022/layout/eui-app/eui-app-toolbar/toolbar.component.mjs +3 -3
- package/esm2022/layout/eui-app/eui-app-toolbar/toolbar.module.mjs +4 -4
- package/esm2022/layout/eui-app/eui-app-top-message/top-message.component.mjs +3 -3
- package/esm2022/layout/eui-app/eui-app-top-message/top-message.module.mjs +4 -4
- package/esm2022/layout/eui-app/eui-app.component.mjs +6 -6
- package/esm2022/layout/eui-app/eui-app.module.mjs +4 -4
- package/esm2022/layout/eui-breadcrumb/breadcrumb.component.mjs +3 -3
- package/esm2022/layout/eui-breadcrumb/breadcrumb.module.mjs +4 -4
- package/esm2022/layout/eui-breadcrumb/breadcrumb.service.mjs +3 -3
- package/esm2022/layout/eui-breadcrumb/collapsed-breadcrumb/collapsed-breadcrumb.component.mjs +6 -6
- package/esm2022/layout/eui-breadcrumb/item/breadcrumb-item.component.mjs +3 -3
- package/esm2022/layout/eui-footer/footer.component.mjs +3 -3
- package/esm2022/layout/eui-footer/footer.module.mjs +4 -4
- package/esm2022/layout/eui-header/header-app/header-app.component.mjs +12 -12
- package/esm2022/layout/eui-header/header-app-name/header-app-name.component.mjs +3 -3
- package/esm2022/layout/eui-header/header-app-name-logo/header-app-name-logo.component.mjs +3 -3
- package/esm2022/layout/eui-header/header-app-subtitle/header-app-subtitle.component.mjs +3 -3
- package/esm2022/layout/eui-header/header-environment/header-environment.component.mjs +3 -3
- package/esm2022/layout/eui-header/header-logo/header-logo.component.mjs +3 -3
- package/esm2022/layout/eui-header/header-right-content/header-right-content.component.mjs +3 -3
- package/esm2022/layout/eui-header/header-user-profile/header-user-profile.component.mjs +3 -3
- package/esm2022/layout/eui-header/header.component.mjs +3 -3
- package/esm2022/layout/eui-header/header.module.mjs +4 -4
- package/esm2022/layout/eui-language-selector/language-selector.component.mjs +6 -6
- package/esm2022/layout/eui-language-selector/language-selector.module.mjs +4 -4
- package/esm2022/layout/eui-language-selector/modal-selector/modal-selector.component.mjs +4 -4
- package/esm2022/layout/eui-layout.module.mjs +4 -4
- 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/eui-notifications.module.mjs +4 -4
- 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-notifications-v2/eui-notifications.module.mjs +4 -4
- package/esm2022/layout/eui-search/search.component.mjs +3 -3
- package/esm2022/layout/eui-search/search.module.mjs +4 -4
- package/esm2022/layout/eui-sidebar-toggle/sidebar-toggle.component.mjs +3 -3
- package/esm2022/layout/eui-sidebar-toggle/sidebar-toggle.module.mjs +4 -4
- package/esm2022/layout/eui-toolbar/toolbar-app/toolbar-app.component.mjs +3 -3
- package/esm2022/layout/eui-toolbar/toolbar-center/toolbar-center.component.mjs +3 -3
- package/esm2022/layout/eui-toolbar/toolbar-environment/toolbar-environment.component.mjs +3 -3
- package/esm2022/layout/eui-toolbar/toolbar-item/toolbar-item.component.mjs +3 -3
- package/esm2022/layout/eui-toolbar/toolbar-items/toolbar-items.component.mjs +3 -3
- package/esm2022/layout/eui-toolbar/toolbar-logo/toolbar-logo.component.mjs +3 -3
- package/esm2022/layout/eui-toolbar/toolbar-menu/toolbar-menu.component.mjs +3 -3
- package/esm2022/layout/eui-toolbar/toolbar.component.mjs +3 -3
- package/esm2022/layout/eui-toolbar/toolbar.module.mjs +4 -4
- package/esm2022/layout/eui-user-profile/user-profile-card/user-profile-card.component.mjs +3 -3
- package/esm2022/layout/eui-user-profile/user-profile-menu/user-profile-menu.component.mjs +3 -3
- package/esm2022/layout/eui-user-profile/user-profile-menu-item/user-profile-menu-item.component.mjs +3 -3
- package/esm2022/layout/eui-user-profile/user-profile.component.mjs +3 -3
- package/esm2022/layout/eui-user-profile/user-profile.module.mjs +4 -4
- package/esm2022/pipes/eui-is-empty.pipe.mjs +7 -7
- package/esm2022/pipes/eui-truncate.pipe.mjs +7 -7
- package/esm2022/shared/base/base-states.directive.mjs +3 -3
- package/esm2022/shared/base/base.directive.mjs +3 -3
- package/esm2022/shared/input.directive.mjs +3 -3
- package/eui-alert/eui-alert.component.d.ts.map +1 -1
- package/eui-autocomplete/eui-autocomplete-option/eui-autocomplete-option.component.d.ts.map +1 -1
- package/eui-autocomplete/eui-autocomplete.component.d.ts.map +1 -1
- package/eui-autocomplete/models/eui-autocomplete-item.model.d.ts +12 -0
- package/eui-autocomplete/models/eui-autocomplete-item.model.d.ts.map +1 -1
- package/eui-avatar/eui-avatar.component.d.ts.map +1 -1
- package/eui-block-content/eui-block-content.component.d.ts.map +1 -1
- package/eui-block-document/eui-block-document.component.d.ts.map +1 -1
- package/eui-button/eui-button.component.d.ts.map +1 -1
- package/eui-button-group/eui-button-group.component.d.ts.map +1 -1
- package/eui-card/eui-card.component.d.ts.map +1 -1
- package/eui-chip/eui-chip.component.d.ts.map +1 -1
- package/eui-dashboard-card/eui-dashboard-card.component.d.ts.map +1 -1
- package/eui-date-range-selector/eui-date-range-selector.component.d.ts.map +1 -1
- package/eui-datepicker/eui-datepicker.component.d.ts.map +1 -1
- package/eui-dialog/eui-dialog.component.d.ts +8 -7
- package/eui-dialog/eui-dialog.component.d.ts.map +1 -1
- package/eui-dialog/models/eui-dialog.config.d.ts +4 -4
- package/eui-dialog/models/eui-dialog.config.d.ts.map +1 -1
- package/eui-dropdown/eui-dropdown.component.d.ts +3 -3
- package/eui-dropdown/eui-dropdown.component.d.ts.map +1 -1
- package/eui-fieldset/eui-fieldset.component.d.ts.map +1 -1
- package/eui-file-upload/eui-file-upload.component.d.ts.map +1 -1
- package/eui-icon/eui-icon-svg-button/eui-icon-svg-button.component.d.ts.map +1 -1
- package/eui-icon/eui-icon-svg.component.d.ts.map +1 -1
- package/eui-menu/eui-menu-item.component.d.ts.map +1 -1
- package/eui-menu/eui-menu.component.d.ts.map +1 -1
- package/eui-message-box/eui-message-box.component.d.ts +2 -13
- package/eui-message-box/eui-message-box.component.d.ts.map +1 -1
- package/eui-message-box/models/eui-message-box.config.d.ts +2 -2
- package/eui-message-box/models/eui-message-box.config.d.ts.map +1 -1
- package/eui-overlay/eui-overlay.component.d.ts +10 -6
- package/eui-overlay/eui-overlay.component.d.ts.map +1 -1
- package/eui-page/components/eui-page-column/eui-page-column.component.d.ts.map +1 -1
- package/eui-page/components/eui-page-header/eui-page-header.component.d.ts.map +1 -1
- package/eui-progress-bar/eui-progress-bar.component.d.ts.map +1 -1
- package/eui-sidebar-menu/eui-sidebar-menu.component.d.ts.map +1 -1
- package/eui-skeleton/eui-skeleton.component.d.ts.map +1 -1
- package/eui-timeline/eui-timeline-item.component.d.ts.map +1 -1
- package/eui-timeline/eui-timeline.component.d.ts.map +1 -1
- package/eui-timepicker/eui-timepicker.component.d.ts.map +1 -1
- package/fesm2022/eui-components-directives.mjs +67 -67
- package/fesm2022/eui-components-eui-alert.mjs +10 -10
- package/fesm2022/eui-components-eui-autocomplete.mjs +13 -13
- package/fesm2022/eui-components-eui-avatar.mjs +22 -22
- package/fesm2022/eui-components-eui-badge.mjs +7 -7
- package/fesm2022/eui-components-eui-block-content.mjs +7 -7
- package/fesm2022/eui-components-eui-block-document.mjs +7 -7
- package/fesm2022/eui-components-eui-button-group.mjs +7 -7
- package/fesm2022/eui-components-eui-button.mjs +7 -7
- package/fesm2022/eui-components-eui-buttons.mjs +14 -14
- package/fesm2022/eui-components-eui-buttons.mjs.map +1 -1
- package/fesm2022/eui-components-eui-card.mjs +46 -46
- package/fesm2022/eui-components-eui-card.mjs.map +1 -1
- package/fesm2022/eui-components-eui-chip-list.mjs +13 -13
- package/fesm2022/eui-components-eui-chip.mjs +7 -7
- package/fesm2022/eui-components-eui-dashboard-button.mjs +13 -13
- package/fesm2022/eui-components-eui-dashboard-card.mjs +7 -7
- package/fesm2022/eui-components-eui-date-range-selector.mjs +7 -7
- package/fesm2022/eui-components-eui-datepicker.mjs +19 -19
- package/fesm2022/eui-components-eui-dialog.mjs +43 -42
- package/fesm2022/eui-components-eui-dialog.mjs.map +2 -2
- package/fesm2022/eui-components-eui-dimmer.mjs +7 -7
- package/fesm2022/eui-components-eui-disable-content.mjs +7 -7
- package/fesm2022/eui-components-eui-discussion-thread.mjs +10 -10
- package/fesm2022/eui-components-eui-dropdown.mjs +24 -24
- package/fesm2022/eui-components-eui-dropdown.mjs.map +2 -2
- package/fesm2022/eui-components-eui-feedback-message.mjs +7 -7
- package/fesm2022/eui-components-eui-fieldset.mjs +13 -13
- package/fesm2022/eui-components-eui-file-upload.mjs +19 -19
- package/fesm2022/eui-components-eui-file-upload.mjs.map +2 -2
- package/fesm2022/eui-components-eui-growl.mjs +7 -7
- package/fesm2022/eui-components-eui-icon-toggle.mjs +7 -7
- package/fesm2022/eui-components-eui-icon.mjs +16 -16
- package/fesm2022/eui-components-eui-input-checkbox.mjs +7 -7
- package/fesm2022/eui-components-eui-input-group.mjs +7 -7
- package/fesm2022/eui-components-eui-input-number.mjs +10 -10
- package/fesm2022/eui-components-eui-input-radio.mjs +7 -7
- package/fesm2022/eui-components-eui-input-text.mjs +7 -7
- package/fesm2022/eui-components-eui-label.mjs +7 -7
- package/fesm2022/eui-components-eui-list.mjs +13 -13
- package/fesm2022/eui-components-eui-menu.mjs +10 -10
- package/fesm2022/eui-components-eui-message-box.mjs +20 -36
- package/fesm2022/eui-components-eui-message-box.mjs.map +2 -2
- package/fesm2022/eui-components-eui-overlay.mjs +65 -37
- package/fesm2022/eui-components-eui-overlay.mjs.map +2 -2
- package/fesm2022/eui-components-eui-page.mjs +55 -55
- package/fesm2022/eui-components-eui-paginator.mjs +7 -7
- package/fesm2022/eui-components-eui-popover.mjs +10 -10
- package/fesm2022/eui-components-eui-progress-bar.mjs +7 -7
- package/fesm2022/eui-components-eui-progress-circle.mjs +7 -7
- package/fesm2022/eui-components-eui-select.mjs +19 -19
- package/fesm2022/eui-components-eui-sidebar-menu.mjs +7 -7
- package/fesm2022/eui-components-eui-skeleton.mjs +7 -7
- package/fesm2022/eui-components-eui-slide-toggle.mjs +7 -7
- package/fesm2022/eui-components-eui-table.mjs +37 -37
- package/fesm2022/eui-components-eui-table.mjs.map +2 -2
- package/fesm2022/eui-components-eui-tabs.mjs +22 -22
- package/fesm2022/eui-components-eui-textarea.mjs +10 -10
- package/fesm2022/eui-components-eui-timebar.mjs +7 -7
- package/fesm2022/eui-components-eui-timeline.mjs +12 -12
- package/fesm2022/eui-components-eui-timeline.mjs.map +2 -2
- package/fesm2022/eui-components-eui-timepicker.mjs +7 -7
- package/fesm2022/eui-components-eui-tree-list.mjs +28 -28
- package/fesm2022/eui-components-eui-tree.mjs +22 -22
- package/fesm2022/eui-components-eui-tree.mjs.map +1 -1
- package/fesm2022/eui-components-eui-wizard.mjs +13 -13
- package/fesm2022/eui-components-externals-charts.mjs +7 -7
- package/fesm2022/eui-components-externals-eui-editor.mjs +25 -25
- package/fesm2022/eui-components-externals-quill.mjs +10 -10
- package/fesm2022/eui-components-layout.mjs +240 -237
- package/fesm2022/eui-components-layout.mjs.map +3 -3
- package/fesm2022/eui-components-pipes.mjs +14 -14
- package/fesm2022/eui-components-shared.mjs +9 -9
- package/fesm2022/eui-components.mjs +4 -4
- package/layout/eui-app/eui-app-sidebar/sidebar-drawer/sidebar-drawer.component.d.ts +1 -0
- package/layout/eui-app/eui-app-sidebar/sidebar-drawer/sidebar-drawer.component.d.ts.map +1 -1
- package/layout/eui-app/eui-app-sidebar/sidebar-header-user-profile/sidebar-header-user-profile.component.d.ts.map +1 -1
- package/layout/eui-app/eui-app-sidebar/sidebar-menu/sidebar-menu.component.d.ts.map +1 -1
- package/layout/eui-app/eui-app-top-message/top-message.component.d.ts.map +1 -1
- package/layout/eui-app/eui-app.component.d.ts.map +1 -1
- package/layout/eui-header/header-user-profile/header-user-profile.component.d.ts.map +1 -1
- package/layout/eui-search/search.component.d.ts.map +1 -1
- package/layout/eui-toolbar/toolbar-menu/toolbar-menu.component.d.ts.map +1 -1
- package/layout/eui-user-profile/user-profile-card/user-profile-card.component.d.ts.map +1 -1
- package/layout/eui-user-profile/user-profile.component.d.ts.map +1 -1
- package/package.json +9 -9
- package/shared/base/base-states.directive.d.ts.map +1 -1
@@ -7,10 +7,10 @@ var EuiFileUploadProgressComponent = class _EuiFileUploadProgressComponent {
|
|
7
7
|
this.progress = 0;
|
8
8
|
}
|
9
9
|
static {
|
10
|
-
this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
10
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: _EuiFileUploadProgressComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
11
11
|
}
|
12
12
|
static {
|
13
|
-
this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.0-next.
|
13
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.0-next.3", type: _EuiFileUploadProgressComponent, selector: "eui-file-upload-progress", inputs: { progress: "progress" }, ngImport: i0, template: `<div *ngIf="progress > 0">
|
14
14
|
<div class="eui-file-upload__progress-bar-container">
|
15
15
|
<div class="progress-bar" [style.width]="progress + '%'"></div>
|
16
16
|
</div>
|
@@ -19,7 +19,7 @@ var EuiFileUploadProgressComponent = class _EuiFileUploadProgressComponent {
|
|
19
19
|
`, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
20
20
|
}
|
21
21
|
};
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: EuiFileUploadProgressComponent, decorators: [{
|
23
23
|
type: Component,
|
24
24
|
args: [{ selector: "eui-file-upload-progress", changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: `<div *ngIf="progress > 0">
|
25
25
|
<div class="eui-file-upload__progress-bar-container">
|
@@ -51,13 +51,13 @@ var EuiFileSizePipe = class _EuiFileSizePipe {
|
|
51
51
|
return bytes.toFixed(+precision) + " " + this.units[unit];
|
52
52
|
}
|
53
53
|
static {
|
54
|
-
this.ɵfac = i02.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
54
|
+
this.ɵfac = i02.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i02, type: _EuiFileSizePipe, deps: [], target: i02.ɵɵFactoryTarget.Pipe });
|
55
55
|
}
|
56
56
|
static {
|
57
|
-
this.ɵpipe = i02.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.0-next.
|
57
|
+
this.ɵpipe = i02.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.0-next.3", ngImport: i02, type: _EuiFileSizePipe, name: "filesize" });
|
58
58
|
}
|
59
59
|
};
|
60
|
-
i02.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
60
|
+
i02.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i02, type: EuiFileSizePipe, decorators: [{
|
61
61
|
type: Pipe,
|
62
62
|
args: [{
|
63
63
|
name: "filesize"
|
@@ -206,13 +206,13 @@ var EuiFilePreviewComponent = class _EuiFilePreviewComponent {
|
|
206
206
|
return !this.previewAsIconConfig[f] ? "eui-file-empty-o" : this.previewAsIconConfig[f];
|
207
207
|
}
|
208
208
|
static {
|
209
|
-
this.ɵfac = i03.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
209
|
+
this.ɵfac = i03.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.3", 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-next.
|
212
|
+
this.ɵcmp = i03.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.0-next.3", 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-delete-forever"></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", "isLoading", "euiIconButton", "euiLineWrap"], outputs: ["buttonClick"] }, { kind: "component", type: i3.EuiIconSvgComponent, selector: "eui-icon-svg, span[euiIconSvg], i[euiIconSvg]", inputs: ["icon", "size", "fillColor", "set", "ariaLabelledby", "role", "style", "iconUrl", "transform", "aria-label", "ariaHidden", "focusable", "isLoading"] }, { kind: "pipe", type: EuiFileSizePipe, name: "filesize" }], changeDetection: i03.ChangeDetectionStrategy.OnPush, encapsulation: i03.ViewEncapsulation.None });
|
213
213
|
}
|
214
214
|
};
|
215
|
-
i03.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
215
|
+
i03.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i03, type: EuiFilePreviewComponent, decorators: [{
|
216
216
|
type: Component2,
|
217
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-delete-forever"></eui-icon-svg>\n </button>\n </div>\n </div>\n</div>\n' }]
|
218
218
|
}], ctorParameters: () => [{ type: i03.ChangeDetectorRef }], propDecorators: { file: [{
|
@@ -380,10 +380,10 @@ var EuiFileUploadComponent = class _EuiFileUploadComponent {
|
|
380
380
|
return [this.baseStatesDirective.getCssClasses("eui-file-upload")].join(" ").trim();
|
381
381
|
}
|
382
382
|
static {
|
383
|
-
this.ɵfac = i04.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
383
|
+
this.ɵfac = i04.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i04, type: _EuiFileUploadComponent, deps: [{ token: i13.BaseStatesDirective }], target: i04.ɵɵFactoryTarget.Component });
|
384
384
|
}
|
385
385
|
static {
|
386
|
-
this.ɵcmp = i04.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.0.0-next.
|
386
|
+
this.ɵcmp = i04.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.0.0-next.3", type: _EuiFileUploadComponent, selector: "eui-file-upload", inputs: { e2eAttr: "e2eAttr", progress: "progress", accept: "accept", maxFiles: "maxFiles", isMultiple: ["isMultiple", "isMultiple", booleanAttribute], hasProgressBar: ["hasProgressBar", "hasProgressBar", booleanAttribute], hasPreview: ["hasPreview", "hasPreview", booleanAttribute], hasPreviewAsImage: ["hasPreviewAsImage", "hasPreviewAsImage", booleanAttribute], hasPreviewAsIcon: ["hasPreviewAsIcon", "hasPreviewAsIcon", booleanAttribute], hasTotalSizeDisplayed: ["hasTotalSizeDisplayed", "hasTotalSizeDisplayed", booleanAttribute], hasResetButton: ["hasResetButton", "hasResetButton", booleanAttribute], hasDragArea: ["hasDragArea", "hasDragArea", booleanAttribute], isItemsClickable: ["isItemsClickable", "isItemsClickable", booleanAttribute] }, outputs: { fileDrop: "fileDrop", itemClick: "itemClick" }, host: { listeners: { "change": "emitFiles($event.target.files)" }, properties: { "class": "this.cssClasses" } }, providers: [
|
387
387
|
{
|
388
388
|
provide: NG_VALUE_ACCESSOR,
|
389
389
|
useExisting: _EuiFileUploadComponent,
|
@@ -471,7 +471,7 @@ var EuiFileUploadComponent = class _EuiFileUploadComponent {
|
|
471
471
|
`, styles: [".eui-file-upload__total-size{margin-bottom:1rem;font:normal normal 400 1rem/1.25rem var(--eui-base-font-family);font-weight:700}.eui-file-upload__drop-area{outline:1px dashed var(--eui-base-color-primary-75);border-radius:3px;margin:0 0 10px;padding:30px;position:relative;-webkit-transition:.2s;transition:.2s}.eui-file-upload__drop-area--active{background-color:var(--eui-base-color-primary-5);outline:3px dashed var(--eui-base-color-primary-75);border-radius:3px;margin:0 0 10px;padding:30px;position:relative;-webkit-transition:.2s;transition:.2s}.eui-file-upload__drop-area--disabled{opacity:.75;cursor:not-allowed}.eui-file-upload__drop-area--disabled .file-input{cursor:default}.eui-file-upload__fake-btn{background-color:#fff;border:1px solid #9e9ec4;border-radius:3px;margin-right:8px;padding:8px 15px}.eui-file-upload__file-input{cursor:pointer;height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}.eui-file-upload__simple-input-file .file-input{display:none}.eui-file-upload__preview{align-items:center;display:flex;justify-content:space-between;margin:5px 0}.eui-file-upload__preview--left{align-items:center;display:flex;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.eui-file-upload__preview--left__image{margin-right:var(--eui-base-spacing-m)}.eui-file-upload__preview--left__image img{width:180px}.eui-file-upload__preview--left__image .loading-container{text-align:center;width:180px}.eui-file-upload__preview--left__filename{display:block}.eui-file-upload__preview--right{align-items:center;display:flex;margin-left:auto}.eui-file-upload__progress-bar-container{margin-bottom:var(--eui-base-spacing-2xs)}.eui-file-upload__progress-bar-container .progress-bar{background-color:var(--eui-base-color-primary-100);height:var(--eui-base-spacing-2xs)}\n"], dependencies: [{ kind: "directive", type: i22.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i22.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i32.EuiButtonComponent, selector: "button[euiButton], a[euiButton]", inputs: ["e2eAttr", "id", "euiBasicButton", "euiButtonCall", "euiBlockButton", "isLoading", "euiIconButton", "euiLineWrap"], outputs: ["buttonClick"] }, { kind: "component", type: EuiFileUploadProgressComponent, selector: "eui-file-upload-progress", inputs: ["progress"] }, { kind: "component", type: EuiFilePreviewComponent, selector: "eui-file-preview", inputs: ["file", "index", "previewAsIconConfig", "hasPreview", "isFilenameDisplayed", "isFilesizeDisplayed", "isFiletypeDisplayed", "hasPreviewAsImage", "hasPreviewAsIcon", "isItemsClickable"], outputs: ["removeFromList", "itemClick"] }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }, { kind: "pipe", type: EuiFileSizePipe, name: "filesize" }], encapsulation: i04.ViewEncapsulation.None });
|
472
472
|
}
|
473
473
|
};
|
474
|
-
i04.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
474
|
+
i04.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i04, type: EuiFileUploadComponent, decorators: [{
|
475
475
|
type: Component3,
|
476
476
|
args: [{ selector: "eui-file-upload", providers: [
|
477
477
|
{
|
@@ -736,13 +736,13 @@ var EuiFileUploadUtilsService = class _EuiFileUploadUtilsService {
|
|
736
736
|
return formData;
|
737
737
|
}
|
738
738
|
static {
|
739
|
-
this.ɵfac = i05.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
739
|
+
this.ɵfac = i05.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i05, type: _EuiFileUploadUtilsService, deps: [{ token: i14.HttpClient }], target: i05.ɵɵFactoryTarget.Injectable });
|
740
740
|
}
|
741
741
|
static {
|
742
|
-
this.ɵprov = i05.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
742
|
+
this.ɵprov = i05.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i05, type: _EuiFileUploadUtilsService });
|
743
743
|
}
|
744
744
|
};
|
745
|
-
i05.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
745
|
+
i05.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i05, type: EuiFileUploadUtilsService, decorators: [{
|
746
746
|
type: Injectable
|
747
747
|
}], ctorParameters: () => [{ type: i14.HttpClient }] });
|
748
748
|
|
@@ -755,16 +755,16 @@ import { EuiIconModule } from "@eui/components/eui-icon";
|
|
755
755
|
import * as i06 from "@angular/core";
|
756
756
|
var EuiFileUploadModule = class _EuiFileUploadModule {
|
757
757
|
static {
|
758
|
-
this.ɵfac = i06.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
758
|
+
this.ɵfac = i06.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i06, type: _EuiFileUploadModule, deps: [], target: i06.ɵɵFactoryTarget.NgModule });
|
759
759
|
}
|
760
760
|
static {
|
761
|
-
this.ɵmod = i06.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-next.
|
761
|
+
this.ɵmod = i06.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-next.3", ngImport: i06, type: _EuiFileUploadModule, declarations: [EuiFileUploadComponent, EuiFileUploadProgressComponent, EuiFilePreviewComponent, EuiFileSizePipe], imports: [CommonModule, EuiButtonModule, EuiIconModule, TranslateModule], exports: [EuiFileUploadComponent] });
|
762
762
|
}
|
763
763
|
static {
|
764
|
-
this.ɵinj = i06.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0-next.
|
764
|
+
this.ɵinj = i06.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i06, type: _EuiFileUploadModule, providers: [EuiFileUploadUtilsService], imports: [CommonModule, EuiButtonModule, EuiIconModule, TranslateModule] });
|
765
765
|
}
|
766
766
|
};
|
767
|
-
i06.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
767
|
+
i06.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i06, type: EuiFileUploadModule, decorators: [{
|
768
768
|
type: NgModule,
|
769
769
|
args: [{
|
770
770
|
imports: [CommonModule, EuiButtonModule, EuiIconModule, TranslateModule],
|
@@ -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 SimpleChanges,\n OnChanges,\n booleanAttribute,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { EuiUploadedFileInterface } from './models/uploaded-file.model';\nimport { BaseStatesDirective } from '@eui/components/shared';\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 hostDirectives: [\n {\n directive: BaseStatesDirective,\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 this.getCssClasses();\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 constructor(public baseStatesDirective: BaseStatesDirective) {}\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 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 private getCssClasses(): string {\n return [this.baseStatesDirective.getCssClasses('eui-file-upload')].join(' ').trim();\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 eui-u-mb-xs\" *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;;;4GADX,iCAA8B,MAAA,CAAA,GAAA,QAAA,mBAAA,UAAA,CAAA;EAAA;;gGAA9B,iCAA8B,UAAA,4BAAA,QAAA,EAAA,UAAA,WAAA,GAAA,UAAA,IAAA,UCR3C;;;;;;GAMA,cAAA,CAAA,EAAA,MAAA,aAAA,MAAA,SAAA,UAAA,UAAA,QAAA,CAAA,QAAA,YAAA,UAAA,EAAA,CAAA,GAAA,iBAAA,2BAAA,QAAA,eAAA,qBAAA,KAAA,CAAA;EAAA;;kGDEa,gCAA8B,YAAA,CAAA;QAN1C;qBACa,4BAA0B,iBAEnB,wBAAwB,QAAM,eAChC,kBAAkB,MAAI,UAAA;;;;;;EAAA,CAAA;sBAG5B,UAAQ,CAAA;QAAhB;;;;AETL,SAAS,YAA2B;;AAK9B,IAAO,kBAAP,MAAO,iBAAe;EAH5B,cAAA;AAIY,SAAA,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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;",
|
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 SimpleChanges,\n OnChanges,\n booleanAttribute,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { EuiUploadedFileInterface } from './models/uploaded-file.model';\nimport { BaseStatesDirective } from '@eui/components/shared';\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 hostDirectives: [\n {\n directive: BaseStatesDirective,\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 this.getCssClasses();\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 constructor(public baseStatesDirective: BaseStatesDirective) {}\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 private getCssClasses(): string {\n return [this.baseStatesDirective.getCssClasses('eui-file-upload')].join(' ').trim();\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 eui-u-mb-xs\" *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;;;4GADX,iCAA8B,MAAA,CAAA,GAAA,QAAA,mBAAA,UAAA,CAAA;EAAA;;gGAA9B,iCAA8B,UAAA,4BAAA,QAAA,EAAA,UAAA,WAAA,GAAA,UAAA,IAAA,UCR3C;;;;;;GAMA,cAAA,CAAA,EAAA,MAAA,aAAA,MAAA,SAAA,UAAA,UAAA,QAAA,CAAA,QAAA,YAAA,UAAA,EAAA,CAAA,GAAA,iBAAA,2BAAA,QAAA,eAAA,qBAAA,KAAA,CAAA;EAAA;;kGDEa,gCAA8B,YAAA,CAAA;QAN1C;qBACa,4BAA0B,iBAEnB,wBAAwB,QAAM,eAChC,kBAAkB,MAAI,UAAA;;;;;;EAAA,CAAA;sBAG5B,UAAQ,CAAA;QAAhB;;;;AETL,SAAS,YA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AQ,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
|
}
|
@@ -83,10 +83,10 @@ var EuiGrowlComponent = class _EuiGrowlComponent {
|
|
83
83
|
return this.value?.length ? this.value.findIndex((value) => value === msg) : -1;
|
84
84
|
}
|
85
85
|
static {
|
86
|
-
this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
86
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: _EuiGrowlComponent, deps: [{ token: i0.ElementRef }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Component });
|
87
87
|
}
|
88
88
|
static {
|
89
|
-
this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.0-next.
|
89
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.0-next.3", type: _EuiGrowlComponent, selector: "eui-growl", inputs: { sticky: "sticky", life: "life", value: "value", style: "style", styleClass: "styleClass", position: "position", e2eAttr: "e2eAttr", closeAllSticky: "closeAllSticky" }, outputs: { growlClick: "growlClick" }, viewQueries: [{ propertyName: "containerViewChild", first: true, predicate: ["container"], descendants: true }], ngImport: i0, template: `<div
|
90
90
|
#container
|
91
91
|
role="region"
|
92
92
|
aria-live="polite"
|
@@ -138,7 +138,7 @@ var EuiGrowlComponent = class _EuiGrowlComponent {
|
|
138
138
|
`, styles: [".eui-growl{position:fixed;width:20rem;z-index:var(--eui-base-z-index-growl-message)}.eui-growl--bottom-left{bottom:var(--eui-base-spacing-l);left:var(--eui-base-spacing-l)}.eui-growl--bottom-center{bottom:var(--eui-base-spacing-l);right:50%;transform:translate(50%)}.eui-growl--bottom-right{bottom:var(--eui-base-spacing-l);right:var(--eui-base-spacing-l)}.eui-growl--top-left{left:var(--eui-base-spacing-l);top:var(--eui-base-spacing-l)}.eui-growl--top-center{right:50%;top:var(--eui-base-spacing-l);transform:translate(50%)}.eui-growl--top-right{right:var(--eui-base-spacing-l);top:var(--eui-base-spacing-l)}.eui-growl a{color:var(--eui-base-color-white)!important;text-decoration:underline}.eui-growl-item-container{color:var(--eui-base-color-white);filter:alpha(opacity=95);margin:0 0 10px;opacity:.95;position:relative;background-color:var(--eui-base-color-primary-100);border-color:var(--eui-base-color-primary-100);color:var(--eui-base-color-primary-100-contrast)}.eui-growl-item-container .eui-icon-svg svg{color:var(--eui-base-color-primary-100-contrast);fill:var(--eui-base-color-primary-100-contrast)}.eui-growl-item-container.eui-growl-item-container--info{background-color:var(--eui-base-color-info-100);border-color:var(--eui-base-color-info-100);color:var(--eui-base-color-info-100-contrast)}.eui-growl-item-container.eui-growl-item-container--info .eui-icon-svg svg{color:var(--eui-base-color-info-100-contrast);fill:var(--eui-base-color-info-100-contrast)}.eui-growl-item-container.eui-growl-item-container--warning{background-color:var(--eui-base-color-warning-100);border-color:var(--eui-base-color-warning-100);color:var(--eui-base-color-warning-100-contrast)}.eui-growl-item-container.eui-growl-item-container--warning .eui-icon-svg svg{color:var(--eui-base-color-warning-100-contrast);fill:var(--eui-base-color-warning-100-contrast)}.eui-growl-item-container.eui-growl-item-container--success{background-color:var(--eui-base-color-success-100);border-color:var(--eui-base-color-success-100);color:var(--eui-base-color-success-100-contrast)}.eui-growl-item-container.eui-growl-item-container--success .eui-icon-svg svg{color:var(--eui-base-color-success-100-contrast);fill:var(--eui-base-color-success-100-contrast)}.eui-growl-item-container.eui-growl-item-container--danger{background-color:var(--eui-base-color-danger-100);border-color:var(--eui-base-color-danger-100);color:var(--eui-base-color-danger-100-contrast)}.eui-growl-item-container.eui-growl-item-container--danger .eui-icon-svg svg{color:var(--eui-base-color-danger-100-contrast);fill:var(--eui-base-color-danger-100-contrast)}.eui-growl-item-image{display:flex;text-shadow:1px 1px 1px rgba(0,0,0,.25)}.eui-growl-item{display:flex;padding:var(--eui-base-spacing-s);position:relative;width:20rem}.eui-growl-item-close{align-items:flex-start;margin:-.5rem -.5rem 0 auto}.eui-growl-item-message{display:block;margin-left:var(--eui-base-spacing-s);max-height:80vh;overflow-y:auto;overflow-wrap:break-word}.eui-growl-item-message::-webkit-scrollbar{display:inherit;height:6px;width:6px;background-color:var(--eui-base-color-grey-5)}.eui-growl-item-message::-webkit-scrollbar-thumb{background-color:var(--eui-base-color-grey-20);border-radius:5rem}.eui-growl-item-message::-webkit-scrollbar-thumb:hover{background-color:var(--eui-base-color-grey-50)}.eui-growl-item-message::-webkit-scrollbar-track{background-color:var(--eui-base-color-grey-5);border-radius:0}.eui-growl-item-message code{color:var(--eui-base-color-grey-5);font-size:var(--eui-base-font-size-xs);word-wrap:break-word}.eui-growl-item-message-title{display:block;padding:var(--eui-base-spacing-2xs) 0 var(--eui-base-spacing-xs) 0;font:normal normal 400 1rem/1.25rem var(--eui-base-font-family);font-weight:700}.eui-growl-item-message-detail{display:block;margin:0;padding:0}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.EuiIconSvgComponent, selector: "eui-icon-svg, span[euiIconSvg], i[euiIconSvg]", inputs: ["icon", "size", "fillColor", "set", "ariaLabelledby", "role", "style", "iconUrl", "transform", "aria-label", "ariaHidden", "focusable", "isLoading"] }, { kind: "component", type: i2.EuiIconSvgButtonComponent, selector: "eui-icon-svg-button", inputs: ["iconSvgName", "iconSvgFillColor", "iconSvgSize", "ariaLabel", "hasFocusBorder", "hasNoPadding"], outputs: ["buttonClick"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None });
|
139
139
|
}
|
140
140
|
};
|
141
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
141
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: EuiGrowlComponent, decorators: [{
|
142
142
|
type: Component,
|
143
143
|
args: [{ selector: "eui-growl", encapsulation: ViewEncapsulation.None, template: `<div
|
144
144
|
#container
|
@@ -221,16 +221,16 @@ import { TranslateModule } from "@ngx-translate/core";
|
|
221
221
|
import * as i02 from "@angular/core";
|
222
222
|
var EuiGrowlModule = class _EuiGrowlModule {
|
223
223
|
static {
|
224
|
-
this.ɵfac = i02.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
224
|
+
this.ɵfac = i02.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i02, type: _EuiGrowlModule, deps: [], target: i02.ɵɵFactoryTarget.NgModule });
|
225
225
|
}
|
226
226
|
static {
|
227
|
-
this.ɵmod = i02.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-next.
|
227
|
+
this.ɵmod = i02.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-next.3", ngImport: i02, type: _EuiGrowlModule, declarations: [EuiGrowlComponent], imports: [CommonModule, EuiIconModule, TranslateModule], exports: [EuiGrowlComponent] });
|
228
228
|
}
|
229
229
|
static {
|
230
|
-
this.ɵinj = i02.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0-next.
|
230
|
+
this.ɵinj = i02.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i02, type: _EuiGrowlModule, imports: [CommonModule, EuiIconModule, TranslateModule] });
|
231
231
|
}
|
232
232
|
};
|
233
|
-
i02.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
233
|
+
i02.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i02, type: EuiGrowlModule, decorators: [{
|
234
234
|
type: NgModule,
|
235
235
|
args: [{
|
236
236
|
imports: [CommonModule, EuiIconModule, TranslateModule],
|
@@ -67,10 +67,10 @@ var EuiIconToggleComponent = class _EuiIconToggleComponent {
|
|
67
67
|
}
|
68
68
|
}
|
69
69
|
static {
|
70
|
-
this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
70
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: _EuiIconToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
71
71
|
}
|
72
72
|
static {
|
73
|
-
this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.0-next.
|
73
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.0-next.3", type: _EuiIconToggleComponent, selector: "eui-icon-toggle", inputs: { id: "id", styleClass: "styleClass", styleClassOn: "styleClassOn", styleClassOff: "styleClassOff", iconClassOff: "iconClassOff", iconClassOn: "iconClassOn", iconSvgNameOn: "iconSvgNameOn", iconSvgNameOff: "iconSvgNameOff", iconSvgFillColorOn: "iconSvgFillColorOn", iconSvgFillColorOff: "iconSvgFillColorOff", tabindex: "tabindex", ariaLabel: "ariaLabel", keyboardAccessKey: "keyboardAccessKey", e2eAttr: "e2eAttr", isChecked: "isChecked", isReadOnly: "isReadOnly" }, outputs: { toggle: "toggle" }, host: { properties: { "attr.data-e2e": "this.e2eAttr" } }, viewQueries: [{ propertyName: "focusElement", first: true, predicate: ["focusElement"], descendants: true }], ngImport: i0, template: `<div
|
74
74
|
#focusElement
|
75
75
|
[id]="id"
|
76
76
|
class="eui-icon-toggle {{ styleClass }}"
|
@@ -98,7 +98,7 @@ var EuiIconToggleComponent = class _EuiIconToggleComponent {
|
|
98
98
|
`, styles: ['.eui-icon-toggle{display:inline-block;position:relative;cursor:pointer}.eui-icon-toggle:active:active:not([readonly]),.eui-icon-toggle:active:focus:not([readonly]),.eui-icon-toggle:focus:active:not([readonly]),.eui-icon-toggle:focus:focus:not([readonly]){outline:2px solid var(--eui-base-color-accessible-focus);outline-offset:-2px;transition:none}.eui-icon-toggle:active [tabindex="0"]:active:not([readonly]),.eui-icon-toggle:active [tabindex="0"]:focus:not([readonly]),.eui-icon-toggle:focus [tabindex="0"]:active:not([readonly]),.eui-icon-toggle:focus [tabindex="0"]:focus:not([readonly]){outline:2px solid var(--eui-base-color-accessible-focus);outline-offset:-2px;transition:none}.eui-icon-toggle--default-on{color:var(--eui-base-color-accent-100)}.eui-icon-toggle--default-off{color:var(--eui-base-color-grey-100)}.eui-icon-toggle__icon{font-size:var(--eui-base-font-size-2xl);position:relative}.eui-icon-toggle--checked{color:var(--eui-base-color-accent-110)}.eui-icon-toggle--readonly{cursor:auto}\n'], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.EuiIconSvgComponent, selector: "eui-icon-svg, span[euiIconSvg], i[euiIconSvg]", inputs: ["icon", "size", "fillColor", "set", "ariaLabelledby", "role", "style", "iconUrl", "transform", "aria-label", "ariaHidden", "focusable", "isLoading"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
99
99
|
}
|
100
100
|
};
|
101
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
101
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: EuiIconToggleComponent, decorators: [{
|
102
102
|
type: Component,
|
103
103
|
args: [{ selector: "eui-icon-toggle", changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: `<div
|
104
104
|
#focusElement
|
@@ -175,16 +175,16 @@ import { EuiIconModule } from "@eui/components/eui-icon";
|
|
175
175
|
import * as i02 from "@angular/core";
|
176
176
|
var EuiIconToggleModule = class _EuiIconToggleModule {
|
177
177
|
static {
|
178
|
-
this.ɵfac = i02.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
178
|
+
this.ɵfac = i02.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i02, type: _EuiIconToggleModule, deps: [], target: i02.ɵɵFactoryTarget.NgModule });
|
179
179
|
}
|
180
180
|
static {
|
181
|
-
this.ɵmod = i02.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-next.
|
181
|
+
this.ɵmod = i02.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-next.3", ngImport: i02, type: _EuiIconToggleModule, declarations: [EuiIconToggleComponent], imports: [CommonModule, EuiIconModule], exports: [EuiIconToggleComponent] });
|
182
182
|
}
|
183
183
|
static {
|
184
|
-
this.ɵinj = i02.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0-next.
|
184
|
+
this.ɵinj = i02.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i02, type: _EuiIconToggleModule, imports: [CommonModule, EuiIconModule] });
|
185
185
|
}
|
186
186
|
};
|
187
|
-
i02.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
187
|
+
i02.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i02, type: EuiIconToggleModule, decorators: [{
|
188
188
|
type: NgModule,
|
189
189
|
args: [{
|
190
190
|
imports: [CommonModule, EuiIconModule],
|