@atlaskit/editor-core 189.4.17 → 189.4.18
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 +28 -0
- package/dist/cjs/composable-editor/editor-internal.js +11 -11
- package/dist/cjs/composable-editor/editor.js +7 -8
- package/dist/cjs/composable-editor/hooks/useEditorMeasuresConstructor.js +0 -2
- package/dist/cjs/composable-editor/hooks/useMeasureEditorMountTime.js +0 -2
- package/dist/cjs/editor.js +3 -4
- package/dist/cjs/plugins/alignment/ui/ToolbarAlignment/index.js +10 -11
- package/dist/cjs/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +2 -3
- package/dist/cjs/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +1 -2
- package/dist/cjs/plugins/breakout/ui/LayoutButton.js +5 -6
- package/dist/cjs/plugins/collab-edit/ui/avatars.js +2 -5
- package/dist/cjs/plugins/collab-edit/ui/colored-avatar-item.js +1 -4
- package/dist/cjs/plugins/collab-edit/ui/invite-to-edit.js +4 -7
- package/dist/cjs/plugins/extension/ui/Extension/Extension/index.js +11 -13
- package/dist/cjs/plugins/extension/ui/Extension/InlineExtension/index.js +4 -5
- package/dist/cjs/plugins/extension/ui/Extension/Lozenge.js +8 -9
- package/dist/cjs/plugins/extension/ui/Extension/MultiBodiedExtension/index.js +4 -4
- package/dist/cjs/plugins/extension/ui/SaveIndicator/SaveIndicator.js +6 -7
- package/dist/cjs/plugins/find-replace/ui/Find.js +13 -14
- package/dist/cjs/plugins/find-replace/ui/FindReplace.js +5 -6
- package/dist/cjs/plugins/find-replace/ui/FindReplaceToolbarButton.js +7 -8
- package/dist/cjs/plugins/find-replace/ui/Replace.js +5 -6
- package/dist/cjs/plugins/find-replace/ui/styles.js +0 -1
- package/dist/cjs/plugins/jira-issue/nodeviews/jira-issue.js +4 -5
- package/dist/cjs/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +8 -11
- package/dist/cjs/ui/Addon/ClickAreaBlock/index.js +1 -2
- package/dist/cjs/ui/Addon/ClickAreaInline/index.js +1 -2
- package/dist/cjs/ui/Addon/ClickAreaMobile/index.js +1 -2
- package/dist/cjs/ui/Addon/Dropdown/index.js +2 -3
- package/dist/cjs/ui/Addon/DropdownItem/index.js +2 -5
- package/dist/cjs/ui/Alignment/index.js +6 -7
- package/dist/cjs/ui/Appearance/Chromeless.js +6 -7
- package/dist/cjs/ui/Appearance/Comment/Comment.js +16 -17
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +4 -5
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +3 -6
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +10 -12
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +13 -15
- package/dist/cjs/ui/AppearanceComponents/Mobile.js +5 -6
- package/dist/cjs/ui/ChromeCollapsed/index.js +2 -3
- package/dist/cjs/ui/ConfigPanel/ErrorMessage/ErrorImage.js +15 -16
- package/dist/cjs/ui/ConfigPanel/Fields/Boolean.js +11 -12
- package/dist/cjs/ui/ConfigPanel/Fields/CheckboxGroup.js +6 -7
- package/dist/cjs/ui/ConfigPanel/Fields/ColorPicker.js +8 -8
- package/dist/cjs/ui/ConfigPanel/Fields/DateRange.js +17 -18
- package/dist/cjs/ui/ConfigPanel/Fields/Expand.js +8 -9
- package/dist/cjs/ui/ConfigPanel/Fields/Fieldset.js +9 -10
- package/dist/cjs/ui/ConfigPanel/Fields/SelectItem.js +5 -6
- package/dist/cjs/ui/ConfigPanel/Fields/TabGroup.js +6 -7
- package/dist/cjs/ui/ConfigPanel/Header.js +13 -14
- package/dist/cjs/ui/ConfigPanel/LoadingState.js +2 -3
- package/dist/cjs/ui/ConfigPanel/NestedForms/RemovableField.js +4 -5
- package/dist/cjs/ui/ContentStyles/index.js +1 -2
- package/dist/cjs/ui/ContextPanel/index.js +10 -11
- package/dist/cjs/ui/PluginSlot/index.js +3 -4
- package/dist/cjs/ui/Toolbar/ToolbarInner.js +1 -2
- package/dist/cjs/ui/Toolbar/ToolbarWithSizeDetector.js +4 -5
- package/dist/cjs/ui/ToolbarFeedback/index.js +15 -16
- package/dist/cjs/ui/WithFlash/index.js +1 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/composable-editor/editor-internal.js +11 -12
- package/dist/es2019/composable-editor/editor.js +6 -8
- package/dist/es2019/composable-editor/hooks/useEditorMeasuresConstructor.js +0 -2
- package/dist/es2019/composable-editor/hooks/useMeasureEditorMountTime.js +0 -1
- package/dist/es2019/editor.js +2 -4
- package/dist/es2019/plugins/alignment/ui/ToolbarAlignment/index.js +9 -11
- package/dist/es2019/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +3 -4
- package/dist/es2019/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +2 -3
- package/dist/es2019/plugins/breakout/ui/LayoutButton.js +6 -7
- package/dist/es2019/plugins/collab-edit/ui/avatars.js +2 -4
- package/dist/es2019/plugins/collab-edit/ui/colored-avatar-item.js +1 -3
- package/dist/es2019/plugins/collab-edit/ui/invite-to-edit.js +4 -6
- package/dist/es2019/plugins/extension/ui/Extension/Extension/index.js +11 -14
- package/dist/es2019/plugins/extension/ui/Extension/InlineExtension/index.js +3 -5
- package/dist/es2019/plugins/extension/ui/Extension/Lozenge.js +5 -7
- package/dist/es2019/plugins/extension/ui/Extension/MultiBodiedExtension/index.js +4 -6
- package/dist/es2019/plugins/extension/ui/SaveIndicator/SaveIndicator.js +7 -8
- package/dist/es2019/plugins/find-replace/ui/Find.js +12 -14
- package/dist/es2019/plugins/find-replace/ui/FindReplace.js +4 -6
- package/dist/es2019/plugins/find-replace/ui/FindReplaceToolbarButton.js +8 -9
- package/dist/es2019/plugins/find-replace/ui/Replace.js +4 -6
- package/dist/es2019/plugins/find-replace/ui/styles.js +0 -1
- package/dist/es2019/plugins/jira-issue/nodeviews/jira-issue.js +5 -6
- package/dist/es2019/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +8 -10
- package/dist/es2019/ui/Addon/ClickAreaBlock/index.js +2 -3
- package/dist/es2019/ui/Addon/ClickAreaInline/index.js +2 -3
- package/dist/es2019/ui/Addon/ClickAreaMobile/index.js +2 -3
- package/dist/es2019/ui/Addon/Dropdown/index.js +1 -3
- package/dist/es2019/ui/Addon/DropdownItem/index.js +2 -4
- package/dist/es2019/ui/Alignment/index.js +3 -5
- package/dist/es2019/ui/Appearance/Chromeless.js +7 -8
- package/dist/es2019/ui/Appearance/Comment/Comment.js +17 -18
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +5 -7
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +3 -5
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +11 -12
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +13 -15
- package/dist/es2019/ui/AppearanceComponents/Mobile.js +6 -7
- package/dist/es2019/ui/ChromeCollapsed/index.js +1 -3
- package/dist/es2019/ui/ConfigPanel/ErrorMessage/ErrorImage.js +17 -17
- package/dist/es2019/ui/ConfigPanel/Fields/Boolean.js +12 -13
- package/dist/es2019/ui/ConfigPanel/Fields/CheckboxGroup.js +7 -8
- package/dist/es2019/ui/ConfigPanel/Fields/ColorPicker.js +8 -9
- package/dist/es2019/ui/ConfigPanel/Fields/DateRange.js +18 -19
- package/dist/es2019/ui/ConfigPanel/Fields/Expand.js +9 -10
- package/dist/es2019/ui/ConfigPanel/Fields/Fieldset.js +10 -11
- package/dist/es2019/ui/ConfigPanel/Fields/SelectItem.js +6 -7
- package/dist/es2019/ui/ConfigPanel/Fields/TabGroup.js +7 -8
- package/dist/es2019/ui/ConfigPanel/Header.js +14 -15
- package/dist/es2019/ui/ConfigPanel/LoadingState.js +3 -4
- package/dist/es2019/ui/ConfigPanel/NestedForms/RemovableField.js +5 -6
- package/dist/es2019/ui/ContentStyles/index.js +2 -3
- package/dist/es2019/ui/ContextPanel/index.js +11 -12
- package/dist/es2019/ui/PluginSlot/index.js +4 -5
- package/dist/es2019/ui/Toolbar/ToolbarInner.js +2 -3
- package/dist/es2019/ui/Toolbar/ToolbarWithSizeDetector.js +5 -6
- package/dist/es2019/ui/ToolbarFeedback/index.js +12 -14
- package/dist/es2019/ui/WithFlash/index.js +2 -3
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/composable-editor/editor-internal.js +11 -12
- package/dist/esm/composable-editor/editor.js +6 -8
- package/dist/esm/composable-editor/hooks/useEditorMeasuresConstructor.js +0 -2
- package/dist/esm/composable-editor/hooks/useMeasureEditorMountTime.js +0 -1
- package/dist/esm/editor.js +2 -4
- package/dist/esm/plugins/alignment/ui/ToolbarAlignment/index.js +9 -11
- package/dist/esm/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +3 -4
- package/dist/esm/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +2 -3
- package/dist/esm/plugins/breakout/ui/LayoutButton.js +6 -7
- package/dist/esm/plugins/collab-edit/ui/avatars.js +2 -4
- package/dist/esm/plugins/collab-edit/ui/colored-avatar-item.js +1 -3
- package/dist/esm/plugins/collab-edit/ui/invite-to-edit.js +4 -6
- package/dist/esm/plugins/extension/ui/Extension/Extension/index.js +11 -14
- package/dist/esm/plugins/extension/ui/Extension/InlineExtension/index.js +3 -5
- package/dist/esm/plugins/extension/ui/Extension/Lozenge.js +5 -7
- package/dist/esm/plugins/extension/ui/Extension/MultiBodiedExtension/index.js +4 -6
- package/dist/esm/plugins/extension/ui/SaveIndicator/SaveIndicator.js +7 -8
- package/dist/esm/plugins/find-replace/ui/Find.js +12 -14
- package/dist/esm/plugins/find-replace/ui/FindReplace.js +4 -6
- package/dist/esm/plugins/find-replace/ui/FindReplaceToolbarButton.js +8 -9
- package/dist/esm/plugins/find-replace/ui/Replace.js +4 -6
- package/dist/esm/plugins/find-replace/ui/styles.js +0 -1
- package/dist/esm/plugins/jira-issue/nodeviews/jira-issue.js +5 -6
- package/dist/esm/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +8 -10
- package/dist/esm/ui/Addon/ClickAreaBlock/index.js +2 -3
- package/dist/esm/ui/Addon/ClickAreaInline/index.js +2 -3
- package/dist/esm/ui/Addon/ClickAreaMobile/index.js +2 -3
- package/dist/esm/ui/Addon/Dropdown/index.js +1 -3
- package/dist/esm/ui/Addon/DropdownItem/index.js +2 -4
- package/dist/esm/ui/Alignment/index.js +3 -5
- package/dist/esm/ui/Appearance/Chromeless.js +7 -8
- package/dist/esm/ui/Appearance/Comment/Comment.js +17 -18
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +5 -7
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +3 -5
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +11 -12
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +13 -15
- package/dist/esm/ui/AppearanceComponents/Mobile.js +6 -7
- package/dist/esm/ui/ChromeCollapsed/index.js +1 -3
- package/dist/esm/ui/ConfigPanel/ErrorMessage/ErrorImage.js +17 -17
- package/dist/esm/ui/ConfigPanel/Fields/Boolean.js +12 -13
- package/dist/esm/ui/ConfigPanel/Fields/CheckboxGroup.js +7 -8
- package/dist/esm/ui/ConfigPanel/Fields/ColorPicker.js +8 -9
- package/dist/esm/ui/ConfigPanel/Fields/DateRange.js +18 -19
- package/dist/esm/ui/ConfigPanel/Fields/Expand.js +9 -10
- package/dist/esm/ui/ConfigPanel/Fields/Fieldset.js +10 -11
- package/dist/esm/ui/ConfigPanel/Fields/SelectItem.js +6 -7
- package/dist/esm/ui/ConfigPanel/Fields/TabGroup.js +7 -8
- package/dist/esm/ui/ConfigPanel/Header.js +14 -15
- package/dist/esm/ui/ConfigPanel/LoadingState.js +3 -4
- package/dist/esm/ui/ConfigPanel/NestedForms/RemovableField.js +5 -6
- package/dist/esm/ui/ContentStyles/index.js +2 -3
- package/dist/esm/ui/ContextPanel/index.js +11 -12
- package/dist/esm/ui/PluginSlot/index.js +4 -5
- package/dist/esm/ui/Toolbar/ToolbarInner.js +2 -3
- package/dist/esm/ui/Toolbar/ToolbarWithSizeDetector.js +5 -6
- package/dist/esm/ui/ToolbarFeedback/index.js +12 -14
- package/dist/esm/ui/WithFlash/index.js +2 -3
- package/dist/esm/version-wrapper.js +1 -1
- package/package.json +8 -4
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/** @jsx jsx */
|
|
3
2
|
import { Fragment, useState, useEffect, useMemo } from 'react';
|
|
4
|
-
import { css
|
|
3
|
+
import { css } from '@emotion/react';
|
|
5
4
|
import { injectIntl } from 'react-intl-next';
|
|
6
5
|
import { Field } from '@atlaskit/form';
|
|
7
6
|
import { RadioGroup } from '@atlaskit/radio';
|
|
@@ -33,10 +32,10 @@ const DateField = ({
|
|
|
33
32
|
onFieldChange,
|
|
34
33
|
intl,
|
|
35
34
|
isRequired
|
|
36
|
-
}) =>
|
|
35
|
+
}) => /*#__PURE__*/React.createElement("div", {
|
|
37
36
|
css: horizontalFieldWrapper,
|
|
38
37
|
key: fieldName
|
|
39
|
-
},
|
|
38
|
+
}, /*#__PURE__*/React.createElement(Field, {
|
|
40
39
|
name: `${scope}.${fieldName}`,
|
|
41
40
|
label: intl.formatMessage(messages[fieldName]),
|
|
42
41
|
defaultValue: getFromDefaultValue(parentField, fieldName),
|
|
@@ -49,13 +48,13 @@ const DateField = ({
|
|
|
49
48
|
}, ({
|
|
50
49
|
fieldProps,
|
|
51
50
|
error
|
|
52
|
-
}) =>
|
|
51
|
+
}) => /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(DatePicker, _extends({}, fieldProps, {
|
|
53
52
|
onChange: date => {
|
|
54
53
|
fieldProps.onChange(date);
|
|
55
54
|
onFieldChange(parentField.name, true);
|
|
56
55
|
},
|
|
57
56
|
locale: intl.locale
|
|
58
|
-
})),
|
|
57
|
+
})), /*#__PURE__*/React.createElement(FieldMessages, {
|
|
59
58
|
error: error
|
|
60
59
|
}))));
|
|
61
60
|
const DateRange = function ({
|
|
@@ -79,16 +78,16 @@ const DateRange = function ({
|
|
|
79
78
|
// get the most up to date value after the form has been rendered
|
|
80
79
|
onFieldChange(name, true);
|
|
81
80
|
}, [currentValue, onFieldChange, name]);
|
|
82
|
-
const element =
|
|
81
|
+
const element = /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
83
82
|
css: hidden
|
|
84
|
-
},
|
|
83
|
+
}, /*#__PURE__*/React.createElement(Field, {
|
|
85
84
|
name: `${name}.type`,
|
|
86
85
|
defaultValue: 'date-range'
|
|
87
86
|
}, ({
|
|
88
87
|
fieldProps
|
|
89
|
-
}) =>
|
|
88
|
+
}) => /*#__PURE__*/React.createElement(TextField, _extends({}, fieldProps, {
|
|
90
89
|
type: "hidden"
|
|
91
|
-
})))),
|
|
90
|
+
})))), /*#__PURE__*/React.createElement(Field, {
|
|
92
91
|
name: `${name}.value`,
|
|
93
92
|
label: field.label,
|
|
94
93
|
defaultValue: currentValue,
|
|
@@ -97,40 +96,40 @@ const DateRange = function ({
|
|
|
97
96
|
}, ({
|
|
98
97
|
fieldProps,
|
|
99
98
|
error
|
|
100
|
-
}) =>
|
|
99
|
+
}) => /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(RadioGroup, _extends({}, fieldProps, {
|
|
101
100
|
options: items,
|
|
102
101
|
onChange: event => {
|
|
103
102
|
fieldProps.onChange(event.target.value);
|
|
104
103
|
setCurrentValue(event.target.value);
|
|
105
104
|
}
|
|
106
|
-
})),
|
|
105
|
+
})), /*#__PURE__*/React.createElement(FieldMessages, {
|
|
107
106
|
error: error
|
|
108
|
-
}))), currentValue !== 'custom' ?
|
|
107
|
+
}))), currentValue !== 'custom' ? /*#__PURE__*/React.createElement("div", {
|
|
109
108
|
css: hidden
|
|
110
|
-
},
|
|
109
|
+
}, /*#__PURE__*/React.createElement(Field, {
|
|
111
110
|
name: `${name}.from`,
|
|
112
111
|
defaultValue: currentValue
|
|
113
112
|
}, ({
|
|
114
113
|
fieldProps
|
|
115
|
-
}) =>
|
|
114
|
+
}) => /*#__PURE__*/React.createElement(TextField, _extends({}, fieldProps, {
|
|
116
115
|
type: "hidden"
|
|
117
|
-
})))) :
|
|
116
|
+
})))) : /*#__PURE__*/React.createElement("div", {
|
|
118
117
|
css: horizontalFields
|
|
119
|
-
},
|
|
118
|
+
}, /*#__PURE__*/React.createElement(DateField, {
|
|
120
119
|
scope: name,
|
|
121
120
|
parentField: field,
|
|
122
121
|
fieldName: "from",
|
|
123
122
|
onFieldChange: onFieldChange,
|
|
124
123
|
intl: intl,
|
|
125
124
|
isRequired: field.isRequired
|
|
126
|
-
}),
|
|
125
|
+
}), /*#__PURE__*/React.createElement(DateField, {
|
|
127
126
|
scope: name,
|
|
128
127
|
parentField: field,
|
|
129
128
|
fieldName: "to",
|
|
130
129
|
onFieldChange: onFieldChange,
|
|
131
130
|
intl: intl,
|
|
132
131
|
isRequired: field.isRequired
|
|
133
|
-
})),
|
|
132
|
+
})), /*#__PURE__*/React.createElement(FieldMessages, {
|
|
134
133
|
description: field.description
|
|
135
134
|
}));
|
|
136
135
|
return element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
1
|
import React, { useState } from 'react';
|
|
3
|
-
import { css
|
|
2
|
+
import { css } from '@emotion/react';
|
|
4
3
|
import { injectIntl } from 'react-intl-next';
|
|
5
4
|
import { N40 } from '@atlaskit/theme/colors';
|
|
6
5
|
import ChevronDownIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
@@ -42,26 +41,26 @@ function Expand({
|
|
|
42
41
|
intl
|
|
43
42
|
}) {
|
|
44
43
|
const [expanded, setExpanded] = useState(isExpanded);
|
|
45
|
-
return
|
|
44
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
46
45
|
"data-testid": "expand-config-field",
|
|
47
46
|
css: expandContainer
|
|
48
|
-
},
|
|
47
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
49
48
|
css: expandControl
|
|
50
|
-
},
|
|
49
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
51
50
|
css: labelContainer
|
|
52
|
-
}, field.label),
|
|
51
|
+
}, field.label), /*#__PURE__*/React.createElement("div", {
|
|
53
52
|
css: chevronContainer
|
|
54
|
-
},
|
|
53
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
55
54
|
onClick: () => {
|
|
56
55
|
setExpanded(!expanded);
|
|
57
56
|
},
|
|
58
57
|
testId: "form-expand-toggle",
|
|
59
|
-
iconBefore: expanded ?
|
|
58
|
+
iconBefore: expanded ? /*#__PURE__*/React.createElement(ChevronDownIcon, {
|
|
60
59
|
label: intl.formatMessage(messages.collapse)
|
|
61
|
-
}) :
|
|
60
|
+
}) : /*#__PURE__*/React.createElement(ChevronRightIcon, {
|
|
62
61
|
label: intl.formatMessage(messages.expand)
|
|
63
62
|
})
|
|
64
|
-
}))),
|
|
63
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
65
64
|
"data-testid": "expand-content-container",
|
|
66
65
|
css: expandContentContainer(!expanded)
|
|
67
66
|
}, children));
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
/** @jsx jsx */
|
|
3
2
|
import React, { Fragment } from 'react';
|
|
4
|
-
import { css
|
|
3
|
+
import { css } from '@emotion/react';
|
|
5
4
|
import { injectIntl } from 'react-intl-next';
|
|
6
5
|
import SectionMessage from '@atlaskit/section-message';
|
|
7
6
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
@@ -144,7 +143,7 @@ class FieldsetField extends React.Component {
|
|
|
144
143
|
if (selectOptions.length === 0) {
|
|
145
144
|
return null;
|
|
146
145
|
}
|
|
147
|
-
return
|
|
146
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, isAdding ? /*#__PURE__*/React.createElement(Select, {
|
|
148
147
|
testId: "field-picker",
|
|
149
148
|
defaultMenuIsOpen: true,
|
|
150
149
|
autoFocus: true,
|
|
@@ -155,10 +154,10 @@ class FieldsetField extends React.Component {
|
|
|
155
154
|
this.onSelectItem(option);
|
|
156
155
|
}
|
|
157
156
|
}
|
|
158
|
-
}) :
|
|
157
|
+
}) : /*#__PURE__*/React.createElement(Button, {
|
|
159
158
|
testId: "add-more",
|
|
160
159
|
appearance: "subtle",
|
|
161
|
-
iconBefore:
|
|
160
|
+
iconBefore: /*#__PURE__*/React.createElement(AddCircleIcon, {
|
|
162
161
|
size: "small",
|
|
163
162
|
label: intl.formatMessage(messages.addField)
|
|
164
163
|
}),
|
|
@@ -194,9 +193,9 @@ class FieldsetField extends React.Component {
|
|
|
194
193
|
visibleFields
|
|
195
194
|
} = this.state;
|
|
196
195
|
const children = this.renderActions();
|
|
197
|
-
return
|
|
196
|
+
return /*#__PURE__*/React.createElement(Fragment, null, error && /*#__PURE__*/React.createElement(FieldsetError, {
|
|
198
197
|
message: error
|
|
199
|
-
}),
|
|
198
|
+
}), /*#__PURE__*/React.createElement("div", null, options.showTitle && /*#__PURE__*/React.createElement("h5", null, label), /*#__PURE__*/React.createElement(FormComponent, {
|
|
200
199
|
fields: selectedFields,
|
|
201
200
|
parentName: name,
|
|
202
201
|
extensionManifest: extensionManifest,
|
|
@@ -205,7 +204,7 @@ class FieldsetField extends React.Component {
|
|
|
205
204
|
onClickRemove: this.onClickRemove,
|
|
206
205
|
onFieldChange: onFieldChange,
|
|
207
206
|
firstVisibleFieldName: firstVisibleFieldName
|
|
208
|
-
}), children &&
|
|
207
|
+
}), children && /*#__PURE__*/React.createElement("div", {
|
|
209
208
|
css: actionsWrapper,
|
|
210
209
|
"data-testId": "fieldset-actions"
|
|
211
210
|
}, children)));
|
|
@@ -214,11 +213,11 @@ class FieldsetField extends React.Component {
|
|
|
214
213
|
function FieldsetError({
|
|
215
214
|
message
|
|
216
215
|
}) {
|
|
217
|
-
return
|
|
216
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
218
217
|
css: sectionMessageWrapper
|
|
219
|
-
},
|
|
218
|
+
}, /*#__PURE__*/React.createElement(SectionMessage, {
|
|
220
219
|
appearance: "error"
|
|
221
|
-
},
|
|
220
|
+
}, /*#__PURE__*/React.createElement("p", null, message)));
|
|
222
221
|
}
|
|
223
222
|
const sectionMessageWrapper = css`
|
|
224
223
|
margin-bottom: 24px;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { css, jsx } from '@emotion/react';
|
|
1
|
+
import { css } from '@emotion/react';
|
|
3
2
|
import Avatar from '@atlaskit/avatar';
|
|
4
3
|
const itemWrapper = css`
|
|
5
4
|
display: flex;
|
|
@@ -31,17 +30,17 @@ export const formatOptionLabel = ({
|
|
|
31
30
|
}, {
|
|
32
31
|
context
|
|
33
32
|
}) => {
|
|
34
|
-
return
|
|
33
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
35
34
|
css: itemWrapper
|
|
36
|
-
},
|
|
35
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
37
36
|
css: [iconWrapper, context === 'menu' && iconWrapperMenu]
|
|
38
|
-
}, typeof icon === 'string' ?
|
|
37
|
+
}, typeof icon === 'string' ? /*#__PURE__*/React.createElement(Avatar, {
|
|
39
38
|
src: icon,
|
|
40
39
|
size: getIconSize(context, description),
|
|
41
40
|
appearance: "square"
|
|
42
|
-
}) : icon),
|
|
41
|
+
}) : icon), /*#__PURE__*/React.createElement("div", {
|
|
43
42
|
style: {
|
|
44
43
|
paddingLeft: icon ? "var(--ds-space-100, 8px)" : 0
|
|
45
44
|
}
|
|
46
|
-
},
|
|
45
|
+
}, /*#__PURE__*/React.createElement("p", null, label, description && context !== 'value' && /*#__PURE__*/React.createElement("small", null, description))));
|
|
47
46
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
1
|
import React, { useState } from 'react';
|
|
3
|
-
import { css
|
|
2
|
+
import { css } from '@emotion/react';
|
|
4
3
|
import { injectIntl } from 'react-intl-next';
|
|
5
4
|
import Tabs, { Tab, TabList, TabPanel } from '@atlaskit/tabs';
|
|
6
5
|
const tabWrapper = css`
|
|
@@ -34,20 +33,20 @@ const TabGroupImpl = props => {
|
|
|
34
33
|
const onChange = React.useCallback(index => {
|
|
35
34
|
setActiveTab(index);
|
|
36
35
|
}, [setActiveTab]);
|
|
37
|
-
return
|
|
36
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
38
37
|
css: tabWrapper
|
|
39
|
-
},
|
|
38
|
+
}, /*#__PURE__*/React.createElement(Tabs, {
|
|
40
39
|
id: `configPanelTabs-${field.name}`,
|
|
41
40
|
onChange: onChange,
|
|
42
41
|
selected: activeTab
|
|
43
|
-
},
|
|
42
|
+
}, /*#__PURE__*/React.createElement(TabList, null, fields.map(({
|
|
44
43
|
name,
|
|
45
44
|
label
|
|
46
|
-
}) =>
|
|
45
|
+
}) => /*#__PURE__*/React.createElement(Tab, {
|
|
47
46
|
key: `tab-${name}`
|
|
48
|
-
}, label))), fields.map(field =>
|
|
47
|
+
}, label))), fields.map(field => /*#__PURE__*/React.createElement(TabPanel, {
|
|
49
48
|
key: `panel-${field.name}`
|
|
50
|
-
},
|
|
49
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
51
50
|
css: panelWrapper
|
|
52
51
|
}, renderPanel(field))))));
|
|
53
52
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
1
|
import { Fragment } from 'react';
|
|
3
|
-
import { css
|
|
2
|
+
import { css } from '@emotion/react';
|
|
4
3
|
import { injectIntl } from 'react-intl-next';
|
|
5
4
|
import Loadable from 'react-loadable';
|
|
6
5
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
@@ -82,35 +81,35 @@ const Header = ({
|
|
|
82
81
|
loader: icon,
|
|
83
82
|
loading: () => null
|
|
84
83
|
});
|
|
85
|
-
return
|
|
84
|
+
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
86
85
|
css: item
|
|
87
|
-
},
|
|
86
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
88
87
|
css: itemIcon
|
|
89
|
-
},
|
|
88
|
+
}, /*#__PURE__*/React.createElement(ResolvedIcon, {
|
|
90
89
|
label: title
|
|
91
|
-
})),
|
|
90
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
92
91
|
css: itemBody
|
|
93
|
-
}, summary ?
|
|
92
|
+
}, summary ? /*#__PURE__*/React.createElement("div", {
|
|
94
93
|
css: itemText
|
|
95
|
-
},
|
|
94
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
96
95
|
className: "item-title",
|
|
97
96
|
id: "context-panel-title"
|
|
98
|
-
}, title),
|
|
97
|
+
}, title), /*#__PURE__*/React.createElement("div", {
|
|
99
98
|
className: "item-summary"
|
|
100
|
-
}, summary)) :
|
|
99
|
+
}, summary)) : /*#__PURE__*/React.createElement("div", {
|
|
101
100
|
css: centeredItemTitle,
|
|
102
101
|
id: "context-panel-title"
|
|
103
|
-
}, title)),
|
|
102
|
+
}, title)), /*#__PURE__*/React.createElement("div", {
|
|
104
103
|
css: closeButtonWrapper
|
|
105
|
-
},
|
|
104
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
106
105
|
appearance: "subtle",
|
|
107
|
-
iconBefore:
|
|
106
|
+
iconBefore: /*#__PURE__*/React.createElement(CrossIcon, {
|
|
108
107
|
label: intl.formatMessage(messages.close)
|
|
109
108
|
}),
|
|
110
109
|
onClick: onClose
|
|
111
|
-
}))), (description || documentationUrl) &&
|
|
110
|
+
}))), (description || documentationUrl) && /*#__PURE__*/React.createElement("p", {
|
|
112
111
|
css: descriptionStyle
|
|
113
|
-
}, description &&
|
|
112
|
+
}, description && /*#__PURE__*/React.createElement(Fragment, null, description.replace(/([^.])$/, '$1.'), " "), documentationUrl && /*#__PURE__*/React.createElement("a", {
|
|
114
113
|
target: "_blank",
|
|
115
114
|
rel: "noopener noreferrer",
|
|
116
115
|
href: documentationUrl
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
import { css, jsx } from '@emotion/react';
|
|
1
|
+
import { css } from '@emotion/react';
|
|
3
2
|
import Spinner from '@atlaskit/spinner';
|
|
4
3
|
const spinnerWrapper = css`
|
|
5
4
|
display: flex;
|
|
6
5
|
justify-content: center;
|
|
7
6
|
margin-top: ${"var(--ds-space-800, 64px)"};
|
|
8
7
|
`;
|
|
9
|
-
const LoadingState = () =>
|
|
8
|
+
const LoadingState = () => /*#__PURE__*/React.createElement("div", {
|
|
10
9
|
css: spinnerWrapper,
|
|
11
10
|
"data-testid": "ConfigPanelLoading"
|
|
12
|
-
},
|
|
11
|
+
}, /*#__PURE__*/React.createElement(Spinner, {
|
|
13
12
|
size: "small"
|
|
14
13
|
}));
|
|
15
14
|
export default LoadingState;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
1
|
import React from 'react';
|
|
3
|
-
import { css
|
|
2
|
+
import { css } from '@emotion/react';
|
|
4
3
|
import { injectIntl } from 'react-intl-next';
|
|
5
4
|
import CrossCircleIcon from '@atlaskit/icon/glyph/cross-circle';
|
|
6
5
|
import Tooltip from '@atlaskit/tooltip';
|
|
@@ -36,17 +35,17 @@ const RemovableField = ({
|
|
|
36
35
|
var _children$props$field;
|
|
37
36
|
const onClickCallback = React.useCallback(() => onClickRemove && onClickRemove(name), [name, onClickRemove]);
|
|
38
37
|
const hasMarginBottom = ((_children$props$field = children.props.field) === null || _children$props$field === void 0 ? void 0 : _children$props$field.type) !== 'expand';
|
|
39
|
-
return
|
|
38
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
40
39
|
css: [removableFieldWrapper, hasMarginBottom && wrapperWithMarginBottom],
|
|
41
40
|
className: className
|
|
42
|
-
}, children, canRemoveField &&
|
|
41
|
+
}, children, canRemoveField && /*#__PURE__*/React.createElement("div", {
|
|
43
42
|
css: removeButtonWrapper,
|
|
44
43
|
"data-testid": `remove-field-${name}`,
|
|
45
44
|
onClick: onClickCallback
|
|
46
|
-
},
|
|
45
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
47
46
|
content: intl.formatMessage(messages.removeField),
|
|
48
47
|
position: "left"
|
|
49
|
-
},
|
|
48
|
+
}, /*#__PURE__*/React.createElement(CrossCircleIcon, {
|
|
50
49
|
size: "small",
|
|
51
50
|
label: intl.formatMessage(messages.removeField)
|
|
52
51
|
}))));
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
1
|
import React, { useMemo } from 'react';
|
|
3
|
-
import {
|
|
2
|
+
import { css, useTheme } from '@emotion/react';
|
|
4
3
|
import { whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, shadowSharedStyle, dateSharedStyle, tasksAndDecisionsStyles, annotationSharedStyles, smartCardSharedStyles, textColorStyles, resizerStyles, gridStyles, smartCardStyles, embedCardStyles, codeBlockInListSafariFix, unsupportedStyles } from '@atlaskit/editor-common/styles';
|
|
5
4
|
import { akEditorSelectedBorderSize, akEditorDeleteBorder, akEditorDeleteBackgroundWithOpacity, akEditorSelectedNodeClassName, blockNodesVerticalMargin, editorFontSize, getSelectionStyles, SelectionStyle, akEditorLineHeight, akEditorSelectedBorderColor } from '@atlaskit/editor-shared-styles';
|
|
6
5
|
import { MentionSharedCssClassName } from '@atlaskit/editor-common/mention';
|
|
@@ -270,7 +269,7 @@ export const createEditorContentStyle = styles => {
|
|
|
270
269
|
theme,
|
|
271
270
|
featureFlags
|
|
272
271
|
}), [theme, featureFlags]);
|
|
273
|
-
return
|
|
272
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
274
273
|
className: className,
|
|
275
274
|
ref: ref,
|
|
276
275
|
css: [memoizedStyle, styles]
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
-
/** @jsx jsx */
|
|
4
3
|
import React, { useContext } from 'react';
|
|
5
|
-
import { css
|
|
4
|
+
import { css } from '@emotion/react';
|
|
6
5
|
import Transition from 'react-transition-group/Transition';
|
|
7
6
|
import { N30 } from '@atlaskit/theme/colors';
|
|
8
7
|
import { akEditorSwoopCubicBezier, akEditorDefaultLayoutWidth, akEditorWideLayoutWidth, akEditorBreakoutPadding, akEditorContextPanelWidth, ATLASSIAN_NAVIGATION_HEIGHT } from '@atlaskit/editor-shared-styles';
|
|
@@ -92,7 +91,7 @@ export class SwappableContentArea extends React.PureComponent {
|
|
|
92
91
|
if (!currentPluginContent) {
|
|
93
92
|
return;
|
|
94
93
|
}
|
|
95
|
-
return
|
|
94
|
+
return /*#__PURE__*/React.createElement(Transition, {
|
|
96
95
|
timeout: this.state.mounted ? ANIM_SPEED_MS : 0,
|
|
97
96
|
in: !!pluginContent,
|
|
98
97
|
mountOnEnter: true,
|
|
@@ -107,7 +106,7 @@ export class SwappableContentArea extends React.PureComponent {
|
|
|
107
106
|
if (!children) {
|
|
108
107
|
return;
|
|
109
108
|
}
|
|
110
|
-
return
|
|
109
|
+
return /*#__PURE__*/React.createElement(Transition, {
|
|
111
110
|
timeout: this.state.mounted ? ANIM_SPEED_MS : 0,
|
|
112
111
|
in: isVisible,
|
|
113
112
|
mountOnEnter: true,
|
|
@@ -144,7 +143,7 @@ export class SwappableContentArea extends React.PureComponent {
|
|
|
144
143
|
const width = akEditorContextPanelWidth;
|
|
145
144
|
const userVisible = !!this.props.visible;
|
|
146
145
|
const visible = userVisible || !!this.state.currentPluginContent;
|
|
147
|
-
return
|
|
146
|
+
return /*#__PURE__*/React.createElement(ContextPanelConsumer, null, ({
|
|
148
147
|
broadcastWidth,
|
|
149
148
|
broadcastPosition,
|
|
150
149
|
positionedOverEditor
|
|
@@ -153,7 +152,7 @@ export class SwappableContentArea extends React.PureComponent {
|
|
|
153
152
|
const newPosition = editorWidth ? shouldPanelBePositionedOverEditor(editorWidth, width, editorView) : false;
|
|
154
153
|
broadcastWidth(contextPanelWidth);
|
|
155
154
|
(newPosition && visible) !== positionedOverEditor && broadcastPosition(newPosition && visible);
|
|
156
|
-
return
|
|
155
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
157
156
|
css: [panel, !visible && panelHidden,
|
|
158
157
|
/**
|
|
159
158
|
* Only use absolute position for panel when screen size is wide enough
|
|
@@ -163,7 +162,7 @@ export class SwappableContentArea extends React.PureComponent {
|
|
|
163
162
|
"data-testid": "context-panel-panel",
|
|
164
163
|
"aria-labelledby": "context-panel-title",
|
|
165
164
|
role: "dialog"
|
|
166
|
-
},
|
|
165
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
167
166
|
"data-testid": "context-panel-content",
|
|
168
167
|
css: [content, !visible && panelHidden]
|
|
169
168
|
}, this.showPluginContent() || this.showProvidedContent(userVisible)));
|
|
@@ -201,11 +200,11 @@ function ContextPanelWithActions({
|
|
|
201
200
|
width
|
|
202
201
|
} = useContext(WidthContext);
|
|
203
202
|
if (!eventDispatcher) {
|
|
204
|
-
return
|
|
203
|
+
return /*#__PURE__*/React.createElement(SwappableContentArea, _extends({
|
|
205
204
|
editorView: editorView
|
|
206
205
|
}, props));
|
|
207
206
|
}
|
|
208
|
-
return
|
|
207
|
+
return /*#__PURE__*/React.createElement(WithPluginState, {
|
|
209
208
|
eventDispatcher: eventDispatcher,
|
|
210
209
|
plugins: {
|
|
211
210
|
contextPanel: contextPanelPluginKey,
|
|
@@ -221,7 +220,7 @@ function ContextPanelWithActions({
|
|
|
221
220
|
containerWidth: width,
|
|
222
221
|
contentBreakoutModes: editorView ? getChildBreakoutModes(editorView.state.doc, editorView.state.schema) : []
|
|
223
222
|
};
|
|
224
|
-
return
|
|
223
|
+
return /*#__PURE__*/React.createElement(SwappableContentArea, _extends({}, props, {
|
|
225
224
|
editorView: editorView,
|
|
226
225
|
pluginContent: firstContent,
|
|
227
226
|
editorWidth: editorWidth
|
|
@@ -230,8 +229,8 @@ function ContextPanelWithActions({
|
|
|
230
229
|
});
|
|
231
230
|
}
|
|
232
231
|
export default function ContextPanel(props) {
|
|
233
|
-
return
|
|
234
|
-
render: actions =>
|
|
232
|
+
return /*#__PURE__*/React.createElement(WithEditorActions, {
|
|
233
|
+
render: actions => /*#__PURE__*/React.createElement(ContextPanelWithActions, _extends({
|
|
235
234
|
actions: actions
|
|
236
235
|
}, props))
|
|
237
236
|
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
/** @jsx jsx */
|
|
3
2
|
import React from 'react';
|
|
4
|
-
import { css
|
|
3
|
+
import { css } from '@emotion/react';
|
|
5
4
|
import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
|
|
6
5
|
import { whichTransitionEvent } from '../../utils';
|
|
7
6
|
import { ErrorBoundary } from '../ErrorBoundary';
|
|
@@ -83,14 +82,14 @@ export default class PluginSlot extends React.Component {
|
|
|
83
82
|
if (!items && !pluginHooks || !editorView) {
|
|
84
83
|
return null;
|
|
85
84
|
}
|
|
86
|
-
return
|
|
85
|
+
return /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
87
86
|
component: ACTION_SUBJECT.PLUGIN_SLOT,
|
|
88
87
|
fallbackComponent: null
|
|
89
|
-
},
|
|
88
|
+
}, /*#__PURE__*/React.createElement(MountPluginHooks, {
|
|
90
89
|
editorView: editorView,
|
|
91
90
|
pluginHooks: pluginHooks,
|
|
92
91
|
containerElement: containerElement
|
|
93
|
-
}),
|
|
92
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
94
93
|
css: pluginsComponentsWrapper
|
|
95
94
|
}, items === null || items === void 0 ? void 0 : items.map((component, key) => {
|
|
96
95
|
const props = {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
1
|
import React from 'react';
|
|
3
|
-
import { css
|
|
2
|
+
import { css } from '@emotion/react';
|
|
4
3
|
import { akEditorMobileMaxWidth } from '@atlaskit/editor-shared-styles';
|
|
5
4
|
const toolbarComponentsWrapper = css`
|
|
6
5
|
display: flex;
|
|
@@ -33,7 +32,7 @@ export class ToolbarInner extends React.Component {
|
|
|
33
32
|
if (!items || !items.length) {
|
|
34
33
|
return null;
|
|
35
34
|
}
|
|
36
|
-
return
|
|
35
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
37
36
|
css: toolbarComponentsWrapper
|
|
38
37
|
}, items.map((component, key) => {
|
|
39
38
|
const props = {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/** @jsx jsx */
|
|
3
2
|
import React, { useMemo } from 'react';
|
|
4
|
-
import { css
|
|
3
|
+
import { css } from '@emotion/react';
|
|
5
4
|
import { WidthObserver } from '@atlaskit/width-detector';
|
|
6
5
|
import { akEditorMobileMaxWidth } from '@atlaskit/editor-shared-styles';
|
|
7
6
|
import { useElementWidth } from './hooks';
|
|
@@ -32,13 +31,13 @@ export const ToolbarWithSizeDetector = props => {
|
|
|
32
31
|
const minWidth = `min-width: ${props.hasMinWidth ? toolbarMinWidth : '254'}px`;
|
|
33
32
|
return [toolbar, minWidth];
|
|
34
33
|
}, [props.appearance, props.hasMinWidth, props.twoLineEditorToolbar]);
|
|
35
|
-
return
|
|
34
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
36
35
|
css: toolbarStyle
|
|
37
|
-
},
|
|
36
|
+
}, /*#__PURE__*/React.createElement(WidthObserver, {
|
|
38
37
|
setWidth: setWidth
|
|
39
|
-
}), props.editorView && toolbarSize ?
|
|
38
|
+
}), props.editorView && toolbarSize ? /*#__PURE__*/React.createElement(Toolbar, _extends({}, props, {
|
|
40
39
|
toolbarSize: toolbarSize
|
|
41
|
-
})) :
|
|
40
|
+
})) : /*#__PURE__*/React.createElement("div", {
|
|
42
41
|
ref: ref
|
|
43
42
|
}));
|
|
44
43
|
};
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
-
/** @jsx jsx */
|
|
4
|
-
import { jsx } from '@emotion/react';
|
|
5
3
|
import ReactDOM from 'react-dom';
|
|
6
4
|
import { PureComponent } from 'react';
|
|
7
5
|
import PropTypes from 'prop-types';
|
|
@@ -118,20 +116,20 @@ class ToolbarFeedbackInternal extends PureComponent {
|
|
|
118
116
|
popupsBoundariesElement,
|
|
119
117
|
popupsScrollableElement
|
|
120
118
|
} = this.props;
|
|
121
|
-
const iconBefore = this.state.jiraIssueCollectorScriptLoading ?
|
|
119
|
+
const iconBefore = this.state.jiraIssueCollectorScriptLoading ? /*#__PURE__*/React.createElement(Spinner, null) : undefined;
|
|
122
120
|
|
|
123
121
|
// JIRA issue collector script is using jQuery internally
|
|
124
|
-
return this.hasJquery() ?
|
|
122
|
+
return this.hasJquery() ? /*#__PURE__*/React.createElement("div", {
|
|
125
123
|
css: wrapper
|
|
126
|
-
},
|
|
124
|
+
}, /*#__PURE__*/React.createElement(ToolbarButton, {
|
|
127
125
|
ref: this.handleRef,
|
|
128
126
|
iconBefore: iconBefore,
|
|
129
127
|
onClick: this.collectFeedback,
|
|
130
128
|
selected: false,
|
|
131
129
|
spacing: "compact"
|
|
132
|
-
},
|
|
130
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
133
131
|
css: buttonContent
|
|
134
|
-
}, "Feedback")), this.state.showOptOutOption &&
|
|
132
|
+
}, "Feedback")), this.state.showOptOutOption && /*#__PURE__*/React.createElement(PopupWithOutsideListeners, {
|
|
135
133
|
target: this.state.target,
|
|
136
134
|
mountTo: popupsMountPoint,
|
|
137
135
|
boundariesElement: popupsBoundariesElement,
|
|
@@ -140,19 +138,19 @@ class ToolbarFeedbackInternal extends PureComponent {
|
|
|
140
138
|
fitWidth: POPUP_WIDTH,
|
|
141
139
|
handleClickOutside: this.toggleShowOptOutOption,
|
|
142
140
|
handleEscapeKeydown: this.toggleShowOptOutOption
|
|
143
|
-
},
|
|
141
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
144
142
|
css: confirmationPopup
|
|
145
|
-
},
|
|
143
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
146
144
|
css: confirmationHeader
|
|
147
|
-
},
|
|
145
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
148
146
|
css: confirmationImg,
|
|
149
147
|
src: EDITOR_IMAGE_URL
|
|
150
|
-
})),
|
|
148
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
151
149
|
css: confirmationText
|
|
152
|
-
},
|
|
150
|
+
}, /*#__PURE__*/React.createElement("div", null, "We are rolling out a new editing experience across Atlassian products. Help us improve by providing feedback."), /*#__PURE__*/React.createElement("div", null, "You can opt-out for now by turning off the \"Atlassian Editor\" feature on the Labs page in Bitbucket settings."), /*#__PURE__*/React.createElement(ButtonGroup, null, /*#__PURE__*/React.createElement(Button, {
|
|
153
151
|
appearance: "primary",
|
|
154
152
|
onClick: this.openFeedbackPopup
|
|
155
|
-
}, "Give feedback"),
|
|
153
|
+
}, "Give feedback"), /*#__PURE__*/React.createElement(Button, {
|
|
156
154
|
appearance: "default",
|
|
157
155
|
onClick: this.openLearnMorePage
|
|
158
156
|
}, "Learn more")))))) : null;
|
|
@@ -163,7 +161,7 @@ _defineProperty(ToolbarFeedbackInternal, "contextTypes", {
|
|
|
163
161
|
});
|
|
164
162
|
export default function ToolbarFeedback(props) {
|
|
165
163
|
const api = usePresetContext();
|
|
166
|
-
return
|
|
164
|
+
return /*#__PURE__*/React.createElement(ToolbarFeedbackInternal, _extends({
|
|
167
165
|
api: api
|
|
168
166
|
}, props));
|
|
169
167
|
}
|