@atlaskit/editor-plugin-extension 11.0.11 → 11.0.13
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 +12 -0
- package/dist/cjs/pm-plugins/utils.js +1 -0
- package/dist/cjs/ui/ConfigPanel/ConfigPanelFieldsLoader.js +1 -0
- package/dist/cjs/ui/ConfigPanel/ErrorMessage/index.js +3 -1
- package/dist/cjs/ui/ConfigPanel/Fields/Boolean.js +10 -3
- package/dist/cjs/ui/ConfigPanel/Fields/CheckboxGroup.js +3 -1
- package/dist/cjs/ui/ConfigPanel/Fields/ColorPicker.js +7 -3
- package/dist/cjs/ui/ConfigPanel/Fields/CustomSelect.js +13 -4
- package/dist/cjs/ui/ConfigPanel/Fields/Date.js +9 -3
- package/dist/cjs/ui/ConfigPanel/Fields/DateRange.js +10 -3
- package/dist/cjs/ui/ConfigPanel/Fields/Expand.js +6 -2
- package/dist/cjs/ui/ConfigPanel/Fields/Fieldset.js +9 -3
- package/dist/cjs/ui/ConfigPanel/Fields/Number.js +3 -1
- package/dist/cjs/ui/ConfigPanel/Fields/RadioGroup.js +6 -2
- package/dist/cjs/ui/ConfigPanel/Fields/Select.js +4 -1
- package/dist/cjs/ui/ConfigPanel/Fields/String.js +10 -3
- package/dist/cjs/ui/ConfigPanel/Fields/UserSelect.js +6 -2
- package/dist/cjs/ui/context-panel.js +6 -2
- package/dist/cjs/ui/useConfigPanelPluginHook.js +6 -2
- package/dist/es2019/pm-plugins/utils.js +1 -0
- package/dist/es2019/ui/ConfigPanel/ConfigPanelFieldsLoader.js +1 -0
- package/dist/es2019/ui/ConfigPanel/ErrorMessage/index.js +3 -1
- package/dist/es2019/ui/ConfigPanel/Fields/Boolean.js +10 -3
- package/dist/es2019/ui/ConfigPanel/Fields/CheckboxGroup.js +3 -1
- package/dist/es2019/ui/ConfigPanel/Fields/ColorPicker.js +7 -3
- package/dist/es2019/ui/ConfigPanel/Fields/CustomSelect.js +13 -4
- package/dist/es2019/ui/ConfigPanel/Fields/Date.js +9 -3
- package/dist/es2019/ui/ConfigPanel/Fields/DateRange.js +10 -3
- package/dist/es2019/ui/ConfigPanel/Fields/Expand.js +6 -2
- package/dist/es2019/ui/ConfigPanel/Fields/Fieldset.js +9 -3
- package/dist/es2019/ui/ConfigPanel/Fields/Number.js +3 -1
- package/dist/es2019/ui/ConfigPanel/Fields/RadioGroup.js +6 -2
- package/dist/es2019/ui/ConfigPanel/Fields/Select.js +4 -1
- package/dist/es2019/ui/ConfigPanel/Fields/String.js +10 -3
- package/dist/es2019/ui/ConfigPanel/Fields/UserSelect.js +6 -2
- package/dist/es2019/ui/context-panel.js +6 -2
- package/dist/es2019/ui/useConfigPanelPluginHook.js +6 -2
- package/dist/esm/pm-plugins/utils.js +1 -0
- package/dist/esm/ui/ConfigPanel/ConfigPanelFieldsLoader.js +1 -0
- package/dist/esm/ui/ConfigPanel/ErrorMessage/index.js +3 -1
- package/dist/esm/ui/ConfigPanel/Fields/Boolean.js +10 -3
- package/dist/esm/ui/ConfigPanel/Fields/CheckboxGroup.js +3 -1
- package/dist/esm/ui/ConfigPanel/Fields/ColorPicker.js +7 -3
- package/dist/esm/ui/ConfigPanel/Fields/CustomSelect.js +13 -4
- package/dist/esm/ui/ConfigPanel/Fields/Date.js +9 -3
- package/dist/esm/ui/ConfigPanel/Fields/DateRange.js +10 -3
- package/dist/esm/ui/ConfigPanel/Fields/Expand.js +6 -2
- package/dist/esm/ui/ConfigPanel/Fields/Fieldset.js +9 -3
- package/dist/esm/ui/ConfigPanel/Fields/Number.js +3 -1
- package/dist/esm/ui/ConfigPanel/Fields/RadioGroup.js +6 -2
- package/dist/esm/ui/ConfigPanel/Fields/Select.js +4 -1
- package/dist/esm/ui/ConfigPanel/Fields/String.js +10 -3
- package/dist/esm/ui/ConfigPanel/Fields/UserSelect.js +6 -2
- package/dist/esm/ui/context-panel.js +6 -2
- package/dist/esm/ui/useConfigPanelPluginHook.js +6 -2
- package/example-utils/config-panel/ConfigPanelWithExtensionPicker.tsx +4 -0
- package/example-utils/config-panel/ConfigPanelWithProviders.tsx +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -177,6 +177,7 @@ var resolveMentionsInText = /*#__PURE__*/function () {
|
|
|
177
177
|
return mentionProvider.resolveMentionName(id);
|
|
178
178
|
case 11:
|
|
179
179
|
mention = _context.sent;
|
|
180
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-expensive-split-replace -- Ignored via go/ees017 (to be fixed)
|
|
180
181
|
resolvedText = resolvedText.replace("@".concat(id), "@".concat(mention.name) || '@…');
|
|
181
182
|
case 13:
|
|
182
183
|
_context.next = 7;
|
|
@@ -70,6 +70,7 @@ var FieldDefinitionsPromiseResolver = function FieldDefinitionsPromiseResolver(p
|
|
|
70
70
|
}
|
|
71
71
|
var promiseFn = getFieldsDefinitionFn(extensionManifest, nodeKey);
|
|
72
72
|
if (typeof promiseFn !== 'function') {
|
|
73
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-chain-state-updates -- Ignored via go/ees017 (to be fixed)
|
|
73
74
|
setFields(undefined);
|
|
74
75
|
return;
|
|
75
76
|
}
|
|
@@ -15,7 +15,9 @@ var ConfigPanelErrorMessage = function ConfigPanelErrorMessage(_ref) {
|
|
|
15
15
|
intl = _ref.intl;
|
|
16
16
|
return /*#__PURE__*/_react.default.createElement(_emptyState.default, {
|
|
17
17
|
header: intl.formatMessage(_extensions.configPanelMessages.configFailedToLoad),
|
|
18
|
-
description: errorMessage
|
|
18
|
+
description: errorMessage
|
|
19
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
20
|
+
,
|
|
19
21
|
renderImage: function renderImage() {
|
|
20
22
|
return /*#__PURE__*/_react.default.createElement(_ErrorImage.default, null);
|
|
21
23
|
},
|
|
@@ -67,7 +67,9 @@ function Checkbox(_ref) {
|
|
|
67
67
|
isDisabled = field.isDisabled;
|
|
68
68
|
return (0, _react2.jsx)(_form.Field, {
|
|
69
69
|
name: name,
|
|
70
|
-
isRequired: isRequired
|
|
70
|
+
isRequired: isRequired
|
|
71
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
72
|
+
,
|
|
71
73
|
validate: function validate(value) {
|
|
72
74
|
return _validate(value, isRequired);
|
|
73
75
|
},
|
|
@@ -82,7 +84,9 @@ function Checkbox(_ref) {
|
|
|
82
84
|
// Ignored via go/ees005
|
|
83
85
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
84
86
|
, (0, _extends2.default)({}, restFieldProps, {
|
|
85
|
-
label: label
|
|
87
|
+
label: label
|
|
88
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
89
|
+
,
|
|
86
90
|
onChange: function onChange(event) {
|
|
87
91
|
return handleOnChange(fieldProps.onChange, onFieldChange, event);
|
|
88
92
|
},
|
|
@@ -106,7 +110,9 @@ function Toggle(_ref3) {
|
|
|
106
110
|
isDisabled = field.isDisabled;
|
|
107
111
|
return (0, _react2.jsx)(_form.Field, {
|
|
108
112
|
name: name,
|
|
109
|
-
isRequired: isRequired
|
|
113
|
+
isRequired: isRequired
|
|
114
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
115
|
+
,
|
|
110
116
|
validate: function validate(value) {
|
|
111
117
|
return _validate(value, isRequired);
|
|
112
118
|
},
|
|
@@ -133,6 +139,7 @@ function Toggle(_ref3) {
|
|
|
133
139
|
// Ignored via go/ees005
|
|
134
140
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
135
141
|
, (0, _extends2.default)({}, restFieldProps, {
|
|
142
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
136
143
|
onChange: function onChange(event) {
|
|
137
144
|
return handleOnChange(fieldProps.onChange, onFieldChange, event);
|
|
138
145
|
},
|
|
@@ -96,7 +96,9 @@ function CheckboxGroup(_ref3) {
|
|
|
96
96
|
return (0, _react2.jsx)(_form.Field, {
|
|
97
97
|
name: name,
|
|
98
98
|
isRequired: isRequired,
|
|
99
|
-
defaultValue: defaultValue
|
|
99
|
+
defaultValue: defaultValue
|
|
100
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
101
|
+
,
|
|
100
102
|
validate: function validate(value) {
|
|
101
103
|
return _validate(value, isRequired);
|
|
102
104
|
},
|
|
@@ -357,7 +357,9 @@ var ColorPicker = function ColorPicker(props) {
|
|
|
357
357
|
paletteColorTooltipMessages: _uiColor.chartsColorPaletteTooltipMessages,
|
|
358
358
|
cols: EXPANDED_COLOR_PICKER_COLUMNS,
|
|
359
359
|
alignX: "right",
|
|
360
|
-
placement: "ConfigPanel"
|
|
360
|
+
placement: "ConfigPanel"
|
|
361
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
362
|
+
,
|
|
361
363
|
size: {
|
|
362
364
|
width: "var(--ds-space-300, 24px)",
|
|
363
365
|
height: "var(--ds-space-300, 24px)"
|
|
@@ -365,7 +367,7 @@ var ColorPicker = function ColorPicker(props) {
|
|
|
365
367
|
/* ED-18288 We align the palette to the right edge which is 1.5rem spacing away to avoid
|
|
366
368
|
excess overflow on left. Additional 1 is to mitigate 1px added by floating toolbar. */
|
|
367
369
|
// Disabling design token check as this is a calculated value
|
|
368
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
370
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
369
371
|
,
|
|
370
372
|
absoluteOffset: {
|
|
371
373
|
right: Number(-1.5 * getCurrentRemSize() - 1)
|
|
@@ -385,7 +387,9 @@ var ColorPickerField = function ColorPickerField(_ref) {
|
|
|
385
387
|
name: name,
|
|
386
388
|
isRequired: isRequired,
|
|
387
389
|
defaultValue: defaultValue,
|
|
388
|
-
testId: "config-panel-color-picker-".concat(name)
|
|
390
|
+
testId: "config-panel-color-picker-".concat(name)
|
|
391
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
392
|
+
,
|
|
389
393
|
validate: function validate(value) {
|
|
390
394
|
return (0, _utils.validate)(field, value || '');
|
|
391
395
|
},
|
|
@@ -144,7 +144,9 @@ function CustomSelect(_ref2) {
|
|
|
144
144
|
name: name,
|
|
145
145
|
label: label,
|
|
146
146
|
isRequired: isRequired,
|
|
147
|
-
defaultValue: defaultValue
|
|
147
|
+
defaultValue: defaultValue
|
|
148
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
149
|
+
,
|
|
148
150
|
validate: function validate(value) {
|
|
149
151
|
return (0, _utils.validate)(field, value);
|
|
150
152
|
},
|
|
@@ -157,6 +159,7 @@ function CustomSelect(_ref2) {
|
|
|
157
159
|
// Ignored via go/ees005
|
|
158
160
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
159
161
|
, (0, _extends2.default)({}, fieldProps, {
|
|
162
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
160
163
|
onChange: function onChange(value) {
|
|
161
164
|
fieldProps.onChange(value);
|
|
162
165
|
// We assume onChange is called whenever values actually changed
|
|
@@ -166,16 +169,22 @@ function CustomSelect(_ref2) {
|
|
|
166
169
|
// add type cast to avoid adding a "IsMulti" generic prop (TODO: ED-12072)
|
|
167
170
|
,
|
|
168
171
|
isMulti: isMultiple || false,
|
|
169
|
-
isClearable: true
|
|
172
|
+
isClearable: true
|
|
173
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
174
|
+
,
|
|
170
175
|
isValidNewOption: function isValidNewOption(value) {
|
|
171
176
|
return !!(isCreatable && value);
|
|
172
177
|
},
|
|
173
178
|
validationState: error ? 'error' : 'default',
|
|
174
|
-
defaultOptions: defaultOptions
|
|
179
|
+
defaultOptions: defaultOptions
|
|
180
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
181
|
+
,
|
|
175
182
|
formatCreateLabel: function formatCreateLabel(value) {
|
|
176
183
|
return customFormatCreateLabel ? customFormatCreateLabel(value) : _formatCreateLabel(value);
|
|
177
184
|
},
|
|
178
|
-
formatOptionLabel: _SelectItem.formatOptionLabel
|
|
185
|
+
formatOptionLabel: _SelectItem.formatOptionLabel
|
|
186
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
187
|
+
,
|
|
179
188
|
loadOptions: function loadOptions(searchTerm) {
|
|
180
189
|
return resolver(searchTerm, fieldDefaultValue, parameters);
|
|
181
190
|
},
|
|
@@ -28,7 +28,9 @@ function Date(_ref) {
|
|
|
28
28
|
name: name,
|
|
29
29
|
label: label,
|
|
30
30
|
defaultValue: defaultValue,
|
|
31
|
-
isRequired: isRequired
|
|
31
|
+
isRequired: isRequired
|
|
32
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
33
|
+
,
|
|
32
34
|
validate: function validate(value) {
|
|
33
35
|
return (0, _utils.validate)(field, value);
|
|
34
36
|
},
|
|
@@ -41,10 +43,14 @@ function Date(_ref) {
|
|
|
41
43
|
// Ignored via go/ees005
|
|
42
44
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
43
45
|
, (0, _extends2.default)({}, fieldProps, {
|
|
44
|
-
autoFocus: autoFocus
|
|
46
|
+
autoFocus: autoFocus
|
|
47
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
48
|
+
,
|
|
45
49
|
onBlur: function onBlur() {
|
|
46
50
|
fieldProps.onBlur();
|
|
47
|
-
}
|
|
51
|
+
}
|
|
52
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
53
|
+
,
|
|
48
54
|
onChange: function onChange(value) {
|
|
49
55
|
fieldProps.onChange(value);
|
|
50
56
|
onFieldChange(name, true);
|
|
@@ -55,7 +55,9 @@ var DateField = function DateField(_ref) {
|
|
|
55
55
|
name: "".concat(scope, ".").concat(fieldName),
|
|
56
56
|
label: intl.formatMessage(_extensions.configPanelMessages[fieldName]),
|
|
57
57
|
defaultValue: getFromDefaultValue(parentField, fieldName),
|
|
58
|
-
isRequired: isRequired
|
|
58
|
+
isRequired: isRequired
|
|
59
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
60
|
+
,
|
|
59
61
|
validate: function validate(value) {
|
|
60
62
|
return (0, _utils.validateRequired)({
|
|
61
63
|
isRequired: isRequired
|
|
@@ -69,6 +71,7 @@ var DateField = function DateField(_ref) {
|
|
|
69
71
|
// Ignored via go/ees005
|
|
70
72
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
71
73
|
, (0, _extends2.default)({}, fieldProps, {
|
|
74
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
72
75
|
onChange: function onChange(date) {
|
|
73
76
|
fieldProps.onChange(date);
|
|
74
77
|
onFieldChange(parentField.name, true);
|
|
@@ -122,7 +125,9 @@ var DateRange = function DateRange(_ref3) {
|
|
|
122
125
|
name: "".concat(name, ".value"),
|
|
123
126
|
label: field.label,
|
|
124
127
|
defaultValue: currentValue,
|
|
125
|
-
isRequired: field.isRequired
|
|
128
|
+
isRequired: field.isRequired
|
|
129
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
130
|
+
,
|
|
126
131
|
validate: function validate(value) {
|
|
127
132
|
return (0, _utils.validate)(field, value || '');
|
|
128
133
|
},
|
|
@@ -135,7 +140,9 @@ var DateRange = function DateRange(_ref3) {
|
|
|
135
140
|
// Ignored via go/ees005
|
|
136
141
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
137
142
|
, (0, _extends2.default)({}, fieldProps, {
|
|
138
|
-
options: items
|
|
143
|
+
options: items
|
|
144
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
145
|
+
,
|
|
139
146
|
onChange: function onChange(event) {
|
|
140
147
|
fieldProps.onChange(event.target.value);
|
|
141
148
|
setCurrentValue(event.target.value);
|
|
@@ -74,12 +74,16 @@ function Expand(_ref) {
|
|
|
74
74
|
css: labelContainerStyles
|
|
75
75
|
}, field.label), (0, _react2.jsx)("div", {
|
|
76
76
|
css: chevronContainerStyles
|
|
77
|
-
}, (0, _react2.jsx)(_new.IconButton
|
|
77
|
+
}, (0, _react2.jsx)(_new.IconButton
|
|
78
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
79
|
+
, {
|
|
78
80
|
onClick: function onClick() {
|
|
79
81
|
setExpanded(!expanded);
|
|
80
82
|
},
|
|
81
83
|
label: intl.formatMessage(expanded ? _extensions.configPanelMessages.collapse : _extensions.configPanelMessages.expand),
|
|
82
|
-
testId: "form-expand-toggle"
|
|
84
|
+
testId: "form-expand-toggle"
|
|
85
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
86
|
+
,
|
|
83
87
|
icon: function icon(iconProps) {
|
|
84
88
|
return expanded ? (0, _react2.jsx)(_chevronDown.default, {
|
|
85
89
|
label: iconProps.label,
|
|
@@ -194,7 +194,9 @@ var FieldsetField = /*#__PURE__*/function (_React$Component) {
|
|
|
194
194
|
defaultMenuIsOpen: true,
|
|
195
195
|
autoFocus: true,
|
|
196
196
|
placeholder: intl.formatMessage(_extensions.configPanelMessages.addField),
|
|
197
|
-
options: selectOptions
|
|
197
|
+
options: selectOptions
|
|
198
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
199
|
+
,
|
|
198
200
|
onChange: function onChange(option) {
|
|
199
201
|
if (option) {
|
|
200
202
|
_this.onSelectItem(option);
|
|
@@ -202,7 +204,9 @@ var FieldsetField = /*#__PURE__*/function (_React$Component) {
|
|
|
202
204
|
}
|
|
203
205
|
}) : (0, _react2.jsx)(_new.default, {
|
|
204
206
|
testId: "add-more",
|
|
205
|
-
appearance: "subtle"
|
|
207
|
+
appearance: "subtle"
|
|
208
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
209
|
+
,
|
|
206
210
|
iconBefore: function iconBefore(iconProps) {
|
|
207
211
|
return (0, _react2.jsx)(_add.default
|
|
208
212
|
// Ignored via go/ees005
|
|
@@ -211,7 +215,9 @@ var FieldsetField = /*#__PURE__*/function (_React$Component) {
|
|
|
211
215
|
spacing: "none",
|
|
212
216
|
label: intl.formatMessage(_extensions.configPanelMessages.addField)
|
|
213
217
|
}));
|
|
214
|
-
}
|
|
218
|
+
}
|
|
219
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
220
|
+
,
|
|
215
221
|
onClick: function onClick() {
|
|
216
222
|
return _this.setIsAdding(true);
|
|
217
223
|
}
|
|
@@ -53,7 +53,9 @@ function Number(_ref) {
|
|
|
53
53
|
// Ignored via go/ees005
|
|
54
54
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
55
55
|
, (0, _extends2.default)({}, fieldProps, {
|
|
56
|
-
autoFocus: autoFocus
|
|
56
|
+
autoFocus: autoFocus
|
|
57
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
58
|
+
,
|
|
57
59
|
onBlur: function onBlur() {
|
|
58
60
|
fieldProps.onBlur();
|
|
59
61
|
onFieldChange(name, meta.dirty);
|
|
@@ -30,7 +30,9 @@ function RadioField(_ref) {
|
|
|
30
30
|
name: name,
|
|
31
31
|
label: field.label,
|
|
32
32
|
defaultValue: field.defaultValue,
|
|
33
|
-
isRequired: field.isRequired
|
|
33
|
+
isRequired: field.isRequired
|
|
34
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
35
|
+
,
|
|
34
36
|
validate: function validate(value) {
|
|
35
37
|
return (0, _utils.validate)(field, value);
|
|
36
38
|
},
|
|
@@ -47,7 +49,9 @@ function RadioField(_ref) {
|
|
|
47
49
|
return _objectSpread(_objectSpread({}, option), {}, {
|
|
48
50
|
name: field.name
|
|
49
51
|
});
|
|
50
|
-
})
|
|
52
|
+
})
|
|
53
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
54
|
+
,
|
|
51
55
|
onChange: function onChange(value) {
|
|
52
56
|
fieldProps.onChange(value);
|
|
53
57
|
onFieldChange(field.name, true);
|
|
@@ -32,7 +32,9 @@ function SelectField(_ref) {
|
|
|
32
32
|
label: field.label,
|
|
33
33
|
defaultValue: (0, _utils.getOptionFromValue)(field.items, field.defaultValue),
|
|
34
34
|
testId: "config-panel-select-".concat(name),
|
|
35
|
-
isRequired: field.isRequired
|
|
35
|
+
isRequired: field.isRequired
|
|
36
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
37
|
+
,
|
|
36
38
|
validate: function validate(value) {
|
|
37
39
|
// Ignored via go/ees005
|
|
38
40
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -50,6 +52,7 @@ function SelectField(_ref) {
|
|
|
50
52
|
inputId: fieldProps.id,
|
|
51
53
|
id: undefined
|
|
52
54
|
}), {
|
|
55
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
53
56
|
onChange: function onChange(value) {
|
|
54
57
|
fieldProps.onChange(value);
|
|
55
58
|
onFieldChange(name, true);
|
|
@@ -31,7 +31,9 @@ function String(_ref) {
|
|
|
31
31
|
name: name,
|
|
32
32
|
label: label,
|
|
33
33
|
defaultValue: defaultValue || '',
|
|
34
|
-
isRequired: isRequired
|
|
34
|
+
isRequired: isRequired
|
|
35
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
36
|
+
,
|
|
35
37
|
validate: function validate(value) {
|
|
36
38
|
return (0, _utils.validate)(field, value || '');
|
|
37
39
|
},
|
|
@@ -49,9 +51,12 @@ function String(_ref) {
|
|
|
49
51
|
// Ignored via go/ees005
|
|
50
52
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
51
53
|
, (0, _extends2.default)({}, restFieldProps, options, {
|
|
54
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
52
55
|
onChange: function onChange(e) {
|
|
53
56
|
return _onChange(e.currentTarget.value);
|
|
54
|
-
}
|
|
57
|
+
}
|
|
58
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
59
|
+
,
|
|
55
60
|
onBlur: function onBlur() {
|
|
56
61
|
fieldProps.onBlur();
|
|
57
62
|
onFieldChange(name, meta.dirty);
|
|
@@ -68,7 +73,9 @@ function String(_ref) {
|
|
|
68
73
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
69
74
|
, (0, _extends2.default)({}, fieldProps, {
|
|
70
75
|
type: "text",
|
|
71
|
-
autoFocus: autoFocus
|
|
76
|
+
autoFocus: autoFocus
|
|
77
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
78
|
+
,
|
|
72
79
|
onBlur: function onBlur() {
|
|
73
80
|
fieldProps.onBlur();
|
|
74
81
|
onFieldChange(name, meta.dirty);
|
|
@@ -234,7 +234,9 @@ function UserSelect(_ref2) {
|
|
|
234
234
|
name: name,
|
|
235
235
|
label: label,
|
|
236
236
|
isRequired: isRequired,
|
|
237
|
-
defaultValue: defaultValue
|
|
237
|
+
defaultValue: defaultValue
|
|
238
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
239
|
+
,
|
|
238
240
|
validate: function validate(value) {
|
|
239
241
|
return (0, _utils.validate)(field, value);
|
|
240
242
|
},
|
|
@@ -260,7 +262,9 @@ function UserSelect(_ref2) {
|
|
|
260
262
|
context: context,
|
|
261
263
|
field: field,
|
|
262
264
|
formFieldProps: fieldProps,
|
|
263
|
-
autoFocus: autoFocus || false
|
|
265
|
+
autoFocus: autoFocus || false
|
|
266
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
267
|
+
,
|
|
264
268
|
onBlur: function onBlur() {
|
|
265
269
|
return onFieldChange(name, meta.dirty);
|
|
266
270
|
},
|
|
@@ -94,7 +94,9 @@ var getContextPanel = exports.getContextPanel = function getContextPanel(getEdit
|
|
|
94
94
|
parameters: configParams,
|
|
95
95
|
extensionProvider: extensionProvider,
|
|
96
96
|
autoSaveTrigger: autoSaveResolve,
|
|
97
|
-
autoSaveReject: autoSaveReject
|
|
97
|
+
autoSaveReject: autoSaveReject
|
|
98
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
99
|
+
,
|
|
98
100
|
onChange: ( /*#__PURE__*/function () {
|
|
99
101
|
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(updatedParameters) {
|
|
100
102
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
@@ -116,7 +118,9 @@ var getContextPanel = exports.getContextPanel = function getContextPanel(getEdit
|
|
|
116
118
|
return function (_x) {
|
|
117
119
|
return _ref2.apply(this, arguments);
|
|
118
120
|
};
|
|
119
|
-
}())
|
|
121
|
+
}())
|
|
122
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
123
|
+
,
|
|
120
124
|
onCancel: /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
121
125
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
122
126
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -249,7 +249,9 @@ var getContextPanelBodyComponent = exports.getContextPanelBodyComponent = functi
|
|
|
249
249
|
parameters: configParams,
|
|
250
250
|
extensionProvider: extensionProvider,
|
|
251
251
|
autoSaveTrigger: autoSaveResolve,
|
|
252
|
-
autoSaveReject: autoSaveReject
|
|
252
|
+
autoSaveReject: autoSaveReject
|
|
253
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
254
|
+
,
|
|
253
255
|
onChange: ( /*#__PURE__*/function () {
|
|
254
256
|
var _ref6 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(updatedParameters) {
|
|
255
257
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
@@ -271,7 +273,9 @@ var getContextPanelBodyComponent = exports.getContextPanelBodyComponent = functi
|
|
|
271
273
|
return function (_x2) {
|
|
272
274
|
return _ref6.apply(this, arguments);
|
|
273
275
|
};
|
|
274
|
-
}())
|
|
276
|
+
}())
|
|
277
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
278
|
+
,
|
|
275
279
|
onCancel: function onCancel() {
|
|
276
280
|
return startClosingConfigPanel({
|
|
277
281
|
api: api,
|
|
@@ -135,6 +135,7 @@ const resolveMentionsInText = async (text, mentionSet, api) => {
|
|
|
135
135
|
let resolvedText = text;
|
|
136
136
|
for (const id of mentionSet) {
|
|
137
137
|
const mention = await mentionProvider.resolveMentionName(id);
|
|
138
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-expensive-split-replace -- Ignored via go/ees017 (to be fixed)
|
|
138
139
|
resolvedText = resolvedText.replace(`@${id}`, `@${mention.name}` || '@…');
|
|
139
140
|
}
|
|
140
141
|
return resolvedText;
|
|
@@ -58,6 +58,7 @@ const FieldDefinitionsPromiseResolver = props => {
|
|
|
58
58
|
}
|
|
59
59
|
const promiseFn = getFieldsDefinitionFn(extensionManifest, nodeKey);
|
|
60
60
|
if (typeof promiseFn !== 'function') {
|
|
61
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-chain-state-updates -- Ignored via go/ees017 (to be fixed)
|
|
61
62
|
setFields(undefined);
|
|
62
63
|
return;
|
|
63
64
|
}
|
|
@@ -9,7 +9,9 @@ const ConfigPanelErrorMessage = ({
|
|
|
9
9
|
}) => {
|
|
10
10
|
return /*#__PURE__*/React.createElement(EmptyState, {
|
|
11
11
|
header: intl.formatMessage(messages.configFailedToLoad),
|
|
12
|
-
description: errorMessage
|
|
12
|
+
description: errorMessage
|
|
13
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
14
|
+
,
|
|
13
15
|
renderImage: () => /*#__PURE__*/React.createElement(ErrorImage, null),
|
|
14
16
|
width: "narrow",
|
|
15
17
|
imageHeight: 80,
|
|
@@ -57,7 +57,9 @@ function Checkbox({
|
|
|
57
57
|
} = field;
|
|
58
58
|
return jsx(Field, {
|
|
59
59
|
name: name,
|
|
60
|
-
isRequired: isRequired
|
|
60
|
+
isRequired: isRequired
|
|
61
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
62
|
+
,
|
|
61
63
|
validate: value => validate(value, isRequired),
|
|
62
64
|
defaultValue: defaultValue,
|
|
63
65
|
isDisabled: isDisabled
|
|
@@ -73,7 +75,9 @@ function Checkbox({
|
|
|
73
75
|
// Ignored via go/ees005
|
|
74
76
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
75
77
|
, _extends({}, restFieldProps, {
|
|
76
|
-
label: label
|
|
78
|
+
label: label
|
|
79
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
80
|
+
,
|
|
77
81
|
onChange: event => handleOnChange(fieldProps.onChange, onFieldChange, event),
|
|
78
82
|
isChecked: parseBoolean(isChecked)
|
|
79
83
|
})), jsx(FieldMessages, {
|
|
@@ -96,7 +100,9 @@ function Toggle({
|
|
|
96
100
|
} = field;
|
|
97
101
|
return jsx(Field, {
|
|
98
102
|
name: name,
|
|
99
|
-
isRequired: isRequired
|
|
103
|
+
isRequired: isRequired
|
|
104
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
105
|
+
,
|
|
100
106
|
validate: value => validate(value, isRequired),
|
|
101
107
|
defaultValue: defaultValue,
|
|
102
108
|
testId: `config-panel-toggle-${name}`,
|
|
@@ -124,6 +130,7 @@ function Toggle({
|
|
|
124
130
|
// Ignored via go/ees005
|
|
125
131
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
126
132
|
, _extends({}, restFieldProps, {
|
|
133
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
127
134
|
onChange: event => handleOnChange(fieldProps.onChange, onFieldChange, event),
|
|
128
135
|
isChecked: parseBoolean(isChecked),
|
|
129
136
|
id: id
|
|
@@ -94,7 +94,9 @@ export default function CheckboxGroup({
|
|
|
94
94
|
return jsx(Field, {
|
|
95
95
|
name: name,
|
|
96
96
|
isRequired: isRequired,
|
|
97
|
-
defaultValue: defaultValue
|
|
97
|
+
defaultValue: defaultValue
|
|
98
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
99
|
+
,
|
|
98
100
|
validate: value => validate(value, isRequired),
|
|
99
101
|
isDisabled: isDisabled
|
|
100
102
|
}, props => {
|
|
@@ -351,7 +351,9 @@ const ColorPicker = props => {
|
|
|
351
351
|
paletteColorTooltipMessages: chartsColorPaletteTooltipMessages,
|
|
352
352
|
cols: EXPANDED_COLOR_PICKER_COLUMNS,
|
|
353
353
|
alignX: "right",
|
|
354
|
-
placement: "ConfigPanel"
|
|
354
|
+
placement: "ConfigPanel"
|
|
355
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
356
|
+
,
|
|
355
357
|
size: {
|
|
356
358
|
width: "var(--ds-space-300, 24px)",
|
|
357
359
|
height: "var(--ds-space-300, 24px)"
|
|
@@ -359,7 +361,7 @@ const ColorPicker = props => {
|
|
|
359
361
|
/* ED-18288 We align the palette to the right edge which is 1.5rem spacing away to avoid
|
|
360
362
|
excess overflow on left. Additional 1 is to mitigate 1px added by floating toolbar. */
|
|
361
363
|
// Disabling design token check as this is a calculated value
|
|
362
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
364
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
363
365
|
,
|
|
364
366
|
absoluteOffset: {
|
|
365
367
|
right: Number(-1.5 * getCurrentRemSize() - 1)
|
|
@@ -382,7 +384,9 @@ const ColorPickerField = ({
|
|
|
382
384
|
name: name,
|
|
383
385
|
isRequired: isRequired,
|
|
384
386
|
defaultValue: defaultValue,
|
|
385
|
-
testId: `config-panel-color-picker-${name}
|
|
387
|
+
testId: `config-panel-color-picker-${name}`
|
|
388
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
389
|
+
,
|
|
386
390
|
validate: value => validate(field, value || ''),
|
|
387
391
|
isDisabled: isDisabled
|
|
388
392
|
}, ({
|
|
@@ -95,7 +95,9 @@ function CustomSelect({
|
|
|
95
95
|
name: name,
|
|
96
96
|
label: label,
|
|
97
97
|
isRequired: isRequired,
|
|
98
|
-
defaultValue: defaultValue
|
|
98
|
+
defaultValue: defaultValue
|
|
99
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
100
|
+
,
|
|
99
101
|
validate: value => validate(field, value),
|
|
100
102
|
testId: `config-panel-custom-select-${name}`,
|
|
101
103
|
isDisabled: isDisabled
|
|
@@ -106,6 +108,7 @@ function CustomSelect({
|
|
|
106
108
|
// Ignored via go/ees005
|
|
107
109
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
108
110
|
, _extends({}, fieldProps, {
|
|
111
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
109
112
|
onChange: value => {
|
|
110
113
|
fieldProps.onChange(value);
|
|
111
114
|
// We assume onChange is called whenever values actually changed
|
|
@@ -115,12 +118,18 @@ function CustomSelect({
|
|
|
115
118
|
// add type cast to avoid adding a "IsMulti" generic prop (TODO: ED-12072)
|
|
116
119
|
,
|
|
117
120
|
isMulti: isMultiple || false,
|
|
118
|
-
isClearable: true
|
|
121
|
+
isClearable: true
|
|
122
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
123
|
+
,
|
|
119
124
|
isValidNewOption: value => !!(isCreatable && value),
|
|
120
125
|
validationState: error ? 'error' : 'default',
|
|
121
|
-
defaultOptions: defaultOptions
|
|
126
|
+
defaultOptions: defaultOptions
|
|
127
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
128
|
+
,
|
|
122
129
|
formatCreateLabel: value => customFormatCreateLabel ? customFormatCreateLabel(value) : formatCreateLabel(value),
|
|
123
|
-
formatOptionLabel: formatOptionLabel
|
|
130
|
+
formatOptionLabel: formatOptionLabel
|
|
131
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
132
|
+
,
|
|
124
133
|
loadOptions: searchTerm => {
|
|
125
134
|
return resolver(searchTerm, fieldDefaultValue, parameters);
|
|
126
135
|
},
|
|
@@ -24,7 +24,9 @@ function Date({
|
|
|
24
24
|
name: name,
|
|
25
25
|
label: label,
|
|
26
26
|
defaultValue: defaultValue,
|
|
27
|
-
isRequired: isRequired
|
|
27
|
+
isRequired: isRequired
|
|
28
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
29
|
+
,
|
|
28
30
|
validate: value => validate(field, value),
|
|
29
31
|
testId: `config-panel-date-picker-${name}`,
|
|
30
32
|
isDisabled: isDisabled
|
|
@@ -36,10 +38,14 @@ function Date({
|
|
|
36
38
|
// Ignored via go/ees005
|
|
37
39
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
38
40
|
, _extends({}, fieldProps, {
|
|
39
|
-
autoFocus: autoFocus
|
|
41
|
+
autoFocus: autoFocus
|
|
42
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
43
|
+
,
|
|
40
44
|
onBlur: () => {
|
|
41
45
|
fieldProps.onBlur();
|
|
42
|
-
}
|
|
46
|
+
}
|
|
47
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
48
|
+
,
|
|
43
49
|
onChange: value => {
|
|
44
50
|
fieldProps.onChange(value);
|
|
45
51
|
onFieldChange(name, true);
|