@atlaskit/editor-plugin-clipboard 6.0.1 → 7.0.0

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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/editor-plugin-clipboard
2
2
 
3
+ ## 7.0.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 6.0.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [`55920a92e882a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/55920a92e882a) -
14
+ tsignores added for help-center local consumpton removed
15
+ - Updated dependencies
16
+
3
17
  ## 6.0.1
4
18
 
5
19
  ### Patch Changes
@@ -40,17 +40,11 @@ var createPlugin = exports.createPlugin = function createPlugin(_ref) {
40
40
  };
41
41
  },
42
42
  props: {
43
- // @ts-ignore - Workaround for help-center local consumption
44
-
45
43
  handleDOMEvents: {
46
- // @ts-ignore - Workaround for help-center local consumption
47
-
48
44
  cut: function cut(view) {
49
45
  setLastEventType(ClipboardEventType.CUT);
50
46
  return sendClipboardAnalytics(view, dispatchAnalyticsEvent, _analytics.ACTION.CUT);
51
47
  },
52
- // @ts-ignore - Workaround for help-center local consumption
53
-
54
48
  copy: function copy(view) {
55
49
  setLastEventType(ClipboardEventType.COPY);
56
50
  return sendClipboardAnalytics(view, dispatchAnalyticsEvent, _analytics.ACTION.COPIED);
@@ -121,16 +115,13 @@ var createClipboardSerializer = exports.createClipboardSerializer = function cre
121
115
  if (lastEventType === ClipboardEventType.COPY && ((_content$firstChild2 = content.firstChild) === null || _content$firstChild2 === void 0 ? void 0 : _content$firstChild2.type.name) === 'media') {
122
116
  var _mediaNode$marks;
123
117
  var mediaNode = content.firstChild;
124
- var strippedMediaNode = schema.nodes.media.createChecked(mediaNode.attrs, mediaNode.content, // @ts-ignore - Workaround for help-center local consumption
125
- (_mediaNode$marks = mediaNode.marks) === null || _mediaNode$marks === void 0 ? void 0 : _mediaNode$marks.filter(function (mark) {
118
+ var strippedMediaNode = schema.nodes.media.createChecked(mediaNode.attrs, mediaNode.content, (_mediaNode$marks = mediaNode.marks) === null || _mediaNode$marks === void 0 ? void 0 : _mediaNode$marks.filter(function (mark) {
126
119
  return mark.type.name !== 'annotation';
127
120
  }));
128
121
  if ((0, _platformFeatureFlags.fg)('platform_editor_fix_captions_on_copy')) {
129
122
  // Content for media parents can include multiple content nodes (media and captions). We now take that
130
123
  // into consideration when we are stripping annotations
131
124
  var contentArray = [strippedMediaNode];
132
- // @ts-ignore - Workaround for help-center local consumption
133
-
134
125
  content.forEach(function (node) {
135
126
  if (node.type.name !== 'media') {
136
127
  contentArray = [].concat((0, _toConsumableArray2.default)(contentArray), [node]);
@@ -28,17 +28,11 @@ export const createPlugin = ({
28
28
  };
29
29
  },
30
30
  props: {
31
- // @ts-ignore - Workaround for help-center local consumption
32
-
33
31
  handleDOMEvents: {
34
- // @ts-ignore - Workaround for help-center local consumption
35
-
36
32
  cut: view => {
37
33
  setLastEventType(ClipboardEventType.CUT);
38
34
  return sendClipboardAnalytics(view, dispatchAnalyticsEvent, ACTION.CUT);
39
35
  },
40
- // @ts-ignore - Workaround for help-center local consumption
41
-
42
36
  copy: view => {
43
37
  setLastEventType(ClipboardEventType.COPY);
44
38
  return sendClipboardAnalytics(view, dispatchAnalyticsEvent, ACTION.COPIED);
@@ -111,14 +105,11 @@ export const createClipboardSerializer = (schema, getEditorView) => {
111
105
  if (lastEventType === ClipboardEventType.COPY && ((_content$firstChild2 = content.firstChild) === null || _content$firstChild2 === void 0 ? void 0 : _content$firstChild2.type.name) === 'media') {
112
106
  var _mediaNode$marks;
113
107
  const mediaNode = content.firstChild;
114
- const strippedMediaNode = schema.nodes.media.createChecked(mediaNode.attrs, mediaNode.content, // @ts-ignore - Workaround for help-center local consumption
115
- (_mediaNode$marks = mediaNode.marks) === null || _mediaNode$marks === void 0 ? void 0 : _mediaNode$marks.filter(mark => mark.type.name !== 'annotation'));
108
+ const strippedMediaNode = schema.nodes.media.createChecked(mediaNode.attrs, mediaNode.content, (_mediaNode$marks = mediaNode.marks) === null || _mediaNode$marks === void 0 ? void 0 : _mediaNode$marks.filter(mark => mark.type.name !== 'annotation'));
116
109
  if (fg('platform_editor_fix_captions_on_copy')) {
117
110
  // Content for media parents can include multiple content nodes (media and captions). We now take that
118
111
  // into consideration when we are stripping annotations
119
112
  let contentArray = [strippedMediaNode];
120
- // @ts-ignore - Workaround for help-center local consumption
121
-
122
113
  content.forEach(node => {
123
114
  if (node.type.name !== 'media') {
124
115
  contentArray = [...contentArray, node];
@@ -33,17 +33,11 @@ export var createPlugin = function createPlugin(_ref) {
33
33
  };
34
34
  },
35
35
  props: {
36
- // @ts-ignore - Workaround for help-center local consumption
37
-
38
36
  handleDOMEvents: {
39
- // @ts-ignore - Workaround for help-center local consumption
40
-
41
37
  cut: function cut(view) {
42
38
  setLastEventType(ClipboardEventType.CUT);
43
39
  return sendClipboardAnalytics(view, dispatchAnalyticsEvent, ACTION.CUT);
44
40
  },
45
- // @ts-ignore - Workaround for help-center local consumption
46
-
47
41
  copy: function copy(view) {
48
42
  setLastEventType(ClipboardEventType.COPY);
49
43
  return sendClipboardAnalytics(view, dispatchAnalyticsEvent, ACTION.COPIED);
@@ -114,16 +108,13 @@ export var createClipboardSerializer = function createClipboardSerializer(schema
114
108
  if (lastEventType === ClipboardEventType.COPY && ((_content$firstChild2 = content.firstChild) === null || _content$firstChild2 === void 0 ? void 0 : _content$firstChild2.type.name) === 'media') {
115
109
  var _mediaNode$marks;
116
110
  var mediaNode = content.firstChild;
117
- var strippedMediaNode = schema.nodes.media.createChecked(mediaNode.attrs, mediaNode.content, // @ts-ignore - Workaround for help-center local consumption
118
- (_mediaNode$marks = mediaNode.marks) === null || _mediaNode$marks === void 0 ? void 0 : _mediaNode$marks.filter(function (mark) {
111
+ var strippedMediaNode = schema.nodes.media.createChecked(mediaNode.attrs, mediaNode.content, (_mediaNode$marks = mediaNode.marks) === null || _mediaNode$marks === void 0 ? void 0 : _mediaNode$marks.filter(function (mark) {
119
112
  return mark.type.name !== 'annotation';
120
113
  }));
121
114
  if (fg('platform_editor_fix_captions_on_copy')) {
122
115
  // Content for media parents can include multiple content nodes (media and captions). We now take that
123
116
  // into consideration when we are stripping annotations
124
117
  var contentArray = [strippedMediaNode];
125
- // @ts-ignore - Workaround for help-center local consumption
126
-
127
118
  content.forEach(function (node) {
128
119
  if (node.type.name !== 'media') {
129
120
  contentArray = [].concat(_toConsumableArray(contentArray), [node]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-clipboard",
3
- "version": "6.0.1",
3
+ "version": "7.0.0",
4
4
  "description": "Clipboard plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -27,19 +27,17 @@
27
27
  "sideEffects": false,
28
28
  "atlaskit:src": "src/index.ts",
29
29
  "dependencies": {
30
- "@atlaskit/editor-prosemirror": "7.0.0",
30
+ "@atlaskit/editor-prosemirror": "^7.2.0",
31
31
  "@atlaskit/platform-feature-flags": "^1.1.0",
32
32
  "@babel/runtime": "^7.0.0"
33
33
  },
34
34
  "peerDependencies": {
35
- "@atlaskit/editor-common": "^110.34.0",
35
+ "@atlaskit/editor-common": "^111.0.0",
36
36
  "react": "^18.2.0",
37
37
  "react-dom": "^18.2.0"
38
38
  },
39
39
  "devDependencies": {
40
- "@af/visual-regression": "workspace:^",
41
- "@atlaskit/ssr": "workspace:^",
42
- "@testing-library/react": "^13.4.0",
40
+ "@testing-library/react": "^16.3.0",
43
41
  "wait-for-expect": "^1.2.0"
44
42
  },
45
43
  "techstack": {