@atlaskit/editor-plugin-mentions 13.3.14 → 13.3.15

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.
Files changed (37) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/pm-plugins/main.js +1 -1
  3. package/dist/es2019/pm-plugins/main.js +1 -1
  4. package/dist/esm/pm-plugins/main.js +1 -1
  5. package/editor-commands/package.json +1 -8
  6. package/mentions-plugin/package.json +1 -8
  7. package/mentions-plugin-type/package.json +1 -8
  8. package/package.json +2 -2
  9. package/types/package.json +1 -8
  10. package/dist/types-ts4.5/editor-commands/index.d.ts +0 -33
  11. package/dist/types-ts4.5/entry-points/editor-commands.d.ts +0 -1
  12. package/dist/types-ts4.5/entry-points/mentions-plugin-type.d.ts +0 -1
  13. package/dist/types-ts4.5/entry-points/mentions-plugin.d.ts +0 -1
  14. package/dist/types-ts4.5/entry-points/types.d.ts +0 -1
  15. package/dist/types-ts4.5/index.d.ts +0 -4
  16. package/dist/types-ts4.5/mentionsPlugin.d.ts +0 -3
  17. package/dist/types-ts4.5/mentionsPluginType.d.ts +0 -49
  18. package/dist/types-ts4.5/nodeviews/disabledTooltipRenderer.d.ts +0 -25
  19. package/dist/types-ts4.5/nodeviews/mentionNodeSpec.d.ts +0 -8
  20. package/dist/types-ts4.5/nodeviews/mentionNodeView.d.ts +0 -50
  21. package/dist/types-ts4.5/nodeviews/profileCardRenderer.d.ts +0 -15
  22. package/dist/types-ts4.5/pm-plugins/key.d.ts +0 -3
  23. package/dist/types-ts4.5/pm-plugins/main.d.ts +0 -15
  24. package/dist/types-ts4.5/pm-plugins/mentionPlaceholder.d.ts +0 -11
  25. package/dist/types-ts4.5/pm-plugins/utils.d.ts +0 -4
  26. package/dist/types-ts4.5/types/index.d.ts +0 -74
  27. package/dist/types-ts4.5/ui/InlineInviteRecaptchaContainer.d.ts +0 -15
  28. package/dist/types-ts4.5/ui/InviteItem/InviteItemWithEmailDomain.d.ts +0 -38
  29. package/dist/types-ts4.5/ui/InviteItem/index.d.ts +0 -27
  30. package/dist/types-ts4.5/ui/PopperWrapper.d.ts +0 -29
  31. package/dist/types-ts4.5/ui/ProfileCardComponent.d.ts +0 -26
  32. package/dist/types-ts4.5/ui/SecondaryToolbarComponent.d.ts +0 -12
  33. package/dist/types-ts4.5/ui/ToolbarMention/index.d.ts +0 -13
  34. package/dist/types-ts4.5/ui/type-ahead/analytics.d.ts +0 -12
  35. package/dist/types-ts4.5/ui/type-ahead/index.d.ts +0 -20
  36. package/dist/types-ts4.5/ui/type-ahead/utils.d.ts +0 -8
  37. package/dist/types-ts4.5/ui/useFocusTrap.d.ts +0 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/editor-plugin-mentions
2
2
 
3
+ ## 13.3.15
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
3
9
  ## 13.3.14
4
10
 
5
11
  ### Patch Changes
@@ -32,7 +32,7 @@ var ACTIONS = exports.ACTIONS = {
32
32
  var AGENT_USER_TYPES = new Set(['APP', 'AGENT']);
33
33
  var AI_STREAMING_TRANSFORMATION_META_KEY = 'isAIStreamingTransformation';
34
34
  var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
35
- var PACKAGE_VERSION = "13.3.13";
35
+ var PACKAGE_VERSION = "13.3.14";
36
36
  var setProvider = function setProvider(provider) {
37
37
  return function (state, dispatch) {
38
38
  if (dispatch) {
@@ -17,7 +17,7 @@ export const ACTIONS = {
17
17
  const AGENT_USER_TYPES = new Set(['APP', 'AGENT']);
18
18
  const AI_STREAMING_TRANSFORMATION_META_KEY = 'isAIStreamingTransformation';
19
19
  const PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
20
- const PACKAGE_VERSION = "13.3.13";
20
+ const PACKAGE_VERSION = "13.3.14";
21
21
  const setProvider = provider => (state, dispatch) => {
22
22
  if (dispatch) {
23
23
  dispatch(state.tr.setMeta(mentionPluginKey, {
@@ -24,7 +24,7 @@ export var ACTIONS = {
24
24
  var AGENT_USER_TYPES = new Set(['APP', 'AGENT']);
25
25
  var AI_STREAMING_TRANSFORMATION_META_KEY = 'isAIStreamingTransformation';
26
26
  var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
27
- var PACKAGE_VERSION = "13.3.13";
27
+ var PACKAGE_VERSION = "13.3.14";
28
28
  var setProvider = function setProvider(provider) {
29
29
  return function (state, dispatch) {
30
30
  if (dispatch) {
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/editor-commands.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/editor-commands.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/editor-commands.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/mentions-plugin.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/mentions-plugin.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/mentions-plugin.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/mentions-plugin-type.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/mentions-plugin-type.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/mentions-plugin-type.d.ts"
17
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-mentions",
3
- "version": "13.3.14",
3
+ "version": "13.3.15",
4
4
  "description": "Mentions plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -48,7 +48,7 @@
48
48
  "@atlaskit/profilecard": "^25.9.0",
49
49
  "@atlaskit/teams-app-config": "^1.12.0",
50
50
  "@atlaskit/theme": "^25.0.0",
51
- "@atlaskit/tmp-editor-statsig": "^102.0.0",
51
+ "@atlaskit/tmp-editor-statsig": "^103.0.0",
52
52
  "@atlaskit/tokens": "^13.4.0",
53
53
  "@atlaskit/tooltip": "^22.6.0",
54
54
  "@atlaskit/user-picker": "^12.1.0",
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/types.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/types.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/types.d.ts"
17
10
  }
@@ -1,33 +0,0 @@
1
- import type { ExtractInjectionAPI, EditorCommand } from '@atlaskit/editor-common/types';
2
- import { Fragment } from '@atlaskit/editor-prosemirror/model';
3
- import type { Transaction } from '@atlaskit/editor-prosemirror/state';
4
- import type { MentionProvider, MentionDescription } from '@atlaskit/mention/resource';
5
- import type { MentionsPlugin } from '../mentionsPluginType';
6
- export type InsertMentionParameters = Pick<MentionDescription, 'name' | 'id' | 'userType' | 'isXProductUser' | 'nickname' | 'accessLevel'> & {
7
- localId?: string;
8
- /**
9
- * The name is the name that will be displayed in the editor and stored in the ADF.
10
- * If using "sanitizePrivateContent" with the mentions plugin, you can pass an empty
11
- * name (ie. `name: ''`) to ensure the name is resolved by the mention provider (based
12
- * on the id).
13
- *
14
- * !Warning: This is set without check if it matches the value in the mention provider, that
15
- * must be done on the client side if using this.
16
- */
17
- name: string;
18
- };
19
- type InternalParams = {
20
- api: ExtractInjectionAPI<MentionsPlugin> | undefined;
21
- mentionInsertDisplayName: boolean;
22
- sanitizePrivateContent: boolean;
23
- };
24
- type SingleMentionFragmentParams = {
25
- mentionInsertDisplayName: boolean | undefined;
26
- mentionProvider: MentionProvider | undefined;
27
- sanitizePrivateContent: boolean | undefined;
28
- suppressInviteXProductUser?: boolean;
29
- tr: Transaction;
30
- };
31
- export declare const createSingleMentionFragment: ({ mentionInsertDisplayName, mentionProvider, tr, sanitizePrivateContent, suppressInviteXProductUser, }: SingleMentionFragmentParams) => ({ name, id, userType, nickname, localId, accessLevel, isXProductUser, }: InsertMentionParameters) => Fragment;
32
- export declare const insertMention: ({ sanitizePrivateContent, api, mentionInsertDisplayName }: InternalParams) => ({ name, id, userType, localId, nickname, accessLevel, isXProductUser, }: InsertMentionParameters) => EditorCommand;
33
- export {};
@@ -1 +0,0 @@
1
- export type { InsertMentionParameters } from '../editor-commands/index';
@@ -1 +0,0 @@
1
- export type { MentionsPlugin, MentionPluginDependencies, MentionActions, } from '../mentionsPluginType';
@@ -1 +0,0 @@
1
- export { mentionsPlugin } from '../mentionsPlugin';
@@ -1 +0,0 @@
1
- export type { MentionPluginConfig, MentionPluginOptions, MentionChange, MentionsPluginOptions, MentionSharedState, MentionsChangedHandler, } from '../types/index';
@@ -1,4 +0,0 @@
1
- export { mentionsPlugin } from './mentionsPlugin';
2
- export type { MentionsPlugin, MentionPluginDependencies, MentionActions, } from './mentionsPluginType';
3
- export type { MentionPluginConfig, MentionPluginOptions, MentionsPluginOptions, MentionSharedState, MentionsChangedHandler, } from './types';
4
- export type { InsertMentionParameters } from './editor-commands';
@@ -1,3 +0,0 @@
1
- import type { MentionsPlugin } from './mentionsPluginType';
2
- declare const mentionsPlugin: MentionsPlugin;
3
- export { mentionsPlugin };
@@ -1,49 +0,0 @@
1
- import type { NextEditorPlugin, OptionalPlugin, EditorCommand, TypeAheadSectionTitleUpdate } from '@atlaskit/editor-common/types';
2
- import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
3
- import type { BasePlugin } from '@atlaskit/editor-plugin-base';
4
- import type { ContextIdentifierPlugin } from '@atlaskit/editor-plugin-context-identifier';
5
- import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
6
- import type { TypeAheadInputMethod, TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
7
- import type { MentionProvider } from '@atlaskit/mention/resource';
8
- import type { InsertMentionParameters } from './editor-commands';
9
- import type { MentionChange, MentionPluginOptions, MentionSharedState } from './types';
10
- export type MentionActionOpenTypeAhead = (inputMethod: TypeAheadInputMethod) => boolean;
11
- export type MentionActionAnnounceMentionsInsertion = (mentionIds: MentionChange[]) => void;
12
- export type MentionActionSetProvider = (provider: Promise<MentionProvider>) => Promise<boolean>;
13
- export type MentionActionUpdateSectionTitle = (props: TypeAheadSectionTitleUpdate) => boolean;
14
- export type MentionActions = {
15
- announceMentionsInsertion: MentionActionAnnounceMentionsInsertion;
16
- openTypeAhead: MentionActionOpenTypeAhead;
17
- setProvider: MentionActionSetProvider;
18
- updateSectionTitle: MentionActionUpdateSectionTitle;
19
- };
20
- export type MentionPluginDependencies = [
21
- OptionalPlugin<AnalyticsPlugin>,
22
- TypeAheadPlugin,
23
- OptionalPlugin<ContextIdentifierPlugin>,
24
- OptionalPlugin<BasePlugin>,
25
- OptionalPlugin<SelectionPlugin>
26
- ];
27
- export type MentionsPlugin = NextEditorPlugin<'mention', {
28
- actions: MentionActions;
29
- commands: {
30
- /**
31
- * Inserts mention node into the document based on parameters.
32
- *
33
- * !Warning at this stage only inserts single mentions
34
- *
35
- * @param params.name string
36
- * @param params.id string
37
- * @param params.userType string (optional)
38
- * @param params.nickname string (optional)
39
- * @param params.localId string (optional)
40
- * @param params.accessLevel string (optional)
41
- * @param params.isXProductUser boolean (optional)
42
- * @returns
43
- */
44
- insertMention: (params: InsertMentionParameters) => EditorCommand;
45
- };
46
- dependencies: MentionPluginDependencies;
47
- pluginConfiguration: MentionPluginOptions | undefined;
48
- sharedState: MentionSharedState | undefined;
49
- }>;
@@ -1,25 +0,0 @@
1
- import type { PortalProviderAPI } from '@atlaskit/editor-common/portal';
2
- /**
3
- * Anchors an ADS `<Tooltip>` to a ProseMirror chip element that is **not** a
4
- * React child of the tooltip. The chip itself stays in the PM document; this
5
- * renderer mounts an always-present React subtree via `portalProviderAPI` whose
6
- * sole job is to host the tooltip and forward the ADS-provided trigger ref +
7
- * event handlers onto the chip.
8
- *
9
- * The forwarding is deliberate: ADS `<Tooltip>` expects to attach its hover /
10
- * focus / blur listeners to its render-prop child, but our render-prop child
11
- * is a `display: none` placeholder span that no real event can reach. We bridge
12
- * those listeners to the chip via `addEventListener` so the tooltip opens and
13
- * closes in response to the user actually interacting with the chip — keyboard
14
- * focus, mouse hover, screen-reader focus, the lot.
15
- */
16
- export interface DisabledTooltipController {
17
- /** Tear down the React subtree. */
18
- destroy: () => void;
19
- /** Update the tooltip text. Passing `undefined` hides the tooltip. */
20
- setTooltip: (text: string | undefined) => void;
21
- }
22
- export declare const disabledTooltipRenderer: ({ chipElement, portalProviderAPI, }: {
23
- chipElement: HTMLElement;
24
- portalProviderAPI: PortalProviderAPI;
25
- }) => DisabledTooltipController;
@@ -1,8 +0,0 @@
1
- import type { NodeSpec } from '@atlaskit/editor-prosemirror/model';
2
- /**
3
- * Wrapper for ADF mention node spec to augment toDOM implementation
4
- * with fallback UI for lazy node view rendering / window virtualization
5
- * @nodeSpecException:toDOM patch
6
- * @returns
7
- */
8
- export declare const mentionNodeSpec: () => NodeSpec;
@@ -1,50 +0,0 @@
1
- import type { PortalProviderAPI } from '@atlaskit/editor-common/portal';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
4
- import type { NodeView } from '@atlaskit/editor-prosemirror/view';
5
- import type { MentionsPlugin } from '../mentionsPluginType';
6
- import type { MentionPluginOptions } from '../types';
7
- interface MentionNodeViewProps {
8
- api: ExtractInjectionAPI<MentionsPlugin> | undefined;
9
- options?: MentionPluginOptions;
10
- portalProviderAPI: PortalProviderAPI;
11
- }
12
- export declare class MentionNodeView implements NodeView {
13
- dom: Node;
14
- domElement: HTMLElement | undefined;
15
- contentDOM: HTMLElement | undefined;
16
- private config;
17
- private node;
18
- private cleanup;
19
- private destroyProfileCard;
20
- private removeProfileCard;
21
- private mentionPrimitiveElement;
22
- private disabledTooltip;
23
- private unsubscribeFromDisabledStateChanges;
24
- private subscribedProvider;
25
- constructor(node: PMNode, config: MentionNodeViewProps);
26
- private setClassList;
27
- private getDisabledState;
28
- /**
29
- * Subscribes this NodeView to disabled-state-change notifications on the
30
- * supplied provider so already-rendered chips can re-evaluate themselves
31
- * when the consumer's predicate inputs change (e.g. the active agent
32
- * selection toggling in Rovo Chat). No-op for providers that don't
33
- * implement `subscribeToDisabledStateChanges`.
34
- *
35
- * Idempotent: re-calling with the same provider keeps the existing
36
- * subscription; passing a different provider tears the old subscription
37
- * down before attaching the new one. Safe to call from the sharedState
38
- * `onChange` handler when the editor swaps providers.
39
- */
40
- private subscribeToProviderDisabledStateChanges;
41
- private syncDisabledTooltip;
42
- private setTextContent;
43
- private shouldHighlightMention;
44
- private updateState;
45
- private nodeIsEqual;
46
- update(node: PMNode): boolean;
47
- destroy(): void;
48
- deselectNode(): void;
49
- }
50
- export {};
@@ -1,15 +0,0 @@
1
- import type { PortalProviderAPI } from '@atlaskit/editor-common/portal';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
4
- import type { MentionsPlugin } from '../mentionsPluginType';
5
- import type { MentionPluginOptions } from '../types';
6
- export declare const profileCardRenderer: ({ dom, options, portalProviderAPI, node, api, }: {
7
- api: ExtractInjectionAPI<MentionsPlugin> | undefined;
8
- dom: Node;
9
- node: PMNode;
10
- options?: MentionPluginOptions;
11
- portalProviderAPI: PortalProviderAPI;
12
- }) => {
13
- destroyProfileCard: () => void;
14
- removeProfileCard: () => void;
15
- };
@@ -1,3 +0,0 @@
1
- import { PluginKey } from '@atlaskit/editor-prosemirror/state';
2
- import type { MentionPluginState } from '../types';
3
- export declare const mentionPluginKey: PluginKey<MentionPluginState>;
@@ -1,15 +0,0 @@
1
- import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- import type { ExtractInjectionAPI, PMPluginFactoryParams } from '@atlaskit/editor-common/types';
3
- import type { MentionsPlugin } from '../mentionsPluginType';
4
- import type { FireElementsChannelEvent, MentionPluginOptions, MentionPluginState } from '../types';
5
- export declare const ACTIONS: {
6
- SET_PROVIDER: string;
7
- };
8
- interface CreateMentionPlugin {
9
- api?: ExtractInjectionAPI<MentionsPlugin>;
10
- fireEvent: FireElementsChannelEvent;
11
- options?: MentionPluginOptions;
12
- pmPluginFactoryParams: PMPluginFactoryParams;
13
- }
14
- export declare function createMentionPlugin({ pmPluginFactoryParams, fireEvent, options, api, }: CreateMentionPlugin): SafePlugin<MentionPluginState>;
15
- export {};
@@ -1,11 +0,0 @@
1
- import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- import { PluginKey } from '@atlaskit/editor-prosemirror/state';
3
- export declare const mentionPlaceholderPluginKey: PluginKey;
4
- export declare const MENTION_PLACEHOLDER_ACTIONS: {
5
- SHOW_PLACEHOLDER: string;
6
- HIDE_PLACEHOLDER: string;
7
- };
8
- export type MentionPlaceholderPluginState = {
9
- placeholder?: string;
10
- };
11
- export declare function createMentionPlaceholderPlugin(): SafePlugin<{}>;
@@ -1,4 +0,0 @@
1
- import type { EditorState } from '@atlaskit/editor-prosemirror/state';
2
- import type { MentionPluginState } from '../types';
3
- export declare function getMentionPluginState(state: EditorState): MentionPluginState;
4
- export declare const canMentionBeCreatedInRange: (from: number, to: number) => (state: EditorState) => boolean;
@@ -1,74 +0,0 @@
1
- import type { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
2
- import type { Providers, ProfilecardProvider } from '@atlaskit/editor-common/provider-factory';
3
- import type { TypeAheadHandler } from '@atlaskit/editor-common/types';
4
- import type { MentionDescription, MentionProvider } from '@atlaskit/mention';
5
- export declare const MENTION_PROVIDER_REJECTED = "REJECTED";
6
- export declare const MENTION_PROVIDER_UNDEFINED = "UNDEFINED";
7
- export interface TeamInfoAttrAnalytics {
8
- includesYou: boolean;
9
- memberCount: number;
10
- teamId: string;
11
- }
12
- export interface MentionPluginConfig {
13
- HighlightComponent?: React.ComponentType<React.PropsWithChildren<unknown>>;
14
- insertDisplayName?: boolean;
15
- profilecardProvider?: Promise<ProfilecardProvider>;
16
- }
17
- export type MentionChange = {
18
- id: string;
19
- localId: string;
20
- method?: 'pasted' | 'typed';
21
- shouldSuppressMentionNotification?: boolean;
22
- taskLocalId?: string;
23
- type: 'added' | 'deleted';
24
- };
25
- export type MentionsChangedHandler = (changes: MentionChange[]) => void;
26
- export interface MentionsPluginOptions extends MentionPluginConfig {
27
- allowZeroWidthSpaceAfter?: boolean;
28
- /**
29
- * User ID to highlight as a self-mention (typically the current user).
30
- *
31
- * When provided, mentions matching this ID will be highlighted immediately,
32
- * without waiting for the mention provider to load. This enables instant highlighting on initial render.
33
- * Takes priority over `MentionProvider.shouldHighlightMention()` if both are present.
34
- */
35
- currentUserId?: string;
36
- handleMentionsChanged?: MentionsChangedHandler;
37
- mentionProvider?: Providers['mentionProvider'];
38
- sanitizePrivateContent?: boolean;
39
- }
40
- /**
41
- * @private
42
- * @deprecated Use {@link MentionsPluginOptions} instead.
43
- * @see https://product-fabric.atlassian.net/browse/ED-27496
44
- */
45
- export type MentionPluginOptions = MentionsPluginOptions;
46
- export type MentionPluginState = {
47
- canInsertMention?: boolean;
48
- /**
49
- * Increments on each new agent mention insertion (including re-mentions of the same agent).
50
- * Used to trigger re-renders when the same agent is mentioned again.
51
- */
52
- lastAgentMentionInsertionCount?: number;
53
- /**
54
- * Plain-text content of the block node containing the agent mention.
55
- * Used as a prompt context for Rovo chat.
56
- */
57
- lastInsertedAgentMentionContext?: string | null;
58
- /**
59
- * The ID of the most recently inserted agent (APP | AGENT userType) mention.
60
- * Null when no agent mention is present in the document.
61
- */
62
- lastInsertedAgentMentionId?: string | null;
63
- /**
64
- * ProseMirror node type of the direct parent of the agent mention
65
- * (e.g. 'taskItem', 'paragraph'). Determines auto-send vs. draft behaviour.
66
- */
67
- lastInsertedAgentMentionParentNodeType?: string | null;
68
- mentionProvider?: MentionProvider;
69
- mentions?: Array<MentionDescription>;
70
- };
71
- export type FireElementsChannelEvent = (payload: AnalyticsEventPayload, channel?: string) => void;
72
- export type MentionSharedState = MentionPluginState & {
73
- typeAheadHandler: TypeAheadHandler;
74
- };
@@ -1,15 +0,0 @@
1
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
- import type { MentionProvider } from '@atlaskit/mention/resource';
3
- import type { MentionsPlugin } from '../mentionsPluginType';
4
- interface Props {
5
- api: ExtractInjectionAPI<MentionsPlugin> | undefined;
6
- mentionProvider: Promise<MentionProvider> | undefined;
7
- }
8
- /**
9
- * Container that renders the recaptcha component from the mention provider and manages handleSuccess.
10
- * Does NOT pass email - the provider's component uses useInlineInviteRecaptcha hook internally
11
- * and wires showRecaptcha to the provider. When user clicks invite item, type-ahead calls
12
- * mentionProvider.showInlineInviteRecaptcha(email) which passes email to the component.
13
- */
14
- export declare const InlineInviteRecaptchaContainer: ({ mentionProvider, api, }: Props) => JSX.Element | null;
15
- export {};
@@ -1,38 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- * @jsxFrag React.Fragment
5
- */
6
- import type { SyntheticEvent } from 'react';
7
- import React from 'react';
8
- import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
9
- import type { UserRole } from '@atlaskit/mention';
10
- import type { MentionDescription } from '@atlaskit/mention/resource';
11
- /**
12
- * Truncates an email-like string to fit within a max length by inserting an
13
- * ellipsis into the middle of the local part (before the @).
14
- *
15
- * Preserves the full `@domain` suffix so users can always see
16
- * which domain the invite targets.
17
- */
18
- export declare const truncateInviteOption: (value: string, maxLength?: number) => string;
19
- interface OnMentionEvent {
20
- (mention: MentionDescription, event?: SyntheticEvent<any>): void;
21
- }
22
- export declare const INVITE_ITEM_DESCRIPTION: {
23
- id: string;
24
- };
25
- interface Props {
26
- emailDomain?: string;
27
- onMount?: () => void;
28
- onMouseEnter?: OnMentionEvent;
29
- onSelection?: OnMentionEvent;
30
- productName?: string;
31
- query?: string;
32
- selected?: boolean;
33
- userRole?: UserRole;
34
- }
35
- declare const _default_1: React.FC<WithIntlProps<Props & WrappedComponentProps>> & {
36
- WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
37
- };
38
- export default _default_1;
@@ -1,27 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import type { SyntheticEvent } from 'react';
6
- import React from 'react';
7
- import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
8
- import type { UserRole } from '@atlaskit/mention';
9
- import type { MentionDescription } from '@atlaskit/mention/resource';
10
- interface OnMentionEvent {
11
- (mention: MentionDescription, event?: SyntheticEvent<any>): void;
12
- }
13
- export declare const INVITE_ITEM_DESCRIPTION: {
14
- id: string;
15
- };
16
- interface Props {
17
- onMount?: () => void;
18
- onMouseEnter?: OnMentionEvent;
19
- onSelection?: OnMentionEvent;
20
- productName?: string;
21
- selected?: boolean;
22
- userRole?: UserRole;
23
- }
24
- declare const _default_1: React.FC<WithIntlProps<Props & WrappedComponentProps>> & {
25
- WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
26
- };
27
- export default _default_1;
@@ -1,29 +0,0 @@
1
- import React from 'react';
2
- import type { PropsWithChildren } from 'react';
3
- import type { PopperChildrenProps } from '@atlaskit/popper';
4
- interface Props {
5
- /**
6
- * Returns the element to be positioned.
7
- */
8
- children: React.ReactNode;
9
- /**
10
- * Replacement reference element to position popper relative to.
11
- */
12
- referenceElement: HTMLElement;
13
- }
14
- export declare const RepositionOnUpdate: ({ children, update, }: PropsWithChildren<{
15
- update: PopperChildrenProps["update"];
16
- }>) => React.ReactNode;
17
- /**
18
- * A popup wrapper to match the behaviour of `@atlaskit/popup`
19
- *
20
- * Why not `@atlaskit/popup` directly? It requires a trigger element.
21
- * We can use this when we have a direct reference to the element
22
- * and it is more convenient to work directly with the lower level API.
23
- *
24
- * @param referenceElement HTMLElement - Replacement reference element to position popper relative to.
25
- * @param children React.ReactNode - Returns the element to be positioned.
26
- * @returns React popper component
27
- */
28
- export declare function Popup({ referenceElement, children }: Props): React.JSX.Element;
29
- export {};
@@ -1,26 +0,0 @@
1
- import type { ProfilecardProvider } from '@atlaskit/editor-common/provider-factory';
2
- import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
3
- import type { ProfileCardClientData, TeamCentralReportingLinesData } from '@atlaskit/profilecard/types';
4
- interface ProfileCardStateProps {
5
- id: string | undefined;
6
- provider: ProfilecardProvider | undefined;
7
- }
8
- export declare const isAgentMentionType: (userType: unknown) => boolean;
9
- export declare const useProfileCardState: ({ id, provider, }: ProfileCardStateProps) => {
10
- data: ProfileCardClientData | undefined;
11
- hasError: boolean;
12
- isLoading: boolean;
13
- reportingLinesData: TeamCentralReportingLinesData | undefined;
14
- shouldShowGiveKudos: boolean;
15
- teamCentralBaseUrl: string | undefined;
16
- };
17
- /**
18
- * Renders the profile card popup for an editor mention node.
19
- */
20
- export declare function ProfileCardComponent({ profilecardProvider, activeMention, dom, closeComponent, }: {
21
- activeMention: PMNode;
22
- closeComponent: () => void;
23
- dom: HTMLElement;
24
- profilecardProvider?: Promise<ProfilecardProvider> | undefined;
25
- }): JSX.Element;
26
- export {};
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import type { ExtractInjectionAPI, TypeAheadHandler } from '@atlaskit/editor-common/types';
3
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
- import type { MentionsPlugin } from '../mentionsPluginType';
5
- interface SecondaryToolbarComponentProps {
6
- api: ExtractInjectionAPI<MentionsPlugin> | undefined;
7
- disabled: boolean;
8
- editorView: EditorView;
9
- typeAhead: TypeAheadHandler;
10
- }
11
- export declare function SecondaryToolbarComponent({ editorView, api, typeAhead, disabled, }: SecondaryToolbarComponentProps): React.JSX.Element | null;
12
- export {};
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
3
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
- interface Props {
5
- editorView?: EditorView;
6
- isDisabled?: boolean;
7
- onInsertMention: () => void;
8
- testId?: string;
9
- }
10
- declare const _default_1: React.FC<WithIntlProps<Props & WrappedComponentProps>> & {
11
- WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
12
- };
13
- export default _default_1;
@@ -1,12 +0,0 @@
1
- import type { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
2
- import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
3
- import type { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
4
- import type { UserRole } from '@atlaskit/mention';
5
- import type { MentionDescription } from '@atlaskit/mention/resource';
6
- import type { TeamInfoAttrAnalytics } from '../../types';
7
- export declare const MENTION_SOURCE = "mentionInEditor";
8
- export declare const buildTypeAheadCancelPayload: (duration: number, upKeyCount: number, downKeyCount: number, sessionId: string, query?: string) => AnalyticsEventPayload;
9
- export declare const buildTypeAheadInviteItemViewedPayload: (sessionId: string, contextIdentifierProvider?: ContextIdentifierProvider, userRole?: UserRole, additionalAttributes?: Record<string, unknown>) => AnalyticsEventPayload;
10
- export declare const buildTypeAheadInviteItemClickedPayload: (duration: number, upKeyCount: number, downKeyCount: number, sessionId: string, insertType: SelectItemMode, query?: string, contextIdentifierProvider?: ContextIdentifierProvider, userRole?: UserRole, additionalAttributes?: Record<string, unknown>) => AnalyticsEventPayload;
11
- export declare const buildTypeAheadInsertedPayload: (duration: number, upKeyCount: number, downKeyCount: number, sessionId: string, insertType: SelectItemMode, mention: MentionDescription, mentionLocalId: string, mentionList?: MentionDescription[], query?: string, contextIdentifierProvider?: ContextIdentifierProvider, taskListId?: string, taskItemId?: string) => AnalyticsEventPayload;
12
- export declare const buildTypeAheadRenderedPayload: (duration: number, userIds: Array<string> | null, query: string, teams: TeamInfoAttrAnalytics[] | null, xProductMentionsLength: number) => AnalyticsEventPayload;
@@ -1,20 +0,0 @@
1
- import React from 'react';
2
- import type { ExtractInjectionAPI, TypeAheadHandler, TypeAheadItem } from '@atlaskit/editor-common/types';
3
- import type { MentionDescription } from '@atlaskit/mention/resource';
4
- import type { MentionsPlugin } from '../../mentionsPluginType';
5
- import type { FireElementsChannelEvent, MentionChange } from '../../types';
6
- export declare const mentionToTypeaheadItem: (mention: MentionDescription) => TypeAheadItem;
7
- export declare function memoize<ResultFn extends (mention: MentionDescription) => TypeAheadItem>(fn: ResultFn): {
8
- call: ResultFn;
9
- clear(): void;
10
- };
11
- type Props = {
12
- api: ExtractInjectionAPI<MentionsPlugin> | undefined;
13
- fireEvent: FireElementsChannelEvent;
14
- handleMentionsChanged?: (mentionChanges: MentionChange[]) => void;
15
- HighlightComponent?: React.ComponentType<React.PropsWithChildren<unknown>>;
16
- mentionInsertDisplayName?: boolean;
17
- sanitizePrivateContent?: boolean;
18
- };
19
- export declare const createTypeAheadConfig: ({ sanitizePrivateContent, mentionInsertDisplayName, fireEvent, HighlightComponent, api, handleMentionsChanged, }: Props) => TypeAheadHandler;
20
- export {};
@@ -1,8 +0,0 @@
1
- import type { MentionDescription } from '@atlaskit/mention';
2
- export declare const isTeamType: (userType: any) => boolean;
3
- export declare const isTeamStats: (stat: any) => boolean;
4
- export declare const isInviteItem: (mention: MentionDescription) => boolean;
5
- /**
6
- * Actions
7
- */
8
- export declare const shouldKeepInviteItem: (query: string, firstQueryWithoutResults: string) => boolean;
@@ -1,4 +0,0 @@
1
- export type FocusManagerHook = {
2
- targetRef: HTMLDivElement | null;
3
- };
4
- export declare const useFocusTrap: ({ targetRef }: FocusManagerHook) => void;