@atlaskit/editor-common 62.1.0 → 64.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/CHANGELOG.md +102 -0
- package/dist/cjs/extensions/manifest-helpers.js +2 -2
- package/dist/cjs/extensions/module-helpers.js +2 -2
- package/dist/cjs/icons/index.js +45 -0
- package/dist/cjs/icons/shared/PanelErrorIcon.js +37 -0
- package/dist/cjs/icons/shared/PanelInfoIcon.js +37 -0
- package/dist/cjs/icons/shared/PanelNoteIcon.js +37 -0
- package/dist/cjs/icons/shared/PanelSuccessIcon.js +37 -0
- package/dist/cjs/icons/shared/PanelWarningIcon.js +37 -0
- package/dist/cjs/index.js +1 -945
- package/dist/cjs/provider-factory/with-providers.js +2 -2
- package/dist/cjs/safe-plugin/index.js +42 -0
- package/dist/cjs/styles/index.js +12 -24
- package/dist/cjs/styles/shared/block-marks.js +1 -1
- package/dist/cjs/styles/shared/lists.js +3 -1
- package/dist/cjs/styles/shared/panel.js +26 -8
- package/dist/cjs/styles/shared/table.js +2 -1
- package/dist/cjs/types/collab.js +5 -0
- package/dist/cjs/ui/LegacyToNextIntlProvider/index.js +2 -2
- package/dist/cjs/ui/MediaSingle/index.js +3 -1
- package/dist/cjs/ui/Mention/index.js +1 -3
- package/dist/cjs/ui/Mention/mention-with-profilecard.js +33 -194
- package/dist/cjs/ui/Mention/mention-with-providers.js +1 -5
- package/dist/cjs/ui/Popup/index.js +4 -4
- package/dist/cjs/ui/Popup/utils.js +2 -2
- package/dist/cjs/ui/index.js +0 -16
- package/dist/cjs/utils/browser.js +1 -1
- package/dist/cjs/utils/profiler/render-count.js +2 -2
- package/dist/cjs/utils/track-unsupported-content.js +2 -2
- package/dist/cjs/utils/validator.js +2 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/icons/index.js +5 -0
- package/dist/es2019/icons/shared/PanelErrorIcon.js +24 -0
- package/dist/es2019/icons/shared/PanelInfoIcon.js +24 -0
- package/dist/es2019/icons/shared/PanelNoteIcon.js +24 -0
- package/dist/es2019/icons/shared/PanelSuccessIcon.js +24 -0
- package/dist/es2019/icons/shared/PanelWarningIcon.js +24 -0
- package/dist/es2019/index.js +5 -25
- package/dist/es2019/safe-plugin/index.js +10 -0
- package/dist/es2019/styles/index.js +2 -7
- package/dist/es2019/styles/shared/block-marks.js +2 -1
- package/dist/es2019/styles/shared/lists.js +16 -0
- package/dist/es2019/styles/shared/panel.js +20 -8
- package/dist/es2019/styles/shared/table.js +3 -2
- package/dist/es2019/types/collab.js +1 -0
- package/dist/es2019/ui/MediaSingle/index.js +3 -1
- package/dist/es2019/ui/Mention/index.js +1 -3
- package/dist/es2019/ui/Mention/mention-with-profilecard.js +33 -146
- package/dist/es2019/ui/Mention/mention-with-providers.js +1 -5
- package/dist/es2019/ui/Popup/index.js +2 -2
- package/dist/es2019/ui/index.js +1 -8
- package/dist/es2019/utils/browser.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/extensions/manifest-helpers.js +2 -2
- package/dist/esm/extensions/module-helpers.js +2 -2
- package/dist/esm/icons/index.js +5 -0
- package/dist/esm/icons/shared/PanelErrorIcon.js +24 -0
- package/dist/esm/icons/shared/PanelInfoIcon.js +24 -0
- package/dist/esm/icons/shared/PanelNoteIcon.js +24 -0
- package/dist/esm/icons/shared/PanelSuccessIcon.js +24 -0
- package/dist/esm/icons/shared/PanelWarningIcon.js +24 -0
- package/dist/esm/index.js +5 -25
- package/dist/esm/provider-factory/with-providers.js +2 -2
- package/dist/esm/safe-plugin/index.js +27 -0
- package/dist/esm/styles/index.js +2 -7
- package/dist/esm/styles/shared/block-marks.js +1 -1
- package/dist/esm/styles/shared/lists.js +2 -1
- package/dist/esm/styles/shared/panel.js +22 -8
- package/dist/esm/styles/shared/table.js +3 -2
- package/dist/esm/types/collab.js +1 -0
- package/dist/esm/ui/LegacyToNextIntlProvider/index.js +2 -2
- package/dist/esm/ui/MediaSingle/index.js +3 -1
- package/dist/esm/ui/Mention/index.js +1 -3
- package/dist/esm/ui/Mention/mention-with-profilecard.js +33 -189
- package/dist/esm/ui/Mention/mention-with-providers.js +1 -5
- package/dist/esm/ui/Popup/index.js +4 -4
- package/dist/esm/ui/Popup/utils.js +2 -2
- package/dist/esm/ui/index.js +1 -8
- package/dist/esm/utils/browser.js +1 -1
- package/dist/esm/utils/profiler/render-count.js +2 -2
- package/dist/esm/utils/track-unsupported-content.js +2 -2
- package/dist/esm/utils/validator.js +2 -2
- package/dist/esm/version.json +1 -1
- package/dist/types/collab/types.d.ts +14 -2
- package/dist/types/collab.d.ts +1 -1
- package/dist/types/extensions/types/extension-handler.d.ts +1 -0
- package/dist/types/icons/index.d.ts +5 -0
- package/dist/types/icons/shared/PanelErrorIcon.d.ts +3 -0
- package/dist/types/icons/shared/PanelInfoIcon.d.ts +3 -0
- package/dist/types/icons/shared/PanelNoteIcon.d.ts +3 -0
- package/dist/types/icons/shared/PanelSuccessIcon.d.ts +3 -0
- package/dist/types/icons/shared/PanelWarningIcon.d.ts +3 -0
- package/dist/types/index.d.ts +13 -19
- package/dist/types/safe-plugin/index.d.ts +6 -0
- package/dist/types/styles/index.d.ts +1 -4
- package/dist/types/styles/shared/panel.d.ts +56 -0
- package/dist/types/styles/shared/table.d.ts +1 -0
- package/dist/types/types/collab.d.ts +8 -0
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/ui/MediaSingle/index.d.ts +2 -1
- package/dist/types/ui/MediaSingle/styled.d.ts +2 -2
- package/dist/types/ui/Mention/index.d.ts +0 -3
- package/dist/types/ui/Mention/mention-with-profilecard.d.ts +2 -25
- package/dist/types/ui/Mention/mention-with-providers.d.ts +0 -3
- package/dist/types/ui/Popup/index.d.ts +1 -1
- package/dist/types/ui/WidthProvider/index.d.ts +3 -1
- package/dist/types/ui/index.d.ts +1 -4
- package/icons/package.json +7 -0
- package/package.json +23 -21
- package/safe-plugin/package.json +7 -0
- package/dist/cjs/styles/shared/inline-nodes.js +0 -17
- package/dist/es2019/styles/shared/inline-nodes.js +0 -7
- package/dist/esm/styles/shared/inline-nodes.js +0 -7
- package/dist/types/styles/shared/inline-nodes.d.ts +0 -2
package/dist/types/index.d.ts
CHANGED
|
@@ -1,21 +1,15 @@
|
|
|
1
|
-
export {
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export type { CollabEditProvider, CollabEvent, CollabEventData, CollabEventConnectionData, CollabEventInitData, CollabParticipant, CollabEventPresenceData, CollabEventLocalStepData, CollabEventRemoteData, CollabSendableSelection, CollabEventTelepointerData, } from './collab/types';
|
|
7
|
-
export { DefaultExtensionProvider, combineExtensionProviders, getExtensionKeyAndNodeKey, getExtensionModuleNode, getExtensionModuleNodePrivateProps, getQuickInsertItemsFromModule, getNodeRenderer, getContextualToolbarItemsFromModule, buildMenuItem, resolveImport, } from './extensions';
|
|
8
|
-
export type { Extension, ExtensionComponentProps, ExtensionHandler, ExtensionHandlers, ExtensionKey, ExtensionManifest, ExtensionModule, ExtensionModuleAction, ExtensionModuleActionHandler, ExtensionModuleActionObject, ExtensionModuleNode, ExtensionModuleNodes, ExtensionQuickInsertModule, ExtensionModules, ExtensionParams, ExtensionProvider, ExtensionType, ExtensionToolbarButton, ToolbarItem, ContextualToolbar, MaybeADFEntity, Parameters, MenuItem, MenuItemMap, UpdateExtension, ReferenceEntity, } from './extensions';
|
|
1
|
+
export type { ADDoc, // temporarily keep for confluence
|
|
2
|
+
ADNode, } from './utils';
|
|
3
|
+
export type { ExtensionHandler, // temporarily keep for confluence
|
|
4
|
+
ExtensionHandlers, // temporarily keep for confluence
|
|
5
|
+
ExtensionParams, } from './extensions';
|
|
9
6
|
export type { ContextIdentifierProvider } from './provider-factory/context-identifier-provider';
|
|
7
|
+
export type { SearchProvider } from './provider-factory';
|
|
10
8
|
export { ProviderFactory, WithProviders } from './provider-factory';
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
export {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
Popup, UnsupportedBlock, UnsupportedInline, ValidMessage, WidthConsumer, WidthProvider, WithCreateAnalyticsEvent, calcColumnsFromPx, calcPctFromPx, calcPxFromColumns, calcPxFromPct, expandMessages, findOverflowScrollParent, getBreakpoint, layoutSupportsWidth, mapBreakpointToLayoutMaxWidth, overflowShadow, shadowClassNames, sharedExpandStyles, snapToGrid, withOuterListeners, MediaLink, wrappedLayouts, shouldAddDefaultWrappedWidth, IntlNextErrorBoundary, REACT_INTL_ERROR_MESSAGE, IntlLegacyFallbackProvider, LegacyToNextIntlProvider, } from './ui';
|
|
19
|
-
export type { CardEventClickHandler, CardSurroundings, EmojiProps, EventHandlers, LinkEventClickHandler, MediaSingleDimensionHelperProps, MediaSingleProps, MentionEventHandler, MentionEventHandlers, OverflowShadowOptions, OverflowShadowProps, OverflowShadowState, PopupPosition, PopupProps, SmartCardEventClickHandler, WidthConsumerContext, ExpandStyleProps, } from './ui';
|
|
20
|
-
export { linkMessages } from './messages/link';
|
|
21
|
-
export { validateADFEntity, validationErrorHandler, } from './utils/validate-using-spec';
|
|
9
|
+
export { WidthConsumer, // temporarily keep for confluence
|
|
10
|
+
WidthProvider, } from './ui';
|
|
11
|
+
export type { EventHandlers, // temporarily keep for confluence
|
|
12
|
+
LinkEventClickHandler, // temporarily keep for confluence
|
|
13
|
+
MentionEventHandler, // temporarily keep for confluence
|
|
14
|
+
SmartCardEventClickHandler, } from './ui';
|
|
15
|
+
export type { SafePlugin } from './safe-plugin';
|
|
@@ -5,11 +5,10 @@ export { columnLayoutSharedStyle } from './shared/column-layout';
|
|
|
5
5
|
export { mediaSingleSharedStyle, richMediaClassName, } from './shared/media-single';
|
|
6
6
|
export { blockquoteSharedStyles } from './shared/blockquote';
|
|
7
7
|
export { headingsSharedStyles } from './shared/headings';
|
|
8
|
-
export { getPanelTypeBackground, panelSharedStyles, PanelSharedCssClassName, PanelSharedSelectors, getPanelBackgroundDarkModeColors, } from './shared/panel';
|
|
8
|
+
export { getPanelTypeBackground, darkPanelColors, getPanelDarkColor, panelSharedStyles, PanelSharedCssClassName, PanelSharedSelectors, getPanelBackgroundDarkModeColors, } from './shared/panel';
|
|
9
9
|
export { ruleSharedStyles } from './shared/rule';
|
|
10
10
|
export { whitespaceSharedStyles } from './shared/whitespace';
|
|
11
11
|
export { paragraphSharedStyles } from './shared/paragraph';
|
|
12
|
-
export { inlineNodeSharedStyle } from './shared/inline-nodes';
|
|
13
12
|
export { linkSharedStyle } from './shared/link';
|
|
14
13
|
export { listsSharedStyles } from './shared/lists';
|
|
15
14
|
export { indentationSharedStyles } from './shared/indentation';
|
|
@@ -18,7 +17,5 @@ export { codeMarkSharedStyles } from './shared/code-mark';
|
|
|
18
17
|
export { shadowSharedStyle } from './shared/shadow';
|
|
19
18
|
export { dateSharedStyle, DateSharedCssClassName } from './shared/date';
|
|
20
19
|
export { tasksAndDecisionsStyles, TaskDecisionSharedCssClassName, } from './shared/task-decision';
|
|
21
|
-
export { MentionSharedCssClassName } from './shared/mention';
|
|
22
|
-
export { EmojiSharedCssClassName } from './shared/emoji';
|
|
23
20
|
export { StatusSharedCssClassName } from './shared/status';
|
|
24
21
|
export { smartCardSharedStyles, SmartCardSharedCssClassName, } from './shared/smart-card';
|
|
@@ -1,5 +1,54 @@
|
|
|
1
1
|
import { PanelType } from '@atlaskit/adf-schema';
|
|
2
2
|
import { ThemeProps } from '@atlaskit/theme/types';
|
|
3
|
+
export declare const darkPanelColors: {
|
|
4
|
+
info: string;
|
|
5
|
+
error: string;
|
|
6
|
+
warning: string;
|
|
7
|
+
tip: string;
|
|
8
|
+
success: string;
|
|
9
|
+
note: string;
|
|
10
|
+
R900: string;
|
|
11
|
+
R100S: string;
|
|
12
|
+
R300S: string;
|
|
13
|
+
R500S: string;
|
|
14
|
+
R800S: string;
|
|
15
|
+
R1200S: string;
|
|
16
|
+
Y900: string;
|
|
17
|
+
Y100S: string;
|
|
18
|
+
Y300S: string;
|
|
19
|
+
Y500S: string;
|
|
20
|
+
Y800S: string;
|
|
21
|
+
Y1200S: string;
|
|
22
|
+
G900: string;
|
|
23
|
+
G100S: string;
|
|
24
|
+
G300S: string;
|
|
25
|
+
G400S: string;
|
|
26
|
+
G900S: string;
|
|
27
|
+
G1200S: string;
|
|
28
|
+
B900: string;
|
|
29
|
+
B100S: string;
|
|
30
|
+
B300S: string;
|
|
31
|
+
B500S: string;
|
|
32
|
+
B800S: string;
|
|
33
|
+
B1200S: string;
|
|
34
|
+
P900: string;
|
|
35
|
+
P100S: string;
|
|
36
|
+
P300S: string;
|
|
37
|
+
P500S: string;
|
|
38
|
+
P800S: string;
|
|
39
|
+
P1200S: string;
|
|
40
|
+
T900: string;
|
|
41
|
+
T100S: string;
|
|
42
|
+
T300S: string;
|
|
43
|
+
T400S: string;
|
|
44
|
+
T900S: string;
|
|
45
|
+
T1200S: string;
|
|
46
|
+
DarkGray: string;
|
|
47
|
+
Gray: string;
|
|
48
|
+
LightGray: string;
|
|
49
|
+
TextColor: string;
|
|
50
|
+
};
|
|
51
|
+
export declare const getPanelDarkColor: (panelColor: string) => string;
|
|
3
52
|
export declare const getPanelBackgroundDarkModeColors: string;
|
|
4
53
|
export declare function getPanelDarkModeCSS(colorName: string, colorValue: string): string;
|
|
5
54
|
export declare const PanelSharedCssClassName: {
|
|
@@ -14,13 +63,20 @@ export declare const PanelSharedSelectors: {
|
|
|
14
63
|
errorPanel: string;
|
|
15
64
|
successPanel: string;
|
|
16
65
|
noteButton: string;
|
|
66
|
+
warningButton: string;
|
|
17
67
|
removeButton: string;
|
|
18
68
|
colorPalette: string;
|
|
19
69
|
selectedColor: string;
|
|
20
70
|
removeEmojiIcon: string;
|
|
21
71
|
emojiIcon: string;
|
|
22
72
|
selectedEmoji: string;
|
|
73
|
+
addYourOwnEmoji: string;
|
|
74
|
+
emojiNameInCustomEmoji: string;
|
|
23
75
|
title: string;
|
|
76
|
+
emojiPopup: string;
|
|
77
|
+
searchEmoji: string;
|
|
78
|
+
orangeWarningIcon: string;
|
|
79
|
+
yellowWarningIcon: string;
|
|
24
80
|
};
|
|
25
81
|
export declare const getPanelTypeBackground: (panelType: Exclude<PanelType, PanelType.CUSTOM>, props?: ThemeProps) => string;
|
|
26
82
|
export declare const panelSharedStyles: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<import("@atlaskit/theme/types").AtlaskitThemeProps | import("@atlaskit/theme/types").CustomThemeProps | import("@atlaskit/theme/types").NoThemeProps | undefined, any>>[];
|
|
@@ -18,6 +18,7 @@ export declare const TableSharedCssClassName: {
|
|
|
18
18
|
TABLE_STICKY_SENTINEL_BOTTOM: string;
|
|
19
19
|
TABLE_CELL_NODEVIEW_CONTENT_DOM: string;
|
|
20
20
|
TABLE_CELL_WRAPPER: string;
|
|
21
|
+
TABLE_HEADER_CELL_WRAPPER: string;
|
|
21
22
|
};
|
|
22
23
|
declare const tableSharedStyle: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<import("@atlaskit/theme").AtlaskitThemeProps | import("@atlaskit/theme").CustomThemeProps | import("@atlaskit/theme").NoThemeProps | undefined, any>>[];
|
|
23
24
|
export declare const calcTableWidth: (layout: TableLayout, containerWidth?: number | undefined, addControllerPadding?: boolean) => string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare type NewCollabSyncUpErrorAttributes = {
|
|
2
|
+
lengthOfUnconfirmedSteps?: number;
|
|
3
|
+
tries: number;
|
|
4
|
+
maxRetries: number;
|
|
5
|
+
clientId?: string;
|
|
6
|
+
version: number;
|
|
7
|
+
};
|
|
8
|
+
export declare type SyncUpErrorFunction = (attributes: NewCollabSyncUpErrorAttributes) => void;
|
|
@@ -11,3 +11,4 @@ export declare enum SortOrder {
|
|
|
11
11
|
export { AnnotationUpdateEmitter, AnnotationUpdateEvent } from './annotation';
|
|
12
12
|
export type { AnnotationState, AnnotationProviders, AnnotationUpdateEventPayloads, InlineCommentSelectionComponentProps, InlineCommentViewComponentProps, InlineCommentAnnotationProvider, OnAnnotationClickPayload, AnnotationByMatches, AnnotationActionResult, } from './annotation';
|
|
13
13
|
export type { TypeAheadItem, TypeAheadItemRenderProps } from './type-ahead';
|
|
14
|
+
export type { NewCollabSyncUpErrorAttributes, SyncUpErrorFunction, } from './collab';
|
|
@@ -16,6 +16,7 @@ export interface Props {
|
|
|
16
16
|
nodeType?: string;
|
|
17
17
|
fullWidthMode?: boolean;
|
|
18
18
|
hasFallbackContainer?: boolean;
|
|
19
|
+
handleMediaSingleRef?: React.RefObject<HTMLElement>;
|
|
19
20
|
}
|
|
20
21
|
export declare const shouldAddDefaultWrappedWidth: (layout: RichMediaLayout, width?: number | undefined, lineLength?: number | undefined) => boolean | 0 | undefined;
|
|
21
|
-
export default function MediaSingle({ layout, width, height, containerWidth, isLoading, pctWidth, className, children: propsChildren, nodeType, fullWidthMode, lineLength, hasFallbackContainer, }: Props): JSX.Element;
|
|
22
|
+
export default function MediaSingle({ layout, width, height, containerWidth, isLoading, pctWidth, className, children: propsChildren, nodeType, fullWidthMode, lineLength, hasFallbackContainer, handleMediaSingleRef, }: Props): JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { HTMLAttributes } from 'react';
|
|
1
|
+
import React, { HTMLAttributes, RefObject } from 'react';
|
|
2
2
|
import { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
|
|
3
3
|
/**
|
|
4
4
|
* Calculates the image width for non-resized images.
|
|
@@ -22,7 +22,7 @@ export interface MediaSingleWrapperProps {
|
|
|
22
22
|
layout: MediaSingleLayout;
|
|
23
23
|
pctWidth?: number;
|
|
24
24
|
width?: number;
|
|
25
|
-
innerRef?: (elem: HTMLElement) => void
|
|
25
|
+
innerRef?: ((elem: HTMLElement) => void) | RefObject<HTMLElement>;
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
28
|
* Can't use `.attrs` to handle highly dynamic styles because we are still
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { PureComponent } from 'react';
|
|
2
|
-
import { MentionUserType as UserType } from '@atlaskit/adf-schema';
|
|
3
2
|
import { ProviderFactory } from '../../provider-factory';
|
|
4
3
|
import { ProfilecardProvider } from '../../provider-factory/profile-card-provider';
|
|
5
4
|
import { MentionEventHandlers } from '../EventHandlers';
|
|
@@ -9,8 +8,6 @@ export interface MentionProps {
|
|
|
9
8
|
eventHandlers?: MentionEventHandlers;
|
|
10
9
|
text: string;
|
|
11
10
|
accessLevel?: string;
|
|
12
|
-
portal?: HTMLElement;
|
|
13
|
-
userType?: UserType;
|
|
14
11
|
}
|
|
15
12
|
export interface MentionState {
|
|
16
13
|
profilecardProvider: ProfilecardProvider | null;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { MentionUserType as UserType } from '@atlaskit/adf-schema';
|
|
1
|
+
/// <reference types="react" />
|
|
3
2
|
import { MentionProvider } from '@atlaskit/mention';
|
|
4
3
|
import { ProfilecardProvider } from '../../provider-factory/profile-card-provider';
|
|
5
4
|
import { MentionEventHandler } from '../EventHandlers';
|
|
@@ -7,32 +6,10 @@ export interface Props {
|
|
|
7
6
|
id: string;
|
|
8
7
|
text: string;
|
|
9
8
|
accessLevel?: string;
|
|
10
|
-
userType?: UserType;
|
|
11
9
|
mentionProvider?: Promise<MentionProvider>;
|
|
12
|
-
portal?: HTMLElement;
|
|
13
10
|
profilecardProvider: ProfilecardProvider;
|
|
14
11
|
onClick?: MentionEventHandler;
|
|
15
12
|
onMouseEnter?: MentionEventHandler;
|
|
16
13
|
onMouseLeave?: MentionEventHandler;
|
|
17
14
|
}
|
|
18
|
-
export
|
|
19
|
-
export declare type PopupAlignY = 'top' | 'bottom';
|
|
20
|
-
export interface State {
|
|
21
|
-
target: HTMLElement | null;
|
|
22
|
-
visible: boolean;
|
|
23
|
-
popupAlignX: PopupAlignX;
|
|
24
|
-
popupAlignY: PopupAlignY;
|
|
25
|
-
}
|
|
26
|
-
export default class MentionWithProfileCard extends PureComponent<Props, State> {
|
|
27
|
-
private domNode;
|
|
28
|
-
state: State;
|
|
29
|
-
private handleRef;
|
|
30
|
-
private calculateLayerPosition;
|
|
31
|
-
private handleMentionNodeRef;
|
|
32
|
-
private getDomNodeCenterCoords;
|
|
33
|
-
private getVisibleAreaCentreCoords;
|
|
34
|
-
private getActions;
|
|
35
|
-
private showProfilecard;
|
|
36
|
-
private hideProfilecard;
|
|
37
|
-
render(): JSX.Element;
|
|
38
|
-
}
|
|
15
|
+
export default function MentionWithProfileCard({ id, text, accessLevel, mentionProvider, profilecardProvider, onClick, onMouseEnter, onMouseLeave, }: Props): JSX.Element;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { PureComponent } from 'react';
|
|
2
|
-
import { MentionUserType as UserType } from '@atlaskit/adf-schema';
|
|
3
2
|
import { MentionProvider } from '@atlaskit/mention/resource';
|
|
4
3
|
import { ProfilecardProvider } from '../../provider-factory/profile-card-provider';
|
|
5
4
|
import { MentionEventHandlers } from '../EventHandlers';
|
|
@@ -7,11 +6,9 @@ export interface Props {
|
|
|
7
6
|
id: string;
|
|
8
7
|
text: string;
|
|
9
8
|
accessLevel?: string;
|
|
10
|
-
userType?: UserType;
|
|
11
9
|
mentionProvider?: Promise<MentionProvider>;
|
|
12
10
|
profilecardProvider?: Promise<ProfilecardProvider>;
|
|
13
11
|
eventHandlers?: MentionEventHandlers;
|
|
14
|
-
portal?: HTMLElement;
|
|
15
12
|
}
|
|
16
13
|
export interface State {
|
|
17
14
|
profilecardProvider: ProfilecardProvider | null;
|
|
@@ -46,7 +46,7 @@ export default class Popup extends React.Component<Props, State> {
|
|
|
46
46
|
private initPopup;
|
|
47
47
|
private handleRef;
|
|
48
48
|
private scheduledUpdatePosition;
|
|
49
|
-
onResize: () =>
|
|
49
|
+
onResize: () => void;
|
|
50
50
|
UNSAFE_componentWillReceiveProps(newProps: Props): void;
|
|
51
51
|
componentDidMount(): void;
|
|
52
52
|
componentWillUnmount(): void;
|
|
@@ -20,6 +20,8 @@ export declare class WidthProvider extends React.Component<WidthProviderProps, W
|
|
|
20
20
|
};
|
|
21
21
|
constructor(props: any);
|
|
22
22
|
render(): JSX.Element;
|
|
23
|
-
setWidth:
|
|
23
|
+
setWidth: ((width: number) => void) & {
|
|
24
|
+
cancel(): void;
|
|
25
|
+
};
|
|
24
26
|
}
|
|
25
27
|
export { Consumer as WidthConsumer };
|
package/dist/types/ui/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
export { default as Emoji } from './Emoji';
|
|
2
|
-
export type { EmojiProps } from './Emoji';
|
|
3
1
|
export { default as Caption } from './Caption';
|
|
4
2
|
export { default as MediaSingle, DEFAULT_IMAGE_WIDTH, DEFAULT_IMAGE_HEIGHT, wrappedLayouts, shouldAddDefaultWrappedWidth, } from './MediaSingle';
|
|
5
3
|
export type { Props as MediaSingleProps } from './MediaSingle';
|
|
@@ -7,7 +5,6 @@ export { MediaSingleDimensionHelper } from './MediaSingle/styled';
|
|
|
7
5
|
export type { MediaSingleWrapperProps as MediaSingleDimensionHelperProps } from './MediaSingle/styled';
|
|
8
6
|
export { layoutSupportsWidth, calcPxFromColumns, calcPctFromPx, calcPxFromPct, calcColumnsFromPx, snapToGrid, } from './MediaSingle/grid';
|
|
9
7
|
export { MediaLink } from './MediaSingle/link';
|
|
10
|
-
export { default as Mention } from './Mention';
|
|
11
8
|
export { default as Popup, findOverflowScrollParent } from './Popup';
|
|
12
9
|
export type { Position as PopupPosition, Props as PopupProps } from './Popup';
|
|
13
10
|
export { default as UnsupportedBlock } from './UnsupportedBlock';
|
|
@@ -16,7 +13,7 @@ export { BaseTheme, mapBreakpointToLayoutMaxWidth } from './BaseTheme';
|
|
|
16
13
|
export { default as withOuterListeners } from './with-outer-listeners';
|
|
17
14
|
export type { CardEventClickHandler, CardSurroundings, EventHandlers, LinkEventClickHandler, MentionEventHandler, MentionEventHandlers, SmartCardEventClickHandler, } from './EventHandlers';
|
|
18
15
|
export { WidthConsumer, WidthProvider, getBreakpoint } from './WidthProvider';
|
|
19
|
-
export type { WidthConsumerContext } from './WidthProvider';
|
|
16
|
+
export type { WidthConsumerContext, Breakpoints } from './WidthProvider';
|
|
20
17
|
export { default as overflowShadow, shadowClassNames } from './OverflowShadow';
|
|
21
18
|
export type { OverflowShadowOptions, OverflowShadowProps, OverflowShadowState, } from './OverflowShadow';
|
|
22
19
|
export { WithCreateAnalyticsEvent } from './WithCreateAnalyticsEvent';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "64.0.0",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
"releaseModel": "scheduled"
|
|
21
21
|
},
|
|
22
22
|
"af:exports": {
|
|
23
|
-
".": "./src/index.ts",
|
|
24
23
|
"./collab": "./src/collab.ts",
|
|
25
24
|
"./extensions": "./src/extensions.ts",
|
|
26
25
|
"./normalize-feature-flags": "./src/normalize-feature-flags.ts",
|
|
@@ -38,31 +37,33 @@
|
|
|
38
37
|
"./card": "./src/card/index.ts",
|
|
39
38
|
"./emoji": "./src/emoji.ts",
|
|
40
39
|
"./mention": "./src/mention.ts",
|
|
41
|
-
"./provider-helpers": "./src/provider-helpers/index.ts"
|
|
40
|
+
"./provider-helpers": "./src/provider-helpers/index.ts",
|
|
41
|
+
"./icons": "./src/icons/index.ts",
|
|
42
|
+
"./safe-plugin": "./src/safe-plugin/index.ts"
|
|
42
43
|
},
|
|
43
44
|
"dependencies": {
|
|
44
45
|
"@atlaskit/activity-provider": "^2.3.0",
|
|
45
|
-
"@atlaskit/adf-schema": "^
|
|
46
|
-
"@atlaskit/adf-utils": "^
|
|
47
|
-
"@atlaskit/analytics-namespaced-context": "^6.
|
|
46
|
+
"@atlaskit/adf-schema": "^22.0.0",
|
|
47
|
+
"@atlaskit/adf-utils": "^16.0.0",
|
|
48
|
+
"@atlaskit/analytics-namespaced-context": "^6.4.0",
|
|
48
49
|
"@atlaskit/analytics-next": "^8.2.0",
|
|
49
50
|
"@atlaskit/code": "^14.3.0",
|
|
50
51
|
"@atlaskit/editor-json-transformer": "^8.7.0",
|
|
51
52
|
"@atlaskit/editor-shared-styles": "^1.6.0",
|
|
52
|
-
"@atlaskit/emoji": "^64.
|
|
53
|
-
"@atlaskit/icon": "^21.
|
|
53
|
+
"@atlaskit/emoji": "^64.1.0",
|
|
54
|
+
"@atlaskit/icon": "^21.10.0",
|
|
54
55
|
"@atlaskit/in-product-testing": "^0.1.0",
|
|
55
|
-
"@atlaskit/media-card": "^73.
|
|
56
|
+
"@atlaskit/media-card": "^73.2.0",
|
|
56
57
|
"@atlaskit/media-client": "^14.3.0",
|
|
57
58
|
"@atlaskit/media-picker": "^59.0.0",
|
|
58
|
-
"@atlaskit/mention": "^
|
|
59
|
-
"@atlaskit/profilecard": "^16.
|
|
60
|
-
"@atlaskit/smart-card": "^17.
|
|
61
|
-
"@atlaskit/task-decision": "^17.
|
|
62
|
-
"@atlaskit/theme": "^12.
|
|
59
|
+
"@atlaskit/mention": "^20.0.0",
|
|
60
|
+
"@atlaskit/profilecard": "^16.2.0",
|
|
61
|
+
"@atlaskit/smart-card": "^17.1.0",
|
|
62
|
+
"@atlaskit/task-decision": "^17.3.0",
|
|
63
|
+
"@atlaskit/theme": "^12.1.0",
|
|
63
64
|
"@atlaskit/tooltip": "^17.5.0",
|
|
64
|
-
"@atlaskit/ufo": "^0.0
|
|
65
|
-
"@atlaskit/user-picker": "^8.
|
|
65
|
+
"@atlaskit/ufo": "^0.1.0",
|
|
66
|
+
"@atlaskit/user-picker": "^8.5.0",
|
|
66
67
|
"@atlaskit/width-detector": "^3.0.0",
|
|
67
68
|
"@babel/runtime": "^7.0.0",
|
|
68
69
|
"@types/prosemirror-model": "^1.11.0",
|
|
@@ -72,12 +73,12 @@
|
|
|
72
73
|
"classnames": "^2.2.5",
|
|
73
74
|
"cypress-file-upload": "^5.0.2",
|
|
74
75
|
"date-fns": "^2.17.0",
|
|
75
|
-
"lodash": "^4.17.
|
|
76
|
+
"lodash": "^4.17.21",
|
|
76
77
|
"prosemirror-model": "1.14.3",
|
|
77
78
|
"prosemirror-state": "1.3.4",
|
|
78
79
|
"prosemirror-transform": "1.3.2",
|
|
79
|
-
"prosemirror-view": "1.23.
|
|
80
|
-
"raf-schd": "^
|
|
80
|
+
"prosemirror-view": "1.23.2",
|
|
81
|
+
"raf-schd": "^4.0.3",
|
|
81
82
|
"react-loadable": "^5.1.0"
|
|
82
83
|
},
|
|
83
84
|
"peerDependencies": {
|
|
@@ -90,13 +91,14 @@
|
|
|
90
91
|
},
|
|
91
92
|
"devDependencies": {
|
|
92
93
|
"@atlaskit/editor-json-transformer": "^8.7.0",
|
|
93
|
-
"@atlaskit/editor-test-helpers": "^16.
|
|
94
|
+
"@atlaskit/editor-test-helpers": "^16.1.0",
|
|
94
95
|
"@atlaskit/media-core": "^32.2.0",
|
|
95
|
-
"@atlaskit/util-data-test": "^17.
|
|
96
|
+
"@atlaskit/util-data-test": "^17.2.0",
|
|
96
97
|
"@atlaskit/visual-regression": "*",
|
|
97
98
|
"@atlaskit/webdriver-runner": "*",
|
|
98
99
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
99
100
|
"@testing-library/react": "^8.0.1",
|
|
101
|
+
"@types/raf-schd": "^4.0.1",
|
|
100
102
|
"cypress-file-upload": "^5.0.2",
|
|
101
103
|
"enzyme": "^3.10.0",
|
|
102
104
|
"local-cypress": "^1.2.1",
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.inlineNodeSharedStyle = void 0;
|
|
9
|
-
|
|
10
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
|
-
|
|
12
|
-
var _styledComponents = require("styled-components");
|
|
13
|
-
|
|
14
|
-
var _templateObject;
|
|
15
|
-
|
|
16
|
-
var inlineNodeSharedStyle = (0, _styledComponents.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .inline-node--mobile {\n display: inline-block !important;\n }\n"])));
|
|
17
|
-
exports.inlineNodeSharedStyle = inlineNodeSharedStyle;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
|
|
3
|
-
var _templateObject;
|
|
4
|
-
|
|
5
|
-
import { css } from 'styled-components';
|
|
6
|
-
var inlineNodeSharedStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .inline-node--mobile {\n display: inline-block !important;\n }\n"])));
|
|
7
|
-
export { inlineNodeSharedStyle };
|