@atlaskit/editor-plugin-limited-mode 5.0.20 → 5.0.22

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-limited-mode
2
2
 
3
+ ## 5.0.22
4
+
5
+ ### Patch Changes
6
+
7
+ - [`d1a0ee6dbcefd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d1a0ee6dbcefd) -
8
+ Clean up feature gate platform_editor_native_anchor_patch_2
9
+ - Updated dependencies
10
+
11
+ ## 5.0.21
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 5.0.20
4
18
 
5
19
  ### Patch Changes
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.limitedModePlugin = void 0;
7
7
  var _nodeAnchor = require("@atlaskit/editor-common/node-anchor");
8
8
  var _usePluginStateEffect = require("@atlaskit/editor-common/use-plugin-state-effect");
9
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
10
9
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
11
10
  var _main = require("./pm-plugins/main");
12
11
  var limitedModePlugin = exports.limitedModePlugin = function limitedModePlugin(_ref) {
@@ -39,17 +38,15 @@ var limitedModePlugin = exports.limitedModePlugin = function limitedModePlugin(_
39
38
  (0, _usePluginStateEffect.usePluginStateEffect)(api, ['limitedMode'], function (_ref3) {
40
39
  var limitedModeState = _ref3.limitedModeState;
41
40
  if ((0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true)) {
42
- if ((0, _platformFeatureFlags.fg)('platform_editor_native_anchor_patch_2')) {
43
- var _limitedModeState$ena;
44
- var isEnabled = (_limitedModeState$ena = limitedModeState === null || limitedModeState === void 0 ? void 0 : limitedModeState.enabled) !== null && _limitedModeState$ena !== void 0 ? _limitedModeState$ena : false;
45
- var nodeIdProvider = (0, _nodeAnchor.getNodeIdProvider)(editorView);
46
- // When limited mode is enabled first time,
47
- // We need to remove all existing data-node-anchor attributes
48
- // And nodeIdProvider to limited mode to prevent adding data-node-anchor on new nodes
41
+ var _limitedModeState$ena;
42
+ var isEnabled = (_limitedModeState$ena = limitedModeState === null || limitedModeState === void 0 ? void 0 : limitedModeState.enabled) !== null && _limitedModeState$ena !== void 0 ? _limitedModeState$ena : false;
43
+ var nodeIdProvider = (0, _nodeAnchor.getNodeIdProvider)(editorView);
44
+ // When limited mode is enabled first time,
45
+ // We need to remove all existing data-node-anchor attributes
46
+ // And nodeIdProvider to limited mode to prevent adding data-node-anchor on new nodes
49
47
 
50
- if (isEnabled && nodeIdProvider && !nodeIdProvider.isLimitedMode()) {
51
- nodeIdProvider.setLimitedMode();
52
- }
48
+ if (isEnabled && nodeIdProvider && !nodeIdProvider.isLimitedMode()) {
49
+ nodeIdProvider.setLimitedMode();
53
50
  }
54
51
  }
55
52
  });
@@ -1,6 +1,5 @@
1
1
  import { getNodeIdProvider } from '@atlaskit/editor-common/node-anchor';
2
2
  import { usePluginStateEffect } from '@atlaskit/editor-common/use-plugin-state-effect';
3
- import { fg } from '@atlaskit/platform-feature-flags';
4
3
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
4
  import { createPlugin, limitedModePluginKey } from './pm-plugins/main';
6
5
  export const limitedModePlugin = ({
@@ -36,17 +35,15 @@ export const limitedModePlugin = ({
36
35
  limitedModeState
37
36
  }) => {
38
37
  if (expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true)) {
39
- if (fg('platform_editor_native_anchor_patch_2')) {
40
- var _limitedModeState$ena;
41
- const isEnabled = (_limitedModeState$ena = limitedModeState === null || limitedModeState === void 0 ? void 0 : limitedModeState.enabled) !== null && _limitedModeState$ena !== void 0 ? _limitedModeState$ena : false;
42
- const nodeIdProvider = getNodeIdProvider(editorView);
43
- // When limited mode is enabled first time,
44
- // We need to remove all existing data-node-anchor attributes
45
- // And nodeIdProvider to limited mode to prevent adding data-node-anchor on new nodes
38
+ var _limitedModeState$ena;
39
+ const isEnabled = (_limitedModeState$ena = limitedModeState === null || limitedModeState === void 0 ? void 0 : limitedModeState.enabled) !== null && _limitedModeState$ena !== void 0 ? _limitedModeState$ena : false;
40
+ const nodeIdProvider = getNodeIdProvider(editorView);
41
+ // When limited mode is enabled first time,
42
+ // We need to remove all existing data-node-anchor attributes
43
+ // And nodeIdProvider to limited mode to prevent adding data-node-anchor on new nodes
46
44
 
47
- if (isEnabled && nodeIdProvider && !nodeIdProvider.isLimitedMode()) {
48
- nodeIdProvider.setLimitedMode();
49
- }
45
+ if (isEnabled && nodeIdProvider && !nodeIdProvider.isLimitedMode()) {
46
+ nodeIdProvider.setLimitedMode();
50
47
  }
51
48
  }
52
49
  });
@@ -1,6 +1,5 @@
1
1
  import { getNodeIdProvider } from '@atlaskit/editor-common/node-anchor';
2
2
  import { usePluginStateEffect } from '@atlaskit/editor-common/use-plugin-state-effect';
3
- import { fg } from '@atlaskit/platform-feature-flags';
4
3
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
4
  import { createPlugin, limitedModePluginKey } from './pm-plugins/main';
6
5
  export var limitedModePlugin = function limitedModePlugin(_ref) {
@@ -33,17 +32,15 @@ export var limitedModePlugin = function limitedModePlugin(_ref) {
33
32
  usePluginStateEffect(api, ['limitedMode'], function (_ref3) {
34
33
  var limitedModeState = _ref3.limitedModeState;
35
34
  if (expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true)) {
36
- if (fg('platform_editor_native_anchor_patch_2')) {
37
- var _limitedModeState$ena;
38
- var isEnabled = (_limitedModeState$ena = limitedModeState === null || limitedModeState === void 0 ? void 0 : limitedModeState.enabled) !== null && _limitedModeState$ena !== void 0 ? _limitedModeState$ena : false;
39
- var nodeIdProvider = getNodeIdProvider(editorView);
40
- // When limited mode is enabled first time,
41
- // We need to remove all existing data-node-anchor attributes
42
- // And nodeIdProvider to limited mode to prevent adding data-node-anchor on new nodes
35
+ var _limitedModeState$ena;
36
+ var isEnabled = (_limitedModeState$ena = limitedModeState === null || limitedModeState === void 0 ? void 0 : limitedModeState.enabled) !== null && _limitedModeState$ena !== void 0 ? _limitedModeState$ena : false;
37
+ var nodeIdProvider = getNodeIdProvider(editorView);
38
+ // When limited mode is enabled first time,
39
+ // We need to remove all existing data-node-anchor attributes
40
+ // And nodeIdProvider to limited mode to prevent adding data-node-anchor on new nodes
43
41
 
44
- if (isEnabled && nodeIdProvider && !nodeIdProvider.isLimitedMode()) {
45
- nodeIdProvider.setLimitedMode();
46
- }
42
+ if (isEnabled && nodeIdProvider && !nodeIdProvider.isLimitedMode()) {
43
+ nodeIdProvider.setLimitedMode();
47
44
  }
48
45
  }
49
46
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-limited-mode",
3
- "version": "5.0.20",
3
+ "version": "5.0.22",
4
4
  "description": "LimitedMode plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -30,13 +30,13 @@
30
30
  "dependencies": {
31
31
  "@atlaskit/editor-prosemirror": "^7.3.0",
32
32
  "@atlaskit/platform-feature-flags": "^1.1.0",
33
- "@atlaskit/tmp-editor-statsig": "^54.0.0",
33
+ "@atlaskit/tmp-editor-statsig": "^55.0.0",
34
34
  "@babel/runtime": "^7.0.0",
35
35
  "bind-event-listener": "^3.0.0",
36
36
  "react-intl-next": "npm:react-intl@^5.18.1"
37
37
  },
38
38
  "peerDependencies": {
39
- "@atlaskit/editor-common": "^112.16.0",
39
+ "@atlaskit/editor-common": "^112.18.0",
40
40
  "react": "^18.2.0"
41
41
  },
42
42
  "devDependencies": {
@@ -78,9 +78,5 @@
78
78
  ]
79
79
  }
80
80
  },
81
- "platform-feature-flags": {
82
- "platform_editor_native_anchor_patch_2": {
83
- "type": "boolean"
84
- }
85
- }
81
+ "platform-feature-flags": {}
86
82
  }