Index

packages/components/eui-file-upload/utils/eui-file-upload.validators.ts

asyncMimeTypeExtensionValidator
Type : unknown
Default value : (mimeTypes: MimeType[]): AsyncValidatorFn => (control: AbstractControl): Promise<ValidationErrors | null> | Observable<ValidationErrors | null> => { if (control.value) { const fileErrorObservables: Observable<ValidationErrors | null>[] = []; // iterate over files control.value.forEach((file: File) => { // push observable which will check the mime validation type fileErrorObservables.push(validateFileMimeType(file, mimeTypes)); }); return zip(...fileErrorObservables).pipe( map((fileErrors) => { const errors = fileErrors.filter((fileError) => fileError !== null); // Error should be { fileName: FileType } if (errors.length === 0) { return null; } return { invalidMimeFileType: errors }; }), ); } return of(null); }
maxFileSizeValidator
Type : unknown
Default value : (maxFileSize: number): ValidatorFn => (control: AbstractControl): { maxFileSize: number, indexes: Array<number> } | null => { const fileIndexes =[]; let maxFileExceeded = false; if (control.value) { control.value.forEach((file: File, index: number) => { if (file.size > maxFileSize) { fileIndexes.push(index); maxFileExceeded = true; } }); } return control.value && maxFileExceeded ? { maxFileSize, indexes: fileIndexes } : null; }
maxFilesValidator
Type : unknown
Default value : (maxFiles: number): ValidatorFn => (control: AbstractControl): { maxFiles: number } | null => control.value && control.value.length > maxFiles ? { maxFiles } : null
maxSizeValidator
Type : unknown
Default value : (maxSize: number): ValidatorFn => (control: AbstractControl): { maxSize: number } | null => { let totalSize = 0; if (control.value) { control.value.forEach((file: File) => { totalSize += file.size; }); } return control.value && totalSize > maxSize ? { maxSize } : null; }
mimeTypeExtensionValidator
Type : unknown
Default value : (mimeTypes: string[]): ValidatorFn => (control: AbstractControl): { invalidFileExtension: string[] } | null => { const invalidFileExtension: string[] = []; if (control.value) { control.value.forEach((file: File) => { if (mimeTypes.indexOf(file.type) === -1) { invalidFileExtension.push(file.name); } }); } return control.value && invalidFileExtension.length > 0 ? { invalidFileExtension } : null; }
validateFileMimeType
Type : unknown
Default value : (file: File, mimeTypes: MimeType[]): Observable<{ [key: string]: MimeType } | null> => { return new Observable<{ [p: string]: MimeType }>((subscriber) => { const reader = new FileReader(); reader.onloadend = (): void => { const buffer = reader.result as ArrayBuffer; // Read more bytes to support complex MIME type detection (e.g., ASF format analysis) const headerBytes = new Uint8Array(buffer).slice(0, Math.min(1024, buffer.byteLength)); const mime = getMimeType(headerBytes); if (mimeTypes.includes(mime)) { subscriber.next(null); } else { subscriber.next({ [file.name]: mime }); } subscriber.complete(); }; reader.readAsArrayBuffer(file); }); }

Validates the MIME type of a file against a list of allowed MIME types.

packages/components/eui-popover/models/eui-popover-position.model.ts

BOTTOM
Type : unknown
Default value : new ConnectionPositionPair( { originX: 'center', originY: 'bottom' }, { overlayX: 'center', overlayY: 'top' }, 0, 0, ['eui-popover-position', 'eui-popover-position--bottom'], )

Position configuration for a popover appearing below its origin element. Centers the popover horizontally relative to the origin.

getPosition
Type : unknown
Default value : ({ connectionPair }: ConnectedOverlayPositionChange): EuiPopoverPosition => { switch (connectionPair) { case TOP: return 'top'; case BOTTOM: return 'bottom'; case LEFT: return 'left'; case RIGHT: return 'right'; } }

Converts a ConnectedOverlayPositionChange object to an EuiPopoverPosition string. Used to determine which predefined position the overlay has settled on.

LEFT
Type : unknown
Default value : new ConnectionPositionPair( { originX: 'start', originY: 'center' }, { overlayX: 'end', overlayY: 'center' }, 0, 0, ['eui-popover-position', 'eui-popover-position--left'], )

Position configuration for a popover appearing to the left of its origin element. Centers the popover vertically relative to the origin.

RIGHT
Type : unknown
Default value : new ConnectionPositionPair( { originX: 'end', originY: 'center' }, { overlayX: 'start', overlayY: 'center' }, 0, 0, ['eui-popover-position', 'eui-popover-position--right'], )

Position configuration for a popover appearing to the right of its origin element. Centers the popover vertically relative to the origin.

TOP
Type : unknown
Default value : new ConnectionPositionPair( { originX: 'center', originY: 'top' }, { overlayX: 'center', overlayY: 'bottom' }, 0, 0, ['eui-popover-position', 'eui-popover-position--top'], )

Position configuration for a popover appearing above its origin element. Centers the popover horizontally relative to the origin.

packages/components/externals/eui-editor/validators/eui-editor.validators.ts

byteLength
Type : unknown
Default value : (value: string): number => { // returns the byte length of an utf8 string let s = value.length; for (let i = value.length - 1; i >= 0; i--) { const code = value.charCodeAt(i); if (code > 0x7f && code <= 0x7ff) { s++; } else if (code > 0x7ff && code <= 0xffff) { s += 2; } if (code >= 0xdc00 && code <= 0xdfff) { i--; } } return s; }
euiEditorMaxBytes
Type : unknown
Default value : (maxBytes: number): ValidatorFn => (control: AbstractControl): { maxBytes: { maxBytes: number; actual: number } } | null => { if (control.value) { let actual = 0; if (isJson(control.value)) { actual = byteLength(control.value); } else { const m = encodeURIComponent(control.value).match(/%[89ABab]/g); actual = control.value.length + (m ? m.length : 0); } return actual > maxBytes ? { maxBytes: { maxBytes, actual } } : null; } }
euiEditorMaxLength
Type : unknown
Default value : (maxLength: number): ValidatorFn => (control: AbstractControl): { maxLength: { maxLength: number; actual: number } } | null => { if (control.value) { let actual = 0; if (isJson(control.value)) { const content = JSON.parse(control.value) .ops.filter((c: { attributes: string; insert: string }) => typeof c.insert === 'string') .map((c: { attributes: string; insert: string }) => c.insert.replace(/\n/g, '')); const jsonStrippedContent = content.join(''); actual = jsonStrippedContent.length; } else { const regex = /(<([^>]+)>)/gi; const tagsStrippedContent = control.value.replace(regex, ''); actual = tagsStrippedContent.length; } return actual > maxLength ? { maxLength: { maxLength, actual } } : null; } }
euiEditorMaxWords
Type : unknown
Default value : (maxWords: number): ValidatorFn => (control: AbstractControl<string>): { maxWords: { maxWords: number; actual: number } } | null => { const regex = /[\s\n]+/; if (control.value) { let actual = 0; if (isJson(control.value)) { const content = JSON.parse(control.value) .ops.filter((c: { insert: string }) => typeof c.insert === 'string') .map((c: { insert: string }) => c.insert); const jsonStrippedContent = content.join(''); actual = jsonStrippedContent.replace(/\n/g, ' ').split(/\s+/).filter(t => t !== '').length; } else { const text = control.value.replace(/[\u200B-\u200D\uFEFF]/g, '').replace(/<\/(p|div|br|li|h[1-6])>/gi, ' ').replace(/<[^>]+>/g, ''); actual = !text ? 0 : text.trim().split(regex).filter(t => t !== '').length; } return actual > maxWords ? { maxWords: { maxWords, actual } } : null; } }
euiEditorMinBytes
Type : unknown
Default value : (minBytes: number): ValidatorFn => (control: AbstractControl): { minBytes: { minBytes: number; actual: number } } | null => { if (control.value) { let actual = 0; const m = encodeURIComponent(control.value).match(/%[89ABab]/g); actual = control.value.length + (m ? m.length : 0); return actual < minBytes ? { minBytes: { minBytes, actual } } : null; } }
euiEditorMinLength
Type : unknown
Default value : (minLength: number): ValidatorFn => (control: AbstractControl): { minLength: { minLength: number; actual: number } } | null => { if (control.value) { let actual = 0; if (isJson(control.value)) { const content = JSON.parse(control.value) .ops.filter((c: { attributes: string; insert: string }) => typeof c.insert === 'string') .map((c: { attributes: string; insert: string }) => c.insert.replace(/\n/g, '')); const jsonStrippedContent = content.join(''); actual = jsonStrippedContent.length; } else { const regex = /(<([^>]+)>)/gi; const tagsStrippedContent = control.value.replace(regex, ''); actual = tagsStrippedContent.length; } return actual < minLength ? { minLength: { minLength, actual } } : null; } }
euiEditorMinWords
Type : unknown
Default value : (minWords: number): ValidatorFn => (control: AbstractControl<string>): { minWords: { minWords: number; actual: number } } | null => { const regex = /[\s\n]+/; if (control.value) { let actual = 0; if (isJson(control.value)) { const content = JSON.parse(control.value) .ops.filter((c: { insert: string }) => typeof c.insert === 'string') .map((c: { insert: string }) => c.insert); const jsonStrippedContent = content.join(''); actual = jsonStrippedContent.replace(/\n/g, ' ').split(/\s+/).filter(t => t !== '').length; } else { const text = control.value.replace(/[\u200B-\u200D\uFEFF]/g, '').replace(/<\/(p|div|br|li|h[1-6])>/gi, ' ').replace(/<[^>]+>/g, ''); actual = !text ? 0 : text.trim().split(regex).filter(t => t !== '').length; } return actual < minWords ? { minWords: { minWords, actual } } : null; } }
isJson
Type : unknown
Default value : (value: string): boolean => { try { JSON.parse(value); } catch (e) { return false; } return true; }

packages/components/eui-progress-circle/eui-progress-circle.component.ts

colorTypeTransform
Type : unknown
Default value : (value: string | ColorType): ColorType => { const types = ['info', 'success', 'warning', 'danger']; return types.includes(value) ? value as ColorType : 'info'; }
transformNumberInRange
Type : unknown
Default value : (value: string | number): number => { const num = Number(value); return isNaN(num) ? 0 : Math.max(0, Math.min(num, 100)); }

packages/components/testing/test.ts

context
Type : unknown
Default value : require.context('../', true, /\.spec\.ts$/)
require
Type : any

packages/components/eui-table/testing/virtual-scroll-async.component.ts

DATA
Type : []
Default value : [ { id: 1, country: 'Austria', year: 1995, iso: 'AT', population: 8504850, capital: 'Vienna' }, { id: 2, country: 'Belgium', year: 1958, iso: 'BE', population: 11198638, capital: 'Brussels' }, { id: 3, country: 'Bulgaria', year: 2007, iso: 'BG', population: 7364570, capital: 'Sofia' }, { id: 4, country: 'Croatia', year: 2013, iso: 'HR', population: 4284889, capital: 'Zagreb' }, { id: 5, country: 'Cyprus', year: 2004, iso: 'CY', population: 1117000, capital: 'Nicosia' }, { id: 6, country: 'Czechia', year: 2004, iso: 'CZ', population: 10513209, capital: 'Prague' }, { id: 7, country: 'Denmark', year: 1973, iso: 'DK', population: 5655750, capital: 'Copenhagen' }, { id: 8, country: 'Estonia', year: 2004, iso: 'EE', population: 1315819, capital: 'Tallinn' }, { id: 9, country: 'Finland', year: 1995, iso: 'FI', population: 5470820, capital: 'Helsinki' }, { id: 10, country: 'France', year: 1958, iso: 'FR', population: 67210000, capital: 'Paris' }, { id: 11, country: 'Germany', year: 1958, iso: 'DE', population: 80716000, capital: 'Berlin' }, { id: 12, country: 'Greece', year: 1981, iso: 'GR', population: 10816286, capital: 'Athens' }, { id: 13, country: 'Hungary', year: 2004, iso: 'HU', population: 9877365, capital: 'Budapest' }, { id: 14, country: 'Ireland', year: 1973, iso: 'IE', population: 4609600, capital: 'Dublin' }, { id: 15, country: 'Italy', year: 1958, iso: 'IT', population: 60782668, capital: 'Rome' }, { id: 16, country: 'Latvia', year: 2004, iso: 'LV', population: 1990300, capital: 'Riga' }, { id: 17, country: 'Lithuania', year: 2004, iso: 'LT', population: 2944459, capital: 'Vilnius' }, { id: 18, country: 'Luxembourg', year: 1958, iso: 'LU', population: 549680, capital: 'Luxembourg' }, { id: 19, country: 'Malta', year: 2004, iso: 'MT', population: 446547, capital: 'Valletta' }, { id: 20, country: 'Netherlands', year: 1958, iso: 'NL', population: 16856620, capital: 'Amsterdam' }, { id: 21, country: 'Poland', year: 2004, iso: 'PL', population: 38483957, capital: 'Warsaw' }, { id: 22, country: 'Portugal', year: 1986, iso: 'PT', population: 10427301, capital: 'Lisbon' }, { id: 23, country: 'Romania', year: 2007, iso: 'RO', population: 19942642, capital: 'Bucharest' }, { id: 24, country: 'Slovakia', year: 2004, iso: 'SK', population: 5415949, capital: 'Bratislava' }, { id: 25, country: 'Slovenia', year: 2004, iso: 'SI', population: 2061085, capital: 'Ljubljana' }, { id: 26, country: 'Spain', year: 1986, iso: 'ES', population: 46704314, capital: 'Madrid' }, { id: 27, country: 'Sweden', year: 1995, iso: 'SE', population: 10004962, capital: 'Stockholm' }, { id: 28, country: 'United Kingdom', year: 1973, iso: 'GB', population: 64100000, capital: 'London' }, ]

packages/components/eui-datepicker/eui-datepicker.validators.ts

dateInputValidator
Type : ValidatorFn
Default value : (control: AbstractControl): ValidationErrors | null => { // Access the stored input reference from the control // eslint-disable-next-line const inputElement = (control as any)._inputRef?.nativeElement; if (inputElement) { const rawValue = inputElement.value || ''; // if the control value is null(malformed date) but the raw input value is not empty, return an error return control.value === null && rawValue.trim() !== '' ? { invalidDate: true } : null; } // return null if no input reference is found return null; }

packages/components/eui-datepicker/eui-datepicker.component.ts

DEFAULT_FORMATS
Type : object
Default value : { parse: { dateInput: 'L', }, display: { dateInput: 'L', monthYearLabel: 'MM/YYYY', dateA11yLabel: 'LL', monthYearA11yLabel: 'LL', }, }
LETTER_FORMAT
Type : object
Default value : { parse: { dateInput: 'LL', }, display: { dateInput: 'LL', monthYearLabel: 'LL', }, }
moment
Type : unknown
Default value : _rollupMoment || _moment
MONTH_YEAR_FORMAT
Type : object
Default value : { parse: { dateInput: 'MM/YYYY', }, display: { dateInput: 'MM/YYYY', monthYearLabel: 'MMM YYYY', dateA11yLabel: 'LL', monthYearA11yLabel: 'MMMM YYYY', }, }
YEAR_FORMAT
Type : object
Default value : { parse: { dateInput: 'YYYY', }, display: { dateInput: 'YYYY', monthYearLabel: 'YYYY', dateA11yLabel: 'YYYY', monthYearA11yLabel: 'YYYY', }, }

packages/components/externals/quill/quill-defaults.ts

defaultModules
Type : object
Default value : { toolbar: [ ['bold', 'italic', 'underline', 'strike'], // toggled buttons ['blockquote', 'code-block'], [{ header: 1 }, { header: 2 }], // custom button values [{ list: 'ordered' }, { list: 'bullet' }], [{ script: 'sub' }, { script: 'super' }], // superscript/subscript [{ indent: '-1' }, { indent: '+1' }], // outdent/indent [{ direction: 'rtl' }], // text direction [{ size: ['small', false, 'large', 'huge'] }], // custom dropdown [{ header: [1, 2, 3, 4, 5, 6, false] }], [{ color: [] }, { background: [] }], // dropdown with defaults from theme [{ font: [] }], [{ align: [] }], ['clean'], // remove formatting button ['table'], // adds the insert table button ['link', 'image', 'video'], // link and image, video ], }

packages/components/eui-dialog/services/eui-dialog.token.ts

DIALOG_COMPONENT_CONFIG
Type : unknown
Default value : new InjectionToken<any>('DIALOG_COMPONENT_CONFIG')
DIALOG_CONTAINER_CONFIG
Type : unknown
Default value : new InjectionToken<any>('DIALOG_CONTAINER_CONFIG')

packages/components/eui-accordion/index.ts

EUI_ACCORDION
Type : unknown
Default value : [ EuiAccordionComponent, EuiAccordionItemComponent, EuiAccordionItemHeaderDirective, ] as const

packages/components/eui-alert/index.ts

EUI_ALERT
Type : unknown
Default value : [ EuiAlertComponent, EuiAlertTitleComponent, ] as const

packages/components/layout/eui-app-v2/index.ts

EUI_APP
Type : unknown
Default value : [ EuiApp, EuiAppSidebar, EuiAppSidebarHeader, EuiAppSidebarBody, EuiAppSidebarFooter, EuiAppSidebarMenu, EuiAppToolbar, EuiAppToolbarAppname, EuiAppToolbarAppNameLabel, EuiAppToolbarAppNameSublabel, EuiAppToolbarEnvironment, EuiAppToolbarLogo, EuiAppToolbarItems, EuiAppToolbarItem, EuiAppToolbarSelector, EuiAppToolbarSearch, EuiAppToolbarSidebarToggle, EuiAppToolbarNavbar, EuiAppToolbarNavbarItem, EuiAppToolbarMegaMenu, EuiAppHeader, EuiAppHeaderAppName, EuiAppHeaderAppNameLabel, EuiAppHeaderAppNameSublabel, EuiAppHeaderEnvironment, EuiAppHeaderLogo, EuiAppHeaderRightContent, EuiAppHeaderSearch, EuiAppTopMessage, ] as const

packages/components/eui-autocomplete/index.ts

EUI_AUTOCOMPLETE
Type : unknown
Default value : [ EuiAutocompleteComponent, EuiAutocompleteOptionComponent, EuiAutocompleteOptionGroupComponent, ] as const

packages/components/eui-avatar/index.ts

EUI_AVATAR
Type : unknown
Default value : [ EuiAvatarComponent, EuiAvatarIconComponent, EuiAvatarTextComponent, EuiAvatarImageComponent, EuiAvatarBadgeComponent, EuiAvatarListComponent, EuiAvatarContentComponent, EuiAvatarContentLabelComponent, EuiAvatarContentSublabelComponent, ] as const

packages/components/eui-badge/index.ts

EUI_BADGE
Type : unknown
Default value : [ EuiBadgeComponent, ] as const

packages/components/eui-banner/index.ts

EUI_BANNER
Type : unknown
Default value : [ EuiBannerComponent, EuiBannerTitleComponent, EuiBannerDescriptionComponent, EuiBannerCtaComponent, EuiBannerVideoComponent, ] as const

packages/components/eui-block-content/index.ts

EUI_BLOCK_CONTENT
Type : unknown
Default value : [ EuiBlockContentComponent, ] as const

packages/components/eui-block-document/index.ts

EUI_BLOCK_DOCUMENT
Type : unknown
Default value : [ EuiBlockDocumentComponent, ] as const

packages/components/eui-breadcrumb/index.ts

EUI_BREADCRUMB
Type : unknown
Default value : [ EuiBreadcrumbComponent, EuiBreadcrumbItemComponent, ] as const

packages/components/eui-button/index.ts

EUI_BUTTON
Type : unknown
Default value : [ EuiButtonComponent, ] as const

packages/components/eui-button-group/index.ts

EUI_BUTTON_GROUP
Type : unknown
Default value : [ EuiButtonGroupComponent, ] as const

packages/components/eui-calendar/index.ts

EUI_CALENDAR
Type : unknown
Default value : [ EuiCalendarMonthlyComponent, EuiCalendarDayComponent, EuiCalendarComponent, EuiCalendarHeaderComponent, EuiCalendarWeeklyComponent, EuiCalendarWeeklyDayContentComponent, EuiCalendarWeeklyDayHeaderActionComponent, EuiCalendarWeeklyDayHeaderComponent, ] as const

packages/components/eui-card/index.ts

EUI_CARD
Type : unknown
Default value : [ EuiCardComponent, EuiCardHeaderComponent, EuiCardHeaderTitleComponent, EuiCardContentComponent, EuiCardHeaderLeftContentComponent, EuiCardHeaderRightContentComponent, EuiCardHeaderSubtitleComponent, EuiCardHeaderBodyComponent, EuiCardFooterActionButtonsComponent, EuiCardFooterActionIconsComponent, EuiCardMediaComponent, EuiCardFooterComponent, EuiCardFooterMenuContentComponent, EuiCardFooterMenuComponent, ] as const

packages/components/externals/charts/index.ts

EUI_CHARTS
Type : unknown
Default value : [ EuiApexChartComponent, ] as const

packages/components/eui-chip/index.ts

EUI_CHIP
Type : unknown
Default value : [ EuiChipComponent, ] as const

packages/components/eui-chip-button/index.ts

EUI_CHIP_BUTTON
Type : unknown
Default value : [ EuiChipButtonComponent, ] as const

packages/components/eui-chip-group/index.ts

EUI_CHIP_GROUP
Type : unknown
Default value : [ EuiChipGroupComponent, ] as const

packages/components/eui-chip-list/index.ts

EUI_CHIP_LIST
Type : unknown
Default value : [ EuiChipListComponent, EuiChipListAppendContentDirective, EuiChipListAdditionalContentDirective, ] as const

packages/components/eui-comment-thread/index.ts

EUI_COMMENT_THREAD
Type : unknown
Default value : [ EuiCommentThreadComponent, EuiCommentItemComponent, EuiCommentTextareaComponent, EuiCommentItemRightActionsComponent, ] as const

packages/components/eui-content-card/index.ts

EUI_CONTENT_CARD
Type : unknown
Default value : [ EuiContentCardComponent, EuiContentCardBodyTopComponent, EuiContentCardBodyComponent, EuiContentCardFooterComponent, EuiContentCardHeaderComponent, EuiContentCardHeaderEndComponent, EuiContentCardHeaderMetadataComponent, EuiContentCardHeaderStartComponent, EuiContentCardHeaderSubmetadataComponent, EuiContentCardHeaderSubtitleComponent, EuiContentCardHeaderTitleComponent, EuiContentCardMediaComponent, ] as const

packages/components/eui-dashboard-card/index.ts

EUI_DASHBOARD_CARD
Type : unknown
Default value : [ EuiDashboardCardComponent, EuiDashboardCardContentComponent, EuiDashboardCardContentHeaderComponent, EuiDashboardCardContentHeaderIconComponent, EuiDashboardCardContentHeaderTitleComponent, EuiDashboardCardContentHeaderActionComponent, EuiDashboardCardContentBodyComponent, EuiDashboardCardContentFooterComponent, EuiDashboardCardStatusContentComponent, ] as const

packages/components/eui-date-block/index.ts

EUI_DATE_BLOCK
Type : unknown
Default value : [ EuiDateBlockComponent, ] as const

packages/components/eui-date-range-selector/index.ts

EUI_DATE_RANGE_SELECTOR
Type : unknown
Default value : [ EuiTimeRangepickerComponent, EuiDateRangeSelectorComponent, ] as const

packages/components/eui-datepicker/index.ts

EUI_DATEPICKER
Type : unknown
Default value : [ EuiDatepickerComponent, EuiLetterFormatDirective, EuiYearFormatDirective, EuiMonthYearFormatDirective, EuiActionButtonsDirective, ] as const

packages/components/eui-dialog/index.ts

EUI_DIALOG
Type : unknown
Default value : [ EuiDialogComponent, EuiDialogHeaderDirective, EuiDialogFooterDirective, EuiDialogContainerComponent, ] as const

packages/components/eui-dimmer/index.ts

EUI_DIMMER
Type : unknown
Default value : [ EuiDimmerComponent, ] as const

packages/components/eui-disable-content/index.ts

EUI_DISABLE_CONTENT
Type : unknown
Default value : [ EuiDisableContentComponent, ] as const

packages/components/eui-discussion-thread/index.ts

EUI_DISCUSSION_THREAD
Type : unknown
Default value : [ EuiDiscussionThreadComponent, EuiDiscussionThreadItemComponent, ] as const

packages/components/eui-dropdown/index.ts

EUI_DROPDOWN
Type : unknown
Default value : [ EuiDropdownComponent, EuiDropdownItemComponent, EuiDropdownContentDirective, ] as const

packages/components/eui-feedback-message/index.ts

EUI_FEEDBACK_MESSAGE
Type : unknown
Default value : [ EuiFeedbackMessageComponent, ] as const

packages/components/eui-fieldset/index.ts

EUI_FIELDSET
Type : unknown
Default value : [ EuiFieldsetComponent, EuiFieldsetLabelExtraContentTagDirective, EuiFieldsetLabelRightContentTagDirective, ] as const

packages/components/eui-file-upload/index.ts

EUI_FILE_UPLOAD
Type : unknown
Default value : [ EuiFileUploadComponent, EuiFileUploadProgressComponent, EuiFilePreviewComponent, EuiFileSizePipe, ] as const

packages/components/eui-growl/index.ts

EUI_GROWL
Type : unknown
Default value : [ EuiGrowlComponent ] as const

packages/components/eui-helper-text/index.ts

EUI_HELPER_TEXT
Type : unknown
Default value : [ EuiHelperTextComponent, ] as const

packages/components/eui-icon/index.ts

EUI_ICON
Type : unknown
Default value : [ EuiIconSvgComponent, ] as const

packages/components/eui-icon-button/index.ts

EUI_ICON_BUTTON
Type : unknown
Default value : [ EuiIconButtonComponent, ] as const

packages/components/eui-icon-button-expander/index.ts

EUI_ICON_BUTTON_EXPANDER
Type : unknown
Default value : [ EuiIconButtonExpanderComponent, ] as const

packages/components/eui-icon-color/index.ts

EUI_ICON_COLOR
Type : unknown
Default value : [ EuiIconColorComponent, ] as const

packages/components/eui-icon-input/index.ts

EUI_ICON_INPUT
Type : unknown
Default value : [ EuiIconInputComponent, ] as const

packages/components/eui-icon-state/index.ts

EUI_ICON_STATE
Type : unknown
Default value : [ EuiIconStateComponent, ] as const

packages/components/eui-icon-toggle/index.ts

EUI_ICON_TOGGLE
Type : unknown
Default value : [ EuiIconToggleComponent, ] as const

packages/components/eui-input-button/index.ts

EUI_INPUT_BUTTON
Type : unknown
Default value : [ EuiInputButtonComponent, ] as const

packages/components/eui-input-checkbox/index.ts

EUI_INPUT_CHECKBOX
Type : unknown
Default value : [ EuiInputCheckboxComponent, ] as const

packages/components/eui-input-group/index.ts

EUI_INPUT_GROUP
Type : unknown
Default value : [ EuiInputGroupComponent, EuiInputGroupAddOnComponent, EuiInputGroupAddOnItemComponent, ] as const

packages/components/eui-input-number/index.ts

EUI_INPUT_NUMBER
Type : unknown
Default value : [ EuiInputNumberComponent, EuiInputNumberDirective, ] as const

packages/components/eui-input-radio/index.ts

EUI_INPUT_RADIO
Type : unknown
Default value : [ EuiInputRadioComponent, ] as const

packages/components/eui-input-text/index.ts

EUI_INPUT_TEXT
Type : unknown
Default value : [ EuiInputTextComponent, ] as const

packages/components/eui-label/index.ts

EUI_LABEL
Type : unknown
Default value : [ EuiLabelComponent, ] as const

packages/components/eui-language-selector/index.ts

EUI_LANGUAGE_SELECTOR
Type : unknown
Default value : [ EuiLanguageSelectorComponent, EuiModalSelectorComponent, ] as const

packages/components/layout/index.ts

EUI_LAYOUT
Type : unknown
Default value : [ EuiAppComponent, EuiAppBreadcrumbComponent, EuiAppFooterComponent, EuiAppHeaderComponent, EuiAppPageWrapperDirective, EuiAppSidebarBodyComponent, EuiAppSidebarComponent, EuiAppSidebarDrawerComponent, EuiAppSidebarFooterComponent, EuiAppSidebarHeaderComponent, EuiAppSidebarHeaderUserProfileComponent, EuiAppSidebarMenuComponent, EuiAppToolbarComponent, EuiAppToolbarItemsMobileComponent, EuiAppTopMessageComponent, EuiAppSideContainerComponent, EuiFooterComponent, EuiHeaderAppComponent, EuiHeaderAppNameComponent, EuiHeaderAppNameLogoComponent, EuiHeaderAppSubtitleComponent, EuiHeaderComponent, EuiHeaderEnvironmentComponent, EuiHeaderLogoComponent, EuiHeaderRightContentComponent, EuiHeaderSearchComponent, EuiHeaderUserProfileComponent, EuiNotificationItemComponent, EuiNotificationsComponent, EuiNotificationItemV2Component, EuiNotificationsV2Component, EuiSidebarToggleComponent, EuiToolbarAppComponent, EuiToolbarCenterComponent, EuiToolbarComponent, EuiToolbarEnvironmentComponent, EuiToolbarItemComponent, EuiToolbarItemsComponent, EuiToolbarLogoComponent, EuiToolbarMegaMenuComponent, EuiToolbarNavbarComponent, EuiToolbarNavbarItemComponent, EuiToolbarSearchComponent, EuiToolbarSelectorComponent, ] as const

packages/components/eui-list/index.ts

EUI_LIST
Type : unknown
Default value : [ EuiListComponent, EuiListItemComponent, ] as const

packages/components/eui-menu/index.ts

EUI_MENU
Type : unknown
Default value : [ EuiMenuComponent, EuiMenuItemComponent, ] as const

packages/components/eui-message-box/index.ts

EUI_MESSAGE_BOX
Type : unknown
Default value : [ EuiMessageBoxComponent, EuiMessageBoxFooterDirective, ] as const

packages/components/eui-navbar/index.ts

EUI_NAVBAR
Type : unknown
Default value : [ EuiNavbarComponent, EuiNavbarItemComponent, ] as const

packages/components/eui-overlay/index.ts

EUI_OVERLAY
Type : unknown
Default value : [ EuiOverlayHeaderComponent, EuiOverlayHeaderTitleComponent, EuiOverlayBodyComponent, EuiOverlayContentComponent, EuiOverlayFooterComponent, EuiOverlayComponent, ] as const

packages/components/eui-page/index.ts

EUI_PAGE
Type : unknown
Default value : [ EuiPageComponent, EuiPageColumnComponent, EuiPageColumnHeaderBodyContentDirective, EuiPageColumnHeaderLeftContentDirective, EuiPageColumnHeaderRightContentDirective, EuiPageColumnHeaderCollapsedContentDirective, EuiPageColumnBodyContentDirective, EuiPageColumnFooterContentDirective, EuiPageColumnsComponent, EuiPageContentComponent, EuiPageHeaderComponent, EuiPageHeaderSubLabelComponent, EuiPageHeaderBodyComponent, EuiPageHeaderActionItemsComponent, EuiPageHeroHeaderComponent, EuiPageFooterComponent, EuiPageBreadcrumbComponent, EuiPageTopContentComponent, ] as const

packages/components/eui-page-v2/index.ts

EUI_PAGE
Type : unknown
Default value : [ EuiPage, EuiPageContent, EuiPageHeader, EuiPageHeaderLabel, EuiPageHeaderSubLabel, EuiPageHeaderBody, EuiPageHeaderActionItems, EuiPageColumns, EuiPageColumn, EuiPageColumnHeader, EuiPageColumnHeaderStart, EuiPageColumnHeaderEnd, EuiPageColumnHeaderLabel, EuiPageColumnHeaderSubLabel, EuiPageColumnHeaderBody, EuiPageColumnFooter, EuiPageColumnBody, EuiPageFooter, EuiPageBreadcrumb, EuiPageTopContent, ] as const

packages/components/eui-paginator/index.ts

EUI_PAGINATOR
Type : unknown
Default value : [ EuiPaginatorComponent ] as const

packages/components/eui-popover/index.ts

EUI_POPOVER
Type : unknown
Default value : [ EuiPopoverComponent, ] as const

packages/components/eui-progress-bar/index.ts

EUI_PROGRESS_BAR
Type : unknown
Default value : [ EuiProgressBarComponent, ] as const

packages/components/eui-progress-circle/index.ts

EUI_PROGRESS_CIRCLE
Type : unknown
Default value : [ EuiProgressCircleComponent, ] as const

packages/components/eui-rating/index.ts

EUI_RATING
Type : unknown
Default value : [ EuiRatingComponent, ] as const

packages/components/eui-section-header/index.ts

EUI_SECTION_HEADER
Type : unknown
Default value : [ EuiSectionHeaderComponent, EuiSectionHeaderTitleComponent, EuiSectionHeaderIconComponent, EuiSectionHeaderActionComponent, EuiSectionHeaderDescriptionComponent, ] as const

packages/components/eui-select/index.ts

EUI_SELECT
Type : unknown
Default value : [ EuiSelectComponent, EuiNgSelectOptionDirective, EuiSelectControlValueAccessor, EuiSelectMultipleControlValueAccessor, EuiSelectMultipleOption, ] as const

packages/components/eui-sidebar-menu/index.ts

EUI_SIDEBAR_MENU
Type : unknown
Default value : [ EuiSidebarMenuComponent, ] as const

packages/components/eui-skeleton/index.ts

EUI_SKELETON
Type : unknown
Default value : [ EuiSkeletonComponent, ] as const

packages/components/eui-slide-toggle/index.ts

EUI_SLIDE_TOGGLE
Type : unknown
Default value : [ EuiSlideToggleComponent, ] as const

packages/components/eui-slider/index.ts

EUI_SLIDER
Type : unknown
Default value : [ EuiSliderComponent, ] as const

packages/components/eui-snc/index.ts

EUI_SNC
Type : unknown
Default value : [EuiSncComponent] as const

packages/components/eui-split-button/index.ts

EUI_SPLIT_BUTTON
Type : unknown
Default value : [ EuiSplitButtonComponent, ] as const

packages/components/eui-status-badge/index.ts

EUI_STATUS_BADGE
Type : unknown
Default value : [ EuiStatusBadgeComponent, ] as const

packages/components/eui-table/index.ts

EUI_TABLE
Type : unknown
Default value : [ EuiTableComponent, EuiTableSelectableHeaderComponent, EuiTableSelectableRowComponent, EuiTableStickyColDirective, EuiTableFilterComponent, EuiTableHighlightPipe, EuiTableSortableColComponent, EuiTableExpandableRowDirective, EuiTemplateDirective, ] as const

packages/components/eui-tabs/index.ts

EUI_TABS
Type : unknown
Default value : [ EuiTabsComponent, EuiTabsRightContentComponent, EuiTabBodyComponent, EuiTabHeaderComponent, EuiTabHeaderLabelComponent, EuiTabHeaderSublabelComponent, EuiTabHeaderRightContentComponent, EuiTabHeaderLeftContentComponent, EuiTabComponent, ] as const

packages/components/eui-textarea/index.ts

EUI_TEXTAREA
Type : unknown
Default value : [ EuiTextareaComponent, AutoResizeDirective, ] as const

packages/components/eui-timeline/index.ts

EUI_TIMELINE
Type : unknown
Default value : [ EuiTimelineComponent, EuiTimelineItemComponent, ] as const

packages/components/eui-timepicker/index.ts

EUI_TIMEPICKER
Type : unknown
Default value : [ EuiTimepickerComponent, ] as const

packages/components/eui-toggle-group/index.ts

EUI_TOGGLE_GROUP
Type : unknown
Default value : [ EuiToggleGroupComponent, EuiToggleGroupItemComponent, ] as const

packages/components/eui-tree/index.ts

EUI_TREE
Type : unknown
Default value : [ EuiTreeComponent, ] as const

packages/components/eui-tree-list/index.ts

EUI_TREE_LIST
Type : unknown
Default value : [ EuiTreeListComponent, EuiTreeListItemComponent, EuiTreeListItemLabelTagDirective, EuiTreeListItemDetailsContentTagDirective, EuiTreeListItemSubContainerContentTagDirective, EuiTreeListItemContentComponent, EuiTreeListToolbarComponent, ] as const

packages/components/eui-user-profile/index.ts

EUI_USER_PROFILE
Type : unknown
Default value : [ EuiUserProfileComponent, EuiUserProfileMenuComponent, EuiUserProfileMenuItemComponent, EuiUserProfileCardComponent, ] as const

packages/components/eui-wizard/index.ts

EUI_WIZARD
Type : unknown
Default value : [ EuiWizardStepComponent, EuiWizardComponent, ] as const

packages/components/eui-wizard-v2/index.ts

EUI_WIZARD_V2
Type : unknown
Default value : [ EuiWizardStepComponent, EuiWizardComponent, ] as const

packages/components/shared/animations/collapse.animation.ts

euiAnimationCollapse
Type : unknown
Default value : trigger('euiAnimationCollapse', [ state('false', style({ height: AUTO_STYLE, visibility: AUTO_STYLE })), state('true', style({ height: '0', visibility: 'hidden', paddingTop: '0', paddingBottom: '0' })), transition('false => true', animate(100 + 'ms ease-in')), transition('true => false', animate(200 + 'ms ease-out')), ])

packages/components/eui-autocomplete/validators/force-selection-from-data.validator.ts

euiAutocompleteForceSelectionFromData
Type : unknown
Default value : (control: AbstractControl<EuiAutoCompleteItem | EuiAutoCompleteItem[]>): { isInData: { isInData: boolean; invalidValues: EuiAutoCompleteItem | EuiAutoCompleteItem[] } } | null => { if (control.value) { const isInData = Array.isArray(control.value) ? control.value.every(obj => 'id' in obj) : control.value.id !== undefined; const invalidValues = Array.isArray(control.value) ? control.value.filter(v => v.id === undefined) : control.value; return !isInData ? { isInData: { isInData, invalidValues } } : null; } return null; }

packages/components/eui-calendar/models.ts

EuiCalendarDayOfWeek
Type : object
Default value : { MONDAY: 0, TUESDAY: 1, WEDNESDAY: 2, THURSDAY: 3, FRIDAY: 4, SATURDAY: 5, SUNDAY: 6, }

Enum for days of the week

packages/components/eui-date-range-selector/eui-date-range-selector.validators.ts

euiStartEndDateValidator
Type : unknown
Default value : (adapter: DateAdapter<any>): ValidatorFn => (control: AbstractControl): ValidationErrors | null => { const start = moment(adapter.getValidDateOrNull(adapter.deserialize(control.value?.startRange))); const end = moment(control.value?.endRange); return !start || !end || adapter.compareDate(start, end) <= 0 ? null : { euiDateRangeInvalid: { end, actual: start } }; }

packages/components/eui-file-upload/utils/mime-types.ts

extractZipFileList
Type : unknown
Default value : (data: Uint8Array): string[] => { // Simplified ZIP parsing - looks for central directory entries const files: string[] = []; let offset = 0; while (offset < data.length - 4) { // Look for local file header signature (0x04034b50) if (data[offset] === 0x50 && data[offset + 1] === 0x4b && data[offset + 2] === 0x03 && data[offset + 3] === 0x04) { const filenameLength = data[offset + 26] | (data[offset + 27] << 8); const extraFieldLength = data[offset + 28] | (data[offset + 29] << 8); if (filenameLength > 0 && offset + 30 + filenameLength <= data.length) { const filename = new TextDecoder().decode(data.slice(offset + 30, offset + 30 + filenameLength)); files.push(filename); } offset += 30 + filenameLength + extraFieldLength; } else { offset++; } } return files; }
getMimeType
Type : unknown
Default value : (header: Uint8Array): MimeType => { // convert Uint8Array to hex string const hex = uint8ArrayToHexString(header); // map hex string to mime type if (hex.startsWith('ffd8ff')) return 'image/jpeg'; if (hex.startsWith('89504e47')) return 'image/png'; if (hex.startsWith('464c4946')) return 'image/flif'; if (hex.startsWith('67696d7020786366')) return 'image/x-xcf'; if (hex.startsWith('49492a00')) return 'image/x-canon-cr2'; if (hex.startsWith('49492a00')) return 'image/x-canon-cr3'; if (hex.startsWith('49492a00')) return 'image/tiff'; if (hex.startsWith('424d')) return 'image/bmp'; if (hex.startsWith('69636e73')) return 'image/icns'; if (hex.startsWith('49491a0000004845415050')) return 'image/vnd.ms-photo'; if (hex.startsWith('38425053')) return 'image/vnd.adobe.photoshop'; if (hex.startsWith('06054b50')) return 'application/x-indesign'; // Handle ZIP-based formats by examining content if (hex.startsWith('504b0304')) { return identifyZipBasedFormat(header); } if (hex.startsWith('7b2274797065223a226a736f6e227d')) return 'application/json'; if (hex.startsWith('7573746172')) return 'application/x-tar'; if (hex.startsWith('526172211a0700')) return 'application/x-rar-compressed'; if (hex.startsWith('1f8b08')) return 'application/gzip'; if (hex.startsWith('425a68')) return 'application/x-bzip2'; if (hex.startsWith('377abcaf271c')) return 'application/x-7z-compressed'; if (hex.startsWith('78da')) return 'application/x-apple-diskimage'; if (hex.startsWith('00000020667479706d70')) return 'video/mp4'; if (hex.startsWith('4d546864')) return 'audio/midi'; if (hex.startsWith('1a45dfa393428288')) return 'video/x-matroska'; if (hex.startsWith('1a45dfa3')) return 'video/webm'; if (hex.startsWith('00000014667479707174')) return 'video/quicktime'; if (hex.startsWith('52494646')) return 'video/vnd.avi'; if (hex.startsWith('52494646')) return 'audio/vnd.wave'; if (hex.startsWith('0a010301')) return 'audio/qcelp'; if (hex.startsWith('3026b2758e66cf11')) return identifyAsfFormat(header); if (hex.startsWith('000001ba')) return 'video/mpeg'; if (hex.startsWith('00000020667479703367')) return 'video/3gpp'; if (hex.startsWith('494433')) return 'audio/mpeg'; if (hex.startsWith('00000020667479704d344120')) return 'audio/mp4'; if (hex.startsWith('4f707573')) return 'audio/opus'; if (hex.startsWith('4f676753')) return identifyOggFormat(header); if (hex.startsWith('664c6143')) return 'audio/x-flac'; if (hex.startsWith('4d414320')) return 'audio/ape'; if (hex.startsWith('7776706b')) return 'audio/wavpack'; if (hex.startsWith('2321414d520a')) return 'audio/amr'; if (hex.startsWith('255044462d312e')) return 'application/pdf'; if (hex.startsWith('7f454c46')) return 'application/x-elf'; if (hex.startsWith('4d5a')) return 'application/x-msdownload'; if (hex.startsWith('435753')) return 'application/x-shockwave-flash'; if (hex.startsWith('7b5c72746631')) return 'application/rtf'; if (hex.startsWith('0061736d')) return 'application/wasm'; if (hex.startsWith('774f4646')) return 'font/woff'; if (hex.startsWith('774f4632')) return 'font/woff2'; if (hex.startsWith('000100000008')) return 'application/vnd.ms-fontobject'; if (hex.startsWith('0001000000')) return 'font/ttf'; if (hex.startsWith('4f54544f00')) return 'font/otf'; if (hex.startsWith('000001000100')) return 'image/x-icon'; if (hex.startsWith('464c560105')) return 'video/x-flv'; if (hex.startsWith('25215053')) return 'application/postscript'; if (hex.startsWith('25215053')) return 'application/eps'; if (hex.startsWith('fd377a585a00')) return 'application/x-xz'; if (hex.startsWith('53514c69746520666f726d6174203300')) return 'application/x-sqlite3'; if (hex.startsWith('4e45531a00000001')) return 'application/x-nintendo-nes-rom'; if (hex.startsWith('4d534346')) return 'application/vnd.ms-cab-compressed'; if (hex.startsWith('213c617263683e0a')) return 'application/x-deb'; if (hex.startsWith('1f8b08')) return 'application/x-unix-archive'; if (hex.startsWith('edabeedb')) return 'application/x-rpm'; if (hex.startsWith('1f9d90')) return 'application/x-compress'; if (hex.startsWith('4c5a4950')) return 'application/x-lzip'; if (hex.startsWith('d0cf11e0a1b11ae1')) return 'application/x-cfb'; if (hex.startsWith('4d49455f')) return 'application/x-mie'; if (hex.startsWith('4141523146')) return 'application/x-apache-arrow'; if (hex.startsWith('060e2b3402050101')) return 'application/mxf'; if (hex.startsWith('47')) return 'video/mp2t'; if (hex.startsWith('4250e4')) return 'application/x-blender'; if (hex.startsWith('425047fb')) return 'image/bpg'; if (hex.startsWith('ff4fff51')) return 'image/j2c'; if (hex.startsWith('0000000c6a5020200d0a')) return 'image/jp2'; if (hex.startsWith('6a5020200d0a870a')) return 'image/jpx'; if (hex.startsWith('6a5020200d0a870a')) return 'image/jpm'; if (hex.startsWith('0000000c6a5020200d0a')) return 'image/mj2'; if (hex.startsWith('464f524d')) return 'audio/aiff'; if (hex.startsWith('3c3f786d6c20')) return 'application/xml'; if (hex.startsWith('424f4f4b4d4f4249')) return 'application/x-mobipocket-ebook'; if (hex.startsWith('667479706174')) return identifyHeifFormat(header); if (hex.startsWith('4b545820')) return 'image/ktx'; if (hex.startsWith('4449434d')) return 'application/dicom'; if (hex.startsWith('4d50434b')) return 'audio/x-musepack'; if (hex.startsWith('56656e64')) return 'text/calendar'; if (hex.startsWith('424547494e3a5643415244')) return 'text/vcard'; if (hex.startsWith('676c5458')) return 'model/gltf-binary'; if (hex.startsWith('d4c3b2a1')) return 'application/vnd.tcpdump.pcap'; if (hex.startsWith('464f524d')) return 'audio/x-voc'; if (hex.startsWith('64646f6c')) return 'audio/vnd.dolby.dd-raw'; return null; }
identifyAsfFormat
Type : unknown
Default value : (data: Uint8Array): MimeType => { // ASF files all start with the same GUID: 3026b2758e66cf11a6d900aa0062ce6c // To distinguish between audio, video, and application ASF, we need to examine // the stream properties in the ASF header try { // Look for stream properties object GUID starting at offset 30 // Audio stream properties: b7dc0791a9b711cf8ee600c00c205365 // Video stream properties: bc19efc05b4d11cf9b1100aa00bbcb8b if (data.length < 100) { // Not enough data to analyze, default to application return 'application/vnd.ms-asf'; } const hex = uint8ArrayToHexString(data); // Look for video stream properties GUID (indicates video content) if (hex.includes('bc19efc05b4d11cf9b1100aa00bbcb8b')) { return 'video/x-ms-asf'; } // Look for audio stream properties GUID (indicates audio content) if (hex.includes('b7dc0791a9b711cf8ee600c00c205365')) { return 'audio/x-ms-asf'; } // Check for Windows Media Audio/Video codec identifiers // WMA codec: 161 (0xa1) or 162 (0xa2) or 163 (0xa3) // WMV codec: Common values include various Windows Media Video identifiers // Scan through the header for codec information for (let i = 0; i < Math.min(data.length - 4, 1000); i++) { // Look for audio codec indicators if (data[i] === 0xa1 || data[i] === 0xa2 || data[i] === 0xa3) { // Found WMA codec indicator return 'audio/x-ms-asf'; } } // Look for common video indicators in the first 1KB const textContent = new TextDecoder('utf-8', { fatal: false }).decode(data.slice(0, Math.min(1000, data.length))); // Check for video-related strings if (textContent.toLowerCase().includes('video') || textContent.toLowerCase().includes('wmv') || textContent.toLowerCase().includes('mpeg')) { return 'video/x-ms-asf'; } // Check for audio-related strings if (textContent.toLowerCase().includes('audio') || textContent.toLowerCase().includes('wma') || textContent.toLowerCase().includes('music')) { return 'audio/x-ms-asf'; } // Default to application/vnd.ms-asf if we can't determine the specific type return 'application/vnd.ms-asf'; } catch { // If any error occurs during analysis, default to application type return 'application/vnd.ms-asf'; } }
identifyHeifFormat
Type : unknown
Default value : (data: Uint8Array): MimeType => { // HEIF/HEIC files all start with the same ftyp box signature: 667479706174 // To distinguish between formats, we need to examine the brand and compatible brands // in the ftyp (file type) box try { if (data.length < 20) { // Not enough data to analyze, default to HEIF return 'image/heif'; } const hex = uint8ArrayToHexString(data); // The ftyp box structure: // Bytes 0-3: Box size (4 bytes) // Bytes 4-7: Box type "ftyp" (4 bytes) - 667479706174 // Bytes 8-11: Major brand (4 bytes) // Bytes 12-15: Minor version (4 bytes) // Bytes 16+: Compatible brands (4 bytes each) // Extract major brand (4 bytes starting at offset 8) // Convert to ASCII string for easier comparison const majorBrand = String.fromCharCode( data[8], data[9], data[10], data[11], ); // Look for compatible brands in the first 100 bytes const compatibleBrandsHex = hex.substring(32, Math.min(200, hex.length)); // Start after major brand + minor version // HEIC brands: 'heic', 'heix', 'hevc', 'hevx' if (majorBrand === 'heic' || compatibleBrandsHex.includes('68656963') || // 'heic' compatibleBrandsHex.includes('68656978') || // 'heix' compatibleBrandsHex.includes('68657663') || // 'hevc' compatibleBrandsHex.includes('68657678')) { // 'hevx' // Check for sequence/animation indicators if (compatibleBrandsHex.includes('68657673') || // 'hevs' - HEIC sequence compatibleBrandsHex.includes('6d736631') || // 'msf1' - sequence majorBrand === 'hevs') { return 'image/heic-sequence'; } return 'image/heic'; } // HEIF brands: 'mif1', 'msf1' if (majorBrand === 'mif1' || majorBrand === 'msf1' || compatibleBrandsHex.includes('6d696631') || // 'mif1' compatibleBrandsHex.includes('6d736631')) { // 'msf1' // Check for sequence/animation indicators if (majorBrand === 'msf1' || compatibleBrandsHex.includes('6d736631')) { // 'msf1' - sequence return 'image/heif-sequence'; } return 'image/heif'; } // Check for specific sequence indicators in the data if (hex.includes('6d736631') || // 'msf1' - multi-image sequence hex.includes('68657673')) { // 'hevs' - HEIC sequence // If we find HEIC-related brands, it's HEIC sequence if (hex.includes('68656963') || hex.includes('68657663')) { return 'image/heic-sequence'; } return 'image/heif-sequence'; } // If we find HEIC indicators but no sequence, it's single HEIC if (hex.includes('68656963') || // 'heic' hex.includes('68657663') || // 'hevc' hex.includes('68656978') || // 'heix' hex.includes('68657678')) { // 'hevx' return 'image/heic'; } // Default to HEIF for any other case return 'image/heif'; } catch { // If any error occurs during analysis, default to HEIF return 'image/heif'; } }
identifyOggFormat
Type : unknown
Default value : (data: Uint8Array): MimeType => { // OGG files all start with "OggS" (4f676753) but can contain different codecs // To distinguish between audio, video, and application OGG, we need to examine // the codec information in the OGG page headers try { if (data.length < 64) { // Not enough data to analyze, default to audio return 'audio/ogg'; } const hex = uint8ArrayToHexString(data); // Look for codec identification patterns in the first few hundred bytes // Common video codecs in OGG: // - Theora: "theora" or "\x80theora" // - VP8/VP9: various signatures // - Dirac: "BBCD" // Common audio codecs in OGG: // - Vorbis: "vorbis" or "\x01vorbis" // - Opus: "OpusHead" // - FLAC: "fLaC" // - Speex: "Speex" // Convert some bytes to text for string matching const textContent = new TextDecoder('utf-8', { fatal: false }).decode(data.slice(0, Math.min(512, data.length))); const lowerContent = textContent.toLowerCase(); // Check for video codec indicators first (as they're more specific) if (lowerContent.includes('theora') || hex.includes('8074686f726120') || // "\x80theora " hex.includes('7468656f7261') || // "theora" lowerContent.includes('dirac') || hex.includes('42424344') || // "BBCD" - Dirac lowerContent.includes('vp8') || lowerContent.includes('vp9')) { return 'video/ogg'; } // Check for audio codec indicators if (lowerContent.includes('vorbis') || hex.includes('01766f72626973') || // "\x01vorbis" hex.includes('766f72626973') || // "vorbis" lowerContent.includes('opushead') || hex.includes('4f7075734865616420') || // "OpusHead " lowerContent.includes('speex') || hex.includes('53706565782020') || // "Speex " lowerContent.includes('flac') || hex.includes('664c6143')) { // "fLaC" return 'audio/ogg'; } // Look for OGG stream structure patterns // OGG pages have a specific structure, look for multiple "OggS" signatures // which might indicate a complex multimedia container let oggSCount = 0; for (let i = 0; i < Math.min(data.length - 4, 1000); i += 4) { if (data[i] === 0x4f && data[i + 1] === 0x67 && data[i + 2] === 0x67 && data[i + 3] === 0x53) { oggSCount++; } } // Multiple OGG pages might indicate a more complex application format if (oggSCount > 3) { // Check if it's likely a multimedia container vs pure audio/video if (lowerContent.includes('application') || lowerContent.includes('metadata') || lowerContent.includes('index') || (!lowerContent.includes('audio') && !lowerContent.includes('video') && !lowerContent.includes('vorbis') && !lowerContent.includes('theora'))) { return 'application/ogg'; } } // Look for file extension hints in metadata (if present) if (lowerContent.includes('.ogv') || lowerContent.includes('video')) { return 'video/ogg'; } if (lowerContent.includes('.oga') || lowerContent.includes('audio') || lowerContent.includes('music')) { return 'audio/ogg'; } // Check the OGG page header flags // Byte 5 in OGG page header contains flags // If we have enough data, check the stream type if (data.length > 26) { const pageHeaderType = data[5]; // Fresh packet start (0x02) often indicates beginning of codec data if ((pageHeaderType & 0x02) === 0x02) { // Look at the packet data starting around byte 27 const packetStart = data.slice(27, Math.min(data.length, 50)); const packetHex = uint8ArrayToHexString(packetStart); // Check for Vorbis identification header if (packetHex.startsWith('01766f72626973')) { return 'audio/ogg'; } // Check for Theora identification header if (packetHex.startsWith('8074686f726120')) { return 'video/ogg'; } } } // Default to audio/ogg as it's the most common OGG format return 'audio/ogg'; } catch { // If any error occurs during analysis, default to audio return 'audio/ogg'; } }
identifyZipBasedFormat
Type : unknown
Default value : (data: Uint8Array): MimeType => { try { const fileEntries = extractZipFileList(data); // Chrome extension if (fileEntries.includes('manifest.json')) { return 'application/x-google-chrome-extension'; } // EPUB if (fileEntries.includes('META-INF/container.xml') || fileEntries.includes('mimetype')) { return 'application/epub+zip'; } // OpenDocument formats if (fileEntries.includes('META-INF/manifest.xml')) { if (fileEntries.some(f => f.endsWith('.odp'))) return 'application/vnd.oasis.opendocument.presentation'; if (fileEntries.some(f => f.endsWith('.ods'))) return 'application/vnd.oasis.opendocument.spreadsheet'; if (fileEntries.some(f => f.endsWith('.odt'))) return 'application/vnd.oasis.opendocument.text'; } // Microsoft Office formats if (fileEntries.includes('[Content_Types].xml')) { if (fileEntries.includes('ppt/presentation.xml')) return 'application/vnd.openxmlformats-officedocument.presentationml.presentation'; if (fileEntries.includes('xl/workbook.xml')) return 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; if (fileEntries.includes('word/document.xml')) return 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'; } // Default to generic ZIP return 'application/zip'; } catch { return 'application/zip'; } }
uint8ArrayToHexString
Type : unknown
Default value : (uint8Array): string => { return Array.prototype.map.call(uint8Array, (byte) => ('00' + byte.toString(16)).slice(-2)).join(''); }

packages/components/externals/quill/quill-editor.component.ts

getFormat
Type : unknown
Default value : (format?: QuillFormat, configFormat?: QuillFormat): QuillFormat => { const passedFormat = format || configFormat; return passedFormat || 'html'; }
Quill
Type : any
require
Type : any

packages/components/externals/helpers/get-view-element.helper.ts

getViewElement
Type : unknown
Default value : (fixture, componentClass, klass?) => { let el; let domElement; const de = fixture.debugElement.query(By.css(componentClass)); if (de) { el = de.nativeElement; if (el && klass) { domElement = el.querySelectorAll(klass); if (domElement.length <= 1) { domElement = el.querySelector(klass); } } } return { de, el, domElement }; }

packages/components/eui-card/services/ui-state.service.ts

initialState
Type : UIState
Default value : { isCollapsible: false, isCollapsed: false, isUrgent: false, hasLeftExpander: false, }

packages/components/validators/max-length-bytes.validator.ts

maxLengthBytes
Type : unknown
Default value : (bytes: number): ValidatorFn => { return (control: AbstractControl): ValidationErrors | null => { const length: number = new TextEncoder().encode(control.value).length; if (length > bytes) { return { maxLengthBytes: { required: bytes, actual: length, }, }; } return null; }; }

packages/components/eui-tree/testing/multilevel.ts

multilevel
Type : []
Default value : [ { node: { treeContentBlock: { id: '1', label: 'DIGIT A', }, isSelected: true, }, }, { node: { treeContentBlock: { id: '2', label: 'DIGIT B', }, }, children: [ { node: { treeContentBlock: { id: '3', label: 'DIGIT B.1', }, }, }, { node: { treeContentBlock: { id: '4', label: 'DIGIT B.2', }, }, }, { node: { treeContentBlock: { id: '5', label: 'DIGIT B.3', }, }, children: [ { node: { treeContentBlock: { id: '6', label: 'DIGIT B.3.1', }, isSelected: true, }, }, { node: { treeContentBlock: { id: '7', label: 'DIGIT B.3.2', }, isSelected: true, }, }, ], }, { node: { treeContentBlock: { id: '8', label: 'DIGIT B.4', }, }, }, { node: { treeContentBlock: { id: '9', label: 'DIGIT B.5', }, }, }, ], }, { node: { treeContentBlock: { id: '10', label: 'DIGIT C', }, }, children: [ { node: { treeContentBlock: { id: '11', label: 'DIGIT C.1', }, }, }, { node: { treeContentBlock: { id: '12', label: 'DIGIT C.2', }, }, }, { node: { treeContentBlock: { id: '13', label: 'DIGIT C.3', }, }, children: [ { node: { treeContentBlock: { id: '14', label: 'DIGIT C.3.1', }, }, }, { node: { treeContentBlock: { id: '15', label: 'DIGIT C.3.2', }, }, }, ], }, { node: { treeContentBlock: { id: '16', label: 'DIGIT C.4', }, }, }, { node: { treeContentBlock: { id: '17', label: 'DIGIT C.5', }, }, }, ], }, { node: { treeContentBlock: { id: '18', label: 'DIGIT D', }, }, children: [ { node: { treeContentBlock: { id: '19', label: 'DIGIT D.1', }, }, }, { node: { treeContentBlock: { id: '20', label: 'DIGIT D.2', }, }, }, { node: { treeContentBlock: { id: '21', label: 'DIGIT D.3', }, }, children: [ { node: { treeContentBlock: { id: '22', label: 'DIGIT D.3.1', }, }, }, { node: { treeContentBlock: { id: '23', label: 'DIGIT D.3.2', }, }, }, ], }, { node: { treeContentBlock: { id: '24', label: 'DIGIT D.4', }, }, }, { node: { treeContentBlock: { id: '25', label: 'DIGIT D.5', }, }, }, ], }, ]

packages/components/eui-slide-toggle/animations/on-off.ts

onOff
Type : unknown
Default value : trigger('onOff', [ state( 'off', style({ left: 0, }), ), state( 'on', style({ left: '1rem', }), ), transition('off => on', [animate('0ms 100ms linear')]), transition('on => off', [animate('0ms 100ms linear')]), ])

packages/components/eui-dropdown/animations/open-close.ts

openClose
Type : unknown
Default value : trigger('openClose', [ state( 'open', style({ opacity: 1, transform: 'scale(1)', }), ), state( 'closed', style({ opacity: 0, transform: 'scale(0.9)', }), ), transition('closed => open', [animate('50ms 25ms linear')]), ])

packages/components/eui-autocomplete/animations/animations.ts

panelAnimation
Type : AnimationTriggerMetadata
Default value : trigger('panelAnimation', [ state( 'void, hidden', style({ opacity: 0, transform: 'scaleY(0.8)', }), ), transition(':enter, hidden => visible', [ group([ animate('0.03s linear', style({ opacity: 1 })), animate('0.12s cubic-bezier(0, 0, 0.2, 1)', style({ transform: 'scaleY(1)' })), ]), ]), transition(':leave, visible => hidden', [animate('0.05s linear', style({ opacity: 0 }))]), ])

packages/components/directives/eui-resizable/eui-resizable.directive.ts

pixelTransform
Type : unknown
Default value : (value: string | number): number => { value = numberAttribute(value, 0); return Math.max(0, value); }

Ensures the value is a non-negative pixel number.

packages/components/eui-progress-bar/eui-progress-bar.component.ts

progressAttribute
Type : unknown
Default value : (value: NumberInput): number => Math.min(numberAttribute(value), 100)

Transform function that ensures progress value doesn't exceed 100

packages/components/externals/quill/quill-editor.interfaces.ts

QUILL_CONFIG_TOKEN
Type : unknown
Default value : new InjectionToken<QuillConfig>('config')
QUILL_DYNAMIC_CONFIG_TOKEN
Type : unknown
Default value : new InjectionToken<QuillDynamicConfig>('Dynamic loading config')

packages/components/externals/eui-editor/eui-editor.component.ts

QuillBetterTable
Type : unknown
Default value : window['quillBetterTable']
QuillType
Type : any
Default value : window['Quill']

packages/components/externals/eui-editor/eui-editor.module.ts

QuillBetterTable
Type : unknown
Default value : window['quillBetterTable']
quillConfig
Type : QuillConfig
Default value : { modules: { table: false, 'better-table': { operationMenu: { items: { unmergeCells: { text: 'Another unmerge cells name', }, }, color: { colors: [ '#000000', '#e60000', '#ff9900', '#ffff00', '#008a00', '#0066cc', '#9933ff', '#ffffff', '#facccc', '#ffebcc', '#ffffcc', '#cce8cc', '#cce0f5', '#ebd6ff', '#bbbbbb', '#f06666', '#ffc266', '#ffff66', '#66b966', '#66a3e0', '#c285ff', '#888888', '#a10000', '#b26b00', '#b2b200', '#006100', '#0047b2', '#6b24b2', '#444444', '#5c0000', '#663d00', '#666600', '#003700', '#002966', '#3d1466', ], text: 'Background Colors', }, }, }, }, }

packages/components/externals/eui-editor/json-view/eui-editor-json-view.component.ts

QuillType
Type : any
Default value : window['Quill']

packages/components/eui-page-v2/eui-page-columns/eui-page-columns.ts

ResizeObserver

packages/components/eui-page/components/eui-page-columns/eui-page-columns.component.ts

ResizeObserver

packages/components/eui-select/eui-select-multiple.directive.ts

SELECT_MULTIPLE_VALUE_ACCESSOR
Type : Provider
Default value : { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => EuiSelectMultipleControlValueAccessor), multi: true, }

packages/components/directives/eui-tooltip/animations/show-hide.ts

showHide
Type : unknown
Default value : trigger('showHide', [ state('initial, void, hidden', style({ opacity: 0, transform: 'scale(0)' })), state('visible', style({ transform: 'scale(1)' })), transition( '* => visible', animate( '200ms cubic-bezier(0, 0, 0.2, 1)', keyframes([ style({ opacity: 0, transform: 'scale(0)', offset: 0 }), style({ opacity: 0.5, transform: 'scale(0.99)', offset: 0.5 }), style({ opacity: 1, transform: 'scale(1)', offset: 1 }), ]), ), ), transition('* => hidden', animate('100ms cubic-bezier(0, 0, 0.2, 1)', style({ opacity: 0 }))), ])

Tooltip display animation.

packages/components/test-setup.ts

testBed
Type : unknown
Default value : getTestBed()

packages/components/testing/mocks/translate.module.mock.ts

TRANSLATED_STRING
Type : string
Default value : 'i18n'

packages/components/externals/eui-editor/image-url-dialog/image-url-dialog.component.ts

urlValidator
Type : unknown
Default value : (control: AbstractControl): { isUrlValid: false } | null => { const isHttp = control.value.substr(0, 7) === 'http://'; const isHttps = control.value.substr(0, 8) === 'https://'; return !isHttp && !isHttps ? { isUrlValid: false } : null; }

packages/components/externals/quill/loader.service.ts

window
Type : literal type

results matching ""

    No results matching ""