@atlaskit/editor-plugin-paste 17.1.5 → 17.1.7
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 +15 -0
- package/dist/cjs/pm-plugins/main.js +1 -1
- package/dist/cjs/pm-plugins/util/sync-block.js +2 -2
- package/dist/es2019/pm-plugins/main.js +1 -1
- package/dist/es2019/pm-plugins/util/sync-block.js +1 -1
- package/dist/esm/pm-plugins/main.js +1 -1
- package/dist/esm/pm-plugins/util/sync-block.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-paste
|
|
2
2
|
|
|
3
|
+
## 17.1.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`a6c26b16402ca`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a6c26b16402ca) -
|
|
8
|
+
Migrate nine dogfooding editor experiments from `@atlaskit/tmp-editor-statsig` to the Platform
|
|
9
|
+
experiment API and move their tests to Platform experiment mocks.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 17.1.6
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 17.1.5
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -92,7 +92,7 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
|
|
|
92
92
|
var editorAnalyticsAPI = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions;
|
|
93
93
|
var atlassianMarkDownParser = new _editorMarkdownTransformer.MarkdownTransformer(schema, _paste.md);
|
|
94
94
|
function getMarkdownSlice(text, openStart, openEnd) {
|
|
95
|
-
if (markdownToPmConverter && (0,
|
|
95
|
+
if (markdownToPmConverter && (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_paste_as_md_use_gfm')) {
|
|
96
96
|
return (0, _getMarkdownSlice.getMarkdownSliceViaGfm)(text, schema, openStart, openEnd, markdownToPmConverter, (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_gfm_link_paste_fix'));
|
|
97
97
|
}
|
|
98
98
|
var escapedTextInput = (0, _util.escapeBackslashAndLinksExceptCodeBlock)(text);
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.handleSyncBlocksPaste = void 0;
|
|
8
8
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
-
var
|
|
10
|
+
var _uuid = require("@atlaskit/adf-schema/uuid");
|
|
11
11
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
12
12
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
13
13
|
var _actions = require("../../editor-actions/actions");
|
|
@@ -30,7 +30,7 @@ var transformSyncBlockNode = function transformSyncBlockNode(node, schema, isFro
|
|
|
30
30
|
|
|
31
31
|
// sync blocks need a unique localId to function correctly
|
|
32
32
|
var newAttrs = _objectSpread(_objectSpread({}, node.attrs), {}, {
|
|
33
|
-
localId:
|
|
33
|
+
localId: _uuid.uuid.generate()
|
|
34
34
|
});
|
|
35
35
|
return schema.nodes.syncBlock.create(newAttrs, null, (0, _toConsumableArray2.default)(node.marks));
|
|
36
36
|
};
|
|
@@ -81,7 +81,7 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
81
81
|
const editorAnalyticsAPI = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions;
|
|
82
82
|
const atlassianMarkDownParser = new MarkdownTransformer(schema, md);
|
|
83
83
|
function getMarkdownSlice(text, openStart, openEnd) {
|
|
84
|
-
if (markdownToPmConverter &&
|
|
84
|
+
if (markdownToPmConverter && isExperimentEnabled('platform_editor_paste_as_md_use_gfm')) {
|
|
85
85
|
return getMarkdownSliceViaGfm(text, schema, openStart, openEnd, markdownToPmConverter, isExperimentEnabled('platform_editor_gfm_link_paste_fix'));
|
|
86
86
|
}
|
|
87
87
|
const escapedTextInput = escapeBackslashAndLinksExceptCodeBlock(text);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { uuid } from '@atlaskit/adf-schema';
|
|
1
|
+
import { uuid } from '@atlaskit/adf-schema/uuid';
|
|
2
2
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import { mapSlice } from '@atlaskit/editor-common/utils';
|
|
4
4
|
import { PastePluginActionTypes } from '../../editor-actions/actions';
|
|
@@ -84,7 +84,7 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
84
84
|
var editorAnalyticsAPI = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions;
|
|
85
85
|
var atlassianMarkDownParser = new MarkdownTransformer(schema, md);
|
|
86
86
|
function getMarkdownSlice(text, openStart, openEnd) {
|
|
87
|
-
if (markdownToPmConverter &&
|
|
87
|
+
if (markdownToPmConverter && isExperimentEnabled('platform_editor_paste_as_md_use_gfm')) {
|
|
88
88
|
return getMarkdownSliceViaGfm(text, schema, openStart, openEnd, markdownToPmConverter, isExperimentEnabled('platform_editor_gfm_link_paste_fix'));
|
|
89
89
|
}
|
|
90
90
|
var escapedTextInput = escapeBackslashAndLinksExceptCodeBlock(text);
|
|
@@ -2,7 +2,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
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; }
|
|
4
4
|
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) { _defineProperty(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; }
|
|
5
|
-
import { uuid } from '@atlaskit/adf-schema';
|
|
5
|
+
import { uuid } from '@atlaskit/adf-schema/uuid';
|
|
6
6
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
7
7
|
import { mapSlice } from '@atlaskit/editor-common/utils';
|
|
8
8
|
import { PastePluginActionTypes } from '../../editor-actions/actions';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-paste",
|
|
3
|
-
"version": "17.1.
|
|
3
|
+
"version": "17.1.7",
|
|
4
4
|
"description": "Paste plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -44,14 +44,14 @@
|
|
|
44
44
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
45
45
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
46
46
|
"@atlaskit/prosemirror-history": "^1.2.0",
|
|
47
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
47
|
+
"@atlaskit/tmp-editor-statsig": "^174.0.0",
|
|
48
48
|
"@atlaskit/tokens": "^16.11.0",
|
|
49
49
|
"@babel/runtime": "^7.0.0",
|
|
50
50
|
"lodash": "^4.17.21",
|
|
51
51
|
"uuid": "^3.1.0"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@atlaskit/editor-common": "^120.
|
|
54
|
+
"@atlaskit/editor-common": "^120.12.0",
|
|
55
55
|
"react": "^18.2.0 || ^19.2.0",
|
|
56
56
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
57
57
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|