@atlaskit/editor-plugin-extension 10.1.6 → 10.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 +8 -0
- package/dist/cjs/ui/ConfigPanel/ConfigPanel.js +37 -26
- package/dist/cjs/ui/ConfigPanel/NestedForms/RemovableField.js +7 -4
- package/dist/es2019/ui/ConfigPanel/ConfigPanel.js +37 -26
- package/dist/es2019/ui/ConfigPanel/NestedForms/RemovableField.js +7 -4
- package/dist/esm/ui/ConfigPanel/ConfigPanel.js +37 -26
- package/dist/esm/ui/ConfigPanel/NestedForms/RemovableField.js +7 -4
- package/package.json +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-extension
|
|
2
2
|
|
|
3
|
+
## 10.1.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`d2f1426fe5b85`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d2f1426fe5b85) -
|
|
8
|
+
[ux] ENGHEALTH-46817 Add feature gated a11y eslint fixes across editor packages
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 10.1.6
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -16,11 +16,13 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
16
16
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
17
17
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
18
18
|
var _react = _interopRequireWildcard(require("react"));
|
|
19
|
+
var _bindEventListener = require("bind-event-listener");
|
|
19
20
|
var _isEqual2 = _interopRequireDefault(require("lodash/isEqual"));
|
|
20
21
|
var _merge = _interopRequireDefault(require("lodash/merge"));
|
|
21
22
|
var _memoizeOne = _interopRequireDefault(require("memoize-one"));
|
|
22
23
|
var _reactIntlNext = require("react-intl-next");
|
|
23
24
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
25
|
+
var _browserApis = require("@atlaskit/browser-apis");
|
|
24
26
|
var _buttonGroup = _interopRequireDefault(require("@atlaskit/button/button-group"));
|
|
25
27
|
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
26
28
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
@@ -28,6 +30,7 @@ var _extensions = require("@atlaskit/editor-common/extensions");
|
|
|
28
30
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
29
31
|
var _form = _interopRequireWildcard(require("@atlaskit/form"));
|
|
30
32
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
33
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
31
34
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
32
35
|
var _constants = require("./constants");
|
|
33
36
|
var _DescriptionSummary = require("./DescriptionSummary");
|
|
@@ -354,6 +357,7 @@ var ConfigPanel = /*#__PURE__*/function (_React$Component) {
|
|
|
354
357
|
firstVisibleFieldName: props.fields ? _this.getFirstVisibleFieldName(props.fields) : undefined
|
|
355
358
|
};
|
|
356
359
|
_this.onFieldChange = null;
|
|
360
|
+
_this.unbindKeyDownHandler = null;
|
|
357
361
|
return _this;
|
|
358
362
|
}
|
|
359
363
|
(0, _inherits2.default)(ConfigPanel, _React$Component);
|
|
@@ -364,15 +368,26 @@ var ConfigPanel = /*#__PURE__*/function (_React$Component) {
|
|
|
364
368
|
fields = _this$props3.fields,
|
|
365
369
|
parameters = _this$props3.parameters;
|
|
366
370
|
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
|
+
}
|
|
379
|
+
}
|
|
367
380
|
}
|
|
368
381
|
}, {
|
|
369
382
|
key: "componentWillUnmount",
|
|
370
383
|
value: function componentWillUnmount() {
|
|
384
|
+
var _this$unbindKeyDownHa;
|
|
371
385
|
var _this$props4 = this.props,
|
|
372
386
|
createAnalyticsEvent = _this$props4.createAnalyticsEvent,
|
|
373
387
|
extensionManifest = _this$props4.extensionManifest,
|
|
374
388
|
fields = _this$props4.fields;
|
|
375
389
|
var currentParameters = this.state.currentParameters;
|
|
390
|
+
(_this$unbindKeyDownHa = this.unbindKeyDownHandler) === null || _this$unbindKeyDownHa === void 0 || _this$unbindKeyDownHa.call(this);
|
|
376
391
|
(0, _analytics.fireAnalyticsEvent)(createAnalyticsEvent)({
|
|
377
392
|
payload: {
|
|
378
393
|
action: _analytics.ACTION.CLOSED,
|
|
@@ -456,32 +471,28 @@ var ConfigPanel = /*#__PURE__*/function (_React$Component) {
|
|
|
456
471
|
handleSubmit: handleSubmit
|
|
457
472
|
}, function (onFieldChange) {
|
|
458
473
|
_this2.onFieldChange = onFieldChange;
|
|
459
|
-
return (
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
featureFlags: featureFlags,
|
|
482
|
-
disableFields: _this2.props.disableFields
|
|
483
|
-
}))
|
|
484
|
-
);
|
|
474
|
+
return /*#__PURE__*/_react.default.createElement("form", (0, _extends2.default)({}, formProps, {
|
|
475
|
+
noValidate: true,
|
|
476
|
+
onKeyDown: (0, _expValEquals.expValEquals)('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? undefined : handleKeyDown,
|
|
477
|
+
"data-testid": "extension-config-panel"
|
|
478
|
+
}), _this2.renderHeader(extensionManifest), (0, _platformFeatureFlags.fg)('platform_editor_ai_object_sidebar_injection') && /*#__PURE__*/_react.default.createElement(_DescriptionSummary.DescriptionSummary, {
|
|
479
|
+
extensionManifest: extensionManifest
|
|
480
|
+
}), /*#__PURE__*/_react.default.createElement(ConfigFormIntlWithBoundary, {
|
|
481
|
+
api: api,
|
|
482
|
+
canSave: false,
|
|
483
|
+
errorMessage: errorMessage,
|
|
484
|
+
extensionManifest: extensionManifest,
|
|
485
|
+
fields: fields !== null && fields !== void 0 ? fields : [],
|
|
486
|
+
firstVisibleFieldName: firstVisibleFieldName,
|
|
487
|
+
hasParsedParameters: hasParsedParameters,
|
|
488
|
+
isLoading: isLoading || false,
|
|
489
|
+
onCancel: onCancel,
|
|
490
|
+
onFieldChange: onFieldChange,
|
|
491
|
+
parameters: currentParameters,
|
|
492
|
+
submitting: submitting,
|
|
493
|
+
featureFlags: featureFlags,
|
|
494
|
+
disableFields: _this2.props.disableFields
|
|
495
|
+
}));
|
|
485
496
|
});
|
|
486
497
|
});
|
|
487
498
|
}
|
|
@@ -11,6 +11,7 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
11
11
|
var _extensions = require("@atlaskit/editor-common/extensions");
|
|
12
12
|
var _crossCircle = _interopRequireDefault(require("@atlaskit/icon/core/cross-circle"));
|
|
13
13
|
var _colors = require("@atlaskit/theme/colors");
|
|
14
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
14
15
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
15
16
|
/**
|
|
16
17
|
* @jsxRuntime classic
|
|
@@ -53,12 +54,14 @@ var RemovableField = function RemovableField(_ref) {
|
|
|
53
54
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
54
55
|
,
|
|
55
56
|
className: className
|
|
56
|
-
}, children, canRemoveField &&
|
|
57
|
-
|
|
58
|
-
(0, _react2.jsx)("div", {
|
|
57
|
+
}, children, canRemoveField && (0, _react2.jsx)("div", {
|
|
58
|
+
role: (0, _expValEquals.expValEquals)('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? 'button' : undefined,
|
|
59
59
|
css: removeButtonWrapperStyles,
|
|
60
60
|
"data-testid": "remove-field-".concat(name),
|
|
61
|
-
onClick: onClickCallback
|
|
61
|
+
onClick: onClickCallback,
|
|
62
|
+
onKeyDown: (0, _expValEquals.expValEquals)('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? onClickCallback : undefined,
|
|
63
|
+
onFocus: (0, _expValEquals.expValEquals)('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? onClickCallback : undefined,
|
|
64
|
+
tabIndex: (0, _expValEquals.expValEquals)('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? 0 : undefined
|
|
62
65
|
}, (0, _react2.jsx)(_tooltip.default, {
|
|
63
66
|
content: intl.formatMessage(_extensions.configPanelMessages.removeField),
|
|
64
67
|
position: "left"
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import React, { useCallback, useEffect, useRef } from 'react';
|
|
4
|
+
import { bind } from 'bind-event-listener';
|
|
4
5
|
import _isEqual from 'lodash/isEqual';
|
|
5
6
|
import _mergeRecursive from 'lodash/merge';
|
|
6
7
|
import memoizeOne from 'memoize-one';
|
|
7
8
|
import { injectIntl } from 'react-intl-next';
|
|
8
9
|
import { withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
10
|
+
import { getDocument } from '@atlaskit/browser-apis';
|
|
9
11
|
import ButtonGroup from '@atlaskit/button/button-group';
|
|
10
12
|
import Button from '@atlaskit/button/new';
|
|
11
13
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
@@ -13,6 +15,7 @@ import { isTabGroup, configPanelMessages as messages } from '@atlaskit/editor-co
|
|
|
13
15
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
14
16
|
import Form, { FormFooter } from '@atlaskit/form';
|
|
15
17
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
18
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
16
19
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
17
20
|
import { ALLOWED_LOGGED_MACRO_PARAMS } from './constants';
|
|
18
21
|
import { DescriptionSummary } from './DescriptionSummary';
|
|
@@ -292,6 +295,7 @@ class ConfigPanel extends React.Component {
|
|
|
292
295
|
firstVisibleFieldName: props.fields ? this.getFirstVisibleFieldName(props.fields) : undefined
|
|
293
296
|
};
|
|
294
297
|
this.onFieldChange = null;
|
|
298
|
+
this.unbindKeyDownHandler = null;
|
|
295
299
|
}
|
|
296
300
|
componentDidMount() {
|
|
297
301
|
const {
|
|
@@ -299,8 +303,18 @@ class ConfigPanel extends React.Component {
|
|
|
299
303
|
parameters
|
|
300
304
|
} = this.props;
|
|
301
305
|
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
|
+
}
|
|
314
|
+
}
|
|
302
315
|
}
|
|
303
316
|
componentWillUnmount() {
|
|
317
|
+
var _this$unbindKeyDownHa;
|
|
304
318
|
const {
|
|
305
319
|
createAnalyticsEvent,
|
|
306
320
|
extensionManifest,
|
|
@@ -309,6 +323,7 @@ class ConfigPanel extends React.Component {
|
|
|
309
323
|
const {
|
|
310
324
|
currentParameters
|
|
311
325
|
} = this.state;
|
|
326
|
+
(_this$unbindKeyDownHa = this.unbindKeyDownHandler) === null || _this$unbindKeyDownHa === void 0 ? void 0 : _this$unbindKeyDownHa.call(this);
|
|
312
327
|
fireAnalyticsEvent(createAnalyticsEvent)({
|
|
313
328
|
payload: {
|
|
314
329
|
action: ACTION.CLOSED,
|
|
@@ -395,32 +410,28 @@ class ConfigPanel extends React.Component {
|
|
|
395
410
|
handleSubmit: handleSubmit
|
|
396
411
|
}, onFieldChange => {
|
|
397
412
|
this.onFieldChange = onFieldChange;
|
|
398
|
-
return (
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
featureFlags: featureFlags,
|
|
421
|
-
disableFields: this.props.disableFields
|
|
422
|
-
}))
|
|
423
|
-
);
|
|
413
|
+
return /*#__PURE__*/React.createElement("form", _extends({}, formProps, {
|
|
414
|
+
noValidate: true,
|
|
415
|
+
onKeyDown: expValEquals('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? undefined : handleKeyDown,
|
|
416
|
+
"data-testid": "extension-config-panel"
|
|
417
|
+
}), this.renderHeader(extensionManifest), fg('platform_editor_ai_object_sidebar_injection') && /*#__PURE__*/React.createElement(DescriptionSummary, {
|
|
418
|
+
extensionManifest: extensionManifest
|
|
419
|
+
}), /*#__PURE__*/React.createElement(ConfigFormIntlWithBoundary, {
|
|
420
|
+
api: api,
|
|
421
|
+
canSave: false,
|
|
422
|
+
errorMessage: errorMessage,
|
|
423
|
+
extensionManifest: extensionManifest,
|
|
424
|
+
fields: fields !== null && fields !== void 0 ? fields : [],
|
|
425
|
+
firstVisibleFieldName: firstVisibleFieldName,
|
|
426
|
+
hasParsedParameters: hasParsedParameters,
|
|
427
|
+
isLoading: isLoading || false,
|
|
428
|
+
onCancel: onCancel,
|
|
429
|
+
onFieldChange: onFieldChange,
|
|
430
|
+
parameters: currentParameters,
|
|
431
|
+
submitting: submitting,
|
|
432
|
+
featureFlags: featureFlags,
|
|
433
|
+
disableFields: this.props.disableFields
|
|
434
|
+
}));
|
|
424
435
|
});
|
|
425
436
|
});
|
|
426
437
|
}
|
|
@@ -10,6 +10,7 @@ import { injectIntl } from 'react-intl-next';
|
|
|
10
10
|
import { configPanelMessages as messages } from '@atlaskit/editor-common/extensions';
|
|
11
11
|
import CrossCircleIcon from '@atlaskit/icon/core/cross-circle';
|
|
12
12
|
import { N80, R300 } from '@atlaskit/theme/colors';
|
|
13
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
13
14
|
import Tooltip from '@atlaskit/tooltip';
|
|
14
15
|
const removableFieldWrapperStyles = css({
|
|
15
16
|
position: 'relative',
|
|
@@ -44,12 +45,14 @@ const RemovableField = ({
|
|
|
44
45
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
45
46
|
,
|
|
46
47
|
className: className
|
|
47
|
-
}, children, canRemoveField &&
|
|
48
|
-
|
|
49
|
-
jsx("div", {
|
|
48
|
+
}, children, canRemoveField && jsx("div", {
|
|
49
|
+
role: expValEquals('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? 'button' : undefined,
|
|
50
50
|
css: removeButtonWrapperStyles,
|
|
51
51
|
"data-testid": `remove-field-${name}`,
|
|
52
|
-
onClick: onClickCallback
|
|
52
|
+
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
|
|
53
56
|
}, jsx(Tooltip, {
|
|
54
57
|
content: intl.formatMessage(messages.removeField),
|
|
55
58
|
position: "left"
|
|
@@ -12,11 +12,13 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
12
12
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
13
13
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
14
14
|
import React, { useCallback, useEffect, useRef } from 'react';
|
|
15
|
+
import { bind } from 'bind-event-listener';
|
|
15
16
|
import _isEqual from 'lodash/isEqual';
|
|
16
17
|
import _mergeRecursive from 'lodash/merge';
|
|
17
18
|
import memoizeOne from 'memoize-one';
|
|
18
19
|
import { injectIntl } from 'react-intl-next';
|
|
19
20
|
import { withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
21
|
+
import { getDocument } from '@atlaskit/browser-apis';
|
|
20
22
|
import ButtonGroup from '@atlaskit/button/button-group';
|
|
21
23
|
import Button from '@atlaskit/button/new';
|
|
22
24
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
@@ -24,6 +26,7 @@ import { isTabGroup, configPanelMessages as messages } from '@atlaskit/editor-co
|
|
|
24
26
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
25
27
|
import Form, { FormFooter } from '@atlaskit/form';
|
|
26
28
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
29
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
27
30
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
28
31
|
import { ALLOWED_LOGGED_MACRO_PARAMS } from './constants';
|
|
29
32
|
import { DescriptionSummary } from './DescriptionSummary';
|
|
@@ -345,6 +348,7 @@ var ConfigPanel = /*#__PURE__*/function (_React$Component) {
|
|
|
345
348
|
firstVisibleFieldName: props.fields ? _this.getFirstVisibleFieldName(props.fields) : undefined
|
|
346
349
|
};
|
|
347
350
|
_this.onFieldChange = null;
|
|
351
|
+
_this.unbindKeyDownHandler = null;
|
|
348
352
|
return _this;
|
|
349
353
|
}
|
|
350
354
|
_inherits(ConfigPanel, _React$Component);
|
|
@@ -355,15 +359,26 @@ var ConfigPanel = /*#__PURE__*/function (_React$Component) {
|
|
|
355
359
|
fields = _this$props3.fields,
|
|
356
360
|
parameters = _this$props3.parameters;
|
|
357
361
|
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
|
+
}
|
|
370
|
+
}
|
|
358
371
|
}
|
|
359
372
|
}, {
|
|
360
373
|
key: "componentWillUnmount",
|
|
361
374
|
value: function componentWillUnmount() {
|
|
375
|
+
var _this$unbindKeyDownHa;
|
|
362
376
|
var _this$props4 = this.props,
|
|
363
377
|
createAnalyticsEvent = _this$props4.createAnalyticsEvent,
|
|
364
378
|
extensionManifest = _this$props4.extensionManifest,
|
|
365
379
|
fields = _this$props4.fields;
|
|
366
380
|
var currentParameters = this.state.currentParameters;
|
|
381
|
+
(_this$unbindKeyDownHa = this.unbindKeyDownHandler) === null || _this$unbindKeyDownHa === void 0 || _this$unbindKeyDownHa.call(this);
|
|
367
382
|
fireAnalyticsEvent(createAnalyticsEvent)({
|
|
368
383
|
payload: {
|
|
369
384
|
action: ACTION.CLOSED,
|
|
@@ -447,32 +462,28 @@ var ConfigPanel = /*#__PURE__*/function (_React$Component) {
|
|
|
447
462
|
handleSubmit: handleSubmit
|
|
448
463
|
}, function (onFieldChange) {
|
|
449
464
|
_this2.onFieldChange = onFieldChange;
|
|
450
|
-
return (
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
featureFlags: featureFlags,
|
|
473
|
-
disableFields: _this2.props.disableFields
|
|
474
|
-
}))
|
|
475
|
-
);
|
|
465
|
+
return /*#__PURE__*/React.createElement("form", _extends({}, formProps, {
|
|
466
|
+
noValidate: true,
|
|
467
|
+
onKeyDown: expValEquals('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? undefined : handleKeyDown,
|
|
468
|
+
"data-testid": "extension-config-panel"
|
|
469
|
+
}), _this2.renderHeader(extensionManifest), fg('platform_editor_ai_object_sidebar_injection') && /*#__PURE__*/React.createElement(DescriptionSummary, {
|
|
470
|
+
extensionManifest: extensionManifest
|
|
471
|
+
}), /*#__PURE__*/React.createElement(ConfigFormIntlWithBoundary, {
|
|
472
|
+
api: api,
|
|
473
|
+
canSave: false,
|
|
474
|
+
errorMessage: errorMessage,
|
|
475
|
+
extensionManifest: extensionManifest,
|
|
476
|
+
fields: fields !== null && fields !== void 0 ? fields : [],
|
|
477
|
+
firstVisibleFieldName: firstVisibleFieldName,
|
|
478
|
+
hasParsedParameters: hasParsedParameters,
|
|
479
|
+
isLoading: isLoading || false,
|
|
480
|
+
onCancel: onCancel,
|
|
481
|
+
onFieldChange: onFieldChange,
|
|
482
|
+
parameters: currentParameters,
|
|
483
|
+
submitting: submitting,
|
|
484
|
+
featureFlags: featureFlags,
|
|
485
|
+
disableFields: _this2.props.disableFields
|
|
486
|
+
}));
|
|
476
487
|
});
|
|
477
488
|
});
|
|
478
489
|
}
|
|
@@ -10,6 +10,7 @@ import { injectIntl } from 'react-intl-next';
|
|
|
10
10
|
import { configPanelMessages as messages } from '@atlaskit/editor-common/extensions';
|
|
11
11
|
import CrossCircleIcon from '@atlaskit/icon/core/cross-circle';
|
|
12
12
|
import { N80, R300 } from '@atlaskit/theme/colors';
|
|
13
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
13
14
|
import Tooltip from '@atlaskit/tooltip';
|
|
14
15
|
var removableFieldWrapperStyles = css({
|
|
15
16
|
position: 'relative',
|
|
@@ -45,12 +46,14 @@ var RemovableField = function RemovableField(_ref) {
|
|
|
45
46
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
46
47
|
,
|
|
47
48
|
className: className
|
|
48
|
-
}, children, canRemoveField &&
|
|
49
|
-
|
|
50
|
-
jsx("div", {
|
|
49
|
+
}, children, canRemoveField && jsx("div", {
|
|
50
|
+
role: expValEquals('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? 'button' : undefined,
|
|
51
51
|
css: removeButtonWrapperStyles,
|
|
52
52
|
"data-testid": "remove-field-".concat(name),
|
|
53
|
-
onClick: onClickCallback
|
|
53
|
+
onClick: onClickCallback,
|
|
54
|
+
onKeyDown: expValEquals('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? onClickCallback : undefined,
|
|
55
|
+
onFocus: expValEquals('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? onClickCallback : undefined,
|
|
56
|
+
tabIndex: expValEquals('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? 0 : undefined
|
|
54
57
|
}, jsx(Tooltip, {
|
|
55
58
|
content: intl.formatMessage(messages.removeField),
|
|
56
59
|
position: "left"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-extension",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.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",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"@atlaskit/adf-utils": "^19.27.0",
|
|
26
26
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
27
27
|
"@atlaskit/avatar": "^25.8.0",
|
|
28
|
+
"@atlaskit/browser-apis": "^0.0.1",
|
|
28
29
|
"@atlaskit/button": "^23.9.0",
|
|
29
30
|
"@atlaskit/checkbox": "^17.3.0",
|
|
30
31
|
"@atlaskit/datetime-picker": "^17.5.0",
|
|
@@ -45,7 +46,7 @@
|
|
|
45
46
|
"@atlaskit/heading": "^5.3.0",
|
|
46
47
|
"@atlaskit/icon": "^31.0.0",
|
|
47
48
|
"@atlaskit/link": "^3.3.0",
|
|
48
|
-
"@atlaskit/mention": "^24.
|
|
49
|
+
"@atlaskit/mention": "^24.5.0",
|
|
49
50
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
50
51
|
"@atlaskit/primitives": "^18.0.0",
|
|
51
52
|
"@atlaskit/radio": "^8.4.0",
|
|
@@ -57,7 +58,7 @@
|
|
|
57
58
|
"@atlaskit/textarea": "^8.2.0",
|
|
58
59
|
"@atlaskit/textfield": "^8.2.0",
|
|
59
60
|
"@atlaskit/theme": "^21.0.0",
|
|
60
|
-
"@atlaskit/tmp-editor-statsig": "^29.
|
|
61
|
+
"@atlaskit/tmp-editor-statsig": "^29.3.0",
|
|
61
62
|
"@atlaskit/toggle": "^15.2.0",
|
|
62
63
|
"@atlaskit/tokens": "^11.0.0",
|
|
63
64
|
"@atlaskit/tooltip": "^20.14.0",
|
|
@@ -71,7 +72,7 @@
|
|
|
71
72
|
"uuid": "^3.1.0"
|
|
72
73
|
},
|
|
73
74
|
"peerDependencies": {
|
|
74
|
-
"@atlaskit/editor-common": "^111.
|
|
75
|
+
"@atlaskit/editor-common": "^111.18.0",
|
|
75
76
|
"react": "^18.2.0",
|
|
76
77
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
77
78
|
},
|