@atlaskit/editor-core 189.5.10 → 189.6.0
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/ui/ConfigPanel/ErrorMessage/index.js +2 -1
- package/dist/cjs/ui/ConfigPanel/FieldMessages.js +9 -3
- package/dist/cjs/ui/ConfigPanel/Fields/Boolean.js +2 -1
- package/dist/cjs/ui/ConfigPanel/Fields/ColorPicker.js +1 -0
- package/dist/cjs/ui/ConfigPanel/Fields/CustomSelect.js +2 -1
- package/dist/cjs/ui/ConfigPanel/Fields/Date.js +2 -1
- package/dist/cjs/ui/ConfigPanel/Fields/DateRange.js +2 -1
- package/dist/cjs/ui/ConfigPanel/Fields/Number.js +2 -1
- package/dist/cjs/ui/ConfigPanel/Fields/RadioGroup.js +2 -1
- package/dist/cjs/ui/ConfigPanel/Fields/Select.js +1 -0
- package/dist/cjs/ui/ConfigPanel/Fields/String.js +4 -2
- package/dist/cjs/ui/ConfigPanel/Fields/UserSelect.js +2 -1
- package/dist/cjs/ui/ConfigPanel/Header.js +12 -8
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/ConfigPanel/ErrorMessage/index.js +2 -1
- package/dist/es2019/ui/ConfigPanel/FieldMessages.js +9 -3
- package/dist/es2019/ui/ConfigPanel/Fields/Boolean.js +2 -1
- package/dist/es2019/ui/ConfigPanel/Fields/ColorPicker.js +1 -0
- package/dist/es2019/ui/ConfigPanel/Fields/CustomSelect.js +2 -1
- package/dist/es2019/ui/ConfigPanel/Fields/Date.js +2 -1
- package/dist/es2019/ui/ConfigPanel/Fields/DateRange.js +2 -1
- package/dist/es2019/ui/ConfigPanel/Fields/Number.js +2 -1
- package/dist/es2019/ui/ConfigPanel/Fields/RadioGroup.js +2 -1
- package/dist/es2019/ui/ConfigPanel/Fields/Select.js +1 -0
- package/dist/es2019/ui/ConfigPanel/Fields/String.js +4 -2
- package/dist/es2019/ui/ConfigPanel/Fields/UserSelect.js +2 -1
- package/dist/es2019/ui/ConfigPanel/Header.js +12 -8
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/ui/ConfigPanel/ErrorMessage/index.js +2 -1
- package/dist/esm/ui/ConfigPanel/FieldMessages.js +9 -3
- package/dist/esm/ui/ConfigPanel/Fields/Boolean.js +2 -1
- package/dist/esm/ui/ConfigPanel/Fields/ColorPicker.js +1 -0
- package/dist/esm/ui/ConfigPanel/Fields/CustomSelect.js +2 -1
- package/dist/esm/ui/ConfigPanel/Fields/Date.js +2 -1
- package/dist/esm/ui/ConfigPanel/Fields/DateRange.js +2 -1
- package/dist/esm/ui/ConfigPanel/Fields/Number.js +2 -1
- package/dist/esm/ui/ConfigPanel/Fields/RadioGroup.js +2 -1
- package/dist/esm/ui/ConfigPanel/Fields/Select.js +1 -0
- package/dist/esm/ui/ConfigPanel/Fields/String.js +4 -2
- package/dist/esm/ui/ConfigPanel/Fields/UserSelect.js +2 -1
- package/dist/esm/ui/ConfigPanel/Header.js +12 -8
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/ErrorMessage/index.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/FieldMessages.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/Fields/CustomSelect.d.ts +3 -3
- package/dist/types/ui/ConfigPanel/Fields/Date.d.ts +3 -3
- package/dist/types/ui/ConfigPanel/Fields/DateRange.d.ts +3 -3
- package/dist/types/ui/ConfigPanel/Fields/Number.d.ts +2 -2
- package/dist/types/ui/ConfigPanel/Fields/RadioGroup.d.ts +2 -2
- package/dist/types/ui/ConfigPanel/Fields/Select.d.ts +2 -2
- package/dist/types/ui/ConfigPanel/Fields/String.d.ts +2 -2
- package/dist/types/ui/ConfigPanel/Fields/UserSelect.d.ts +2 -2
- package/dist/types/ui/ConfigPanel/Header.d.ts +2 -2
- package/dist/types/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
- package/dist/types-ts4.5/ui/ConfigPanel/ErrorMessage/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/ConfigPanel/FieldMessages.d.ts +1 -1
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/CustomSelect.d.ts +3 -3
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/Date.d.ts +3 -3
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/DateRange.d.ts +3 -3
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/Number.d.ts +2 -2
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/RadioGroup.d.ts +2 -2
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/Select.d.ts +2 -2
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/String.d.ts +2 -2
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/UserSelect.d.ts +2 -2
- package/dist/types-ts4.5/ui/ConfigPanel/Header.d.ts +2 -2
- package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +2 -2
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 189.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#59378](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/59378) [`cd8ba004f7ed`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/cd8ba004f7ed) - Migrate config-panel tests to RTL, and add testids where necessary
|
|
8
|
+
|
|
9
|
+
## 189.5.11
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#58565](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/58565) [`1f112c9375db`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1f112c9375db) - replace table sticky scrollbar platform feature flag with an editorFeatureFlag
|
|
14
|
+
|
|
3
15
|
## 189.5.10
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -26,7 +26,8 @@ var ConfigPanelErrorMessage = function ConfigPanelErrorMessage(_ref) {
|
|
|
26
26
|
return /*#__PURE__*/_react.default.createElement(_ErrorImage.default, null);
|
|
27
27
|
},
|
|
28
28
|
size: "narrow",
|
|
29
|
-
imageHeight: 80
|
|
29
|
+
imageHeight: 80,
|
|
30
|
+
testId: "config-panel-error-message"
|
|
30
31
|
});
|
|
31
32
|
};
|
|
32
33
|
var _default = exports.default = (0, _reactIntlNext.injectIntl)(ConfigPanelErrorMessage);
|
|
@@ -85,11 +85,17 @@ var FieldMessages = function FieldMessages(_ref2) {
|
|
|
85
85
|
}
|
|
86
86
|
switch (error) {
|
|
87
87
|
case _types.ValidationError.Required:
|
|
88
|
-
return /*#__PURE__*/_react.default.createElement(_form.ErrorMessage,
|
|
88
|
+
return /*#__PURE__*/_react.default.createElement(_form.ErrorMessage, {
|
|
89
|
+
testId: "config-panel-error-message"
|
|
90
|
+
}, intl.formatMessage(_messages.messages.required));
|
|
89
91
|
case _types.ValidationError.Invalid:
|
|
90
|
-
return /*#__PURE__*/_react.default.createElement(_form.ErrorMessage,
|
|
92
|
+
return /*#__PURE__*/_react.default.createElement(_form.ErrorMessage, {
|
|
93
|
+
testId: "config-panel-error-message"
|
|
94
|
+
}, intl.formatMessage(_messages.messages.invalid));
|
|
91
95
|
case _types.FieldTypeError.isMultipleAndRadio:
|
|
92
|
-
return /*#__PURE__*/_react.default.createElement(_form.ErrorMessage,
|
|
96
|
+
return /*#__PURE__*/_react.default.createElement(_form.ErrorMessage, {
|
|
97
|
+
testId: "config-panel-error-message"
|
|
98
|
+
}, intl.formatMessage(_messages.messages.isMultipleAndRadio));
|
|
93
99
|
default:
|
|
94
100
|
return null;
|
|
95
101
|
}
|
|
@@ -97,7 +97,8 @@ function Toggle(_ref3) {
|
|
|
97
97
|
validate: function validate(value) {
|
|
98
98
|
return _validate(value, isRequired);
|
|
99
99
|
},
|
|
100
|
-
defaultValue: defaultValue
|
|
100
|
+
defaultValue: defaultValue,
|
|
101
|
+
testId: "config-panel-toggle-".concat(name)
|
|
101
102
|
}, function (_ref4) {
|
|
102
103
|
var fieldProps = _ref4.fieldProps,
|
|
103
104
|
error = _ref4.error;
|
|
@@ -368,6 +368,7 @@ var ColorPickerField = function ColorPickerField(_ref) {
|
|
|
368
368
|
name: name,
|
|
369
369
|
isRequired: isRequired,
|
|
370
370
|
defaultValue: defaultValue,
|
|
371
|
+
testId: "config-panel-color-picker-".concat(name),
|
|
371
372
|
validate: function validate(value) {
|
|
372
373
|
return (0, _utils.validate)(field, value || '');
|
|
373
374
|
}
|
|
@@ -150,7 +150,8 @@ function CustomSelect(_ref2) {
|
|
|
150
150
|
defaultValue: defaultValue,
|
|
151
151
|
validate: function validate(value) {
|
|
152
152
|
return (0, _utils.validate)(field, value);
|
|
153
|
-
}
|
|
153
|
+
},
|
|
154
|
+
testId: "config-panel-custom-select-".concat(name)
|
|
154
155
|
}, function (_ref3) {
|
|
155
156
|
var fieldProps = _ref3.fieldProps,
|
|
156
157
|
error = _ref3.error;
|
|
@@ -30,7 +30,8 @@ function Date(_ref) {
|
|
|
30
30
|
isRequired: isRequired,
|
|
31
31
|
validate: function validate(value) {
|
|
32
32
|
return (0, _utils.validate)(field, value);
|
|
33
|
-
}
|
|
33
|
+
},
|
|
34
|
+
testId: "config-panel-date-picker-".concat(name)
|
|
34
35
|
}, function (_ref2) {
|
|
35
36
|
var fieldProps = _ref2.fieldProps,
|
|
36
37
|
error = _ref2.error;
|
|
@@ -107,7 +107,8 @@ var DateRange = function DateRange(_ref3) {
|
|
|
107
107
|
isRequired: field.isRequired,
|
|
108
108
|
validate: function validate(value) {
|
|
109
109
|
return (0, _utils.validate)(field, value || '');
|
|
110
|
-
}
|
|
110
|
+
},
|
|
111
|
+
testId: "config-panel-date-range-".concat(name)
|
|
111
112
|
}, function (_ref5) {
|
|
112
113
|
var fieldProps = _ref5.fieldProps,
|
|
113
114
|
error = _ref5.error;
|
|
@@ -41,7 +41,8 @@ function Number(_ref) {
|
|
|
41
41
|
label: label,
|
|
42
42
|
defaultValue: defaultValue === undefined ? '' : String(defaultValue),
|
|
43
43
|
isRequired: isRequired,
|
|
44
|
-
validate: validateNumber
|
|
44
|
+
validate: validateNumber,
|
|
45
|
+
testId: "config-panel-number-".concat(name)
|
|
45
46
|
}, function (_ref2) {
|
|
46
47
|
var fieldProps = _ref2.fieldProps,
|
|
47
48
|
error = _ref2.error,
|
|
@@ -34,7 +34,8 @@ function RadioField(_ref) {
|
|
|
34
34
|
isRequired: field.isRequired,
|
|
35
35
|
validate: function validate(value) {
|
|
36
36
|
return (0, _utils.validate)(field, value);
|
|
37
|
-
}
|
|
37
|
+
},
|
|
38
|
+
testId: "config-panel-radio-group-".concat(field.name)
|
|
38
39
|
}, function (_ref2) {
|
|
39
40
|
var fieldProps = _ref2.fieldProps,
|
|
40
41
|
error = _ref2.error;
|
|
@@ -29,6 +29,7 @@ function SelectField(_ref) {
|
|
|
29
29
|
name: name,
|
|
30
30
|
label: field.label,
|
|
31
31
|
defaultValue: (0, _utils.getOptionFromValue)(field.items, field.defaultValue),
|
|
32
|
+
testId: "config-panel-select-".concat(name),
|
|
32
33
|
isRequired: field.isRequired,
|
|
33
34
|
validate: function validate(value) {
|
|
34
35
|
return (0, _utils.validate)(field, value);
|
|
@@ -34,7 +34,8 @@ function String(_ref) {
|
|
|
34
34
|
isRequired: isRequired,
|
|
35
35
|
validate: function validate(value) {
|
|
36
36
|
return (0, _utils.validate)(field, value || '');
|
|
37
|
-
}
|
|
37
|
+
},
|
|
38
|
+
testId: "config-panel-string-".concat(name)
|
|
38
39
|
}, function (_ref2) {
|
|
39
40
|
var fieldProps = _ref2.fieldProps,
|
|
40
41
|
error = _ref2.error,
|
|
@@ -51,7 +52,8 @@ function String(_ref) {
|
|
|
51
52
|
fieldProps.onBlur();
|
|
52
53
|
onFieldChange(name, meta.dirty);
|
|
53
54
|
},
|
|
54
|
-
placeholder: placeholder
|
|
55
|
+
placeholder: placeholder,
|
|
56
|
+
"data-testid": "config-panel-textarea-".concat(name)
|
|
55
57
|
})), /*#__PURE__*/_react.default.createElement(_FieldMessages.default, {
|
|
56
58
|
error: error,
|
|
57
59
|
description: description
|
|
@@ -234,7 +234,8 @@ function UserSelect(_ref2) {
|
|
|
234
234
|
defaultValue: defaultValue,
|
|
235
235
|
validate: function validate(value) {
|
|
236
236
|
return (0, _utils.validate)(field, value);
|
|
237
|
-
}
|
|
237
|
+
},
|
|
238
|
+
testId: "config-panel-user-select-".concat(name)
|
|
238
239
|
}, function (_ref3) {
|
|
239
240
|
var fieldProps = _ref3.fieldProps,
|
|
240
241
|
error = _ref3.error;
|
|
@@ -22,12 +22,12 @@ var iconWidth = 40;
|
|
|
22
22
|
var buttonWidth = 40;
|
|
23
23
|
var margin = 16;
|
|
24
24
|
var gapSizeForEllipsis = iconWidth + buttonWidth + margin * 2;
|
|
25
|
-
var item = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n margin-bottom:
|
|
25
|
+
var item = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n margin-bottom: ", ";\n"])), "var(--ds-space-300, 24px)");
|
|
26
26
|
var itemIcon = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n width: ", "px;\n height: ", "px;\n overflow: hidden;\n border: 1px solid ", "; /* N60 at 50% */\n border-radius: ", "px;\n box-sizing: border-box;\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n div {\n width: ", "px;\n height: ", "px;\n }\n"])), iconWidth, iconWidth, "var(--ds-border, rgba(223, 225, 229, 0.5))", (0, _constants.borderRadius)(), iconWidth, iconWidth);
|
|
27
|
-
var itemBody = (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n line-height: 1.4;\n margin: 0
|
|
27
|
+
var itemBody = (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n line-height: 1.4;\n margin: 0 ", ";\n flex-grow: 3;\n max-width: calc(100% - ", "px);\n"])), "var(--ds-space-200, 16px)", gapSizeForEllipsis);
|
|
28
28
|
var centeredItemTitle = (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n"])));
|
|
29
|
-
var itemText = (0, _react2.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n max-width: 100%;\n white-space: initial;\n .item-summary {\n font-size: ", ";\n color: ", ";\n margin-top:
|
|
30
|
-
var descriptionStyle = (0, _react2.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n margin-bottom:
|
|
29
|
+
var itemText = (0, _react2.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n max-width: 100%;\n white-space: initial;\n .item-summary {\n font-size: ", ";\n color: ", ";\n margin-top: ", ";\n\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"])), (0, _editorSharedStyles.relativeFontSizeToBase16)(11.67), "var(--ds-text-subtlest, ".concat(_colors.N200, ")"), "var(--ds-space-050, 4px)");
|
|
30
|
+
var descriptionStyle = (0, _react2.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n margin-bottom: ", ";\n"])), "var(--ds-space-300, 24px)");
|
|
31
31
|
var closeButtonWrapper = (0, _react2.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n width: ", "px;\n text-align: right;\n"])), buttonWidth);
|
|
32
32
|
var Header = function Header(_ref) {
|
|
33
33
|
var icon = _ref.icon,
|
|
@@ -55,12 +55,14 @@ var Header = function Header(_ref) {
|
|
|
55
55
|
css: itemText
|
|
56
56
|
}, (0, _react2.jsx)("div", {
|
|
57
57
|
className: "item-title",
|
|
58
|
-
id: "context-panel-title"
|
|
58
|
+
id: "context-panel-title",
|
|
59
|
+
"data-testId": "context-panel-title"
|
|
59
60
|
}, title), (0, _react2.jsx)("div", {
|
|
60
61
|
className: "item-summary"
|
|
61
62
|
}, summary)) : (0, _react2.jsx)("div", {
|
|
62
63
|
css: centeredItemTitle,
|
|
63
|
-
id: "context-panel-title"
|
|
64
|
+
id: "context-panel-title",
|
|
65
|
+
"data-testId": "context-panel-title"
|
|
64
66
|
}, title)), (0, _react2.jsx)("div", {
|
|
65
67
|
css: closeButtonWrapper
|
|
66
68
|
}, (0, _react2.jsx)(_customThemeButton.default, {
|
|
@@ -70,11 +72,13 @@ var Header = function Header(_ref) {
|
|
|
70
72
|
}),
|
|
71
73
|
onClick: onClose
|
|
72
74
|
}))), (description || documentationUrl) && (0, _react2.jsx)("p", {
|
|
73
|
-
css: descriptionStyle
|
|
75
|
+
css: descriptionStyle,
|
|
76
|
+
"data-testid": "config-panel-header-description"
|
|
74
77
|
}, description && (0, _react2.jsx)(_react.Fragment, null, description.replace(/([^.])$/, '$1.'), " "), documentationUrl && (0, _react2.jsx)("a", {
|
|
75
78
|
target: "_blank",
|
|
76
79
|
rel: "noopener noreferrer",
|
|
77
|
-
href: documentationUrl
|
|
80
|
+
href: documentationUrl,
|
|
81
|
+
"data-testid": "config-panel-header-documentation-link"
|
|
78
82
|
}, intl.formatMessage(_messages.messages.documentation))));
|
|
79
83
|
};
|
|
80
84
|
var _default = exports.default = (0, _reactIntlNext.injectIntl)(Header);
|
|
@@ -18,7 +18,8 @@ const ConfigPanelErrorMessage = ({
|
|
|
18
18
|
description: errorMessage,
|
|
19
19
|
renderImage: () => /*#__PURE__*/React.createElement(ErrorImage, null),
|
|
20
20
|
size: "narrow",
|
|
21
|
-
imageHeight: 80
|
|
21
|
+
imageHeight: 80,
|
|
22
|
+
testId: "config-panel-error-message"
|
|
22
23
|
});
|
|
23
24
|
};
|
|
24
25
|
export default injectIntl(ConfigPanelErrorMessage);
|
|
@@ -81,11 +81,17 @@ const FieldMessages = function ({
|
|
|
81
81
|
}
|
|
82
82
|
switch (error) {
|
|
83
83
|
case ValidationError.Required:
|
|
84
|
-
return /*#__PURE__*/React.createElement(ErrorMessage,
|
|
84
|
+
return /*#__PURE__*/React.createElement(ErrorMessage, {
|
|
85
|
+
testId: "config-panel-error-message"
|
|
86
|
+
}, intl.formatMessage(messages.required));
|
|
85
87
|
case ValidationError.Invalid:
|
|
86
|
-
return /*#__PURE__*/React.createElement(ErrorMessage,
|
|
88
|
+
return /*#__PURE__*/React.createElement(ErrorMessage, {
|
|
89
|
+
testId: "config-panel-error-message"
|
|
90
|
+
}, intl.formatMessage(messages.invalid));
|
|
87
91
|
case FieldTypeError.isMultipleAndRadio:
|
|
88
|
-
return /*#__PURE__*/React.createElement(ErrorMessage,
|
|
92
|
+
return /*#__PURE__*/React.createElement(ErrorMessage, {
|
|
93
|
+
testId: "config-panel-error-message"
|
|
94
|
+
}, intl.formatMessage(messages.isMultipleAndRadio));
|
|
89
95
|
default:
|
|
90
96
|
return null;
|
|
91
97
|
}
|
|
@@ -95,7 +95,8 @@ function CustomSelect({
|
|
|
95
95
|
label: label,
|
|
96
96
|
isRequired: isRequired,
|
|
97
97
|
defaultValue: defaultValue,
|
|
98
|
-
validate: value => validate(field, value)
|
|
98
|
+
validate: value => validate(field, value),
|
|
99
|
+
testId: `config-panel-custom-select-${name}`
|
|
99
100
|
}, ({
|
|
100
101
|
fieldProps,
|
|
101
102
|
error
|
|
@@ -24,7 +24,8 @@ function Date({
|
|
|
24
24
|
label: label,
|
|
25
25
|
defaultValue: defaultValue,
|
|
26
26
|
isRequired: isRequired,
|
|
27
|
-
validate: value => validate(field, value)
|
|
27
|
+
validate: value => validate(field, value),
|
|
28
|
+
testId: `config-panel-date-picker-${name}`
|
|
28
29
|
}, ({
|
|
29
30
|
fieldProps,
|
|
30
31
|
error
|
|
@@ -93,7 +93,8 @@ const DateRange = function ({
|
|
|
93
93
|
label: field.label,
|
|
94
94
|
defaultValue: currentValue,
|
|
95
95
|
isRequired: field.isRequired,
|
|
96
|
-
validate: value => validate(field, value || '')
|
|
96
|
+
validate: value => validate(field, value || ''),
|
|
97
|
+
testId: `config-panel-date-range-${name}`
|
|
97
98
|
}, ({
|
|
98
99
|
fieldProps,
|
|
99
100
|
error
|
|
@@ -37,7 +37,8 @@ export default function Number({
|
|
|
37
37
|
label: label,
|
|
38
38
|
defaultValue: defaultValue === undefined ? '' : String(defaultValue),
|
|
39
39
|
isRequired: isRequired,
|
|
40
|
-
validate: validateNumber
|
|
40
|
+
validate: validateNumber,
|
|
41
|
+
testId: `config-panel-number-${name}`
|
|
41
42
|
}, ({
|
|
42
43
|
fieldProps,
|
|
43
44
|
error,
|
|
@@ -20,7 +20,8 @@ export default function RadioField({
|
|
|
20
20
|
label: field.label,
|
|
21
21
|
defaultValue: field.defaultValue,
|
|
22
22
|
isRequired: field.isRequired,
|
|
23
|
-
validate: value => validate(field, value)
|
|
23
|
+
validate: value => validate(field, value),
|
|
24
|
+
testId: `config-panel-radio-group-${field.name}`
|
|
24
25
|
}, ({
|
|
25
26
|
fieldProps,
|
|
26
27
|
error
|
|
@@ -20,6 +20,7 @@ export default function SelectField({
|
|
|
20
20
|
name: name,
|
|
21
21
|
label: field.label,
|
|
22
22
|
defaultValue: getOptionFromValue(field.items, field.defaultValue),
|
|
23
|
+
testId: `config-panel-select-${name}`,
|
|
23
24
|
isRequired: field.isRequired,
|
|
24
25
|
validate: value => {
|
|
25
26
|
return validate(field, value);
|
|
@@ -23,7 +23,8 @@ export default function String({
|
|
|
23
23
|
label: label,
|
|
24
24
|
defaultValue: defaultValue || '',
|
|
25
25
|
isRequired: isRequired,
|
|
26
|
-
validate: value => validate(field, value || '')
|
|
26
|
+
validate: value => validate(field, value || ''),
|
|
27
|
+
testId: `config-panel-string-${name}`
|
|
27
28
|
}, ({
|
|
28
29
|
fieldProps,
|
|
29
30
|
error,
|
|
@@ -43,7 +44,8 @@ export default function String({
|
|
|
43
44
|
fieldProps.onBlur();
|
|
44
45
|
onFieldChange(name, meta.dirty);
|
|
45
46
|
},
|
|
46
|
-
placeholder: placeholder
|
|
47
|
+
placeholder: placeholder,
|
|
48
|
+
"data-testid": `config-panel-textarea-${name}`
|
|
47
49
|
})), /*#__PURE__*/React.createElement(FieldMessages, {
|
|
48
50
|
error: error,
|
|
49
51
|
description: description
|
|
@@ -161,7 +161,8 @@ export default function UserSelect({
|
|
|
161
161
|
label: label,
|
|
162
162
|
isRequired: isRequired,
|
|
163
163
|
defaultValue: defaultValue,
|
|
164
|
-
validate: value => validate(field, value)
|
|
164
|
+
validate: value => validate(field, value),
|
|
165
|
+
testId: `config-panel-user-select-${name}`
|
|
165
166
|
}, ({
|
|
166
167
|
fieldProps,
|
|
167
168
|
error
|
|
@@ -15,7 +15,7 @@ const margin = 16;
|
|
|
15
15
|
const gapSizeForEllipsis = iconWidth + buttonWidth + margin * 2;
|
|
16
16
|
const item = css`
|
|
17
17
|
display: flex;
|
|
18
|
-
margin-bottom: 24px;
|
|
18
|
+
margin-bottom: ${"var(--ds-space-300, 24px)"};
|
|
19
19
|
`;
|
|
20
20
|
const itemIcon = css`
|
|
21
21
|
width: ${iconWidth}px;
|
|
@@ -40,7 +40,7 @@ const itemBody = css`
|
|
|
40
40
|
flex-wrap: nowrap;
|
|
41
41
|
justify-content: space-between;
|
|
42
42
|
line-height: 1.4;
|
|
43
|
-
margin: 0 16px;
|
|
43
|
+
margin: 0 ${"var(--ds-space-200, 16px)"};
|
|
44
44
|
flex-grow: 3;
|
|
45
45
|
max-width: calc(100% - ${gapSizeForEllipsis}px);
|
|
46
46
|
`;
|
|
@@ -55,7 +55,7 @@ const itemText = css`
|
|
|
55
55
|
.item-summary {
|
|
56
56
|
font-size: ${relativeFontSizeToBase16(11.67)};
|
|
57
57
|
color: ${`var(--ds-text-subtlest, ${N200})`};
|
|
58
|
-
margin-top: 4px;
|
|
58
|
+
margin-top: ${"var(--ds-space-050, 4px)"};
|
|
59
59
|
|
|
60
60
|
white-space: nowrap;
|
|
61
61
|
overflow: hidden;
|
|
@@ -63,7 +63,7 @@ const itemText = css`
|
|
|
63
63
|
}
|
|
64
64
|
`;
|
|
65
65
|
const descriptionStyle = css`
|
|
66
|
-
margin-bottom: 24px;
|
|
66
|
+
margin-bottom: ${"var(--ds-space-300, 24px)"};
|
|
67
67
|
`;
|
|
68
68
|
const closeButtonWrapper = css`
|
|
69
69
|
width: ${buttonWidth}px;
|
|
@@ -94,12 +94,14 @@ const Header = ({
|
|
|
94
94
|
css: itemText
|
|
95
95
|
}, jsx("div", {
|
|
96
96
|
className: "item-title",
|
|
97
|
-
id: "context-panel-title"
|
|
97
|
+
id: "context-panel-title",
|
|
98
|
+
"data-testId": "context-panel-title"
|
|
98
99
|
}, title), jsx("div", {
|
|
99
100
|
className: "item-summary"
|
|
100
101
|
}, summary)) : jsx("div", {
|
|
101
102
|
css: centeredItemTitle,
|
|
102
|
-
id: "context-panel-title"
|
|
103
|
+
id: "context-panel-title",
|
|
104
|
+
"data-testId": "context-panel-title"
|
|
103
105
|
}, title)), jsx("div", {
|
|
104
106
|
css: closeButtonWrapper
|
|
105
107
|
}, jsx(Button, {
|
|
@@ -109,11 +111,13 @@ const Header = ({
|
|
|
109
111
|
}),
|
|
110
112
|
onClick: onClose
|
|
111
113
|
}))), (description || documentationUrl) && jsx("p", {
|
|
112
|
-
css: descriptionStyle
|
|
114
|
+
css: descriptionStyle,
|
|
115
|
+
"data-testid": "config-panel-header-description"
|
|
113
116
|
}, description && jsx(Fragment, null, description.replace(/([^.])$/, '$1.'), " "), documentationUrl && jsx("a", {
|
|
114
117
|
target: "_blank",
|
|
115
118
|
rel: "noopener noreferrer",
|
|
116
|
-
href: documentationUrl
|
|
119
|
+
href: documentationUrl,
|
|
120
|
+
"data-testid": "config-panel-header-documentation-link"
|
|
117
121
|
}, intl.formatMessage(messages.documentation))));
|
|
118
122
|
};
|
|
119
123
|
export default injectIntl(Header);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "189.
|
|
2
|
+
export const version = "189.6.0";
|
|
@@ -19,7 +19,8 @@ var ConfigPanelErrorMessage = function ConfigPanelErrorMessage(_ref) {
|
|
|
19
19
|
return /*#__PURE__*/React.createElement(ErrorImage, null);
|
|
20
20
|
},
|
|
21
21
|
size: "narrow",
|
|
22
|
-
imageHeight: 80
|
|
22
|
+
imageHeight: 80,
|
|
23
|
+
testId: "config-panel-error-message"
|
|
23
24
|
});
|
|
24
25
|
};
|
|
25
26
|
export default injectIntl(ConfigPanelErrorMessage);
|
|
@@ -77,11 +77,17 @@ var FieldMessages = function FieldMessages(_ref2) {
|
|
|
77
77
|
}
|
|
78
78
|
switch (error) {
|
|
79
79
|
case ValidationError.Required:
|
|
80
|
-
return /*#__PURE__*/React.createElement(ErrorMessage,
|
|
80
|
+
return /*#__PURE__*/React.createElement(ErrorMessage, {
|
|
81
|
+
testId: "config-panel-error-message"
|
|
82
|
+
}, intl.formatMessage(messages.required));
|
|
81
83
|
case ValidationError.Invalid:
|
|
82
|
-
return /*#__PURE__*/React.createElement(ErrorMessage,
|
|
84
|
+
return /*#__PURE__*/React.createElement(ErrorMessage, {
|
|
85
|
+
testId: "config-panel-error-message"
|
|
86
|
+
}, intl.formatMessage(messages.invalid));
|
|
83
87
|
case FieldTypeError.isMultipleAndRadio:
|
|
84
|
-
return /*#__PURE__*/React.createElement(ErrorMessage,
|
|
88
|
+
return /*#__PURE__*/React.createElement(ErrorMessage, {
|
|
89
|
+
testId: "config-panel-error-message"
|
|
90
|
+
}, intl.formatMessage(messages.isMultipleAndRadio));
|
|
85
91
|
default:
|
|
86
92
|
return null;
|
|
87
93
|
}
|
|
@@ -87,7 +87,8 @@ function Toggle(_ref3) {
|
|
|
87
87
|
validate: function validate(value) {
|
|
88
88
|
return _validate(value, isRequired);
|
|
89
89
|
},
|
|
90
|
-
defaultValue: defaultValue
|
|
90
|
+
defaultValue: defaultValue,
|
|
91
|
+
testId: "config-panel-toggle-".concat(name)
|
|
91
92
|
}, function (_ref4) {
|
|
92
93
|
var fieldProps = _ref4.fieldProps,
|
|
93
94
|
error = _ref4.error;
|
|
@@ -363,6 +363,7 @@ var ColorPickerField = function ColorPickerField(_ref) {
|
|
|
363
363
|
name: name,
|
|
364
364
|
isRequired: isRequired,
|
|
365
365
|
defaultValue: defaultValue,
|
|
366
|
+
testId: "config-panel-color-picker-".concat(name),
|
|
366
367
|
validate: function validate(value) {
|
|
367
368
|
return _validate(field, value || '');
|
|
368
369
|
}
|
|
@@ -140,7 +140,8 @@ function CustomSelect(_ref2) {
|
|
|
140
140
|
defaultValue: defaultValue,
|
|
141
141
|
validate: function validate(value) {
|
|
142
142
|
return _validate(field, value);
|
|
143
|
-
}
|
|
143
|
+
},
|
|
144
|
+
testId: "config-panel-custom-select-".concat(name)
|
|
144
145
|
}, function (_ref3) {
|
|
145
146
|
var fieldProps = _ref3.fieldProps,
|
|
146
147
|
error = _ref3.error;
|
|
@@ -23,7 +23,8 @@ function Date(_ref) {
|
|
|
23
23
|
isRequired: isRequired,
|
|
24
24
|
validate: function validate(value) {
|
|
25
25
|
return _validate(field, value);
|
|
26
|
-
}
|
|
26
|
+
},
|
|
27
|
+
testId: "config-panel-date-picker-".concat(name)
|
|
27
28
|
}, function (_ref2) {
|
|
28
29
|
var fieldProps = _ref2.fieldProps,
|
|
29
30
|
error = _ref2.error;
|
|
@@ -100,7 +100,8 @@ var DateRange = function DateRange(_ref3) {
|
|
|
100
100
|
isRequired: field.isRequired,
|
|
101
101
|
validate: function validate(value) {
|
|
102
102
|
return _validate(field, value || '');
|
|
103
|
-
}
|
|
103
|
+
},
|
|
104
|
+
testId: "config-panel-date-range-".concat(name)
|
|
104
105
|
}, function (_ref5) {
|
|
105
106
|
var fieldProps = _ref5.fieldProps,
|
|
106
107
|
error = _ref5.error;
|
|
@@ -34,7 +34,8 @@ export default function Number(_ref) {
|
|
|
34
34
|
label: label,
|
|
35
35
|
defaultValue: defaultValue === undefined ? '' : String(defaultValue),
|
|
36
36
|
isRequired: isRequired,
|
|
37
|
-
validate: validateNumber
|
|
37
|
+
validate: validateNumber,
|
|
38
|
+
testId: "config-panel-number-".concat(name)
|
|
38
39
|
}, function (_ref2) {
|
|
39
40
|
var fieldProps = _ref2.fieldProps,
|
|
40
41
|
error = _ref2.error,
|
|
@@ -24,7 +24,8 @@ export default function RadioField(_ref) {
|
|
|
24
24
|
isRequired: field.isRequired,
|
|
25
25
|
validate: function validate(value) {
|
|
26
26
|
return _validate(field, value);
|
|
27
|
-
}
|
|
27
|
+
},
|
|
28
|
+
testId: "config-panel-radio-group-".concat(field.name)
|
|
28
29
|
}, function (_ref2) {
|
|
29
30
|
var fieldProps = _ref2.fieldProps,
|
|
30
31
|
error = _ref2.error;
|
|
@@ -19,6 +19,7 @@ export default function SelectField(_ref) {
|
|
|
19
19
|
name: name,
|
|
20
20
|
label: field.label,
|
|
21
21
|
defaultValue: getOptionFromValue(field.items, field.defaultValue),
|
|
22
|
+
testId: "config-panel-select-".concat(name),
|
|
22
23
|
isRequired: field.isRequired,
|
|
23
24
|
validate: function validate(value) {
|
|
24
25
|
return _validate(field, value);
|
|
@@ -24,7 +24,8 @@ export default function String(_ref) {
|
|
|
24
24
|
isRequired: isRequired,
|
|
25
25
|
validate: function validate(value) {
|
|
26
26
|
return _validate(field, value || '');
|
|
27
|
-
}
|
|
27
|
+
},
|
|
28
|
+
testId: "config-panel-string-".concat(name)
|
|
28
29
|
}, function (_ref2) {
|
|
29
30
|
var fieldProps = _ref2.fieldProps,
|
|
30
31
|
error = _ref2.error,
|
|
@@ -41,7 +42,8 @@ export default function String(_ref) {
|
|
|
41
42
|
fieldProps.onBlur();
|
|
42
43
|
onFieldChange(name, meta.dirty);
|
|
43
44
|
},
|
|
44
|
-
placeholder: placeholder
|
|
45
|
+
placeholder: placeholder,
|
|
46
|
+
"data-testid": "config-panel-textarea-".concat(name)
|
|
45
47
|
})), /*#__PURE__*/React.createElement(FieldMessages, {
|
|
46
48
|
error: error,
|
|
47
49
|
description: description
|
|
@@ -224,7 +224,8 @@ export default function UserSelect(_ref2) {
|
|
|
224
224
|
defaultValue: defaultValue,
|
|
225
225
|
validate: function validate(value) {
|
|
226
226
|
return _validate(field, value);
|
|
227
|
-
}
|
|
227
|
+
},
|
|
228
|
+
testId: "config-panel-user-select-".concat(name)
|
|
228
229
|
}, function (_ref3) {
|
|
229
230
|
var fieldProps = _ref3.fieldProps,
|
|
230
231
|
error = _ref3.error;
|