@atlaskit/editor-plugin-paste 15.1.0 → 15.1.2

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,21 @@
1
1
  # @atlaskit/editor-plugin-paste
2
2
 
3
+ ## 15.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`b8700e10d6391`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b8700e10d6391) -
8
+ Remove invalid experiment keys from Editor package feature gate manifests.
9
+ - Updated dependencies
10
+
11
+ ## 15.1.1
12
+
13
+ ### Patch Changes
14
+
15
+ - [`0b4753c0a8c07`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0b4753c0a8c07) -
16
+ Clean up feature gates from completed rollout
17
+ - Updated dependencies
18
+
3
19
  ## 15.1.0
4
20
 
5
21
  ### Minor Changes
@@ -6,8 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.pastePlugin = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
10
- var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
11
9
  var _main = require("./pm-plugins/main");
12
10
  var _plugin = require("./pm-plugins/move-analytics/plugin");
13
11
  var _pluginFactory = require("./pm-plugins/plugin-factory");
@@ -45,7 +43,7 @@ var pastePlugin = exports.pastePlugin = function pastePlugin(_ref) {
45
43
  }
46
44
  }];
47
45
  },
48
- contentComponent: !(0, _experiments.editorExperiment)('platform_synced_block', true) && !(0, _platformFeatureFlags.fg)('platform_synced_block_unsupported_products') ? undefined : function () {
46
+ contentComponent: function contentComponent() {
49
47
  if (!pasteWarningOptions) {
50
48
  return null;
51
49
  }
@@ -379,9 +379,7 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
379
379
  event: event,
380
380
  text: text
381
381
  });
382
- if ((0, _experiments.editorExperiment)('platform_synced_block', true) || (0, _platformFeatureFlags.fg)('platform_synced_block_unsupported_products')) {
383
- slice = (0, _syncBlock2.handleSyncBlocksPaste)(slice, schema, (0, _util.getPasteSource)(event), html, pasteWarningOptions, pluginInjectionApi);
384
- }
382
+ slice = (0, _syncBlock2.handleSyncBlocksPaste)(slice, schema, (0, _util.getPasteSource)(event), html, pasteWarningOptions, pluginInjectionApi);
385
383
  var plainTextPasteSlice = (0, _utils.linkifyContent)(state.schema)(slice);
386
384
  if ((0, _analytics2.handlePasteAsPlainTextWithAnalytics)(editorAnalyticsAPI)(view, event, plainTextPasteSlice)(state, dispatch, view)) {
387
385
  return true;
@@ -7,8 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.reducer = void 0;
8
8
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
11
- var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
12
10
  var _actions = require("../editor-actions/actions");
13
11
  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; }
14
12
  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; }
@@ -39,9 +37,6 @@ var reducer = exports.reducer = function reducer(state, action) {
39
37
  }
40
38
  case _actions.PastePluginActionTypes.SET_ACTIVE_FLAG:
41
39
  {
42
- if (!(0, _experiments.editorExperiment)('platform_synced_block', true) && !(0, _platformFeatureFlags.fg)('platform_synced_block_unsupported_products')) {
43
- return state;
44
- }
45
40
  return _objectSpread(_objectSpread({}, state), {}, {
46
41
  activeFlag: action.activeFlag
47
42
  });
@@ -72,7 +72,7 @@ var showWarningFlag = function showWarningFlag(_ref) {
72
72
  // Check if rawHtml contains a synced block
73
73
  // example: "<meta charset='utf-8'><html><head></head><body><div data-sync-block=\"\" data-local-id=\"\" data-resource-id=\"d64883c8-1270-431d-a1d3-51d36a1ed5f4\" data-prosemirror-content-type=\"node\" data-prosemirror-node-name=\"syncBlock\" data-prosemirror-node-block=\"true\" data-pm-slice=\"0 0 []\"></div></body></html>"
74
74
  var hasSyncedBlockInRawHtml = function hasSyncedBlockInRawHtml(rawHtml) {
75
- return rawHtml.includes('data-sync-block="');
75
+ return Boolean(rawHtml === null || rawHtml === void 0 ? void 0 : rawHtml.includes('data-sync-block="'));
76
76
  };
77
77
 
78
78
  /**
@@ -1,6 +1,4 @@
1
1
  import React from 'react';
2
- import { fg } from '@atlaskit/platform-feature-flags';
3
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
4
2
  import { createPlugin } from './pm-plugins/main';
5
3
  import { createPlugin as createMoveAnalyticsPlugin } from './pm-plugins/move-analytics/plugin';
6
4
  import { pluginKey } from './pm-plugins/plugin-factory';
@@ -40,7 +38,7 @@ export const pastePlugin = ({
40
38
  }
41
39
  }];
42
40
  },
43
- contentComponent: !editorExperiment('platform_synced_block', true) && !fg('platform_synced_block_unsupported_products') ? undefined : () => {
41
+ contentComponent: () => {
44
42
  if (!pasteWarningOptions) {
45
43
  return null;
46
44
  }
@@ -338,9 +338,7 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
338
338
  event,
339
339
  text
340
340
  });
341
- if (editorExperiment('platform_synced_block', true) || fg('platform_synced_block_unsupported_products')) {
342
- slice = handleSyncBlocksPaste(slice, schema, getPasteSource(event), html, pasteWarningOptions, pluginInjectionApi);
343
- }
341
+ slice = handleSyncBlocksPaste(slice, schema, getPasteSource(event), html, pasteWarningOptions, pluginInjectionApi);
344
342
  const plainTextPasteSlice = linkifyContent(state.schema)(slice);
345
343
  if (handlePasteAsPlainTextWithAnalytics(editorAnalyticsAPI)(view, event, plainTextPasteSlice)(state, dispatch, view)) {
346
344
  return true;
@@ -1,5 +1,3 @@
1
- import { fg } from '@atlaskit/platform-feature-flags';
2
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
3
1
  import { PastePluginActionTypes as ActionTypes } from '../editor-actions/actions';
4
2
  export const reducer = (state, action) => {
5
3
  switch (action.type) {
@@ -30,9 +28,6 @@ export const reducer = (state, action) => {
30
28
  }
31
29
  case ActionTypes.SET_ACTIVE_FLAG:
32
30
  {
33
- if (!editorExperiment('platform_synced_block', true) && !fg('platform_synced_block_unsupported_products')) {
34
- return state;
35
- }
36
31
  return {
37
32
  ...state,
38
33
  activeFlag: action.activeFlag
@@ -65,7 +65,7 @@ const showWarningFlag = ({
65
65
  // Check if rawHtml contains a synced block
66
66
  // example: "<meta charset='utf-8'><html><head></head><body><div data-sync-block=\"\" data-local-id=\"\" data-resource-id=\"d64883c8-1270-431d-a1d3-51d36a1ed5f4\" data-prosemirror-content-type=\"node\" data-prosemirror-node-name=\"syncBlock\" data-prosemirror-node-block=\"true\" data-pm-slice=\"0 0 []\"></div></body></html>"
67
67
  const hasSyncedBlockInRawHtml = rawHtml => {
68
- return rawHtml.includes('data-sync-block="');
68
+ return Boolean(rawHtml === null || rawHtml === void 0 ? void 0 : rawHtml.includes('data-sync-block="'));
69
69
  };
70
70
 
71
71
  /**
@@ -1,6 +1,4 @@
1
1
  import React from 'react';
2
- import { fg } from '@atlaskit/platform-feature-flags';
3
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
4
2
  import { createPlugin } from './pm-plugins/main';
5
3
  import { createPlugin as createMoveAnalyticsPlugin } from './pm-plugins/move-analytics/plugin';
6
4
  import { pluginKey } from './pm-plugins/plugin-factory';
@@ -38,7 +36,7 @@ export var pastePlugin = function pastePlugin(_ref) {
38
36
  }
39
37
  }];
40
38
  },
41
- contentComponent: !editorExperiment('platform_synced_block', true) && !fg('platform_synced_block_unsupported_products') ? undefined : function () {
39
+ contentComponent: function contentComponent() {
42
40
  if (!pasteWarningOptions) {
43
41
  return null;
44
42
  }
@@ -371,9 +371,7 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
371
371
  event: event,
372
372
  text: text
373
373
  });
374
- if (editorExperiment('platform_synced_block', true) || fg('platform_synced_block_unsupported_products')) {
375
- slice = handleSyncBlocksPaste(slice, schema, getPasteSource(event), html, pasteWarningOptions, pluginInjectionApi);
376
- }
374
+ slice = handleSyncBlocksPaste(slice, schema, getPasteSource(event), html, pasteWarningOptions, pluginInjectionApi);
377
375
  var plainTextPasteSlice = linkifyContent(state.schema)(slice);
378
376
  if (handlePasteAsPlainTextWithAnalytics(editorAnalyticsAPI)(view, event, plainTextPasteSlice)(state, dispatch, view)) {
379
377
  return true;
@@ -2,8 +2,6 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
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 { fg } from '@atlaskit/platform-feature-flags';
6
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
7
5
  import { PastePluginActionTypes as ActionTypes } from '../editor-actions/actions';
8
6
  export var reducer = function reducer(state, action) {
9
7
  switch (action.type) {
@@ -32,9 +30,6 @@ export var reducer = function reducer(state, action) {
32
30
  }
33
31
  case ActionTypes.SET_ACTIVE_FLAG:
34
32
  {
35
- if (!editorExperiment('platform_synced_block', true) && !fg('platform_synced_block_unsupported_products')) {
36
- return state;
37
- }
38
33
  return _objectSpread(_objectSpread({}, state), {}, {
39
34
  activeFlag: action.activeFlag
40
35
  });
@@ -66,7 +66,7 @@ var showWarningFlag = function showWarningFlag(_ref) {
66
66
  // Check if rawHtml contains a synced block
67
67
  // example: "<meta charset='utf-8'><html><head></head><body><div data-sync-block=\"\" data-local-id=\"\" data-resource-id=\"d64883c8-1270-431d-a1d3-51d36a1ed5f4\" data-prosemirror-content-type=\"node\" data-prosemirror-node-name=\"syncBlock\" data-prosemirror-node-block=\"true\" data-pm-slice=\"0 0 []\"></div></body></html>"
68
68
  var hasSyncedBlockInRawHtml = function hasSyncedBlockInRawHtml(rawHtml) {
69
- return rawHtml.includes('data-sync-block="');
69
+ return Boolean(rawHtml === null || rawHtml === void 0 ? void 0 : rawHtml.includes('data-sync-block="'));
70
70
  };
71
71
 
72
72
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-paste",
3
- "version": "15.1.0",
3
+ "version": "15.1.2",
4
4
  "description": "Paste plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -19,10 +19,10 @@
19
19
  "sideEffects": false,
20
20
  "atlaskit:src": "src/index.ts",
21
21
  "dependencies": {
22
- "@atlaskit/adf-schema": "^56.6.0",
22
+ "@atlaskit/adf-schema": "^56.7.0",
23
23
  "@atlaskit/adf-utils": "^20.5.0",
24
- "@atlaskit/code": "^18.2.0",
25
- "@atlaskit/editor-markdown-transformer": "^6.1.0",
24
+ "@atlaskit/code": "^19.0.0",
25
+ "@atlaskit/editor-markdown-transformer": "^6.2.0",
26
26
  "@atlaskit/editor-plugin-analytics": "^14.0.0",
27
27
  "@atlaskit/editor-plugin-annotation": "^14.0.0",
28
28
  "@atlaskit/editor-plugin-better-type-history": "^14.0.0",
@@ -43,13 +43,13 @@
43
43
  "@atlaskit/platform-feature-flags": "^2.1.0",
44
44
  "@atlaskit/prosemirror-history": "^1.1.0",
45
45
  "@atlaskit/tmp-editor-statsig": "^145.0.0",
46
- "@atlaskit/tokens": "^16.5.0",
46
+ "@atlaskit/tokens": "^16.6.0",
47
47
  "@babel/runtime": "^7.0.0",
48
48
  "lodash": "^4.17.21",
49
49
  "uuid": "^3.1.0"
50
50
  },
51
51
  "peerDependencies": {
52
- "@atlaskit/editor-common": "^118.2.0",
52
+ "@atlaskit/editor-common": "^118.4.0",
53
53
  "react": "^18.2.0 || ^19.2.0",
54
54
  "react-dom": "^18.2.0 || ^19.2.0",
55
55
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
@@ -116,15 +116,6 @@
116
116
  "platform_media_cross_client_copy_with_auth": {
117
117
  "type": "boolean"
118
118
  },
119
- "platform_synced_block_unsupported_products": {
120
- "type": "boolean"
121
- },
122
- "platform_editor_agent_mentions": {
123
- "type": "experiment"
124
- },
125
- "platform_editor_nest_in_table_renderer_paste": {
126
- "type": "experiment"
127
- },
128
119
  "platform_editor_paste_renderer_analytics": {
129
120
  "type": "boolean"
130
121
  },