@atlaskit/editor-common 94.3.1 → 94.5.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 +41 -0
- package/dist/cjs/analytics/types/enums.js +3 -0
- package/dist/cjs/analytics/types/node-events.js +2 -0
- package/dist/cjs/element-browser/components/ElementList/ElementList.js +2 -2
- package/dist/cjs/media/messages/caption.js +5 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/styles/index.js +6 -0
- package/dist/cjs/styles/shared/embedCard.js +45 -18
- package/dist/cjs/styles/shared/headings.js +2 -2
- package/dist/cjs/styles/shared/media-single.js +49 -2
- package/dist/cjs/styles/shared/paragraph.js +2 -2
- package/dist/cjs/ui/DropList/index.js +15 -10
- package/dist/cjs/ui/Emoji/index.js +17 -9
- package/dist/cjs/ui-menu/Dropdown/index.js +13 -7
- package/dist/cjs/ui-menu/DropdownMenu/index.js +11 -3
- package/dist/cjs/ui-react/index.js +10 -1
- package/dist/cjs/ui-react/with-react-editor-view-outer-listeners.js +24 -13
- package/dist/es2019/analytics/types/enums.js +3 -0
- package/dist/es2019/analytics/types/node-events.js +2 -0
- package/dist/es2019/element-browser/components/ElementList/ElementList.js +2 -2
- package/dist/es2019/media/messages/caption.js +5 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/styles/index.js +1 -1
- package/dist/es2019/styles/shared/embedCard.js +26 -1
- package/dist/es2019/styles/shared/headings.js +2 -2
- package/dist/es2019/styles/shared/media-single.js +68 -1
- package/dist/es2019/styles/shared/paragraph.js +2 -2
- package/dist/es2019/ui/DropList/index.js +7 -2
- package/dist/es2019/ui/Emoji/index.js +10 -8
- package/dist/es2019/ui-menu/Dropdown/index.js +6 -5
- package/dist/es2019/ui-menu/DropdownMenu/index.js +12 -4
- package/dist/es2019/ui-react/index.js +1 -1
- package/dist/es2019/ui-react/with-react-editor-view-outer-listeners.js +23 -14
- package/dist/esm/analytics/types/enums.js +3 -0
- package/dist/esm/analytics/types/node-events.js +2 -0
- package/dist/esm/element-browser/components/ElementList/ElementList.js +2 -2
- package/dist/esm/media/messages/caption.js +5 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/styles/index.js +1 -1
- package/dist/esm/styles/shared/embedCard.js +45 -18
- package/dist/esm/styles/shared/headings.js +2 -2
- package/dist/esm/styles/shared/media-single.js +49 -2
- package/dist/esm/styles/shared/paragraph.js +2 -2
- package/dist/esm/ui/DropList/index.js +15 -10
- package/dist/esm/ui/Emoji/index.js +14 -8
- package/dist/esm/ui-menu/Dropdown/index.js +14 -8
- package/dist/esm/ui-menu/DropdownMenu/index.js +12 -4
- package/dist/esm/ui-react/index.js +1 -1
- package/dist/esm/ui-react/with-react-editor-view-outer-listeners.js +23 -14
- package/dist/types/analytics/types/enums.d.ts +5 -2
- package/dist/types/analytics/types/index.d.ts +1 -1
- package/dist/types/analytics/types/media-events.d.ts +6 -2
- package/dist/types/analytics/types/node-events.d.ts +6 -4
- package/dist/types/media/messages/caption.d.ts +5 -0
- package/dist/types/styles/index.d.ts +1 -1
- package/dist/types/styles/shared/embedCard.d.ts +1 -1
- package/dist/types/styles/shared/media-single.d.ts +2 -1
- package/dist/types/ui/DropList/index.d.ts +6 -2
- package/dist/types/ui/Emoji/index.d.ts +3 -3
- package/dist/types/ui/index.d.ts +1 -1
- package/dist/types/ui-react/index.d.ts +1 -1
- package/dist/types/ui-react/with-react-editor-view-outer-listeners.d.ts +1 -0
- package/dist/types-ts4.5/analytics/types/enums.d.ts +5 -2
- package/dist/types-ts4.5/analytics/types/index.d.ts +1 -1
- package/dist/types-ts4.5/analytics/types/media-events.d.ts +6 -2
- package/dist/types-ts4.5/analytics/types/node-events.d.ts +6 -4
- package/dist/types-ts4.5/media/messages/caption.d.ts +5 -0
- package/dist/types-ts4.5/styles/index.d.ts +1 -1
- package/dist/types-ts4.5/styles/shared/embedCard.d.ts +1 -1
- package/dist/types-ts4.5/styles/shared/media-single.d.ts +2 -1
- package/dist/types-ts4.5/ui/DropList/index.d.ts +6 -2
- package/dist/types-ts4.5/ui/Emoji/index.d.ts +3 -3
- package/dist/types-ts4.5/ui/index.d.ts +1 -1
- package/dist/types-ts4.5/ui-react/index.d.ts +1 -1
- package/dist/types-ts4.5/ui-react/with-react-editor-view-outer-listeners.d.ts +1 -0
- package/package.json +15 -6
|
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
import { isFedRamp } from './environment';
|
|
8
8
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
9
9
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
10
|
-
var packageVersion = "94.
|
|
10
|
+
var packageVersion = "94.5.0";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// TODO: Sanitise the URL instead of just removing it
|
package/dist/esm/styles/index.js
CHANGED
|
@@ -3,7 +3,7 @@ export { backgroundColorStyles } from './shared/background-color';
|
|
|
3
3
|
export { tableSharedStyle, tableMarginTop, tableMarginBottom, tableMarginSides, tableCellMinWidth, tableNewColumnMinWidth, tableCellBorderWidth, calcTableWidth, TableSharedCssClassName, tableResizeHandleWidth, tableCellPadding, tableMarginTopWithControl } from './shared/table';
|
|
4
4
|
export { AnnotationSharedClassNames, BlockAnnotationSharedClassNames, AnnotationSharedCSSByState, annotationSharedStyles } from './shared/annotation';
|
|
5
5
|
export { columnLayoutSharedStyle } from './shared/column-layout';
|
|
6
|
-
export { mediaSingleSharedStyle, richMediaClassName } from './shared/media-single';
|
|
6
|
+
export { mediaSingleSharedStyle, mediaSingleSharedStyleNew, richMediaClassName } from './shared/media-single';
|
|
7
7
|
export { blockquoteSharedStyles } from './shared/blockquote';
|
|
8
8
|
export { headingsSharedStyles } from './shared/headings';
|
|
9
9
|
export { ruleSharedStyles } from './shared/rule';
|
|
@@ -1,27 +1,54 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
|
+
import { akEditorWrappedNodeZIndex } from '@atlaskit/editor-shared-styles';
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
4
|
-
export var embedCardStyles =
|
|
5
|
-
|
|
6
|
-
'.ProseMirror': {
|
|
6
|
+
export var embedCardStyles = function embedCardStyles() {
|
|
7
|
+
return fg('platform_editor_element_dnd_nested_fix_patch_3') ? css({
|
|
7
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
'.ProseMirror': {
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
11
|
+
".embedCardView-content-wrap[layout^='wrap-']": {
|
|
12
|
+
maxWidth: '100%',
|
|
13
|
+
position: 'relative',
|
|
14
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
15
|
+
zIndex: akEditorWrappedNodeZIndex
|
|
16
|
+
},
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
18
|
+
".embedCardView-content-wrap[layout='wrap-left']": {
|
|
19
|
+
float: 'left'
|
|
20
|
+
},
|
|
21
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
22
|
+
".embedCardView-content-wrap[layout='wrap-right']": {
|
|
23
|
+
float: 'right'
|
|
24
|
+
},
|
|
25
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
26
|
+
".embedCardView-content-wrap[layout='wrap-right'] + .embedCardView-content-wrap[layout='wrap-left']": {
|
|
27
|
+
clear: 'both'
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}) : css({
|
|
19
31
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
20
|
-
|
|
21
|
-
|
|
32
|
+
'.ProseMirror': {
|
|
33
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
34
|
+
".embedCardView-content-wrap[layout^='wrap-']": {
|
|
35
|
+
maxWidth: '100%'
|
|
36
|
+
},
|
|
37
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
38
|
+
".embedCardView-content-wrap[layout='wrap-left']": {
|
|
39
|
+
float: 'left'
|
|
40
|
+
},
|
|
41
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
42
|
+
".embedCardView-content-wrap[layout='wrap-right']": {
|
|
43
|
+
float: 'right'
|
|
44
|
+
},
|
|
45
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
46
|
+
".embedCardView-content-wrap[layout='wrap-right'] + .embedCardView-content-wrap[layout='wrap-left']": {
|
|
47
|
+
clear: 'both'
|
|
48
|
+
}
|
|
22
49
|
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
50
|
+
});
|
|
51
|
+
};
|
|
25
52
|
|
|
26
53
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
27
54
|
export var embedSpacingStyles = css({
|
|
@@ -9,7 +9,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
10
|
import { css } from '@emotion/react';
|
|
11
11
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
13
12
|
import editorUGCToken from '../../ugc-tokens/get-editor-ugc-token';
|
|
14
13
|
var headingWithAlignmentStyles = function headingWithAlignmentStyles() {
|
|
15
14
|
return (
|
|
@@ -48,7 +47,7 @@ var headingWithAlignmentStyles = function headingWithAlignmentStyles() {
|
|
|
48
47
|
// @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
|
|
49
48
|
// text sizing prototype: http://proto/fabricrender/
|
|
50
49
|
export var headingsSharedStyles = function headingsSharedStyles(typographyTheme) {
|
|
51
|
-
var isADSTokenMigrationEnabled =
|
|
50
|
+
var isADSTokenMigrationEnabled = fg('platform_editor_typography_ugc');
|
|
52
51
|
if (isADSTokenMigrationEnabled) {
|
|
53
52
|
return css(_objectSpread({
|
|
54
53
|
'& h1': {
|
|
@@ -72,6 +71,7 @@ export var headingsSharedStyles = function headingsSharedStyles(typographyTheme)
|
|
|
72
71
|
},
|
|
73
72
|
'& h5': {
|
|
74
73
|
font: editorUGCToken('editor.font.heading.h5', typographyTheme),
|
|
74
|
+
marginTop: '1.667em',
|
|
75
75
|
textTransform: 'none'
|
|
76
76
|
},
|
|
77
77
|
'& h6': {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
var _css;
|
|
2
|
+
var _css, _css2;
|
|
3
3
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
4
|
import { css } from '@emotion/react';
|
|
5
|
+
import { akEditorWrappedNodeZIndex } from '@atlaskit/editor-shared-styles';
|
|
5
6
|
var richMediaClassName = 'rich-media-item';
|
|
6
7
|
var wrappedMediaBreakoutPoint = 410;
|
|
7
8
|
var mediaSingleSharedStyle = css((_css = {}, _defineProperty(_css, "li .".concat(richMediaClassName), {
|
|
@@ -46,6 +47,52 @@ var mediaSingleSharedStyle = css((_css = {}, _defineProperty(_css, "li .".concat
|
|
|
46
47
|
margin: "var(--ds-space-150, 12px)".concat(" 0")
|
|
47
48
|
}
|
|
48
49
|
}), _css));
|
|
50
|
+
var mediaSingleSharedStyleNew = css((_css2 = {}, _defineProperty(_css2, "li .".concat(richMediaClassName), {
|
|
51
|
+
margin: 0
|
|
52
|
+
}), _defineProperty(_css2, '&.ua-chrome li > .mediaSingleView-content-wrap::before', {
|
|
53
|
+
content: "''",
|
|
54
|
+
display: 'block',
|
|
55
|
+
height: 0
|
|
56
|
+
}), _defineProperty(_css2, '&.ua-firefox', {
|
|
57
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
58
|
+
'.mediaSingleView-content-wrap': {
|
|
59
|
+
userSelect: 'none'
|
|
60
|
+
},
|
|
61
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
62
|
+
'.captionView-content-wrap': {
|
|
63
|
+
userSelect: 'text'
|
|
64
|
+
}
|
|
65
|
+
}), _defineProperty(_css2, ".mediaSingleView-content-wrap[layout^='wrap-']", {
|
|
66
|
+
position: 'relative',
|
|
67
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
68
|
+
zIndex: akEditorWrappedNodeZIndex
|
|
69
|
+
}), _defineProperty(_css2, ".mediaSingleView-content-wrap[layout='center']", {
|
|
70
|
+
clear: 'both'
|
|
71
|
+
}), _defineProperty(_css2, "table .".concat(richMediaClassName), {
|
|
72
|
+
marginTop: "var(--ds-space-150, 12px)",
|
|
73
|
+
marginBottom: "var(--ds-space-150, 12px)",
|
|
74
|
+
clear: 'both',
|
|
75
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
76
|
+
'&.image-wrap-left[data-layout], &.image-wrap-right[data-layout]': {
|
|
77
|
+
clear: 'none',
|
|
78
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
79
|
+
'&:first-child': {
|
|
80
|
+
marginTop: "var(--ds-space-150, 12px)"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}), _defineProperty(_css2, ".".concat(richMediaClassName, ".image-wrap-right + .").concat(richMediaClassName, ".image-wrap-left"), {
|
|
84
|
+
clear: 'both'
|
|
85
|
+
}), _defineProperty(_css2, ".".concat(richMediaClassName, ".image-wrap-left + .").concat(richMediaClassName, ".image-wrap-right, .").concat(richMediaClassName, ".image-wrap-right + .").concat(richMediaClassName, ".image-wrap-left, .").concat(richMediaClassName, ".image-wrap-left + .").concat(richMediaClassName, ".image-wrap-left, .").concat(richMediaClassName, ".image-wrap-right + .").concat(richMediaClassName, ".image-wrap-right"), {
|
|
86
|
+
marginRight: 0,
|
|
87
|
+
marginLeft: 0
|
|
88
|
+
}), _defineProperty(_css2, "@media all and (max-width: ".concat(wrappedMediaBreakoutPoint, "px)"), {
|
|
89
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
90
|
+
"div.mediaSingleView-content-wrap[layout='wrap-left'], div.mediaSingleView-content-wrap[data-layout='wrap-left'], div.mediaSingleView-content-wrap[layout='wrap-right'], div.mediaSingleView-content-wrap[data-layout='wrap-right']": {
|
|
91
|
+
float: 'none',
|
|
92
|
+
overflow: 'auto',
|
|
93
|
+
margin: "var(--ds-space-150, 12px)".concat(" 0")
|
|
94
|
+
}
|
|
95
|
+
}), _css2));
|
|
49
96
|
|
|
50
97
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
51
|
-
export { mediaSingleSharedStyle, richMediaClassName };
|
|
98
|
+
export { mediaSingleSharedStyle, mediaSingleSharedStyleNew, richMediaClassName };
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
6
|
import { css } from '@emotion/react';
|
|
7
7
|
import { akEditorLineHeight, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
|
|
8
|
-
import {
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
9
|
import editorUGCToken from '../../ugc-tokens/get-editor-ugc-token';
|
|
10
10
|
|
|
11
11
|
// @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
|
|
12
12
|
export var paragraphSharedStyles = function paragraphSharedStyles(typographyTheme) {
|
|
13
|
-
return
|
|
13
|
+
return fg('platform_editor_typography_ugc') ? css({
|
|
14
14
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
15
15
|
'& p': {
|
|
16
16
|
font: editorUGCToken('editor.font.body', typographyTheme),
|
|
@@ -21,7 +21,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
21
21
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "94.
|
|
24
|
+
var packageVersion = "94.5.0";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -129,6 +129,10 @@ var DropList = /*#__PURE__*/function (_Component) {
|
|
|
129
129
|
ref.focus();
|
|
130
130
|
}
|
|
131
131
|
});
|
|
132
|
+
_defineProperty(_assertThisInitialized(_this), "handleDroplistRef", function (ref) {
|
|
133
|
+
var _this$props$onDroplis, _this$props;
|
|
134
|
+
(_this$props$onDroplis = (_this$props = _this.props).onDroplistRef) === null || _this$props$onDroplis === void 0 || _this$props$onDroplis.call(_this$props, ref);
|
|
135
|
+
});
|
|
132
136
|
_defineProperty(_assertThisInitialized(_this), "handleTriggerRef", function (ref) {
|
|
133
137
|
_this.triggerRef = ref;
|
|
134
138
|
});
|
|
@@ -137,14 +141,14 @@ var DropList = /*#__PURE__*/function (_Component) {
|
|
|
137
141
|
_createClass(DropList, [{
|
|
138
142
|
key: "render",
|
|
139
143
|
value: function render() {
|
|
140
|
-
var _this$
|
|
141
|
-
children = _this$
|
|
142
|
-
isOpen = _this$
|
|
143
|
-
position = _this$
|
|
144
|
-
trigger = _this$
|
|
145
|
-
onPositioned = _this$
|
|
146
|
-
testId = _this$
|
|
147
|
-
id = _this$
|
|
144
|
+
var _this$props2 = this.props,
|
|
145
|
+
children = _this$props2.children,
|
|
146
|
+
isOpen = _this$props2.isOpen,
|
|
147
|
+
position = _this$props2.position,
|
|
148
|
+
trigger = _this$props2.trigger,
|
|
149
|
+
onPositioned = _this$props2.onPositioned,
|
|
150
|
+
testId = _this$props2.testId,
|
|
151
|
+
id = _this$props2.id;
|
|
148
152
|
var layerContent = isOpen ? jsx("div", {
|
|
149
153
|
css: this.menuWrapper,
|
|
150
154
|
"data-role": "droplistContent",
|
|
@@ -154,7 +158,8 @@ var DropList = /*#__PURE__*/function (_Component) {
|
|
|
154
158
|
role: "presentation"
|
|
155
159
|
}, children) : null;
|
|
156
160
|
return jsx("div", {
|
|
157
|
-
css: this.wrapperStyles
|
|
161
|
+
css: this.wrapperStyles,
|
|
162
|
+
ref: this.handleDroplistRef
|
|
158
163
|
}, jsx(Layer, {
|
|
159
164
|
content: layerContent,
|
|
160
165
|
offset: dropOffset,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
2
|
import { ResourcedEmoji } from '@atlaskit/emoji/element';
|
|
3
3
|
var EmojiNodeFunctional = function EmojiNodeFunctional(props) {
|
|
4
4
|
var _resourceConfig$optim;
|
|
@@ -10,6 +10,16 @@ var EmojiNodeFunctional = function EmojiNodeFunctional(props) {
|
|
|
10
10
|
showTooltip = props.showTooltip,
|
|
11
11
|
resourceConfig = props.resourceConfig,
|
|
12
12
|
emojiProvider = props.emojiProvider;
|
|
13
|
+
var emojiId = useMemo(function () {
|
|
14
|
+
return {
|
|
15
|
+
shortName: shortName,
|
|
16
|
+
id: id,
|
|
17
|
+
fallback: fallback
|
|
18
|
+
};
|
|
19
|
+
}, [shortName, id, fallback]);
|
|
20
|
+
var emojiProviderResolver = useMemo(function () {
|
|
21
|
+
return Promise.resolve(emojiProvider);
|
|
22
|
+
}, [emojiProvider]);
|
|
13
23
|
if (allowTextFallback && !emojiProvider) {
|
|
14
24
|
return /*#__PURE__*/React.createElement("span", {
|
|
15
25
|
"data-emoji-id": id,
|
|
@@ -21,12 +31,8 @@ var EmojiNodeFunctional = function EmojiNodeFunctional(props) {
|
|
|
21
31
|
return null;
|
|
22
32
|
}
|
|
23
33
|
return /*#__PURE__*/React.createElement(ResourcedEmoji, {
|
|
24
|
-
emojiId:
|
|
25
|
-
|
|
26
|
-
fallback: fallback,
|
|
27
|
-
shortName: shortName
|
|
28
|
-
},
|
|
29
|
-
emojiProvider: Promise.resolve(emojiProvider),
|
|
34
|
+
emojiId: emojiId,
|
|
35
|
+
emojiProvider: emojiProviderResolver,
|
|
30
36
|
showTooltip: showTooltip,
|
|
31
37
|
fitToHeight: fitToHeight,
|
|
32
38
|
optimistic: true,
|
|
@@ -41,4 +47,4 @@ var EmojiNodeFunctional = function EmojiNodeFunctional(props) {
|
|
|
41
47
|
var EmojiNode = function EmojiNode(props) {
|
|
42
48
|
return /*#__PURE__*/React.createElement(EmojiNodeFunctional, props);
|
|
43
49
|
};
|
|
44
|
-
export default EmojiNode;
|
|
50
|
+
export default /*#__PURE__*/React.memo(EmojiNode);
|
|
@@ -9,7 +9,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
9
9
|
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
10
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
11
|
import React, { PureComponent } from 'react';
|
|
12
|
-
import { withReactEditorViewOuterListeners } from '../../ui-react';
|
|
12
|
+
import { OutsideClickTargetRefContext, withReactEditorViewOuterListeners } from '../../ui-react';
|
|
13
13
|
import DropdownList from '../../ui/DropList';
|
|
14
14
|
import Popup from '../../ui/Popup';
|
|
15
15
|
import { ArrowKeyNavigationProvider } from '../ArrowKeyNavigationProvider';
|
|
@@ -26,10 +26,13 @@ export var Dropdown = /*#__PURE__*/function (_PureComponent) {
|
|
|
26
26
|
var _this;
|
|
27
27
|
_classCallCheck(this, Dropdown);
|
|
28
28
|
_this = _super.call(this, props);
|
|
29
|
-
_defineProperty(_assertThisInitialized(_this), "handleRef", function (
|
|
30
|
-
|
|
31
|
-
target
|
|
32
|
-
|
|
29
|
+
_defineProperty(_assertThisInitialized(_this), "handleRef", function (setOutsideClickTargetRef) {
|
|
30
|
+
return function (target) {
|
|
31
|
+
setOutsideClickTargetRef(target);
|
|
32
|
+
_this.setState({
|
|
33
|
+
target: target || undefined
|
|
34
|
+
});
|
|
35
|
+
};
|
|
33
36
|
});
|
|
34
37
|
_defineProperty(_assertThisInitialized(_this), "updatePopupPlacement", function (placement) {
|
|
35
38
|
_this.setState({
|
|
@@ -101,12 +104,15 @@ export var Dropdown = /*#__PURE__*/function (_PureComponent) {
|
|
|
101
104
|
}, {
|
|
102
105
|
key: "render",
|
|
103
106
|
value: function render() {
|
|
107
|
+
var _this2 = this;
|
|
104
108
|
var _this$props2 = this.props,
|
|
105
109
|
trigger = _this$props2.trigger,
|
|
106
110
|
isOpen = _this$props2.isOpen;
|
|
107
|
-
return /*#__PURE__*/React.createElement(
|
|
108
|
-
|
|
109
|
-
|
|
111
|
+
return /*#__PURE__*/React.createElement(OutsideClickTargetRefContext.Consumer, null, function (setOutsideClickTargetRef) {
|
|
112
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
113
|
+
ref: _this2.handleRef(setOutsideClickTargetRef)
|
|
114
|
+
}, trigger), isOpen ? _this2.renderDropdown() : null);
|
|
115
|
+
});
|
|
110
116
|
}
|
|
111
117
|
}]);
|
|
112
118
|
return Dropdown;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _objectDestructuringEmpty from "@babel/runtime/helpers/objectDestructuringEmpty";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
5
4
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
6
5
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
7
6
|
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
@@ -9,6 +8,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
9
8
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
10
9
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
11
10
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
11
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
12
12
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
13
13
|
var _excluded = ["children"];
|
|
14
14
|
var _templateObject, _templateObject2;
|
|
@@ -29,7 +29,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
29
29
|
import Tooltip from '@atlaskit/tooltip';
|
|
30
30
|
import { DropdownMenuSharedCssClassName } from '../../styles';
|
|
31
31
|
import { KeyDownHandlerContext } from '../../ui-menu/ToolbarArrowKeyNavigationProvider';
|
|
32
|
-
import { withReactEditorViewOuterListeners } from '../../ui-react';
|
|
32
|
+
import { OutsideClickTargetRefContext, withReactEditorViewOuterListeners } from '../../ui-react';
|
|
33
33
|
import DropList from '../../ui/DropList';
|
|
34
34
|
import Popup from '../../ui/Popup';
|
|
35
35
|
import { ArrowKeyNavigationProvider } from '../ArrowKeyNavigationProvider';
|
|
@@ -57,7 +57,13 @@ var buttonStyles = function buttonStyles(isActive, submenuActive) {
|
|
|
57
57
|
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\t\t\t> span:hover[aria-disabled='false'] {\n\t\t\t\tcolor: ", ";\n\t\t\t\tbackground-color: ", ";\n\t\t\t}\n\t\t\t", "\n\t\t\t> span[aria-disabled='true'] {\n\t\t\t\tcolor: ", ";\n\t\t\t}\n\t\t\t:focus > span[aria-disabled='false'] {\n\t\t\t\t", ";\n\t\t\t}\n\t\t\t:focus-visible,\n\t\t\t:focus-visible > span[aria-disabled='false'] {\n\t\t\t\toutline: none;\n\t\t\t}\n\t\t"])), "var(--ds-text, #172B4D)", "var(--ds-background-neutral-subtle-hovered, rgb(244, 245, 247))", !submenuActive && "\n\t\t\t\t\t> span:active[aria-disabled='false'] {\n\t\t\t\t\t\tbackground-color: ".concat("var(--ds-background-neutral-subtle-pressed, rgb(179, 212, 255))", ";\n\t\t\t\t\t}"), "var(--ds-text-disabled, #091E424F)", focusedMenuItemStyle); // The default focus-visible style is removed to ensure consistency across browsers
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
|
-
var
|
|
60
|
+
var DropListWithOutsideClickTargetRef = function DropListWithOutsideClickTargetRef(props) {
|
|
61
|
+
var setOutsideClickTargetRef = React.useContext(OutsideClickTargetRefContext);
|
|
62
|
+
return jsx(DropList, _extends({
|
|
63
|
+
onDroplistRef: setOutsideClickTargetRef
|
|
64
|
+
}, props));
|
|
65
|
+
};
|
|
66
|
+
var DropListWithOutsideListeners = withReactEditorViewOuterListeners(DropListWithOutsideClickTargetRef);
|
|
61
67
|
|
|
62
68
|
/**
|
|
63
69
|
* Wrapper around @atlaskit/droplist which uses Popup and Portal to render
|
|
@@ -305,7 +311,9 @@ export function DropdownMenuItem(_ref) {
|
|
|
305
311
|
// From time to time we don't want to have any tabIndex on item wrapper
|
|
306
312
|
// especially when we pass any interactive element as a item.content
|
|
307
313
|
var tabIndex = item.wrapperTabIndex === null ? undefined : item.wrapperTabIndex || -1;
|
|
308
|
-
var dropListItem =
|
|
314
|
+
var dropListItem =
|
|
315
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
316
|
+
jsx("div", {
|
|
309
317
|
css: function css() {
|
|
310
318
|
return buttonStyles(item.isActive, submenuActive);
|
|
311
319
|
},
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as ReactEditorViewContext } from './ReactEditorViewContext';
|
|
2
|
-
export { default as withReactEditorViewOuterListeners } from './with-react-editor-view-outer-listeners';
|
|
2
|
+
export { default as withReactEditorViewOuterListeners, OutsideClickTargetRefContext } from './with-react-editor-view-outer-listeners';
|
|
@@ -10,11 +10,15 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
10
10
|
var _excluded = ["handleClickOutside", "handleEnterKeydown", "handleEscapeKeydown", "closeOnTab"];
|
|
11
11
|
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
12
12
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
13
|
-
import React, { PureComponent, useEffect, useState } from 'react';
|
|
13
|
+
import React, { PureComponent, useCallback, useEffect, useRef, useState } from 'react';
|
|
14
14
|
import ReactDOM from 'react-dom';
|
|
15
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
16
|
import ReactEditorViewContext from './ReactEditorViewContext';
|
|
17
|
+
// Use this context to pass in the reference of the element that should be considered as the outside click target
|
|
18
|
+
// The outside click target is the element that should be clicked outside of to trigger the `handleClickOutside` event
|
|
19
|
+
export var OutsideClickTargetRefContext = /*#__PURE__*/React.createContext(function () {});
|
|
16
20
|
|
|
17
|
-
// This needs exporting to be used
|
|
21
|
+
// This needs exporting to be used alongside `withReactEditorViewOuterListeners`
|
|
18
22
|
var WithOutsideClick = /*#__PURE__*/function (_PureComponent) {
|
|
19
23
|
_inherits(WithOutsideClick, _PureComponent);
|
|
20
24
|
var _super = _createSuper(WithOutsideClick);
|
|
@@ -26,19 +30,17 @@ var WithOutsideClick = /*#__PURE__*/function (_PureComponent) {
|
|
|
26
30
|
}
|
|
27
31
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
28
32
|
_defineProperty(_assertThisInitialized(_this), "handleClick", function (evt) {
|
|
29
|
-
if (!_this.props.isActiveComponent) {
|
|
33
|
+
if (!_this.props.isActiveComponent || !_this.props.handleClickOutside) {
|
|
30
34
|
return;
|
|
31
35
|
}
|
|
32
|
-
var domNode = ReactDOM.findDOMNode(_assertThisInitialized(_this));
|
|
36
|
+
var domNode = fg('platform_editor_replace_finddomnode_in_common') ? _this.props.outsideClickTargetRef.current : ReactDOM.findDOMNode(_assertThisInitialized(_this));
|
|
33
37
|
if (!domNode || evt.target instanceof Node && !domNode.contains(evt.target)) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
(_this$props$editorVie2 = _this.props.editorView) === null || _this$props$editorVie2 === void 0 || _this$props$editorVie2.focus();
|
|
41
|
-
}
|
|
38
|
+
var _this$props$editorVie;
|
|
39
|
+
_this.props.handleClickOutside(evt);
|
|
40
|
+
// When the menus are closed by clicking outside the focus is set on editor.
|
|
41
|
+
if (!((_this$props$editorVie = _this.props.editorView) !== null && _this$props$editorVie !== void 0 && _this$props$editorVie.hasFocus())) {
|
|
42
|
+
var _this$props$editorVie2;
|
|
43
|
+
(_this$props$editorVie2 = _this.props.editorView) === null || _this$props$editorVie2 === void 0 || _this$props$editorVie2.focus();
|
|
42
44
|
}
|
|
43
45
|
}
|
|
44
46
|
});
|
|
@@ -107,6 +109,10 @@ export default function withReactEditorViewOuterListeners(Component) {
|
|
|
107
109
|
_useState2 = _slicedToArray(_useState, 2),
|
|
108
110
|
isActiveComponent = _useState2[0],
|
|
109
111
|
setActiveComponent = _useState2[1];
|
|
112
|
+
var outsideClickTargetRef = useRef(null);
|
|
113
|
+
var setOutsideClickTargetRef = useCallback(function (el) {
|
|
114
|
+
outsideClickTargetRef.current = el;
|
|
115
|
+
}, [outsideClickTargetRef]);
|
|
110
116
|
useEffect(function () {
|
|
111
117
|
requestAnimationFrame(function () {
|
|
112
118
|
setActiveComponent(isActiveProp);
|
|
@@ -116,17 +122,20 @@ export default function withReactEditorViewOuterListeners(Component) {
|
|
|
116
122
|
var editorView = _ref2.editorView,
|
|
117
123
|
popupsMountPoint = _ref2.popupsMountPoint,
|
|
118
124
|
editorRef = _ref2.editorRef;
|
|
119
|
-
return /*#__PURE__*/React.createElement(
|
|
125
|
+
return /*#__PURE__*/React.createElement(OutsideClickTargetRefContext.Provider, {
|
|
126
|
+
value: setOutsideClickTargetRef
|
|
127
|
+
}, /*#__PURE__*/React.createElement(WithOutsideClick, {
|
|
120
128
|
editorView: editorView,
|
|
121
129
|
editorRef: editorRef,
|
|
122
130
|
targetRef: props.targetRef,
|
|
131
|
+
outsideClickTargetRef: outsideClickTargetRef,
|
|
123
132
|
popupsMountPoint: popupsMountPoint,
|
|
124
133
|
isActiveComponent: isActiveComponent,
|
|
125
134
|
handleClickOutside: handleClickOutside,
|
|
126
135
|
handleEnterKeydown: handleEnterKeydown,
|
|
127
136
|
handleEscapeKeydown: handleEscapeKeydown,
|
|
128
137
|
closeOnTab: closeOnTab
|
|
129
|
-
}, /*#__PURE__*/React.createElement(Component, props));
|
|
138
|
+
}, /*#__PURE__*/React.createElement(Component, props)));
|
|
130
139
|
});
|
|
131
140
|
};
|
|
132
141
|
}
|
|
@@ -37,6 +37,7 @@ export declare enum ACTION {
|
|
|
37
37
|
DISMISSED = "dismissed",
|
|
38
38
|
DISPATCHED_INVALID_TRANSACTION = "dispatchedInvalidTransaction",
|
|
39
39
|
DISPATCHED_VALID_TRANSACTION = "dispatchedValidTransaction",
|
|
40
|
+
DOUBLE_CLICKED = "doubleClicked",
|
|
40
41
|
DRAGGED = "dragged",
|
|
41
42
|
EDITED = "edited",
|
|
42
43
|
EDITOR_CRASHED = "unhandledErrorCaught",
|
|
@@ -185,7 +186,8 @@ export declare enum INPUT_METHOD {
|
|
|
185
186
|
DATASOURCE = "datasource_config",
|
|
186
187
|
TABLE_CONTEXT_MENU = "tableContextMenu",
|
|
187
188
|
MOUSE = "mouse",
|
|
188
|
-
BROWSER = "browser"
|
|
189
|
+
BROWSER = "browser",
|
|
190
|
+
DOUBLE_CLICK = "doubleClick"
|
|
189
191
|
}
|
|
190
192
|
export declare enum INSERT_MEDIA_VIA {
|
|
191
193
|
LOCAL_UPLOAD = "localUpload",
|
|
@@ -259,7 +261,8 @@ export declare enum ACTION_SUBJECT {
|
|
|
259
261
|
ELEMENT = "element",
|
|
260
262
|
CONTEXT_MENU = "contextMenu",
|
|
261
263
|
INLINE_DIALOG = "inlineDialog",
|
|
262
|
-
ENGAGEMENT_PLATFORM = "engagementPlatform"
|
|
264
|
+
ENGAGEMENT_PLATFORM = "engagementPlatform",
|
|
265
|
+
MEDIA_VIEWER = "mediaViewer"
|
|
263
266
|
}
|
|
264
267
|
export declare enum ACTION_SUBJECT_ID {
|
|
265
268
|
ACTION = "action",
|
|
@@ -12,7 +12,7 @@ export { CHANGE_ALIGNMENT_REASON, TABLE_ACTION, TABLE_BREAKOUT, TABLE_OVERFLOW_C
|
|
|
12
12
|
export type { TableEventPayload, OverflowStateInfo } from './table-events';
|
|
13
13
|
export { PasteContents, PasteSources, PasteTypes } from './paste-events';
|
|
14
14
|
export type { PASTE_ACTION_SUBJECT_ID, PasteContent, PasteEventPayload, PasteSource, PasteType, } from './paste-events';
|
|
15
|
-
export type { MediaSwitchType, MediaAltTextActionType, MediaEventPayload, MediaLinkAEP, CaptionTrackAction, MediaResizeTrackAction, MediaInputResizeTrackAction, } from './media-events';
|
|
15
|
+
export type { MediaSwitchType, MediaAltTextActionType, MediaEventPayload, MediaLinkAEP, CaptionTrackAction, MediaResizeTrackAction, MediaInputResizeTrackAction, MediaViewerEventAction, } from './media-events';
|
|
16
16
|
export type { MoveContentEventPayload } from './move-content-events';
|
|
17
17
|
export type { DispatchAnalyticsEvent } from './dispatch-analytics-event';
|
|
18
18
|
export { DELETE_DIRECTION, LIST_TEXT_SCENARIOS, JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST, OUTDENT_SCENARIOS, } from './list-events';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RichMediaLayout } from '@atlaskit/adf-schema';
|
|
2
2
|
import type { GuidelineTypes, WidthTypes } from '../../guideline/types';
|
|
3
|
-
import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID } from './enums';
|
|
3
|
+
import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, INPUT_METHOD } from './enums';
|
|
4
4
|
import type { EventInput } from './type-ahead';
|
|
5
5
|
import type { ChangeTypeAEP, TrackAEP, UIAEP } from './utils';
|
|
6
6
|
type MediaBorderActionType = ACTION.UPDATED | ACTION.ADDED | ACTION.DELETED;
|
|
@@ -37,6 +37,10 @@ type ChangeMediaAEP = ChangeTypeAEP<ACTION_SUBJECT.MEDIA, undefined, {
|
|
|
37
37
|
newType: MediaSwitchType;
|
|
38
38
|
previousType: MediaSwitchType;
|
|
39
39
|
}, undefined>;
|
|
40
|
+
export type MediaViewerEventAction = UIAEP<ACTION.OPENED, ACTION_SUBJECT.MEDIA_VIEWER, ACTION_SUBJECT_ID.MEDIA, {
|
|
41
|
+
nodeType: string;
|
|
42
|
+
inputMethod: INPUT_METHOD.DOUBLE_CLICK;
|
|
43
|
+
}, undefined>;
|
|
40
44
|
export type MediaAltTextActionType = ACTION.ADDED | ACTION.CLOSED | ACTION.EDITED | ACTION.CLEARED | ACTION.OPENED;
|
|
41
|
-
export type MediaEventPayload = MediaLinkAEP | MediaAltTextAction | MediaUIAction | MediaResizeTrackAction | MediaInputResizeTrackAction | MediaBorderTrackAction | CaptionTrackAction | ChangeMediaAEP;
|
|
45
|
+
export type MediaEventPayload = MediaLinkAEP | MediaAltTextAction | MediaUIAction | MediaResizeTrackAction | MediaInputResizeTrackAction | MediaBorderTrackAction | CaptionTrackAction | ChangeMediaAEP | MediaViewerEventAction;
|
|
42
46
|
export {};
|
|
@@ -7,7 +7,9 @@ export declare enum LAYOUT_TYPE {
|
|
|
7
7
|
THREE_COLS_EQUAL = "threeColumnsEqual",
|
|
8
8
|
LEFT_SIDEBAR = "twoColumnsLeftSidebar",
|
|
9
9
|
RIGHT_SIDEBAR = "twoColumnsRightSidebar",
|
|
10
|
-
THREE_WITH_SIDEBARS = "threeColumnsWithSidebars "
|
|
10
|
+
THREE_WITH_SIDEBARS = "threeColumnsWithSidebars ",
|
|
11
|
+
FOUR_COLS_EQUAL = "fourColumnsEqual",
|
|
12
|
+
FIVE_COLS_EQUAL = "fiveColumnsEqual"
|
|
11
13
|
}
|
|
12
14
|
export declare enum SMART_LINK_TYPE {
|
|
13
15
|
INLINE_CARD = "inline",
|
|
@@ -36,11 +38,11 @@ type DeletedSmartLink = TrackAEP<ACTION.DELETED, ACTION_SUBJECT.SMART_LINK, ACTI
|
|
|
36
38
|
displayMode: ACTION_SUBJECT_ID.CARD_BLOCK | ACTION_SUBJECT_ID.CARD_INLINE;
|
|
37
39
|
}, undefined>;
|
|
38
40
|
type ChangedLayoutAEP = TrackAEP<ACTION.CHANGED_LAYOUT, ACTION_SUBJECT.LAYOUT, undefined, {
|
|
39
|
-
previousLayout
|
|
40
|
-
newLayout
|
|
41
|
+
previousLayout?: LAYOUT_TYPE;
|
|
42
|
+
newLayout?: LAYOUT_TYPE;
|
|
41
43
|
}, undefined>;
|
|
42
44
|
type DeletedLayoutAEP = TrackAEP<ACTION.DELETED, ACTION_SUBJECT.LAYOUT, undefined, {
|
|
43
|
-
layout
|
|
45
|
+
layout?: LAYOUT_TYPE;
|
|
44
46
|
}, undefined>;
|
|
45
47
|
type DeletedExpandAEP = TrackAEP<ACTION.DELETED, ACTION_SUBJECT.EXPAND | ACTION_SUBJECT.NESTED_EXPAND, undefined, {
|
|
46
48
|
inputMethod: INPUT_METHOD.TOOLBAR;
|
|
@@ -3,7 +3,7 @@ export { backgroundColorStyles } from './shared/background-color';
|
|
|
3
3
|
export { tableSharedStyle, tableMarginTop, tableMarginBottom, tableMarginSides, tableCellMinWidth, tableNewColumnMinWidth, tableCellBorderWidth, calcTableWidth, TableSharedCssClassName, tableResizeHandleWidth, tableCellPadding, tableMarginTopWithControl, } from './shared/table';
|
|
4
4
|
export { AnnotationSharedClassNames, BlockAnnotationSharedClassNames, AnnotationSharedCSSByState, annotationSharedStyles, } from './shared/annotation';
|
|
5
5
|
export { columnLayoutSharedStyle } from './shared/column-layout';
|
|
6
|
-
export { mediaSingleSharedStyle, richMediaClassName } from './shared/media-single';
|
|
6
|
+
export { mediaSingleSharedStyle, mediaSingleSharedStyleNew, richMediaClassName, } from './shared/media-single';
|
|
7
7
|
export { blockquoteSharedStyles } from './shared/blockquote';
|
|
8
8
|
export { headingsSharedStyles } from './shared/headings';
|
|
9
9
|
export { ruleSharedStyles } from './shared/rule';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const embedCardStyles: import("@emotion/react").SerializedStyles;
|
|
1
|
+
export declare const embedCardStyles: () => import("@emotion/react").SerializedStyles;
|
|
2
2
|
export declare const embedSpacingStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
declare const richMediaClassName = "rich-media-item";
|
|
2
2
|
declare const mediaSingleSharedStyle: import("@emotion/react").SerializedStyles;
|
|
3
|
-
|
|
3
|
+
declare const mediaSingleSharedStyleNew: import("@emotion/react").SerializedStyles;
|
|
4
|
+
export { mediaSingleSharedStyle, mediaSingleSharedStyleNew, richMediaClassName };
|
|
@@ -4,8 +4,11 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { ReactNode } from 'react';
|
|
6
6
|
import type { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
7
|
-
interface Props extends WithAnalyticsEventsProps {
|
|
7
|
+
export interface Props extends WithAnalyticsEventsProps {
|
|
8
8
|
isOpen?: boolean;
|
|
9
|
+
appearance?: string;
|
|
10
|
+
shouldFlip?: boolean;
|
|
11
|
+
isTriggerNotTabbable?: boolean;
|
|
9
12
|
trigger?: React.ReactNode;
|
|
10
13
|
position: string;
|
|
11
14
|
onOpenChange?: (event: OpenChangedEvent) => void;
|
|
@@ -14,10 +17,11 @@ interface Props extends WithAnalyticsEventsProps {
|
|
|
14
17
|
shouldFitContainer: boolean;
|
|
15
18
|
children?: ReactNode;
|
|
16
19
|
id?: string;
|
|
20
|
+
onDroplistRef?: (ref: HTMLDivElement | null) => unknown;
|
|
17
21
|
}
|
|
18
22
|
export type OpenChangedEvent = {
|
|
19
23
|
isOpen: boolean;
|
|
20
24
|
event: MouseEvent | KeyboardEvent;
|
|
21
25
|
};
|
|
22
|
-
declare const _default: import("react").ForwardRefExoticComponent<Pick<Omit<Props, keyof WithAnalyticsEventsProps> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "position" | "key" | "id" | "children" | "testId" | "analyticsContext" | "shouldFitContainer" | "onPositioned" | "isOpen" | "trigger" | "onOpenChange"> & import("react").RefAttributes<any>>;
|
|
26
|
+
declare const _default: import("react").ForwardRefExoticComponent<Pick<Omit<Props, keyof WithAnalyticsEventsProps> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "appearance" | "position" | "key" | "id" | "children" | "testId" | "analyticsContext" | "shouldFitContainer" | "onPositioned" | "isOpen" | "shouldFlip" | "isTriggerNotTabbable" | "trigger" | "onOpenChange" | "onDroplistRef"> & import("react").RefAttributes<any>>;
|
|
23
27
|
export default _default;
|