@atlaskit/editor-plugin-card 4.5.9 → 4.5.11
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 +12 -0
- package/dist/cjs/cardPlugin.js +2 -1
- package/dist/cjs/nodeviews/blockCard.js +6 -1
- package/dist/cjs/nodeviews/embedCard.js +12 -2
- package/dist/cjs/nodeviews/genericCard.js +2 -0
- package/dist/cjs/nodeviews/inlineCard.js +10 -2
- package/dist/cjs/pm-plugins/doc.js +25 -5
- package/dist/cjs/pm-plugins/keymap.js +5 -0
- package/dist/cjs/pm-plugins/main.js +5 -1
- package/dist/cjs/pm-plugins/util/resolve.js +8 -2
- package/dist/cjs/pm-plugins/utils.js +4 -1
- package/dist/cjs/ui/DatasourceIcon/index.js +4 -0
- package/dist/cjs/ui/EditLinkToolbar.js +8 -2
- package/dist/cjs/ui/EditToolbarButton/EditToolbarButtonPresentation.js +20 -5
- package/dist/cjs/ui/EditToolbarButton/index.js +20 -5
- package/dist/cjs/ui/EditorLinkingPlatformAnalytics/index.js +7 -1
- package/dist/cjs/ui/HyperlinkToolbarAppearance.js +3 -0
- package/dist/cjs/ui/InlineCardOverlay/index.js +49 -45
- package/dist/cjs/ui/LayoutButton/index.js +4 -1
- package/dist/cjs/ui/ResizableEmbedCard.js +6 -1
- package/dist/cjs/ui/analytics/events-from-tr.js +3 -0
- package/dist/cjs/ui/analytics/utils.js +4 -1
- package/dist/cjs/ui/editDatasourceAction.js +4 -1
- package/dist/cjs/ui/toolbar.js +32 -7
- package/dist/es2019/cardPlugin.js +2 -0
- package/dist/es2019/nodeviews/blockCard.js +6 -1
- package/dist/es2019/nodeviews/embedCard.js +14 -4
- package/dist/es2019/nodeviews/genericCard.js +2 -0
- package/dist/es2019/nodeviews/inlineCard.js +10 -2
- package/dist/es2019/pm-plugins/doc.js +35 -9
- package/dist/es2019/pm-plugins/keymap.js +5 -0
- package/dist/es2019/pm-plugins/main.js +5 -1
- package/dist/es2019/pm-plugins/util/resolve.js +9 -3
- package/dist/es2019/pm-plugins/utils.js +8 -2
- package/dist/es2019/ui/DatasourceIcon/index.js +4 -0
- package/dist/es2019/ui/EditLinkToolbar.js +8 -2
- package/dist/es2019/ui/EditToolbarButton/EditToolbarButtonPresentation.js +20 -5
- package/dist/es2019/ui/EditToolbarButton/index.js +20 -5
- package/dist/es2019/ui/EditorLinkingPlatformAnalytics/index.js +7 -1
- package/dist/es2019/ui/HyperlinkToolbarAppearance.js +3 -0
- package/dist/es2019/ui/InlineCardOverlay/index.js +47 -43
- package/dist/es2019/ui/LayoutButton/index.js +4 -1
- package/dist/es2019/ui/LinkToolbarAppearance.js +0 -1
- package/dist/es2019/ui/ResizableEmbedCard.js +7 -2
- package/dist/es2019/ui/analytics/events-from-tr.js +3 -0
- package/dist/es2019/ui/analytics/utils.js +4 -1
- package/dist/es2019/ui/editDatasourceAction.js +4 -1
- package/dist/es2019/ui/toolbar.js +32 -7
- package/dist/esm/cardPlugin.js +2 -0
- package/dist/esm/nodeviews/blockCard.js +6 -1
- package/dist/esm/nodeviews/embedCard.js +12 -2
- package/dist/esm/nodeviews/genericCard.js +2 -0
- package/dist/esm/nodeviews/inlineCard.js +10 -2
- package/dist/esm/pm-plugins/doc.js +25 -5
- package/dist/esm/pm-plugins/keymap.js +5 -0
- package/dist/esm/pm-plugins/main.js +5 -1
- package/dist/esm/pm-plugins/util/resolve.js +8 -2
- package/dist/esm/pm-plugins/utils.js +4 -1
- package/dist/esm/ui/DatasourceIcon/index.js +4 -0
- package/dist/esm/ui/EditLinkToolbar.js +8 -2
- package/dist/esm/ui/EditToolbarButton/EditToolbarButtonPresentation.js +20 -5
- package/dist/esm/ui/EditToolbarButton/index.js +20 -5
- package/dist/esm/ui/EditorLinkingPlatformAnalytics/index.js +7 -1
- package/dist/esm/ui/HyperlinkToolbarAppearance.js +3 -0
- package/dist/esm/ui/InlineCardOverlay/index.js +49 -45
- package/dist/esm/ui/LayoutButton/index.js +4 -1
- package/dist/esm/ui/LinkToolbarAppearance.js +0 -1
- package/dist/esm/ui/ResizableEmbedCard.js +6 -1
- package/dist/esm/ui/analytics/events-from-tr.js +3 -0
- package/dist/esm/ui/analytics/utils.js +4 -1
- package/dist/esm/ui/editDatasourceAction.js +4 -1
- package/dist/esm/ui/toolbar.js +32 -7
- package/dist/types/ui/EditLinkToolbar.d.ts +1 -1
- package/dist/types/ui/LinkToolbarAppearance.d.ts +1 -1
- package/dist/types/ui/analytics/types.d.ts +1 -1
- package/dist/types-ts4.5/ui/EditLinkToolbar.d.ts +1 -1
- package/dist/types-ts4.5/ui/LinkToolbarAppearance.d.ts +1 -1
- package/dist/types-ts4.5/ui/analytics/types.d.ts +1 -1
- package/package.json +6 -6
|
@@ -94,7 +94,10 @@ var EditToolbarButtonWithCardContext = function EditToolbarButtonWithCardContext
|
|
|
94
94
|
}, jsx(Button, {
|
|
95
95
|
testId: "edit-link",
|
|
96
96
|
onClick: onEditLink
|
|
97
|
-
}, jsx(FormattedMessage
|
|
97
|
+
}, jsx(FormattedMessage
|
|
98
|
+
// Ignored via go/ees005
|
|
99
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
100
|
+
, linkToolbarMessages.editLink)), jsx(Separator, null));
|
|
98
101
|
}
|
|
99
102
|
case 'edit-datasource':
|
|
100
103
|
{
|
|
@@ -104,7 +107,10 @@ var EditToolbarButtonWithCardContext = function EditToolbarButtonWithCardContext
|
|
|
104
107
|
testId: "edit-datasource",
|
|
105
108
|
tooltipContent: intl.formatMessage(linkToolbarMessages.editDatasourceStandaloneTooltip),
|
|
106
109
|
onClick: onEditDatasource
|
|
107
|
-
}, jsx(FormattedMessage
|
|
110
|
+
}, jsx(FormattedMessage
|
|
111
|
+
// Ignored via go/ees005
|
|
112
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
113
|
+
, linkToolbarMessages.editDatasourceStandalone)), jsx(Separator, null));
|
|
108
114
|
}
|
|
109
115
|
case 'edit-dropdown':
|
|
110
116
|
{
|
|
@@ -121,7 +127,10 @@ var EditToolbarButtonWithCardContext = function EditToolbarButtonWithCardContext
|
|
|
121
127
|
selected: isOpen,
|
|
122
128
|
disabled: false,
|
|
123
129
|
ariaHasPopup: true
|
|
124
|
-
}, jsx(FormattedMessage
|
|
130
|
+
}, jsx(FormattedMessage
|
|
131
|
+
// Ignored via go/ees005
|
|
132
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
133
|
+
, messages.editDropdownTriggerTitle)), jsx(Separator, null));
|
|
125
134
|
return jsx(Flex, {
|
|
126
135
|
ref: containerRef
|
|
127
136
|
}, jsx(UiDropdown, {
|
|
@@ -138,11 +147,17 @@ var EditToolbarButtonWithCardContext = function EditToolbarButtonWithCardContext
|
|
|
138
147
|
key: "edit.link",
|
|
139
148
|
onClick: onEditLink,
|
|
140
149
|
testId: "edit-dropdown-edit-link-item"
|
|
141
|
-
}, jsx(FormattedMessage
|
|
150
|
+
}, jsx(FormattedMessage
|
|
151
|
+
// Ignored via go/ees005
|
|
152
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
153
|
+
, messages.editDropdownEditLinkTitle)), jsx(ButtonItem, {
|
|
142
154
|
key: "edit.datasource",
|
|
143
155
|
onClick: onEditDatasource,
|
|
144
156
|
testId: "edit-dropdown-edit-datasource-item"
|
|
145
|
-
}, jsx(FormattedMessage
|
|
157
|
+
}, jsx(FormattedMessage
|
|
158
|
+
// Ignored via go/ees005
|
|
159
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
160
|
+
, messages.editDropdownEditDatasourceTitle))));
|
|
146
161
|
}
|
|
147
162
|
case 'none':
|
|
148
163
|
default:
|
|
@@ -23,7 +23,13 @@ export var EditorLinkingPlatformAnalytics = /*#__PURE__*/function (_React$PureCo
|
|
|
23
23
|
value: function render() {
|
|
24
24
|
return /*#__PURE__*/React.createElement(EditorSmartCardProvider, null, /*#__PURE__*/React.createElement(EditorSmartCardProviderValueGuard, null, /*#__PURE__*/React.createElement(EditorAnalyticsContext, {
|
|
25
25
|
editorView: this.props.editorView
|
|
26
|
-
}, /*#__PURE__*/React.createElement(LinkEventsBinding
|
|
26
|
+
}, /*#__PURE__*/React.createElement(LinkEventsBinding
|
|
27
|
+
// Ignored via go/ees005
|
|
28
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
29
|
+
, this.props), /*#__PURE__*/React.createElement(DatasourceEventsBinding
|
|
30
|
+
// Ignored via go/ees005
|
|
31
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
32
|
+
, this.props))));
|
|
27
33
|
}
|
|
28
34
|
}]);
|
|
29
35
|
}(React.PureComponent);
|
|
@@ -20,6 +20,9 @@ export function HyperlinkToolbarAppearance(props) {
|
|
|
20
20
|
editorState = props.editorState,
|
|
21
21
|
cardOptions = props.cardOptions,
|
|
22
22
|
editorAnalyticsApi = props.editorAnalyticsApi;
|
|
23
|
+
|
|
24
|
+
// Ignored via go/ees005
|
|
25
|
+
// eslint-disable-next-line require-await
|
|
23
26
|
var getProvider = /*#__PURE__*/function () {
|
|
24
27
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
25
28
|
var _props$cardOptions;
|
|
@@ -217,50 +217,54 @@ var InlineCardOverlay = function InlineCardOverlay(_ref) {
|
|
|
217
217
|
}, [isVisible, setVisibility]);
|
|
218
218
|
var intl = useIntl();
|
|
219
219
|
var label = intl.formatMessage(messages.inlineOverlay);
|
|
220
|
-
return
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
,
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
,
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
,
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
220
|
+
return (
|
|
221
|
+
// Ignored via go/ees005
|
|
222
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
223
|
+
jsx("span", _extends({}, props, {
|
|
224
|
+
css: containerStyles,
|
|
225
|
+
ref: containerRef
|
|
226
|
+
}), children, isVisible && jsx(React.Fragment, null, jsx("span", {
|
|
227
|
+
"aria-hidden": "true",
|
|
228
|
+
className: OVERLAY_MARKER_CLASSNAME
|
|
229
|
+
}, ZERO_WIDTH_JOINER), jsx("a", {
|
|
230
|
+
css: [overlayStyles, showOverlay && showOverlayStyles],
|
|
231
|
+
style: {
|
|
232
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
233
|
+
marginLeft: availableWidth && -availableWidth,
|
|
234
|
+
width: availableWidth
|
|
235
|
+
},
|
|
236
|
+
"data-testid": testId,
|
|
237
|
+
href: url,
|
|
238
|
+
onClick: function onClick(e) {
|
|
239
|
+
return e.preventDefault();
|
|
240
|
+
},
|
|
241
|
+
tabIndex: -1
|
|
242
|
+
}, jsx("span", {
|
|
243
|
+
css: overflowingContainerStyles
|
|
244
|
+
}, jsx("span", {
|
|
245
|
+
css: iconAndLabelStyles
|
|
246
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
247
|
+
,
|
|
248
|
+
className: ICON_AND_LABEL_CLASSNAME
|
|
249
|
+
}, jsx("span", {
|
|
250
|
+
css: iconStyles
|
|
251
|
+
}, jsx(PreferencesIcon, {
|
|
252
|
+
label: label,
|
|
253
|
+
size: iconSize.current,
|
|
254
|
+
testId: "".concat(testId, "-icon")
|
|
255
|
+
})), showLabel && jsx("span", {
|
|
256
|
+
css: labelStyles
|
|
257
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
258
|
+
,
|
|
259
|
+
className: OVERLAY_LABEL_CLASSNAME,
|
|
260
|
+
"data-testid": "".concat(testId, "-label")
|
|
261
|
+
}, label)), jsx("span", {
|
|
262
|
+
css: gradientStyles
|
|
263
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
264
|
+
,
|
|
265
|
+
className: OVERLAY_GRADIENT_CLASSNAME,
|
|
266
|
+
"data-testid": "".concat(testId, "-gradient")
|
|
267
|
+
})))))
|
|
268
|
+
);
|
|
265
269
|
};
|
|
266
270
|
export default InlineCardOverlay;
|
|
@@ -115,7 +115,10 @@ var LayoutButtonWrapper = function LayoutButtonWrapper(_ref2) {
|
|
|
115
115
|
return jsx(LayoutButton, {
|
|
116
116
|
mountPoint: mountPoint,
|
|
117
117
|
scrollableElement: scrollableElement,
|
|
118
|
-
boundariesElement: boundariesElement
|
|
118
|
+
boundariesElement: boundariesElement
|
|
119
|
+
// Ignored via go/ees005
|
|
120
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
121
|
+
,
|
|
119
122
|
targetElement: datasourceTableRef,
|
|
120
123
|
layout: isDatasourceTableLayout(layout) ? layout : undefined,
|
|
121
124
|
onLayoutChange: onLayoutChange,
|
|
@@ -22,7 +22,6 @@ import { DiscoveryPulse } from './Pulse';
|
|
|
22
22
|
import { shouldRenderToolbarPulse } from './toolbar';
|
|
23
23
|
import { WithCardContext } from './WithCardContext';
|
|
24
24
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
25
|
-
|
|
26
25
|
export var LinkToolbarAppearance = /*#__PURE__*/function (_React$Component) {
|
|
27
26
|
function LinkToolbarAppearance() {
|
|
28
27
|
var _this;
|
|
@@ -373,7 +373,10 @@ var ResizableEmbedCard = /*#__PURE__*/function (_React$Component) {
|
|
|
373
373
|
containerWidth: containerWidth || DEFAULT_EMBED_CARD_WIDTH,
|
|
374
374
|
fullWidthMode: fullWidthMode
|
|
375
375
|
})
|
|
376
|
-
}, jsx(Resizer
|
|
376
|
+
}, jsx(Resizer
|
|
377
|
+
// Ignored via go/ees005
|
|
378
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
379
|
+
, _extends({}, this.props, {
|
|
377
380
|
enable: enable,
|
|
378
381
|
calcNewSize: this.calcNewSize,
|
|
379
382
|
snapPoints: this.calcSnapPoints(),
|
|
@@ -381,6 +384,8 @@ var ResizableEmbedCard = /*#__PURE__*/function (_React$Component) {
|
|
|
381
384
|
highlights: this.highlights,
|
|
382
385
|
nodeType: "embed",
|
|
383
386
|
handleStyles: nestedInTableHandleStyles(this.isNestedInTable())
|
|
387
|
+
// Ignored via go/ees005
|
|
388
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
384
389
|
}, resizerProps), children, this.getHeightDefiningComponent())));
|
|
385
390
|
/* eslint-enable @atlaskit/design-system/consistent-css-prop-usage */
|
|
386
391
|
}
|
|
@@ -76,6 +76,9 @@ export var findChanged = function findChanged(tr, state) {
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
+
|
|
80
|
+
// Ignored via go/ees005
|
|
81
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
79
82
|
stepMap.forEach(function (oldStart, oldEnd, newStart, newEnd) {
|
|
80
83
|
var _tr$docs2;
|
|
81
84
|
var before = tr.docs[i];
|
|
@@ -81,7 +81,10 @@ export var findAtPositions = function findAtPositions(tr, positions) {
|
|
|
81
81
|
}
|
|
82
82
|
return entities;
|
|
83
83
|
};
|
|
84
|
-
export var findInNodeRange = function findInNodeRange(doc, from, to, predicate
|
|
84
|
+
export var findInNodeRange = function findInNodeRange(doc, from, to, predicate
|
|
85
|
+
// Ignored via go/ees005
|
|
86
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
87
|
+
) {
|
|
85
88
|
var entities = [];
|
|
86
89
|
doc.nodesBetween(from, to, function (node, pos) {
|
|
87
90
|
if (predicate(node)) {
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import { getDatasourceType } from '@atlaskit/editor-common/utils';
|
|
3
3
|
import { showDatasourceModal } from '../pm-plugins/actions';
|
|
4
|
-
export var editDatasource = function editDatasource(datasourceId, editorAnalyticsApi, appearance, extensionKey
|
|
4
|
+
export var editDatasource = function editDatasource(datasourceId, editorAnalyticsApi, appearance, extensionKey
|
|
5
|
+
// Ignored via go/ees005
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
7
|
+
) {
|
|
5
8
|
return function (state, dispatch) {
|
|
6
9
|
var datasourceType = getDatasourceType(datasourceId);
|
|
7
10
|
if (dispatch && datasourceType) {
|
package/dist/esm/ui/toolbar.js
CHANGED
|
@@ -93,7 +93,10 @@ export var openLinkSettings = function openLinkSettings(editorAnalyticsApi) {
|
|
|
93
93
|
return true;
|
|
94
94
|
};
|
|
95
95
|
};
|
|
96
|
-
export var floatingToolbar = function floatingToolbar(cardOptions, lpLinkPicker, linkPickerOptions, pluginInjectionApi, disableFloatingToolbar
|
|
96
|
+
export var floatingToolbar = function floatingToolbar(cardOptions, lpLinkPicker, linkPickerOptions, pluginInjectionApi, disableFloatingToolbar
|
|
97
|
+
// Ignored via go/ees005
|
|
98
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
99
|
+
) {
|
|
97
100
|
return function (state, intl, providerFactory) {
|
|
98
101
|
if (disableFloatingToolbar) {
|
|
99
102
|
return;
|
|
@@ -128,11 +131,15 @@ export var floatingToolbar = function floatingToolbar(cardOptions, lpLinkPicker,
|
|
|
128
131
|
preventPopupOverflow: isLinkPickerEnabled
|
|
129
132
|
}, toolbarOffset), {}, {
|
|
130
133
|
getDomRef: function getDomRef(view) {
|
|
134
|
+
// Ignored via go/ees005
|
|
135
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
131
136
|
var element = findDomRefAtPos(view.state.selection.from, view.domAtPos.bind(view));
|
|
132
137
|
if (!element) {
|
|
133
138
|
return undefined;
|
|
134
139
|
}
|
|
135
140
|
if (isEmbedCard) {
|
|
141
|
+
// Ignored via go/ees005
|
|
142
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
136
143
|
return element.querySelector(".".concat(richMediaClassName));
|
|
137
144
|
}
|
|
138
145
|
return element;
|
|
@@ -154,7 +161,10 @@ var unlinkCard = function unlinkCard(node, state, editorAnalyticsApi) {
|
|
|
154
161
|
return false;
|
|
155
162
|
};
|
|
156
163
|
};
|
|
157
|
-
var buildAlignmentOptions = function buildAlignmentOptions(state, intl, widthPluginDependencyApi, analyticsApi, cardOptions
|
|
164
|
+
var buildAlignmentOptions = function buildAlignmentOptions(state, intl, widthPluginDependencyApi, analyticsApi, cardOptions
|
|
165
|
+
// Ignored via go/ees005
|
|
166
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
167
|
+
) {
|
|
158
168
|
return buildLayoutButtons(state, intl, state.schema.nodes.embedCard, widthPluginDependencyApi, analyticsApi, true, true, cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.allowWrapping, cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.allowAlignment);
|
|
159
169
|
};
|
|
160
170
|
var withToolbarMetadata = function withToolbarMetadata(command) {
|
|
@@ -179,7 +189,10 @@ var getToolbarViewedItem = function getToolbarViewedItem(url, display) {
|
|
|
179
189
|
}
|
|
180
190
|
}];
|
|
181
191
|
};
|
|
182
|
-
var generateToolbarItems = function generateToolbarItems(state, intl, providerFactory, cardOptions, lpLinkPicker, linkPicker, pluginInjectionApi
|
|
192
|
+
var generateToolbarItems = function generateToolbarItems(state, intl, providerFactory, cardOptions, lpLinkPicker, linkPicker, pluginInjectionApi
|
|
193
|
+
// Ignored via go/ees005
|
|
194
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
195
|
+
) {
|
|
183
196
|
return function (node) {
|
|
184
197
|
var _pluginInjectionApi$a, _pluginInjectionApi$d, _pluginInjectionApi$d2, _pluginInjectionApi$a2, _node$attrs;
|
|
185
198
|
var _titleUrlPairFromNode2 = titleUrlPairFromNode(node),
|
|
@@ -370,7 +383,10 @@ var generateToolbarItems = function generateToolbarItems(state, intl, providerFa
|
|
|
370
383
|
}
|
|
371
384
|
};
|
|
372
385
|
};
|
|
373
|
-
var getUnlinkButtonGroup = function getUnlinkButtonGroup(state, intl, node, inlineCard, editorAnalyticsApi
|
|
386
|
+
var getUnlinkButtonGroup = function getUnlinkButtonGroup(state, intl, node, inlineCard, editorAnalyticsApi
|
|
387
|
+
// Ignored via go/ees005
|
|
388
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
389
|
+
) {
|
|
374
390
|
return node.type === inlineCard ? [{
|
|
375
391
|
id: 'editor.link.unlink',
|
|
376
392
|
focusEditoronEnter: true,
|
|
@@ -395,7 +411,10 @@ export var getSettingsButton = function getSettingsButton(intl, editorAnalyticsA
|
|
|
395
411
|
target: '_blank'
|
|
396
412
|
};
|
|
397
413
|
};
|
|
398
|
-
var getDatasourceButtonGroup = function getDatasourceButtonGroup(metadata, intl, editorAnalyticsApi, node, hoverDecoration, datasourceId, state, cardOptions, currentAppearance
|
|
414
|
+
var getDatasourceButtonGroup = function getDatasourceButtonGroup(metadata, intl, editorAnalyticsApi, node, hoverDecoration, datasourceId, state, cardOptions, currentAppearance
|
|
415
|
+
// Ignored via go/ees005
|
|
416
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
417
|
+
) {
|
|
399
418
|
var _node$attrs2;
|
|
400
419
|
var toolbarItems = [];
|
|
401
420
|
var canShowAppearanceSwitch = function canShowAppearanceSwitch() {
|
|
@@ -504,11 +523,17 @@ var getDatasourceButtonGroup = function getDatasourceButtonGroup(metadata, intl,
|
|
|
504
523
|
});
|
|
505
524
|
return toolbarItems;
|
|
506
525
|
};
|
|
507
|
-
export var shouldRenderToolbarPulse = function shouldRenderToolbarPulse(embedEnabled, appearance, status, isDiscoverabilityEnabled
|
|
526
|
+
export var shouldRenderToolbarPulse = function shouldRenderToolbarPulse(embedEnabled, appearance, status, isDiscoverabilityEnabled
|
|
527
|
+
// Ignored via go/ees005
|
|
528
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
529
|
+
) {
|
|
508
530
|
return embedEnabled && appearance === 'inline' && status === 'resolved' && isDiscoverabilityEnabled;
|
|
509
531
|
};
|
|
510
532
|
export var getStartingToolbarItems = function getStartingToolbarItems(options, api) {
|
|
511
|
-
return function (intl, link, onEditLink, metadata
|
|
533
|
+
return function (intl, link, onEditLink, metadata
|
|
534
|
+
// Ignored via go/ees005
|
|
535
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
536
|
+
) {
|
|
512
537
|
var editLinkItem = options.allowDatasource ? [{
|
|
513
538
|
type: 'custom',
|
|
514
539
|
fallback: [],
|
|
@@ -31,7 +31,7 @@ export declare const buildEditLinkToolbar: ({ providerFactory, node, pluginInjec
|
|
|
31
31
|
providerFactory: ProviderFactory;
|
|
32
32
|
node: Node;
|
|
33
33
|
pluginInjectionApi: ExtractInjectionAPI<typeof cardPlugin> | undefined;
|
|
34
|
-
linkPicker?:
|
|
34
|
+
linkPicker?: Partial<import("packages/linking-platform/link-picker/dist/types").LinkPickerProps> | undefined;
|
|
35
35
|
lpLinkPicker: boolean;
|
|
36
36
|
}) => FloatingToolbarItem<Command>;
|
|
37
37
|
export declare const editLinkToolbarConfig: (showLinkingToolbar: boolean, lpLinkPicker?: boolean) => Partial<FloatingToolbarConfig>;
|
|
@@ -17,7 +17,7 @@ export interface LinkToolbarAppearanceProps {
|
|
|
17
17
|
showUpgradeDiscoverability?: boolean;
|
|
18
18
|
isDatasourceView?: boolean;
|
|
19
19
|
}
|
|
20
|
-
export declare class LinkToolbarAppearance extends React.Component<LinkToolbarAppearanceProps,
|
|
20
|
+
export declare class LinkToolbarAppearance extends React.Component<LinkToolbarAppearanceProps, Object> {
|
|
21
21
|
renderDropdown: (view?: EditorView, cardContext?: CardContext) => JSX.Element | null;
|
|
22
22
|
render(): JSX.Element;
|
|
23
23
|
}
|
|
@@ -31,7 +31,7 @@ export declare const buildEditLinkToolbar: ({ providerFactory, node, pluginInjec
|
|
|
31
31
|
providerFactory: ProviderFactory;
|
|
32
32
|
node: Node;
|
|
33
33
|
pluginInjectionApi: ExtractInjectionAPI<typeof cardPlugin> | undefined;
|
|
34
|
-
linkPicker?:
|
|
34
|
+
linkPicker?: Partial<import("packages/linking-platform/link-picker/dist/types").LinkPickerProps> | undefined;
|
|
35
35
|
lpLinkPicker: boolean;
|
|
36
36
|
}) => FloatingToolbarItem<Command>;
|
|
37
37
|
export declare const editLinkToolbarConfig: (showLinkingToolbar: boolean, lpLinkPicker?: boolean) => Partial<FloatingToolbarConfig>;
|
|
@@ -17,7 +17,7 @@ export interface LinkToolbarAppearanceProps {
|
|
|
17
17
|
showUpgradeDiscoverability?: boolean;
|
|
18
18
|
isDatasourceView?: boolean;
|
|
19
19
|
}
|
|
20
|
-
export declare class LinkToolbarAppearance extends React.Component<LinkToolbarAppearanceProps,
|
|
20
|
+
export declare class LinkToolbarAppearance extends React.Component<LinkToolbarAppearanceProps, Object> {
|
|
21
21
|
renderDropdown: (view?: EditorView, cardContext?: CardContext) => JSX.Element | null;
|
|
22
22
|
render(): JSX.Element;
|
|
23
23
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-card",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.11",
|
|
4
4
|
"description": "Card plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@atlaskit/adf-schema": "^46.1.0",
|
|
35
35
|
"@atlaskit/analytics-next": "^10.2.0",
|
|
36
36
|
"@atlaskit/custom-steps": "^0.9.0",
|
|
37
|
-
"@atlaskit/editor-common": "^
|
|
37
|
+
"@atlaskit/editor-common": "^98.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-analytics": "^1.10.0",
|
|
39
39
|
"@atlaskit/editor-plugin-decorations": "^1.3.0",
|
|
40
40
|
"@atlaskit/editor-plugin-editor-disabled": "^1.3.0",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@atlaskit/editor-plugin-feature-flags": "^1.2.0",
|
|
43
43
|
"@atlaskit/editor-plugin-floating-toolbar": "^1.14.0",
|
|
44
44
|
"@atlaskit/editor-plugin-grid": "^1.2.0",
|
|
45
|
-
"@atlaskit/editor-plugin-width": "^
|
|
45
|
+
"@atlaskit/editor-plugin-width": "^2.0.0",
|
|
46
46
|
"@atlaskit/editor-prosemirror": "6.2.1",
|
|
47
47
|
"@atlaskit/editor-shared-styles": "^3.2.0",
|
|
48
48
|
"@atlaskit/frontend-utilities": "^2.7.0",
|
|
@@ -50,14 +50,14 @@
|
|
|
50
50
|
"@atlaskit/link-analytics": "^8.6.0",
|
|
51
51
|
"@atlaskit/link-client-extension": "^3.0.0",
|
|
52
52
|
"@atlaskit/link-datasource": "^3.15.0",
|
|
53
|
-
"@atlaskit/linking-common": "^6.
|
|
53
|
+
"@atlaskit/linking-common": "^6.1.0",
|
|
54
54
|
"@atlaskit/linking-types": "^9.5.0",
|
|
55
55
|
"@atlaskit/menu": "2.13.7",
|
|
56
56
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
57
57
|
"@atlaskit/primitives": "^13.3.0",
|
|
58
|
-
"@atlaskit/smart-card": "^33.
|
|
58
|
+
"@atlaskit/smart-card": "^33.3.0",
|
|
59
59
|
"@atlaskit/theme": "^14.0.0",
|
|
60
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
60
|
+
"@atlaskit/tmp-editor-statsig": "^2.31.0",
|
|
61
61
|
"@atlaskit/tokens": "^2.5.0",
|
|
62
62
|
"@babel/runtime": "^7.0.0",
|
|
63
63
|
"@emotion/react": "^11.7.1",
|