@atlaskit/editor-plugin-paste 7.4.11 → 7.4.12

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,13 @@
1
1
  # @atlaskit/editor-plugin-paste
2
2
 
3
+ ## 7.4.12
4
+
5
+ ### Patch Changes
6
+
7
+ - [`55920a92e882a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/55920a92e882a) -
8
+ tsignores added for help-center local consumpton removed
9
+ - Updated dependencies
10
+
3
11
  ## 7.4.11
4
12
 
5
13
  ### Patch Changes
@@ -128,12 +128,8 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
128
128
  props: {
129
129
  // For serialising to plain text
130
130
  clipboardTextSerializer: (0, _platformFeatureFlags.fg)('platform_editor_date_to_text') ? (0, _clipboardTextSerializer.createClipboardTextSerializer)(getIntl()) : _clipboardTextSerializer.clipboardTextSerializer,
131
- // @ts-ignore - Workaround for help-center local consumption
132
-
133
131
  handleDOMEvents: {
134
132
  // note
135
- // @ts-ignore - Workaround for help-center local consumption
136
-
137
133
  paste: function paste(view, event) {
138
134
  mostRecentPasteEvent = event;
139
135
  if ((0, _expValEquals.expValEquals)('cc_editor_interactivity_monitoring', 'isEnabled', true) && event.clipboardData) {
@@ -143,7 +139,6 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
143
139
  }
144
140
  },
145
141
  // note
146
- // @ts-ignore - Workaround for help-center local consumption
147
142
  handlePaste: function handlePaste(view, rawEvent, slice) {
148
143
  var _text, _schema$nodes, _schema$nodes2, _schema$nodes3, _pluginInjectionApi$m, _schema$nodes$table;
149
144
  var event = rawEvent;
@@ -269,15 +264,10 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
269
264
  // appendedTransactions to repair them (if they're partial or incomplete) and we don't want
270
265
  // to split those repairing transactions in prosemirror-history when they're being added to the
271
266
  // "done" stack
272
- // @ts-ignore - Workaround for help-center local consumption
273
-
274
267
  var isPastingTable = tr.steps.some(function (step) {
275
268
  var _slice$content;
276
269
  var slice = (0, _utils.extractSliceFromStep)(step);
277
270
  var tableExists = false;
278
-
279
- // @ts-ignore - Workaround for help-center local consumption
280
-
281
271
  slice === null || slice === void 0 || (_slice$content = slice.content) === null || _slice$content === void 0 || _slice$content.forEach(function (node) {
282
272
  if (node.type === state.schema.nodes.table) {
283
273
  tableExists = true;
@@ -535,9 +525,6 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
535
525
  // breakout marks are only valid in the root document.
536
526
  if (selectionParentType !== state.schema.nodes.doc) {
537
527
  var sliceCopy = _model.Slice.fromJSON(state.schema, slice.toJSON() || {});
538
-
539
- // @ts-ignore - Workaround for help-center local consumption
540
-
541
528
  sliceCopy.content.descendants(function (node) {
542
529
  // @ts-ignore - [unblock prosemirror bump] assigning to readonly prop
543
530
  node.marks = node.marks.filter(function (mark) {
@@ -573,7 +560,6 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
573
560
  }
574
561
  return false;
575
562
  },
576
- // @ts-ignore - Workaround for help-center local consumption
577
563
  transformPasted: function transformPasted(slice) {
578
564
  if (sanitizePrivateContent) {
579
565
  slice = (0, _handlers.handleMention)(slice, schema);
@@ -604,7 +590,6 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
604
590
  slice = (0, _transforms.transformSliceToRemoveMacroId)(slice, schema);
605
591
  return slice;
606
592
  },
607
- // @ts-ignore - Workaround for help-center local consumption
608
593
  transformPastedHTML: function transformPastedHTML(html) {
609
594
  // Fix for issue ED-4438
610
595
  // text from google docs should not be pasted as inline code
@@ -27,17 +27,11 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatch, editor
27
27
  key: _pluginKey.pluginKey,
28
28
  state: (0, _pluginFactory.createPluginState)(dispatch, _types.defaultState),
29
29
  props: {
30
- // @ts-ignore - Workaround for help-center local consumption
31
-
32
30
  handleDOMEvents: {
33
- // @ts-ignore - Workaround for help-center local consumption
34
-
35
31
  cut: function cut() {
36
32
  isCutEvent = true;
37
33
  }
38
34
  },
39
- // @ts-ignore - Workaround for help-center local consumption
40
-
41
35
  handlePaste: function handlePaste(_ref, event, slice) {
42
36
  var _content$firstChild;
43
37
  var state = _ref.state,
@@ -75,8 +69,6 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatch, editor
75
69
  var updatedTr = (0, _commands.resetContentMovedTransform)()(tr);
76
70
  dispatch(updatedTr);
77
71
  },
78
- // @ts-ignore - Workaround for help-center local consumption
79
-
80
72
  transformCopied: function transformCopied(slice, _ref2) {
81
73
  var _content$firstChild2;
82
74
  var state = _ref2.state,
@@ -94,12 +94,8 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
94
94
  props: {
95
95
  // For serialising to plain text
96
96
  clipboardTextSerializer: fg('platform_editor_date_to_text') ? createClipboardTextSerializer(getIntl()) : clipboardTextSerializer,
97
- // @ts-ignore - Workaround for help-center local consumption
98
-
99
97
  handleDOMEvents: {
100
98
  // note
101
- // @ts-ignore - Workaround for help-center local consumption
102
-
103
99
  paste: (view, event) => {
104
100
  mostRecentPasteEvent = event;
105
101
  if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true) && event.clipboardData) {
@@ -109,8 +105,6 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
109
105
  }
110
106
  },
111
107
  // note
112
- // @ts-ignore - Workaround for help-center local consumption
113
-
114
108
  handlePaste(view, rawEvent, slice) {
115
109
  var _text, _schema$nodes, _schema$nodes2, _schema$nodes3, _pluginInjectionApi$m, _schema$nodes$table;
116
110
  const event = rawEvent;
@@ -232,15 +226,10 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
232
226
  // appendedTransactions to repair them (if they're partial or incomplete) and we don't want
233
227
  // to split those repairing transactions in prosemirror-history when they're being added to the
234
228
  // "done" stack
235
- // @ts-ignore - Workaround for help-center local consumption
236
-
237
229
  const isPastingTable = tr.steps.some(step => {
238
230
  var _slice$content;
239
231
  const slice = extractSliceFromStep(step);
240
232
  let tableExists = false;
241
-
242
- // @ts-ignore - Workaround for help-center local consumption
243
-
244
233
  slice === null || slice === void 0 ? void 0 : (_slice$content = slice.content) === null || _slice$content === void 0 ? void 0 : _slice$content.forEach(node => {
245
234
  if (node.type === state.schema.nodes.table) {
246
235
  tableExists = true;
@@ -500,9 +489,6 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
500
489
  // breakout marks are only valid in the root document.
501
490
  if (selectionParentType !== state.schema.nodes.doc) {
502
491
  const sliceCopy = Slice.fromJSON(state.schema, slice.toJSON() || {});
503
-
504
- // @ts-ignore - Workaround for help-center local consumption
505
-
506
492
  sliceCopy.content.descendants(node => {
507
493
  // @ts-ignore - [unblock prosemirror bump] assigning to readonly prop
508
494
  node.marks = node.marks.filter(mark => mark.type.name !== 'breakout');
@@ -536,8 +522,6 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
536
522
  }
537
523
  return false;
538
524
  },
539
- // @ts-ignore - Workaround for help-center local consumption
540
-
541
525
  transformPasted(slice) {
542
526
  if (sanitizePrivateContent) {
543
527
  slice = handleMention(slice, schema);
@@ -568,8 +552,6 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
568
552
  slice = transformSliceToRemoveMacroId(slice, schema);
569
553
  return slice;
570
554
  },
571
- // @ts-ignore - Workaround for help-center local consumption
572
-
573
555
  transformPastedHTML(html) {
574
556
  // Fix for issue ED-4438
575
557
  // text from google docs should not be pasted as inline code
@@ -18,17 +18,11 @@ export const createPlugin = (dispatch, editorAnalyticsAPI) => {
18
18
  key: pluginKey,
19
19
  state: createPluginState(dispatch, defaultState),
20
20
  props: {
21
- // @ts-ignore - Workaround for help-center local consumption
22
-
23
21
  handleDOMEvents: {
24
- // @ts-ignore - Workaround for help-center local consumption
25
-
26
22
  cut: () => {
27
23
  isCutEvent = true;
28
24
  }
29
25
  },
30
- // @ts-ignore - Workaround for help-center local consumption
31
-
32
26
  handlePaste: ({
33
27
  state,
34
28
  dispatch
@@ -72,8 +66,6 @@ export const createPlugin = (dispatch, editorAnalyticsAPI) => {
72
66
  const updatedTr = resetContentMovedTransform()(tr);
73
67
  dispatch(updatedTr);
74
68
  },
75
- // @ts-ignore - Workaround for help-center local consumption
76
-
77
69
  transformCopied: (slice, {
78
70
  state,
79
71
  dispatch
@@ -120,12 +120,8 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
120
120
  props: {
121
121
  // For serialising to plain text
122
122
  clipboardTextSerializer: fg('platform_editor_date_to_text') ? createClipboardTextSerializer(getIntl()) : clipboardTextSerializer,
123
- // @ts-ignore - Workaround for help-center local consumption
124
-
125
123
  handleDOMEvents: {
126
124
  // note
127
- // @ts-ignore - Workaround for help-center local consumption
128
-
129
125
  paste: function paste(view, event) {
130
126
  mostRecentPasteEvent = event;
131
127
  if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true) && event.clipboardData) {
@@ -135,7 +131,6 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
135
131
  }
136
132
  },
137
133
  // note
138
- // @ts-ignore - Workaround for help-center local consumption
139
134
  handlePaste: function handlePaste(view, rawEvent, slice) {
140
135
  var _text, _schema$nodes, _schema$nodes2, _schema$nodes3, _pluginInjectionApi$m, _schema$nodes$table;
141
136
  var event = rawEvent;
@@ -261,15 +256,10 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
261
256
  // appendedTransactions to repair them (if they're partial or incomplete) and we don't want
262
257
  // to split those repairing transactions in prosemirror-history when they're being added to the
263
258
  // "done" stack
264
- // @ts-ignore - Workaround for help-center local consumption
265
-
266
259
  var isPastingTable = tr.steps.some(function (step) {
267
260
  var _slice$content;
268
261
  var slice = extractSliceFromStep(step);
269
262
  var tableExists = false;
270
-
271
- // @ts-ignore - Workaround for help-center local consumption
272
-
273
263
  slice === null || slice === void 0 || (_slice$content = slice.content) === null || _slice$content === void 0 || _slice$content.forEach(function (node) {
274
264
  if (node.type === state.schema.nodes.table) {
275
265
  tableExists = true;
@@ -527,9 +517,6 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
527
517
  // breakout marks are only valid in the root document.
528
518
  if (selectionParentType !== state.schema.nodes.doc) {
529
519
  var sliceCopy = Slice.fromJSON(state.schema, slice.toJSON() || {});
530
-
531
- // @ts-ignore - Workaround for help-center local consumption
532
-
533
520
  sliceCopy.content.descendants(function (node) {
534
521
  // @ts-ignore - [unblock prosemirror bump] assigning to readonly prop
535
522
  node.marks = node.marks.filter(function (mark) {
@@ -565,7 +552,6 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
565
552
  }
566
553
  return false;
567
554
  },
568
- // @ts-ignore - Workaround for help-center local consumption
569
555
  transformPasted: function transformPasted(slice) {
570
556
  if (sanitizePrivateContent) {
571
557
  slice = handleMention(slice, schema);
@@ -596,7 +582,6 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
596
582
  slice = transformSliceToRemoveMacroId(slice, schema);
597
583
  return slice;
598
584
  },
599
- // @ts-ignore - Workaround for help-center local consumption
600
585
  transformPastedHTML: function transformPastedHTML(html) {
601
586
  // Fix for issue ED-4438
602
587
  // text from google docs should not be pasted as inline code
@@ -21,17 +21,11 @@ export var createPlugin = function createPlugin(dispatch, editorAnalyticsAPI) {
21
21
  key: pluginKey,
22
22
  state: createPluginState(dispatch, defaultState),
23
23
  props: {
24
- // @ts-ignore - Workaround for help-center local consumption
25
-
26
24
  handleDOMEvents: {
27
- // @ts-ignore - Workaround for help-center local consumption
28
-
29
25
  cut: function cut() {
30
26
  isCutEvent = true;
31
27
  }
32
28
  },
33
- // @ts-ignore - Workaround for help-center local consumption
34
-
35
29
  handlePaste: function handlePaste(_ref, event, slice) {
36
30
  var _content$firstChild;
37
31
  var state = _ref.state,
@@ -69,8 +63,6 @@ export var createPlugin = function createPlugin(dispatch, editorAnalyticsAPI) {
69
63
  var updatedTr = resetContentMovedTransform()(tr);
70
64
  dispatch(updatedTr);
71
65
  },
72
- // @ts-ignore - Workaround for help-center local consumption
73
-
74
66
  transformCopied: function transformCopied(slice, _ref2) {
75
67
  var _content$firstChild2;
76
68
  var state = _ref2.state,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-paste",
3
- "version": "7.4.11",
3
+ "version": "7.4.12",
4
4
  "description": "Paste plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -44,7 +44,7 @@
44
44
  "@atlaskit/media-client": "^35.6.0",
45
45
  "@atlaskit/media-common": "^12.3.0",
46
46
  "@atlaskit/platform-feature-flags": "^1.1.0",
47
- "@atlaskit/tmp-editor-statsig": "^14.1.0",
47
+ "@atlaskit/tmp-editor-statsig": "^14.2.0",
48
48
  "@babel/runtime": "^7.0.0",
49
49
  "lodash": "^4.17.21",
50
50
  "react-intl-next": "npm:react-intl@^5.18.1",