UNPKG

@atlaskit/editor-plugin-status

Version:

Status plugin for @atlaskit/editor-core

50 lines (49 loc) 1.86 kB
import React from 'react'; import { type WithIntlProps, type WrappedComponentProps } from 'react-intl'; import type { CreateUIAnalyticsEvent, WithAnalyticsEventsProps } from '@atlaskit/analytics-next'; import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types'; import type { EditorView } from '@atlaskit/editor-prosemirror/view'; import type { ColorType as Color } from '@atlaskit/status/picker'; import type { StatusPlugin } from '../statusPluginType'; import type { ClosingPayload, StatusType } from '../types'; export declare enum InputMethod { blur = "blur", escKey = "escKey", enterKey = "enterKey" } export declare enum closingMethods { ArrowLeft = "arrowLeft", ArrowRight = "arrowRight" } export interface Props { api?: ExtractInjectionAPI<StatusPlugin>; boundariesElement?: HTMLElement; closeStatusPicker: (closingPayload?: ClosingPayload) => void; createAnalyticsEvent?: CreateUIAnalyticsEvent; defaultColor?: Color; defaultLocalId?: string; defaultText?: string; editorView: EditorView; focusStatusInput?: boolean; intl: WrappedComponentProps['intl']; isNew?: boolean; mountTo?: HTMLElement; onEnter: (status: StatusType) => void; onSelect: (status: StatusType) => void; onTextChanged: (status: StatusType, isNew: boolean) => void; scrollableElement?: HTMLElement; target: HTMLElement | null; } export interface State { color: Color; isNew?: boolean; localId?: string; text: string; } export declare const StatusPickerWithoutAnalytcs: React.FC<WithIntlProps<Props>> & { WrappedComponent: React.ComponentType<Props>; }; declare const _default_1: React.ForwardRefExoticComponent<Omit<Omit<Props, 'intl'> & { forwardedRef?: React.Ref<any>; }, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>; export default _default_1;