@atlaskit/editor-core 189.5.1 → 189.5.6
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 +15 -0
- package/afm-cc/tsconfig.json +335 -0
- package/dist/cjs/composable-editor/editor-internal.js +11 -11
- package/dist/cjs/composable-editor/editor.js +8 -7
- package/dist/cjs/composable-editor/hooks/useEditorMeasuresConstructor.js +2 -0
- package/dist/cjs/composable-editor/hooks/useMeasureEditorMountTime.js +2 -0
- package/dist/cjs/editor.js +4 -3
- package/dist/cjs/plugins/alignment/ui/ToolbarAlignment/index.js +11 -10
- package/dist/cjs/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +3 -2
- package/dist/cjs/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +2 -1
- package/dist/cjs/plugins/breakout/ui/LayoutButton.js +6 -5
- package/dist/cjs/plugins/collab-edit/ui/avatars.js +5 -2
- package/dist/cjs/plugins/collab-edit/ui/colored-avatar-item.js +4 -1
- package/dist/cjs/plugins/collab-edit/ui/invite-to-edit.js +7 -4
- package/dist/cjs/plugins/extension/ui/Extension/Extension/index.js +13 -11
- package/dist/cjs/plugins/extension/ui/Extension/InlineExtension/index.js +5 -4
- package/dist/cjs/plugins/extension/ui/Extension/Lozenge.js +9 -8
- package/dist/cjs/plugins/extension/ui/Extension/MultiBodiedExtension/index.js +4 -4
- package/dist/cjs/plugins/extension/ui/SaveIndicator/SaveIndicator.js +7 -6
- package/dist/cjs/plugins/find-replace/ui/Find.js +14 -13
- package/dist/cjs/plugins/find-replace/ui/FindReplace.js +6 -5
- package/dist/cjs/plugins/find-replace/ui/FindReplaceToolbarButton.js +8 -7
- package/dist/cjs/plugins/find-replace/ui/Replace.js +6 -5
- package/dist/cjs/plugins/find-replace/ui/styles.js +1 -0
- package/dist/cjs/plugins/jira-issue/nodeviews/jira-issue.js +5 -4
- package/dist/cjs/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +11 -8
- package/dist/cjs/ui/Addon/ClickAreaBlock/index.js +2 -1
- package/dist/cjs/ui/Addon/ClickAreaInline/index.js +2 -1
- package/dist/cjs/ui/Addon/ClickAreaMobile/index.js +2 -1
- package/dist/cjs/ui/Addon/Dropdown/index.js +3 -2
- package/dist/cjs/ui/Addon/DropdownItem/index.js +5 -2
- package/dist/cjs/ui/Alignment/index.js +7 -6
- package/dist/cjs/ui/Appearance/Chromeless.js +7 -6
- package/dist/cjs/ui/Appearance/Comment/Comment.js +17 -16
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +5 -4
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +6 -3
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +12 -10
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +15 -13
- package/dist/cjs/ui/AppearanceComponents/Mobile.js +6 -5
- package/dist/cjs/ui/ChromeCollapsed/index.js +3 -2
- package/dist/cjs/ui/ConfigPanel/ErrorMessage/ErrorImage.js +16 -15
- package/dist/cjs/ui/ConfigPanel/Fields/Boolean.js +12 -11
- package/dist/cjs/ui/ConfigPanel/Fields/CheckboxGroup.js +7 -6
- package/dist/cjs/ui/ConfigPanel/Fields/ColorPicker.js +8 -8
- package/dist/cjs/ui/ConfigPanel/Fields/DateRange.js +18 -17
- package/dist/cjs/ui/ConfigPanel/Fields/Expand.js +9 -8
- package/dist/cjs/ui/ConfigPanel/Fields/Fieldset.js +10 -9
- package/dist/cjs/ui/ConfigPanel/Fields/SelectItem.js +6 -5
- package/dist/cjs/ui/ConfigPanel/Fields/TabGroup.js +7 -6
- package/dist/cjs/ui/ConfigPanel/Header.js +14 -13
- package/dist/cjs/ui/ConfigPanel/LoadingState.js +3 -2
- package/dist/cjs/ui/ConfigPanel/NestedForms/RemovableField.js +5 -4
- package/dist/cjs/ui/ContentStyles/index.js +2 -1
- package/dist/cjs/ui/ContextPanel/index.js +11 -10
- package/dist/cjs/ui/PluginSlot/index.js +4 -3
- package/dist/cjs/ui/Toolbar/ToolbarInner.js +2 -1
- package/dist/cjs/ui/Toolbar/ToolbarWithSizeDetector.js +5 -4
- package/dist/cjs/ui/ToolbarFeedback/index.js +16 -15
- package/dist/cjs/ui/WithFlash/index.js +2 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/composable-editor/editor-internal.js +12 -11
- package/dist/es2019/composable-editor/editor.js +8 -6
- package/dist/es2019/composable-editor/hooks/useEditorMeasuresConstructor.js +2 -0
- package/dist/es2019/composable-editor/hooks/useMeasureEditorMountTime.js +1 -0
- package/dist/es2019/editor.js +4 -2
- package/dist/es2019/plugins/alignment/ui/ToolbarAlignment/index.js +11 -9
- package/dist/es2019/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +4 -3
- package/dist/es2019/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +3 -2
- package/dist/es2019/plugins/breakout/ui/LayoutButton.js +7 -6
- package/dist/es2019/plugins/collab-edit/ui/avatars.js +4 -2
- package/dist/es2019/plugins/collab-edit/ui/colored-avatar-item.js +3 -1
- package/dist/es2019/plugins/collab-edit/ui/invite-to-edit.js +6 -4
- package/dist/es2019/plugins/extension/ui/Extension/Extension/index.js +14 -11
- package/dist/es2019/plugins/extension/ui/Extension/InlineExtension/index.js +5 -3
- package/dist/es2019/plugins/extension/ui/Extension/Lozenge.js +7 -5
- package/dist/es2019/plugins/extension/ui/Extension/MultiBodiedExtension/index.js +6 -4
- package/dist/es2019/plugins/extension/ui/SaveIndicator/SaveIndicator.js +8 -7
- package/dist/es2019/plugins/find-replace/ui/Find.js +14 -12
- package/dist/es2019/plugins/find-replace/ui/FindReplace.js +6 -4
- package/dist/es2019/plugins/find-replace/ui/FindReplaceToolbarButton.js +9 -8
- package/dist/es2019/plugins/find-replace/ui/Replace.js +6 -4
- package/dist/es2019/plugins/find-replace/ui/styles.js +1 -0
- package/dist/es2019/plugins/jira-issue/nodeviews/jira-issue.js +6 -5
- package/dist/es2019/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +10 -8
- package/dist/es2019/ui/Addon/ClickAreaBlock/index.js +3 -2
- package/dist/es2019/ui/Addon/ClickAreaInline/index.js +3 -2
- package/dist/es2019/ui/Addon/ClickAreaMobile/index.js +3 -2
- package/dist/es2019/ui/Addon/Dropdown/index.js +3 -1
- package/dist/es2019/ui/Addon/DropdownItem/index.js +4 -2
- package/dist/es2019/ui/Alignment/index.js +5 -3
- package/dist/es2019/ui/Appearance/Chromeless.js +8 -7
- package/dist/es2019/ui/Appearance/Comment/Comment.js +18 -17
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +7 -5
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +5 -3
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +12 -11
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +15 -13
- package/dist/es2019/ui/AppearanceComponents/Mobile.js +7 -6
- package/dist/es2019/ui/ChromeCollapsed/index.js +3 -1
- package/dist/es2019/ui/ConfigPanel/ErrorMessage/ErrorImage.js +17 -17
- package/dist/es2019/ui/ConfigPanel/Fields/Boolean.js +13 -12
- package/dist/es2019/ui/ConfigPanel/Fields/CheckboxGroup.js +8 -7
- package/dist/es2019/ui/ConfigPanel/Fields/ColorPicker.js +9 -8
- package/dist/es2019/ui/ConfigPanel/Fields/DateRange.js +19 -18
- package/dist/es2019/ui/ConfigPanel/Fields/Expand.js +10 -9
- package/dist/es2019/ui/ConfigPanel/Fields/Fieldset.js +11 -10
- package/dist/es2019/ui/ConfigPanel/Fields/SelectItem.js +7 -6
- package/dist/es2019/ui/ConfigPanel/Fields/TabGroup.js +8 -7
- package/dist/es2019/ui/ConfigPanel/Header.js +15 -14
- package/dist/es2019/ui/ConfigPanel/LoadingState.js +4 -3
- package/dist/es2019/ui/ConfigPanel/NestedForms/RemovableField.js +6 -5
- package/dist/es2019/ui/ContentStyles/index.js +3 -2
- package/dist/es2019/ui/ContextPanel/index.js +12 -11
- package/dist/es2019/ui/PluginSlot/index.js +5 -4
- package/dist/es2019/ui/Toolbar/ToolbarInner.js +3 -2
- package/dist/es2019/ui/Toolbar/ToolbarWithSizeDetector.js +6 -5
- package/dist/es2019/ui/ToolbarFeedback/index.js +14 -12
- package/dist/es2019/ui/WithFlash/index.js +3 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/composable-editor/editor-internal.js +12 -11
- package/dist/esm/composable-editor/editor.js +8 -6
- package/dist/esm/composable-editor/hooks/useEditorMeasuresConstructor.js +2 -0
- package/dist/esm/composable-editor/hooks/useMeasureEditorMountTime.js +1 -0
- package/dist/esm/editor.js +4 -2
- package/dist/esm/plugins/alignment/ui/ToolbarAlignment/index.js +11 -9
- package/dist/esm/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +4 -3
- package/dist/esm/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +3 -2
- package/dist/esm/plugins/breakout/ui/LayoutButton.js +7 -6
- package/dist/esm/plugins/collab-edit/ui/avatars.js +4 -2
- package/dist/esm/plugins/collab-edit/ui/colored-avatar-item.js +3 -1
- package/dist/esm/plugins/collab-edit/ui/invite-to-edit.js +6 -4
- package/dist/esm/plugins/extension/ui/Extension/Extension/index.js +14 -11
- package/dist/esm/plugins/extension/ui/Extension/InlineExtension/index.js +5 -3
- package/dist/esm/plugins/extension/ui/Extension/Lozenge.js +7 -5
- package/dist/esm/plugins/extension/ui/Extension/MultiBodiedExtension/index.js +6 -4
- package/dist/esm/plugins/extension/ui/SaveIndicator/SaveIndicator.js +8 -7
- package/dist/esm/plugins/find-replace/ui/Find.js +14 -12
- package/dist/esm/plugins/find-replace/ui/FindReplace.js +6 -4
- package/dist/esm/plugins/find-replace/ui/FindReplaceToolbarButton.js +9 -8
- package/dist/esm/plugins/find-replace/ui/Replace.js +6 -4
- package/dist/esm/plugins/find-replace/ui/styles.js +1 -0
- package/dist/esm/plugins/jira-issue/nodeviews/jira-issue.js +6 -5
- package/dist/esm/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +10 -8
- package/dist/esm/ui/Addon/ClickAreaBlock/index.js +3 -2
- package/dist/esm/ui/Addon/ClickAreaInline/index.js +3 -2
- package/dist/esm/ui/Addon/ClickAreaMobile/index.js +3 -2
- package/dist/esm/ui/Addon/Dropdown/index.js +3 -1
- package/dist/esm/ui/Addon/DropdownItem/index.js +4 -2
- package/dist/esm/ui/Alignment/index.js +5 -3
- package/dist/esm/ui/Appearance/Chromeless.js +8 -7
- package/dist/esm/ui/Appearance/Comment/Comment.js +18 -17
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +7 -5
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +5 -3
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +12 -11
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +15 -13
- package/dist/esm/ui/AppearanceComponents/Mobile.js +7 -6
- package/dist/esm/ui/ChromeCollapsed/index.js +3 -1
- package/dist/esm/ui/ConfigPanel/ErrorMessage/ErrorImage.js +17 -17
- package/dist/esm/ui/ConfigPanel/Fields/Boolean.js +13 -12
- package/dist/esm/ui/ConfigPanel/Fields/CheckboxGroup.js +8 -7
- package/dist/esm/ui/ConfigPanel/Fields/ColorPicker.js +9 -8
- package/dist/esm/ui/ConfigPanel/Fields/DateRange.js +19 -18
- package/dist/esm/ui/ConfigPanel/Fields/Expand.js +10 -9
- package/dist/esm/ui/ConfigPanel/Fields/Fieldset.js +11 -10
- package/dist/esm/ui/ConfigPanel/Fields/SelectItem.js +7 -6
- package/dist/esm/ui/ConfigPanel/Fields/TabGroup.js +8 -7
- package/dist/esm/ui/ConfigPanel/Header.js +15 -14
- package/dist/esm/ui/ConfigPanel/LoadingState.js +4 -3
- package/dist/esm/ui/ConfigPanel/NestedForms/RemovableField.js +6 -5
- package/dist/esm/ui/ContentStyles/index.js +3 -2
- package/dist/esm/ui/ContextPanel/index.js +12 -11
- package/dist/esm/ui/PluginSlot/index.js +5 -4
- package/dist/esm/ui/Toolbar/ToolbarInner.js +3 -2
- package/dist/esm/ui/Toolbar/ToolbarWithSizeDetector.js +6 -5
- package/dist/esm/ui/ToolbarFeedback/index.js +14 -12
- package/dist/esm/ui/WithFlash/index.js +3 -2
- package/dist/esm/version-wrapper.js +1 -1
- package/package.json +13 -5
|
@@ -27,6 +27,7 @@ var _messages = require("../messages");
|
|
|
27
27
|
var _utils = require("../utils");
|
|
28
28
|
var _colors = require("@atlaskit/theme/colors");
|
|
29
29
|
var _templateObject, _templateObject2;
|
|
30
|
+
/** @jsx jsx */
|
|
30
31
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
31
32
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
32
33
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -183,7 +184,7 @@ var FieldsetField = /*#__PURE__*/function (_React$Component) {
|
|
|
183
184
|
if (selectOptions.length === 0) {
|
|
184
185
|
return null;
|
|
185
186
|
}
|
|
186
|
-
return
|
|
187
|
+
return (0, _react2.jsx)(_react.default.Fragment, null, isAdding ? (0, _react2.jsx)(_select.default, {
|
|
187
188
|
testId: "field-picker",
|
|
188
189
|
defaultMenuIsOpen: true,
|
|
189
190
|
autoFocus: true,
|
|
@@ -194,10 +195,10 @@ var FieldsetField = /*#__PURE__*/function (_React$Component) {
|
|
|
194
195
|
_this.onSelectItem(option);
|
|
195
196
|
}
|
|
196
197
|
}
|
|
197
|
-
}) :
|
|
198
|
+
}) : (0, _react2.jsx)(_customThemeButton.default, {
|
|
198
199
|
testId: "add-more",
|
|
199
200
|
appearance: "subtle",
|
|
200
|
-
iconBefore:
|
|
201
|
+
iconBefore: (0, _react2.jsx)(_addCircle.default, {
|
|
201
202
|
size: "small",
|
|
202
203
|
label: intl.formatMessage(_messages.messages.addField)
|
|
203
204
|
}),
|
|
@@ -234,9 +235,9 @@ var FieldsetField = /*#__PURE__*/function (_React$Component) {
|
|
|
234
235
|
currentParameters = _this$state3.currentParameters,
|
|
235
236
|
visibleFields = _this$state3.visibleFields;
|
|
236
237
|
var children = this.renderActions();
|
|
237
|
-
return
|
|
238
|
+
return (0, _react2.jsx)(_react.Fragment, null, error && (0, _react2.jsx)(FieldsetError, {
|
|
238
239
|
message: error
|
|
239
|
-
}),
|
|
240
|
+
}), (0, _react2.jsx)("div", null, options.showTitle && (0, _react2.jsx)("h5", null, label), (0, _react2.jsx)(FormComponent, {
|
|
240
241
|
fields: selectedFields,
|
|
241
242
|
parentName: name,
|
|
242
243
|
extensionManifest: extensionManifest,
|
|
@@ -245,7 +246,7 @@ var FieldsetField = /*#__PURE__*/function (_React$Component) {
|
|
|
245
246
|
onClickRemove: this.onClickRemove,
|
|
246
247
|
onFieldChange: onFieldChange,
|
|
247
248
|
firstVisibleFieldName: firstVisibleFieldName
|
|
248
|
-
}), children &&
|
|
249
|
+
}), children && (0, _react2.jsx)("div", {
|
|
249
250
|
css: actionsWrapper,
|
|
250
251
|
"data-testId": "fieldset-actions"
|
|
251
252
|
}, children)));
|
|
@@ -255,11 +256,11 @@ var FieldsetField = /*#__PURE__*/function (_React$Component) {
|
|
|
255
256
|
}(_react.default.Component);
|
|
256
257
|
function FieldsetError(_ref) {
|
|
257
258
|
var message = _ref.message;
|
|
258
|
-
return
|
|
259
|
+
return (0, _react2.jsx)("div", {
|
|
259
260
|
css: sectionMessageWrapper
|
|
260
|
-
},
|
|
261
|
+
}, (0, _react2.jsx)(_sectionMessage.default, {
|
|
261
262
|
appearance: "error"
|
|
262
|
-
},
|
|
263
|
+
}, (0, _react2.jsx)("p", null, message)));
|
|
263
264
|
}
|
|
264
265
|
var sectionMessageWrapper = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n margin-bottom: 24px;\n"])));
|
|
265
266
|
var _default = exports.default = (0, _reactIntlNext.injectIntl)(FieldsetField);
|
|
@@ -9,6 +9,7 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _avatar = _interopRequireDefault(require("@atlaskit/avatar"));
|
|
11
11
|
var _templateObject, _templateObject2, _templateObject3;
|
|
12
|
+
/** @jsx jsx */
|
|
12
13
|
var itemWrapper = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n\n small {\n margin: 0;\n display: block;\n color: currentColor;\n }\n"])));
|
|
13
14
|
var iconWrapper = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n line-height: 1;\n"])));
|
|
14
15
|
var iconWrapperMenu = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n align-self: flex-start;\n margin-top: 3px;\n"])));
|
|
@@ -23,17 +24,17 @@ var formatOptionLabel = exports.formatOptionLabel = function formatOptionLabel(_
|
|
|
23
24
|
icon = _ref.icon,
|
|
24
25
|
description = _ref.description;
|
|
25
26
|
var context = _ref2.context;
|
|
26
|
-
return
|
|
27
|
+
return (0, _react.jsx)("div", {
|
|
27
28
|
css: itemWrapper
|
|
28
|
-
},
|
|
29
|
+
}, (0, _react.jsx)("span", {
|
|
29
30
|
css: [iconWrapper, context === 'menu' && iconWrapperMenu]
|
|
30
|
-
}, typeof icon === 'string' ?
|
|
31
|
+
}, typeof icon === 'string' ? (0, _react.jsx)(_avatar.default, {
|
|
31
32
|
src: icon,
|
|
32
33
|
size: getIconSize(context, description),
|
|
33
34
|
appearance: "square"
|
|
34
|
-
}) : icon),
|
|
35
|
+
}) : icon), (0, _react.jsx)("div", {
|
|
35
36
|
style: {
|
|
36
37
|
paddingLeft: icon ? "var(--ds-space-100, 8px)" : 0
|
|
37
38
|
}
|
|
38
|
-
},
|
|
39
|
+
}, (0, _react.jsx)("p", null, label, description && context !== 'value' && (0, _react.jsx)("small", null, description))));
|
|
39
40
|
};
|
|
@@ -13,6 +13,7 @@ var _react2 = require("@emotion/react");
|
|
|
13
13
|
var _reactIntlNext = require("react-intl-next");
|
|
14
14
|
var _tabs = _interopRequireWildcard(require("@atlaskit/tabs"));
|
|
15
15
|
var _templateObject, _templateObject2;
|
|
16
|
+
/** @jsx jsx */
|
|
16
17
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
18
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
18
19
|
var tabWrapper = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n // increase specificity to make sure the tab style is overridden\n &&& [role='tabpanel'][tabindex] {\n padding: 0;\n }\n\n &&& [role='tablist']::before {\n left: 0;\n right: 0;\n }\n"])));
|
|
@@ -34,22 +35,22 @@ var TabGroupImpl = function TabGroupImpl(props) {
|
|
|
34
35
|
var onChange = _react.default.useCallback(function (index) {
|
|
35
36
|
setActiveTab(index);
|
|
36
37
|
}, [setActiveTab]);
|
|
37
|
-
return
|
|
38
|
+
return (0, _react2.jsx)("div", {
|
|
38
39
|
css: tabWrapper
|
|
39
|
-
},
|
|
40
|
+
}, (0, _react2.jsx)(_tabs.default, {
|
|
40
41
|
id: "configPanelTabs-".concat(field.name),
|
|
41
42
|
onChange: onChange,
|
|
42
43
|
selected: activeTab
|
|
43
|
-
},
|
|
44
|
+
}, (0, _react2.jsx)(_tabs.TabList, null, fields.map(function (_ref) {
|
|
44
45
|
var name = _ref.name,
|
|
45
46
|
label = _ref.label;
|
|
46
|
-
return
|
|
47
|
+
return (0, _react2.jsx)(_tabs.Tab, {
|
|
47
48
|
key: "tab-".concat(name)
|
|
48
49
|
}, label);
|
|
49
50
|
})), fields.map(function (field) {
|
|
50
|
-
return
|
|
51
|
+
return (0, _react2.jsx)(_tabs.TabPanel, {
|
|
51
52
|
key: "panel-".concat(field.name)
|
|
52
|
-
},
|
|
53
|
+
}, (0, _react2.jsx)("div", {
|
|
53
54
|
css: panelWrapper
|
|
54
55
|
}, renderPanel(field)));
|
|
55
56
|
})));
|
|
@@ -17,6 +17,7 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
17
17
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
18
18
|
var _messages = require("./messages");
|
|
19
19
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
20
|
+
/** @jsx jsx */
|
|
20
21
|
var iconWidth = 40;
|
|
21
22
|
var buttonWidth = 40;
|
|
22
23
|
var margin = 16;
|
|
@@ -42,35 +43,35 @@ var Header = function Header(_ref) {
|
|
|
42
43
|
return null;
|
|
43
44
|
}
|
|
44
45
|
});
|
|
45
|
-
return
|
|
46
|
+
return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)("div", {
|
|
46
47
|
css: item
|
|
47
|
-
},
|
|
48
|
+
}, (0, _react2.jsx)("div", {
|
|
48
49
|
css: itemIcon
|
|
49
|
-
},
|
|
50
|
+
}, (0, _react2.jsx)(ResolvedIcon, {
|
|
50
51
|
label: title
|
|
51
|
-
})),
|
|
52
|
+
})), (0, _react2.jsx)("div", {
|
|
52
53
|
css: itemBody
|
|
53
|
-
}, summary ?
|
|
54
|
+
}, summary ? (0, _react2.jsx)("div", {
|
|
54
55
|
css: itemText
|
|
55
|
-
},
|
|
56
|
+
}, (0, _react2.jsx)("div", {
|
|
56
57
|
className: "item-title",
|
|
57
58
|
id: "context-panel-title"
|
|
58
|
-
}, title),
|
|
59
|
+
}, title), (0, _react2.jsx)("div", {
|
|
59
60
|
className: "item-summary"
|
|
60
|
-
}, summary)) :
|
|
61
|
+
}, summary)) : (0, _react2.jsx)("div", {
|
|
61
62
|
css: centeredItemTitle,
|
|
62
63
|
id: "context-panel-title"
|
|
63
|
-
}, title)),
|
|
64
|
+
}, title)), (0, _react2.jsx)("div", {
|
|
64
65
|
css: closeButtonWrapper
|
|
65
|
-
},
|
|
66
|
+
}, (0, _react2.jsx)(_customThemeButton.default, {
|
|
66
67
|
appearance: "subtle",
|
|
67
|
-
iconBefore:
|
|
68
|
+
iconBefore: (0, _react2.jsx)(_cross.default, {
|
|
68
69
|
label: intl.formatMessage(_messages.messages.close)
|
|
69
70
|
}),
|
|
70
71
|
onClick: onClose
|
|
71
|
-
}))), (description || documentationUrl) &&
|
|
72
|
+
}))), (description || documentationUrl) && (0, _react2.jsx)("p", {
|
|
72
73
|
css: descriptionStyle
|
|
73
|
-
}, description &&
|
|
74
|
+
}, description && (0, _react2.jsx)(_react.Fragment, null, description.replace(/([^.])$/, '$1.'), " "), documentationUrl && (0, _react2.jsx)("a", {
|
|
74
75
|
target: "_blank",
|
|
75
76
|
rel: "noopener noreferrer",
|
|
76
77
|
href: documentationUrl
|
|
@@ -9,12 +9,13 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _spinner = _interopRequireDefault(require("@atlaskit/spinner"));
|
|
11
11
|
var _templateObject;
|
|
12
|
+
/** @jsx jsx */
|
|
12
13
|
var spinnerWrapper = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: center;\n margin-top: ", ";\n"])), "var(--ds-space-800, 64px)");
|
|
13
14
|
var LoadingState = function LoadingState() {
|
|
14
|
-
return
|
|
15
|
+
return (0, _react.jsx)("div", {
|
|
15
16
|
css: spinnerWrapper,
|
|
16
17
|
"data-testid": "ConfigPanelLoading"
|
|
17
|
-
},
|
|
18
|
+
}, (0, _react.jsx)(_spinner.default, {
|
|
18
19
|
size: "small"
|
|
19
20
|
}));
|
|
20
21
|
};
|
|
@@ -14,6 +14,7 @@ var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
|
14
14
|
var _colors = require("@atlaskit/theme/colors");
|
|
15
15
|
var _messages = require("../messages");
|
|
16
16
|
var _templateObject, _templateObject2, _templateObject3;
|
|
17
|
+
/** @jsx jsx */
|
|
17
18
|
var removableFieldWrapper = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n margin-bottom: 0;\n"])));
|
|
18
19
|
var wrapperWithMarginBottom = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n margin-bottom: ", ";\n"])), "var(--ds-space-200, 16px)");
|
|
19
20
|
var removeButtonWrapper = (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n right: 0;\n top: 0;\n cursor: pointer;\n\n color: ", ";\n\n &:hover {\n color: ", ";\n }\n"])), "var(--ds-icon-subtle, ".concat(_colors.N80, ")"), "var(--ds-icon-danger, ".concat(_colors.R300, ")"));
|
|
@@ -29,17 +30,17 @@ var RemovableField = function RemovableField(_ref) {
|
|
|
29
30
|
return onClickRemove && onClickRemove(name);
|
|
30
31
|
}, [name, onClickRemove]);
|
|
31
32
|
var hasMarginBottom = ((_children$props$field = children.props.field) === null || _children$props$field === void 0 ? void 0 : _children$props$field.type) !== 'expand';
|
|
32
|
-
return
|
|
33
|
+
return (0, _react2.jsx)("div", {
|
|
33
34
|
css: [removableFieldWrapper, hasMarginBottom && wrapperWithMarginBottom],
|
|
34
35
|
className: className
|
|
35
|
-
}, children, canRemoveField &&
|
|
36
|
+
}, children, canRemoveField && (0, _react2.jsx)("div", {
|
|
36
37
|
css: removeButtonWrapper,
|
|
37
38
|
"data-testid": "remove-field-".concat(name),
|
|
38
39
|
onClick: onClickCallback
|
|
39
|
-
},
|
|
40
|
+
}, (0, _react2.jsx)(_tooltip.default, {
|
|
40
41
|
content: intl.formatMessage(_messages.messages.removeField),
|
|
41
42
|
position: "left"
|
|
42
|
-
},
|
|
43
|
+
}, (0, _react2.jsx)(_crossCircle.default, {
|
|
43
44
|
size: "small",
|
|
44
45
|
label: intl.formatMessage(_messages.messages.removeField)
|
|
45
46
|
}))));
|
|
@@ -33,6 +33,7 @@ var _emoji = require("@atlaskit/editor-common/emoji");
|
|
|
33
33
|
var _colors = require("@atlaskit/theme/colors");
|
|
34
34
|
var _selection = require("@atlaskit/editor-common/selection");
|
|
35
35
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
36
|
+
/** @jsx jsx */
|
|
36
37
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
37
38
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
38
39
|
var linkStyles = exports.linkStyles = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n ", "\n }\n"])), _styles.linkSharedStyle);
|
|
@@ -60,7 +61,7 @@ var createEditorContentStyle = exports.createEditorContentStyle = function creat
|
|
|
60
61
|
featureFlags: featureFlags
|
|
61
62
|
});
|
|
62
63
|
}, [theme, featureFlags]);
|
|
63
|
-
return
|
|
64
|
+
return (0, _react2.jsx)("div", {
|
|
64
65
|
className: className,
|
|
65
66
|
ref: ref,
|
|
66
67
|
css: [memoizedStyle, styles]
|
|
@@ -31,6 +31,7 @@ var _document = require("../../utils/document");
|
|
|
31
31
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
32
32
|
var _excluded = ["actions"];
|
|
33
33
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
34
|
+
/** @jsx jsx */
|
|
34
35
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
35
36
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
36
37
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -98,7 +99,7 @@ var SwappableContentArea = exports.SwappableContentArea = /*#__PURE__*/function
|
|
|
98
99
|
if (!currentPluginContent) {
|
|
99
100
|
return;
|
|
100
101
|
}
|
|
101
|
-
return
|
|
102
|
+
return (0, _react2.jsx)(_Transition.default, {
|
|
102
103
|
timeout: _this.state.mounted ? ANIM_SPEED_MS : 0,
|
|
103
104
|
in: !!pluginContent,
|
|
104
105
|
mountOnEnter: true,
|
|
@@ -113,7 +114,7 @@ var SwappableContentArea = exports.SwappableContentArea = /*#__PURE__*/function
|
|
|
113
114
|
if (!children) {
|
|
114
115
|
return;
|
|
115
116
|
}
|
|
116
|
-
return
|
|
117
|
+
return (0, _react2.jsx)(_Transition.default, {
|
|
117
118
|
timeout: _this.state.mounted ? ANIM_SPEED_MS : 0,
|
|
118
119
|
in: isVisible,
|
|
119
120
|
mountOnEnter: true,
|
|
@@ -148,7 +149,7 @@ var SwappableContentArea = exports.SwappableContentArea = /*#__PURE__*/function
|
|
|
148
149
|
var width = _editorSharedStyles.akEditorContextPanelWidth;
|
|
149
150
|
var userVisible = !!this.props.visible;
|
|
150
151
|
var visible = userVisible || !!this.state.currentPluginContent;
|
|
151
|
-
return
|
|
152
|
+
return (0, _react2.jsx)(_ui.ContextPanelConsumer, null, function (_ref) {
|
|
152
153
|
var broadcastWidth = _ref.broadcastWidth,
|
|
153
154
|
broadcastPosition = _ref.broadcastPosition,
|
|
154
155
|
positionedOverEditor = _ref.positionedOverEditor;
|
|
@@ -156,7 +157,7 @@ var SwappableContentArea = exports.SwappableContentArea = /*#__PURE__*/function
|
|
|
156
157
|
var newPosition = editorWidth ? shouldPanelBePositionedOverEditor(editorWidth, width, editorView) : false;
|
|
157
158
|
broadcastWidth(contextPanelWidth);
|
|
158
159
|
(newPosition && visible) !== positionedOverEditor && broadcastPosition(newPosition && visible);
|
|
159
|
-
return
|
|
160
|
+
return (0, _react2.jsx)("div", {
|
|
160
161
|
css: [panel, !visible && panelHidden,
|
|
161
162
|
/**
|
|
162
163
|
* Only use absolute position for panel when screen size is wide enough
|
|
@@ -166,7 +167,7 @@ var SwappableContentArea = exports.SwappableContentArea = /*#__PURE__*/function
|
|
|
166
167
|
"data-testid": "context-panel-panel",
|
|
167
168
|
"aria-labelledby": "context-panel-title",
|
|
168
169
|
role: "dialog"
|
|
169
|
-
},
|
|
170
|
+
}, (0, _react2.jsx)("div", {
|
|
170
171
|
"data-testid": "context-panel-content",
|
|
171
172
|
css: [content, !visible && panelHidden]
|
|
172
173
|
}, _this2.showPluginContent() || _this2.showProvidedContent(userVisible)));
|
|
@@ -212,11 +213,11 @@ function ContextPanelWithActions(_ref2) {
|
|
|
212
213
|
var _useContext = (0, _react.useContext)(_ui.WidthContext),
|
|
213
214
|
width = _useContext.width;
|
|
214
215
|
if (!eventDispatcher) {
|
|
215
|
-
return
|
|
216
|
+
return (0, _react2.jsx)(SwappableContentArea, (0, _extends2.default)({
|
|
216
217
|
editorView: editorView
|
|
217
218
|
}, props));
|
|
218
219
|
}
|
|
219
|
-
return
|
|
220
|
+
return (0, _react2.jsx)(_WithPluginState.default, {
|
|
220
221
|
eventDispatcher: eventDispatcher,
|
|
221
222
|
plugins: {
|
|
222
223
|
contextPanel: contextPanelPluginKey,
|
|
@@ -230,7 +231,7 @@ function ContextPanelWithActions(_ref2) {
|
|
|
230
231
|
containerWidth: width,
|
|
231
232
|
contentBreakoutModes: editorView ? (0, _document.getChildBreakoutModes)(editorView.state.doc, editorView.state.schema) : []
|
|
232
233
|
});
|
|
233
|
-
return
|
|
234
|
+
return (0, _react2.jsx)(SwappableContentArea, (0, _extends2.default)({}, props, {
|
|
234
235
|
editorView: editorView,
|
|
235
236
|
pluginContent: firstContent,
|
|
236
237
|
editorWidth: editorWidth
|
|
@@ -239,9 +240,9 @@ function ContextPanelWithActions(_ref2) {
|
|
|
239
240
|
});
|
|
240
241
|
}
|
|
241
242
|
function ContextPanel(props) {
|
|
242
|
-
return
|
|
243
|
+
return (0, _react2.jsx)(_WithEditorActions.default, {
|
|
243
244
|
render: function render(actions) {
|
|
244
|
-
return
|
|
245
|
+
return (0, _react2.jsx)(ContextPanelWithActions, (0, _extends2.default)({
|
|
245
246
|
actions: actions
|
|
246
247
|
}, props));
|
|
247
248
|
}
|
|
@@ -20,6 +20,7 @@ var _utils = require("../../utils");
|
|
|
20
20
|
var _ErrorBoundary = require("../ErrorBoundary");
|
|
21
21
|
var _mountPluginHooks = require("./mount-plugin-hooks");
|
|
22
22
|
var _templateObject;
|
|
23
|
+
/** @jsx jsx */
|
|
23
24
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
24
25
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
25
26
|
var pluginsComponentsWrapper = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n"])));
|
|
@@ -113,14 +114,14 @@ var PluginSlot = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
113
114
|
if (!items && !pluginHooks || !editorView) {
|
|
114
115
|
return null;
|
|
115
116
|
}
|
|
116
|
-
return
|
|
117
|
+
return (0, _react2.jsx)(_ErrorBoundary.ErrorBoundary, {
|
|
117
118
|
component: _analytics.ACTION_SUBJECT.PLUGIN_SLOT,
|
|
118
119
|
fallbackComponent: null
|
|
119
|
-
},
|
|
120
|
+
}, (0, _react2.jsx)(_mountPluginHooks.MountPluginHooks, {
|
|
120
121
|
editorView: editorView,
|
|
121
122
|
pluginHooks: pluginHooks,
|
|
122
123
|
containerElement: containerElement
|
|
123
|
-
}),
|
|
124
|
+
}), (0, _react2.jsx)("div", {
|
|
124
125
|
css: pluginsComponentsWrapper
|
|
125
126
|
}, items === null || items === void 0 ? void 0 : items.map(function (component, key) {
|
|
126
127
|
var props = {
|
|
@@ -15,6 +15,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
15
15
|
var _react2 = require("@emotion/react");
|
|
16
16
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
17
17
|
var _templateObject;
|
|
18
|
+
/** @jsx jsx */
|
|
18
19
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
19
20
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
20
21
|
var toolbarComponentsWrapper = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n\n @media (max-width: ", "px) {\n justify-content: space-between;\n }\n"])), _editorSharedStyles.akEditorMobileMaxWidth);
|
|
@@ -51,7 +52,7 @@ var ToolbarInner = exports.ToolbarInner = /*#__PURE__*/function (_React$Componen
|
|
|
51
52
|
if (!items || !items.length) {
|
|
52
53
|
return null;
|
|
53
54
|
}
|
|
54
|
-
return
|
|
55
|
+
return (0, _react2.jsx)("div", {
|
|
55
56
|
css: toolbarComponentsWrapper
|
|
56
57
|
}, items.map(function (component, key) {
|
|
57
58
|
var props = {
|
|
@@ -19,6 +19,7 @@ var _Toolbar = require("./Toolbar");
|
|
|
19
19
|
var _types = require("./types");
|
|
20
20
|
var _isFullPage = require("../../utils/is-full-page");
|
|
21
21
|
var _templateObject;
|
|
22
|
+
/** @jsx jsx */
|
|
22
23
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
24
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
24
25
|
var toolbar = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n position: relative;\n @media (max-width: ", "px) {\n grid-column: 1 / 2;\n grid-row: 2;\n width: calc(100% - 30px);\n margin: 0 15px;\n }\n"])), _editorSharedStyles.akEditorMobileMaxWidth);
|
|
@@ -38,13 +39,13 @@ var ToolbarWithSizeDetector = exports.ToolbarWithSizeDetector = function Toolbar
|
|
|
38
39
|
var minWidth = "min-width: ".concat(props.hasMinWidth ? toolbarMinWidth : '254', "px");
|
|
39
40
|
return [toolbar, minWidth];
|
|
40
41
|
}, [props.appearance, props.hasMinWidth, props.twoLineEditorToolbar]);
|
|
41
|
-
return
|
|
42
|
+
return (0, _react2.jsx)("div", {
|
|
42
43
|
css: toolbarStyle
|
|
43
|
-
},
|
|
44
|
+
}, (0, _react2.jsx)(_widthDetector.WidthObserver, {
|
|
44
45
|
setWidth: setWidth
|
|
45
|
-
}), props.editorView && toolbarSize ?
|
|
46
|
+
}), props.editorView && toolbarSize ? (0, _react2.jsx)(_Toolbar.Toolbar, (0, _extends2.default)({}, props, {
|
|
46
47
|
toolbarSize: toolbarSize
|
|
47
|
-
})) :
|
|
48
|
+
})) : (0, _react2.jsx)("div", {
|
|
48
49
|
ref: ref
|
|
49
50
|
}));
|
|
50
51
|
};
|
|
@@ -15,8 +15,9 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
15
15
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
16
16
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
17
17
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
18
|
+
var _react = require("@emotion/react");
|
|
18
19
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
19
|
-
var
|
|
20
|
+
var _react2 = require("react");
|
|
20
21
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
21
22
|
var _spinner = _interopRequireDefault(require("@atlaskit/spinner"));
|
|
22
23
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
@@ -35,7 +36,7 @@ var _context2 = require("../../presets/context");
|
|
|
35
36
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
36
37
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
37
38
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
38
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
39
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /** @jsx jsx */
|
|
39
40
|
var PopupWithOutsideListeners = (0, _withOuterListeners.default)(_ui.Popup);
|
|
40
41
|
var POPUP_HEIGHT = 388;
|
|
41
42
|
var POPUP_WIDTH = 280;
|
|
@@ -157,20 +158,20 @@ var ToolbarFeedbackInternal = /*#__PURE__*/function (_PureComponent) {
|
|
|
157
158
|
popupsMountPoint = _this$props.popupsMountPoint,
|
|
158
159
|
popupsBoundariesElement = _this$props.popupsBoundariesElement,
|
|
159
160
|
popupsScrollableElement = _this$props.popupsScrollableElement;
|
|
160
|
-
var iconBefore = this.state.jiraIssueCollectorScriptLoading ?
|
|
161
|
+
var iconBefore = this.state.jiraIssueCollectorScriptLoading ? (0, _react.jsx)(_spinner.default, null) : undefined;
|
|
161
162
|
|
|
162
163
|
// JIRA issue collector script is using jQuery internally
|
|
163
|
-
return this.hasJquery() ?
|
|
164
|
+
return this.hasJquery() ? (0, _react.jsx)("div", {
|
|
164
165
|
css: _styles.wrapper
|
|
165
|
-
},
|
|
166
|
+
}, (0, _react.jsx)(_ToolbarButton.default, {
|
|
166
167
|
ref: this.handleRef,
|
|
167
168
|
iconBefore: iconBefore,
|
|
168
169
|
onClick: this.collectFeedback,
|
|
169
170
|
selected: false,
|
|
170
171
|
spacing: "compact"
|
|
171
|
-
},
|
|
172
|
+
}, (0, _react.jsx)("span", {
|
|
172
173
|
css: _styles.buttonContent
|
|
173
|
-
}, "Feedback")), this.state.showOptOutOption &&
|
|
174
|
+
}, "Feedback")), this.state.showOptOutOption && (0, _react.jsx)(PopupWithOutsideListeners, {
|
|
174
175
|
target: this.state.target,
|
|
175
176
|
mountTo: popupsMountPoint,
|
|
176
177
|
boundariesElement: popupsBoundariesElement,
|
|
@@ -179,32 +180,32 @@ var ToolbarFeedbackInternal = /*#__PURE__*/function (_PureComponent) {
|
|
|
179
180
|
fitWidth: POPUP_WIDTH,
|
|
180
181
|
handleClickOutside: this.toggleShowOptOutOption,
|
|
181
182
|
handleEscapeKeydown: this.toggleShowOptOutOption
|
|
182
|
-
},
|
|
183
|
+
}, (0, _react.jsx)("div", {
|
|
183
184
|
css: _styles.confirmationPopup
|
|
184
|
-
},
|
|
185
|
+
}, (0, _react.jsx)("div", {
|
|
185
186
|
css: _styles.confirmationHeader
|
|
186
|
-
},
|
|
187
|
+
}, (0, _react.jsx)("img", {
|
|
187
188
|
css: _styles.confirmationImg,
|
|
188
189
|
src: EDITOR_IMAGE_URL
|
|
189
|
-
})),
|
|
190
|
+
})), (0, _react.jsx)("div", {
|
|
190
191
|
css: _styles.confirmationText
|
|
191
|
-
},
|
|
192
|
+
}, (0, _react.jsx)("div", null, "We are rolling out a new editing experience across Atlassian products. Help us improve by providing feedback."), (0, _react.jsx)("div", null, "You can opt-out for now by turning off the \"Atlassian Editor\" feature on the Labs page in Bitbucket settings."), (0, _react.jsx)(_buttonGroup.default, null, (0, _react.jsx)(_customThemeButton.default, {
|
|
192
193
|
appearance: "primary",
|
|
193
194
|
onClick: this.openFeedbackPopup
|
|
194
|
-
}, "Give feedback"),
|
|
195
|
+
}, "Give feedback"), (0, _react.jsx)(_customThemeButton.default, {
|
|
195
196
|
appearance: "default",
|
|
196
197
|
onClick: this.openLearnMorePage
|
|
197
198
|
}, "Learn more")))))) : null;
|
|
198
199
|
}
|
|
199
200
|
}]);
|
|
200
201
|
return ToolbarFeedbackInternal;
|
|
201
|
-
}(
|
|
202
|
+
}(_react2.PureComponent);
|
|
202
203
|
(0, _defineProperty2.default)(ToolbarFeedbackInternal, "contextTypes", {
|
|
203
204
|
editorActions: _propTypes.default.object.isRequired
|
|
204
205
|
});
|
|
205
206
|
function ToolbarFeedback(props) {
|
|
206
207
|
var api = (0, _context2.usePresetContext)();
|
|
207
|
-
return
|
|
208
|
+
return (0, _react.jsx)(ToolbarFeedbackInternal, (0, _extends2.default)({
|
|
208
209
|
api: api
|
|
209
210
|
}, props));
|
|
210
211
|
}
|
|
@@ -17,6 +17,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
17
17
|
var _react2 = require("@emotion/react");
|
|
18
18
|
var _colors = require("@atlaskit/theme/colors");
|
|
19
19
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
20
|
+
/** @jsx jsx */
|
|
20
21
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
21
22
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
22
23
|
var pulseBackground = (0, _react2.keyframes)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n 50% {\n background-color: ", ";\n }\n"])), "var(--ds-blanket-danger, ".concat(_colors.R100, ")"));
|
|
@@ -43,7 +44,7 @@ var WithFlash = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
43
44
|
animate = _this$props.animate,
|
|
44
45
|
children = _this$props.children;
|
|
45
46
|
this.toggle = animate && !this.toggle;
|
|
46
|
-
return
|
|
47
|
+
return (0, _react2.jsx)("div", {
|
|
47
48
|
css: animate ? flashWrapperAnimated : flashWrapper,
|
|
48
49
|
className: this.toggle ? '-flash' : ''
|
|
49
50
|
}, children);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/** @jsx jsx */
|
|
2
3
|
import { memo, Fragment, useCallback } from 'react';
|
|
3
|
-
import { css } from '@emotion/react';
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
4
5
|
import { ACTION, ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
|
|
5
6
|
import { PortalProviderWithThemeProviders, PortalRenderer } from '@atlaskit/editor-common/portal-provider';
|
|
6
7
|
import { BaseTheme, WidthProvider } from '@atlaskit/editor-common/ui';
|
|
@@ -45,28 +46,28 @@ export const EditorInternal = /*#__PURE__*/memo(({
|
|
|
45
46
|
// it will still be enabled as it currently is. Then we can
|
|
46
47
|
// progressively opt out synthetic tenants.
|
|
47
48
|
const isErrorTrackingExplicitlyDisabled = ((_props$performanceTra3 = props.performanceTracking) === null || _props$performanceTra3 === void 0 ? void 0 : (_props$performanceTra4 = _props$performanceTra3.errorTracking) === null || _props$performanceTra4 === void 0 ? void 0 : _props$performanceTra4.enabled) === false;
|
|
48
|
-
return
|
|
49
|
+
return jsx(Fragment, null, renderTrackingEnabled && jsx(RenderTracking, {
|
|
49
50
|
componentProps: props,
|
|
50
51
|
action: ACTION.RE_RENDERED,
|
|
51
52
|
actionSubject: ACTION_SUBJECT.EDITOR,
|
|
52
53
|
handleAnalyticsEvent: handleAnalyticsEvent,
|
|
53
54
|
propsToIgnore: ['defaultValue'],
|
|
54
55
|
useShallow: useShallow
|
|
55
|
-
}),
|
|
56
|
+
}), jsx(ErrorBoundary, {
|
|
56
57
|
errorTracking: !isErrorTrackingExplicitlyDisabled,
|
|
57
58
|
createAnalyticsEvent: createAnalyticsEvent,
|
|
58
59
|
contextIdentifierProvider: props.contextIdentifierProvider,
|
|
59
60
|
featureFlags: featureFlags
|
|
60
|
-
},
|
|
61
|
+
}, jsx(WidthProvider, {
|
|
61
62
|
css: css({
|
|
62
63
|
height: '100%'
|
|
63
64
|
})
|
|
64
|
-
},
|
|
65
|
+
}, jsx(EditorContext, {
|
|
65
66
|
editorActions: editorActions
|
|
66
|
-
},
|
|
67
|
+
}, jsx(ContextAdapter, null, jsx(PortalProviderWithThemeProviders, {
|
|
67
68
|
onAnalyticsEvent: handleAnalyticsEvent,
|
|
68
69
|
useAnalyticsContext: props.UNSAFE_useAnalyticsContext,
|
|
69
|
-
render: portalProviderAPI =>
|
|
70
|
+
render: portalProviderAPI => jsx(Fragment, null, jsx(ReactEditorViewContextWrapper, {
|
|
70
71
|
editorProps: overriddenEditorProps,
|
|
71
72
|
createAnalyticsEvent: createAnalyticsEvent,
|
|
72
73
|
portalProviderAPI: portalProviderAPI,
|
|
@@ -85,9 +86,9 @@ export const EditorInternal = /*#__PURE__*/memo(({
|
|
|
85
86
|
editorRef
|
|
86
87
|
}) => {
|
|
87
88
|
var _props$featureFlags, _props$featureFlags2;
|
|
88
|
-
return
|
|
89
|
+
return jsx(BaseTheme, {
|
|
89
90
|
baseFontSize: getBaseFontSize(props.appearance)
|
|
90
|
-
},
|
|
91
|
+
}, jsx(Component, {
|
|
91
92
|
innerRef: editorRef,
|
|
92
93
|
appearance: props.appearance,
|
|
93
94
|
disabled: props.disabled,
|
|
@@ -121,7 +122,7 @@ export const EditorInternal = /*#__PURE__*/memo(({
|
|
|
121
122
|
hideAvatarGroup: props.hideAvatarGroup
|
|
122
123
|
}));
|
|
123
124
|
}
|
|
124
|
-
}),
|
|
125
|
+
}), jsx(PortalRenderer, {
|
|
125
126
|
portalProviderAPI: portalProviderAPI
|
|
126
127
|
}))
|
|
127
128
|
}))))));
|
|
@@ -144,7 +145,7 @@ function ReactEditorViewContextWrapper(props) {
|
|
|
144
145
|
setInternalEditorAPI === null || setInternalEditorAPI === void 0 ? void 0 : setInternalEditorAPI(api);
|
|
145
146
|
setExternalEditorAPI === null || setExternalEditorAPI === void 0 ? void 0 : setExternalEditorAPI(api);
|
|
146
147
|
}, [setInternalEditorAPI, setExternalEditorAPI]);
|
|
147
|
-
return
|
|
148
|
+
return jsx(ReactEditorView, _extends({}, props, {
|
|
148
149
|
setEditorApi: setEditorAPI
|
|
149
150
|
}));
|
|
150
151
|
}
|