@atlaskit/editor-plugin-extension 33.0.4 → 33.0.6

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-extension
2
2
 
3
+ ## 33.0.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 33.0.5
10
+
11
+ ### Patch Changes
12
+
13
+ - [`c47fd455dba6b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c47fd455dba6b) -
14
+ Clean up feature gate `platform_editor_ai_object_sidebar_injection`; keep object-sidebar injection
15
+ enabled.
16
+ - Updated dependencies
17
+
3
18
  ## 33.0.4
4
19
 
5
20
  ### Patch Changes
@@ -27,8 +27,6 @@ var _contextPanel = require("./ui/context-panel");
27
27
  var _useConfigPanelPluginHook = require("./ui/useConfigPanelPluginHook");
28
28
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
29
29
 
30
- // Remove below line when cleaning up platform_editor_ai_object_sidebar_injection feature flag
31
-
32
30
  var extensionPlugin = exports.extensionPlugin = function extensionPlugin(_ref) {
33
31
  var _api$featureFlags, _api$contextPanel, _api$analytics2, _api$analytics3, _api$contextPanel4;
34
32
  var _ref$config = _ref.config,
@@ -205,15 +203,12 @@ var extensionPlugin = exports.extensionPlugin = function extensionPlugin(_ref) {
205
203
  extensionApi: _api,
206
204
  getUnsupportedContent: options.getUnsupportedContent
207
205
  }),
208
- contextPanel:
209
- // if showContextPanel action is not available, or platform_editor_ai_object_sidebar_injection feature flag is off
210
- // then keep using old context panel.
211
- !showContextPanel || !(0, _fg.fg)('platform_editor_ai_object_sidebar_injection') ? (0, _contextPanel.getContextPanel)(function () {
206
+ contextPanel: !showContextPanel ? (0, _contextPanel.getContextPanel)(function () {
212
207
  var _editorViewRef$curren;
213
208
  return (_editorViewRef$curren = editorViewRef.current) !== null && _editorViewRef$curren !== void 0 ? _editorViewRef$curren : undefined;
214
209
  })(_api, featureFlags) : undefined
215
210
  },
216
- usePluginHook: showContextPanel && (0, _fg.fg)('platform_editor_ai_object_sidebar_injection') ? function (_ref7) {
211
+ usePluginHook: showContextPanel ? function (_ref7) {
217
212
  var editorView = _ref7.editorView;
218
213
  (0, _useConfigPanelPluginHook.useConfigPanelPluginHook)({
219
214
  api: _api,
@@ -33,7 +33,6 @@ var _fieldDefinitions = require("@atlaskit/editor-common/extensions/field-defini
33
33
  var _useSharedPluginStateWithSelector = require("@atlaskit/editor-common/useSharedPluginStateWithSelector");
34
34
  var _form = _interopRequireDefault(require("@atlaskit/form/form"));
35
35
  var _formFooter = require("@atlaskit/form/form-footer");
36
- var _fg = require("@atlaskit/platform-feature-flags/fg");
37
36
  var _constants = require("./constants");
38
37
  var _DescriptionSummary = require("./DescriptionSummary");
39
38
  var _ErrorMessage = _interopRequireDefault(require("./ErrorMessage"));
@@ -279,14 +278,9 @@ var ConfigPanel = /*#__PURE__*/function (_React$Component) {
279
278
  return _ref4.apply(this, arguments);
280
279
  };
281
280
  }());
282
- /**
283
- * Remove renderHeader when when cleaning platform_editor_ai_object_sidebar_injection FG
284
- * Because header will br rendered separately outside of ConfigPanel.
285
- * ConfigPanel will be body component of ContextPanel.
286
- */
281
+ // The sidebar panel renders its own header; the legacy panel uses this header.
287
282
  // memoized to prevent rerender on new parameters
288
283
  (0, _defineProperty2.default)(_this, "renderHeader", (0, _memoizeOne.default)(function (extensionManifest) {
289
- // Remove below line when cleaning platform_editor_ai_object_sidebar_injection FG
290
284
  if (_this.props.usingObjectSidebarPanel) {
291
285
  return null;
292
286
  }
@@ -461,7 +455,7 @@ var ConfigPanel = /*#__PURE__*/function (_React$Component) {
461
455
  return /*#__PURE__*/_react.default.createElement("form", (0, _extends2.default)({}, formProps, {
462
456
  noValidate: true,
463
457
  "data-testid": "extension-config-panel"
464
- }), _this2.renderHeader(extensionManifest), _this2.props.usingObjectSidebarPanel && (0, _fg.fg)('platform_editor_ai_object_sidebar_injection') && /*#__PURE__*/_react.default.createElement(_DescriptionSummary.DescriptionSummary, {
458
+ }), _this2.renderHeader(extensionManifest), _this2.props.usingObjectSidebarPanel && /*#__PURE__*/_react.default.createElement(_DescriptionSummary.DescriptionSummary, {
465
459
  extensionManifest: extensionManifest
466
460
  }), /*#__PURE__*/_react.default.createElement(ConfigFormIntlWithBoundary, {
467
461
  api: api,
@@ -148,9 +148,7 @@ function FieldsLoader(_ref) {
148
148
  onChange: onChange,
149
149
  onCancel: onCancel,
150
150
  errorMessage: errorMessage,
151
- featureFlags: featureFlags
152
- // Remove below prop when cleaning platform_editor_ai_object_sidebar_injection FG
153
- ,
151
+ featureFlags: featureFlags,
154
152
  usingObjectSidebarPanel: usingObjectSidebarPanel,
155
153
  disableFields: (0, _isOfflineMode.isOfflineMode)(connectivityState)
156
154
  });
@@ -282,10 +282,7 @@ var getContextPanelBodyComponent = exports.getContextPanelBodyComponent = functi
282
282
  editorView: editorView
283
283
  });
284
284
  },
285
- featureFlags: featureFlags
286
- // Remove below prop when cleaning platform_editor_ai_object_sidebar_injection FG
287
- // Becuase it will always be true
288
- ,
285
+ featureFlags: featureFlags,
289
286
  usingObjectSidebarPanel: true
290
287
  });
291
288
  }));
@@ -16,7 +16,6 @@ import { pluginKey } from './pm-plugins/plugin-key';
16
16
  import { bodiedExtensionSpecWithFixedToDOM } from './pm-plugins/toDOM-fixes/bodiedExtension';
17
17
  import { getToolbarConfig } from './pm-plugins/toolbar';
18
18
  import { createPlugin as createUniqueIdPlugin } from './pm-plugins/unique-id';
19
- // Remove below line when cleaning up platform_editor_ai_object_sidebar_injection feature flag
20
19
  import { CONFIG_PANEL_ID } from './ui/ConfigPanel/constants';
21
20
  import { getContextPanel } from './ui/context-panel';
22
21
  import { useConfigPanelPluginHook } from './ui/useConfigPanelPluginHook';
@@ -191,15 +190,12 @@ export const extensionPlugin = ({
191
190
  extensionApi: api,
192
191
  getUnsupportedContent: options.getUnsupportedContent
193
192
  }),
194
- contextPanel:
195
- // if showContextPanel action is not available, or platform_editor_ai_object_sidebar_injection feature flag is off
196
- // then keep using old context panel.
197
- !showContextPanel || !fg('platform_editor_ai_object_sidebar_injection') ? getContextPanel(() => {
193
+ contextPanel: !showContextPanel ? getContextPanel(() => {
198
194
  var _editorViewRef$curren;
199
195
  return (_editorViewRef$curren = editorViewRef.current) !== null && _editorViewRef$curren !== void 0 ? _editorViewRef$curren : undefined;
200
196
  })(api, featureFlags) : undefined
201
197
  },
202
- usePluginHook: showContextPanel && fg('platform_editor_ai_object_sidebar_injection') ? ({
198
+ usePluginHook: showContextPanel ? ({
203
199
  editorView
204
200
  }) => {
205
201
  useConfigPanelPluginHook({
@@ -18,7 +18,6 @@ import { isTabGroup } from '@atlaskit/editor-common/extensions/field-definitions
18
18
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
19
19
  import Form from '@atlaskit/form/form';
20
20
  import { FormFooter } from '@atlaskit/form/form-footer';
21
- import { fg } from '@atlaskit/platform-feature-flags/fg';
22
21
  import { ALLOWED_LOGGED_MACRO_PARAMS } from './constants';
23
22
  import { DescriptionSummary } from './DescriptionSummary';
24
23
  import ErrorMessage from './ErrorMessage';
@@ -221,14 +220,9 @@ class ConfigPanel extends React.Component {
221
220
  hasParsedParameters: true
222
221
  });
223
222
  });
224
- /**
225
- * Remove renderHeader when when cleaning platform_editor_ai_object_sidebar_injection FG
226
- * Because header will br rendered separately outside of ConfigPanel.
227
- * ConfigPanel will be body component of ContextPanel.
228
- */
223
+ // The sidebar panel renders its own header; the legacy panel uses this header.
229
224
  // memoized to prevent rerender on new parameters
230
225
  _defineProperty(this, "renderHeader", memoizeOne(extensionManifest => {
231
- // Remove below line when cleaning platform_editor_ai_object_sidebar_injection FG
232
226
  if (this.props.usingObjectSidebarPanel) {
233
227
  return null;
234
228
  }
@@ -403,7 +397,7 @@ class ConfigPanel extends React.Component {
403
397
  return /*#__PURE__*/React.createElement("form", _extends({}, formProps, {
404
398
  noValidate: true,
405
399
  "data-testid": "extension-config-panel"
406
- }), this.renderHeader(extensionManifest), this.props.usingObjectSidebarPanel && fg('platform_editor_ai_object_sidebar_injection') && /*#__PURE__*/React.createElement(DescriptionSummary, {
400
+ }), this.renderHeader(extensionManifest), this.props.usingObjectSidebarPanel && /*#__PURE__*/React.createElement(DescriptionSummary, {
407
401
  extensionManifest: extensionManifest
408
402
  }), /*#__PURE__*/React.createElement(ConfigFormIntlWithBoundary, {
409
403
  api: api,
@@ -104,7 +104,6 @@ export default function FieldsLoader({
104
104
  onChange,
105
105
  onCancel,
106
106
  api,
107
- // Remove below prop when cleaning platform_editor_ai_object_sidebar_injection FG
108
107
  usingObjectSidebarPanel
109
108
  }) {
110
109
  const [extensionManifest] = useStateFromPromise(() => extensionProvider.getExtension(extensionType, extensionKey), [extensionProvider, extensionType, extensionKey]);
@@ -128,9 +127,7 @@ export default function FieldsLoader({
128
127
  onChange: onChange,
129
128
  onCancel: onCancel,
130
129
  errorMessage: errorMessage,
131
- featureFlags: featureFlags
132
- // Remove below prop when cleaning platform_editor_ai_object_sidebar_injection FG
133
- ,
130
+ featureFlags: featureFlags,
134
131
  usingObjectSidebarPanel: usingObjectSidebarPanel,
135
132
  disableFields: isOfflineMode(connectivityState)
136
133
  }));
@@ -213,10 +213,7 @@ export const getContextPanelBodyComponent = ({
213
213
  api,
214
214
  editorView
215
215
  }),
216
- featureFlags: featureFlags
217
- // Remove below prop when cleaning platform_editor_ai_object_sidebar_injection FG
218
- // Becuase it will always be true
219
- ,
216
+ featureFlags: featureFlags,
220
217
  usingObjectSidebarPanel: true
221
218
  });
222
219
  }));
@@ -16,7 +16,6 @@ import { pluginKey } from './pm-plugins/plugin-key';
16
16
  import { bodiedExtensionSpecWithFixedToDOM } from './pm-plugins/toDOM-fixes/bodiedExtension';
17
17
  import { getToolbarConfig } from './pm-plugins/toolbar';
18
18
  import { createPlugin as createUniqueIdPlugin } from './pm-plugins/unique-id';
19
- // Remove below line when cleaning up platform_editor_ai_object_sidebar_injection feature flag
20
19
  import { CONFIG_PANEL_ID } from './ui/ConfigPanel/constants';
21
20
  import { getContextPanel } from './ui/context-panel';
22
21
  import { useConfigPanelPluginHook } from './ui/useConfigPanelPluginHook';
@@ -196,15 +195,12 @@ export var extensionPlugin = function extensionPlugin(_ref) {
196
195
  extensionApi: _api,
197
196
  getUnsupportedContent: options.getUnsupportedContent
198
197
  }),
199
- contextPanel:
200
- // if showContextPanel action is not available, or platform_editor_ai_object_sidebar_injection feature flag is off
201
- // then keep using old context panel.
202
- !showContextPanel || !fg('platform_editor_ai_object_sidebar_injection') ? getContextPanel(function () {
198
+ contextPanel: !showContextPanel ? getContextPanel(function () {
203
199
  var _editorViewRef$curren;
204
200
  return (_editorViewRef$curren = editorViewRef.current) !== null && _editorViewRef$curren !== void 0 ? _editorViewRef$curren : undefined;
205
201
  })(_api, featureFlags) : undefined
206
202
  },
207
- usePluginHook: showContextPanel && fg('platform_editor_ai_object_sidebar_injection') ? function (_ref7) {
203
+ usePluginHook: showContextPanel ? function (_ref7) {
208
204
  var editorView = _ref7.editorView;
209
205
  useConfigPanelPluginHook({
210
206
  api: _api,
@@ -29,7 +29,6 @@ import { isTabGroup } from '@atlaskit/editor-common/extensions/field-definitions
29
29
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
30
30
  import Form from '@atlaskit/form/form';
31
31
  import { FormFooter } from '@atlaskit/form/form-footer';
32
- import { fg } from '@atlaskit/platform-feature-flags/fg';
33
32
  import { ALLOWED_LOGGED_MACRO_PARAMS } from './constants';
34
33
  import { DescriptionSummary } from './DescriptionSummary';
35
34
  import ErrorMessage from './ErrorMessage';
@@ -270,14 +269,9 @@ var ConfigPanel = /*#__PURE__*/function (_React$Component) {
270
269
  return _ref4.apply(this, arguments);
271
270
  };
272
271
  }());
273
- /**
274
- * Remove renderHeader when when cleaning platform_editor_ai_object_sidebar_injection FG
275
- * Because header will br rendered separately outside of ConfigPanel.
276
- * ConfigPanel will be body component of ContextPanel.
277
- */
272
+ // The sidebar panel renders its own header; the legacy panel uses this header.
278
273
  // memoized to prevent rerender on new parameters
279
274
  _defineProperty(_this, "renderHeader", memoizeOne(function (extensionManifest) {
280
- // Remove below line when cleaning platform_editor_ai_object_sidebar_injection FG
281
275
  if (_this.props.usingObjectSidebarPanel) {
282
276
  return null;
283
277
  }
@@ -452,7 +446,7 @@ var ConfigPanel = /*#__PURE__*/function (_React$Component) {
452
446
  return /*#__PURE__*/React.createElement("form", _extends({}, formProps, {
453
447
  noValidate: true,
454
448
  "data-testid": "extension-config-panel"
455
- }), _this2.renderHeader(extensionManifest), _this2.props.usingObjectSidebarPanel && fg('platform_editor_ai_object_sidebar_injection') && /*#__PURE__*/React.createElement(DescriptionSummary, {
449
+ }), _this2.renderHeader(extensionManifest), _this2.props.usingObjectSidebarPanel && /*#__PURE__*/React.createElement(DescriptionSummary, {
456
450
  extensionManifest: extensionManifest
457
451
  }), /*#__PURE__*/React.createElement(ConfigFormIntlWithBoundary, {
458
452
  api: api,
@@ -139,9 +139,7 @@ export default function FieldsLoader(_ref) {
139
139
  onChange: onChange,
140
140
  onCancel: onCancel,
141
141
  errorMessage: errorMessage,
142
- featureFlags: featureFlags
143
- // Remove below prop when cleaning platform_editor_ai_object_sidebar_injection FG
144
- ,
142
+ featureFlags: featureFlags,
145
143
  usingObjectSidebarPanel: usingObjectSidebarPanel,
146
144
  disableFields: isOfflineMode(connectivityState)
147
145
  });
@@ -269,10 +269,7 @@ export var getContextPanelBodyComponent = function getContextPanelBodyComponent(
269
269
  editorView: editorView
270
270
  });
271
271
  },
272
- featureFlags: featureFlags
273
- // Remove below prop when cleaning platform_editor_ai_object_sidebar_injection FG
274
- // Becuase it will always be true
275
- ,
272
+ featureFlags: featureFlags,
276
273
  usingObjectSidebarPanel: true
277
274
  });
278
275
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-extension",
3
- "version": "33.0.4",
3
+ "version": "33.0.6",
4
4
  "description": "editor-plugin-extension plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -48,7 +48,7 @@
48
48
  "@atlaskit/editor-plugin-toolbar": "^27.0.0",
49
49
  "@atlaskit/editor-plugin-width": "^31.0.0",
50
50
  "@atlaskit/editor-prosemirror": "^9.0.0",
51
- "@atlaskit/editor-shared-styles": "^4.6.0",
51
+ "@atlaskit/editor-shared-styles": "^5.0.0",
52
52
  "@atlaskit/editor-tables": "^3.2.0",
53
53
  "@atlaskit/empty-state": "^12.2.0",
54
54
  "@atlaskit/form": "^18.3.0",
@@ -64,7 +64,7 @@
64
64
  "@atlaskit/react-select": "^4.12.0",
65
65
  "@atlaskit/section-message": "^10.2.0",
66
66
  "@atlaskit/select": "^23.1.0",
67
- "@atlaskit/smart-user-picker": "^12.9.0",
67
+ "@atlaskit/smart-user-picker": "^12.10.0",
68
68
  "@atlaskit/spinner": "^20.4.0",
69
69
  "@atlaskit/tabs": "^21.3.0",
70
70
  "@atlaskit/textarea": "^10.3.0",
@@ -85,7 +85,7 @@
85
85
  "uuid": "^11.1.1"
86
86
  },
87
87
  "peerDependencies": {
88
- "@atlaskit/editor-common": "^134.3.0",
88
+ "@atlaskit/editor-common": "^134.4.0",
89
89
  "react": "^18.2.0 || ^19.2.0",
90
90
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
91
91
  },
@@ -100,9 +100,6 @@
100
100
  "cc_maui_annotations_on_extensions": {
101
101
  "type": "boolean"
102
102
  },
103
- "platform_editor_ai_object_sidebar_injection": {
104
- "type": "boolean"
105
- },
106
103
  "platform_editor_extension_hide_copy_button": {
107
104
  "type": "boolean"
108
105
  }