UNPKG

@atlaskit/editor-plugin-type-ahead

Version:

Type-ahead plugin for @atlaskit/editor-core

17 lines 846 B
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics'; export var fireTypeAheadClosedAnalyticsEvent = function fireTypeAheadClosedAnalyticsEvent(api, closeAction, hasQuery, inputMethod) { var _api$analytics; var invocationMethod = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null; api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 || _api$analytics.actions.fireAnalyticsEvent({ action: ACTION.CLOSED, actionSubject: ACTION_SUBJECT.TYPEAHEAD, actionSubjectId: ACTION_SUBJECT_ID.TYPEAHEAD_QUICK_INSERT, attributes: { inputMethod: inputMethod, closeAction: closeAction, hasQuery: hasQuery, invocationMethod: invocationMethod }, eventType: EVENT_TYPE.TRACK }); };