@ember-eui/core 11.0.3 → 12.0.0
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/README.md +9 -7
- package/declarations/-private/random-id.d.ts +0 -1
- package/declarations/-private/random-id.d.ts.map +1 -1
- package/declarations/components/eui-accordion.d.ts +2 -1
- package/declarations/components/eui-accordion.d.ts.map +1 -1
- package/declarations/components/eui-breadcrumbs.d.ts +2 -1
- package/declarations/components/eui-breadcrumbs.d.ts.map +1 -1
- package/declarations/components/eui-code-block/virtualized.d.ts +1 -1
- package/declarations/components/eui-code-block.d.ts +2 -1
- package/declarations/components/eui-code-block.d.ts.map +1 -1
- package/declarations/components/eui-code.d.ts +2 -1
- package/declarations/components/eui-code.d.ts.map +1 -1
- package/declarations/components/eui-combo-box/options.d.ts +1 -1
- package/declarations/components/eui-combo-box/options.d.ts.map +1 -1
- package/declarations/components/eui-combo-box/trigger/input.d.ts +1 -1
- package/declarations/components/eui-combo-box/trigger/input.d.ts.map +1 -1
- package/declarations/components/eui-form-control-layout-custom-icon.d.ts +1 -1
- package/declarations/components/eui-global-toast-list.d.ts +2 -1
- package/declarations/components/eui-global-toast-list.d.ts.map +1 -1
- package/declarations/components/eui-hide-for.d.ts.map +1 -1
- package/declarations/components/eui-i18n.d.ts +1 -1
- package/declarations/components/eui-icon.d.ts +1 -0
- package/declarations/components/eui-icon.d.ts.map +1 -1
- package/declarations/components/eui-markdown-editor-toolbar.d.ts +1 -1
- package/declarations/components/eui-markdown-editor.d.ts +3 -2
- package/declarations/components/eui-markdown-editor.d.ts.map +1 -1
- package/declarations/components/eui-page-header-content.d.ts +1 -1
- package/declarations/components/eui-popover.d.ts +2 -1
- package/declarations/components/eui-popover.d.ts.map +1 -1
- package/declarations/components/eui-portal.d.ts +2 -1
- package/declarations/components/eui-portal.d.ts.map +1 -1
- package/declarations/components/eui-range-track.d.ts +1 -1
- package/declarations/components/eui-show-for.d.ts +1 -1
- package/declarations/components/eui-show-for.d.ts.map +1 -1
- package/declarations/components/eui-super-date-picker/date-popover/absolute-tab.d.ts +2 -1
- package/declarations/components/eui-super-date-picker/date-popover/absolute-tab.d.ts.map +1 -1
- package/declarations/components/eui-super-date-picker/date-popover/datetime-picker.d.ts +2 -1
- package/declarations/components/eui-super-date-picker/date-popover/datetime-picker.d.ts.map +1 -1
- package/declarations/components/eui-super-date-picker/date-popover/eui-date-popover-content.d.ts +1 -1
- package/declarations/components/eui-super-date-picker/date-popover/relative-tab.d.ts +2 -1
- package/declarations/components/eui-super-date-picker/date-popover/relative-tab.d.ts.map +1 -1
- package/declarations/components/eui-super-date-picker/eui-quick-select-popover/eui-quick-select.d.ts +2 -1
- package/declarations/components/eui-super-date-picker/eui-quick-select-popover/eui-quick-select.d.ts.map +1 -1
- package/declarations/components/eui-tabbed-content.d.ts +2 -1
- package/declarations/components/eui-tabbed-content.d.ts.map +1 -1
- package/declarations/components/eui-tool-tip-popover.d.ts +2 -1
- package/declarations/components/eui-tool-tip-popover.d.ts.map +1 -1
- package/declarations/components.d.ts +148 -148
- package/declarations/helpers/arg-or-default.d.ts +1 -1
- package/declarations/helpers/eui-page-restrict-width.d.ts +1 -1
- package/declarations/helpers/eui-palette.d.ts +1 -1
- package/declarations/helpers/get-range-tick.d.ts +2 -2
- package/declarations/helpers/hex-to-rgb.d.ts +1 -1
- package/declarations/helpers/is-color-dark.d.ts +1 -1
- package/declarations/helpers/is-item-open.d.ts +1 -1
- package/declarations/helpers/is-valid-hex.d.ts +1 -1
- package/declarations/helpers/nullish.d.ts +1 -1
- package/declarations/helpers/starts-with.d.ts +1 -1
- package/declarations/helpers/to-initials.d.ts +1 -1
- package/declarations/helpers/type-of.d.ts +3 -3
- package/declarations/helpers/type-of.d.ts.map +1 -1
- package/declarations/helpers/use-state.d.ts +1 -1
- package/declarations/modifiers/screen-reader-only.d.ts +1 -1
- package/declarations/modifiers/simple-style.d.ts +1 -1
- package/declarations/modifiers/validatable-control.d.ts +1 -1
- package/declarations/utils/markdown/markdown-modes.d.ts.map +1 -1
- package/dist/-private/random-id.js.map +1 -1
- package/dist/components/common.js.map +1 -1
- package/dist/components/eui-accordion.js +14 -14
- package/dist/components/eui-accordion.js.map +1 -1
- package/dist/components/eui-auto-sizer.js +31 -31
- package/dist/components/eui-auto-sizer.js.map +1 -1
- package/dist/components/eui-avatar.js +2 -2
- package/dist/components/eui-avatar.js.map +1 -1
- package/dist/components/eui-badge-group.js.map +1 -1
- package/dist/components/eui-badge.js +1 -1
- package/dist/components/eui-badge.js.map +1 -1
- package/dist/components/eui-beta-badge.js +1 -1
- package/dist/components/eui-beta-badge.js.map +1 -1
- package/dist/components/eui-bottom-bar.js +13 -13
- package/dist/components/eui-bottom-bar.js.map +1 -1
- package/dist/components/eui-breadcrumbs.js +40 -42
- package/dist/components/eui-breadcrumbs.js.map +1 -1
- package/dist/components/eui-button-content.js.map +1 -1
- package/dist/components/eui-button-empty.js +1 -1
- package/dist/components/eui-button-empty.js.map +1 -1
- package/dist/components/eui-button-group-button.js +1 -1
- package/dist/components/eui-button-group-button.js.map +1 -1
- package/dist/components/eui-button-group.js +1 -1
- package/dist/components/eui-button-group.js.map +1 -1
- package/dist/components/eui-button-icon.js +1 -1
- package/dist/components/eui-button-icon.js.map +1 -1
- package/dist/components/eui-button.js +2 -2
- package/dist/components/eui-button.js.map +1 -1
- package/dist/components/eui-call-out.js +1 -1
- package/dist/components/eui-call-out.js.map +1 -1
- package/dist/components/eui-card-select.js +8 -8
- package/dist/components/eui-card-select.js.map +1 -1
- package/dist/components/eui-card.js +6 -6
- package/dist/components/eui-card.js.map +1 -1
- package/dist/components/eui-checkable-card.js.map +1 -1
- package/dist/components/eui-checkbox-group.js +1 -1
- package/dist/components/eui-checkbox-group.js.map +1 -1
- package/dist/components/eui-checkbox.js +4 -4
- package/dist/components/eui-checkbox.js.map +1 -1
- package/dist/components/eui-code-block/controls.js.map +1 -1
- package/dist/components/eui-code-block/full-screen-display.js.map +1 -1
- package/dist/components/eui-code-block/virtualized.js +9 -9
- package/dist/components/eui-code-block/virtualized.js.map +1 -1
- package/dist/components/eui-code-block.js +71 -71
- package/dist/components/eui-code-block.js.map +1 -1
- package/dist/components/eui-code.js +16 -16
- package/dist/components/eui-code.js.map +1 -1
- package/dist/components/eui-collapsible-nav-group.js +1 -1
- package/dist/components/eui-collapsible-nav-group.js.map +1 -1
- package/dist/components/eui-collapsible-nav.js +21 -22
- package/dist/components/eui-collapsible-nav.js.map +1 -1
- package/dist/components/eui-combo-box/create-option.js +9 -9
- package/dist/components/eui-combo-box/create-option.js.map +1 -1
- package/dist/components/eui-combo-box/group.js.map +1 -1
- package/dist/components/eui-combo-box/no-matches-message.js.map +1 -1
- package/dist/components/eui-combo-box/options.js +32 -16
- package/dist/components/eui-combo-box/options.js.map +1 -1
- package/dist/components/eui-combo-box/search-message.js.map +1 -1
- package/dist/components/eui-combo-box/trigger/input.js +20 -19
- package/dist/components/eui-combo-box/trigger/input.js.map +1 -1
- package/dist/components/eui-combo-box/trigger.js +2 -2
- package/dist/components/eui-combo-box/trigger.js.map +1 -1
- package/dist/components/eui-combo-box-pill.js +1 -1
- package/dist/components/eui-combo-box-pill.js.map +1 -1
- package/dist/components/eui-combo-box.js +58 -60
- package/dist/components/eui-combo-box.js.map +1 -1
- package/dist/components/eui-comment-list.js.map +1 -1
- package/dist/components/eui-comment-timeline.js +1 -1
- package/dist/components/eui-comment-timeline.js.map +1 -1
- package/dist/components/eui-comment.js +1 -1
- package/dist/components/eui-comment.js.map +1 -1
- package/dist/components/eui-confirm-modal.js.map +1 -1
- package/dist/components/eui-context-menu-item.js +4 -4
- package/dist/components/eui-context-menu-item.js.map +1 -1
- package/dist/components/eui-context-menu-panel.js.map +1 -1
- package/dist/components/eui-copy.js +3 -3
- package/dist/components/eui-copy.js.map +1 -1
- package/dist/components/eui-described-form-group.js.map +1 -1
- package/dist/components/eui-description-list-description.js.map +1 -1
- package/dist/components/eui-description-list-title.js.map +1 -1
- package/dist/components/eui-description-list.js.map +1 -1
- package/dist/components/eui-dual-range.js +110 -110
- package/dist/components/eui-dual-range.js.map +1 -1
- package/dist/components/eui-empty-prompt.js +1 -1
- package/dist/components/eui-empty-prompt.js.map +1 -1
- package/dist/components/eui-field-number.js +1 -1
- package/dist/components/eui-field-number.js.map +1 -1
- package/dist/components/eui-field-password.js +1 -1
- package/dist/components/eui-field-password.js.map +1 -1
- package/dist/components/eui-field-search.js +26 -26
- package/dist/components/eui-field-search.js.map +1 -1
- package/dist/components/eui-field-text.js +1 -1
- package/dist/components/eui-field-text.js.map +1 -1
- package/dist/components/eui-file-picker.js +16 -16
- package/dist/components/eui-file-picker.js.map +1 -1
- package/dist/components/eui-flex-grid.js.map +1 -1
- package/dist/components/eui-flex-group.js.map +1 -1
- package/dist/components/eui-flex-item.js.map +1 -1
- package/dist/components/eui-flyout-body.js.map +1 -1
- package/dist/components/eui-flyout-footer.js.map +1 -1
- package/dist/components/eui-flyout-header.js.map +1 -1
- package/dist/components/eui-flyout.js +35 -36
- package/dist/components/eui-flyout.js.map +1 -1
- package/dist/components/eui-form-control-layout-clear-button.js.map +1 -1
- package/dist/components/eui-form-control-layout-custom-icon.js.map +1 -1
- package/dist/components/eui-form-control-layout-delimited.js +1 -1
- package/dist/components/eui-form-control-layout-delimited.js.map +1 -1
- package/dist/components/eui-form-control-layout-icons.js +1 -1
- package/dist/components/eui-form-control-layout-icons.js.map +1 -1
- package/dist/components/eui-form-control-layout.js +1 -1
- package/dist/components/eui-form-control-layout.js.map +1 -1
- package/dist/components/eui-form-error-text.js.map +1 -1
- package/dist/components/eui-form-fieldset.js.map +1 -1
- package/dist/components/eui-form-help-text.js.map +1 -1
- package/dist/components/eui-form-label.js.map +1 -1
- package/dist/components/eui-form-legend.js.map +1 -1
- package/dist/components/eui-form-row.js +4 -4
- package/dist/components/eui-form-row.js.map +1 -1
- package/dist/components/eui-form.js +1 -1
- package/dist/components/eui-form.js.map +1 -1
- package/dist/components/eui-global-toast-list.js +43 -43
- package/dist/components/eui-global-toast-list.js.map +1 -1
- package/dist/components/eui-header-alert.js.map +1 -1
- package/dist/components/eui-header-breadcrumbs.js.map +1 -1
- package/dist/components/eui-header-link.js.map +1 -1
- package/dist/components/eui-header-links.js +1 -1
- package/dist/components/eui-header-links.js.map +1 -1
- package/dist/components/eui-header-logo.js.map +1 -1
- package/dist/components/eui-header-section-item-button.js +6 -6
- package/dist/components/eui-header-section-item-button.js.map +1 -1
- package/dist/components/eui-header-section-item.js.map +1 -1
- package/dist/components/eui-header-section.js.map +1 -1
- package/dist/components/eui-header.js +2 -2
- package/dist/components/eui-header.js.map +1 -1
- package/dist/components/eui-health.js.map +1 -1
- package/dist/components/eui-hide-for.js.map +1 -1
- package/dist/components/eui-horizontal-rule.js.map +1 -1
- package/dist/components/eui-i18n/render.js.map +1 -1
- package/dist/components/eui-i18n.js +3 -3
- package/dist/components/eui-i18n.js.map +1 -1
- package/dist/components/eui-icon-tip.js.map +1 -1
- package/dist/components/eui-icon.js +43 -37
- package/dist/components/eui-icon.js.map +1 -1
- package/dist/components/eui-image.js +8 -8
- package/dist/components/eui-image.js.map +1 -1
- package/dist/components/eui-inner-text.js +11 -11
- package/dist/components/eui-inner-text.js.map +1 -1
- package/dist/components/eui-input-popover.js +32 -32
- package/dist/components/eui-input-popover.js.map +1 -1
- package/dist/components/eui-key-pad-menu-item.js +3 -3
- package/dist/components/eui-key-pad-menu-item.js.map +1 -1
- package/dist/components/eui-key-pad-menu.js.map +1 -1
- package/dist/components/eui-link.js +1 -1
- package/dist/components/eui-link.js.map +1 -1
- package/dist/components/eui-list-group-item.js +4 -1
- package/dist/components/eui-list-group-item.js.map +1 -1
- package/dist/components/eui-list-group.js +1 -1
- package/dist/components/eui-list-group.js.map +1 -1
- package/dist/components/eui-loading-content.js +1 -1
- package/dist/components/eui-loading-content.js.map +1 -1
- package/dist/components/eui-loading-logo.js.map +1 -1
- package/dist/components/eui-loading-spinner.js.map +1 -1
- package/dist/components/eui-markdown-editor-drop-zone.js.map +1 -1
- package/dist/components/eui-markdown-editor-footer/icons/markdown-logo.js.map +1 -1
- package/dist/components/eui-markdown-editor-footer.js +3 -3
- package/dist/components/eui-markdown-editor-footer.js.map +1 -1
- package/dist/components/eui-markdown-editor-text-area.js.map +1 -1
- package/dist/components/eui-markdown-editor-toolbar/icons/markdown-checkmark.js.map +1 -1
- package/dist/components/eui-markdown-editor-toolbar.js +9 -11
- package/dist/components/eui-markdown-editor-toolbar.js.map +1 -1
- package/dist/components/eui-markdown-editor.js +115 -117
- package/dist/components/eui-markdown-editor.js.map +1 -1
- package/dist/components/eui-markdown-format/markdown-checkbox.js +7 -7
- package/dist/components/eui-markdown-format/markdown-checkbox.js.map +1 -1
- package/dist/components/eui-markdown-format/markdown-code-block.js.map +1 -1
- package/dist/components/eui-markdown-format/markdown-code.js.map +1 -1
- package/dist/components/eui-markdown-format/markdown-tooltip.js.map +1 -1
- package/dist/components/eui-markdown-format.js +14 -16
- package/dist/components/eui-markdown-format.js.map +1 -1
- package/dist/components/eui-modal-body.js.map +1 -1
- package/dist/components/eui-modal-footer.js.map +1 -1
- package/dist/components/eui-modal-header-title.js.map +1 -1
- package/dist/components/eui-modal-header.js.map +1 -1
- package/dist/components/eui-modal.js +1 -1
- package/dist/components/eui-modal.js.map +1 -1
- package/dist/components/eui-notification-badge.js.map +1 -1
- package/dist/components/eui-notification-event-messages.js.map +1 -1
- package/dist/components/eui-notification-event-meta.js +1 -1
- package/dist/components/eui-notification-event-meta.js.map +1 -1
- package/dist/components/eui-notification-event-read-button.js.map +1 -1
- package/dist/components/eui-notification-event-read-icon.js.map +1 -1
- package/dist/components/eui-notification-event.js +1 -1
- package/dist/components/eui-notification-event.js.map +1 -1
- package/dist/components/eui-overlay-mask.js +6 -6
- package/dist/components/eui-overlay-mask.js.map +1 -1
- package/dist/components/eui-page-body.js.map +1 -1
- package/dist/components/eui-page-content-body.js.map +1 -1
- package/dist/components/eui-page-content-header-section.js.map +1 -1
- package/dist/components/eui-page-content-header.js.map +1 -1
- package/dist/components/eui-page-content.js.map +1 -1
- package/dist/components/eui-page-header-content.js +4 -4
- package/dist/components/eui-page-header-content.js.map +1 -1
- package/dist/components/eui-page-header-section.js.map +1 -1
- package/dist/components/eui-page-header.js +1 -1
- package/dist/components/eui-page-header.js.map +1 -1
- package/dist/components/eui-page-side-bar.js.map +1 -1
- package/dist/components/eui-page-template.js +12 -12
- package/dist/components/eui-page-template.js.map +1 -1
- package/dist/components/eui-page.js.map +1 -1
- package/dist/components/eui-pagination/button-wrapper.js.map +1 -1
- package/dist/components/eui-pagination/next-button.js +1 -1
- package/dist/components/eui-pagination/next-button.js.map +1 -1
- package/dist/components/eui-pagination/previous-button.js +1 -1
- package/dist/components/eui-pagination/previous-button.js.map +1 -1
- package/dist/components/eui-pagination-button.js.map +1 -1
- package/dist/components/eui-pagination.js +39 -39
- package/dist/components/eui-pagination.js.map +1 -1
- package/dist/components/eui-panel.js +1 -1
- package/dist/components/eui-panel.js.map +1 -1
- package/dist/components/eui-popover-footer.js.map +1 -1
- package/dist/components/eui-popover-title.js.map +1 -1
- package/dist/components/eui-popover.js +126 -126
- package/dist/components/eui-popover.js.map +1 -1
- package/dist/components/eui-portal.js +8 -8
- package/dist/components/eui-portal.js.map +1 -1
- package/dist/components/eui-progress.js +1 -1
- package/dist/components/eui-progress.js.map +1 -1
- package/dist/components/eui-radio-group.js +2 -2
- package/dist/components/eui-radio-group.js.map +1 -1
- package/dist/components/eui-radio.js +1 -1
- package/dist/components/eui-radio.js.map +1 -1
- package/dist/components/eui-range-highlight.js.map +1 -1
- package/dist/components/eui-range-input.js +1 -1
- package/dist/components/eui-range-input.js.map +1 -1
- package/dist/components/eui-range-label.js.map +1 -1
- package/dist/components/eui-range-levels.js +7 -7
- package/dist/components/eui-range-levels.js.map +1 -1
- package/dist/components/eui-range-slider.js.map +1 -1
- package/dist/components/eui-range-thumb.js.map +1 -1
- package/dist/components/eui-range-ticks.js +6 -6
- package/dist/components/eui-range-ticks.js.map +1 -1
- package/dist/components/eui-range-tooltip.js +20 -20
- package/dist/components/eui-range-tooltip.js.map +1 -1
- package/dist/components/eui-range-track.js +49 -49
- package/dist/components/eui-range-track.js.map +1 -1
- package/dist/components/eui-range-wrapper.js.map +1 -1
- package/dist/components/eui-range.js +26 -26
- package/dist/components/eui-range.js.map +1 -1
- package/dist/components/eui-select.js +1 -1
- package/dist/components/eui-select.js.map +1 -1
- package/dist/components/eui-selectable-list-item.js +1 -1
- package/dist/components/eui-selectable-list-item.js.map +1 -1
- package/dist/components/eui-show-for.js +8 -8
- package/dist/components/eui-show-for.js.map +1 -1
- package/dist/components/eui-side-nav-item/button.js.map +1 -1
- package/dist/components/eui-side-nav-item.js +1 -1
- package/dist/components/eui-side-nav-item.js.map +1 -1
- package/dist/components/eui-side-nav.js +4 -4
- package/dist/components/eui-side-nav.js.map +1 -1
- package/dist/components/eui-spacer.js.map +1 -1
- package/dist/components/eui-split-panel/inner.js.map +1 -1
- package/dist/components/eui-split-panel/outer.js +1 -1
- package/dist/components/eui-split-panel/outer.js.map +1 -1
- package/dist/components/eui-stat/description.js +1 -0
- package/dist/components/eui-stat/description.js.map +1 -1
- package/dist/components/eui-stat/title.js.map +1 -1
- package/dist/components/eui-stat.js +5 -5
- package/dist/components/eui-stat.js.map +1 -1
- package/dist/components/eui-step-horizontal.js.map +1 -1
- package/dist/components/eui-step-number.js +1 -1
- package/dist/components/eui-step-number.js.map +1 -1
- package/dist/components/eui-step.js.map +1 -1
- package/dist/components/eui-steps-horizontal.js.map +1 -1
- package/dist/components/eui-steps.js.map +1 -1
- package/dist/components/eui-sub-steps.js.map +1 -1
- package/dist/components/eui-super-date-picker/date-popover/absolute-tab.js +27 -27
- package/dist/components/eui-super-date-picker/date-popover/absolute-tab.js.map +1 -1
- package/dist/components/eui-super-date-picker/date-popover/datetime-picker.js +73 -73
- package/dist/components/eui-super-date-picker/date-popover/datetime-picker.js.map +1 -1
- package/dist/components/eui-super-date-picker/date-popover/eui-date-popover-button.js +6 -6
- package/dist/components/eui-super-date-picker/date-popover/eui-date-popover-button.js.map +1 -1
- package/dist/components/eui-super-date-picker/date-popover/eui-date-popover-content.js +5 -5
- package/dist/components/eui-super-date-picker/date-popover/eui-date-popover-content.js.map +1 -1
- package/dist/components/eui-super-date-picker/date-popover/now-tab.js.map +1 -1
- package/dist/components/eui-super-date-picker/date-popover/relative-tab.js +27 -27
- package/dist/components/eui-super-date-picker/date-popover/relative-tab.js.map +1 -1
- package/dist/components/eui-super-date-picker/eui-date-picker-range.js.map +1 -1
- package/dist/components/eui-super-date-picker/eui-quick-select-popover/eui-commonly-used-time-ranges.js +1 -1
- package/dist/components/eui-super-date-picker/eui-quick-select-popover/eui-commonly-used-time-ranges.js.map +1 -1
- package/dist/components/eui-super-date-picker/eui-quick-select-popover/eui-quick-select.js +25 -25
- package/dist/components/eui-super-date-picker/eui-quick-select-popover/eui-quick-select.js.map +1 -1
- package/dist/components/eui-super-date-picker/eui-quick-select-popover/eui-recently-used.js +1 -1
- package/dist/components/eui-super-date-picker/eui-quick-select-popover/eui-recently-used.js.map +1 -1
- package/dist/components/eui-super-date-picker/eui-quick-select-popover.js +9 -9
- package/dist/components/eui-super-date-picker/eui-quick-select-popover.js.map +1 -1
- package/dist/components/eui-super-date-picker/eui-super-update-button.js.map +1 -1
- package/dist/components/eui-super-date-picker/utils/date-utils.js.map +1 -1
- package/dist/components/eui-super-date-picker/utils/index.js.map +1 -1
- package/dist/components/eui-super-date-picker/utils/pretty-duration.js.map +1 -1
- package/dist/components/eui-super-date-picker/utils/quick-select.js +1 -1
- package/dist/components/eui-super-date-picker/utils/quick-select.js.map +1 -1
- package/dist/components/eui-super-date-picker/utils/time-options.js.map +1 -1
- package/dist/components/eui-super-date-picker.js +34 -34
- package/dist/components/eui-super-date-picker.js.map +1 -1
- package/dist/components/eui-switch.js +4 -4
- package/dist/components/eui-switch.js.map +1 -1
- package/dist/components/eui-tab.js +1 -1
- package/dist/components/eui-tab.js.map +1 -1
- package/dist/components/eui-tabbed-content.js +31 -31
- package/dist/components/eui-tabbed-content.js.map +1 -1
- package/dist/components/eui-tabs.js.map +1 -1
- package/dist/components/eui-text-align.js.map +1 -1
- package/dist/components/eui-text-area.js.map +1 -1
- package/dist/components/eui-text-color.js.map +1 -1
- package/dist/components/eui-text.js +1 -1
- package/dist/components/eui-text.js.map +1 -1
- package/dist/components/eui-title.js.map +1 -1
- package/dist/components/eui-toast.js.map +1 -1
- package/dist/components/eui-tool-tip-popover.js +5 -5
- package/dist/components/eui-tool-tip-popover.js.map +1 -1
- package/dist/components/eui-tool-tip.js +44 -46
- package/dist/components/eui-tool-tip.js.map +1 -1
- package/dist/components/text-block.js.map +1 -1
- package/dist/helpers/arg-or-default.js.map +1 -1
- package/dist/helpers/cast-to.js.map +1 -1
- package/dist/helpers/class-names.js.map +1 -1
- package/dist/helpers/eui-page-restrict-width.js.map +1 -1
- package/dist/helpers/eui-palette.js +1 -1
- package/dist/helpers/eui-palette.js.map +1 -1
- package/dist/helpers/get-eui-config.js +1 -1
- package/dist/helpers/get-eui-config.js.map +1 -1
- package/dist/helpers/get-range-tick.js.map +1 -1
- package/dist/helpers/hex-to-rgb.js.map +1 -1
- package/dist/helpers/inline-styles.js.map +1 -1
- package/dist/helpers/is-color-dark.js.map +1 -1
- package/dist/helpers/is-item-open.js.map +1 -1
- package/dist/helpers/is-valid-hex.js.map +1 -1
- package/dist/helpers/is-within-number.js.map +1 -1
- package/dist/helpers/merge.js.map +1 -1
- package/dist/helpers/nullish.js.map +1 -1
- package/dist/helpers/starts-with.js.map +1 -1
- package/dist/helpers/to-initials.js.map +1 -1
- package/dist/helpers/type-of.js.map +1 -1
- package/dist/helpers/use-state.js +1 -1
- package/dist/helpers/use-state.js.map +1 -1
- package/dist/i18n/util.js.map +1 -1
- package/dist/modifiers/mutation-observer.js.map +1 -1
- package/dist/modifiers/outside-click-detector.js +4 -0
- package/dist/modifiers/outside-click-detector.js.map +1 -1
- package/dist/modifiers/resize-observer.js +3 -0
- package/dist/modifiers/resize-observer.js.map +1 -1
- package/dist/modifiers/screen-reader-only.js.map +1 -1
- package/dist/modifiers/simple-style.js.map +1 -1
- package/dist/modifiers/use-is-within-breakpoints.js.map +1 -1
- package/dist/modifiers/validatable-control.js.map +1 -1
- package/dist/services/eui-config.js +1 -1
- package/dist/services/eui-config.js.map +1 -1
- package/dist/services/eui-i18n.js.map +1 -1
- package/dist/services/eui-toaster.js +1 -1
- package/dist/services/eui-toaster.js.map +1 -1
- package/dist/utils/accesibility/accessible-click-keys.js +1 -1
- package/dist/utils/accesibility/accessible-click-keys.js.map +1 -1
- package/dist/utils/accesibility/cascading-menu-keys.js +1 -1
- package/dist/utils/accesibility/cascading-menu-keys.js.map +1 -1
- package/dist/utils/accesibility/combo-box-keys.js +1 -1
- package/dist/utils/accesibility/combo-box-keys.js.map +1 -1
- package/dist/utils/breakpoint.js.map +1 -1
- package/dist/utils/browser/browser.js.map +1 -1
- package/dist/utils/code/utils.js.map +1 -1
- package/dist/utils/color/color_palette.js.map +1 -1
- package/dist/utils/color/eui_palettes.js.map +1 -1
- package/dist/utils/copy-to-clipboard.js.map +1 -1
- package/dist/utils/css-mappings/eui-accordion.js.map +1 -1
- package/dist/utils/css-mappings/eui-avatar.js +1 -1
- package/dist/utils/css-mappings/eui-avatar.js.map +1 -1
- package/dist/utils/css-mappings/eui-badge-group.js.map +1 -1
- package/dist/utils/css-mappings/eui-badge.js.map +1 -1
- package/dist/utils/css-mappings/eui-beta-badge.js.map +1 -1
- package/dist/utils/css-mappings/eui-bottom-bar.js.map +1 -1
- package/dist/utils/css-mappings/eui-button-empty.js.map +1 -1
- package/dist/utils/css-mappings/eui-button-group-button.js.map +1 -1
- package/dist/utils/css-mappings/eui-button-group.js.map +1 -1
- package/dist/utils/css-mappings/eui-button-icon.js.map +1 -1
- package/dist/utils/css-mappings/eui-button.js.map +1 -1
- package/dist/utils/css-mappings/eui-call-out.js.map +1 -1
- package/dist/utils/css-mappings/eui-card-select.js.map +1 -1
- package/dist/utils/css-mappings/eui-card.js.map +1 -1
- package/dist/utils/css-mappings/eui-code-block.js.map +1 -1
- package/dist/utils/css-mappings/eui-collapsible-nav-group.js.map +1 -1
- package/dist/utils/css-mappings/eui-comment-event.js.map +1 -1
- package/dist/utils/css-mappings/eui-comment-timeline-icon.js.map +1 -1
- package/dist/utils/css-mappings/eui-context-menu-item.js.map +1 -1
- package/dist/utils/css-mappings/eui-described-form-group.js.map +1 -1
- package/dist/utils/css-mappings/eui-description-list.js.map +1 -1
- package/dist/utils/css-mappings/eui-empty-prompt.js.map +1 -1
- package/dist/utils/css-mappings/eui-file-picker.js.map +1 -1
- package/dist/utils/css-mappings/eui-flex-grid.js.map +1 -1
- package/dist/utils/css-mappings/eui-flex-group.js.map +1 -1
- package/dist/utils/css-mappings/eui-flex-item.js.map +1 -1
- package/dist/utils/css-mappings/eui-flyout.js.map +1 -1
- package/dist/utils/css-mappings/eui-form-control-layout-clear-button.js.map +1 -1
- package/dist/utils/css-mappings/eui-form-row.js.map +1 -1
- package/dist/utils/css-mappings/eui-global-toast-list.js.map +1 -1
- package/dist/utils/css-mappings/eui-header-links.js.map +1 -1
- package/dist/utils/css-mappings/eui-header-section-item.js.map +1 -1
- package/dist/utils/css-mappings/eui-header-section.js.map +1 -1
- package/dist/utils/css-mappings/eui-header.js.map +1 -1
- package/dist/utils/css-mappings/eui-health.js.map +1 -1
- package/dist/utils/css-mappings/eui-horizontal-rule.js.map +1 -1
- package/dist/utils/css-mappings/eui-icon.js.map +1 -1
- package/dist/utils/css-mappings/eui-image.js.map +1 -1
- package/dist/utils/css-mappings/eui-link.js.map +1 -1
- package/dist/utils/css-mappings/eui-list-group-item.js.map +1 -1
- package/dist/utils/css-mappings/eui-list-group.js.map +1 -1
- package/dist/utils/css-mappings/eui-loading-spinner.js.map +1 -1
- package/dist/utils/css-mappings/eui-modal.js.map +1 -1
- package/dist/utils/css-mappings/eui-notification-badge.js.map +1 -1
- package/dist/utils/css-mappings/eui-page-body.js.map +1 -1
- package/dist/utils/css-mappings/eui-page-content-body.js.map +1 -1
- package/dist/utils/css-mappings/eui-page-content.js.map +1 -1
- package/dist/utils/css-mappings/eui-page-header.js.map +1 -1
- package/dist/utils/css-mappings/eui-page-side-bar.js.map +1 -1
- package/dist/utils/css-mappings/eui-page.js.map +1 -1
- package/dist/utils/css-mappings/eui-panel.js.map +1 -1
- package/dist/utils/css-mappings/eui-popover-footer.js.map +1 -1
- package/dist/utils/css-mappings/eui-popover-title.js.map +1 -1
- package/dist/utils/css-mappings/eui-popover.js.map +1 -1
- package/dist/utils/css-mappings/eui-progress-data.js.map +1 -1
- package/dist/utils/css-mappings/eui-progress.js.map +1 -1
- package/dist/utils/css-mappings/eui-range-highlight.js.map +1 -1
- package/dist/utils/css-mappings/eui-range-input.js.map +1 -1
- package/dist/utils/css-mappings/eui-range-levels.js.map +1 -1
- package/dist/utils/css-mappings/eui-selectable-list-item.js.map +1 -1
- package/dist/utils/css-mappings/eui-spacer.js.map +1 -1
- package/dist/utils/css-mappings/eui-stat.js.map +1 -1
- package/dist/utils/css-mappings/eui-step-number.js.map +1 -1
- package/dist/utils/css-mappings/eui-tabs.js.map +1 -1
- package/dist/utils/css-mappings/eui-text-align.js.map +1 -1
- package/dist/utils/css-mappings/eui-text-area.js.map +1 -1
- package/dist/utils/css-mappings/eui-text-color.js.map +1 -1
- package/dist/utils/css-mappings/eui-text.js.map +1 -1
- package/dist/utils/css-mappings/eui-title.js.map +1 -1
- package/dist/utils/css-mappings/eui-toast.js.map +1 -1
- package/dist/utils/css-mappings/eui-tool-tip.js.map +1 -1
- package/dist/utils/css-mappings/index.js +140 -140
- package/dist/utils/css-mappings/index.js.map +1 -1
- package/dist/utils/detect-element-resize.js.map +1 -1
- package/dist/utils/keys.js.map +1 -1
- package/dist/utils/markdown/markdown-actions.js +1 -0
- package/dist/utils/markdown/markdown-actions.js.map +1 -1
- package/dist/utils/markdown/markdown-modes.js.map +1 -1
- package/dist/utils/markdown/markdown-types.js.map +1 -1
- package/dist/utils/markdown/plugins/markdown-add-components/processor.js.map +1 -1
- package/dist/utils/markdown/plugins/markdown-checkbox/parser.js.map +1 -1
- package/dist/utils/markdown/plugins/markdown-default-plugins/parsing-plugins.js.map +1 -1
- package/dist/utils/markdown/plugins/markdown-default-plugins/plugins.js.map +1 -1
- package/dist/utils/markdown/plugins/markdown-default-plugins/processing-plugins.js.map +1 -1
- package/dist/utils/markdown/plugins/markdown-default-plugins/ui-plugins.js.map +1 -1
- package/dist/utils/markdown/plugins/markdown-tooltip/parser.js.map +1 -1
- package/dist/utils/markdown/plugins/markdown-tooltip/plugin.js.map +1 -1
- package/dist/utils/markdown/plugins/to-dom.js.map +1 -1
- package/dist/utils/markdown/remark/remark-prismjs.js.map +1 -1
- package/dist/utils/maybe-unwrap-proxy.js.map +1 -1
- package/dist/utils/number/number.js.map +1 -1
- package/dist/utils/popover/index.js +1 -4
- package/dist/utils/popover/index.js.map +1 -1
- package/dist/utils/predicate/common_predicates.js.map +1 -1
- package/dist/utils/predicate/lodash_predicates.js.map +1 -1
- package/dist/utils/timer.js +4 -1
- package/dist/utils/timer.js.map +1 -1
- package/dist/utils/transition.js.map +1 -1
- package/package.json +63 -46
- package/declarations/modifiers/open-collapsible-nav.d.ts +0 -9
- package/declarations/modifiers/open-collapsible-nav.d.ts.map +0 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { macroCondition, dependencySatisfies, importSync } from '@embroider/macros';
|
|
2
1
|
import Component from '@glimmer/component';
|
|
3
|
-
import { tracked } from '@glimmer/tracking';
|
|
2
|
+
import { tracked, cached } from '@glimmer/tracking';
|
|
4
3
|
import { hash } from '@ember/helper';
|
|
5
4
|
import { on } from '@ember/modifier';
|
|
6
5
|
import { action } from '@ember/object';
|
|
@@ -27,149 +26,148 @@ import './eui-markdown-format/markdown-tooltip.js';
|
|
|
27
26
|
import { tooltipPlugin } from '../utils/markdown/plugins/markdown-tooltip/plugin.js';
|
|
28
27
|
import EuiMarkdownEditorDropZone from './eui-markdown-editor-drop-zone.js';
|
|
29
28
|
import EuiMarkdownEditorTextArea from './eui-markdown-editor-text-area.js';
|
|
30
|
-
import EuiMarkdownEditorToolbarComponent from './eui-markdown-editor-toolbar.js';
|
|
31
|
-
import EuiMarkdownEditorToolbarComponent
|
|
29
|
+
import EuiMarkdownEditorToolbarComponent$1 from './eui-markdown-editor-toolbar.js';
|
|
30
|
+
import EuiMarkdownEditorToolbarComponent from './eui-markdown-format.js';
|
|
32
31
|
import EuiModal from './eui-modal.js';
|
|
33
32
|
import { precompileTemplate } from '@ember/template-compilation';
|
|
34
33
|
import { setComponentTemplate } from '@ember/component';
|
|
35
34
|
import { g, i, n } from 'decorator-transforms/runtime';
|
|
36
35
|
|
|
37
|
-
|
|
38
|
-
const getCursorNode = (textareaRef1, parsed1) => {
|
|
36
|
+
const getCursorNode = (textareaRef, parsed) => {
|
|
39
37
|
const {
|
|
40
|
-
selectionStart
|
|
41
|
-
} =
|
|
42
|
-
let
|
|
38
|
+
selectionStart
|
|
39
|
+
} = textareaRef;
|
|
40
|
+
let node = parsed.result ?? parsed.contents;
|
|
43
41
|
//eslint-disable-next-line
|
|
44
42
|
outer: while (true) {
|
|
45
|
-
if (
|
|
46
|
-
for (let
|
|
47
|
-
const
|
|
48
|
-
if (
|
|
49
|
-
if (
|
|
50
|
-
|
|
43
|
+
if (node.children) {
|
|
44
|
+
for (let i = 0; i < node.children.length; i++) {
|
|
45
|
+
const child = node.children[i];
|
|
46
|
+
if (child && child.position.start.offset < selectionStart && selectionStart < child.position.end.offset) {
|
|
47
|
+
if (child.type === 'text') break outer; // don't dive into `text` nodes
|
|
48
|
+
node = child;
|
|
51
49
|
continue outer;
|
|
52
50
|
}
|
|
53
51
|
}
|
|
54
52
|
}
|
|
55
53
|
break;
|
|
56
54
|
}
|
|
57
|
-
return
|
|
55
|
+
return node;
|
|
58
56
|
};
|
|
59
|
-
function wrapper(
|
|
60
|
-
const
|
|
61
|
-
|
|
57
|
+
function wrapper(textarea, parsed, callback) {
|
|
58
|
+
const node = getCursorNode(textarea, parsed);
|
|
59
|
+
callback(node);
|
|
62
60
|
}
|
|
63
|
-
const getCursorNodeModifier = modifier(function
|
|
61
|
+
const getCursorNodeModifier = modifier(function getCursorNodeModifier(textarea, [parsed, onSelectedNode]) {
|
|
64
62
|
//@ts-expect-error
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
const fn = wrapper.bind(null, textarea, parsed, onSelectedNode);
|
|
64
|
+
textarea.addEventListener('keyup', fn);
|
|
65
|
+
textarea.addEventListener('mouseup', fn);
|
|
68
66
|
return () => {
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
textarea.removeEventListener('keyup', fn);
|
|
68
|
+
textarea.removeEventListener('mouseup', fn);
|
|
71
69
|
};
|
|
72
70
|
});
|
|
73
|
-
function isNewLine(
|
|
74
|
-
if (
|
|
75
|
-
return !!
|
|
71
|
+
function isNewLine(char) {
|
|
72
|
+
if (char == null) return true;
|
|
73
|
+
return !!char.match(/[\r\n]/);
|
|
76
74
|
}
|
|
77
|
-
function padWithNewlinesIfNeeded(
|
|
78
|
-
const
|
|
79
|
-
const
|
|
75
|
+
function padWithNewlinesIfNeeded(textarea, text) {
|
|
76
|
+
const selectionStart = textarea.selectionStart;
|
|
77
|
+
const selectionEnd = textarea.selectionEnd;
|
|
80
78
|
// block parsing requires two leading new lines and none trailing, but we add an extra trailing line for readability
|
|
81
|
-
const
|
|
82
|
-
const
|
|
83
|
-
const
|
|
79
|
+
const isPrevNewLine = isNewLine(textarea.value[selectionStart - 1]);
|
|
80
|
+
const isPrevPrevNewLine = isNewLine(textarea.value[selectionStart - 2]);
|
|
81
|
+
const isNextNewLine = isNewLine(textarea.value[selectionEnd]);
|
|
84
82
|
// pad text with newlines as needed
|
|
85
|
-
|
|
86
|
-
return
|
|
83
|
+
text = `${isPrevNewLine ? '' : '\n'}${isPrevPrevNewLine ? '' : '\n'}${text}${isNextNewLine ? '' : '\n'}`;
|
|
84
|
+
return text;
|
|
87
85
|
}
|
|
88
86
|
class EuiMarkdownEditorComponent extends Component {
|
|
89
87
|
static {
|
|
90
88
|
g(this.prototype, "pluginEditorPlugin", [tracked]);
|
|
91
89
|
}
|
|
92
|
-
#pluginEditorPlugin = (i(this, "pluginEditorPlugin"),
|
|
90
|
+
#pluginEditorPlugin = (i(this, "pluginEditorPlugin"), undefined);
|
|
93
91
|
static {
|
|
94
92
|
g(this.prototype, "parsingPluginList", [argOrDefaultDecorator(defaultParsingPlugins)]);
|
|
95
93
|
}
|
|
96
|
-
#parsingPluginList = (i(this, "parsingPluginList"),
|
|
94
|
+
#parsingPluginList = (i(this, "parsingPluginList"), undefined); // Defaults
|
|
97
95
|
static {
|
|
98
96
|
g(this.prototype, "height", [argOrDefaultDecorator(250)]);
|
|
99
97
|
}
|
|
100
|
-
#height = (i(this, "height"),
|
|
98
|
+
#height = (i(this, "height"), undefined);
|
|
101
99
|
static {
|
|
102
100
|
g(this.prototype, "maxHeight", [argOrDefaultDecorator(500)]);
|
|
103
101
|
}
|
|
104
|
-
#maxHeight = (i(this, "maxHeight"),
|
|
102
|
+
#maxHeight = (i(this, "maxHeight"), undefined);
|
|
105
103
|
static {
|
|
106
104
|
g(this.prototype, "autoExpandPreview", [argOrDefaultDecorator(true)]);
|
|
107
105
|
}
|
|
108
|
-
#autoExpandPreview = (i(this, "autoExpandPreview"),
|
|
106
|
+
#autoExpandPreview = (i(this, "autoExpandPreview"), undefined);
|
|
109
107
|
static {
|
|
110
108
|
g(this.prototype, "processingPluginList", [argOrDefaultDecorator(defaultProcessingPlugins)]);
|
|
111
109
|
}
|
|
112
|
-
#processingPluginList = (i(this, "processingPluginList"),
|
|
110
|
+
#processingPluginList = (i(this, "processingPluginList"), undefined);
|
|
113
111
|
static {
|
|
114
112
|
g(this.prototype, "selectedNode", [tracked], function () {
|
|
115
113
|
return null;
|
|
116
114
|
});
|
|
117
115
|
}
|
|
118
|
-
#selectedNode = (i(this, "selectedNode"),
|
|
116
|
+
#selectedNode = (i(this, "selectedNode"), undefined);
|
|
119
117
|
static {
|
|
120
118
|
g(this.prototype, "editorId", [tracked], function () {
|
|
121
119
|
return this.args.editorId ?? guidFor({});
|
|
122
120
|
});
|
|
123
121
|
}
|
|
124
|
-
#editorId = (i(this, "editorId"),
|
|
122
|
+
#editorId = (i(this, "editorId"), undefined);
|
|
125
123
|
static {
|
|
126
124
|
g(this.prototype, "viewMode", [tracked], function () {
|
|
127
125
|
return this.args.initialViewMode || MODE_EDITING;
|
|
128
126
|
});
|
|
129
127
|
}
|
|
130
|
-
#viewMode = (i(this, "viewMode"),
|
|
128
|
+
#viewMode = (i(this, "viewMode"), undefined);
|
|
131
129
|
static {
|
|
132
130
|
g(this.prototype, "textareaRef", [tracked], function () {
|
|
133
131
|
return null;
|
|
134
132
|
});
|
|
135
133
|
}
|
|
136
|
-
#textareaRef = (i(this, "textareaRef"),
|
|
134
|
+
#textareaRef = (i(this, "textareaRef"), undefined);
|
|
137
135
|
static {
|
|
138
136
|
g(this.prototype, "previewRef", [tracked], function () {
|
|
139
137
|
return null;
|
|
140
138
|
});
|
|
141
139
|
}
|
|
142
|
-
#previewRef = (i(this, "previewRef"),
|
|
140
|
+
#previewRef = (i(this, "previewRef"), undefined);
|
|
143
141
|
static {
|
|
144
142
|
g(this.prototype, "editorToolbarRef", [tracked], function () {
|
|
145
143
|
return null;
|
|
146
144
|
});
|
|
147
145
|
}
|
|
148
|
-
#editorToolbarRef = (i(this, "editorToolbarRef"),
|
|
146
|
+
#editorToolbarRef = (i(this, "editorToolbarRef"), undefined);
|
|
149
147
|
static {
|
|
150
148
|
g(this.prototype, "currentHeight", [tracked], function () {
|
|
151
149
|
return 250;
|
|
152
150
|
});
|
|
153
151
|
}
|
|
154
|
-
#currentHeight = (i(this, "currentHeight"),
|
|
152
|
+
#currentHeight = (i(this, "currentHeight"), undefined);
|
|
155
153
|
static {
|
|
156
154
|
g(this.prototype, "editorFooterHeight", [tracked], function () {
|
|
157
155
|
return 0;
|
|
158
156
|
});
|
|
159
157
|
}
|
|
160
|
-
#editorFooterHeight = (i(this, "editorFooterHeight"),
|
|
158
|
+
#editorFooterHeight = (i(this, "editorFooterHeight"), undefined);
|
|
161
159
|
static {
|
|
162
160
|
g(this.prototype, "editorToolbarHeight", [tracked], function () {
|
|
163
161
|
return 0;
|
|
164
162
|
});
|
|
165
163
|
}
|
|
166
|
-
#editorToolbarHeight = (i(this, "editorToolbarHeight"),
|
|
164
|
+
#editorToolbarHeight = (i(this, "editorToolbarHeight"), undefined);
|
|
167
165
|
markdownActions;
|
|
168
166
|
get toolbarPlugins() {
|
|
169
167
|
return [tooltipPlugin, ...(this.args.uiPlugins || [])];
|
|
170
168
|
}
|
|
171
|
-
constructor(
|
|
172
|
-
super(
|
|
169
|
+
constructor(owner, args) {
|
|
170
|
+
super(owner, args);
|
|
173
171
|
this.markdownActions = new MarkdownActions(this.editorId, this.toolbarPlugins);
|
|
174
172
|
this.currentHeight = this.height;
|
|
175
173
|
}
|
|
@@ -190,11 +188,11 @@ class EuiMarkdownEditorComponent extends Component {
|
|
|
190
188
|
}
|
|
191
189
|
onResize() {
|
|
192
190
|
if (this.textareaRef && this.isEditing && this.height !== 'full') {
|
|
193
|
-
const
|
|
194
|
-
const
|
|
195
|
-
this.currentHeight =
|
|
191
|
+
const resizedTextareaHeight = this.textareaRef.offsetHeight + this.editorFooterHeight;
|
|
192
|
+
const update = () => {
|
|
193
|
+
this.currentHeight = resizedTextareaHeight;
|
|
196
194
|
};
|
|
197
|
-
scheduleOnce('afterRender', this,
|
|
195
|
+
scheduleOnce('afterRender', this, update);
|
|
198
196
|
}
|
|
199
197
|
}
|
|
200
198
|
static {
|
|
@@ -202,30 +200,30 @@ class EuiMarkdownEditorComponent extends Component {
|
|
|
202
200
|
}
|
|
203
201
|
updateCurrentHeight() {
|
|
204
202
|
let {
|
|
205
|
-
isPreviewing
|
|
206
|
-
autoExpandPreview
|
|
207
|
-
height
|
|
208
|
-
previewRef
|
|
209
|
-
currentHeight
|
|
203
|
+
isPreviewing,
|
|
204
|
+
autoExpandPreview,
|
|
205
|
+
height,
|
|
206
|
+
previewRef,
|
|
207
|
+
currentHeight
|
|
210
208
|
} = this;
|
|
211
|
-
if (
|
|
209
|
+
if (isPreviewing && autoExpandPreview && height !== 'full' && previewRef) {
|
|
212
210
|
//@ts-ignore
|
|
213
|
-
if (
|
|
211
|
+
if (previewRef.scrollHeight > currentHeight) {
|
|
214
212
|
// scrollHeight does not include the border or margin
|
|
215
213
|
// so we ask for the computed value for those,
|
|
216
214
|
// which is always in pixels because getComputedValue
|
|
217
215
|
// returns the resolved values
|
|
218
|
-
const
|
|
219
|
-
const
|
|
220
|
-
const
|
|
216
|
+
const elementComputedStyle = window.getComputedStyle(previewRef);
|
|
217
|
+
const borderWidth = parseFloat(elementComputedStyle.borderTopWidth) + parseFloat(elementComputedStyle.borderBottomWidth);
|
|
218
|
+
const marginWidth = parseFloat(elementComputedStyle.marginTop) + parseFloat(elementComputedStyle.marginBottom);
|
|
221
219
|
// then add an extra pixel for safety and because the scrollHeight value is rounded
|
|
222
|
-
const
|
|
223
|
-
const
|
|
224
|
-
if (
|
|
225
|
-
this.currentHeight =
|
|
220
|
+
const extraHeight = borderWidth + marginWidth + 1;
|
|
221
|
+
const update = () => {
|
|
222
|
+
if (previewRef) {
|
|
223
|
+
this.currentHeight = previewRef.scrollHeight + extraHeight;
|
|
226
224
|
}
|
|
227
225
|
};
|
|
228
|
-
scheduleOnce('afterRender', this,
|
|
226
|
+
scheduleOnce('afterRender', this, update);
|
|
229
227
|
}
|
|
230
228
|
}
|
|
231
229
|
}
|
|
@@ -233,24 +231,24 @@ class EuiMarkdownEditorComponent extends Component {
|
|
|
233
231
|
n(this.prototype, "updateCurrentHeight", [action]);
|
|
234
232
|
}
|
|
235
233
|
getCursorNode = () => {};
|
|
236
|
-
setTextAreaRef(
|
|
237
|
-
this.textareaRef =
|
|
234
|
+
setTextAreaRef(ref) {
|
|
235
|
+
this.textareaRef = ref;
|
|
238
236
|
}
|
|
239
237
|
static {
|
|
240
238
|
n(this.prototype, "setTextAreaRef", [action]);
|
|
241
239
|
}
|
|
242
|
-
setEditorToolbarRef(
|
|
243
|
-
this.editorToolbarRef =
|
|
244
|
-
this.editorToolbarHeight =
|
|
240
|
+
setEditorToolbarRef(ref) {
|
|
241
|
+
this.editorToolbarRef = ref;
|
|
242
|
+
this.editorToolbarHeight = ref.offsetHeight;
|
|
245
243
|
}
|
|
246
244
|
static {
|
|
247
245
|
n(this.prototype, "setEditorToolbarRef", [action]);
|
|
248
246
|
}
|
|
249
|
-
replaceNode(
|
|
250
|
-
let
|
|
251
|
-
const
|
|
252
|
-
const
|
|
253
|
-
this.args.onChange?.(`${
|
|
247
|
+
replaceNode(position, next) {
|
|
248
|
+
let value = this.args.value;
|
|
249
|
+
const leading = value.substr(0, position.start.offset);
|
|
250
|
+
const trailing = value.substr(position.end.offset);
|
|
251
|
+
this.args.onChange?.(`${leading}${next}${trailing}`);
|
|
254
252
|
}
|
|
255
253
|
static {
|
|
256
254
|
n(this.prototype, "replaceNode", [action]);
|
|
@@ -268,24 +266,24 @@ class EuiMarkdownEditorComponent extends Component {
|
|
|
268
266
|
n(this.prototype, "setViewMode", [action]);
|
|
269
267
|
}
|
|
270
268
|
get parser() {
|
|
271
|
-
const
|
|
272
|
-
return
|
|
269
|
+
const Compiler = tree => {
|
|
270
|
+
return tree;
|
|
273
271
|
};
|
|
274
|
-
function
|
|
272
|
+
function identityCompiler() {
|
|
275
273
|
//eslint-disable-next-line
|
|
276
|
-
this.Compiler =
|
|
274
|
+
this.Compiler = Compiler;
|
|
277
275
|
}
|
|
278
|
-
return unified().use(this.parsingPluginList).use(
|
|
276
|
+
return unified().use(this.parsingPluginList).use(identityCompiler);
|
|
279
277
|
}
|
|
280
278
|
static {
|
|
281
279
|
n(this.prototype, "parser", [cached]);
|
|
282
280
|
}
|
|
283
281
|
get parsed() {
|
|
284
282
|
try {
|
|
285
|
-
const
|
|
286
|
-
return [
|
|
287
|
-
} catch (
|
|
288
|
-
return [null,
|
|
283
|
+
const parsed = this.parser.processSync(this.args.value);
|
|
284
|
+
return [parsed, null];
|
|
285
|
+
} catch (e) {
|
|
286
|
+
return [null, e];
|
|
289
287
|
}
|
|
290
288
|
}
|
|
291
289
|
static {
|
|
@@ -296,53 +294,53 @@ class EuiMarkdownEditorComponent extends Component {
|
|
|
296
294
|
}
|
|
297
295
|
onParse() {
|
|
298
296
|
if (this.args.onParse) {
|
|
299
|
-
const [
|
|
300
|
-
const
|
|
301
|
-
const
|
|
302
|
-
const
|
|
303
|
-
|
|
304
|
-
messages
|
|
305
|
-
ast
|
|
297
|
+
const [parsed, parseError] = this.parsed;
|
|
298
|
+
const onParse = this.args.onParse;
|
|
299
|
+
const messages = parsed ? parsed.messages : [];
|
|
300
|
+
const ast = parsed ? parsed['result'] ?? parsed.contents : null;
|
|
301
|
+
onParse(parseError, {
|
|
302
|
+
messages,
|
|
303
|
+
ast
|
|
306
304
|
});
|
|
307
305
|
}
|
|
308
306
|
}
|
|
309
307
|
static {
|
|
310
308
|
n(this.prototype, "onParse", [action]);
|
|
311
309
|
}
|
|
312
|
-
setSelectedNode(
|
|
313
|
-
this.selectedNode =
|
|
310
|
+
setSelectedNode(node) {
|
|
311
|
+
this.selectedNode = node;
|
|
314
312
|
}
|
|
315
313
|
static {
|
|
316
314
|
n(this.prototype, "setSelectedNode", [action]);
|
|
317
315
|
}
|
|
318
|
-
openPluginEditor =
|
|
319
|
-
this.pluginEditorPlugin =
|
|
316
|
+
openPluginEditor = plugin => {
|
|
317
|
+
this.pluginEditorPlugin = plugin;
|
|
320
318
|
};
|
|
321
|
-
onEditorPluginSave = (
|
|
319
|
+
onEditorPluginSave = (markdown, config) => {
|
|
322
320
|
let {
|
|
323
|
-
selectedNode
|
|
324
|
-
textareaRef
|
|
321
|
+
selectedNode,
|
|
322
|
+
textareaRef
|
|
325
323
|
} = this;
|
|
326
|
-
if (this.pluginEditorPlugin &&
|
|
324
|
+
if (this.pluginEditorPlugin && selectedNode &&
|
|
327
325
|
// @ts-expect-error
|
|
328
|
-
|
|
326
|
+
selectedNode.type === this.pluginEditorPlugin.name &&
|
|
329
327
|
// @ts-expect-error
|
|
330
|
-
|
|
328
|
+
selectedNode.position) {
|
|
331
329
|
// modifying an existing node
|
|
332
|
-
|
|
330
|
+
textareaRef.setSelectionRange(
|
|
333
331
|
// @ts-expect-error
|
|
334
|
-
|
|
332
|
+
selectedNode.position.start.offset,
|
|
335
333
|
// @ts-expect-error
|
|
336
|
-
|
|
334
|
+
selectedNode.position.end.offset);
|
|
337
335
|
} else {
|
|
338
336
|
// creating a new node
|
|
339
|
-
if (
|
|
337
|
+
if (config.block) {
|
|
340
338
|
// inject newlines if needed
|
|
341
|
-
|
|
339
|
+
markdown = padWithNewlinesIfNeeded(textareaRef, markdown);
|
|
342
340
|
}
|
|
343
341
|
}
|
|
344
|
-
insertText(
|
|
345
|
-
text:
|
|
342
|
+
insertText(textareaRef, {
|
|
343
|
+
text: markdown,
|
|
346
344
|
selectionStart: undefined,
|
|
347
345
|
selectionEnd: undefined
|
|
348
346
|
});
|
|
@@ -355,12 +353,12 @@ class EuiMarkdownEditorComponent extends Component {
|
|
|
355
353
|
classNames,
|
|
356
354
|
eq,
|
|
357
355
|
didUpdate,
|
|
358
|
-
EuiMarkdownEditorToolbar: EuiMarkdownEditorToolbarComponent,
|
|
356
|
+
EuiMarkdownEditorToolbar: EuiMarkdownEditorToolbarComponent$1,
|
|
359
357
|
didInsert,
|
|
360
358
|
set,
|
|
361
359
|
style,
|
|
362
360
|
hash,
|
|
363
|
-
EuiMarkdownFormat: EuiMarkdownEditorToolbarComponent
|
|
361
|
+
EuiMarkdownFormat: EuiMarkdownEditorToolbarComponent,
|
|
364
362
|
EuiMarkdownEditorDropZone,
|
|
365
363
|
resizeObserver: ResizeObserver,
|
|
366
364
|
EuiMarkdownEditorTextArea,
|