@atlaskit/editor-plugin-extension 11.0.11 → 11.0.12
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 +6 -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 +2 -2
|
@@ -46,7 +46,9 @@ const DateField = ({
|
|
|
46
46
|
name: `${scope}.${fieldName}`,
|
|
47
47
|
label: intl.formatMessage(messages[fieldName]),
|
|
48
48
|
defaultValue: getFromDefaultValue(parentField, fieldName),
|
|
49
|
-
isRequired: isRequired
|
|
49
|
+
isRequired: isRequired
|
|
50
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
51
|
+
,
|
|
50
52
|
validate: value => {
|
|
51
53
|
return validateRequired({
|
|
52
54
|
isRequired
|
|
@@ -60,6 +62,7 @@ const DateField = ({
|
|
|
60
62
|
// Ignored via go/ees005
|
|
61
63
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
62
64
|
, _extends({}, fieldProps, {
|
|
65
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
63
66
|
onChange: date => {
|
|
64
67
|
fieldProps.onChange(date);
|
|
65
68
|
onFieldChange(parentField.name, true);
|
|
@@ -107,7 +110,9 @@ const DateRange = function ({
|
|
|
107
110
|
name: `${name}.value`,
|
|
108
111
|
label: field.label,
|
|
109
112
|
defaultValue: currentValue,
|
|
110
|
-
isRequired: field.isRequired
|
|
113
|
+
isRequired: field.isRequired
|
|
114
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
115
|
+
,
|
|
111
116
|
validate: value => validate(field, value || ''),
|
|
112
117
|
testId: `config-panel-date-range-${name}`,
|
|
113
118
|
isDisabled: field.isDisabled
|
|
@@ -118,7 +123,9 @@ const DateRange = function ({
|
|
|
118
123
|
// Ignored via go/ees005
|
|
119
124
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
120
125
|
, _extends({}, fieldProps, {
|
|
121
|
-
options: items
|
|
126
|
+
options: items
|
|
127
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
128
|
+
,
|
|
122
129
|
onChange: event => {
|
|
123
130
|
fieldProps.onChange(event.target.value);
|
|
124
131
|
setCurrentValue(event.target.value);
|
|
@@ -60,12 +60,16 @@ function Expand({
|
|
|
60
60
|
css: labelContainerStyles
|
|
61
61
|
}, field.label), jsx("div", {
|
|
62
62
|
css: chevronContainerStyles
|
|
63
|
-
}, jsx(IconButton
|
|
63
|
+
}, jsx(IconButton
|
|
64
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
65
|
+
, {
|
|
64
66
|
onClick: () => {
|
|
65
67
|
setExpanded(!expanded);
|
|
66
68
|
},
|
|
67
69
|
label: intl.formatMessage(expanded ? messages.collapse : messages.expand),
|
|
68
|
-
testId: "form-expand-toggle"
|
|
70
|
+
testId: "form-expand-toggle"
|
|
71
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
72
|
+
,
|
|
69
73
|
icon: iconProps => expanded ? jsx(ChevronDownIcon, {
|
|
70
74
|
label: iconProps.label,
|
|
71
75
|
size: "small"
|
|
@@ -159,7 +159,9 @@ class FieldsetField extends React.Component {
|
|
|
159
159
|
defaultMenuIsOpen: true,
|
|
160
160
|
autoFocus: true,
|
|
161
161
|
placeholder: intl.formatMessage(messages.addField),
|
|
162
|
-
options: selectOptions
|
|
162
|
+
options: selectOptions
|
|
163
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
164
|
+
,
|
|
163
165
|
onChange: option => {
|
|
164
166
|
if (option) {
|
|
165
167
|
this.onSelectItem(option);
|
|
@@ -167,14 +169,18 @@ class FieldsetField extends React.Component {
|
|
|
167
169
|
}
|
|
168
170
|
}) : jsx(Button, {
|
|
169
171
|
testId: "add-more",
|
|
170
|
-
appearance: "subtle"
|
|
172
|
+
appearance: "subtle"
|
|
173
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
174
|
+
,
|
|
171
175
|
iconBefore: iconProps => jsx(AddCircleIcon
|
|
172
176
|
// Ignored via go/ees005
|
|
173
177
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
174
178
|
, _extends({}, iconProps, {
|
|
175
179
|
spacing: "none",
|
|
176
180
|
label: intl.formatMessage(messages.addField)
|
|
177
|
-
}))
|
|
181
|
+
}))
|
|
182
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
183
|
+
,
|
|
178
184
|
onClick: () => this.setIsAdding(true)
|
|
179
185
|
}, intl.formatMessage(messages.addField)));
|
|
180
186
|
});
|
|
@@ -50,7 +50,9 @@ export default function Number({
|
|
|
50
50
|
// Ignored via go/ees005
|
|
51
51
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
52
52
|
, _extends({}, fieldProps, {
|
|
53
|
-
autoFocus: autoFocus
|
|
53
|
+
autoFocus: autoFocus
|
|
54
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
55
|
+
,
|
|
54
56
|
onBlur: () => {
|
|
55
57
|
fieldProps.onBlur();
|
|
56
58
|
onFieldChange(name, meta.dirty);
|
|
@@ -19,7 +19,9 @@ export default function RadioField({
|
|
|
19
19
|
name: name,
|
|
20
20
|
label: field.label,
|
|
21
21
|
defaultValue: field.defaultValue,
|
|
22
|
-
isRequired: field.isRequired
|
|
22
|
+
isRequired: field.isRequired
|
|
23
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
24
|
+
,
|
|
23
25
|
validate: value => validate(field, value),
|
|
24
26
|
testId: `config-panel-radio-group-${field.name}`,
|
|
25
27
|
isDisabled: field.isDisabled
|
|
@@ -33,7 +35,9 @@ export default function RadioField({
|
|
|
33
35
|
options: (field.items || []).map(option => ({
|
|
34
36
|
...option,
|
|
35
37
|
name: field.name
|
|
36
|
-
}))
|
|
38
|
+
}))
|
|
39
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
40
|
+
,
|
|
37
41
|
onChange: value => {
|
|
38
42
|
fieldProps.onChange(value);
|
|
39
43
|
onFieldChange(field.name, true);
|
|
@@ -21,7 +21,9 @@ export default function SelectField({
|
|
|
21
21
|
label: field.label,
|
|
22
22
|
defaultValue: getOptionFromValue(field.items, field.defaultValue),
|
|
23
23
|
testId: `config-panel-select-${name}`,
|
|
24
|
-
isRequired: field.isRequired
|
|
24
|
+
isRequired: field.isRequired
|
|
25
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
26
|
+
,
|
|
25
27
|
validate: value => {
|
|
26
28
|
// Ignored via go/ees005
|
|
27
29
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -38,6 +40,7 @@ export default function SelectField({
|
|
|
38
40
|
// Pass `id` as `inputId` so that the input gets the correct id, and make sure there are no duplicate ids
|
|
39
41
|
inputId: fieldProps.id,
|
|
40
42
|
id: undefined,
|
|
43
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
41
44
|
onChange: value => {
|
|
42
45
|
fieldProps.onChange(value);
|
|
43
46
|
onFieldChange(name, true);
|
|
@@ -23,7 +23,9 @@ export default function String({
|
|
|
23
23
|
name: name,
|
|
24
24
|
label: label,
|
|
25
25
|
defaultValue: defaultValue || '',
|
|
26
|
-
isRequired: isRequired
|
|
26
|
+
isRequired: isRequired
|
|
27
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
28
|
+
,
|
|
27
29
|
validate: value => validate(field, value || ''),
|
|
28
30
|
testId: `config-panel-string-${name}`,
|
|
29
31
|
isDisabled: isDisabled
|
|
@@ -44,7 +46,10 @@ export default function String({
|
|
|
44
46
|
// Ignored via go/ees005
|
|
45
47
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
46
48
|
, _extends({}, restFieldProps, options, {
|
|
47
|
-
|
|
49
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
50
|
+
onChange: e => onChange(e.currentTarget.value)
|
|
51
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
52
|
+
,
|
|
48
53
|
onBlur: () => {
|
|
49
54
|
fieldProps.onBlur();
|
|
50
55
|
onFieldChange(name, meta.dirty);
|
|
@@ -61,7 +66,9 @@ export default function String({
|
|
|
61
66
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
62
67
|
, _extends({}, fieldProps, {
|
|
63
68
|
type: "text",
|
|
64
|
-
autoFocus: autoFocus
|
|
69
|
+
autoFocus: autoFocus
|
|
70
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
71
|
+
,
|
|
65
72
|
onBlur: () => {
|
|
66
73
|
fieldProps.onBlur();
|
|
67
74
|
onFieldChange(name, meta.dirty);
|
|
@@ -168,7 +168,9 @@ export default function UserSelect({
|
|
|
168
168
|
name: name,
|
|
169
169
|
label: label,
|
|
170
170
|
isRequired: isRequired,
|
|
171
|
-
defaultValue: defaultValue
|
|
171
|
+
defaultValue: defaultValue
|
|
172
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
173
|
+
,
|
|
172
174
|
validate: value => validate(field, value),
|
|
173
175
|
testId: `config-panel-user-select-${name}`,
|
|
174
176
|
isDisabled: isDisabled
|
|
@@ -193,7 +195,9 @@ export default function UserSelect({
|
|
|
193
195
|
context: context,
|
|
194
196
|
field: field,
|
|
195
197
|
formFieldProps: fieldProps,
|
|
196
|
-
autoFocus: autoFocus || false
|
|
198
|
+
autoFocus: autoFocus || false
|
|
199
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
200
|
+
,
|
|
197
201
|
onBlur: () => onFieldChange(name, meta.dirty),
|
|
198
202
|
onChange: onChange
|
|
199
203
|
}), /*#__PURE__*/React.createElement(FieldMessages, {
|
|
@@ -76,14 +76,18 @@ export const getContextPanel = getEditorView => (api, featureFlags) => state =>
|
|
|
76
76
|
parameters: configParams,
|
|
77
77
|
extensionProvider: extensionProvider,
|
|
78
78
|
autoSaveTrigger: autoSaveResolve,
|
|
79
|
-
autoSaveReject: autoSaveReject
|
|
79
|
+
autoSaveReject: autoSaveReject
|
|
80
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
81
|
+
,
|
|
80
82
|
onChange: async updatedParameters => {
|
|
81
83
|
await onChangeAction(editorView, updatedParameters, parameters, nodeWithPos, onSaveStarted);
|
|
82
84
|
onSaveEnded();
|
|
83
85
|
if (autoSaveResolve) {
|
|
84
86
|
autoSaveResolve();
|
|
85
87
|
}
|
|
86
|
-
}
|
|
88
|
+
}
|
|
89
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
90
|
+
,
|
|
87
91
|
onCancel: async () => {
|
|
88
92
|
try {
|
|
89
93
|
await new Promise((resolve, reject) => {
|
|
@@ -197,14 +197,18 @@ export const getContextPanelBodyComponent = ({
|
|
|
197
197
|
parameters: configParams,
|
|
198
198
|
extensionProvider: extensionProvider,
|
|
199
199
|
autoSaveTrigger: autoSaveResolve,
|
|
200
|
-
autoSaveReject: autoSaveReject
|
|
200
|
+
autoSaveReject: autoSaveReject
|
|
201
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
202
|
+
,
|
|
201
203
|
onChange: async updatedParameters => {
|
|
202
204
|
await onChangeAction(editorView, updatedParameters, parameters, nodeWithPos, onSaveStarted);
|
|
203
205
|
onSaveEnded();
|
|
204
206
|
if (autoSaveResolve) {
|
|
205
207
|
autoSaveResolve();
|
|
206
208
|
}
|
|
207
|
-
}
|
|
209
|
+
}
|
|
210
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
211
|
+
,
|
|
208
212
|
onCancel: () => startClosingConfigPanel({
|
|
209
213
|
api,
|
|
210
214
|
editorView
|
|
@@ -170,6 +170,7 @@ var resolveMentionsInText = /*#__PURE__*/function () {
|
|
|
170
170
|
return mentionProvider.resolveMentionName(id);
|
|
171
171
|
case 11:
|
|
172
172
|
mention = _context.sent;
|
|
173
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-expensive-split-replace -- Ignored via go/ees017 (to be fixed)
|
|
173
174
|
resolvedText = resolvedText.replace("@".concat(id), "@".concat(mention.name) || '@…');
|
|
174
175
|
case 13:
|
|
175
176
|
_context.next = 7;
|
|
@@ -61,6 +61,7 @@ var FieldDefinitionsPromiseResolver = function FieldDefinitionsPromiseResolver(p
|
|
|
61
61
|
}
|
|
62
62
|
var promiseFn = getFieldsDefinitionFn(extensionManifest, nodeKey);
|
|
63
63
|
if (typeof promiseFn !== 'function') {
|
|
64
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-chain-state-updates -- Ignored via go/ees017 (to be fixed)
|
|
64
65
|
setFields(undefined);
|
|
65
66
|
return;
|
|
66
67
|
}
|
|
@@ -8,7 +8,9 @@ var ConfigPanelErrorMessage = function ConfigPanelErrorMessage(_ref) {
|
|
|
8
8
|
intl = _ref.intl;
|
|
9
9
|
return /*#__PURE__*/React.createElement(EmptyState, {
|
|
10
10
|
header: intl.formatMessage(messages.configFailedToLoad),
|
|
11
|
-
description: errorMessage
|
|
11
|
+
description: errorMessage
|
|
12
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
13
|
+
,
|
|
12
14
|
renderImage: function renderImage() {
|
|
13
15
|
return /*#__PURE__*/React.createElement(ErrorImage, null);
|
|
14
16
|
},
|
|
@@ -59,7 +59,9 @@ function Checkbox(_ref) {
|
|
|
59
59
|
isDisabled = field.isDisabled;
|
|
60
60
|
return jsx(Field, {
|
|
61
61
|
name: name,
|
|
62
|
-
isRequired: isRequired
|
|
62
|
+
isRequired: isRequired
|
|
63
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
64
|
+
,
|
|
63
65
|
validate: function validate(value) {
|
|
64
66
|
return _validate(value, isRequired);
|
|
65
67
|
},
|
|
@@ -74,7 +76,9 @@ function Checkbox(_ref) {
|
|
|
74
76
|
// Ignored via go/ees005
|
|
75
77
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
76
78
|
, _extends({}, restFieldProps, {
|
|
77
|
-
label: label
|
|
79
|
+
label: label
|
|
80
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
81
|
+
,
|
|
78
82
|
onChange: function onChange(event) {
|
|
79
83
|
return handleOnChange(fieldProps.onChange, onFieldChange, event);
|
|
80
84
|
},
|
|
@@ -98,7 +102,9 @@ function Toggle(_ref3) {
|
|
|
98
102
|
isDisabled = field.isDisabled;
|
|
99
103
|
return jsx(Field, {
|
|
100
104
|
name: name,
|
|
101
|
-
isRequired: isRequired
|
|
105
|
+
isRequired: isRequired
|
|
106
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
107
|
+
,
|
|
102
108
|
validate: function validate(value) {
|
|
103
109
|
return _validate(value, isRequired);
|
|
104
110
|
},
|
|
@@ -125,6 +131,7 @@ function Toggle(_ref3) {
|
|
|
125
131
|
// Ignored via go/ees005
|
|
126
132
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
127
133
|
, _extends({}, restFieldProps, {
|
|
134
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
128
135
|
onChange: function onChange(event) {
|
|
129
136
|
return handleOnChange(fieldProps.onChange, onFieldChange, event);
|
|
130
137
|
},
|
|
@@ -91,7 +91,9 @@ export default function CheckboxGroup(_ref3) {
|
|
|
91
91
|
return jsx(Field, {
|
|
92
92
|
name: name,
|
|
93
93
|
isRequired: isRequired,
|
|
94
|
-
defaultValue: defaultValue
|
|
94
|
+
defaultValue: defaultValue
|
|
95
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
96
|
+
,
|
|
95
97
|
validate: function validate(value) {
|
|
96
98
|
return _validate(value, isRequired);
|
|
97
99
|
},
|
|
@@ -354,7 +354,9 @@ var ColorPicker = function ColorPicker(props) {
|
|
|
354
354
|
paletteColorTooltipMessages: chartsColorPaletteTooltipMessages,
|
|
355
355
|
cols: EXPANDED_COLOR_PICKER_COLUMNS,
|
|
356
356
|
alignX: "right",
|
|
357
|
-
placement: "ConfigPanel"
|
|
357
|
+
placement: "ConfigPanel"
|
|
358
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
359
|
+
,
|
|
358
360
|
size: {
|
|
359
361
|
width: "var(--ds-space-300, 24px)",
|
|
360
362
|
height: "var(--ds-space-300, 24px)"
|
|
@@ -362,7 +364,7 @@ var ColorPicker = function ColorPicker(props) {
|
|
|
362
364
|
/* ED-18288 We align the palette to the right edge which is 1.5rem spacing away to avoid
|
|
363
365
|
excess overflow on left. Additional 1 is to mitigate 1px added by floating toolbar. */
|
|
364
366
|
// Disabling design token check as this is a calculated value
|
|
365
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
367
|
+
// 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)
|
|
366
368
|
,
|
|
367
369
|
absoluteOffset: {
|
|
368
370
|
right: Number(-1.5 * getCurrentRemSize() - 1)
|
|
@@ -382,7 +384,9 @@ var ColorPickerField = function ColorPickerField(_ref) {
|
|
|
382
384
|
name: name,
|
|
383
385
|
isRequired: isRequired,
|
|
384
386
|
defaultValue: defaultValue,
|
|
385
|
-
testId: "config-panel-color-picker-".concat(name)
|
|
387
|
+
testId: "config-panel-color-picker-".concat(name)
|
|
388
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
389
|
+
,
|
|
386
390
|
validate: function validate(value) {
|
|
387
391
|
return _validate(field, value || '');
|
|
388
392
|
},
|
|
@@ -135,7 +135,9 @@ function CustomSelect(_ref2) {
|
|
|
135
135
|
name: name,
|
|
136
136
|
label: label,
|
|
137
137
|
isRequired: isRequired,
|
|
138
|
-
defaultValue: defaultValue
|
|
138
|
+
defaultValue: defaultValue
|
|
139
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
140
|
+
,
|
|
139
141
|
validate: function validate(value) {
|
|
140
142
|
return _validate(field, value);
|
|
141
143
|
},
|
|
@@ -148,6 +150,7 @@ function CustomSelect(_ref2) {
|
|
|
148
150
|
// Ignored via go/ees005
|
|
149
151
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
150
152
|
, _extends({}, fieldProps, {
|
|
153
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
151
154
|
onChange: function onChange(value) {
|
|
152
155
|
fieldProps.onChange(value);
|
|
153
156
|
// We assume onChange is called whenever values actually changed
|
|
@@ -157,16 +160,22 @@ function CustomSelect(_ref2) {
|
|
|
157
160
|
// add type cast to avoid adding a "IsMulti" generic prop (TODO: ED-12072)
|
|
158
161
|
,
|
|
159
162
|
isMulti: isMultiple || false,
|
|
160
|
-
isClearable: true
|
|
163
|
+
isClearable: true
|
|
164
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
165
|
+
,
|
|
161
166
|
isValidNewOption: function isValidNewOption(value) {
|
|
162
167
|
return !!(isCreatable && value);
|
|
163
168
|
},
|
|
164
169
|
validationState: error ? 'error' : 'default',
|
|
165
|
-
defaultOptions: defaultOptions
|
|
170
|
+
defaultOptions: defaultOptions
|
|
171
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
172
|
+
,
|
|
166
173
|
formatCreateLabel: function formatCreateLabel(value) {
|
|
167
174
|
return customFormatCreateLabel ? customFormatCreateLabel(value) : _formatCreateLabel(value);
|
|
168
175
|
},
|
|
169
|
-
formatOptionLabel: formatOptionLabel
|
|
176
|
+
formatOptionLabel: formatOptionLabel
|
|
177
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
178
|
+
,
|
|
170
179
|
loadOptions: function loadOptions(searchTerm) {
|
|
171
180
|
return resolver(searchTerm, fieldDefaultValue, parameters);
|
|
172
181
|
},
|
|
@@ -21,7 +21,9 @@ function Date(_ref) {
|
|
|
21
21
|
name: name,
|
|
22
22
|
label: label,
|
|
23
23
|
defaultValue: defaultValue,
|
|
24
|
-
isRequired: isRequired
|
|
24
|
+
isRequired: isRequired
|
|
25
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
26
|
+
,
|
|
25
27
|
validate: function validate(value) {
|
|
26
28
|
return _validate(field, value);
|
|
27
29
|
},
|
|
@@ -34,10 +36,14 @@ function Date(_ref) {
|
|
|
34
36
|
// Ignored via go/ees005
|
|
35
37
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
36
38
|
, _extends({}, fieldProps, {
|
|
37
|
-
autoFocus: autoFocus
|
|
39
|
+
autoFocus: autoFocus
|
|
40
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
41
|
+
,
|
|
38
42
|
onBlur: function onBlur() {
|
|
39
43
|
fieldProps.onBlur();
|
|
40
|
-
}
|
|
44
|
+
}
|
|
45
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
46
|
+
,
|
|
41
47
|
onChange: function onChange(value) {
|
|
42
48
|
fieldProps.onChange(value);
|
|
43
49
|
onFieldChange(name, true);
|
|
@@ -51,7 +51,9 @@ var DateField = function DateField(_ref) {
|
|
|
51
51
|
name: "".concat(scope, ".").concat(fieldName),
|
|
52
52
|
label: intl.formatMessage(messages[fieldName]),
|
|
53
53
|
defaultValue: getFromDefaultValue(parentField, fieldName),
|
|
54
|
-
isRequired: isRequired
|
|
54
|
+
isRequired: isRequired
|
|
55
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
56
|
+
,
|
|
55
57
|
validate: function validate(value) {
|
|
56
58
|
return validateRequired({
|
|
57
59
|
isRequired: isRequired
|
|
@@ -65,6 +67,7 @@ var DateField = function DateField(_ref) {
|
|
|
65
67
|
// Ignored via go/ees005
|
|
66
68
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
67
69
|
, _extends({}, fieldProps, {
|
|
70
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
68
71
|
onChange: function onChange(date) {
|
|
69
72
|
fieldProps.onChange(date);
|
|
70
73
|
onFieldChange(parentField.name, true);
|
|
@@ -118,7 +121,9 @@ var DateRange = function DateRange(_ref3) {
|
|
|
118
121
|
name: "".concat(name, ".value"),
|
|
119
122
|
label: field.label,
|
|
120
123
|
defaultValue: currentValue,
|
|
121
|
-
isRequired: field.isRequired
|
|
124
|
+
isRequired: field.isRequired
|
|
125
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
126
|
+
,
|
|
122
127
|
validate: function validate(value) {
|
|
123
128
|
return _validate(field, value || '');
|
|
124
129
|
},
|
|
@@ -131,7 +136,9 @@ var DateRange = function DateRange(_ref3) {
|
|
|
131
136
|
// Ignored via go/ees005
|
|
132
137
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
133
138
|
, _extends({}, fieldProps, {
|
|
134
|
-
options: items
|
|
139
|
+
options: items
|
|
140
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
141
|
+
,
|
|
135
142
|
onChange: function onChange(event) {
|
|
136
143
|
fieldProps.onChange(event.target.value);
|
|
137
144
|
setCurrentValue(event.target.value);
|
|
@@ -64,12 +64,16 @@ function Expand(_ref) {
|
|
|
64
64
|
css: labelContainerStyles
|
|
65
65
|
}, field.label), jsx("div", {
|
|
66
66
|
css: chevronContainerStyles
|
|
67
|
-
}, jsx(IconButton
|
|
67
|
+
}, jsx(IconButton
|
|
68
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
69
|
+
, {
|
|
68
70
|
onClick: function onClick() {
|
|
69
71
|
setExpanded(!expanded);
|
|
70
72
|
},
|
|
71
73
|
label: intl.formatMessage(expanded ? messages.collapse : messages.expand),
|
|
72
|
-
testId: "form-expand-toggle"
|
|
74
|
+
testId: "form-expand-toggle"
|
|
75
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
76
|
+
,
|
|
73
77
|
icon: function icon(iconProps) {
|
|
74
78
|
return expanded ? jsx(ChevronDownIcon, {
|
|
75
79
|
label: iconProps.label,
|
|
@@ -188,7 +188,9 @@ var FieldsetField = /*#__PURE__*/function (_React$Component) {
|
|
|
188
188
|
defaultMenuIsOpen: true,
|
|
189
189
|
autoFocus: true,
|
|
190
190
|
placeholder: intl.formatMessage(messages.addField),
|
|
191
|
-
options: selectOptions
|
|
191
|
+
options: selectOptions
|
|
192
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
193
|
+
,
|
|
192
194
|
onChange: function onChange(option) {
|
|
193
195
|
if (option) {
|
|
194
196
|
_this.onSelectItem(option);
|
|
@@ -196,7 +198,9 @@ var FieldsetField = /*#__PURE__*/function (_React$Component) {
|
|
|
196
198
|
}
|
|
197
199
|
}) : jsx(Button, {
|
|
198
200
|
testId: "add-more",
|
|
199
|
-
appearance: "subtle"
|
|
201
|
+
appearance: "subtle"
|
|
202
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
203
|
+
,
|
|
200
204
|
iconBefore: function iconBefore(iconProps) {
|
|
201
205
|
return jsx(AddCircleIcon
|
|
202
206
|
// Ignored via go/ees005
|
|
@@ -205,7 +209,9 @@ var FieldsetField = /*#__PURE__*/function (_React$Component) {
|
|
|
205
209
|
spacing: "none",
|
|
206
210
|
label: intl.formatMessage(messages.addField)
|
|
207
211
|
}));
|
|
208
|
-
}
|
|
212
|
+
}
|
|
213
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
214
|
+
,
|
|
209
215
|
onClick: function onClick() {
|
|
210
216
|
return _this.setIsAdding(true);
|
|
211
217
|
}
|
|
@@ -46,7 +46,9 @@ export default function Number(_ref) {
|
|
|
46
46
|
// Ignored via go/ees005
|
|
47
47
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
48
48
|
, _extends({}, fieldProps, {
|
|
49
|
-
autoFocus: autoFocus
|
|
49
|
+
autoFocus: autoFocus
|
|
50
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
51
|
+
,
|
|
50
52
|
onBlur: function onBlur() {
|
|
51
53
|
fieldProps.onBlur();
|
|
52
54
|
onFieldChange(name, meta.dirty);
|
|
@@ -21,7 +21,9 @@ export default function RadioField(_ref) {
|
|
|
21
21
|
name: name,
|
|
22
22
|
label: field.label,
|
|
23
23
|
defaultValue: field.defaultValue,
|
|
24
|
-
isRequired: field.isRequired
|
|
24
|
+
isRequired: field.isRequired
|
|
25
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
26
|
+
,
|
|
25
27
|
validate: function validate(value) {
|
|
26
28
|
return _validate(field, value);
|
|
27
29
|
},
|
|
@@ -38,7 +40,9 @@ export default function RadioField(_ref) {
|
|
|
38
40
|
return _objectSpread(_objectSpread({}, option), {}, {
|
|
39
41
|
name: field.name
|
|
40
42
|
});
|
|
41
|
-
})
|
|
43
|
+
})
|
|
44
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
45
|
+
,
|
|
42
46
|
onChange: function onChange(value) {
|
|
43
47
|
fieldProps.onChange(value);
|
|
44
48
|
onFieldChange(field.name, true);
|
|
@@ -23,7 +23,9 @@ export default function SelectField(_ref) {
|
|
|
23
23
|
label: field.label,
|
|
24
24
|
defaultValue: getOptionFromValue(field.items, field.defaultValue),
|
|
25
25
|
testId: "config-panel-select-".concat(name),
|
|
26
|
-
isRequired: field.isRequired
|
|
26
|
+
isRequired: field.isRequired
|
|
27
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
28
|
+
,
|
|
27
29
|
validate: function validate(value) {
|
|
28
30
|
// Ignored via go/ees005
|
|
29
31
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -41,6 +43,7 @@ export default function SelectField(_ref) {
|
|
|
41
43
|
inputId: fieldProps.id,
|
|
42
44
|
id: undefined
|
|
43
45
|
}), {
|
|
46
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
44
47
|
onChange: function onChange(value) {
|
|
45
48
|
fieldProps.onChange(value);
|
|
46
49
|
onFieldChange(name, true);
|
|
@@ -22,7 +22,9 @@ export default function String(_ref) {
|
|
|
22
22
|
name: name,
|
|
23
23
|
label: label,
|
|
24
24
|
defaultValue: defaultValue || '',
|
|
25
|
-
isRequired: isRequired
|
|
25
|
+
isRequired: isRequired
|
|
26
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
27
|
+
,
|
|
26
28
|
validate: function validate(value) {
|
|
27
29
|
return _validate(field, value || '');
|
|
28
30
|
},
|
|
@@ -40,9 +42,12 @@ export default function String(_ref) {
|
|
|
40
42
|
// Ignored via go/ees005
|
|
41
43
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
42
44
|
, _extends({}, restFieldProps, options, {
|
|
45
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
43
46
|
onChange: function onChange(e) {
|
|
44
47
|
return _onChange(e.currentTarget.value);
|
|
45
|
-
}
|
|
48
|
+
}
|
|
49
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
50
|
+
,
|
|
46
51
|
onBlur: function onBlur() {
|
|
47
52
|
fieldProps.onBlur();
|
|
48
53
|
onFieldChange(name, meta.dirty);
|
|
@@ -59,7 +64,9 @@ export default function String(_ref) {
|
|
|
59
64
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
60
65
|
, _extends({}, fieldProps, {
|
|
61
66
|
type: "text",
|
|
62
|
-
autoFocus: autoFocus
|
|
67
|
+
autoFocus: autoFocus
|
|
68
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
69
|
+
,
|
|
63
70
|
onBlur: function onBlur() {
|
|
64
71
|
fieldProps.onBlur();
|
|
65
72
|
onFieldChange(name, meta.dirty);
|
|
@@ -225,7 +225,9 @@ export default function UserSelect(_ref2) {
|
|
|
225
225
|
name: name,
|
|
226
226
|
label: label,
|
|
227
227
|
isRequired: isRequired,
|
|
228
|
-
defaultValue: defaultValue
|
|
228
|
+
defaultValue: defaultValue
|
|
229
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
230
|
+
,
|
|
229
231
|
validate: function validate(value) {
|
|
230
232
|
return _validate(field, value);
|
|
231
233
|
},
|
|
@@ -251,7 +253,9 @@ export default function UserSelect(_ref2) {
|
|
|
251
253
|
context: context,
|
|
252
254
|
field: field,
|
|
253
255
|
formFieldProps: fieldProps,
|
|
254
|
-
autoFocus: autoFocus || false
|
|
256
|
+
autoFocus: autoFocus || false
|
|
257
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
258
|
+
,
|
|
255
259
|
onBlur: function onBlur() {
|
|
256
260
|
return onFieldChange(name, meta.dirty);
|
|
257
261
|
},
|