@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
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
/** @jsx jsx */
|
|
3
2
|
import React, { Fragment } from 'react';
|
|
4
|
-
import { css
|
|
3
|
+
import { css } from '@emotion/react';
|
|
5
4
|
import PluginSlot from '../PluginSlot';
|
|
6
5
|
import { createEditorContentStyle } from '../ContentStyles';
|
|
7
6
|
import { scrollbarStyles } from '../styles';
|
|
@@ -59,9 +58,9 @@ export default class Editor extends React.Component {
|
|
|
59
58
|
featureFlags
|
|
60
59
|
} = this.props;
|
|
61
60
|
const maxContentSizeReached = Boolean(maxContentSize === null || maxContentSize === void 0 ? void 0 : maxContentSize.maxContentSizeReached);
|
|
62
|
-
return
|
|
61
|
+
return /*#__PURE__*/React.createElement(WithFlash, {
|
|
63
62
|
animate: maxContentSizeReached
|
|
64
|
-
},
|
|
63
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
65
64
|
css: [chromelessEditor, maxHeight && css`
|
|
66
65
|
max-height: ${maxHeight}px;
|
|
67
66
|
`, css`
|
|
@@ -69,10 +68,10 @@ export default class Editor extends React.Component {
|
|
|
69
68
|
`],
|
|
70
69
|
"data-testid": "chromeless-editor",
|
|
71
70
|
ref: ref => this.containerElement = ref
|
|
72
|
-
},
|
|
71
|
+
}, /*#__PURE__*/React.createElement(ContentArea, {
|
|
73
72
|
className: "ak-editor-content-area",
|
|
74
73
|
featureFlags: featureFlags
|
|
75
|
-
}, customContentComponents,
|
|
74
|
+
}, customContentComponents, /*#__PURE__*/React.createElement(PluginSlot, {
|
|
76
75
|
editorView: editorView,
|
|
77
76
|
editorActions: editorActions,
|
|
78
77
|
eventDispatcher: eventDispatcher,
|
|
@@ -91,7 +90,7 @@ export default class Editor extends React.Component {
|
|
|
91
90
|
});
|
|
92
91
|
}
|
|
93
92
|
render() {
|
|
94
|
-
return
|
|
93
|
+
return /*#__PURE__*/React.createElement(RenderWithPluginState, {
|
|
95
94
|
renderChrome: this.renderChrome
|
|
96
95
|
});
|
|
97
96
|
}
|
|
@@ -104,7 +103,7 @@ function RenderWithPluginState({
|
|
|
104
103
|
const {
|
|
105
104
|
maxContentSizeState
|
|
106
105
|
} = useSharedPluginState(api, ['maxContentSize']);
|
|
107
|
-
return
|
|
106
|
+
return /*#__PURE__*/React.createElement(Fragment, null, renderChrome({
|
|
108
107
|
maxContentSize: maxContentSizeState
|
|
109
108
|
}));
|
|
110
109
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
/** @jsx jsx */
|
|
3
2
|
import React, { Fragment } from 'react';
|
|
4
|
-
import { css
|
|
3
|
+
import { css } from '@emotion/react';
|
|
5
4
|
import ButtonGroup from '@atlaskit/button/button-group';
|
|
6
5
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
7
6
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
@@ -135,17 +134,17 @@ class Editor extends React.Component {
|
|
|
135
134
|
event.preventDefault();
|
|
136
135
|
event.stopPropagation();
|
|
137
136
|
};
|
|
138
|
-
return
|
|
137
|
+
return /*#__PURE__*/React.createElement(WithFlash, {
|
|
139
138
|
animate: maxContentSizeReached
|
|
140
|
-
},
|
|
139
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
141
140
|
css: [commentEditorStyle, css`
|
|
142
141
|
min-height: ${minHeight}px;
|
|
143
142
|
`],
|
|
144
143
|
className: "akEditor",
|
|
145
144
|
ref: this.wrapperElementRef
|
|
146
|
-
},
|
|
145
|
+
}, /*#__PURE__*/React.createElement(MainToolbar, {
|
|
147
146
|
useStickyToolbar: useStickyToolbar
|
|
148
|
-
},
|
|
147
|
+
}, /*#__PURE__*/React.createElement(ToolbarArrowKeyNavigationProvider, {
|
|
149
148
|
editorView: editorView,
|
|
150
149
|
childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
|
|
151
150
|
isShortcutToFocusToolbar: isShortcutToFocusToolbar,
|
|
@@ -153,7 +152,7 @@ class Editor extends React.Component {
|
|
|
153
152
|
editorAppearance: this.appearance,
|
|
154
153
|
useStickyToolbar: useStickyToolbar,
|
|
155
154
|
intl: intl
|
|
156
|
-
},
|
|
155
|
+
}, /*#__PURE__*/React.createElement(Toolbar, {
|
|
157
156
|
editorView: editorView,
|
|
158
157
|
editorActions: editorActions,
|
|
159
158
|
eventDispatcher: eventDispatcher,
|
|
@@ -166,15 +165,15 @@ class Editor extends React.Component {
|
|
|
166
165
|
disabled: !!disabled,
|
|
167
166
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
168
167
|
containerElement: this.containerElement
|
|
169
|
-
}),
|
|
168
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
170
169
|
css: mainToolbarCustomComponentsSlotStyle
|
|
171
|
-
}, customPrimaryToolbarComponents))),
|
|
170
|
+
}, customPrimaryToolbarComponents))), /*#__PURE__*/React.createElement(ClickAreaBlock, {
|
|
172
171
|
editorView: editorView,
|
|
173
172
|
editorDisabled: disabled
|
|
174
|
-
},
|
|
173
|
+
}, /*#__PURE__*/React.createElement(WidthConsumer, null, ({
|
|
175
174
|
width
|
|
176
175
|
}) => {
|
|
177
|
-
return
|
|
176
|
+
return /*#__PURE__*/React.createElement(ContentArea, {
|
|
178
177
|
ref: ref => this.containerElement = ref,
|
|
179
178
|
css: maxHeight ? css`
|
|
180
179
|
max-height: ${maxHeight}px;
|
|
@@ -183,7 +182,7 @@ class Editor extends React.Component {
|
|
|
183
182
|
'less-margin': width < akEditorMobileBreakoutPoint
|
|
184
183
|
}),
|
|
185
184
|
featureFlags: featureFlags
|
|
186
|
-
}, customContentComponents,
|
|
185
|
+
}, customContentComponents, /*#__PURE__*/React.createElement(PluginSlot, {
|
|
187
186
|
editorView: editorView,
|
|
188
187
|
editorActions: editorActions,
|
|
189
188
|
eventDispatcher: eventDispatcher,
|
|
@@ -199,19 +198,19 @@ class Editor extends React.Component {
|
|
|
199
198
|
wrapperElement: this.wrapperElementRef.current,
|
|
200
199
|
pluginHooks: pluginHooks
|
|
201
200
|
}), editorDOMElement);
|
|
202
|
-
}))), showSecondaryToolbar &&
|
|
201
|
+
}))), showSecondaryToolbar && /*#__PURE__*/React.createElement("div", {
|
|
203
202
|
css: secondaryToolbarStyle,
|
|
204
203
|
"data-testid": "ak-editor-secondary-toolbar"
|
|
205
|
-
},
|
|
204
|
+
}, /*#__PURE__*/React.createElement(ButtonGroup, null, !!onSave && /*#__PURE__*/React.createElement(Button, {
|
|
206
205
|
appearance: "primary",
|
|
207
206
|
onClick: this.handleSave,
|
|
208
207
|
testId: "comment-save-button",
|
|
209
208
|
isDisabled: disabled || mediaState && !mediaState.allUploadsFinished
|
|
210
|
-
}, intl.formatMessage(messages.saveButton)), !!onCancel &&
|
|
209
|
+
}, intl.formatMessage(messages.saveButton)), !!onCancel && /*#__PURE__*/React.createElement(Button, {
|
|
211
210
|
appearance: "subtle",
|
|
212
211
|
onClick: this.handleCancel,
|
|
213
212
|
isDisabled: disabled
|
|
214
|
-
}, intl.formatMessage(messages.cancelButton))),
|
|
213
|
+
}, intl.formatMessage(messages.cancelButton))), /*#__PURE__*/React.createElement("span", {
|
|
215
214
|
style: {
|
|
216
215
|
flexGrow: 1
|
|
217
216
|
}
|
|
@@ -222,7 +221,7 @@ class Editor extends React.Component {
|
|
|
222
221
|
}
|
|
223
222
|
}
|
|
224
223
|
render() {
|
|
225
|
-
return
|
|
224
|
+
return /*#__PURE__*/React.createElement(RenderWithPluginState, {
|
|
226
225
|
renderChrome: this.renderChrome
|
|
227
226
|
});
|
|
228
227
|
}
|
|
@@ -236,7 +235,7 @@ function RenderWithPluginState({
|
|
|
236
235
|
mediaState,
|
|
237
236
|
maxContentSizeState
|
|
238
237
|
} = useSharedPluginState(api, ['media', 'maxContentSize']);
|
|
239
|
-
return
|
|
238
|
+
return /*#__PURE__*/React.createElement(Fragment, null, renderChrome({
|
|
240
239
|
maxContentSize: maxContentSizeState,
|
|
241
240
|
mediaState: mediaState !== null && mediaState !== void 0 ? mediaState : undefined
|
|
242
241
|
}));
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
|
|
3
1
|
import React, { useEffect, useState } from 'react';
|
|
4
|
-
import { css
|
|
2
|
+
import { css } from '@emotion/react';
|
|
5
3
|
import { N30 } from '@atlaskit/theme/colors';
|
|
6
4
|
import { akEditorToolbarKeylineHeight, akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
|
|
7
5
|
export const TableControlsPadding = 20;
|
|
@@ -53,7 +51,7 @@ const StickyToolbar = props => {
|
|
|
53
51
|
setTop(props.offsetTop || 0);
|
|
54
52
|
}
|
|
55
53
|
}, [props.externalToolbarRef, props.offsetTop]);
|
|
56
|
-
return
|
|
54
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
57
55
|
css: [mainToolbarWrapperStyle, stickyToolbarWrapperStyle, css`
|
|
58
56
|
top: ${top}px;
|
|
59
57
|
`],
|
|
@@ -61,7 +59,7 @@ const StickyToolbar = props => {
|
|
|
61
59
|
className: 'show-keyline'
|
|
62
60
|
}, props.children);
|
|
63
61
|
};
|
|
64
|
-
const FixedToolbar = props =>
|
|
62
|
+
const FixedToolbar = props => /*#__PURE__*/React.createElement("div", {
|
|
65
63
|
css: mainToolbarWrapperStyle,
|
|
66
64
|
"data-testid": "ak-editor-main-toolbar"
|
|
67
65
|
}, props.children);
|
|
@@ -98,9 +96,9 @@ export const MainToolbar = ({
|
|
|
98
96
|
children
|
|
99
97
|
}) => {
|
|
100
98
|
if (useStickyToolbar) {
|
|
101
|
-
return
|
|
99
|
+
return /*#__PURE__*/React.createElement(StickyToolbar, getStickyParameters(useStickyToolbar), children);
|
|
102
100
|
}
|
|
103
|
-
return
|
|
101
|
+
return /*#__PURE__*/React.createElement(FixedToolbar, null, children);
|
|
104
102
|
};
|
|
105
103
|
export const mainToolbarCustomComponentsSlotStyle = css`
|
|
106
104
|
display: flex;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
1
|
import React, { useEffect, useState, useRef, useMemo } from 'react';
|
|
3
|
-
import { jsx } from '@emotion/react';
|
|
4
2
|
import { fullPageEditorWrapper } from './StyledComponents';
|
|
5
3
|
import { ContextPanelWidthProvider } from '@atlaskit/editor-common/ui';
|
|
6
4
|
import { FullPageContentArea } from './FullPageContentArea';
|
|
@@ -35,11 +33,11 @@ export const FullPageEditor = props => {
|
|
|
35
33
|
const wrapperElementRef = useMemo(() => props.innerRef, [props.innerRef]);
|
|
36
34
|
const scrollContentContainerRef = useRef(null);
|
|
37
35
|
const showKeyline = useShowKeyline(scrollContentContainerRef);
|
|
38
|
-
return
|
|
36
|
+
return /*#__PURE__*/React.createElement(ContextPanelWidthProvider, null, /*#__PURE__*/React.createElement("div", {
|
|
39
37
|
css: fullPageEditorWrapper,
|
|
40
38
|
className: "akEditor",
|
|
41
39
|
ref: wrapperElementRef
|
|
42
|
-
},
|
|
40
|
+
}, /*#__PURE__*/React.createElement(FullPageToolbar, {
|
|
43
41
|
appearance: props.appearance,
|
|
44
42
|
beforeIcon: props.primaryToolbarIconBefore,
|
|
45
43
|
collabEdit: props.collabEdit,
|
|
@@ -60,7 +58,7 @@ export const FullPageEditor = props => {
|
|
|
60
58
|
showKeyline: showKeyline,
|
|
61
59
|
featureFlags: props.featureFlags,
|
|
62
60
|
hideAvatarGroup: props.hideAvatarGroup
|
|
63
|
-
}),
|
|
61
|
+
}), /*#__PURE__*/React.createElement(FullPageContentArea, {
|
|
64
62
|
ref: scrollContentContainerRef,
|
|
65
63
|
appearance: props.appearance,
|
|
66
64
|
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';
|
|
@@ -22,23 +21,23 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
22
21
|
return contentAreaRef.current;
|
|
23
22
|
}
|
|
24
23
|
}), []);
|
|
25
|
-
return
|
|
24
|
+
return /*#__PURE__*/React.createElement(WidthConsumer, null, ({
|
|
26
25
|
width
|
|
27
|
-
}) =>
|
|
26
|
+
}) => /*#__PURE__*/React.createElement(ContextPanelConsumer, null, ({
|
|
28
27
|
positionedOverEditor
|
|
29
28
|
}) => {
|
|
30
29
|
var _contentAreaRef$curre;
|
|
31
|
-
return
|
|
30
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
32
31
|
css: [contentArea, positionedOverEditor && positionedOverEditorStyle],
|
|
33
32
|
"data-testid": CONTENT_AREA_TEST_ID
|
|
34
|
-
},
|
|
33
|
+
}, /*#__PURE__*/React.createElement(ScrollContainer, {
|
|
35
34
|
className: "fabric-editor-popup-scroll-parent",
|
|
36
35
|
featureFlags: props.featureFlags,
|
|
37
36
|
ref: scrollContainerRef
|
|
38
|
-
},
|
|
37
|
+
}, /*#__PURE__*/React.createElement(ClickAreaBlock, {
|
|
39
38
|
editorView: props.editorView,
|
|
40
39
|
editorDisabled: props.disabled
|
|
41
|
-
},
|
|
40
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
42
41
|
css: editorContentAreaStyle({
|
|
43
42
|
fullWidthMode,
|
|
44
43
|
layoutMaxWidth: theme.layoutMaxWidth,
|
|
@@ -47,11 +46,11 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
47
46
|
role: "region",
|
|
48
47
|
"aria-label": props.intl.formatMessage(messages.editableContentLabel),
|
|
49
48
|
ref: contentAreaRef
|
|
50
|
-
},
|
|
49
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
51
50
|
css: editorContentGutterStyle,
|
|
52
51
|
className: ['ak-editor-content-area', fullWidthMode ? 'fabric-editor--full-width-mode' : ''].join(' '),
|
|
53
52
|
ref: contentAreaRef
|
|
54
|
-
}, props.customContentComponents,
|
|
53
|
+
}, props.customContentComponents, /*#__PURE__*/React.createElement(PluginSlot, {
|
|
55
54
|
editorView: props.editorView,
|
|
56
55
|
editorActions: props.editorActions,
|
|
57
56
|
eventDispatcher: props.eventDispatcher,
|
|
@@ -67,9 +66,9 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
67
66
|
containerElement: scrollContainerRef.current,
|
|
68
67
|
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
|
|
69
68
|
wrapperElement: props.wrapperElement
|
|
70
|
-
}), props.editorDOMElement)))),
|
|
69
|
+
}), props.editorDOMElement)))), /*#__PURE__*/React.createElement("div", {
|
|
71
70
|
css: sidebarArea
|
|
72
|
-
}, props.contextPanel ||
|
|
71
|
+
}, props.contextPanel || /*#__PURE__*/React.createElement(ContextPanel, {
|
|
73
72
|
visible: false
|
|
74
73
|
})));
|
|
75
74
|
}));
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
|
|
3
1
|
import React, { useState, useEffect } from 'react';
|
|
4
|
-
import { jsx } from '@emotion/react';
|
|
5
2
|
import { injectIntl } from 'react-intl-next';
|
|
6
3
|
import AvatarsWithPluginState from '../../../plugins/collab-edit/ui';
|
|
7
4
|
import FindReplaceToolbarButtonWithState from '../../../plugins/find-replace/FindReplaceToolbarButtonWithState';
|
|
@@ -19,11 +16,11 @@ export const EditorToolbar = /*#__PURE__*/React.memo(props => {
|
|
|
19
16
|
|
|
20
17
|
// When primary toolbar components is undefined, do not show two line editor toolbar
|
|
21
18
|
const twoLineEditorToolbar = !!props.customPrimaryToolbarComponents && !!((_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.twoLineEditorToolbar);
|
|
22
|
-
const nonCustomToolbar =
|
|
19
|
+
const nonCustomToolbar = /*#__PURE__*/React.createElement("div", {
|
|
23
20
|
css: nonCustomToolbarWrapperStyle
|
|
24
|
-
}, props.beforeIcon &&
|
|
21
|
+
}, props.beforeIcon && /*#__PURE__*/React.createElement("div", {
|
|
25
22
|
css: mainToolbarIconBeforeStyle
|
|
26
|
-
}, props.beforeIcon),
|
|
23
|
+
}, props.beforeIcon), /*#__PURE__*/React.createElement(Toolbar, {
|
|
27
24
|
editorView: props.editorView,
|
|
28
25
|
editorActions: props.editorActions,
|
|
29
26
|
eventDispatcher: props.eventDispatcher,
|
|
@@ -39,16 +36,17 @@ export const EditorToolbar = /*#__PURE__*/React.memo(props => {
|
|
|
39
36
|
hasMinWidth: props.hasMinWidth,
|
|
40
37
|
twoLineEditorToolbar: twoLineEditorToolbar
|
|
41
38
|
}));
|
|
42
|
-
const customToolbar =
|
|
39
|
+
const customToolbar = /*#__PURE__*/React.createElement("div", {
|
|
43
40
|
css: customToolbarWrapperStyle
|
|
44
|
-
}, twoLineEditorToolbar && !!props.customPrimaryToolbarComponents && 'before' in props.customPrimaryToolbarComponents ?
|
|
41
|
+
}, twoLineEditorToolbar && !!props.customPrimaryToolbarComponents && 'before' in props.customPrimaryToolbarComponents ? /*#__PURE__*/React.createElement(BeforePrimaryToolbarWrapper, {
|
|
45
42
|
beforePrimaryToolbarComponents: props.customPrimaryToolbarComponents.before
|
|
46
43
|
}) : null, props.hideAvatarGroup || (props === null || props === void 0 ? 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 :
|
|
44
|
+
/*#__PURE__*/
|
|
47
45
|
// Avatars are moved to Confluence codebase for Edit in Context
|
|
48
46
|
// When Edit in Context is enabled customPrimaryToolbarComponents is undefined
|
|
49
47
|
// For more details please check
|
|
50
48
|
// https://hello.atlassian.net/wiki/spaces/PCG/pages/2851572180/Editor+toolbar+for+live+pages+and+edit+in+context+projects
|
|
51
|
-
|
|
49
|
+
React.createElement(AvatarsWithPluginState, {
|
|
52
50
|
editorView: props.editorView,
|
|
53
51
|
eventDispatcher: props.eventDispatcher,
|
|
54
52
|
inviteToEditComponent: (_props$collabEdit = props.collabEdit) === null || _props$collabEdit === void 0 ? void 0 : _props$collabEdit.inviteToEditComponent,
|
|
@@ -56,7 +54,7 @@ export const EditorToolbar = /*#__PURE__*/React.memo(props => {
|
|
|
56
54
|
isInviteToEditButtonSelected: (_props$collabEdit3 = props.collabEdit) === null || _props$collabEdit3 === void 0 ? void 0 : _props$collabEdit3.isInviteToEditButtonSelected,
|
|
57
55
|
featureFlags: props.featureFlags || {},
|
|
58
56
|
editorAnalyticsAPI: editorAPI === null || editorAPI === void 0 ? void 0 : (_editorAPI$analytics = editorAPI.analytics) === null || _editorAPI$analytics === void 0 ? void 0 : _editorAPI$analytics.actions
|
|
59
|
-
}), editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ?
|
|
57
|
+
}), editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ? /*#__PURE__*/React.createElement(FindReplaceToolbarButtonWithState, {
|
|
60
58
|
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
61
59
|
popupsMountPoint: props.popupsMountPoint,
|
|
62
60
|
popupsScrollableElement: props.popupsScrollableElement,
|
|
@@ -93,22 +91,22 @@ export const EditorToolbar = /*#__PURE__*/React.memo(props => {
|
|
|
93
91
|
event.preventDefault();
|
|
94
92
|
event.stopPropagation();
|
|
95
93
|
};
|
|
96
|
-
return
|
|
94
|
+
return /*#__PURE__*/React.createElement(ContextPanelConsumer, null, ({
|
|
97
95
|
width: contextPanelWidth
|
|
98
|
-
}) =>
|
|
96
|
+
}) => /*#__PURE__*/React.createElement(ToolbarArrowKeyNavigationProvider, {
|
|
99
97
|
editorView: props.editorView,
|
|
100
98
|
childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
|
|
101
99
|
isShortcutToFocusToolbar: isShortcutToFocusToolbar,
|
|
102
100
|
handleEscape: handleEscape,
|
|
103
101
|
intl: props.intl
|
|
104
|
-
},
|
|
102
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
105
103
|
css: mainToolbarStyle(props.showKeyline || contextPanelWidth > 0, twoLineEditorToolbar),
|
|
106
104
|
"data-testid": "ak-editor-main-toolbar"
|
|
107
|
-
},
|
|
105
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
108
106
|
css: mainToolbarFirstChildStyle(twoLineEditorToolbar),
|
|
109
107
|
role: "toolbar",
|
|
110
108
|
"aria-label": props.intl.formatMessage(messages.toolbarLabel)
|
|
111
|
-
}, shouldSplitToolbar ? customToolbar : nonCustomToolbar),
|
|
109
|
+
}, shouldSplitToolbar ? customToolbar : nonCustomToolbar), /*#__PURE__*/React.createElement("div", {
|
|
112
110
|
css: mainToolbarSecondChildStyle(twoLineEditorToolbar),
|
|
113
111
|
"data-testid": 'avatar-group-outside-plugin',
|
|
114
112
|
role: "region",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
1
|
import React, { useCallback, forwardRef } from 'react';
|
|
3
|
-
import { css
|
|
2
|
+
import { css } from '@emotion/react';
|
|
4
3
|
import WithFlash from '../WithFlash';
|
|
5
4
|
import { createEditorContentStyle } from '../ContentStyles';
|
|
6
5
|
import { ClickAreaMobile as ClickArea } from '../Addon';
|
|
@@ -70,20 +69,20 @@ export const MobileAppearance = /*#__PURE__*/forwardRef(function MobileAppearanc
|
|
|
70
69
|
currentIsExpanded = isExpanded;
|
|
71
70
|
}
|
|
72
71
|
}
|
|
73
|
-
return
|
|
72
|
+
return /*#__PURE__*/React.createElement(WithFlash, {
|
|
74
73
|
animate: maxContentSizeReached
|
|
75
|
-
},
|
|
74
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
76
75
|
css: mobileEditor,
|
|
77
76
|
ref: ref
|
|
78
|
-
},
|
|
77
|
+
}, /*#__PURE__*/React.createElement(ClickArea, {
|
|
79
78
|
editorView: editorView || undefined,
|
|
80
79
|
minHeight: minHeight,
|
|
81
80
|
persistScrollGutter: persistScrollGutter,
|
|
82
81
|
isExpanded: currentIsExpanded,
|
|
83
82
|
editorDisabled: editorDisabled
|
|
84
|
-
},
|
|
83
|
+
}, /*#__PURE__*/React.createElement(ContentArea, {
|
|
85
84
|
featureFlags: featureFlags
|
|
86
|
-
},
|
|
85
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
87
86
|
className: "ak-editor-content-area"
|
|
88
87
|
}, children)))));
|
|
89
88
|
}, [children, editorView, persistScrollGutter, editorDisabled, ref, featureFlags, api === null || api === void 0 ? void 0 : (_api$base2 = api.base) === null || _api$base2 === void 0 ? void 0 : _api$base2.sharedState]);
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
/** @jsx jsx */
|
|
3
2
|
import React from 'react';
|
|
4
|
-
import { jsx } from '@emotion/react';
|
|
5
3
|
import { PureComponent } from 'react';
|
|
6
4
|
import { inputStyle } from './styles';
|
|
7
5
|
import { injectIntl } from 'react-intl-next';
|
|
@@ -29,7 +27,7 @@ class ChromeCollapsed extends PureComponent {
|
|
|
29
27
|
}
|
|
30
28
|
render() {
|
|
31
29
|
const placeholder = this.props.text || this.props.intl.formatMessage(messages.chromeCollapsedPlaceholder);
|
|
32
|
-
return
|
|
30
|
+
return /*#__PURE__*/React.createElement("input", {
|
|
33
31
|
"data-testid": "chrome-collapsed",
|
|
34
32
|
css: inputStyle,
|
|
35
33
|
ref: this.handleInputRef,
|
|
@@ -1,65 +1,65 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
2
2
|
// Quality Ticket: https://product-fabric.atlassian.net/browse/DSP-4249
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { css
|
|
5
|
+
import { css } from '@emotion/react';
|
|
6
6
|
const imageContainer = css`
|
|
7
7
|
margin: 0 auto ${"var(--ds-space-300, 24px)"};
|
|
8
8
|
height: 80px;
|
|
9
9
|
`;
|
|
10
|
-
const ErrorImage = () =>
|
|
10
|
+
const ErrorImage = () => /*#__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
|
})))));
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/** @jsx jsx */
|
|
3
2
|
import React, { Fragment } from 'react';
|
|
4
|
-
import { css
|
|
3
|
+
import { css } from '@emotion/react';
|
|
5
4
|
import { Checkbox as AKCheckbox } from '@atlaskit/checkbox';
|
|
6
5
|
import { Field } from '@atlaskit/form';
|
|
7
6
|
import AKToggle from '@atlaskit/toggle';
|
|
@@ -43,7 +42,7 @@ function Checkbox({
|
|
|
43
42
|
isRequired = false,
|
|
44
43
|
defaultValue = false
|
|
45
44
|
} = field;
|
|
46
|
-
return
|
|
45
|
+
return /*#__PURE__*/React.createElement(Field, {
|
|
47
46
|
name: name,
|
|
48
47
|
isRequired: isRequired,
|
|
49
48
|
validate: value => validate(value, isRequired),
|
|
@@ -56,11 +55,11 @@ function Checkbox({
|
|
|
56
55
|
value: isChecked,
|
|
57
56
|
...restFieldProps
|
|
58
57
|
} = fieldProps;
|
|
59
|
-
return
|
|
58
|
+
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(AKCheckbox, _extends({}, restFieldProps, {
|
|
60
59
|
label: label,
|
|
61
60
|
onChange: event => handleOnChange(fieldProps.onChange, onFieldChange, event),
|
|
62
61
|
isChecked: isChecked
|
|
63
|
-
})),
|
|
62
|
+
})), /*#__PURE__*/React.createElement(FieldMessages, {
|
|
64
63
|
error: error,
|
|
65
64
|
description: description
|
|
66
65
|
}));
|
|
@@ -77,7 +76,7 @@ function Toggle({
|
|
|
77
76
|
isRequired = false,
|
|
78
77
|
defaultValue = false
|
|
79
78
|
} = field;
|
|
80
|
-
return
|
|
79
|
+
return /*#__PURE__*/React.createElement(Field, {
|
|
81
80
|
name: name,
|
|
82
81
|
isRequired: isRequired,
|
|
83
82
|
validate: value => validate(value, isRequired),
|
|
@@ -91,19 +90,19 @@ function Toggle({
|
|
|
91
90
|
value: isChecked,
|
|
92
91
|
...restFieldProps
|
|
93
92
|
} = fieldProps;
|
|
94
|
-
return
|
|
93
|
+
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
95
94
|
css: toggleFieldWrapper
|
|
96
|
-
},
|
|
95
|
+
}, /*#__PURE__*/React.createElement("label", {
|
|
97
96
|
css: toggleLabel,
|
|
98
97
|
id: id,
|
|
99
98
|
htmlFor: id
|
|
100
|
-
}, label, isRequired ?
|
|
99
|
+
}, label, isRequired ? /*#__PURE__*/React.createElement("span", {
|
|
101
100
|
css: requiredIndicator,
|
|
102
101
|
"aria-hidden": "true"
|
|
103
|
-
}, "*") : null),
|
|
102
|
+
}, "*") : null), /*#__PURE__*/React.createElement(AKToggle, _extends({}, restFieldProps, {
|
|
104
103
|
onChange: event => handleOnChange(fieldProps.onChange, onFieldChange, event),
|
|
105
104
|
isChecked: isChecked
|
|
106
|
-
}))),
|
|
105
|
+
}))), /*#__PURE__*/React.createElement(FieldMessages, {
|
|
107
106
|
error: error,
|
|
108
107
|
description: description
|
|
109
108
|
}));
|
|
@@ -115,13 +114,13 @@ export default function Boolean({
|
|
|
115
114
|
onFieldChange
|
|
116
115
|
}) {
|
|
117
116
|
if (field.style === 'toggle') {
|
|
118
|
-
return
|
|
117
|
+
return /*#__PURE__*/React.createElement(Toggle, {
|
|
119
118
|
name: name,
|
|
120
119
|
field: field,
|
|
121
120
|
onFieldChange: onFieldChange
|
|
122
121
|
});
|
|
123
122
|
}
|
|
124
|
-
return
|
|
123
|
+
return /*#__PURE__*/React.createElement(Checkbox, {
|
|
125
124
|
name: name,
|
|
126
125
|
field: field,
|
|
127
126
|
onFieldChange: onFieldChange
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/** @jsx jsx */
|
|
3
2
|
import { Fragment, useCallback } from 'react';
|
|
4
|
-
import { css
|
|
3
|
+
import { css } from '@emotion/react';
|
|
5
4
|
import { Checkbox as AKCheckbox } from '@atlaskit/checkbox';
|
|
6
5
|
import { Field, Fieldset as AKFieldset } from '@atlaskit/form';
|
|
7
6
|
import { ValidationError } from '../types';
|
|
@@ -37,7 +36,7 @@ function CheckboxGroupInner({
|
|
|
37
36
|
onChange([...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(({
|
|
43
42
|
label: optionLabel,
|
|
@@ -47,7 +46,7 @@ function CheckboxGroupInner({
|
|
|
47
46
|
const onOptionChange = event => {
|
|
48
47
|
_onChange(optionValue, event.target.checked);
|
|
49
48
|
};
|
|
50
|
-
return
|
|
49
|
+
return /*#__PURE__*/React.createElement(AKCheckbox, _extends({
|
|
51
50
|
key: i
|
|
52
51
|
}, restFieldProps, {
|
|
53
52
|
isRequired: false,
|
|
@@ -55,7 +54,7 @@ function CheckboxGroupInner({
|
|
|
55
54
|
isChecked: isChecked,
|
|
56
55
|
onChange: onOptionChange
|
|
57
56
|
}));
|
|
58
|
-
})),
|
|
57
|
+
})), /*#__PURE__*/React.createElement(FieldMessages, {
|
|
59
58
|
error: error,
|
|
60
59
|
description: description
|
|
61
60
|
}));
|
|
@@ -72,20 +71,20 @@ export default function CheckboxGroup({
|
|
|
72
71
|
isRequired = false,
|
|
73
72
|
items: options
|
|
74
73
|
} = field;
|
|
75
|
-
const label =
|
|
74
|
+
const label = /*#__PURE__*/React.createElement(Fragment, null, labelBase, isRequired ? /*#__PURE__*/React.createElement("span", {
|
|
76
75
|
css: requiredIndicator,
|
|
77
76
|
"aria-hidden": "true"
|
|
78
77
|
}, ' ', "*") : null);
|
|
79
78
|
const _onFieldChange = useCallback(() => {
|
|
80
79
|
onFieldChange(name, true);
|
|
81
80
|
}, [name, onFieldChange]);
|
|
82
|
-
return
|
|
81
|
+
return /*#__PURE__*/React.createElement(Field, {
|
|
83
82
|
name: name,
|
|
84
83
|
isRequired: isRequired,
|
|
85
84
|
defaultValue: defaultValue,
|
|
86
85
|
validate: value => validate(value, isRequired)
|
|
87
86
|
}, props => {
|
|
88
|
-
return
|
|
87
|
+
return /*#__PURE__*/React.createElement(CheckboxGroupInner, _extends({
|
|
89
88
|
label: label,
|
|
90
89
|
description: description,
|
|
91
90
|
options: options,
|