@atlaskit/editor-plugin-extension 1.6.1 → 1.7.0

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,18 @@
1
1
  # @atlaskit/editor-plugin-extension
2
2
 
3
+ ## 1.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#112575](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/112575)
8
+ [`63dcaae87255b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/63dcaae87255b) -
9
+ Passes new FF for new experiment to macro code and updates type to be object from boolean to
10
+ account for multiple FFs
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+
3
16
  ## 1.6.1
4
17
 
5
18
  ### Patch Changes
@@ -187,7 +187,7 @@ var handleUpdate = exports.handleUpdate = function handleUpdate(_ref3) {
187
187
  return true;
188
188
  };
189
189
  var createPlugin = exports.createPlugin = function createPlugin(dispatch, providerFactory, extensionHandlers, portalProviderAPI, eventDispatcher, pluginInjectionApi) {
190
- var _featureFlags$macroIn, _featureFlags$macroIn2, _featureFlags$macroIn3, _featureFlags$macroIn4;
190
+ var _featureFlags$macroIn, _featureFlags$macroIn2;
191
191
  var useLongPressSelection = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
192
192
  var options = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : {};
193
193
  var featureFlags = arguments.length > 8 ? arguments[8] : undefined;
@@ -198,6 +198,10 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatch, provid
198
198
  var extensionNodeViewOptions = {
199
199
  appearance: options.appearance
200
200
  };
201
+ var macroInteractionDesignFeatureFlags = {
202
+ showMacroInteractionDesignUpdates: (_featureFlags$macroIn = featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.macroInteractionUpdates) !== null && _featureFlags$macroIn !== void 0 ? _featureFlags$macroIn : false,
203
+ showMacroButtonUpdates: (_featureFlags$macroIn2 = featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.macroInteractionButtonUpdates) !== null && _featureFlags$macroIn2 !== void 0 ? _featureFlags$macroIn2 : false
204
+ };
201
205
  return new _safePlugin.SafePlugin({
202
206
  state: state,
203
207
  view: function view(editorView) {
@@ -294,12 +298,12 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatch, provid
294
298
  },
295
299
  nodeViews: {
296
300
  // WARNING: referentiality-plugin also creates these nodeviews
297
- extension: (0, _extensibility.ExtensionNodeView)(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, (_featureFlags$macroIn = featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.macroInteractionUpdates) !== null && _featureFlags$macroIn !== void 0 ? _featureFlags$macroIn : false),
301
+ extension: (0, _extensibility.ExtensionNodeView)(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags),
298
302
  // WARNING: referentiality-plugin also creates these nodeviews
299
- bodiedExtension: (0, _extensibility.ExtensionNodeView)(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, (_featureFlags$macroIn2 = featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.macroInteractionUpdates) !== null && _featureFlags$macroIn2 !== void 0 ? _featureFlags$macroIn2 : false),
303
+ bodiedExtension: (0, _extensibility.ExtensionNodeView)(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags),
300
304
  // WARNING: referentiality-plugin also creates these nodeviews
301
- inlineExtension: (0, _extensibility.ExtensionNodeView)(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, (_featureFlags$macroIn3 = featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.macroInteractionUpdates) !== null && _featureFlags$macroIn3 !== void 0 ? _featureFlags$macroIn3 : false),
302
- multiBodiedExtension: (0, _extensibility.ExtensionNodeView)(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, (_featureFlags$macroIn4 = featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.macroInteractionUpdates) !== null && _featureFlags$macroIn4 !== void 0 ? _featureFlags$macroIn4 : false)
305
+ inlineExtension: (0, _extensibility.ExtensionNodeView)(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags),
306
+ multiBodiedExtension: (0, _extensibility.ExtensionNodeView)(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags)
303
307
  },
304
308
  createSelectionBetween: function createSelectionBetween(view, anchor, head) {
305
309
  if (!(0, _platformFeatureFlags.getBooleanFF)('platform.editor.multi-bodied-extension_0rygg')) {
@@ -116,7 +116,7 @@ export const handleUpdate = ({
116
116
  return true;
117
117
  };
118
118
  const createPlugin = (dispatch, providerFactory, extensionHandlers, portalProviderAPI, eventDispatcher, pluginInjectionApi, useLongPressSelection = false, options = {}, featureFlags) => {
119
- var _featureFlags$macroIn, _featureFlags$macroIn2, _featureFlags$macroIn3, _featureFlags$macroIn4;
119
+ var _featureFlags$macroIn, _featureFlags$macroIn2;
120
120
  const state = createPluginState(dispatch, {
121
121
  showEditButton: false,
122
122
  showContextPanel: false
@@ -124,6 +124,10 @@ const createPlugin = (dispatch, providerFactory, extensionHandlers, portalProvid
124
124
  const extensionNodeViewOptions = {
125
125
  appearance: options.appearance
126
126
  };
127
+ const macroInteractionDesignFeatureFlags = {
128
+ showMacroInteractionDesignUpdates: (_featureFlags$macroIn = featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.macroInteractionUpdates) !== null && _featureFlags$macroIn !== void 0 ? _featureFlags$macroIn : false,
129
+ showMacroButtonUpdates: (_featureFlags$macroIn2 = featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.macroInteractionButtonUpdates) !== null && _featureFlags$macroIn2 !== void 0 ? _featureFlags$macroIn2 : false
130
+ };
127
131
  return new SafePlugin({
128
132
  state,
129
133
  view: editorView => {
@@ -229,12 +233,12 @@ const createPlugin = (dispatch, providerFactory, extensionHandlers, portalProvid
229
233
  },
230
234
  nodeViews: {
231
235
  // WARNING: referentiality-plugin also creates these nodeviews
232
- extension: ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, (_featureFlags$macroIn = featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.macroInteractionUpdates) !== null && _featureFlags$macroIn !== void 0 ? _featureFlags$macroIn : false),
236
+ extension: ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags),
233
237
  // WARNING: referentiality-plugin also creates these nodeviews
234
- bodiedExtension: ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, (_featureFlags$macroIn2 = featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.macroInteractionUpdates) !== null && _featureFlags$macroIn2 !== void 0 ? _featureFlags$macroIn2 : false),
238
+ bodiedExtension: ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags),
235
239
  // WARNING: referentiality-plugin also creates these nodeviews
236
- inlineExtension: ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, (_featureFlags$macroIn3 = featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.macroInteractionUpdates) !== null && _featureFlags$macroIn3 !== void 0 ? _featureFlags$macroIn3 : false),
237
- multiBodiedExtension: ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, (_featureFlags$macroIn4 = featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.macroInteractionUpdates) !== null && _featureFlags$macroIn4 !== void 0 ? _featureFlags$macroIn4 : false)
240
+ inlineExtension: ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags),
241
+ multiBodiedExtension: ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags)
238
242
  },
239
243
  createSelectionBetween: function (view, anchor, head) {
240
244
  if (!getBooleanFF('platform.editor.multi-bodied-extension_0rygg')) {
@@ -161,7 +161,7 @@ export var handleUpdate = function handleUpdate(_ref3) {
161
161
  return true;
162
162
  };
163
163
  var createPlugin = function createPlugin(dispatch, providerFactory, extensionHandlers, portalProviderAPI, eventDispatcher, pluginInjectionApi) {
164
- var _featureFlags$macroIn, _featureFlags$macroIn2, _featureFlags$macroIn3, _featureFlags$macroIn4;
164
+ var _featureFlags$macroIn, _featureFlags$macroIn2;
165
165
  var useLongPressSelection = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
166
166
  var options = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : {};
167
167
  var featureFlags = arguments.length > 8 ? arguments[8] : undefined;
@@ -172,6 +172,10 @@ var createPlugin = function createPlugin(dispatch, providerFactory, extensionHan
172
172
  var extensionNodeViewOptions = {
173
173
  appearance: options.appearance
174
174
  };
175
+ var macroInteractionDesignFeatureFlags = {
176
+ showMacroInteractionDesignUpdates: (_featureFlags$macroIn = featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.macroInteractionUpdates) !== null && _featureFlags$macroIn !== void 0 ? _featureFlags$macroIn : false,
177
+ showMacroButtonUpdates: (_featureFlags$macroIn2 = featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.macroInteractionButtonUpdates) !== null && _featureFlags$macroIn2 !== void 0 ? _featureFlags$macroIn2 : false
178
+ };
175
179
  return new SafePlugin({
176
180
  state: state,
177
181
  view: function view(editorView) {
@@ -268,12 +272,12 @@ var createPlugin = function createPlugin(dispatch, providerFactory, extensionHan
268
272
  },
269
273
  nodeViews: {
270
274
  // WARNING: referentiality-plugin also creates these nodeviews
271
- extension: ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, (_featureFlags$macroIn = featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.macroInteractionUpdates) !== null && _featureFlags$macroIn !== void 0 ? _featureFlags$macroIn : false),
275
+ extension: ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags),
272
276
  // WARNING: referentiality-plugin also creates these nodeviews
273
- bodiedExtension: ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, (_featureFlags$macroIn2 = featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.macroInteractionUpdates) !== null && _featureFlags$macroIn2 !== void 0 ? _featureFlags$macroIn2 : false),
277
+ bodiedExtension: ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags),
274
278
  // WARNING: referentiality-plugin also creates these nodeviews
275
- inlineExtension: ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, (_featureFlags$macroIn3 = featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.macroInteractionUpdates) !== null && _featureFlags$macroIn3 !== void 0 ? _featureFlags$macroIn3 : false),
276
- multiBodiedExtension: ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, (_featureFlags$macroIn4 = featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.macroInteractionUpdates) !== null && _featureFlags$macroIn4 !== void 0 ? _featureFlags$macroIn4 : false)
279
+ inlineExtension: ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags),
280
+ multiBodiedExtension: ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags)
277
281
  },
278
282
  createSelectionBetween: function createSelectionBetween(view, anchor, head) {
279
283
  if (!getBooleanFF('platform.editor.multi-bodied-extension_0rygg')) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-extension",
3
- "version": "1.6.1",
3
+ "version": "1.7.0",
4
4
  "description": "editor-plugin-extension plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -28,10 +28,10 @@
28
28
  "@atlaskit/adf-utils": "^19.2.0",
29
29
  "@atlaskit/analytics-next": "^9.3.0",
30
30
  "@atlaskit/avatar": "^21.10.0",
31
- "@atlaskit/button": "^17.22.0",
31
+ "@atlaskit/button": "^17.23.0",
32
32
  "@atlaskit/checkbox": "^13.5.0",
33
33
  "@atlaskit/datetime-picker": "^13.6.0",
34
- "@atlaskit/editor-common": "^82.9.0",
34
+ "@atlaskit/editor-common": "^82.10.0",
35
35
  "@atlaskit/editor-json-transformer": "^8.13.0",
36
36
  "@atlaskit/editor-plugin-analytics": "^1.2.0",
37
37
  "@atlaskit/editor-plugin-context-identifier": "^1.1.0",
@@ -55,7 +55,7 @@
55
55
  "@atlaskit/tabs": "^16.2.0",
56
56
  "@atlaskit/textarea": "^5.5.0",
57
57
  "@atlaskit/textfield": "^6.4.0",
58
- "@atlaskit/theme": "^12.10.0",
58
+ "@atlaskit/theme": "^12.11.0",
59
59
  "@atlaskit/toggle": "^13.2.0",
60
60
  "@atlaskit/tokens": "^1.51.0",
61
61
  "@atlaskit/tooltip": "^18.5.0",