@atlaskit/editor-plugin-editor-disabled 6.1.1 → 6.1.3

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,20 @@
1
1
  # @atlaskit/editor-plugin-editor-disabled
2
2
 
3
+ ## 6.1.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`2e389ee54c1f1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2e389ee54c1f1) -
8
+ Update gates to roll out minor updates faster
9
+
10
+ ## 6.1.2
11
+
12
+ ### Patch Changes
13
+
14
+ - [`55920a92e882a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/55920a92e882a) -
15
+ tsignores added for help-center local consumpton removed
16
+ - Updated dependencies
17
+
3
18
  ## 6.1.1
4
19
 
5
20
  ### Patch Changes
@@ -45,12 +45,10 @@ function createPlugin(dispatch, options) {
45
45
  disabledByPlugin: false
46
46
  };
47
47
  },
48
- // @ts-ignore - Workaround for help-center local consumption
49
-
50
48
  apply: function apply(tr, pluginState) {
51
49
  var meta = tr.getMeta(pluginKey);
52
50
  if (meta) {
53
- if ((0, _platformFeatureFlags.fg)('platform_editor_ai_aifc_patch_beta')) {
51
+ if ((0, _platformFeatureFlags.fg)('platform_editor_ai_generic_prep_for_aifc_2')) {
54
52
  if ('action' in meta) {
55
53
  return (0, _reducer.reducer)(pluginState, meta);
56
54
  }
@@ -63,8 +61,8 @@ function createPlugin(dispatch, options) {
63
61
  props: {
64
62
  // If we set to undefined it respects the previous value.
65
63
  // Prosemirror doesn't have this typed correctly for this type of behaviour
66
- // @ts-ignore - Workaround for help-center local consumption
67
- editable: (0, _platformFeatureFlags.fg)('platform_editor_ai_aifc_patch_beta') ? function (state) {
64
+ // @ts-expect-error
65
+ editable: (0, _platformFeatureFlags.fg)('platform_editor_ai_generic_prep_for_aifc_2') ? function (state) {
68
66
  var _pluginKey$getState;
69
67
  var _ref = (_pluginKey$getState = pluginKey.getState(state)) !== null && _pluginKey$getState !== void 0 ? _pluginKey$getState : {
70
68
  disabledByPlugin: false
@@ -73,17 +71,13 @@ function createPlugin(dispatch, options) {
73
71
  return disabledByPlugin ? false : undefined;
74
72
  } : undefined
75
73
  },
76
- // @ts-ignore - Workaround for help-center local consumption
77
-
78
74
  view: function view(_view) {
79
75
  // schedule on mount
80
76
  scheduleEditorDisabledUpdate(_view);
81
77
  return {
82
- // @ts-ignore - Workaround for help-center local consumption
83
78
  update: function update(view) {
84
79
  scheduleEditorDisabledUpdate(view);
85
80
  },
86
- // @ts-ignore - Workaround for help-center local consumption
87
81
  destroy: function destroy() {
88
82
  scheduleEditorDisabledUpdate.cancel();
89
83
  }
@@ -126,7 +120,7 @@ var editorDisabledPlugin = exports.editorDisabledPlugin = function editorDisable
126
120
  editorDisabled: false
127
121
  };
128
122
  }
129
- if ((0, _platformFeatureFlags.fg)('platform_editor_ai_aifc_patch_beta')) {
123
+ if ((0, _platformFeatureFlags.fg)('platform_editor_ai_generic_prep_for_aifc_2')) {
130
124
  return {
131
125
  editorDisabled: pluginState.disabledByPlugin || pluginState.editorDisabled
132
126
  };
@@ -146,7 +140,7 @@ var editorDisabledPlugin = exports.editorDisabledPlugin = function editorDisable
146
140
  toggleDisabled: function toggleDisabled(disabled) {
147
141
  return function (_ref4) {
148
142
  var tr = _ref4.tr;
149
- return (0, _platformFeatureFlags.fg)('platform_editor_ai_aifc_patch_beta') ? tr.setMeta(pluginKey, {
143
+ return (0, _platformFeatureFlags.fg)('platform_editor_ai_generic_prep_for_aifc_2') ? tr.setMeta(pluginKey, {
150
144
  action: _reducer.ACTION.TOGGLE_DISABLED,
151
145
  disabled: disabled
152
146
  }) : null;
@@ -36,12 +36,10 @@ function createPlugin(dispatch, options) {
36
36
  disabledByPlugin: false
37
37
  };
38
38
  },
39
- // @ts-ignore - Workaround for help-center local consumption
40
-
41
39
  apply: (tr, pluginState) => {
42
40
  const meta = tr.getMeta(pluginKey);
43
41
  if (meta) {
44
- if (fg('platform_editor_ai_aifc_patch_beta')) {
42
+ if (fg('platform_editor_ai_generic_prep_for_aifc_2')) {
45
43
  if ('action' in meta) {
46
44
  return reducer(pluginState, meta);
47
45
  }
@@ -57,8 +55,8 @@ function createPlugin(dispatch, options) {
57
55
  props: {
58
56
  // If we set to undefined it respects the previous value.
59
57
  // Prosemirror doesn't have this typed correctly for this type of behaviour
60
- // @ts-ignore - Workaround for help-center local consumption
61
- editable: fg('platform_editor_ai_aifc_patch_beta') ? state => {
58
+ // @ts-expect-error
59
+ editable: fg('platform_editor_ai_generic_prep_for_aifc_2') ? state => {
62
60
  var _pluginKey$getState;
63
61
  const {
64
62
  disabledByPlugin
@@ -68,19 +66,13 @@ function createPlugin(dispatch, options) {
68
66
  return disabledByPlugin ? false : undefined;
69
67
  } : undefined
70
68
  },
71
- // @ts-ignore - Workaround for help-center local consumption
72
-
73
69
  view: view => {
74
70
  // schedule on mount
75
71
  scheduleEditorDisabledUpdate(view);
76
72
  return {
77
- // @ts-ignore - Workaround for help-center local consumption
78
-
79
73
  update(view) {
80
74
  scheduleEditorDisabledUpdate(view);
81
75
  },
82
- // @ts-ignore - Workaround for help-center local consumption
83
-
84
76
  destroy() {
85
77
  scheduleEditorDisabledUpdate.cancel();
86
78
  }
@@ -122,7 +114,7 @@ export const editorDisabledPlugin = ({
122
114
  editorDisabled: false
123
115
  };
124
116
  }
125
- if (fg('platform_editor_ai_aifc_patch_beta')) {
117
+ if (fg('platform_editor_ai_generic_prep_for_aifc_2')) {
126
118
  return {
127
119
  editorDisabled: pluginState.disabledByPlugin || pluginState.editorDisabled
128
120
  };
@@ -139,7 +131,7 @@ export const editorDisabledPlugin = ({
139
131
  toggleDisabled: disabled => ({
140
132
  tr
141
133
  }) => {
142
- return fg('platform_editor_ai_aifc_patch_beta') ? tr.setMeta(pluginKey, {
134
+ return fg('platform_editor_ai_generic_prep_for_aifc_2') ? tr.setMeta(pluginKey, {
143
135
  action: ACTION.TOGGLE_DISABLED,
144
136
  disabled
145
137
  }) : null;
@@ -38,12 +38,10 @@ function createPlugin(dispatch, options) {
38
38
  disabledByPlugin: false
39
39
  };
40
40
  },
41
- // @ts-ignore - Workaround for help-center local consumption
42
-
43
41
  apply: function apply(tr, pluginState) {
44
42
  var meta = tr.getMeta(pluginKey);
45
43
  if (meta) {
46
- if (fg('platform_editor_ai_aifc_patch_beta')) {
44
+ if (fg('platform_editor_ai_generic_prep_for_aifc_2')) {
47
45
  if ('action' in meta) {
48
46
  return reducer(pluginState, meta);
49
47
  }
@@ -56,8 +54,8 @@ function createPlugin(dispatch, options) {
56
54
  props: {
57
55
  // If we set to undefined it respects the previous value.
58
56
  // Prosemirror doesn't have this typed correctly for this type of behaviour
59
- // @ts-ignore - Workaround for help-center local consumption
60
- editable: fg('platform_editor_ai_aifc_patch_beta') ? function (state) {
57
+ // @ts-expect-error
58
+ editable: fg('platform_editor_ai_generic_prep_for_aifc_2') ? function (state) {
61
59
  var _pluginKey$getState;
62
60
  var _ref = (_pluginKey$getState = pluginKey.getState(state)) !== null && _pluginKey$getState !== void 0 ? _pluginKey$getState : {
63
61
  disabledByPlugin: false
@@ -66,17 +64,13 @@ function createPlugin(dispatch, options) {
66
64
  return disabledByPlugin ? false : undefined;
67
65
  } : undefined
68
66
  },
69
- // @ts-ignore - Workaround for help-center local consumption
70
-
71
67
  view: function view(_view) {
72
68
  // schedule on mount
73
69
  scheduleEditorDisabledUpdate(_view);
74
70
  return {
75
- // @ts-ignore - Workaround for help-center local consumption
76
71
  update: function update(view) {
77
72
  scheduleEditorDisabledUpdate(view);
78
73
  },
79
- // @ts-ignore - Workaround for help-center local consumption
80
74
  destroy: function destroy() {
81
75
  scheduleEditorDisabledUpdate.cancel();
82
76
  }
@@ -119,7 +113,7 @@ export var editorDisabledPlugin = function editorDisabledPlugin(_ref2) {
119
113
  editorDisabled: false
120
114
  };
121
115
  }
122
- if (fg('platform_editor_ai_aifc_patch_beta')) {
116
+ if (fg('platform_editor_ai_generic_prep_for_aifc_2')) {
123
117
  return {
124
118
  editorDisabled: pluginState.disabledByPlugin || pluginState.editorDisabled
125
119
  };
@@ -139,7 +133,7 @@ export var editorDisabledPlugin = function editorDisabledPlugin(_ref2) {
139
133
  toggleDisabled: function toggleDisabled(disabled) {
140
134
  return function (_ref4) {
141
135
  var tr = _ref4.tr;
142
- return fg('platform_editor_ai_aifc_patch_beta') ? tr.setMeta(pluginKey, {
136
+ return fg('platform_editor_ai_generic_prep_for_aifc_2') ? tr.setMeta(pluginKey, {
143
137
  action: ACTION.TOGGLE_DISABLED,
144
138
  disabled: disabled
145
139
  }) : null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-editor-disabled",
3
- "version": "6.1.1",
3
+ "version": "6.1.3",
4
4
  "description": "Editor disabled plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -19,7 +19,7 @@
19
19
  "sideEffects": false,
20
20
  "atlaskit:src": "src/index.ts",
21
21
  "platform-feature-flags": {
22
- "platform_editor_ai_aifc_patch_beta": {
22
+ "platform_editor_ai_generic_prep_for_aifc_2": {
23
23
  "type": "boolean"
24
24
  }
25
25
  },
@@ -30,7 +30,7 @@
30
30
  "raf-schd": "^4.0.3"
31
31
  },
32
32
  "peerDependencies": {
33
- "@atlaskit/editor-common": "^110.34.0",
33
+ "@atlaskit/editor-common": "^110.38.0",
34
34
  "react": "^18.2.0",
35
35
  "react-dom": "^18.2.0"
36
36
  },