@atlaskit/editor-plugin-extension 13.1.5 → 13.1.7

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-extension
2
2
 
3
+ ## 13.1.7
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 13.1.6
10
+
11
+ ### Patch Changes
12
+
13
+ - [`d94df511393a9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d94df511393a9) -
14
+ Removing FG platform_editor_a11y_eslint_fix
15
+ - Updated dependencies
16
+
3
17
  ## 13.1.5
4
18
 
5
19
  ### Patch Changes
@@ -30,7 +30,6 @@ var _extensions = require("@atlaskit/editor-common/extensions");
30
30
  var _hooks = require("@atlaskit/editor-common/hooks");
31
31
  var _form = _interopRequireWildcard(require("@atlaskit/form"));
32
32
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
33
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
34
33
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
35
34
  var _constants = require("./constants");
36
35
  var _DescriptionSummary = require("./DescriptionSummary");
@@ -368,14 +367,12 @@ var ConfigPanel = /*#__PURE__*/function (_React$Component) {
368
367
  fields = _this$props3.fields,
369
368
  parameters = _this$props3.parameters;
370
369
  this.parseParameters(fields, parameters);
371
- if ((0, _expValEquals.expValEquals)('platform_editor_a11y_eslint_fix', 'isEnabled', true)) {
372
- var doc = (0, _browserApis.getDocument)();
373
- if (doc) {
374
- this.unbindKeyDownHandler = (0, _bindEventListener.bind)(doc, {
375
- type: 'keydown',
376
- listener: this.handleKeyDown
377
- });
378
- }
370
+ var doc = (0, _browserApis.getDocument)();
371
+ if (doc) {
372
+ this.unbindKeyDownHandler = (0, _bindEventListener.bind)(doc, {
373
+ type: 'keydown',
374
+ listener: this.handleKeyDown
375
+ });
379
376
  }
380
377
  }
381
378
  }, {
@@ -457,10 +454,8 @@ var ConfigPanel = /*#__PURE__*/function (_React$Component) {
457
454
  currentParameters = _this$state.currentParameters,
458
455
  hasParsedParameters = _this$state.hasParsedParameters,
459
456
  firstVisibleFieldName = _this$state.firstVisibleFieldName;
460
- var handleSubmit = this.handleSubmit,
461
- handleKeyDown = this.handleKeyDown;
462
457
  return /*#__PURE__*/_react.default.createElement(_form.default, {
463
- onSubmit: handleSubmit
458
+ onSubmit: this.handleSubmit
464
459
  }, function (_ref5) {
465
460
  var formProps = _ref5.formProps,
466
461
  getState = _ref5.getState,
@@ -468,12 +463,11 @@ var ConfigPanel = /*#__PURE__*/function (_React$Component) {
468
463
  return /*#__PURE__*/_react.default.createElement(WithOnFieldChange, {
469
464
  autoSave: true,
470
465
  getState: getState,
471
- handleSubmit: handleSubmit
466
+ handleSubmit: _this2.handleSubmit
472
467
  }, function (onFieldChange) {
473
468
  _this2.onFieldChange = onFieldChange;
474
469
  return /*#__PURE__*/_react.default.createElement("form", (0, _extends2.default)({}, formProps, {
475
470
  noValidate: true,
476
- onKeyDown: (0, _expValEquals.expValEquals)('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? undefined : handleKeyDown,
477
471
  "data-testid": "extension-config-panel"
478
472
  }), _this2.renderHeader(extensionManifest), (!(0, _platformFeatureFlags.fg)('platform_editor_conditionally_add_sidebar_summary') || _this2.props.usingObjectSidebarPanel) && (0, _platformFeatureFlags.fg)('platform_editor_ai_object_sidebar_injection') && /*#__PURE__*/_react.default.createElement(_DescriptionSummary.DescriptionSummary, {
479
473
  extensionManifest: extensionManifest
@@ -10,7 +10,6 @@ var _react2 = require("@emotion/react");
10
10
  var _reactIntl = require("react-intl");
11
11
  var _extensions = require("@atlaskit/editor-common/extensions");
12
12
  var _crossCircle = _interopRequireDefault(require("@atlaskit/icon/core/cross-circle"));
13
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
14
13
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
15
14
  /**
16
15
  * @jsxRuntime classic
@@ -54,13 +53,13 @@ var RemovableField = function RemovableField(_ref) {
54
53
  ,
55
54
  className: className
56
55
  }, children, canRemoveField && (0, _react2.jsx)("div", {
57
- role: (0, _expValEquals.expValEquals)('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? 'button' : undefined,
56
+ role: "button",
58
57
  css: removeButtonWrapperStyles,
59
58
  "data-testid": "remove-field-".concat(name),
60
59
  onClick: onClickCallback,
61
- onKeyDown: (0, _expValEquals.expValEquals)('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? onClickCallback : undefined,
62
- onFocus: (0, _expValEquals.expValEquals)('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? onClickCallback : undefined,
63
- tabIndex: (0, _expValEquals.expValEquals)('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? 0 : undefined
60
+ onKeyDown: onClickCallback,
61
+ onFocus: onClickCallback,
62
+ tabIndex: 0
64
63
  }, (0, _react2.jsx)(_tooltip.default, {
65
64
  content: intl.formatMessage(_extensions.configPanelMessages.removeField),
66
65
  position: "left"
@@ -15,7 +15,6 @@ import { isTabGroup, configPanelMessages as messages } from '@atlaskit/editor-co
15
15
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
16
16
  import Form, { FormFooter } from '@atlaskit/form';
17
17
  import { fg } from '@atlaskit/platform-feature-flags';
18
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
19
18
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
20
19
  import { ALLOWED_LOGGED_MACRO_PARAMS } from './constants';
21
20
  import { DescriptionSummary } from './DescriptionSummary';
@@ -303,14 +302,12 @@ class ConfigPanel extends React.Component {
303
302
  parameters
304
303
  } = this.props;
305
304
  this.parseParameters(fields, parameters);
306
- if (expValEquals('platform_editor_a11y_eslint_fix', 'isEnabled', true)) {
307
- const doc = getDocument();
308
- if (doc) {
309
- this.unbindKeyDownHandler = bind(doc, {
310
- type: 'keydown',
311
- listener: this.handleKeyDown
312
- });
313
- }
305
+ const doc = getDocument();
306
+ if (doc) {
307
+ this.unbindKeyDownHandler = bind(doc, {
308
+ type: 'keydown',
309
+ listener: this.handleKeyDown
310
+ });
314
311
  }
315
312
  }
316
313
  componentWillUnmount() {
@@ -393,12 +390,8 @@ class ConfigPanel extends React.Component {
393
390
  hasParsedParameters,
394
391
  firstVisibleFieldName
395
392
  } = this.state;
396
- const {
397
- handleSubmit,
398
- handleKeyDown
399
- } = this;
400
393
  return /*#__PURE__*/React.createElement(Form, {
401
- onSubmit: handleSubmit
394
+ onSubmit: this.handleSubmit
402
395
  }, ({
403
396
  formProps,
404
397
  getState,
@@ -407,12 +400,11 @@ class ConfigPanel extends React.Component {
407
400
  return /*#__PURE__*/React.createElement(WithOnFieldChange, {
408
401
  autoSave: true,
409
402
  getState: getState,
410
- handleSubmit: handleSubmit
403
+ handleSubmit: this.handleSubmit
411
404
  }, onFieldChange => {
412
405
  this.onFieldChange = onFieldChange;
413
406
  return /*#__PURE__*/React.createElement("form", _extends({}, formProps, {
414
407
  noValidate: true,
415
- onKeyDown: expValEquals('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? undefined : handleKeyDown,
416
408
  "data-testid": "extension-config-panel"
417
409
  }), this.renderHeader(extensionManifest), (!fg('platform_editor_conditionally_add_sidebar_summary') || this.props.usingObjectSidebarPanel) && fg('platform_editor_ai_object_sidebar_injection') && /*#__PURE__*/React.createElement(DescriptionSummary, {
418
410
  extensionManifest: extensionManifest
@@ -9,7 +9,6 @@ import { css, jsx } from '@emotion/react';
9
9
  import { injectIntl } from 'react-intl';
10
10
  import { configPanelMessages as messages } from '@atlaskit/editor-common/extensions';
11
11
  import CrossCircleIcon from '@atlaskit/icon/core/cross-circle';
12
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
13
12
  import Tooltip from '@atlaskit/tooltip';
14
13
  const removableFieldWrapperStyles = css({
15
14
  position: 'relative',
@@ -45,13 +44,13 @@ const RemovableField = ({
45
44
  ,
46
45
  className: className
47
46
  }, children, canRemoveField && jsx("div", {
48
- role: expValEquals('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? 'button' : undefined,
47
+ role: "button",
49
48
  css: removeButtonWrapperStyles,
50
49
  "data-testid": `remove-field-${name}`,
51
50
  onClick: onClickCallback,
52
- onKeyDown: expValEquals('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? onClickCallback : undefined,
53
- onFocus: expValEquals('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? onClickCallback : undefined,
54
- tabIndex: expValEquals('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? 0 : undefined
51
+ onKeyDown: onClickCallback,
52
+ onFocus: onClickCallback,
53
+ tabIndex: 0
55
54
  }, jsx(Tooltip, {
56
55
  content: intl.formatMessage(messages.removeField),
57
56
  position: "left"
@@ -26,7 +26,6 @@ import { isTabGroup, configPanelMessages as messages } from '@atlaskit/editor-co
26
26
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
27
27
  import Form, { FormFooter } from '@atlaskit/form';
28
28
  import { fg } from '@atlaskit/platform-feature-flags';
29
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
30
29
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
31
30
  import { ALLOWED_LOGGED_MACRO_PARAMS } from './constants';
32
31
  import { DescriptionSummary } from './DescriptionSummary';
@@ -359,14 +358,12 @@ var ConfigPanel = /*#__PURE__*/function (_React$Component) {
359
358
  fields = _this$props3.fields,
360
359
  parameters = _this$props3.parameters;
361
360
  this.parseParameters(fields, parameters);
362
- if (expValEquals('platform_editor_a11y_eslint_fix', 'isEnabled', true)) {
363
- var doc = getDocument();
364
- if (doc) {
365
- this.unbindKeyDownHandler = bind(doc, {
366
- type: 'keydown',
367
- listener: this.handleKeyDown
368
- });
369
- }
361
+ var doc = getDocument();
362
+ if (doc) {
363
+ this.unbindKeyDownHandler = bind(doc, {
364
+ type: 'keydown',
365
+ listener: this.handleKeyDown
366
+ });
370
367
  }
371
368
  }
372
369
  }, {
@@ -448,10 +445,8 @@ var ConfigPanel = /*#__PURE__*/function (_React$Component) {
448
445
  currentParameters = _this$state.currentParameters,
449
446
  hasParsedParameters = _this$state.hasParsedParameters,
450
447
  firstVisibleFieldName = _this$state.firstVisibleFieldName;
451
- var handleSubmit = this.handleSubmit,
452
- handleKeyDown = this.handleKeyDown;
453
448
  return /*#__PURE__*/React.createElement(Form, {
454
- onSubmit: handleSubmit
449
+ onSubmit: this.handleSubmit
455
450
  }, function (_ref5) {
456
451
  var formProps = _ref5.formProps,
457
452
  getState = _ref5.getState,
@@ -459,12 +454,11 @@ var ConfigPanel = /*#__PURE__*/function (_React$Component) {
459
454
  return /*#__PURE__*/React.createElement(WithOnFieldChange, {
460
455
  autoSave: true,
461
456
  getState: getState,
462
- handleSubmit: handleSubmit
457
+ handleSubmit: _this2.handleSubmit
463
458
  }, function (onFieldChange) {
464
459
  _this2.onFieldChange = onFieldChange;
465
460
  return /*#__PURE__*/React.createElement("form", _extends({}, formProps, {
466
461
  noValidate: true,
467
- onKeyDown: expValEquals('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? undefined : handleKeyDown,
468
462
  "data-testid": "extension-config-panel"
469
463
  }), _this2.renderHeader(extensionManifest), (!fg('platform_editor_conditionally_add_sidebar_summary') || _this2.props.usingObjectSidebarPanel) && fg('platform_editor_ai_object_sidebar_injection') && /*#__PURE__*/React.createElement(DescriptionSummary, {
470
464
  extensionManifest: extensionManifest
@@ -9,7 +9,6 @@ import { css, jsx } from '@emotion/react';
9
9
  import { injectIntl } from 'react-intl';
10
10
  import { configPanelMessages as messages } from '@atlaskit/editor-common/extensions';
11
11
  import CrossCircleIcon from '@atlaskit/icon/core/cross-circle';
12
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
13
12
  import Tooltip from '@atlaskit/tooltip';
14
13
  var removableFieldWrapperStyles = css({
15
14
  position: 'relative',
@@ -46,13 +45,13 @@ var RemovableField = function RemovableField(_ref) {
46
45
  ,
47
46
  className: className
48
47
  }, children, canRemoveField && jsx("div", {
49
- role: expValEquals('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? 'button' : undefined,
48
+ role: "button",
50
49
  css: removeButtonWrapperStyles,
51
50
  "data-testid": "remove-field-".concat(name),
52
51
  onClick: onClickCallback,
53
- onKeyDown: expValEquals('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? onClickCallback : undefined,
54
- onFocus: expValEquals('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? onClickCallback : undefined,
55
- tabIndex: expValEquals('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? 0 : undefined
52
+ onKeyDown: onClickCallback,
53
+ onFocus: onClickCallback,
54
+ tabIndex: 0
56
55
  }, jsx(Tooltip, {
57
56
  content: intl.formatMessage(messages.removeField),
58
57
  position: "left"
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Testing structured MCP docs for review — ignore this file.
3
+ * Contact #dst-structured-content in Slack with questions.
4
+ */
5
+
6
+ import path from 'path';
7
+
8
+
9
+ import type { ComponentStructuredContentSource } from '@atlassian/structured-docs-types';
10
+
11
+ import packageJson from './package.json';
12
+
13
+ const packagePath = path.resolve(__dirname);
14
+
15
+ const documentation: ComponentStructuredContentSource[] = [
16
+ {
17
+ name: 'Editor Plugin Extension',
18
+ description: 'editor-plugin-extension plugin for @atlaskit/editor-core',
19
+ status: 'general-availability',
20
+ import: {
21
+ name: 'Editor Plugin Extension',
22
+ package: '@atlaskit/editor-plugin-extension',
23
+ type: 'default',
24
+ packagePath,
25
+ packageJson,
26
+ },
27
+ usageGuidelines: [],
28
+ contentGuidelines: [],
29
+ accessibilityGuidelines: [],
30
+ keywords: ['editor', 'editor-plugin-extension', 'atlaskit'],
31
+ categories: ['editor'],
32
+ examples: [
33
+ { name: 'Config panel extensions', description: 'Extension with config panel.', source: path.resolve(packagePath, './examples/1-config-panel-extensions.tsx') },
34
+ { name: 'Config panel with parameters', description: 'Extension config panel with parameters.', source: path.resolve(packagePath, './examples/1-config-panel-with-parameters.tsx') },
35
+ ],
36
+ },
37
+ ];
38
+
39
+ export default documentation;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-extension",
3
- "version": "13.1.5",
3
+ "version": "13.1.7",
4
4
  "description": "editor-plugin-extension plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -59,7 +59,7 @@
59
59
  "@atlaskit/tabs": "^19.1.0",
60
60
  "@atlaskit/textarea": "^8.3.0",
61
61
  "@atlaskit/textfield": "^8.3.0",
62
- "@atlaskit/tmp-editor-statsig": "^71.0.0",
62
+ "@atlaskit/tmp-editor-statsig": "^73.0.0",
63
63
  "@atlaskit/toggle": "^15.6.0",
64
64
  "@atlaskit/tokens": "^13.0.0",
65
65
  "@atlaskit/tooltip": "^21.2.0",
@@ -73,11 +73,12 @@
73
73
  "uuid": "^3.1.0"
74
74
  },
75
75
  "peerDependencies": {
76
- "@atlaskit/editor-common": "^114.12.0",
76
+ "@atlaskit/editor-common": "^114.13.0",
77
77
  "react": "^18.2.0",
78
78
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
79
79
  },
80
80
  "devDependencies": {
81
+ "@atlassian/structured-docs-types": "workspace:^",
81
82
  "react-intl": "^6.6.2",
82
83
  "react-select": "^5.4.0"
83
84
  },