@atlaskit/editor-plugin-paste 16.0.16 → 16.0.18
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 +16 -0
- package/dist/cjs/pm-plugins/analytics.js +2 -2
- package/dist/cjs/pm-plugins/main.js +4 -4
- package/dist/cjs/pm-plugins/util/edge-cases/index.js +2 -2
- package/dist/cjs/pm-plugins/util/handlers.js +12 -12
- package/dist/cjs/pm-plugins/util/index.js +2 -2
- package/dist/cjs/ui/Flag.js +5 -5
- package/dist/es2019/pm-plugins/analytics.js +1 -1
- package/dist/es2019/pm-plugins/main.js +1 -1
- package/dist/es2019/pm-plugins/util/edge-cases/index.js +1 -1
- package/dist/es2019/pm-plugins/util/handlers.js +2 -2
- package/dist/es2019/pm-plugins/util/index.js +1 -1
- package/dist/es2019/ui/Flag.js +3 -1
- package/dist/esm/pm-plugins/analytics.js +1 -1
- package/dist/esm/pm-plugins/main.js +1 -1
- package/dist/esm/pm-plugins/util/edge-cases/index.js +1 -1
- package/dist/esm/pm-plugins/util/handlers.js +2 -2
- package/dist/esm/pm-plugins/util/index.js +1 -1
- package/dist/esm/ui/Flag.js +3 -1
- package/dist/types/pm-plugins/move-analytics/utils.d.ts +1 -1
- package/package.json +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-paste
|
|
2
2
|
|
|
3
|
+
## 16.0.18
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 16.0.17
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`656801b9e097c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/656801b9e097c) -
|
|
14
|
+
VOLTC-331 - Migrate updated package usage in platform/editor: rewrite barrel imports of
|
|
15
|
+
voltCompliant provider packages to deep/subpath imports (consumer-side debarrel). No public API
|
|
16
|
+
changes.
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 16.0.16
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -15,7 +15,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
15
15
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
16
16
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
17
17
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
18
|
-
var
|
|
18
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
19
19
|
var _expVal = require("@atlaskit/tmp-editor-statsig/expVal");
|
|
20
20
|
var _util = require("./util");
|
|
21
21
|
var _handlers = require("./util/handlers");
|
|
@@ -239,7 +239,7 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext, plug
|
|
|
239
239
|
});
|
|
240
240
|
pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$m2 = pluginInjectionApi.mention) === null || _pluginInjectionApi$m2 === void 0 || (_pluginInjectionApi$m2 = _pluginInjectionApi$m2.actions) === null || _pluginInjectionApi$m2 === void 0 || _pluginInjectionApi$m2.announceMentionsInsertion(mentionsInserted);
|
|
241
241
|
}
|
|
242
|
-
var pastedNodeTypes = (0,
|
|
242
|
+
var pastedNodeTypes = (0, _fg.fg)('platform_editor_paste_renderer_analytics') ? (0, _toConsumableArray2.default)(_getContentNodeTypes(slice.content)).sort().join(',') : undefined;
|
|
243
243
|
if (pasteContext.type === _analytics.PasteTypes.plain) {
|
|
244
244
|
return createPastePayload(actionSubjectId, {
|
|
245
245
|
pasteSize: text.length,
|
|
@@ -28,7 +28,7 @@ var _utils3 = require("@atlaskit/editor-tables/utils");
|
|
|
28
28
|
var _insm = require("@atlaskit/insm");
|
|
29
29
|
var _mediaCommon = require("@atlaskit/media-common");
|
|
30
30
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
31
|
-
var
|
|
31
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
32
32
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
33
33
|
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
34
34
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
@@ -177,7 +177,7 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
|
|
|
177
177
|
|
|
178
178
|
// Extract clientId values from pasted HTML for media cross-product copy/paste
|
|
179
179
|
// This must be done before ProseMirror parses the HTML, as clientId is not stored in ADF
|
|
180
|
-
if ((0,
|
|
180
|
+
if ((0, _fg.fg)('platform_media_cross_client_copy_with_auth')) {
|
|
181
181
|
(0, _mediaCommon.extractClientIdsFromHtml)(html);
|
|
182
182
|
}
|
|
183
183
|
// Links copied from iOS Safari share button only have the text/uri-list data type
|
|
@@ -194,7 +194,7 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
|
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
// Strip Legacy Content Macro (LCM) extensions on paste
|
|
197
|
-
if (!(0,
|
|
197
|
+
if (!(0, _fg.fg)('platform_editor_legacy_content_macro_insert')) {
|
|
198
198
|
slice = (0, _transforms.transformSliceToRemoveLegacyContentMacro)(slice, schema);
|
|
199
199
|
}
|
|
200
200
|
var isPastedFile = (0, _paste.isPastedFile)(event);
|
|
@@ -525,7 +525,7 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
|
|
|
525
525
|
|
|
526
526
|
// Special handling for SharePoint URLs generated from Share button
|
|
527
527
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
528
|
-
if (isSharePointUrl(text) && ((0,
|
|
528
|
+
if (isSharePointUrl(text) && ((0, _fg.fg)('platform_editor_sharepoint_url_smart_card_fallback') || (0, _fg.fg)('platform_editor_sharepoint_url_smart_card_jira'))) {
|
|
529
529
|
// Create an inline card directly for SharePoint URLs to show the "Connect" button
|
|
530
530
|
var inlineCardNode = schema.nodes.inlineCard.create({
|
|
531
531
|
url: text
|
|
@@ -13,7 +13,7 @@ var _model = require("@atlaskit/editor-prosemirror/model");
|
|
|
13
13
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
14
14
|
var _transform = require("@atlaskit/editor-prosemirror/transform");
|
|
15
15
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
16
|
-
var
|
|
16
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
17
17
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
18
18
|
var _index = require("../index");
|
|
19
19
|
var _lists = require("./lists");
|
|
@@ -144,7 +144,7 @@ function insertSliceForTaskInsideList(_ref5) {
|
|
|
144
144
|
// The corrected insertion path only applies for the flexible list indentation dogfooding audience
|
|
145
145
|
// (`platform_editor_flexible_list_indentation`), and the kill switch protects that audience from
|
|
146
146
|
// regressions. Fall back to the legacy path when the experiment is OFF or the kill switch is ON.
|
|
147
|
-
if (!(0, _expValEquals.expValEquals)('platform_editor_flexible_list_indentation', 'isEnabled', true) || (0,
|
|
147
|
+
if (!(0, _expValEquals.expValEquals)('platform_editor_flexible_list_indentation', 'isEnabled', true) || (0, _fg.fg)('platform_editor_flexible_list_kill_switch_1')) {
|
|
148
148
|
//To avoid the list being replaced with the tasklist, enclose the slice within a taskItem.
|
|
149
149
|
var selectionBeforeReplace = tr.selection.from;
|
|
150
150
|
tr.replaceSelection(new _model.Slice(_model.Fragment.from(schema.nodes.taskItem.createAndFill()), 0, 0));
|
|
@@ -49,8 +49,8 @@ var _state = require("@atlaskit/editor-prosemirror/state");
|
|
|
49
49
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
50
50
|
var _utils3 = require("@atlaskit/editor-tables/utils");
|
|
51
51
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
52
|
-
var
|
|
53
|
-
var
|
|
52
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
53
|
+
var _closeHistory = require("@atlaskit/prosemirror-history/closeHistory");
|
|
54
54
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
55
55
|
var _commands = require("../../editor-commands/commands");
|
|
56
56
|
var _pluginFactory = require("../plugin-factory");
|
|
@@ -183,7 +183,7 @@ function handlePasteIntoTaskOrDecisionOrPanel(slice, queueCardsFromChangedTr) {
|
|
|
183
183
|
}
|
|
184
184
|
var transformedSlice = compose.apply(null, filters)(slice);
|
|
185
185
|
var isFirstChildTaskNode = transformedSlice.content.firstChild.type === taskList || transformedSlice.content.firstChild.type === taskItem;
|
|
186
|
-
var tr = (0,
|
|
186
|
+
var tr = (0, _closeHistory.closeHistory)(state.tr);
|
|
187
187
|
if (panelNode && sliceHasTask && sliceFirstChildIsPanel && (0, _index.isEmptyNode)(panelNode) && selection.$from.node() === selection.$to.node()) {
|
|
188
188
|
return Boolean((0, _lists2.insertSliceInsideOfPanelNodeSelected)(panelNode)({
|
|
189
189
|
tr: tr,
|
|
@@ -208,7 +208,7 @@ function handlePasteIntoTaskOrDecisionOrPanel(slice, queueCardsFromChangedTr) {
|
|
|
208
208
|
// decisionItem (decisionList only accepts decisionItem), so decisionItem must fall through to
|
|
209
209
|
// the normal replaceSelection path.
|
|
210
210
|
var pastingIntoTaskItem = (0, _utils2.hasParentNodeOfType)([taskItem])(selection);
|
|
211
|
-
if ((0, _expValEquals.expValEquals)('platform_editor_flexible_list_indentation', 'isEnabled', true) && !(0,
|
|
211
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_flexible_list_indentation', 'isEnabled', true) && !(0, _fg.fg)('platform_editor_flexible_list_kill_switch_1') && isOpenTaskListSlice && pastingIntoTaskItem && !selectionIsPanel) {
|
|
212
212
|
var unwrappedSlice = new _model.Slice(transformedSlice.content.firstChild.content, transformedSlice.openStart - 1, transformedSlice.openEnd - 1);
|
|
213
213
|
tr.replaceSelection(unwrappedSlice).scrollIntoView();
|
|
214
214
|
} else if ((transformedSliceIsValidNode || selectionIsValidNode) && !pastingIntoExtendedPanel && !(transformedSlice.openStart === 1 && transformedSlice.openEnd === 0 ||
|
|
@@ -504,7 +504,7 @@ function handlePasteLinkOnSelectedText(slice) {
|
|
|
504
504
|
}
|
|
505
505
|
|
|
506
506
|
// derive a linkable range if possible for Select‑All over a single textblock
|
|
507
|
-
var selectAllRange = (0,
|
|
507
|
+
var selectAllRange = (0, _fg.fg)('platform_editor_link_paste_select_all') ? resolveSingleTextblockRangeIfAllSelected(state) : null;
|
|
508
508
|
var rangeFrom = (_selectAllRange$from = selectAllRange === null || selectAllRange === void 0 ? void 0 : selectAllRange.from) !== null && _selectAllRange$from !== void 0 ? _selectAllRange$from : from;
|
|
509
509
|
var rangeTo = (_selectAllRange$to = selectAllRange === null || selectAllRange === void 0 ? void 0 : selectAllRange.to) !== null && _selectAllRange$to !== void 0 ? _selectAllRange$to : to;
|
|
510
510
|
|
|
@@ -539,7 +539,7 @@ function handlePasteAsPlainText(slice, _event, editorAnalyticsAPI) {
|
|
|
539
539
|
// @see prosemirror-view/src/clipboard.js:parseFromClipboard()).
|
|
540
540
|
// @see prosemirror-view/src/input.js:doPaste().
|
|
541
541
|
if (isShiftKeyPressed) {
|
|
542
|
-
var tr = (0,
|
|
542
|
+
var tr = (0, _closeHistory.closeHistory)(state.tr);
|
|
543
543
|
var _tr = tr,
|
|
544
544
|
selection = _tr.selection;
|
|
545
545
|
|
|
@@ -601,7 +601,7 @@ function handlePastePreservingMarks(slice, queueCardsFromChangedTr) {
|
|
|
601
601
|
// we apply current selection marks to the pasted slice
|
|
602
602
|
if ((0, _index.hasOnlyNodesOfType)(bulletList, hardBreak, heading, listItem, text, emoji, mention, orderedList)(slice) || selectionIsHeading || hasActiveCodeMark || hasAnnotationMark) {
|
|
603
603
|
var transformedSlice = (0, _index.applyTextMarksToSlice)(schema, selectionMarks)(slice);
|
|
604
|
-
var tr = (0,
|
|
604
|
+
var tr = (0, _closeHistory.closeHistory)(state.tr).replaceSelection(transformedSlice).setStoredMarks(selectionMarks).scrollIntoView();
|
|
605
605
|
queueCardsFromChangedTr === null || queueCardsFromChangedTr === void 0 || queueCardsFromChangedTr(state, tr, _analytics.INPUT_METHOD.CLIPBOARD);
|
|
606
606
|
if (dispatch) {
|
|
607
607
|
dispatch(tr);
|
|
@@ -659,7 +659,7 @@ function insertAutoMacro(slice, macro, view, from, to) {
|
|
|
659
659
|
|
|
660
660
|
// replace the text with the macro as a separate transaction
|
|
661
661
|
// so the autoconversion generates 2 undo steps
|
|
662
|
-
var macroTr = (0,
|
|
662
|
+
var macroTr = (0, _closeHistory.closeHistory)(view.state.tr).replaceRangeWith(before, before + slice.size, macro).scrollIntoView();
|
|
663
663
|
(0, _card.addLinkMetadata)(view.state.selection, macroTr, {
|
|
664
664
|
inputMethod: _analytics.INPUT_METHOD.CLIPBOARD,
|
|
665
665
|
cardAction: 'AUTO_CONVERT'
|
|
@@ -729,7 +729,7 @@ function handleCodeBlock(text) {
|
|
|
729
729
|
return function (state, dispatch) {
|
|
730
730
|
var codeBlock = state.schema.nodes.codeBlock;
|
|
731
731
|
if (text && (0, _utils2.hasParentNodeOfType)(codeBlock)(state.selection)) {
|
|
732
|
-
var tr = (0,
|
|
732
|
+
var tr = (0, _closeHistory.closeHistory)(state.tr);
|
|
733
733
|
tr.scrollIntoView();
|
|
734
734
|
if (dispatch) {
|
|
735
735
|
dispatch(tr.insertText(text));
|
|
@@ -877,7 +877,7 @@ function handleExpandPaste(slice) {
|
|
|
877
877
|
}
|
|
878
878
|
function handleMarkdown(markdownSlice, queueCardsFromChangedTr, from, to) {
|
|
879
879
|
return function (state, dispatch) {
|
|
880
|
-
var tr = (0,
|
|
880
|
+
var tr = (0, _closeHistory.closeHistory)(state.tr);
|
|
881
881
|
var pastesFrom = typeof from === 'number' ? from : tr.selection.from;
|
|
882
882
|
if (typeof from === 'number' && typeof to === 'number') {
|
|
883
883
|
tr.replaceRange(from, to, markdownSlice);
|
|
@@ -1190,7 +1190,7 @@ function handleRichText(slice, queueCardsFromChangedTr) {
|
|
|
1190
1190
|
if (shouldFlattenList(state, slice)) {
|
|
1191
1191
|
slice = flattenNestedListInSlice(slice);
|
|
1192
1192
|
}
|
|
1193
|
-
(0,
|
|
1193
|
+
(0, _closeHistory.closeHistory)(tr);
|
|
1194
1194
|
var isFirstChildListNode = (0, _utils.isListNode)(firstChildOfSlice);
|
|
1195
1195
|
var isLastChildListNode = (0, _utils.isListNode)(lastChildOfSlice);
|
|
1196
1196
|
var isSliceContentListNodes = isFirstChildListNode || isLastChildListNode;
|
|
@@ -1261,7 +1261,7 @@ function handleRichText(slice, queueCardsFromChangedTr) {
|
|
|
1261
1261
|
});
|
|
1262
1262
|
if ((0, _utils.insideTableCell)(state) && (0, _utils.isInListItem)(state) && (0, _utils2.canInsert)(selection.$from, slice.content) && (0, _utils2.canInsert)(selection.$to, slice.content) || sliceHasList) {
|
|
1263
1263
|
tr.replaceSelection(slice);
|
|
1264
|
-
} else if ((0, _expValEquals.expValEquals)('platform_editor_flexible_list_indentation', 'isEnabled', true) && !(0,
|
|
1264
|
+
} else if ((0, _expValEquals.expValEquals)('platform_editor_flexible_list_indentation', 'isEnabled', true) && !(0, _fg.fg)('platform_editor_flexible_list_kill_switch_1') && checkTaskListInList(state, slice) && !checkIfSelectionInNestedList(state)) {
|
|
1265
1265
|
// Corrected task-into-list insertion is gated behind the flexible list indentation
|
|
1266
1266
|
// experiment and protected by the kill switch.
|
|
1267
1267
|
tr = (0, _edgeCases.insertSliceForTaskInsideList)({
|
|
@@ -29,7 +29,7 @@ var _state = require("@atlaskit/editor-prosemirror/state");
|
|
|
29
29
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
30
30
|
var _utils3 = require("@atlaskit/editor-tables/utils");
|
|
31
31
|
var _mediaClient = require("@atlaskit/media-client");
|
|
32
|
-
var
|
|
32
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
33
33
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
34
34
|
// Ignored via go/ees005
|
|
35
35
|
// eslint-disable-next-line require-unicode-regexp
|
|
@@ -76,7 +76,7 @@ function isPastedFromFabricEditor(html) {
|
|
|
76
76
|
return !!html && html.indexOf('data-pm-slice="') >= 0;
|
|
77
77
|
}
|
|
78
78
|
function isPastedFromFabricRenderer(html) {
|
|
79
|
-
return !!html && html.indexOf('data-renderer-start-pos="') >= 0 && (0,
|
|
79
|
+
return !!html && html.indexOf('data-renderer-start-pos="') >= 0 && (0, _fg.fg)('platform_editor_paste_renderer_analytics');
|
|
80
80
|
}
|
|
81
81
|
var isSingleLine = exports.isSingleLine = function isSingleLine(text) {
|
|
82
82
|
return !!text && text.trim().split('\n').length === 1;
|
package/dist/cjs/ui/Flag.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -10,14 +9,15 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
10
9
|
var _react = _interopRequireDefault(require("react"));
|
|
11
10
|
var _reactIntl = require("react-intl");
|
|
12
11
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
13
|
-
var _flag =
|
|
12
|
+
var _flag = _interopRequireDefault(require("@atlaskit/flag/flag"));
|
|
13
|
+
var _autoDismissFlag = _interopRequireDefault(require("@atlaskit/flag/auto-dismiss-flag"));
|
|
14
|
+
var _flagGroup = require("@atlaskit/flag/flag-group");
|
|
14
15
|
var _statusError = _interopRequireDefault(require("@atlaskit/icon/core/status-error"));
|
|
15
16
|
var _statusSuccess = _interopRequireDefault(require("@atlaskit/icon/core/status-success"));
|
|
16
17
|
var _statusWarning = _interopRequireDefault(require("@atlaskit/icon/core/status-warning"));
|
|
17
18
|
var _actions = require("../editor-actions/actions");
|
|
18
19
|
var _pastePluginType = require("../pastePluginType");
|
|
19
20
|
var _pluginFactory = require("../pm-plugins/plugin-factory");
|
|
20
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
21
21
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
22
22
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23
23
|
var Flag = exports.Flag = function Flag(_ref) {
|
|
@@ -72,12 +72,12 @@ var Flag = exports.Flag = function Flag(_ref) {
|
|
|
72
72
|
};
|
|
73
73
|
var getFlagComponent = function getFlagComponent() {
|
|
74
74
|
if (type === _pastePluginType.FLAG_TYPE.INFO || type === _pastePluginType.FLAG_TYPE.SUCCESS) {
|
|
75
|
-
return
|
|
75
|
+
return _autoDismissFlag.default;
|
|
76
76
|
}
|
|
77
77
|
return _flag.default;
|
|
78
78
|
};
|
|
79
79
|
var FlagComponent = getFlagComponent();
|
|
80
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
80
|
+
return /*#__PURE__*/_react.default.createElement(_flagGroup.FlagGroup, null, /*#__PURE__*/_react.default.createElement(FlagComponent, {
|
|
81
81
|
onDismissed: onDismissed,
|
|
82
82
|
title: title,
|
|
83
83
|
description: description,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD, PasteContents, PasteTypes } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import { getLinkDomain, mapSlice } from '@atlaskit/editor-common/utils';
|
|
3
3
|
import { findParentNode } from '@atlaskit/editor-prosemirror/utils';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
5
5
|
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
6
6
|
import { getPasteSource } from './util';
|
|
7
7
|
import { handleCodeBlock, handleExpandPaste, handleMarkdown, handleMediaSingle, handlePasteAsPlainText, handlePasteIntoCaption, handlePasteIntoTaskOrDecisionOrPanel, handlePasteLinkOnSelectedText, handlePasteNonNestableBlockNodesIntoList, handlePastePanelOrDecisionContentIntoList, handlePastePreservingMarks, handleRichText, handleSelectedTable, handleNestedTablePaste } from './util/handlers';
|
|
@@ -18,7 +18,7 @@ import { handlePaste as handlePasteTable } from '@atlaskit/editor-tables/utils';
|
|
|
18
18
|
import { insm } from '@atlaskit/insm';
|
|
19
19
|
import { extractClientIdsFromHtml } from '@atlaskit/media-common';
|
|
20
20
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
21
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
21
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
22
22
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
23
23
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
24
24
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
@@ -4,7 +4,7 @@ import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
|
4
4
|
import { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import { ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
|
|
6
6
|
import { findParentNodeOfType, safeInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
8
8
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
9
|
import { isCursorSelectionAtTextStartOrEnd, isEmptyNode, isSelectionInsidePanel } from '../index';
|
|
10
10
|
import { insertSliceAtNodeEdge, insertSliceInsideOfPanelNodeSelected, insertSliceIntoEmptyNode, insertSliceIntoRangeSelectionInsideList } from './lists';
|
|
@@ -15,8 +15,8 @@ import { AllSelection, NodeSelection, TextSelection } from '@atlaskit/editor-pro
|
|
|
15
15
|
import { canInsert, contains, findParentNodeOfType, findParentNodeOfTypeClosestToPos, hasParentNode, hasParentNodeOfType, safeInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
16
16
|
import { replaceSelectedTable } from '@atlaskit/editor-tables/utils';
|
|
17
17
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
18
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
19
|
-
import { closeHistory } from '@atlaskit/prosemirror-history';
|
|
18
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
19
|
+
import { closeHistory } from '@atlaskit/prosemirror-history/closeHistory';
|
|
20
20
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
21
21
|
// TODO: ED-20519 - Needs Macro extraction
|
|
22
22
|
|
|
@@ -7,7 +7,7 @@ import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state
|
|
|
7
7
|
import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
8
8
|
import { getSelectedTableInfo, isTableSelected } from '@atlaskit/editor-tables/utils';
|
|
9
9
|
import { isMediaBlobUrl } from '@atlaskit/media-client';
|
|
10
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
11
11
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
12
12
|
|
|
13
13
|
// Ignored via go/ees005
|
package/dist/es2019/ui/Flag.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
3
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
4
|
-
import AkFlag
|
|
4
|
+
import AkFlag from '@atlaskit/flag/flag';
|
|
5
|
+
import AutoDismissFlag from '@atlaskit/flag/auto-dismiss-flag';
|
|
6
|
+
import { FlagGroup } from '@atlaskit/flag/flag-group';
|
|
5
7
|
import StatusErrorIcon from '@atlaskit/icon/core/status-error';
|
|
6
8
|
import StatusSuccessIcon from '@atlaskit/icon/core/status-success';
|
|
7
9
|
import StatusWarningIcon from '@atlaskit/icon/core/status-warning';
|
|
@@ -5,7 +5,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
5
5
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD, PasteContents, PasteTypes } from '@atlaskit/editor-common/analytics';
|
|
6
6
|
import { getLinkDomain, mapSlice } from '@atlaskit/editor-common/utils';
|
|
7
7
|
import { findParentNode } from '@atlaskit/editor-prosemirror/utils';
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
9
9
|
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
10
10
|
import { getPasteSource } from './util';
|
|
11
11
|
import { handleCodeBlock, handleExpandPaste, handleMarkdown, handleMediaSingle, handlePasteAsPlainText, handlePasteIntoCaption, handlePasteIntoTaskOrDecisionOrPanel, handlePasteLinkOnSelectedText, handlePasteNonNestableBlockNodesIntoList, handlePastePanelOrDecisionContentIntoList, handlePastePreservingMarks, handleRichText, handleSelectedTable, handleNestedTablePaste } from './util/handlers';
|
|
@@ -23,7 +23,7 @@ import { handlePaste as handlePasteTable } from '@atlaskit/editor-tables/utils';
|
|
|
23
23
|
import { insm } from '@atlaskit/insm';
|
|
24
24
|
import { extractClientIdsFromHtml } from '@atlaskit/media-common';
|
|
25
25
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
26
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
26
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
27
27
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
28
28
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
29
29
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
@@ -4,7 +4,7 @@ import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
|
4
4
|
import { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import { ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
|
|
6
6
|
import { findParentNodeOfType, safeInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
8
8
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
9
|
import { isCursorSelectionAtTextStartOrEnd, isEmptyNode, isSelectionInsidePanel } from '../index';
|
|
10
10
|
import { insertSliceAtNodeEdge, insertSliceInsideOfPanelNodeSelected, insertSliceIntoEmptyNode, insertSliceIntoRangeSelectionInsideList } from './lists';
|
|
@@ -24,8 +24,8 @@ import { AllSelection, NodeSelection, TextSelection } from '@atlaskit/editor-pro
|
|
|
24
24
|
import { canInsert, contains, findParentNodeOfType, findParentNodeOfTypeClosestToPos, hasParentNode, hasParentNodeOfType, safeInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
25
25
|
import { replaceSelectedTable } from '@atlaskit/editor-tables/utils';
|
|
26
26
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
27
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
28
|
-
import { closeHistory } from '@atlaskit/prosemirror-history';
|
|
27
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
28
|
+
import { closeHistory } from '@atlaskit/prosemirror-history/closeHistory';
|
|
29
29
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
30
30
|
// TODO: ED-20519 - Needs Macro extraction
|
|
31
31
|
|
|
@@ -8,7 +8,7 @@ import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state
|
|
|
8
8
|
import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
9
9
|
import { getSelectedTableInfo, isTableSelected } from '@atlaskit/editor-tables/utils';
|
|
10
10
|
import { isMediaBlobUrl } from '@atlaskit/media-client';
|
|
11
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
12
12
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
13
13
|
|
|
14
14
|
// Ignored via go/ees005
|
package/dist/esm/ui/Flag.js
CHANGED
|
@@ -4,7 +4,9 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { useIntl } from 'react-intl';
|
|
6
6
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
7
|
-
import AkFlag
|
|
7
|
+
import AkFlag from '@atlaskit/flag/flag';
|
|
8
|
+
import AutoDismissFlag from '@atlaskit/flag/auto-dismiss-flag';
|
|
9
|
+
import { FlagGroup } from '@atlaskit/flag/flag-group';
|
|
8
10
|
import StatusErrorIcon from '@atlaskit/icon/core/status-error';
|
|
9
11
|
import StatusSuccessIcon from '@atlaskit/icon/core/status-success';
|
|
10
12
|
import StatusWarningIcon from '@atlaskit/icon/core/status-warning';
|
|
@@ -9,6 +9,6 @@ export declare const getParentNodeDepth: (selection: Selection) => number;
|
|
|
9
9
|
export declare const isEntireNestedParagraphOrHeadingSelected: (selection: Selection) => boolean;
|
|
10
10
|
export declare const containsExcludedNode: (content: Fragment) => boolean;
|
|
11
11
|
export declare const getMultipleSelectionAttributes: (content: Fragment) => {
|
|
12
|
-
nodeTypes: string | undefined;
|
|
13
12
|
hasSelectedMultipleNodes: boolean;
|
|
13
|
+
nodeTypes: string | undefined;
|
|
14
14
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-paste",
|
|
3
|
-
"version": "16.0.
|
|
3
|
+
"version": "16.0.18",
|
|
4
4
|
"description": "Paste plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"@atlaskit/editor-plugin-better-type-history": "^15.0.0",
|
|
29
29
|
"@atlaskit/editor-plugin-card": "^21.0.0",
|
|
30
30
|
"@atlaskit/editor-plugin-expand": "^16.1.0",
|
|
31
|
+
"@atlaskit/editor-plugin-extension": "^18.0.0",
|
|
31
32
|
"@atlaskit/editor-plugin-feature-flags": "^14.0.0",
|
|
32
33
|
"@atlaskit/editor-plugin-list": "^17.0.0",
|
|
33
34
|
"@atlaskit/editor-plugin-media": "^17.2.0",
|
|
@@ -37,12 +38,13 @@
|
|
|
37
38
|
"@atlaskit/flag": "^18.4.0",
|
|
38
39
|
"@atlaskit/icon": "^37.5.0",
|
|
39
40
|
"@atlaskit/insm": "^2.0.0",
|
|
41
|
+
"@atlaskit/linking-common": "^12.0.0",
|
|
40
42
|
"@atlaskit/media-client": "^37.5.0",
|
|
41
43
|
"@atlaskit/media-common": "^14.5.0",
|
|
42
44
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
43
45
|
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
44
46
|
"@atlaskit/prosemirror-history": "^1.2.0",
|
|
45
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
47
|
+
"@atlaskit/tmp-editor-statsig": "^160.0.0",
|
|
46
48
|
"@atlaskit/tokens": "^16.8.0",
|
|
47
49
|
"@babel/runtime": "^7.0.0",
|
|
48
50
|
"lodash": "^4.17.21",
|