@atlaskit/editor-plugin-card 5.4.19 → 5.4.20
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 +9 -0
- package/dist/cjs/nodeviews/blockCard.js +8 -11
- package/dist/cjs/nodeviews/embedCard.js +8 -11
- package/dist/cjs/ui/EditToolbarButton/EditToolbarButtonPresentation.js +3 -3
- package/dist/cjs/ui/toolbar.js +1 -4
- package/dist/es2019/nodeviews/blockCard.js +5 -9
- package/dist/es2019/nodeviews/embedCard.js +5 -9
- package/dist/es2019/ui/EditToolbarButton/EditToolbarButtonPresentation.js +3 -3
- package/dist/es2019/ui/toolbar.js +1 -2
- package/dist/esm/nodeviews/blockCard.js +8 -11
- package/dist/esm/nodeviews/embedCard.js +8 -11
- package/dist/esm/ui/EditToolbarButton/EditToolbarButtonPresentation.js +3 -3
- package/dist/esm/ui/toolbar.js +1 -4
- package/package.json +5 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-card
|
|
2
2
|
|
|
3
|
+
## 5.4.20
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#145382](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/145382)
|
|
8
|
+
[`09a75a68f9d26`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/09a75a68f9d26) -
|
|
9
|
+
Clean up FG linking-platform-contenteditable-false-live-view
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 5.4.19
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -132,20 +132,17 @@ var BlockCard = exports.BlockCard = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
132
132
|
return (0, _createClass2.default)(BlockCard, [{
|
|
133
133
|
key: "createDomRef",
|
|
134
134
|
value: function createDomRef() {
|
|
135
|
-
var
|
|
135
|
+
var _this$reactComponentP,
|
|
136
|
+
_this3 = this,
|
|
137
|
+
_this$reactComponentP2;
|
|
136
138
|
var domRef = document.createElement('div');
|
|
137
139
|
// workaround Chrome bug in https://product-fabric.atlassian.net/browse/ED-5379
|
|
138
140
|
// see also: https://github.com/ProseMirror/prosemirror/issues/884
|
|
139
|
-
|
|
140
|
-
var
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
});
|
|
145
|
-
this.updateContentEditable((_this$reactComponentP2 = this.reactComponentProps.pluginInjectionApi) === null || _this$reactComponentP2 === void 0 || (_this$reactComponentP2 = _this$reactComponentP2.editorViewMode) === null || _this$reactComponentP2 === void 0 ? void 0 : _this$reactComponentP2.sharedState.currentState(), domRef);
|
|
146
|
-
} else {
|
|
147
|
-
domRef.contentEditable = 'true';
|
|
148
|
-
}
|
|
141
|
+
this.unsubscribe = (_this$reactComponentP = this.reactComponentProps.pluginInjectionApi) === null || _this$reactComponentP === void 0 || (_this$reactComponentP = _this$reactComponentP.editorViewMode) === null || _this$reactComponentP === void 0 ? void 0 : _this$reactComponentP.sharedState.onChange(function (_ref2) {
|
|
142
|
+
var nextSharedState = _ref2.nextSharedState;
|
|
143
|
+
return _this3.updateContentEditable(nextSharedState, domRef);
|
|
144
|
+
});
|
|
145
|
+
this.updateContentEditable((_this$reactComponentP2 = this.reactComponentProps.pluginInjectionApi) === null || _this$reactComponentP2 === void 0 || (_this$reactComponentP2 = _this$reactComponentP2.editorViewMode) === null || _this$reactComponentP2 === void 0 ? void 0 : _this$reactComponentP2.sharedState.currentState(), domRef);
|
|
149
146
|
domRef.setAttribute('spellcheck', 'false');
|
|
150
147
|
return domRef;
|
|
151
148
|
}
|
|
@@ -360,19 +360,16 @@ var EmbedCard = exports.EmbedCard = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
360
360
|
}, {
|
|
361
361
|
key: "createDomRef",
|
|
362
362
|
value: function createDomRef() {
|
|
363
|
-
var
|
|
363
|
+
var _this$reactComponentP,
|
|
364
|
+
_this3 = this,
|
|
365
|
+
_this$reactComponentP2;
|
|
364
366
|
var domRef = document.createElement('div');
|
|
365
367
|
// It is a tradeoff for the bug mentioned that occurs in Chrome: https://product-fabric.atlassian.net/browse/ED-5379, https://github.com/ProseMirror/prosemirror/issues/884
|
|
366
|
-
|
|
367
|
-
var
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
});
|
|
372
|
-
this.updateContentEditable((_this$reactComponentP2 = this.reactComponentProps.pluginInjectionApi) === null || _this$reactComponentP2 === void 0 || (_this$reactComponentP2 = _this$reactComponentP2.editorViewMode) === null || _this$reactComponentP2 === void 0 ? void 0 : _this$reactComponentP2.sharedState.currentState(), domRef);
|
|
373
|
-
} else {
|
|
374
|
-
domRef.contentEditable = 'true';
|
|
375
|
-
}
|
|
368
|
+
this.unsubscribe = (_this$reactComponentP = this.reactComponentProps.pluginInjectionApi) === null || _this$reactComponentP === void 0 || (_this$reactComponentP = _this$reactComponentP.editorViewMode) === null || _this$reactComponentP === void 0 ? void 0 : _this$reactComponentP.sharedState.onChange(function (_ref3) {
|
|
369
|
+
var nextSharedState = _ref3.nextSharedState;
|
|
370
|
+
return _this3.updateContentEditable(nextSharedState, domRef);
|
|
371
|
+
});
|
|
372
|
+
this.updateContentEditable((_this$reactComponentP2 = this.reactComponentProps.pluginInjectionApi) === null || _this$reactComponentP2 === void 0 || (_this$reactComponentP2 = _this$reactComponentP2.editorViewMode) === null || _this$reactComponentP2 === void 0 ? void 0 : _this$reactComponentP2.sharedState.currentState(), domRef);
|
|
376
373
|
domRef.setAttribute('spellcheck', 'false');
|
|
377
374
|
return domRef;
|
|
378
375
|
}
|
|
@@ -80,7 +80,7 @@ var EditToolbarButtonPresentation = function EditToolbarButtonPresentation(_ref)
|
|
|
80
80
|
}, (0, _experiments.editorExperiment)('platform_editor_controls', 'control') && (0, _react2.jsx)(_reactIntlNext.FormattedMessage
|
|
81
81
|
// Ignored via go/ees005
|
|
82
82
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
83
|
-
, _messages.linkToolbarMessages.editLink)), (0, _react2.jsx)(_ui.FloatingToolbarSeparator, null));
|
|
83
|
+
, _messages.linkToolbarMessages.editLink)), (!(0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') || !(0, _platformFeatureFlags.fg)('platform_editor_controls_patch_6')) && (0, _react2.jsx)(_ui.FloatingToolbarSeparator, null));
|
|
84
84
|
}
|
|
85
85
|
case 'edit-datasource':
|
|
86
86
|
{
|
|
@@ -93,7 +93,7 @@ var EditToolbarButtonPresentation = function EditToolbarButtonPresentation(_ref)
|
|
|
93
93
|
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage
|
|
94
94
|
// Ignored via go/ees005
|
|
95
95
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
96
|
-
, _messages.linkToolbarMessages.editDatasourceStandalone)), (0, _react2.jsx)(_ui.FloatingToolbarSeparator, null));
|
|
96
|
+
, _messages.linkToolbarMessages.editDatasourceStandalone)), (!(0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') || !(0, _platformFeatureFlags.fg)('platform_editor_controls_patch_6')) && (0, _react2.jsx)(_ui.FloatingToolbarSeparator, null));
|
|
97
97
|
}
|
|
98
98
|
case 'edit-dropdown':
|
|
99
99
|
{
|
|
@@ -115,7 +115,7 @@ var EditToolbarButtonPresentation = function EditToolbarButtonPresentation(_ref)
|
|
|
115
115
|
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage
|
|
116
116
|
// Ignored via go/ees005
|
|
117
117
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
118
|
-
, _messages.cardMessages.editDropdownTriggerTitle)), (0, _react2.jsx)(_ui.FloatingToolbarSeparator, null));
|
|
118
|
+
, _messages.cardMessages.editDropdownTriggerTitle)), (!(0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') || !(0, _platformFeatureFlags.fg)('platform_editor_controls_patch_6')) && (0, _react2.jsx)(_ui.FloatingToolbarSeparator, null));
|
|
119
119
|
return (0, _react2.jsx)(_compiled.Flex, {
|
|
120
120
|
ref: containerRef
|
|
121
121
|
}, (0, _react2.jsx)(_uiMenu.DropdownContainer, {
|
package/dist/cjs/ui/toolbar.js
CHANGED
|
@@ -178,10 +178,7 @@ var buildAlignmentOptions = function buildAlignmentOptions(state, intl, widthPlu
|
|
|
178
178
|
if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_6')) {
|
|
179
179
|
return (0, _card.buildLayoutDropdown)(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);
|
|
180
180
|
}
|
|
181
|
-
|
|
182
|
-
return (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_6') ? layoutButtons.filter(function (item) {
|
|
183
|
-
return item.type !== 'separator';
|
|
184
|
-
}) : layoutButtons;
|
|
181
|
+
return (0, _card.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);
|
|
185
182
|
};
|
|
186
183
|
var withToolbarMetadata = function withToolbarMetadata(command) {
|
|
187
184
|
return (0, _card.commandWithMetadata)(command, {
|
|
@@ -107,18 +107,14 @@ export class BlockCard extends ReactNodeView {
|
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
109
|
createDomRef() {
|
|
110
|
+
var _this$reactComponentP, _this$reactComponentP2, _this$reactComponentP3, _this$reactComponentP4;
|
|
110
111
|
const domRef = document.createElement('div');
|
|
111
112
|
// workaround Chrome bug in https://product-fabric.atlassian.net/browse/ED-5379
|
|
112
113
|
// see also: https://github.com/ProseMirror/prosemirror/issues/884
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}) => this.updateContentEditable(nextSharedState, domRef));
|
|
118
|
-
this.updateContentEditable((_this$reactComponentP3 = this.reactComponentProps.pluginInjectionApi) === null || _this$reactComponentP3 === void 0 ? void 0 : (_this$reactComponentP4 = _this$reactComponentP3.editorViewMode) === null || _this$reactComponentP4 === void 0 ? void 0 : _this$reactComponentP4.sharedState.currentState(), domRef);
|
|
119
|
-
} else {
|
|
120
|
-
domRef.contentEditable = 'true';
|
|
121
|
-
}
|
|
114
|
+
this.unsubscribe = (_this$reactComponentP = this.reactComponentProps.pluginInjectionApi) === null || _this$reactComponentP === void 0 ? void 0 : (_this$reactComponentP2 = _this$reactComponentP.editorViewMode) === null || _this$reactComponentP2 === void 0 ? void 0 : _this$reactComponentP2.sharedState.onChange(({
|
|
115
|
+
nextSharedState
|
|
116
|
+
}) => this.updateContentEditable(nextSharedState, domRef));
|
|
117
|
+
this.updateContentEditable((_this$reactComponentP3 = this.reactComponentProps.pluginInjectionApi) === null || _this$reactComponentP3 === void 0 ? void 0 : (_this$reactComponentP4 = _this$reactComponentP3.editorViewMode) === null || _this$reactComponentP4 === void 0 ? void 0 : _this$reactComponentP4.sharedState.currentState(), domRef);
|
|
122
118
|
domRef.setAttribute('spellcheck', 'false');
|
|
123
119
|
return domRef;
|
|
124
120
|
}
|
|
@@ -341,17 +341,13 @@ export class EmbedCard extends ReactNodeView {
|
|
|
341
341
|
return super.viewShouldUpdate(nextNode);
|
|
342
342
|
}
|
|
343
343
|
createDomRef() {
|
|
344
|
+
var _this$reactComponentP, _this$reactComponentP2, _this$reactComponentP3, _this$reactComponentP4;
|
|
344
345
|
const domRef = document.createElement('div');
|
|
345
346
|
// It is a tradeoff for the bug mentioned that occurs in Chrome: https://product-fabric.atlassian.net/browse/ED-5379, https://github.com/ProseMirror/prosemirror/issues/884
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
}) => this.updateContentEditable(nextSharedState, domRef));
|
|
351
|
-
this.updateContentEditable((_this$reactComponentP3 = this.reactComponentProps.pluginInjectionApi) === null || _this$reactComponentP3 === void 0 ? void 0 : (_this$reactComponentP4 = _this$reactComponentP3.editorViewMode) === null || _this$reactComponentP4 === void 0 ? void 0 : _this$reactComponentP4.sharedState.currentState(), domRef);
|
|
352
|
-
} else {
|
|
353
|
-
domRef.contentEditable = 'true';
|
|
354
|
-
}
|
|
347
|
+
this.unsubscribe = (_this$reactComponentP = this.reactComponentProps.pluginInjectionApi) === null || _this$reactComponentP === void 0 ? void 0 : (_this$reactComponentP2 = _this$reactComponentP.editorViewMode) === null || _this$reactComponentP2 === void 0 ? void 0 : _this$reactComponentP2.sharedState.onChange(({
|
|
348
|
+
nextSharedState
|
|
349
|
+
}) => this.updateContentEditable(nextSharedState, domRef));
|
|
350
|
+
this.updateContentEditable((_this$reactComponentP3 = this.reactComponentProps.pluginInjectionApi) === null || _this$reactComponentP3 === void 0 ? void 0 : (_this$reactComponentP4 = _this$reactComponentP3.editorViewMode) === null || _this$reactComponentP4 === void 0 ? void 0 : _this$reactComponentP4.sharedState.currentState(), domRef);
|
|
355
351
|
domRef.setAttribute('spellcheck', 'false');
|
|
356
352
|
return domRef;
|
|
357
353
|
}
|
|
@@ -63,7 +63,7 @@ const EditToolbarButtonPresentation = ({
|
|
|
63
63
|
}, editorExperiment('platform_editor_controls', 'control') && jsx(FormattedMessage
|
|
64
64
|
// Ignored via go/ees005
|
|
65
65
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
66
|
-
, linkToolbarMessages.editLink)), jsx(Separator, null));
|
|
66
|
+
, linkToolbarMessages.editLink)), (!editorExperiment('platform_editor_controls', 'variant1') || !fg('platform_editor_controls_patch_6')) && jsx(Separator, null));
|
|
67
67
|
}
|
|
68
68
|
case 'edit-datasource':
|
|
69
69
|
{
|
|
@@ -76,7 +76,7 @@ const EditToolbarButtonPresentation = ({
|
|
|
76
76
|
}, jsx(FormattedMessage
|
|
77
77
|
// Ignored via go/ees005
|
|
78
78
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
79
|
-
, linkToolbarMessages.editDatasourceStandalone)), jsx(Separator, null));
|
|
79
|
+
, linkToolbarMessages.editDatasourceStandalone)), (!editorExperiment('platform_editor_controls', 'variant1') || !fg('platform_editor_controls_patch_6')) && jsx(Separator, null));
|
|
80
80
|
}
|
|
81
81
|
case 'edit-dropdown':
|
|
82
82
|
{
|
|
@@ -98,7 +98,7 @@ const EditToolbarButtonPresentation = ({
|
|
|
98
98
|
}, jsx(FormattedMessage
|
|
99
99
|
// Ignored via go/ees005
|
|
100
100
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
101
|
-
, messages.editDropdownTriggerTitle)), jsx(Separator, null));
|
|
101
|
+
, messages.editDropdownTriggerTitle)), (!editorExperiment('platform_editor_controls', 'variant1') || !fg('platform_editor_controls_patch_6')) && jsx(Separator, null));
|
|
102
102
|
return jsx(Flex, {
|
|
103
103
|
ref: containerRef
|
|
104
104
|
}, jsx(UiDropdown, {
|
|
@@ -171,8 +171,7 @@ const buildAlignmentOptions = (state, intl, widthPluginDependencyApi, analyticsA
|
|
|
171
171
|
if (editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_6')) {
|
|
172
172
|
return buildLayoutDropdown(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);
|
|
173
173
|
}
|
|
174
|
-
|
|
175
|
-
return editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_6') ? layoutButtons.filter(item => item.type !== 'separator') : layoutButtons;
|
|
174
|
+
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);
|
|
176
175
|
};
|
|
177
176
|
const withToolbarMetadata = command => commandWithMetadata(command, {
|
|
178
177
|
inputMethod: INPUT_METHOD.FLOATING_TB
|
|
@@ -126,20 +126,17 @@ export var BlockCard = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
126
126
|
return _createClass(BlockCard, [{
|
|
127
127
|
key: "createDomRef",
|
|
128
128
|
value: function createDomRef() {
|
|
129
|
-
var
|
|
129
|
+
var _this$reactComponentP,
|
|
130
|
+
_this3 = this,
|
|
131
|
+
_this$reactComponentP2;
|
|
130
132
|
var domRef = document.createElement('div');
|
|
131
133
|
// workaround Chrome bug in https://product-fabric.atlassian.net/browse/ED-5379
|
|
132
134
|
// see also: https://github.com/ProseMirror/prosemirror/issues/884
|
|
133
|
-
|
|
134
|
-
var
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
});
|
|
139
|
-
this.updateContentEditable((_this$reactComponentP2 = this.reactComponentProps.pluginInjectionApi) === null || _this$reactComponentP2 === void 0 || (_this$reactComponentP2 = _this$reactComponentP2.editorViewMode) === null || _this$reactComponentP2 === void 0 ? void 0 : _this$reactComponentP2.sharedState.currentState(), domRef);
|
|
140
|
-
} else {
|
|
141
|
-
domRef.contentEditable = 'true';
|
|
142
|
-
}
|
|
135
|
+
this.unsubscribe = (_this$reactComponentP = this.reactComponentProps.pluginInjectionApi) === null || _this$reactComponentP === void 0 || (_this$reactComponentP = _this$reactComponentP.editorViewMode) === null || _this$reactComponentP === void 0 ? void 0 : _this$reactComponentP.sharedState.onChange(function (_ref2) {
|
|
136
|
+
var nextSharedState = _ref2.nextSharedState;
|
|
137
|
+
return _this3.updateContentEditable(nextSharedState, domRef);
|
|
138
|
+
});
|
|
139
|
+
this.updateContentEditable((_this$reactComponentP2 = this.reactComponentProps.pluginInjectionApi) === null || _this$reactComponentP2 === void 0 || (_this$reactComponentP2 = _this$reactComponentP2.editorViewMode) === null || _this$reactComponentP2 === void 0 ? void 0 : _this$reactComponentP2.sharedState.currentState(), domRef);
|
|
143
140
|
domRef.setAttribute('spellcheck', 'false');
|
|
144
141
|
return domRef;
|
|
145
142
|
}
|
|
@@ -353,19 +353,16 @@ export var EmbedCard = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
353
353
|
}, {
|
|
354
354
|
key: "createDomRef",
|
|
355
355
|
value: function createDomRef() {
|
|
356
|
-
var
|
|
356
|
+
var _this$reactComponentP,
|
|
357
|
+
_this3 = this,
|
|
358
|
+
_this$reactComponentP2;
|
|
357
359
|
var domRef = document.createElement('div');
|
|
358
360
|
// It is a tradeoff for the bug mentioned that occurs in Chrome: https://product-fabric.atlassian.net/browse/ED-5379, https://github.com/ProseMirror/prosemirror/issues/884
|
|
359
|
-
|
|
360
|
-
var
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
});
|
|
365
|
-
this.updateContentEditable((_this$reactComponentP2 = this.reactComponentProps.pluginInjectionApi) === null || _this$reactComponentP2 === void 0 || (_this$reactComponentP2 = _this$reactComponentP2.editorViewMode) === null || _this$reactComponentP2 === void 0 ? void 0 : _this$reactComponentP2.sharedState.currentState(), domRef);
|
|
366
|
-
} else {
|
|
367
|
-
domRef.contentEditable = 'true';
|
|
368
|
-
}
|
|
361
|
+
this.unsubscribe = (_this$reactComponentP = this.reactComponentProps.pluginInjectionApi) === null || _this$reactComponentP === void 0 || (_this$reactComponentP = _this$reactComponentP.editorViewMode) === null || _this$reactComponentP === void 0 ? void 0 : _this$reactComponentP.sharedState.onChange(function (_ref3) {
|
|
362
|
+
var nextSharedState = _ref3.nextSharedState;
|
|
363
|
+
return _this3.updateContentEditable(nextSharedState, domRef);
|
|
364
|
+
});
|
|
365
|
+
this.updateContentEditable((_this$reactComponentP2 = this.reactComponentProps.pluginInjectionApi) === null || _this$reactComponentP2 === void 0 || (_this$reactComponentP2 = _this$reactComponentP2.editorViewMode) === null || _this$reactComponentP2 === void 0 ? void 0 : _this$reactComponentP2.sharedState.currentState(), domRef);
|
|
369
366
|
domRef.setAttribute('spellcheck', 'false');
|
|
370
367
|
return domRef;
|
|
371
368
|
}
|
|
@@ -72,7 +72,7 @@ var EditToolbarButtonPresentation = function EditToolbarButtonPresentation(_ref)
|
|
|
72
72
|
}, editorExperiment('platform_editor_controls', 'control') && jsx(FormattedMessage
|
|
73
73
|
// Ignored via go/ees005
|
|
74
74
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
75
|
-
, linkToolbarMessages.editLink)), jsx(Separator, null));
|
|
75
|
+
, linkToolbarMessages.editLink)), (!editorExperiment('platform_editor_controls', 'variant1') || !fg('platform_editor_controls_patch_6')) && jsx(Separator, null));
|
|
76
76
|
}
|
|
77
77
|
case 'edit-datasource':
|
|
78
78
|
{
|
|
@@ -85,7 +85,7 @@ var EditToolbarButtonPresentation = function EditToolbarButtonPresentation(_ref)
|
|
|
85
85
|
}, jsx(FormattedMessage
|
|
86
86
|
// Ignored via go/ees005
|
|
87
87
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
88
|
-
, linkToolbarMessages.editDatasourceStandalone)), jsx(Separator, null));
|
|
88
|
+
, linkToolbarMessages.editDatasourceStandalone)), (!editorExperiment('platform_editor_controls', 'variant1') || !fg('platform_editor_controls_patch_6')) && jsx(Separator, null));
|
|
89
89
|
}
|
|
90
90
|
case 'edit-dropdown':
|
|
91
91
|
{
|
|
@@ -107,7 +107,7 @@ var EditToolbarButtonPresentation = function EditToolbarButtonPresentation(_ref)
|
|
|
107
107
|
}, jsx(FormattedMessage
|
|
108
108
|
// Ignored via go/ees005
|
|
109
109
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
110
|
-
, messages.editDropdownTriggerTitle)), jsx(Separator, null));
|
|
110
|
+
, messages.editDropdownTriggerTitle)), (!editorExperiment('platform_editor_controls', 'variant1') || !fg('platform_editor_controls_patch_6')) && jsx(Separator, null));
|
|
111
111
|
return jsx(Flex, {
|
|
112
112
|
ref: containerRef
|
|
113
113
|
}, jsx(UiDropdown, {
|
package/dist/esm/ui/toolbar.js
CHANGED
|
@@ -168,10 +168,7 @@ var buildAlignmentOptions = function buildAlignmentOptions(state, intl, widthPlu
|
|
|
168
168
|
if (editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_6')) {
|
|
169
169
|
return buildLayoutDropdown(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);
|
|
170
170
|
}
|
|
171
|
-
|
|
172
|
-
return editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_6') ? layoutButtons.filter(function (item) {
|
|
173
|
-
return item.type !== 'separator';
|
|
174
|
-
}) : layoutButtons;
|
|
171
|
+
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);
|
|
175
172
|
};
|
|
176
173
|
var withToolbarMetadata = function withToolbarMetadata(command) {
|
|
177
174
|
return commandWithMetadata(command, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-card",
|
|
3
|
-
"version": "5.4.
|
|
3
|
+
"version": "5.4.20",
|
|
4
4
|
"description": "Card plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@atlaskit/analytics-next": "^11.0.0",
|
|
38
38
|
"@atlaskit/button": "^23.0.0",
|
|
39
39
|
"@atlaskit/custom-steps": "^0.11.0",
|
|
40
|
-
"@atlaskit/editor-common": "^103.
|
|
40
|
+
"@atlaskit/editor-common": "^103.16.0",
|
|
41
41
|
"@atlaskit/editor-plugin-analytics": "^2.2.0",
|
|
42
42
|
"@atlaskit/editor-plugin-base": "^2.3.0",
|
|
43
43
|
"@atlaskit/editor-plugin-connectivity": "^2.0.0",
|
|
@@ -54,15 +54,15 @@
|
|
|
54
54
|
"@atlaskit/icon": "^25.6.0",
|
|
55
55
|
"@atlaskit/link-analytics": "^9.1.0",
|
|
56
56
|
"@atlaskit/link-client-extension": "^4.0.0",
|
|
57
|
-
"@atlaskit/link-datasource": "^4.
|
|
57
|
+
"@atlaskit/link-datasource": "^4.7.0",
|
|
58
58
|
"@atlaskit/linking-common": "^8.0.0",
|
|
59
59
|
"@atlaskit/linking-types": "^9.9.0",
|
|
60
60
|
"@atlaskit/menu": "^3.2.0",
|
|
61
61
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
62
62
|
"@atlaskit/primitives": "^14.4.0",
|
|
63
|
-
"@atlaskit/smart-card": "^36.
|
|
63
|
+
"@atlaskit/smart-card": "^36.10.0",
|
|
64
64
|
"@atlaskit/theme": "^18.0.0",
|
|
65
|
-
"@atlaskit/tmp-editor-statsig": "^4.
|
|
65
|
+
"@atlaskit/tmp-editor-statsig": "^4.14.0",
|
|
66
66
|
"@atlaskit/tokens": "^4.8.0",
|
|
67
67
|
"@babel/runtime": "^7.0.0",
|
|
68
68
|
"@emotion/react": "^11.7.1",
|
|
@@ -113,9 +113,6 @@
|
|
|
113
113
|
}
|
|
114
114
|
},
|
|
115
115
|
"platform-feature-flags": {
|
|
116
|
-
"linking-platform-contenteditable-false-live-view": {
|
|
117
|
-
"type": "boolean"
|
|
118
|
-
},
|
|
119
116
|
"editor_inline_comments_paste_insert_nodes": {
|
|
120
117
|
"type": "boolean"
|
|
121
118
|
},
|