@atlaskit/editor-core 189.4.15 → 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 +34 -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/pm-plugins/unique-id.js +4 -3
- 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/pm-plugins/unique-id.js +4 -3
- 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/pm-plugins/unique-id.js +4 -3
- 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 +9 -5
|
@@ -9,9 +9,8 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
9
9
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
10
10
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11
11
|
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; } }
|
|
12
|
-
/** @jsx jsx */
|
|
13
12
|
import React, { Fragment } from 'react';
|
|
14
|
-
import { css
|
|
13
|
+
import { css } from '@emotion/react';
|
|
15
14
|
import ButtonGroup from '@atlaskit/button/button-group';
|
|
16
15
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
17
16
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
@@ -100,15 +99,15 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
100
99
|
event.preventDefault();
|
|
101
100
|
event.stopPropagation();
|
|
102
101
|
};
|
|
103
|
-
return
|
|
102
|
+
return /*#__PURE__*/React.createElement(WithFlash, {
|
|
104
103
|
animate: maxContentSizeReached
|
|
105
|
-
},
|
|
104
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
106
105
|
css: [commentEditorStyle, css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n min-height: ", "px;\n "])), minHeight)],
|
|
107
106
|
className: "akEditor",
|
|
108
107
|
ref: _this.wrapperElementRef
|
|
109
|
-
},
|
|
108
|
+
}, /*#__PURE__*/React.createElement(MainToolbar, {
|
|
110
109
|
useStickyToolbar: useStickyToolbar
|
|
111
|
-
},
|
|
110
|
+
}, /*#__PURE__*/React.createElement(ToolbarArrowKeyNavigationProvider, {
|
|
112
111
|
editorView: editorView,
|
|
113
112
|
childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
|
|
114
113
|
isShortcutToFocusToolbar: isShortcutToFocusToolbar,
|
|
@@ -116,7 +115,7 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
116
115
|
editorAppearance: _this.appearance,
|
|
117
116
|
useStickyToolbar: useStickyToolbar,
|
|
118
117
|
intl: intl
|
|
119
|
-
},
|
|
118
|
+
}, /*#__PURE__*/React.createElement(Toolbar, {
|
|
120
119
|
editorView: editorView,
|
|
121
120
|
editorActions: editorActions,
|
|
122
121
|
eventDispatcher: eventDispatcher,
|
|
@@ -129,14 +128,14 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
129
128
|
disabled: !!disabled,
|
|
130
129
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
131
130
|
containerElement: _this.containerElement
|
|
132
|
-
}),
|
|
131
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
133
132
|
css: mainToolbarCustomComponentsSlotStyle
|
|
134
|
-
}, customPrimaryToolbarComponents))),
|
|
133
|
+
}, customPrimaryToolbarComponents))), /*#__PURE__*/React.createElement(ClickAreaBlock, {
|
|
135
134
|
editorView: editorView,
|
|
136
135
|
editorDisabled: disabled
|
|
137
|
-
},
|
|
136
|
+
}, /*#__PURE__*/React.createElement(WidthConsumer, null, function (_ref2) {
|
|
138
137
|
var width = _ref2.width;
|
|
139
|
-
return
|
|
138
|
+
return /*#__PURE__*/React.createElement(ContentArea, {
|
|
140
139
|
ref: function ref(_ref3) {
|
|
141
140
|
return _this.containerElement = _ref3;
|
|
142
141
|
},
|
|
@@ -145,7 +144,7 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
145
144
|
'less-margin': width < akEditorMobileBreakoutPoint
|
|
146
145
|
}),
|
|
147
146
|
featureFlags: featureFlags
|
|
148
|
-
}, customContentComponents,
|
|
147
|
+
}, customContentComponents, /*#__PURE__*/React.createElement(PluginSlot, {
|
|
149
148
|
editorView: editorView,
|
|
150
149
|
editorActions: editorActions,
|
|
151
150
|
eventDispatcher: eventDispatcher,
|
|
@@ -161,19 +160,19 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
161
160
|
wrapperElement: _this.wrapperElementRef.current,
|
|
162
161
|
pluginHooks: pluginHooks
|
|
163
162
|
}), editorDOMElement);
|
|
164
|
-
}))), showSecondaryToolbar &&
|
|
163
|
+
}))), showSecondaryToolbar && /*#__PURE__*/React.createElement("div", {
|
|
165
164
|
css: secondaryToolbarStyle,
|
|
166
165
|
"data-testid": "ak-editor-secondary-toolbar"
|
|
167
|
-
},
|
|
166
|
+
}, /*#__PURE__*/React.createElement(ButtonGroup, null, !!onSave && /*#__PURE__*/React.createElement(Button, {
|
|
168
167
|
appearance: "primary",
|
|
169
168
|
onClick: _this.handleSave,
|
|
170
169
|
testId: "comment-save-button",
|
|
171
170
|
isDisabled: disabled || mediaState && !mediaState.allUploadsFinished
|
|
172
|
-
}, intl.formatMessage(messages.saveButton)), !!onCancel &&
|
|
171
|
+
}, intl.formatMessage(messages.saveButton)), !!onCancel && /*#__PURE__*/React.createElement(Button, {
|
|
173
172
|
appearance: "subtle",
|
|
174
173
|
onClick: _this.handleCancel,
|
|
175
174
|
isDisabled: disabled
|
|
176
|
-
}, intl.formatMessage(messages.cancelButton))),
|
|
175
|
+
}, intl.formatMessage(messages.cancelButton))), /*#__PURE__*/React.createElement("span", {
|
|
177
176
|
style: {
|
|
178
177
|
flexGrow: 1
|
|
179
178
|
}
|
|
@@ -187,7 +186,7 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
187
186
|
_createClass(Editor, [{
|
|
188
187
|
key: "render",
|
|
189
188
|
value: function render() {
|
|
190
|
-
return
|
|
189
|
+
return /*#__PURE__*/React.createElement(RenderWithPluginState, {
|
|
191
190
|
renderChrome: this.renderChrome
|
|
192
191
|
});
|
|
193
192
|
}
|
|
@@ -201,7 +200,7 @@ function RenderWithPluginState(_ref4) {
|
|
|
201
200
|
var _useSharedPluginState = useSharedPluginState(api, ['media', 'maxContentSize']),
|
|
202
201
|
mediaState = _useSharedPluginState.mediaState,
|
|
203
202
|
maxContentSizeState = _useSharedPluginState.maxContentSizeState;
|
|
204
|
-
return
|
|
203
|
+
return /*#__PURE__*/React.createElement(Fragment, null, renderChrome({
|
|
205
204
|
maxContentSize: maxContentSizeState,
|
|
206
205
|
mediaState: mediaState !== null && mediaState !== void 0 ? mediaState : undefined
|
|
207
206
|
}));
|
|
@@ -2,10 +2,8 @@ import _typeof from "@babel/runtime/helpers/typeof";
|
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
4
4
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
5
|
-
/** @jsx jsx */
|
|
6
|
-
|
|
7
5
|
import React, { useEffect, useState } from 'react';
|
|
8
|
-
import { css
|
|
6
|
+
import { css } from '@emotion/react';
|
|
9
7
|
import { N30 } from '@atlaskit/theme/colors';
|
|
10
8
|
import { akEditorToolbarKeylineHeight, akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
|
|
11
9
|
export var TableControlsPadding = 20;
|
|
@@ -28,14 +26,14 @@ var StickyToolbar = function StickyToolbar(props) {
|
|
|
28
26
|
setTop(props.offsetTop || 0);
|
|
29
27
|
}
|
|
30
28
|
}, [props.externalToolbarRef, props.offsetTop]);
|
|
31
|
-
return
|
|
29
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
32
30
|
css: [mainToolbarWrapperStyle, stickyToolbarWrapperStyle, css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n top: ", "px;\n "])), top)],
|
|
33
31
|
"data-testid": "ak-editor-main-toolbar",
|
|
34
32
|
className: 'show-keyline'
|
|
35
33
|
}, props.children);
|
|
36
34
|
};
|
|
37
35
|
var FixedToolbar = function FixedToolbar(props) {
|
|
38
|
-
return
|
|
36
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
39
37
|
css: mainToolbarWrapperStyle,
|
|
40
38
|
"data-testid": "ak-editor-main-toolbar"
|
|
41
39
|
}, props.children);
|
|
@@ -72,8 +70,8 @@ export var MainToolbar = function MainToolbar(_ref) {
|
|
|
72
70
|
var useStickyToolbar = _ref.useStickyToolbar,
|
|
73
71
|
children = _ref.children;
|
|
74
72
|
if (useStickyToolbar) {
|
|
75
|
-
return
|
|
73
|
+
return /*#__PURE__*/React.createElement(StickyToolbar, getStickyParameters(useStickyToolbar), children);
|
|
76
74
|
}
|
|
77
|
-
return
|
|
75
|
+
return /*#__PURE__*/React.createElement(FixedToolbar, null, children);
|
|
78
76
|
};
|
|
79
77
|
export var mainToolbarCustomComponentsSlotStyle = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: flex-end;\n align-items: center;\n flex-grow: 1;\n padding-right: ", ";\n > div {\n display: flex;\n flex-shrink: 0;\n }\n"])), "var(--ds-space-250, 20px)");
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
/** @jsx jsx */
|
|
3
2
|
import React, { useEffect, useState, useRef, useMemo } from 'react';
|
|
4
|
-
import { jsx } from '@emotion/react';
|
|
5
3
|
import { fullPageEditorWrapper } from './StyledComponents';
|
|
6
4
|
import { ContextPanelWidthProvider } from '@atlaskit/editor-common/ui';
|
|
7
5
|
import { FullPageContentArea } from './FullPageContentArea';
|
|
@@ -43,11 +41,11 @@ export var FullPageEditor = function FullPageEditor(props) {
|
|
|
43
41
|
}, [props.innerRef]);
|
|
44
42
|
var scrollContentContainerRef = useRef(null);
|
|
45
43
|
var showKeyline = useShowKeyline(scrollContentContainerRef);
|
|
46
|
-
return
|
|
44
|
+
return /*#__PURE__*/React.createElement(ContextPanelWidthProvider, null, /*#__PURE__*/React.createElement("div", {
|
|
47
45
|
css: fullPageEditorWrapper,
|
|
48
46
|
className: "akEditor",
|
|
49
47
|
ref: wrapperElementRef
|
|
50
|
-
},
|
|
48
|
+
}, /*#__PURE__*/React.createElement(FullPageToolbar, {
|
|
51
49
|
appearance: props.appearance,
|
|
52
50
|
beforeIcon: props.primaryToolbarIconBefore,
|
|
53
51
|
collabEdit: props.collabEdit,
|
|
@@ -68,7 +66,7 @@ export var FullPageEditor = function FullPageEditor(props) {
|
|
|
68
66
|
showKeyline: showKeyline,
|
|
69
67
|
featureFlags: props.featureFlags,
|
|
70
68
|
hideAvatarGroup: props.hideAvatarGroup
|
|
71
|
-
}),
|
|
69
|
+
}), /*#__PURE__*/React.createElement(FullPageContentArea, {
|
|
72
70
|
ref: scrollContentContainerRef,
|
|
73
71
|
appearance: props.appearance,
|
|
74
72
|
contentComponents: props.contentComponents,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { jsx, useTheme } from '@emotion/react';
|
|
1
|
+
import { useTheme } from '@emotion/react';
|
|
3
2
|
import { WidthConsumer, ContextPanelConsumer } from '@atlaskit/editor-common/ui';
|
|
4
3
|
import React, { useImperativeHandle, useRef } from 'react';
|
|
5
4
|
import { injectIntl } from 'react-intl-next';
|
|
@@ -24,22 +23,22 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
24
23
|
}
|
|
25
24
|
};
|
|
26
25
|
}, []);
|
|
27
|
-
return
|
|
26
|
+
return /*#__PURE__*/React.createElement(WidthConsumer, null, function (_ref) {
|
|
28
27
|
var width = _ref.width;
|
|
29
|
-
return
|
|
28
|
+
return /*#__PURE__*/React.createElement(ContextPanelConsumer, null, function (_ref2) {
|
|
30
29
|
var _contentAreaRef$curre;
|
|
31
30
|
var positionedOverEditor = _ref2.positionedOverEditor;
|
|
32
|
-
return
|
|
31
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
33
32
|
css: [contentArea, positionedOverEditor && positionedOverEditorStyle],
|
|
34
33
|
"data-testid": CONTENT_AREA_TEST_ID
|
|
35
|
-
},
|
|
34
|
+
}, /*#__PURE__*/React.createElement(ScrollContainer, {
|
|
36
35
|
className: "fabric-editor-popup-scroll-parent",
|
|
37
36
|
featureFlags: props.featureFlags,
|
|
38
37
|
ref: scrollContainerRef
|
|
39
|
-
},
|
|
38
|
+
}, /*#__PURE__*/React.createElement(ClickAreaBlock, {
|
|
40
39
|
editorView: props.editorView,
|
|
41
40
|
editorDisabled: props.disabled
|
|
42
|
-
},
|
|
41
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
43
42
|
css: editorContentAreaStyle({
|
|
44
43
|
fullWidthMode: fullWidthMode,
|
|
45
44
|
layoutMaxWidth: theme.layoutMaxWidth,
|
|
@@ -48,11 +47,11 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
48
47
|
role: "region",
|
|
49
48
|
"aria-label": props.intl.formatMessage(messages.editableContentLabel),
|
|
50
49
|
ref: contentAreaRef
|
|
51
|
-
},
|
|
50
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
52
51
|
css: editorContentGutterStyle,
|
|
53
52
|
className: ['ak-editor-content-area', fullWidthMode ? 'fabric-editor--full-width-mode' : ''].join(' '),
|
|
54
53
|
ref: contentAreaRef
|
|
55
|
-
}, props.customContentComponents,
|
|
54
|
+
}, props.customContentComponents, /*#__PURE__*/React.createElement(PluginSlot, {
|
|
56
55
|
editorView: props.editorView,
|
|
57
56
|
editorActions: props.editorActions,
|
|
58
57
|
eventDispatcher: props.eventDispatcher,
|
|
@@ -68,9 +67,9 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
68
67
|
containerElement: scrollContainerRef.current,
|
|
69
68
|
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
|
|
70
69
|
wrapperElement: props.wrapperElement
|
|
71
|
-
}), props.editorDOMElement)))),
|
|
70
|
+
}), props.editorDOMElement)))), /*#__PURE__*/React.createElement("div", {
|
|
72
71
|
css: sidebarArea
|
|
73
|
-
}, props.contextPanel ||
|
|
72
|
+
}, props.contextPanel || /*#__PURE__*/React.createElement(ContextPanel, {
|
|
74
73
|
visible: false
|
|
75
74
|
})));
|
|
76
75
|
});
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
/** @jsx jsx */
|
|
3
|
-
|
|
4
2
|
import React, { useState, useEffect } from 'react';
|
|
5
|
-
import { jsx } from '@emotion/react';
|
|
6
3
|
import { injectIntl } from 'react-intl-next';
|
|
7
4
|
import AvatarsWithPluginState from '../../../plugins/collab-edit/ui';
|
|
8
5
|
import FindReplaceToolbarButtonWithState from '../../../plugins/find-replace/FindReplaceToolbarButtonWithState';
|
|
@@ -23,11 +20,11 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
|
|
|
23
20
|
|
|
24
21
|
// When primary toolbar components is undefined, do not show two line editor toolbar
|
|
25
22
|
var twoLineEditorToolbar = !!props.customPrimaryToolbarComponents && !!((_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.twoLineEditorToolbar);
|
|
26
|
-
var nonCustomToolbar =
|
|
23
|
+
var nonCustomToolbar = /*#__PURE__*/React.createElement("div", {
|
|
27
24
|
css: nonCustomToolbarWrapperStyle
|
|
28
|
-
}, props.beforeIcon &&
|
|
25
|
+
}, props.beforeIcon && /*#__PURE__*/React.createElement("div", {
|
|
29
26
|
css: mainToolbarIconBeforeStyle
|
|
30
|
-
}, props.beforeIcon),
|
|
27
|
+
}, props.beforeIcon), /*#__PURE__*/React.createElement(Toolbar, {
|
|
31
28
|
editorView: props.editorView,
|
|
32
29
|
editorActions: props.editorActions,
|
|
33
30
|
eventDispatcher: props.eventDispatcher,
|
|
@@ -43,16 +40,17 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
|
|
|
43
40
|
hasMinWidth: props.hasMinWidth,
|
|
44
41
|
twoLineEditorToolbar: twoLineEditorToolbar
|
|
45
42
|
}));
|
|
46
|
-
var customToolbar =
|
|
43
|
+
var customToolbar = /*#__PURE__*/React.createElement("div", {
|
|
47
44
|
css: customToolbarWrapperStyle
|
|
48
|
-
}, twoLineEditorToolbar && !!props.customPrimaryToolbarComponents && 'before' in props.customPrimaryToolbarComponents ?
|
|
45
|
+
}, twoLineEditorToolbar && !!props.customPrimaryToolbarComponents && 'before' in props.customPrimaryToolbarComponents ? /*#__PURE__*/React.createElement(BeforePrimaryToolbarWrapper, {
|
|
49
46
|
beforePrimaryToolbarComponents: props.customPrimaryToolbarComponents.before
|
|
50
47
|
}) : null, props.hideAvatarGroup || (props === null || props === void 0 || (_props$featureFlags2 = props.featureFlags) === null || _props$featureFlags2 === void 0 ? void 0 : _props$featureFlags2.showAvatarGroupAsPlugin) === true && !((_props$featureFlags3 = props.featureFlags) !== null && _props$featureFlags3 !== void 0 && _props$featureFlags3.twoLineEditorToolbar) ? null :
|
|
48
|
+
/*#__PURE__*/
|
|
51
49
|
// Avatars are moved to Confluence codebase for Edit in Context
|
|
52
50
|
// When Edit in Context is enabled customPrimaryToolbarComponents is undefined
|
|
53
51
|
// For more details please check
|
|
54
52
|
// https://hello.atlassian.net/wiki/spaces/PCG/pages/2851572180/Editor+toolbar+for+live+pages+and+edit+in+context+projects
|
|
55
|
-
|
|
53
|
+
React.createElement(AvatarsWithPluginState, {
|
|
56
54
|
editorView: props.editorView,
|
|
57
55
|
eventDispatcher: props.eventDispatcher,
|
|
58
56
|
inviteToEditComponent: (_props$collabEdit = props.collabEdit) === null || _props$collabEdit === void 0 ? void 0 : _props$collabEdit.inviteToEditComponent,
|
|
@@ -60,7 +58,7 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
|
|
|
60
58
|
isInviteToEditButtonSelected: (_props$collabEdit3 = props.collabEdit) === null || _props$collabEdit3 === void 0 ? void 0 : _props$collabEdit3.isInviteToEditButtonSelected,
|
|
61
59
|
featureFlags: props.featureFlags || {},
|
|
62
60
|
editorAnalyticsAPI: editorAPI === null || editorAPI === void 0 || (_editorAPI$analytics = editorAPI.analytics) === null || _editorAPI$analytics === void 0 ? void 0 : _editorAPI$analytics.actions
|
|
63
|
-
}), editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ?
|
|
61
|
+
}), editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ? /*#__PURE__*/React.createElement(FindReplaceToolbarButtonWithState, {
|
|
64
62
|
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
65
63
|
popupsMountPoint: props.popupsMountPoint,
|
|
66
64
|
popupsScrollableElement: props.popupsScrollableElement,
|
|
@@ -99,22 +97,22 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
|
|
|
99
97
|
event.preventDefault();
|
|
100
98
|
event.stopPropagation();
|
|
101
99
|
};
|
|
102
|
-
return
|
|
100
|
+
return /*#__PURE__*/React.createElement(ContextPanelConsumer, null, function (_ref) {
|
|
103
101
|
var contextPanelWidth = _ref.width;
|
|
104
|
-
return
|
|
102
|
+
return /*#__PURE__*/React.createElement(ToolbarArrowKeyNavigationProvider, {
|
|
105
103
|
editorView: props.editorView,
|
|
106
104
|
childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
|
|
107
105
|
isShortcutToFocusToolbar: isShortcutToFocusToolbar,
|
|
108
106
|
handleEscape: handleEscape,
|
|
109
107
|
intl: props.intl
|
|
110
|
-
},
|
|
108
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
111
109
|
css: mainToolbarStyle(props.showKeyline || contextPanelWidth > 0, twoLineEditorToolbar),
|
|
112
110
|
"data-testid": "ak-editor-main-toolbar"
|
|
113
|
-
},
|
|
111
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
114
112
|
css: mainToolbarFirstChildStyle(twoLineEditorToolbar),
|
|
115
113
|
role: "toolbar",
|
|
116
114
|
"aria-label": props.intl.formatMessage(messages.toolbarLabel)
|
|
117
|
-
}, shouldSplitToolbar ? customToolbar : nonCustomToolbar),
|
|
115
|
+
}, shouldSplitToolbar ? customToolbar : nonCustomToolbar), /*#__PURE__*/React.createElement("div", {
|
|
118
116
|
css: mainToolbarSecondChildStyle(twoLineEditorToolbar),
|
|
119
117
|
"data-testid": 'avatar-group-outside-plugin',
|
|
120
118
|
role: "region",
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
|
-
/** @jsx jsx */
|
|
4
3
|
import React, { useCallback, forwardRef } from 'react';
|
|
5
|
-
import { css
|
|
4
|
+
import { css } from '@emotion/react';
|
|
6
5
|
import WithFlash from '../WithFlash';
|
|
7
6
|
import { createEditorContentStyle } from '../ContentStyles';
|
|
8
7
|
import { ClickAreaMobile as ClickArea } from '../Addon';
|
|
@@ -54,20 +53,20 @@ export var MobileAppearance = /*#__PURE__*/forwardRef(function MobileAppearance(
|
|
|
54
53
|
currentIsExpanded = isExpanded;
|
|
55
54
|
}
|
|
56
55
|
}
|
|
57
|
-
return
|
|
56
|
+
return /*#__PURE__*/React.createElement(WithFlash, {
|
|
58
57
|
animate: maxContentSizeReached
|
|
59
|
-
},
|
|
58
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
60
59
|
css: mobileEditor,
|
|
61
60
|
ref: ref
|
|
62
|
-
},
|
|
61
|
+
}, /*#__PURE__*/React.createElement(ClickArea, {
|
|
63
62
|
editorView: editorView || undefined,
|
|
64
63
|
minHeight: minHeight,
|
|
65
64
|
persistScrollGutter: persistScrollGutter,
|
|
66
65
|
isExpanded: currentIsExpanded,
|
|
67
66
|
editorDisabled: editorDisabled
|
|
68
|
-
},
|
|
67
|
+
}, /*#__PURE__*/React.createElement(ContentArea, {
|
|
69
68
|
featureFlags: featureFlags
|
|
70
|
-
},
|
|
69
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
71
70
|
className: "ak-editor-content-area"
|
|
72
71
|
}, children)))));
|
|
73
72
|
}, [children, editorView, persistScrollGutter, editorDisabled, ref, featureFlags, api === null || api === void 0 || (_api$base2 = api.base) === null || _api$base2 === void 0 ? void 0 : _api$base2.sharedState]);
|
|
@@ -7,9 +7,7 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
8
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9
9
|
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; } }
|
|
10
|
-
/** @jsx jsx */
|
|
11
10
|
import React from 'react';
|
|
12
|
-
import { jsx } from '@emotion/react';
|
|
13
11
|
import { PureComponent } from 'react';
|
|
14
12
|
import { inputStyle } from './styles';
|
|
15
13
|
import { injectIntl } from 'react-intl-next';
|
|
@@ -47,7 +45,7 @@ var ChromeCollapsed = /*#__PURE__*/function (_PureComponent) {
|
|
|
47
45
|
key: "render",
|
|
48
46
|
value: function render() {
|
|
49
47
|
var placeholder = this.props.text || this.props.intl.formatMessage(messages.chromeCollapsedPlaceholder);
|
|
50
|
-
return
|
|
48
|
+
return /*#__PURE__*/React.createElement("input", {
|
|
51
49
|
"data-testid": "chrome-collapsed",
|
|
52
50
|
css: inputStyle,
|
|
53
51
|
ref: this.handleInputRef,
|
|
@@ -2,64 +2,64 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
var _templateObject;
|
|
3
3
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
4
4
|
// Quality Ticket: https://product-fabric.atlassian.net/browse/DSP-4249
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
import React from 'react';
|
|
7
|
-
import { css
|
|
7
|
+
import { css } from '@emotion/react';
|
|
8
8
|
var imageContainer = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin: 0 auto ", ";\n height: 80px;\n"])), "var(--ds-space-300, 24px)");
|
|
9
9
|
var ErrorImage = function ErrorImage() {
|
|
10
|
-
return
|
|
10
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
11
11
|
css: imageContainer
|
|
12
|
-
},
|
|
12
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
13
13
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14
14
|
viewBox: "0 0 163.28 218",
|
|
15
15
|
height: "80"
|
|
16
|
-
},
|
|
16
|
+
}, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
|
17
17
|
id: "linear-gradient",
|
|
18
18
|
x1: "133.86",
|
|
19
19
|
x2: "-2.79",
|
|
20
20
|
y1: "136.43",
|
|
21
21
|
y2: "200.15",
|
|
22
22
|
gradientUnits: "userSpaceOnUse"
|
|
23
|
-
},
|
|
23
|
+
}, /*#__PURE__*/React.createElement("stop", {
|
|
24
24
|
offset: "0",
|
|
25
25
|
stopColor: "#ffd740"
|
|
26
|
-
}),
|
|
26
|
+
}), /*#__PURE__*/React.createElement("stop", {
|
|
27
27
|
offset: "1",
|
|
28
28
|
stopColor: "#ffab00"
|
|
29
|
-
})),
|
|
29
|
+
})), /*#__PURE__*/React.createElement("clipPath", {
|
|
30
30
|
id: "clip-path"
|
|
31
|
-
},
|
|
31
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
32
32
|
id: "_Polygon_",
|
|
33
33
|
d: "M94.78 80.16l66.44 115.08A15.17 15.17 0 01148.08 218H15.2a15.17 15.17 0 01-13.14-22.76L68.5 80.16a15.17 15.17 0 0126.28 0z",
|
|
34
34
|
className: "cls-1",
|
|
35
35
|
"data-name": "<Polygon>"
|
|
36
|
-
})),
|
|
36
|
+
})), /*#__PURE__*/React.createElement("style", null, ".cls-1{fill:url(#linear-gradient)}.cls-2{fill:#253858}.cls-6{fill:none;stroke-linecap:round;stroke-miterlimit:10;stroke-width:2px;stroke:#5e6c84}")), /*#__PURE__*/React.createElement("g", {
|
|
37
37
|
id: "Layer_2",
|
|
38
38
|
"data-name": "Layer 2"
|
|
39
|
-
},
|
|
39
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
40
40
|
id: "Software"
|
|
41
|
-
},
|
|
41
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
42
42
|
id: "_Polygon_2",
|
|
43
43
|
d: "M94.78 80.16l66.44 115.08A15.17 15.17 0 01148.08 218H15.2a15.17 15.17 0 01-13.14-22.76L68.5 80.16a15.17 15.17 0 0126.28 0z",
|
|
44
44
|
className: "cls-1",
|
|
45
45
|
"data-name": "<Polygon>"
|
|
46
|
-
}),
|
|
46
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
47
47
|
d: "M87.22 163.71l2.88-44.35a9.18 9.18 0 00-9.16-9.78 9.18 9.18 0 00-9.16 9.78l2.88 44.35a6.3 6.3 0 006.28 5.89 6.3 6.3 0 006.28-5.89zM71.38 187.25a9.53 9.53 0 0010.39 9.58 9.68 9.68 0 00-.9-19.32 9.64 9.64 0 00-9.49 9.74z",
|
|
48
48
|
className: "cls-2"
|
|
49
|
-
}),
|
|
49
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
50
50
|
fill: "#ffc400",
|
|
51
51
|
d: "M91.7 27.17L84.29.45A.61.61 0 0083.1.5l-4.66 25.1-5.8-1.08a.61.61 0 00-.7.76L79.35 52a.61.61 0 001.19 0l4.66-25.1 5.8 1.03a.61.61 0 00.7-.76z"
|
|
52
|
-
}),
|
|
52
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
53
53
|
fill: "#ffab00",
|
|
54
54
|
d: "M65.12 41.81l-10.88-8.55a.27.27 0 00-.41.33L59.36 45l-2.66 1.31a.27.27 0 000 .45l10.87 8.55a.27.27 0 00.41-.33l-5.57-11.43 2.66-1.29a.27.27 0 00.05-.45z"
|
|
55
|
-
}),
|
|
55
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
56
56
|
fill: "none",
|
|
57
57
|
stroke: "#344563",
|
|
58
58
|
strokeLinecap: "round",
|
|
59
59
|
strokeMiterlimit: "10",
|
|
60
60
|
strokeWidth: "2",
|
|
61
61
|
d: "M115.15 36.6c-1.17 1.59-11-5.6-12.16-4s8.66 8.79 7.5 10.39-11-5.6-12.17-4 8.66 8.79 7.49 10.39-11-5.6-12.17-4 8.66 8.79 7.49 10.39"
|
|
62
|
-
}),
|
|
62
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
63
63
|
d: "M119.92 64.19c-1.46 1.33-7.05-4.78-8.51-3.44s4.13 7.45 2.67 8.78-7.05-4.78-8.51-3.44c-.68.62.16 2.27 1.11 4M44.8 64c1.82.77 5-6.87 6.86-6.1s-1.39 8.4.43 9.17 5-6.87 6.86-6.1c.85.36.61 2.19.29 4.13",
|
|
64
64
|
className: "cls-6"
|
|
65
65
|
})))));
|
|
@@ -4,9 +4,8 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
4
4
|
var _excluded = ["value"],
|
|
5
5
|
_excluded2 = ["id", "value"];
|
|
6
6
|
var _templateObject, _templateObject2;
|
|
7
|
-
/** @jsx jsx */
|
|
8
7
|
import React, { Fragment } from 'react';
|
|
9
|
-
import { css
|
|
8
|
+
import { css } from '@emotion/react';
|
|
10
9
|
import { Checkbox as AKCheckbox } from '@atlaskit/checkbox';
|
|
11
10
|
import { Field } from '@atlaskit/form';
|
|
12
11
|
import AKToggle from '@atlaskit/toggle';
|
|
@@ -41,7 +40,7 @@ function Checkbox(_ref) {
|
|
|
41
40
|
isRequired = _field$isRequired === void 0 ? false : _field$isRequired,
|
|
42
41
|
_field$defaultValue = field.defaultValue,
|
|
43
42
|
defaultValue = _field$defaultValue === void 0 ? false : _field$defaultValue;
|
|
44
|
-
return
|
|
43
|
+
return /*#__PURE__*/React.createElement(Field, {
|
|
45
44
|
name: name,
|
|
46
45
|
isRequired: isRequired,
|
|
47
46
|
validate: function validate(value) {
|
|
@@ -53,13 +52,13 @@ function Checkbox(_ref) {
|
|
|
53
52
|
error = _ref2.error;
|
|
54
53
|
var isChecked = fieldProps.value,
|
|
55
54
|
restFieldProps = _objectWithoutProperties(fieldProps, _excluded);
|
|
56
|
-
return
|
|
55
|
+
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(AKCheckbox, _extends({}, restFieldProps, {
|
|
57
56
|
label: label,
|
|
58
57
|
onChange: function onChange(event) {
|
|
59
58
|
return handleOnChange(fieldProps.onChange, onFieldChange, event);
|
|
60
59
|
},
|
|
61
60
|
isChecked: isChecked
|
|
62
|
-
})),
|
|
61
|
+
})), /*#__PURE__*/React.createElement(FieldMessages, {
|
|
63
62
|
error: error,
|
|
64
63
|
description: description
|
|
65
64
|
}));
|
|
@@ -75,7 +74,7 @@ function Toggle(_ref3) {
|
|
|
75
74
|
isRequired = _field$isRequired2 === void 0 ? false : _field$isRequired2,
|
|
76
75
|
_field$defaultValue2 = field.defaultValue,
|
|
77
76
|
defaultValue = _field$defaultValue2 === void 0 ? false : _field$defaultValue2;
|
|
78
|
-
return
|
|
77
|
+
return /*#__PURE__*/React.createElement(Field, {
|
|
79
78
|
name: name,
|
|
80
79
|
isRequired: isRequired,
|
|
81
80
|
validate: function validate(value) {
|
|
@@ -88,21 +87,21 @@ function Toggle(_ref3) {
|
|
|
88
87
|
var id = fieldProps.id,
|
|
89
88
|
isChecked = fieldProps.value,
|
|
90
89
|
restFieldProps = _objectWithoutProperties(fieldProps, _excluded2);
|
|
91
|
-
return
|
|
90
|
+
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
92
91
|
css: toggleFieldWrapper
|
|
93
|
-
},
|
|
92
|
+
}, /*#__PURE__*/React.createElement("label", {
|
|
94
93
|
css: toggleLabel,
|
|
95
94
|
id: id,
|
|
96
95
|
htmlFor: id
|
|
97
|
-
}, label, isRequired ?
|
|
96
|
+
}, label, isRequired ? /*#__PURE__*/React.createElement("span", {
|
|
98
97
|
css: requiredIndicator,
|
|
99
98
|
"aria-hidden": "true"
|
|
100
|
-
}, "*") : null),
|
|
99
|
+
}, "*") : null), /*#__PURE__*/React.createElement(AKToggle, _extends({}, restFieldProps, {
|
|
101
100
|
onChange: function onChange(event) {
|
|
102
101
|
return handleOnChange(fieldProps.onChange, onFieldChange, event);
|
|
103
102
|
},
|
|
104
103
|
isChecked: isChecked
|
|
105
|
-
}))),
|
|
104
|
+
}))), /*#__PURE__*/React.createElement(FieldMessages, {
|
|
106
105
|
error: error,
|
|
107
106
|
description: description
|
|
108
107
|
}));
|
|
@@ -113,13 +112,13 @@ export default function Boolean(_ref5) {
|
|
|
113
112
|
field = _ref5.field,
|
|
114
113
|
onFieldChange = _ref5.onFieldChange;
|
|
115
114
|
if (field.style === 'toggle') {
|
|
116
|
-
return
|
|
115
|
+
return /*#__PURE__*/React.createElement(Toggle, {
|
|
117
116
|
name: name,
|
|
118
117
|
field: field,
|
|
119
118
|
onFieldChange: onFieldChange
|
|
120
119
|
});
|
|
121
120
|
}
|
|
122
|
-
return
|
|
121
|
+
return /*#__PURE__*/React.createElement(Checkbox, {
|
|
123
122
|
name: name,
|
|
124
123
|
field: field,
|
|
125
124
|
onFieldChange: onFieldChange
|
|
@@ -4,9 +4,8 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
4
4
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
5
5
|
var _excluded = ["onChange", "value"];
|
|
6
6
|
var _templateObject;
|
|
7
|
-
/** @jsx jsx */
|
|
8
7
|
import { Fragment, useCallback } from 'react';
|
|
9
|
-
import { css
|
|
8
|
+
import { css } from '@emotion/react';
|
|
10
9
|
import { Checkbox as AKCheckbox } from '@atlaskit/checkbox';
|
|
11
10
|
import { Field, Fieldset as AKFieldset } from '@atlaskit/form';
|
|
12
11
|
import { ValidationError } from '../types';
|
|
@@ -37,7 +36,7 @@ function CheckboxGroupInner(_ref) {
|
|
|
37
36
|
onChange(_toConsumableArray(active));
|
|
38
37
|
onFieldChange();
|
|
39
38
|
}
|
|
40
|
-
return
|
|
39
|
+
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(AKFieldset, {
|
|
41
40
|
legend: label
|
|
42
41
|
}, options.map(function (_ref2, i) {
|
|
43
42
|
var optionLabel = _ref2.label,
|
|
@@ -46,7 +45,7 @@ function CheckboxGroupInner(_ref) {
|
|
|
46
45
|
var onOptionChange = function onOptionChange(event) {
|
|
47
46
|
_onChange(optionValue, event.target.checked);
|
|
48
47
|
};
|
|
49
|
-
return
|
|
48
|
+
return /*#__PURE__*/React.createElement(AKCheckbox, _extends({
|
|
50
49
|
key: i
|
|
51
50
|
}, restFieldProps, {
|
|
52
51
|
isRequired: false,
|
|
@@ -54,7 +53,7 @@ function CheckboxGroupInner(_ref) {
|
|
|
54
53
|
isChecked: isChecked,
|
|
55
54
|
onChange: onOptionChange
|
|
56
55
|
}));
|
|
57
|
-
})),
|
|
56
|
+
})), /*#__PURE__*/React.createElement(FieldMessages, {
|
|
58
57
|
error: error,
|
|
59
58
|
description: description
|
|
60
59
|
}));
|
|
@@ -69,14 +68,14 @@ export default function CheckboxGroup(_ref3) {
|
|
|
69
68
|
_field$isRequired = field.isRequired,
|
|
70
69
|
isRequired = _field$isRequired === void 0 ? false : _field$isRequired,
|
|
71
70
|
options = field.items;
|
|
72
|
-
var label =
|
|
71
|
+
var label = /*#__PURE__*/React.createElement(Fragment, null, labelBase, isRequired ? /*#__PURE__*/React.createElement("span", {
|
|
73
72
|
css: requiredIndicator,
|
|
74
73
|
"aria-hidden": "true"
|
|
75
74
|
}, ' ', "*") : null);
|
|
76
75
|
var _onFieldChange = useCallback(function () {
|
|
77
76
|
onFieldChange(name, true);
|
|
78
77
|
}, [name, onFieldChange]);
|
|
79
|
-
return
|
|
78
|
+
return /*#__PURE__*/React.createElement(Field, {
|
|
80
79
|
name: name,
|
|
81
80
|
isRequired: isRequired,
|
|
82
81
|
defaultValue: defaultValue,
|
|
@@ -84,7 +83,7 @@ export default function CheckboxGroup(_ref3) {
|
|
|
84
83
|
return _validate(value, isRequired);
|
|
85
84
|
}
|
|
86
85
|
}, function (props) {
|
|
87
|
-
return
|
|
86
|
+
return /*#__PURE__*/React.createElement(CheckboxGroupInner, _extends({
|
|
88
87
|
label: label,
|
|
89
88
|
description: description,
|
|
90
89
|
options: options,
|