@atlaskit/editor-plugin-extension 9.2.7 → 9.2.9

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-extension
2
2
 
3
+ ## 9.2.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [`e3779b75fdeca`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e3779b75fdeca) -
8
+ EDITOR-1643 Promote syncBlock and bodiedSyncBlock to full schema
9
+ - Updated dependencies
10
+
11
+ ## 9.2.8
12
+
13
+ ### Patch Changes
14
+
15
+ - [`55920a92e882a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/55920a92e882a) -
16
+ tsignores added for help-center local consumpton removed
17
+ - Updated dependencies
18
+
3
19
  ## 9.2.7
4
20
 
5
21
  ### Patch Changes
@@ -102,8 +102,6 @@ var extensionPlugin = exports.extensionPlugin = function extensionPlugin(_ref) {
102
102
  name: 'extensionEditorViewRef',
103
103
  plugin: function plugin() {
104
104
  return new _safePlugin.SafePlugin({
105
- // @ts-ignore - Workaround for help-center local consumption
106
-
107
105
  view: function view(editorView) {
108
106
  // Do not cleanup the editorViewRef on destroy
109
107
  // because some functions may point to a stale
@@ -19,7 +19,6 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatch, provid
19
19
  macroProvider: null
20
20
  };
21
21
  },
22
- // @ts-ignore - Workaround for help-center local consumption
23
22
  apply: function apply(tr, state) {
24
23
  var meta = tr.getMeta(_pluginKey.pluginKey);
25
24
  if (meta) {
@@ -186,15 +186,11 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatch, provid
186
186
  var showLivePagesBodiedMacrosRendererView = __rendererExtensionOptions === null || __rendererExtensionOptions === void 0 ? void 0 : __rendererExtensionOptions.isAllowedToUseRendererView;
187
187
  return new _safePlugin.SafePlugin({
188
188
  state: state,
189
- // @ts-ignore - Workaround for help-center local consumption
190
-
191
189
  view: function view(editorView) {
192
190
  var domAtPos = editorView.domAtPos.bind(editorView);
193
191
  var extensionProviderHandler = createExtensionProviderHandler(editorView);
194
192
  providerFactory.subscribe('extensionProvider', extensionProviderHandler);
195
193
  return {
196
- // @ts-ignore - Workaround for help-center local consumption
197
-
198
194
  update: function update(view, prevState) {
199
195
  var _pluginInjectionApi$c;
200
196
  handleUpdate({
@@ -212,16 +208,12 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatch, provid
212
208
  },
213
209
  key: _pluginKey.pluginKey,
214
210
  props: {
215
- // @ts-ignore - Workaround for help-center local consumption
216
-
217
211
  handleDOMEvents: {
218
212
  /**
219
213
  * ED-18072 - Cannot shift + arrow past bodied extension if it is not empty.
220
214
  * This code is to handle the case where the selection starts inside or on the node and the user is trying to shift + arrow.
221
215
  * For other part of the solution see code in: packages/editor/editor-core/src/plugins/selection/pm-plugins/events/keydown.ts
222
216
  */
223
- // @ts-ignore - Workaround for help-center local consumption
224
-
225
217
  keydown: function keydown(view, event) {
226
218
  if (event instanceof KeyboardEvent && event.shiftKey && ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'].includes(event.key)) {
227
219
  var _view$state = view.state,
@@ -286,8 +278,6 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatch, provid
286
278
  return false;
287
279
  }
288
280
  },
289
- // @ts-ignore - Workaround for help-center local consumption
290
-
291
281
  nodeViews: {
292
282
  // WARNING: referentiality-plugin also creates these nodeviews
293
283
  extension: (0, _lazyExtension.lazyExtensionNodeView)('extension', portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags),
@@ -297,8 +287,6 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatch, provid
297
287
  inlineExtension: (0, _lazyExtension.lazyExtensionNodeView)('inlineExtension', portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags),
298
288
  multiBodiedExtension: (0, _lazyExtension.lazyExtensionNodeView)('multiBodiedExtension', portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags)
299
289
  },
300
- // @ts-ignore - Workaround for help-center local consumption
301
-
302
290
  createSelectionBetween: function createSelectionBetween(view, anchor, head) {
303
291
  var _view$state3 = view.state,
304
292
  schema = _view$state3.schema,
@@ -16,8 +16,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
16
16
  var pluginKey = new _state.PluginKey('extensionUniqueIdPlugin');
17
17
  var createPlugin = exports.createPlugin = function createPlugin() {
18
18
  return new _safePlugin.SafePlugin({
19
- // @ts-ignore - Workaround for help-center local consumption
20
-
21
19
  appendTransaction: function appendTransaction(transactions, _oldState, newState) {
22
20
  var tr = newState.tr;
23
21
  var selectionBookmark = tr.selection.getBookmark();
@@ -29,20 +27,11 @@ var createPlugin = exports.createPlugin = function createPlugin() {
29
27
  multiBodiedExtension = _newState$schema$node.multiBodiedExtension;
30
28
  var extensionTypes = new Set([extension, bodiedExtension, inlineExtension, multiBodiedExtension]);
31
29
  var idsObserved = new Set();
32
-
33
- // @ts-ignore - Workaround for help-center local consumption
34
-
35
30
  transactions.forEach(function (transaction) {
36
31
  if (!transaction.docChanged) {
37
32
  return;
38
33
  }
39
-
40
- // @ts-ignore - Workaround for help-center local consumption
41
-
42
- var isAddingExtension = transaction.steps.some(
43
- // @ts-ignore - Workaround for help-center local consumption
44
-
45
- function (step) {
34
+ var isAddingExtension = transaction.steps.some(function (step) {
46
35
  var _step$attrs;
47
36
  return (0, _utils.stepAddsOneOf)(step, extensionTypes) ||
48
37
  // There are instances where the localId will be reset to null on publish due to extension
@@ -54,8 +43,6 @@ var createPlugin = exports.createPlugin = function createPlugin() {
54
43
  });
55
44
  if (isAddingExtension) {
56
45
  // Can't simply look at changed nodes, as we could be adding an extension
57
- // @ts-ignore - Workaround for help-center local consumption
58
-
59
46
  newState.doc.descendants(function (node, pos) {
60
47
  var localId = node.attrs.localId;
61
48
 
@@ -82,10 +82,7 @@ function Checkbox(_ref) {
82
82
  // Ignored via go/ees005
83
83
  // eslint-disable-next-line react/jsx-props-no-spreading
84
84
  , (0, _extends2.default)({}, restFieldProps, {
85
- label: label
86
- // @ts-ignore - Workaround for help-center local consumption
87
- ,
88
-
85
+ label: label,
89
86
  onChange: function onChange(event) {
90
87
  return handleOnChange(fieldProps.onChange, onFieldChange, event);
91
88
  },
@@ -92,8 +92,6 @@ export const extensionPlugin = ({
92
92
  name: 'extensionEditorViewRef',
93
93
  plugin: () => {
94
94
  return new SafePlugin({
95
- // @ts-ignore - Workaround for help-center local consumption
96
-
97
95
  view: editorView => {
98
96
  // Do not cleanup the editorViewRef on destroy
99
97
  // because some functions may point to a stale
@@ -6,8 +6,6 @@ export const createPlugin = (dispatch, providerFactory) => new SafePlugin({
6
6
  init: () => ({
7
7
  macroProvider: null
8
8
  }),
9
- // @ts-ignore - Workaround for help-center local consumption
10
-
11
9
  apply(tr, state) {
12
10
  const meta = tr.getMeta(pluginKey);
13
11
  if (meta) {
@@ -130,15 +130,11 @@ export const createPlugin = (dispatch, providerFactory, extensionHandlers, porta
130
130
  const showLivePagesBodiedMacrosRendererView = __rendererExtensionOptions === null || __rendererExtensionOptions === void 0 ? void 0 : __rendererExtensionOptions.isAllowedToUseRendererView;
131
131
  return new SafePlugin({
132
132
  state,
133
- // @ts-ignore - Workaround for help-center local consumption
134
-
135
133
  view: editorView => {
136
134
  const domAtPos = editorView.domAtPos.bind(editorView);
137
135
  const extensionProviderHandler = createExtensionProviderHandler(editorView);
138
136
  providerFactory.subscribe('extensionProvider', extensionProviderHandler);
139
137
  return {
140
- // @ts-ignore - Workaround for help-center local consumption
141
-
142
138
  update: (view, prevState) => {
143
139
  var _pluginInjectionApi$c;
144
140
  handleUpdate({
@@ -156,16 +152,12 @@ export const createPlugin = (dispatch, providerFactory, extensionHandlers, porta
156
152
  },
157
153
  key: pluginKey,
158
154
  props: {
159
- // @ts-ignore - Workaround for help-center local consumption
160
-
161
155
  handleDOMEvents: {
162
156
  /**
163
157
  * ED-18072 - Cannot shift + arrow past bodied extension if it is not empty.
164
158
  * This code is to handle the case where the selection starts inside or on the node and the user is trying to shift + arrow.
165
159
  * For other part of the solution see code in: packages/editor/editor-core/src/plugins/selection/pm-plugins/events/keydown.ts
166
160
  */
167
- // @ts-ignore - Workaround for help-center local consumption
168
-
169
161
  keydown: (view, event) => {
170
162
  if (event instanceof KeyboardEvent && event.shiftKey && ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'].includes(event.key)) {
171
163
  const {
@@ -239,8 +231,6 @@ export const createPlugin = (dispatch, providerFactory, extensionHandlers, porta
239
231
  return false;
240
232
  }
241
233
  },
242
- // @ts-ignore - Workaround for help-center local consumption
243
-
244
234
  nodeViews: {
245
235
  // WARNING: referentiality-plugin also creates these nodeviews
246
236
  extension: lazyExtensionNodeView('extension', portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags),
@@ -250,8 +240,6 @@ export const createPlugin = (dispatch, providerFactory, extensionHandlers, porta
250
240
  inlineExtension: lazyExtensionNodeView('inlineExtension', portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags),
251
241
  multiBodiedExtension: lazyExtensionNodeView('multiBodiedExtension', portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags)
252
242
  },
253
- // @ts-ignore - Workaround for help-center local consumption
254
-
255
243
  createSelectionBetween: function (view, anchor, head) {
256
244
  const {
257
245
  schema,
@@ -5,8 +5,6 @@ import { stepAddsOneOf } from '@atlaskit/editor-common/utils';
5
5
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
6
6
  const pluginKey = new PluginKey('extensionUniqueIdPlugin');
7
7
  const createPlugin = () => new SafePlugin({
8
- // @ts-ignore - Workaround for help-center local consumption
9
-
10
8
  appendTransaction: (transactions, _oldState, newState) => {
11
9
  const tr = newState.tr;
12
10
  const selectionBookmark = tr.selection.getBookmark();
@@ -19,20 +17,11 @@ const createPlugin = () => new SafePlugin({
19
17
  } = newState.schema.nodes;
20
18
  const extensionTypes = new Set([extension, bodiedExtension, inlineExtension, multiBodiedExtension]);
21
19
  const idsObserved = new Set();
22
-
23
- // @ts-ignore - Workaround for help-center local consumption
24
-
25
20
  transactions.forEach(transaction => {
26
21
  if (!transaction.docChanged) {
27
22
  return;
28
23
  }
29
-
30
- // @ts-ignore - Workaround for help-center local consumption
31
-
32
- const isAddingExtension = transaction.steps.some(
33
- // @ts-ignore - Workaround for help-center local consumption
34
-
35
- step => {
24
+ const isAddingExtension = transaction.steps.some(step => {
36
25
  var _step$attrs;
37
26
  return stepAddsOneOf(step, extensionTypes) ||
38
27
  // There are instances where the localId will be reset to null on publish due to extension
@@ -44,8 +33,6 @@ const createPlugin = () => new SafePlugin({
44
33
  });
45
34
  if (isAddingExtension) {
46
35
  // Can't simply look at changed nodes, as we could be adding an extension
47
- // @ts-ignore - Workaround for help-center local consumption
48
-
49
36
  newState.doc.descendants((node, pos) => {
50
37
  const localId = node.attrs.localId;
51
38
 
@@ -73,10 +73,7 @@ function Checkbox({
73
73
  // Ignored via go/ees005
74
74
  // eslint-disable-next-line react/jsx-props-no-spreading
75
75
  , _extends({}, restFieldProps, {
76
- label: label
77
- // @ts-ignore - Workaround for help-center local consumption
78
- ,
79
-
76
+ label: label,
80
77
  onChange: event => handleOnChange(fieldProps.onChange, onFieldChange, event),
81
78
  isChecked: parseBoolean(isChecked)
82
79
  })), jsx(FieldMessages, {
@@ -93,8 +93,6 @@ export var extensionPlugin = function extensionPlugin(_ref) {
93
93
  name: 'extensionEditorViewRef',
94
94
  plugin: function plugin() {
95
95
  return new SafePlugin({
96
- // @ts-ignore - Workaround for help-center local consumption
97
-
98
96
  view: function view(editorView) {
99
97
  // Do not cleanup the editorViewRef on destroy
100
98
  // because some functions may point to a stale
@@ -12,7 +12,6 @@ export var createPlugin = function createPlugin(dispatch, providerFactory) {
12
12
  macroProvider: null
13
13
  };
14
14
  },
15
- // @ts-ignore - Workaround for help-center local consumption
16
15
  apply: function apply(tr, state) {
17
16
  var meta = tr.getMeta(pluginKey);
18
17
  if (meta) {
@@ -179,15 +179,11 @@ export var createPlugin = function createPlugin(dispatch, providerFactory, exten
179
179
  var showLivePagesBodiedMacrosRendererView = __rendererExtensionOptions === null || __rendererExtensionOptions === void 0 ? void 0 : __rendererExtensionOptions.isAllowedToUseRendererView;
180
180
  return new SafePlugin({
181
181
  state: state,
182
- // @ts-ignore - Workaround for help-center local consumption
183
-
184
182
  view: function view(editorView) {
185
183
  var domAtPos = editorView.domAtPos.bind(editorView);
186
184
  var extensionProviderHandler = createExtensionProviderHandler(editorView);
187
185
  providerFactory.subscribe('extensionProvider', extensionProviderHandler);
188
186
  return {
189
- // @ts-ignore - Workaround for help-center local consumption
190
-
191
187
  update: function update(view, prevState) {
192
188
  var _pluginInjectionApi$c;
193
189
  handleUpdate({
@@ -205,16 +201,12 @@ export var createPlugin = function createPlugin(dispatch, providerFactory, exten
205
201
  },
206
202
  key: pluginKey,
207
203
  props: {
208
- // @ts-ignore - Workaround for help-center local consumption
209
-
210
204
  handleDOMEvents: {
211
205
  /**
212
206
  * ED-18072 - Cannot shift + arrow past bodied extension if it is not empty.
213
207
  * This code is to handle the case where the selection starts inside or on the node and the user is trying to shift + arrow.
214
208
  * For other part of the solution see code in: packages/editor/editor-core/src/plugins/selection/pm-plugins/events/keydown.ts
215
209
  */
216
- // @ts-ignore - Workaround for help-center local consumption
217
-
218
210
  keydown: function keydown(view, event) {
219
211
  if (event instanceof KeyboardEvent && event.shiftKey && ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'].includes(event.key)) {
220
212
  var _view$state = view.state,
@@ -279,8 +271,6 @@ export var createPlugin = function createPlugin(dispatch, providerFactory, exten
279
271
  return false;
280
272
  }
281
273
  },
282
- // @ts-ignore - Workaround for help-center local consumption
283
-
284
274
  nodeViews: {
285
275
  // WARNING: referentiality-plugin also creates these nodeviews
286
276
  extension: lazyExtensionNodeView('extension', portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags),
@@ -290,8 +280,6 @@ export var createPlugin = function createPlugin(dispatch, providerFactory, exten
290
280
  inlineExtension: lazyExtensionNodeView('inlineExtension', portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags),
291
281
  multiBodiedExtension: lazyExtensionNodeView('multiBodiedExtension', portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags)
292
282
  },
293
- // @ts-ignore - Workaround for help-center local consumption
294
-
295
283
  createSelectionBetween: function createSelectionBetween(view, anchor, head) {
296
284
  var _view$state3 = view.state,
297
285
  schema = _view$state3.schema,
@@ -9,8 +9,6 @@ import { PluginKey } from '@atlaskit/editor-prosemirror/state';
9
9
  var pluginKey = new PluginKey('extensionUniqueIdPlugin');
10
10
  var createPlugin = function createPlugin() {
11
11
  return new SafePlugin({
12
- // @ts-ignore - Workaround for help-center local consumption
13
-
14
12
  appendTransaction: function appendTransaction(transactions, _oldState, newState) {
15
13
  var tr = newState.tr;
16
14
  var selectionBookmark = tr.selection.getBookmark();
@@ -22,20 +20,11 @@ var createPlugin = function createPlugin() {
22
20
  multiBodiedExtension = _newState$schema$node.multiBodiedExtension;
23
21
  var extensionTypes = new Set([extension, bodiedExtension, inlineExtension, multiBodiedExtension]);
24
22
  var idsObserved = new Set();
25
-
26
- // @ts-ignore - Workaround for help-center local consumption
27
-
28
23
  transactions.forEach(function (transaction) {
29
24
  if (!transaction.docChanged) {
30
25
  return;
31
26
  }
32
-
33
- // @ts-ignore - Workaround for help-center local consumption
34
-
35
- var isAddingExtension = transaction.steps.some(
36
- // @ts-ignore - Workaround for help-center local consumption
37
-
38
- function (step) {
27
+ var isAddingExtension = transaction.steps.some(function (step) {
39
28
  var _step$attrs;
40
29
  return stepAddsOneOf(step, extensionTypes) ||
41
30
  // There are instances where the localId will be reset to null on publish due to extension
@@ -47,8 +36,6 @@ var createPlugin = function createPlugin() {
47
36
  });
48
37
  if (isAddingExtension) {
49
38
  // Can't simply look at changed nodes, as we could be adding an extension
50
- // @ts-ignore - Workaround for help-center local consumption
51
-
52
39
  newState.doc.descendants(function (node, pos) {
53
40
  var localId = node.attrs.localId;
54
41
 
@@ -74,10 +74,7 @@ function Checkbox(_ref) {
74
74
  // Ignored via go/ees005
75
75
  // eslint-disable-next-line react/jsx-props-no-spreading
76
76
  , _extends({}, restFieldProps, {
77
- label: label
78
- // @ts-ignore - Workaround for help-center local consumption
79
- ,
80
-
77
+ label: label,
81
78
  onChange: function onChange(event) {
82
79
  return handleOnChange(fieldProps.onChange, onFieldChange, event);
83
80
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-extension",
3
- "version": "9.2.7",
3
+ "version": "9.2.9",
4
4
  "description": "editor-plugin-extension plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -21,7 +21,7 @@
21
21
  ],
22
22
  "atlaskit:src": "src/index.ts",
23
23
  "dependencies": {
24
- "@atlaskit/adf-schema": "^51.4.0",
24
+ "@atlaskit/adf-schema": "^51.5.1",
25
25
  "@atlaskit/adf-utils": "^19.26.0",
26
26
  "@atlaskit/analytics-next": "^11.1.0",
27
27
  "@atlaskit/avatar": "^25.5.0",
@@ -56,7 +56,7 @@
56
56
  "@atlaskit/textarea": "^8.1.0",
57
57
  "@atlaskit/textfield": "^8.1.0",
58
58
  "@atlaskit/theme": "^21.0.0",
59
- "@atlaskit/tmp-editor-statsig": "^14.0.0",
59
+ "@atlaskit/tmp-editor-statsig": "^14.5.0",
60
60
  "@atlaskit/toggle": "^15.1.0",
61
61
  "@atlaskit/tokens": "^8.4.0",
62
62
  "@atlaskit/tooltip": "^20.10.0",
@@ -70,7 +70,7 @@
70
70
  "uuid": "^3.1.0"
71
71
  },
72
72
  "peerDependencies": {
73
- "@atlaskit/editor-common": "^110.36.0",
73
+ "@atlaskit/editor-common": "^110.38.0",
74
74
  "react": "^18.2.0",
75
75
  "react-intl-next": "npm:react-intl@^5.18.1"
76
76
  },