@atlaskit/editor-plugin-card 2.0.3 → 2.0.5
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 +21 -0
- package/dist/cjs/nodeviews/datasource.js +3 -1
- package/dist/cjs/pm-plugins/doc.js +2 -0
- package/dist/cjs/toolbar.js +28 -26
- package/dist/cjs/ui/AwarenessWrapper/index.js +1 -1
- package/dist/cjs/ui/EditLinkToolbar.js +2 -1
- package/dist/cjs/ui/EditToolbarButton.js +97 -65
- package/dist/cjs/ui/HyperlinkToolbarAppearance.js +2 -1
- package/dist/cjs/ui/InlineCardOverlay/index.js +4 -0
- package/dist/cjs/ui/LayoutButton/index.js +2 -0
- package/dist/cjs/ui/LeftIconOverlay/ConfigureLinkDropdown/index.js +5 -5
- package/dist/cjs/ui/LeftIconOverlay/index.js +6 -1
- package/dist/cjs/ui/ResizableEmbedCard.js +2 -0
- package/dist/es2019/nodeviews/datasource.js +3 -1
- package/dist/es2019/pm-plugins/doc.js +2 -0
- package/dist/es2019/toolbar.js +24 -22
- package/dist/es2019/ui/AwarenessWrapper/index.js +1 -1
- package/dist/es2019/ui/EditLinkToolbar.js +2 -1
- package/dist/es2019/ui/EditToolbarButton.js +95 -62
- package/dist/es2019/ui/HyperlinkToolbarAppearance.js +2 -1
- package/dist/es2019/ui/InlineCardOverlay/index.js +6 -0
- package/dist/es2019/ui/LayoutButton/index.js +2 -0
- package/dist/es2019/ui/LeftIconOverlay/ConfigureLinkDropdown/index.js +12 -12
- package/dist/es2019/ui/LeftIconOverlay/index.js +6 -1
- package/dist/es2019/ui/ResizableEmbedCard.js +2 -0
- package/dist/esm/nodeviews/datasource.js +3 -1
- package/dist/esm/pm-plugins/doc.js +2 -0
- package/dist/esm/toolbar.js +28 -26
- package/dist/esm/ui/AwarenessWrapper/index.js +1 -1
- package/dist/esm/ui/EditLinkToolbar.js +2 -1
- package/dist/esm/ui/EditToolbarButton.js +98 -66
- package/dist/esm/ui/HyperlinkToolbarAppearance.js +2 -1
- package/dist/esm/ui/InlineCardOverlay/index.js +4 -0
- package/dist/esm/ui/LayoutButton/index.js +2 -0
- package/dist/esm/ui/LeftIconOverlay/ConfigureLinkDropdown/index.js +12 -12
- package/dist/esm/ui/LeftIconOverlay/index.js +6 -1
- package/dist/esm/ui/ResizableEmbedCard.js +2 -0
- package/dist/types/ui/EditLinkToolbar.d.ts +1 -1
- package/dist/types/ui/EditToolbarButton.d.ts +3 -2
- package/dist/types-ts4.5/ui/EditLinkToolbar.d.ts +1 -1
- package/dist/types-ts4.5/ui/EditToolbarButton.d.ts +3 -2
- package/package.json +129 -147
|
@@ -4,7 +4,7 @@ import { useCallback, useMemo, useRef, useState } from 'react';
|
|
|
4
4
|
import { css, jsx } from '@emotion/react';
|
|
5
5
|
import { FormattedMessage } from 'react-intl-next';
|
|
6
6
|
import { linkToolbarMessages, cardMessages as messages } from '@atlaskit/editor-common/messages';
|
|
7
|
-
import { FloatingToolbarButton as Button } from '@atlaskit/editor-common/ui';
|
|
7
|
+
import { FloatingToolbarButton as Button, FloatingToolbarSeparator as Separator } from '@atlaskit/editor-common/ui';
|
|
8
8
|
import { ArrowKeyNavigationType, DropdownContainer as UiDropdown } from '@atlaskit/editor-common/ui-menu';
|
|
9
9
|
import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
10
10
|
import { ButtonItem } from '@atlaskit/menu';
|
|
@@ -16,19 +16,20 @@ import { useFetchDatasourceInfo } from './useFetchDatasourceInfo';
|
|
|
16
16
|
var dropdownExpandContainer = css({
|
|
17
17
|
margin: "0px ".concat("var(--ds-space-negative-050, -4px)")
|
|
18
18
|
});
|
|
19
|
-
var
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
19
|
+
var EditToolbarButtonWithCardContext = function EditToolbarButtonWithCardContext(props) {
|
|
20
|
+
var _response$datasourceI;
|
|
21
|
+
var url = props.url,
|
|
22
|
+
cardContext = props.cardContext,
|
|
23
|
+
intl = props.intl,
|
|
24
|
+
editorAnalyticsApi = props.editorAnalyticsApi,
|
|
25
|
+
editorView = props.editorView,
|
|
26
|
+
onLinkEditClick = props.onLinkEditClick;
|
|
27
|
+
var response = useFetchDatasourceInfo({
|
|
28
|
+
isRegularCardNode: true,
|
|
29
|
+
url: url,
|
|
30
|
+
cardContext: cardContext
|
|
31
|
+
});
|
|
32
|
+
var datasourceId = (_response$datasourceI = response.datasourceId) !== null && _response$datasourceI !== void 0 ? _response$datasourceI : props.datasourceId;
|
|
32
33
|
var _useState = useState(false),
|
|
33
34
|
_useState2 = _slicedToArray(_useState, 2),
|
|
34
35
|
isOpen = _useState2[0],
|
|
@@ -53,73 +54,104 @@ var EditButtonWithCardContext = function EditButtonWithCardContext(_ref) {
|
|
|
53
54
|
var onEditLink = useCallback(function () {
|
|
54
55
|
dispatchCommand(onLinkEditClick);
|
|
55
56
|
}, [dispatchCommand, onLinkEditClick]);
|
|
56
|
-
var
|
|
57
|
+
var editVariant = useMemo(function () {
|
|
58
|
+
var hasUrl = url !== null && url !== undefined;
|
|
57
59
|
if (!datasourceId || !isDatasourceConfigEditable(datasourceId)) {
|
|
58
|
-
|
|
60
|
+
if (hasUrl) {
|
|
61
|
+
return 'edit-link';
|
|
62
|
+
}
|
|
63
|
+
return 'none';
|
|
59
64
|
}
|
|
60
|
-
if (
|
|
65
|
+
if (hasUrl) {
|
|
61
66
|
var _cardContext$store, _urlState$error;
|
|
62
67
|
var urlState = cardContext === null || cardContext === void 0 || (_cardContext$store = cardContext.store) === null || _cardContext$store === void 0 ? void 0 : _cardContext$store.getState()[url];
|
|
63
68
|
if ((urlState === null || urlState === void 0 || (_urlState$error = urlState.error) === null || _urlState$error === void 0 ? void 0 : _urlState$error.kind) === 'fatal') {
|
|
64
|
-
return
|
|
69
|
+
return 'edit-link';
|
|
65
70
|
}
|
|
71
|
+
return 'edit-dropdown';
|
|
72
|
+
} else {
|
|
73
|
+
return 'edit-datasource';
|
|
66
74
|
}
|
|
67
|
-
return false;
|
|
68
75
|
}, [cardContext === null || cardContext === void 0 ? void 0 : cardContext.store, datasourceId, url]);
|
|
69
76
|
var onEditDatasource = useCallback(function () {
|
|
70
77
|
if (datasourceId) {
|
|
71
78
|
dispatchCommand(editDatasource(datasourceId, editorAnalyticsApi));
|
|
72
79
|
}
|
|
73
80
|
}, [dispatchCommand, datasourceId, editorAnalyticsApi]);
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
81
|
+
switch (editVariant) {
|
|
82
|
+
case 'edit-link':
|
|
83
|
+
{
|
|
84
|
+
return jsx(Flex, {
|
|
85
|
+
gap: "space.050"
|
|
86
|
+
}, jsx(Button, {
|
|
87
|
+
testId: "edit-link",
|
|
88
|
+
onClick: onEditLink
|
|
89
|
+
}, jsx(FormattedMessage, linkToolbarMessages.editLink)), jsx(Separator, null));
|
|
90
|
+
}
|
|
91
|
+
case 'edit-datasource':
|
|
92
|
+
{
|
|
93
|
+
return jsx(Flex, {
|
|
94
|
+
gap: "space.050"
|
|
95
|
+
}, jsx(Button, {
|
|
96
|
+
testId: "edit-datasource",
|
|
97
|
+
tooltipContent: intl.formatMessage(linkToolbarMessages.editDatasourceStandaloneTooltip),
|
|
98
|
+
onClick: onEditDatasource
|
|
99
|
+
}, jsx(FormattedMessage, linkToolbarMessages.editDatasourceStandalone)), jsx(Separator, null));
|
|
100
|
+
}
|
|
101
|
+
case 'edit-dropdown':
|
|
102
|
+
{
|
|
103
|
+
var trigger = jsx(Flex, {
|
|
104
|
+
gap: "space.050"
|
|
105
|
+
}, jsx(Button, {
|
|
106
|
+
testId: "edit-dropdown-trigger",
|
|
107
|
+
iconAfter: jsx("span", {
|
|
108
|
+
css: dropdownExpandContainer
|
|
109
|
+
}, jsx(ExpandIcon, {
|
|
110
|
+
label: intl.formatMessage(messages.editDropdownTriggerTitle)
|
|
111
|
+
})),
|
|
112
|
+
onClick: toggleOpen,
|
|
113
|
+
selected: isOpen,
|
|
114
|
+
disabled: false,
|
|
115
|
+
ariaHasPopup: true
|
|
116
|
+
}, jsx(FormattedMessage, messages.editDropdownTriggerTitle)), jsx(Separator, null));
|
|
117
|
+
return jsx(Flex, {
|
|
118
|
+
ref: containerRef
|
|
119
|
+
}, jsx(UiDropdown, {
|
|
120
|
+
mountTo: containerRef.current,
|
|
121
|
+
isOpen: isOpen,
|
|
122
|
+
handleClickOutside: onClose,
|
|
123
|
+
handleEscapeKeydown: onClose,
|
|
124
|
+
trigger: trigger,
|
|
125
|
+
scrollableElement: containerRef.current,
|
|
126
|
+
arrowKeyNavigationProviderOptions: {
|
|
127
|
+
type: ArrowKeyNavigationType.MENU
|
|
128
|
+
}
|
|
129
|
+
}, jsx(ButtonItem, {
|
|
130
|
+
key: "edit.link",
|
|
131
|
+
onClick: onEditLink,
|
|
132
|
+
testId: "edit-dropdown-edit-link-item"
|
|
133
|
+
}, jsx(FormattedMessage, messages.editDropdownEditLinkTitle)), jsx(ButtonItem, {
|
|
134
|
+
key: "edit.datasource",
|
|
135
|
+
onClick: onEditDatasource,
|
|
136
|
+
testId: "edit-dropdown-edit-datasource-item"
|
|
137
|
+
}, jsx(FormattedMessage, messages.editDropdownEditDatasourceTitle))));
|
|
138
|
+
}
|
|
139
|
+
case 'none':
|
|
140
|
+
default:
|
|
141
|
+
return null;
|
|
79
142
|
}
|
|
80
|
-
var trigger = jsx(Button, {
|
|
81
|
-
testId: "edit-dropdown-trigger",
|
|
82
|
-
iconAfter: jsx("span", {
|
|
83
|
-
css: dropdownExpandContainer
|
|
84
|
-
}, jsx(ExpandIcon, {
|
|
85
|
-
label: intl.formatMessage(messages.editDropdownTriggerTitle)
|
|
86
|
-
})),
|
|
87
|
-
onClick: toggleOpen,
|
|
88
|
-
selected: isOpen,
|
|
89
|
-
disabled: false,
|
|
90
|
-
ariaHasPopup: true
|
|
91
|
-
}, jsx(FormattedMessage, messages.editDropdownTriggerTitle));
|
|
92
|
-
return jsx(Flex, {
|
|
93
|
-
ref: containerRef
|
|
94
|
-
}, jsx(UiDropdown, {
|
|
95
|
-
mountTo: containerRef.current,
|
|
96
|
-
isOpen: isOpen,
|
|
97
|
-
handleClickOutside: onClose,
|
|
98
|
-
handleEscapeKeydown: onClose,
|
|
99
|
-
trigger: trigger,
|
|
100
|
-
scrollableElement: containerRef.current,
|
|
101
|
-
arrowKeyNavigationProviderOptions: {
|
|
102
|
-
type: ArrowKeyNavigationType.MENU
|
|
103
|
-
}
|
|
104
|
-
}, jsx(ButtonItem, {
|
|
105
|
-
key: "edit.link",
|
|
106
|
-
onClick: onEditLink,
|
|
107
|
-
testId: "edit-dropdown-edit-link-item"
|
|
108
|
-
}, jsx(FormattedMessage, messages.editDropdownEditLinkTitle)), jsx(ButtonItem, {
|
|
109
|
-
key: "edit.datasource",
|
|
110
|
-
onClick: onEditDatasource,
|
|
111
|
-
testId: "edit-dropdown-edit-datasource-item"
|
|
112
|
-
}, jsx(FormattedMessage, messages.editDropdownEditDatasourceTitle))));
|
|
113
143
|
};
|
|
114
|
-
export var EditToolbarButton = function EditToolbarButton(
|
|
115
|
-
var
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
144
|
+
export var EditToolbarButton = function EditToolbarButton(props) {
|
|
145
|
+
var datasourceId = props.datasourceId,
|
|
146
|
+
intl = props.intl,
|
|
147
|
+
editorAnalyticsApi = props.editorAnalyticsApi,
|
|
148
|
+
url = props.url,
|
|
149
|
+
editorView = props.editorView,
|
|
150
|
+
onLinkEditClick = props.onLinkEditClick;
|
|
151
|
+
return jsx(CardContextProvider, null, function (_ref) {
|
|
152
|
+
var cardContext = _ref.cardContext;
|
|
153
|
+
return jsx(EditToolbarButtonWithCardContext, {
|
|
154
|
+
datasourceId: datasourceId,
|
|
123
155
|
url: url,
|
|
124
156
|
intl: intl,
|
|
125
157
|
editorAnalyticsApi: editorAnalyticsApi,
|
|
@@ -11,6 +11,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
11
11
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
12
12
|
import React, { Component } from 'react';
|
|
13
13
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
14
|
+
import { FloatingToolbarSeparator as Separator } from '@atlaskit/editor-common/ui';
|
|
14
15
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
15
16
|
import { Flex } from '@atlaskit/primitives';
|
|
16
17
|
import { DatasourceAppearanceButton } from './DatasourceAppearanceButton';
|
|
@@ -173,7 +174,7 @@ export var HyperlinkToolbarAppearance = /*#__PURE__*/function (_Component) {
|
|
|
173
174
|
editorView: editorView,
|
|
174
175
|
editorAnalyticsApi: editorAnalyticsApi,
|
|
175
176
|
inputMethod: INPUT_METHOD.FLOATING_TB
|
|
176
|
-
}));
|
|
177
|
+
}), /*#__PURE__*/React.createElement(Separator, null));
|
|
177
178
|
}
|
|
178
179
|
}]);
|
|
179
180
|
return HyperlinkToolbarAppearance;
|
|
@@ -33,9 +33,11 @@ var getGradientWithColor = function getGradientWithColor(color) {
|
|
|
33
33
|
var containerStyles = css({
|
|
34
34
|
position: 'relative',
|
|
35
35
|
lineHeight: 'normal',
|
|
36
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
36
37
|
':active': (_active = {}, _defineProperty(_active, ".".concat(ICON_AND_LABEL_CLASSNAME), {
|
|
37
38
|
background: SMART_LINK_ACTIVE_COLOR
|
|
38
39
|
}), _defineProperty(_active, ".".concat(OVERLAY_GRADIENT_CLASSNAME), {
|
|
40
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
39
41
|
background: getGradientWithColor(SMART_LINK_ACTIVE_COLOR)
|
|
40
42
|
}), _active)
|
|
41
43
|
});
|
|
@@ -62,6 +64,7 @@ var showOverlayStyles = css({
|
|
|
62
64
|
});
|
|
63
65
|
var iconStyles = css({
|
|
64
66
|
// Position icon in the middle
|
|
67
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
65
68
|
span: {
|
|
66
69
|
display: 'flex'
|
|
67
70
|
}
|
|
@@ -92,6 +95,7 @@ var overflowingContainerStyles = css({
|
|
|
92
95
|
var gradientStyles = css({
|
|
93
96
|
width: '2.5rem',
|
|
94
97
|
height: '100%',
|
|
98
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
95
99
|
background: getGradientWithColor(SMART_LINK_BACKGROUND_COLOR)
|
|
96
100
|
});
|
|
97
101
|
var InlineCardOverlay = function InlineCardOverlay(_ref) {
|
|
@@ -20,8 +20,10 @@ import { getDatasource, isDatasourceTableLayout } from './utils';
|
|
|
20
20
|
var toolbarButtonWrapperStyles = css({
|
|
21
21
|
background: "".concat("var(--ds-background-neutral, ".concat(N20A, ")")),
|
|
22
22
|
color: "".concat("var(--ds-icon, ".concat(N300, ")")),
|
|
23
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
23
24
|
':hover': {
|
|
24
25
|
background: "".concat("var(--ds-background-neutral-hovered, ".concat(B300, ")")),
|
|
26
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
25
27
|
color: "var(--ds-icon, white)".concat(" !important")
|
|
26
28
|
}
|
|
27
29
|
});
|
|
@@ -2,13 +2,13 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["triggerRef"];
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { useIntl } from
|
|
6
|
-
import Button from
|
|
7
|
-
import DropdownMenu, { DropdownItem, DropdownItemGroup } from
|
|
8
|
-
import { cardMessages as messages } from
|
|
9
|
-
import ChevronDownIcon from
|
|
10
|
-
import PreferencesIcon from
|
|
11
|
-
import ShortcutIcon from
|
|
5
|
+
import { useIntl } from 'react-intl-next';
|
|
6
|
+
import Button from '@atlaskit/button/new';
|
|
7
|
+
import DropdownMenu, { DropdownItem, DropdownItemGroup } from '@atlaskit/dropdown-menu';
|
|
8
|
+
import { cardMessages as messages } from '@atlaskit/editor-common/messages';
|
|
9
|
+
import ChevronDownIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
10
|
+
import PreferencesIcon from '@atlaskit/icon/glyph/preferences';
|
|
11
|
+
import ShortcutIcon from '@atlaskit/icon/glyph/shortcut';
|
|
12
12
|
var ConfigureLinkDropdown = function ConfigureLinkDropdown(props) {
|
|
13
13
|
var testId = props.testId;
|
|
14
14
|
var intl = useIntl();
|
|
@@ -19,7 +19,7 @@ var ConfigureLinkDropdown = function ConfigureLinkDropdown(props) {
|
|
|
19
19
|
var triggerRef = _ref.triggerRef,
|
|
20
20
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
21
21
|
return /*#__PURE__*/React.createElement(Button, _extends({}, props, {
|
|
22
|
-
spacing:
|
|
22
|
+
spacing: 'none',
|
|
23
23
|
ref: triggerRef
|
|
24
24
|
}), /*#__PURE__*/React.createElement("span", {
|
|
25
25
|
style: {
|
|
@@ -31,17 +31,17 @@ var ConfigureLinkDropdown = function ConfigureLinkDropdown(props) {
|
|
|
31
31
|
testId: "".concat(testId, "-icon")
|
|
32
32
|
})));
|
|
33
33
|
},
|
|
34
|
-
spacing:
|
|
35
|
-
placement:
|
|
34
|
+
spacing: 'compact',
|
|
35
|
+
placement: 'bottom-start'
|
|
36
36
|
}, /*#__PURE__*/React.createElement(DropdownItemGroup, null, /*#__PURE__*/React.createElement(DropdownItem, {
|
|
37
37
|
elemBefore: /*#__PURE__*/React.createElement(ShortcutIcon, {
|
|
38
38
|
label: goToLinkLabel,
|
|
39
|
-
size:
|
|
39
|
+
size: 'small'
|
|
40
40
|
})
|
|
41
41
|
}, goToLinkLabel), /*#__PURE__*/React.createElement(DropdownItem, {
|
|
42
42
|
elemBefore: /*#__PURE__*/React.createElement(PreferencesIcon, {
|
|
43
43
|
label: configureLinkLabel,
|
|
44
|
-
size:
|
|
44
|
+
size: 'small'
|
|
45
45
|
})
|
|
46
46
|
}, configureLinkLabel)));
|
|
47
47
|
};
|
|
@@ -45,12 +45,15 @@ var showOverlayStyles = css({
|
|
|
45
45
|
});
|
|
46
46
|
var iconStyles = css({
|
|
47
47
|
background: CONFIGURE_ICON_BACKGROUND_COLOR,
|
|
48
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
48
49
|
':hover': {
|
|
49
50
|
background: CONFIGURE_ICON_BACKGROUND_HOVERED_COLOR
|
|
50
51
|
},
|
|
52
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
51
53
|
':active': {
|
|
52
54
|
background: CONFIGURE_ICON_BACKGROUND_ACTIVE_COLOR
|
|
53
55
|
},
|
|
56
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
54
57
|
span: {
|
|
55
58
|
// If PreferencesIcon left as inline-block (default), height is incorrect and border radius is clipped when parent element
|
|
56
59
|
// uses 1lh height (rather than 100%)
|
|
@@ -169,7 +172,9 @@ var LeftIconOverlay = function LeftIconOverlay(_ref) {
|
|
|
169
172
|
tabIndex: -1,
|
|
170
173
|
"data-testid": testId
|
|
171
174
|
}, jsx("span", _extends({}, tooltipProps, {
|
|
172
|
-
css: iconAndLabelStyles
|
|
175
|
+
css: iconAndLabelStyles
|
|
176
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
177
|
+
,
|
|
173
178
|
className: ICON_AND_LABEL_CLASSNAME
|
|
174
179
|
}), jsx("span", {
|
|
175
180
|
css: iconStyles
|
|
@@ -360,9 +360,11 @@ var ResizableEmbedCard = /*#__PURE__*/function (_React$Component) {
|
|
|
360
360
|
return jsx("div", {
|
|
361
361
|
"data-testid": "resizable-embed-card-spacing"
|
|
362
362
|
}, jsx("div", {
|
|
363
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
363
364
|
css: wrapperStyle({
|
|
364
365
|
layout: layout,
|
|
365
366
|
isResized: !!pctWidth,
|
|
367
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
366
368
|
containerWidth: containerWidth || DEFAULT_EMBED_CARD_WIDTH,
|
|
367
369
|
fullWidthMode: fullWidthMode
|
|
368
370
|
})
|
|
@@ -26,7 +26,7 @@ export declare class EditLinkToolbar extends React.Component<EditLinkToolbarProp
|
|
|
26
26
|
private hideLinkToolbar;
|
|
27
27
|
render(): JSX.Element;
|
|
28
28
|
}
|
|
29
|
-
export declare const editLink: (editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
|
|
29
|
+
export declare const editLink: (editorAnalyticsApi: EditorAnalyticsAPI | undefined, scrollIntoView: boolean) => Command;
|
|
30
30
|
export declare const buildEditLinkToolbar: ({ providerFactory, node, pluginInjectionApi, linkPicker, lpLinkPicker, }: {
|
|
31
31
|
providerFactory: ProviderFactory;
|
|
32
32
|
node: Node;
|
|
@@ -4,7 +4,8 @@ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
|
4
4
|
import type { Command } from '@atlaskit/editor-common/types';
|
|
5
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
import type { CardContext } from '@atlaskit/link-provider';
|
|
7
|
-
export interface
|
|
7
|
+
export interface EditDatasourceToolbarButtonProps {
|
|
8
|
+
datasourceId?: string;
|
|
8
9
|
intl: IntlShape;
|
|
9
10
|
editorAnalyticsApi?: EditorAnalyticsAPI;
|
|
10
11
|
url?: string;
|
|
@@ -12,4 +13,4 @@ export interface EditToolbarButtonProps {
|
|
|
12
13
|
cardContext?: CardContext;
|
|
13
14
|
onLinkEditClick: Command;
|
|
14
15
|
}
|
|
15
|
-
export declare const EditToolbarButton: (
|
|
16
|
+
export declare const EditToolbarButton: (props: EditDatasourceToolbarButtonProps) => jsx.JSX.Element;
|
|
@@ -26,7 +26,7 @@ export declare class EditLinkToolbar extends React.Component<EditLinkToolbarProp
|
|
|
26
26
|
private hideLinkToolbar;
|
|
27
27
|
render(): JSX.Element;
|
|
28
28
|
}
|
|
29
|
-
export declare const editLink: (editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
|
|
29
|
+
export declare const editLink: (editorAnalyticsApi: EditorAnalyticsAPI | undefined, scrollIntoView: boolean) => Command;
|
|
30
30
|
export declare const buildEditLinkToolbar: ({ providerFactory, node, pluginInjectionApi, linkPicker, lpLinkPicker, }: {
|
|
31
31
|
providerFactory: ProviderFactory;
|
|
32
32
|
node: Node;
|
|
@@ -4,7 +4,8 @@ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
|
4
4
|
import type { Command } from '@atlaskit/editor-common/types';
|
|
5
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
import type { CardContext } from '@atlaskit/link-provider';
|
|
7
|
-
export interface
|
|
7
|
+
export interface EditDatasourceToolbarButtonProps {
|
|
8
|
+
datasourceId?: string;
|
|
8
9
|
intl: IntlShape;
|
|
9
10
|
editorAnalyticsApi?: EditorAnalyticsAPI;
|
|
10
11
|
url?: string;
|
|
@@ -12,4 +13,4 @@ export interface EditToolbarButtonProps {
|
|
|
12
13
|
cardContext?: CardContext;
|
|
13
14
|
onLinkEditClick: Command;
|
|
14
15
|
}
|
|
15
|
-
export declare const EditToolbarButton: (
|
|
16
|
+
export declare const EditToolbarButton: (props: EditDatasourceToolbarButtonProps) => jsx.JSX.Element;
|