@atlaskit/editor-plugin-quick-insert 6.0.14 → 6.0.16

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-quick-insert
2
2
 
3
+ ## 6.0.16
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
+
11
+ ## 6.0.15
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 6.0.14
4
18
 
5
19
  ### Patch Changes
@@ -45,8 +45,6 @@ var getQuickInsertOpenExperiencePlugin = exports.getQuickInsertOpenExperiencePlu
45
45
  }), new _experiences.ExperienceCheckDomMutation({
46
46
  onDomMutation: function onDomMutation(_ref2) {
47
47
  var mutations = _ref2.mutations;
48
- // @ts-ignore - Workaround for help-center local consumption
49
-
50
48
  if (mutations.some(isQuickInsertMenuAddedInMutation)) {
51
49
  return {
52
50
  status: 'success'
@@ -66,11 +64,7 @@ var getQuickInsertOpenExperiencePlugin = exports.getQuickInsertOpenExperiencePlu
66
64
  return new _safePlugin.SafePlugin({
67
65
  key: pluginKey,
68
66
  props: {
69
- // @ts-ignore - Workaround for help-center local consumption
70
-
71
67
  handleDOMEvents: {
72
- // @ts-ignore - Workaround for help-center local consumption
73
-
74
68
  click: function click(_view, event) {
75
69
  if (isTargetQuickInsertButton(event.target)) {
76
70
  experience.start({
@@ -78,8 +72,6 @@ var getQuickInsertOpenExperiencePlugin = exports.getQuickInsertOpenExperiencePlu
78
72
  });
79
73
  }
80
74
  },
81
- // @ts-ignore - Workaround for help-center local consumption
82
-
83
75
  beforeinput: function beforeinput(view, event) {
84
76
  if (isQuickInsertTrigger(event) && isSelectionWhichSupportsTypeahead(view)) {
85
77
  experience.start({
@@ -87,8 +79,6 @@ var getQuickInsertOpenExperiencePlugin = exports.getQuickInsertOpenExperiencePlu
87
79
  });
88
80
  }
89
81
  },
90
- // @ts-ignore - Workaround for help-center local consumption
91
-
92
82
  keydown: function keydown(_view, event) {
93
83
  if (isCancelKey(event.key) && !isQuickInsertMenuWithinNode(getTarget())) {
94
84
  experience.abort({
@@ -124,9 +114,6 @@ var isSelectionWhichSupportsTypeahead = function isSelectionWhichSupportsTypeahe
124
114
  if ($from.parent.type.name === 'codeBlock') {
125
115
  return false;
126
116
  }
127
-
128
- // @ts-ignore - Workaround for help-center local consumption
129
-
130
117
  if ($from.marks().some(function (mark) {
131
118
  return mark.type.name === 'code';
132
119
  })) {
@@ -151,8 +138,6 @@ var isTargetQuickInsertButton = function isTargetQuickInsertButton(target) {
151
138
  var isQuickInsertMenuAddedInMutation = function isQuickInsertMenuAddedInMutation(_ref5) {
152
139
  var type = _ref5.type,
153
140
  addedNodes = _ref5.addedNodes;
154
- // @ts-ignore - Workaround for help-center local consumption
155
-
156
141
  return type === 'childList' && (0, _toConsumableArray2.default)(addedNodes).some(isQuickInsertMenuWithinNode);
157
142
  };
158
143
  var isQuickInsertMenuWithinNode = function isQuickInsertMenuWithinNode(node) {
@@ -203,7 +203,6 @@ function quickInsertPluginFactory(defaultItems, providerFactory, getIntl, dispat
203
203
  return new _safePlugin.SafePlugin({
204
204
  key: _pluginKey.pluginKey,
205
205
  state: {
206
- // @ts-ignore - Workaround for help-center local consumption
207
206
  init: function init() {
208
207
  return {
209
208
  isElementBrowserModalOpen: false,
@@ -216,13 +215,10 @@ function quickInsertPluginFactory(defaultItems, providerFactory, getIntl, dispat
216
215
  }
217
216
  };
218
217
  },
219
- // @ts-ignore - Workaround for help-center local consumption
220
218
  apply: function apply(tr, pluginState) {
221
219
  var meta = tr.getMeta(_pluginKey.pluginKey);
222
220
  if (meta) {
223
221
  var keys = Object.keys(meta);
224
- // @ts-ignore - Workaround for help-center local consumption
225
-
226
222
  var changed = keys.some(function (key) {
227
223
  return pluginState[key] !== meta[key];
228
224
  });
@@ -235,7 +231,6 @@ function quickInsertPluginFactory(defaultItems, providerFactory, getIntl, dispat
235
231
  return pluginState;
236
232
  }
237
233
  },
238
- // @ts-ignore - Workaround for help-center local consumption
239
234
  view: function view(editorView) {
240
235
  var providerHandler = /*#__PURE__*/function () {
241
236
  var _ref0 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_name, providerPromise) {
@@ -279,7 +274,6 @@ function quickInsertPluginFactory(defaultItems, providerFactory, getIntl, dispat
279
274
  }();
280
275
  providerFactory.subscribe('quickInsertProvider', providerHandler);
281
276
  return {
282
- // @ts-ignore - Workaround for help-center local consumption
283
277
  destroy: function destroy() {
284
278
  providerFactory.unsubscribe('quickInsertProvider', providerHandler);
285
279
  }
@@ -39,8 +39,6 @@ export const getQuickInsertOpenExperiencePlugin = ({
39
39
  onDomMutation: ({
40
40
  mutations
41
41
  }) => {
42
- // @ts-ignore - Workaround for help-center local consumption
43
-
44
42
  if (mutations.some(isQuickInsertMenuAddedInMutation)) {
45
43
  return {
46
44
  status: 'success'
@@ -58,11 +56,7 @@ export const getQuickInsertOpenExperiencePlugin = ({
58
56
  return new SafePlugin({
59
57
  key: pluginKey,
60
58
  props: {
61
- // @ts-ignore - Workaround for help-center local consumption
62
-
63
59
  handleDOMEvents: {
64
- // @ts-ignore - Workaround for help-center local consumption
65
-
66
60
  click: (_view, event) => {
67
61
  if (isTargetQuickInsertButton(event.target)) {
68
62
  experience.start({
@@ -70,8 +64,6 @@ export const getQuickInsertOpenExperiencePlugin = ({
70
64
  });
71
65
  }
72
66
  },
73
- // @ts-ignore - Workaround for help-center local consumption
74
-
75
67
  beforeinput: (view, event) => {
76
68
  if (isQuickInsertTrigger(event) && isSelectionWhichSupportsTypeahead(view)) {
77
69
  experience.start({
@@ -79,8 +71,6 @@ export const getQuickInsertOpenExperiencePlugin = ({
79
71
  });
80
72
  }
81
73
  },
82
- // @ts-ignore - Workaround for help-center local consumption
83
-
84
74
  keydown: (_view, event) => {
85
75
  if (isCancelKey(event.key) && !isQuickInsertMenuWithinNode(getTarget())) {
86
76
  experience.abort({
@@ -119,9 +109,6 @@ const isSelectionWhichSupportsTypeahead = ({
119
109
  if ($from.parent.type.name === 'codeBlock') {
120
110
  return false;
121
111
  }
122
-
123
- // @ts-ignore - Workaround for help-center local consumption
124
-
125
112
  if ($from.marks().some(mark => mark.type.name === 'code')) {
126
113
  return false;
127
114
  }
@@ -145,8 +132,6 @@ const isQuickInsertMenuAddedInMutation = ({
145
132
  type,
146
133
  addedNodes
147
134
  }) => {
148
- // @ts-ignore - Workaround for help-center local consumption
149
-
150
135
  return type === 'childList' && [...addedNodes].some(isQuickInsertMenuWithinNode);
151
136
  };
152
137
  const isQuickInsertMenuWithinNode = node => {
@@ -190,8 +190,6 @@ function quickInsertPluginFactory(defaultItems, providerFactory, getIntl, dispat
190
190
  return new SafePlugin({
191
191
  key: pluginKey,
192
192
  state: {
193
- // @ts-ignore - Workaround for help-center local consumption
194
-
195
193
  init() {
196
194
  return {
197
195
  isElementBrowserModalOpen: false,
@@ -202,14 +200,10 @@ function quickInsertPluginFactory(defaultItems, providerFactory, getIntl, dispat
202
200
  lazyDefaultItems: () => memoProcessQuickInsertItems(defaultItems || [], getIntl())
203
201
  };
204
202
  },
205
- // @ts-ignore - Workaround for help-center local consumption
206
-
207
203
  apply(tr, pluginState) {
208
204
  const meta = tr.getMeta(pluginKey);
209
205
  if (meta) {
210
206
  const keys = Object.keys(meta);
211
- // @ts-ignore - Workaround for help-center local consumption
212
-
213
207
  const changed = keys.some(key => {
214
208
  return pluginState[key] !== meta[key];
215
209
  });
@@ -225,8 +219,6 @@ function quickInsertPluginFactory(defaultItems, providerFactory, getIntl, dispat
225
219
  return pluginState;
226
220
  }
227
221
  },
228
- // @ts-ignore - Workaround for help-center local consumption
229
-
230
222
  view(editorView) {
231
223
  const providerHandler = async (_name, providerPromise) => {
232
224
  if (providerPromise) {
@@ -245,8 +237,6 @@ function quickInsertPluginFactory(defaultItems, providerFactory, getIntl, dispat
245
237
  };
246
238
  providerFactory.subscribe('quickInsertProvider', providerHandler);
247
239
  return {
248
- // @ts-ignore - Workaround for help-center local consumption
249
-
250
240
  destroy() {
251
241
  providerFactory.unsubscribe('quickInsertProvider', providerHandler);
252
242
  }
@@ -38,8 +38,6 @@ export var getQuickInsertOpenExperiencePlugin = function getQuickInsertOpenExper
38
38
  }), new ExperienceCheckDomMutation({
39
39
  onDomMutation: function onDomMutation(_ref2) {
40
40
  var mutations = _ref2.mutations;
41
- // @ts-ignore - Workaround for help-center local consumption
42
-
43
41
  if (mutations.some(isQuickInsertMenuAddedInMutation)) {
44
42
  return {
45
43
  status: 'success'
@@ -59,11 +57,7 @@ export var getQuickInsertOpenExperiencePlugin = function getQuickInsertOpenExper
59
57
  return new SafePlugin({
60
58
  key: pluginKey,
61
59
  props: {
62
- // @ts-ignore - Workaround for help-center local consumption
63
-
64
60
  handleDOMEvents: {
65
- // @ts-ignore - Workaround for help-center local consumption
66
-
67
61
  click: function click(_view, event) {
68
62
  if (isTargetQuickInsertButton(event.target)) {
69
63
  experience.start({
@@ -71,8 +65,6 @@ export var getQuickInsertOpenExperiencePlugin = function getQuickInsertOpenExper
71
65
  });
72
66
  }
73
67
  },
74
- // @ts-ignore - Workaround for help-center local consumption
75
-
76
68
  beforeinput: function beforeinput(view, event) {
77
69
  if (isQuickInsertTrigger(event) && isSelectionWhichSupportsTypeahead(view)) {
78
70
  experience.start({
@@ -80,8 +72,6 @@ export var getQuickInsertOpenExperiencePlugin = function getQuickInsertOpenExper
80
72
  });
81
73
  }
82
74
  },
83
- // @ts-ignore - Workaround for help-center local consumption
84
-
85
75
  keydown: function keydown(_view, event) {
86
76
  if (isCancelKey(event.key) && !isQuickInsertMenuWithinNode(getTarget())) {
87
77
  experience.abort({
@@ -117,9 +107,6 @@ var isSelectionWhichSupportsTypeahead = function isSelectionWhichSupportsTypeahe
117
107
  if ($from.parent.type.name === 'codeBlock') {
118
108
  return false;
119
109
  }
120
-
121
- // @ts-ignore - Workaround for help-center local consumption
122
-
123
110
  if ($from.marks().some(function (mark) {
124
111
  return mark.type.name === 'code';
125
112
  })) {
@@ -144,8 +131,6 @@ var isTargetQuickInsertButton = function isTargetQuickInsertButton(target) {
144
131
  var isQuickInsertMenuAddedInMutation = function isQuickInsertMenuAddedInMutation(_ref5) {
145
132
  var type = _ref5.type,
146
133
  addedNodes = _ref5.addedNodes;
147
- // @ts-ignore - Workaround for help-center local consumption
148
-
149
134
  return type === 'childList' && _toConsumableArray(addedNodes).some(isQuickInsertMenuWithinNode);
150
135
  };
151
136
  var isQuickInsertMenuWithinNode = function isQuickInsertMenuWithinNode(node) {
@@ -196,7 +196,6 @@ function quickInsertPluginFactory(defaultItems, providerFactory, getIntl, dispat
196
196
  return new SafePlugin({
197
197
  key: pluginKey,
198
198
  state: {
199
- // @ts-ignore - Workaround for help-center local consumption
200
199
  init: function init() {
201
200
  return {
202
201
  isElementBrowserModalOpen: false,
@@ -209,13 +208,10 @@ function quickInsertPluginFactory(defaultItems, providerFactory, getIntl, dispat
209
208
  }
210
209
  };
211
210
  },
212
- // @ts-ignore - Workaround for help-center local consumption
213
211
  apply: function apply(tr, pluginState) {
214
212
  var meta = tr.getMeta(pluginKey);
215
213
  if (meta) {
216
214
  var keys = Object.keys(meta);
217
- // @ts-ignore - Workaround for help-center local consumption
218
-
219
215
  var changed = keys.some(function (key) {
220
216
  return pluginState[key] !== meta[key];
221
217
  });
@@ -228,7 +224,6 @@ function quickInsertPluginFactory(defaultItems, providerFactory, getIntl, dispat
228
224
  return pluginState;
229
225
  }
230
226
  },
231
- // @ts-ignore - Workaround for help-center local consumption
232
227
  view: function view(editorView) {
233
228
  var providerHandler = /*#__PURE__*/function () {
234
229
  var _ref0 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_name, providerPromise) {
@@ -272,7 +267,6 @@ function quickInsertPluginFactory(defaultItems, providerFactory, getIntl, dispat
272
267
  }();
273
268
  providerFactory.subscribe('quickInsertProvider', providerHandler);
274
269
  return {
275
- // @ts-ignore - Workaround for help-center local consumption
276
270
  destroy: function destroy() {
277
271
  providerFactory.unsubscribe('quickInsertProvider', providerHandler);
278
272
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-quick-insert",
3
- "version": "6.0.14",
3
+ "version": "6.0.16",
4
4
  "description": "Quick insert plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -39,20 +39,18 @@
39
39
  "@atlaskit/modal-dialog": "^14.7.0",
40
40
  "@atlaskit/platform-feature-flags": "^1.1.0",
41
41
  "@atlaskit/theme": "^21.0.0",
42
- "@atlaskit/tmp-editor-statsig": "^13.42.0",
43
- "@atlaskit/tokens": "^8.3.0",
42
+ "@atlaskit/tmp-editor-statsig": "^14.2.0",
43
+ "@atlaskit/tokens": "^8.4.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.34.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
  "wait-for-expect": "^1.2.0"
58
56
  },