@atlaskit/editor-plugin-status 7.1.8 → 7.1.10

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-status
2
2
 
3
+ ## 7.1.10
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 7.1.9
10
+
11
+ ### Patch Changes
12
+
13
+ - [`4d676bbdb3ce6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4d676bbdb3ce6) -
14
+ ts-ignore added temporarily to unblock local consumption for help-center, will be removed once
15
+ project refs are setup
16
+ - Updated dependencies
17
+
3
18
  ## 7.1.8
4
19
 
5
20
  ### Patch Changes
@@ -24,6 +24,7 @@ var createPlugin = function createPlugin(pmPluginFactoryParams, options) {
24
24
  focusStatusInput: false
25
25
  };
26
26
  },
27
+ // @ts-ignore - Workaround for help-center local consumption
27
28
  apply: function apply(tr, state, oldEditorState) {
28
29
  var meta = tr.getMeta(_pluginKey.pluginKey);
29
30
  if (meta) {
@@ -65,6 +66,8 @@ var createPlugin = function createPlugin(pmPluginFactoryParams, options) {
65
66
  return state;
66
67
  }
67
68
  },
69
+ // @ts-ignore - Workaround for help-center local consumption
70
+
68
71
  filterTransaction: function filterTransaction(tr, state) {
69
72
  // if it is a selection change transaction, and selection changes from node to text
70
73
  if (tr.selectionSet && !tr.steps.length && tr.isGeneric && tr.selection instanceof _state.TextSelection && state.selection instanceof _state.NodeSelection) {
@@ -90,6 +93,8 @@ var createPlugin = function createPlugin(pmPluginFactoryParams, options) {
90
93
  * But when transaction to add empty status happens from undo/redo
91
94
  * we don't want to remove it.
92
95
  */
96
+ // @ts-ignore - Workaround for help-center local consumption
97
+
93
98
  if (transactions.find(function (tr) {
94
99
  return tr.selectionSet && !tr.getMeta(_utils.pmHistoryPluginKey);
95
100
  })) {
@@ -98,6 +103,8 @@ var createPlugin = function createPlugin(pmPluginFactoryParams, options) {
98
103
  if (oldStatus && (newStatus && oldStatus.localId !== newStatus.localId || !newStatus)) {
99
104
  if ((0, _utils2.isEmptyStatus)(oldStatus)) {
100
105
  var pos = oldEditorState.selection.from;
106
+ // @ts-ignore - Workaround for help-center local consumption
107
+
101
108
  tr.delete(tr.mapping.map(pos), tr.mapping.map(pos + 1));
102
109
  changed = true;
103
110
  }
@@ -107,7 +114,11 @@ var createPlugin = function createPlugin(pmPluginFactoryParams, options) {
107
114
  },
108
115
  key: _pluginKey.pluginKey,
109
116
  props: {
117
+ // @ts-ignore - Workaround for help-center local consumption
118
+
110
119
  nodeViews: {
120
+ // @ts-ignore - Workaround for help-center local consumption
121
+
111
122
  status: function status(node) {
112
123
  return new _StatusNodeView.StatusNodeView(node, pmPluginFactoryParams.getIntl());
113
124
  }
@@ -11,6 +11,8 @@ const createPlugin = (pmPluginFactoryParams, options) => new SafePlugin({
11
11
  showStatusPickerAt: null,
12
12
  focusStatusInput: false
13
13
  }),
14
+ // @ts-ignore - Workaround for help-center local consumption
15
+
14
16
  apply(tr, state, oldEditorState) {
15
17
  const meta = tr.getMeta(pluginKey);
16
18
  if (meta) {
@@ -58,6 +60,8 @@ const createPlugin = (pmPluginFactoryParams, options) => new SafePlugin({
58
60
  return state;
59
61
  }
60
62
  },
63
+ // @ts-ignore - Workaround for help-center local consumption
64
+
61
65
  filterTransaction: (tr, state) => {
62
66
  // if it is a selection change transaction, and selection changes from node to text
63
67
  if (tr.selectionSet && !tr.steps.length && tr.isGeneric && tr.selection instanceof TextSelection && state.selection instanceof NodeSelection) {
@@ -84,12 +88,16 @@ const createPlugin = (pmPluginFactoryParams, options) => new SafePlugin({
84
88
  * But when transaction to add empty status happens from undo/redo
85
89
  * we don't want to remove it.
86
90
  */
91
+ // @ts-ignore - Workaround for help-center local consumption
92
+
87
93
  if (transactions.find(tr => tr.selectionSet && !tr.getMeta(pmHistoryPluginKey))) {
88
94
  const oldStatus = mayGetStatusAtSelection(oldEditorState.selection);
89
95
  const newStatus = mayGetStatusAtSelection(newEditorState.selection);
90
96
  if (oldStatus && (newStatus && oldStatus.localId !== newStatus.localId || !newStatus)) {
91
97
  if (isEmptyStatus(oldStatus)) {
92
98
  const pos = oldEditorState.selection.from;
99
+ // @ts-ignore - Workaround for help-center local consumption
100
+
93
101
  tr.delete(tr.mapping.map(pos), tr.mapping.map(pos + 1));
94
102
  changed = true;
95
103
  }
@@ -99,7 +107,11 @@ const createPlugin = (pmPluginFactoryParams, options) => new SafePlugin({
99
107
  },
100
108
  key: pluginKey,
101
109
  props: {
110
+ // @ts-ignore - Workaround for help-center local consumption
111
+
102
112
  nodeViews: {
113
+ // @ts-ignore - Workaround for help-center local consumption
114
+
103
115
  status: node => {
104
116
  return new StatusNodeView(node, pmPluginFactoryParams.getIntl());
105
117
  }
@@ -17,6 +17,7 @@ var createPlugin = function createPlugin(pmPluginFactoryParams, options) {
17
17
  focusStatusInput: false
18
18
  };
19
19
  },
20
+ // @ts-ignore - Workaround for help-center local consumption
20
21
  apply: function apply(tr, state, oldEditorState) {
21
22
  var meta = tr.getMeta(pluginKey);
22
23
  if (meta) {
@@ -58,6 +59,8 @@ var createPlugin = function createPlugin(pmPluginFactoryParams, options) {
58
59
  return state;
59
60
  }
60
61
  },
62
+ // @ts-ignore - Workaround for help-center local consumption
63
+
61
64
  filterTransaction: function filterTransaction(tr, state) {
62
65
  // if it is a selection change transaction, and selection changes from node to text
63
66
  if (tr.selectionSet && !tr.steps.length && tr.isGeneric && tr.selection instanceof TextSelection && state.selection instanceof NodeSelection) {
@@ -83,6 +86,8 @@ var createPlugin = function createPlugin(pmPluginFactoryParams, options) {
83
86
  * But when transaction to add empty status happens from undo/redo
84
87
  * we don't want to remove it.
85
88
  */
89
+ // @ts-ignore - Workaround for help-center local consumption
90
+
86
91
  if (transactions.find(function (tr) {
87
92
  return tr.selectionSet && !tr.getMeta(pmHistoryPluginKey);
88
93
  })) {
@@ -91,6 +96,8 @@ var createPlugin = function createPlugin(pmPluginFactoryParams, options) {
91
96
  if (oldStatus && (newStatus && oldStatus.localId !== newStatus.localId || !newStatus)) {
92
97
  if (isEmptyStatus(oldStatus)) {
93
98
  var pos = oldEditorState.selection.from;
99
+ // @ts-ignore - Workaround for help-center local consumption
100
+
94
101
  tr.delete(tr.mapping.map(pos), tr.mapping.map(pos + 1));
95
102
  changed = true;
96
103
  }
@@ -100,7 +107,11 @@ var createPlugin = function createPlugin(pmPluginFactoryParams, options) {
100
107
  },
101
108
  key: pluginKey,
102
109
  props: {
110
+ // @ts-ignore - Workaround for help-center local consumption
111
+
103
112
  nodeViews: {
113
+ // @ts-ignore - Workaround for help-center local consumption
114
+
104
115
  status: function status(node) {
105
116
  return new StatusNodeView(node, pmPluginFactoryParams.getIntl());
106
117
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-status",
3
- "version": "7.1.8",
3
+ "version": "7.1.10",
4
4
  "description": "Status plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -38,21 +38,19 @@
38
38
  "@atlaskit/platform-feature-flags": "^1.1.0",
39
39
  "@atlaskit/status": "^3.0.0",
40
40
  "@atlaskit/theme": "^21.0.0",
41
- "@atlaskit/tmp-editor-statsig": "^13.38.0",
42
- "@atlaskit/tokens": "^8.0.0",
41
+ "@atlaskit/tmp-editor-statsig": "^14.0.0",
42
+ "@atlaskit/tokens": "^8.4.0",
43
43
  "@atlaskit/visually-hidden": "^3.0.0",
44
44
  "@babel/runtime": "^7.0.0",
45
45
  "@emotion/react": "^11.7.1"
46
46
  },
47
47
  "peerDependencies": {
48
- "@atlaskit/editor-common": "^110.32.0",
48
+ "@atlaskit/editor-common": "^110.36.0",
49
49
  "react": "^18.2.0",
50
50
  "react-dom": "^18.2.0",
51
51
  "react-intl-next": "npm:react-intl@^5.18.1"
52
52
  },
53
53
  "devDependencies": {
54
- "@af/visual-regression": "workspace:^",
55
- "@atlaskit/ssr": "workspace:^",
56
54
  "@testing-library/react": "^13.4.0",
57
55
  "raf-stub": "^2.0.1"
58
56
  },