@atlaskit/editor-core 189.5.0 → 189.5.3
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 +14 -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/paste/edge-cases/index.js +26 -0
- package/dist/cjs/plugins/paste/handlers.js +18 -9
- 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/paste/edge-cases/index.js +27 -1
- package/dist/es2019/plugins/paste/handlers.js +19 -10
- 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/paste/edge-cases/index.js +26 -1
- package/dist/esm/plugins/paste/handlers.js +19 -10
- 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/dist/types/plugins/paste/edge-cases/index.d.ts +4 -0
- package/dist/types-ts4.5/plugins/paste/edge-cases/index.d.ts +4 -0
- package/package.json +8 -4
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
/** @jsx jsx */
|
|
3
|
+
|
|
2
4
|
import React, { useState, useEffect } from 'react';
|
|
5
|
+
import { jsx } from '@emotion/react';
|
|
3
6
|
import { injectIntl } from 'react-intl-next';
|
|
4
7
|
import AvatarsWithPluginState from '../../../plugins/collab-edit/ui';
|
|
5
8
|
import FindReplaceToolbarButtonWithState from '../../../plugins/find-replace/FindReplaceToolbarButtonWithState';
|
|
@@ -20,11 +23,11 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
|
|
|
20
23
|
|
|
21
24
|
// When primary toolbar components is undefined, do not show two line editor toolbar
|
|
22
25
|
var twoLineEditorToolbar = !!props.customPrimaryToolbarComponents && !!((_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.twoLineEditorToolbar);
|
|
23
|
-
var nonCustomToolbar =
|
|
26
|
+
var nonCustomToolbar = jsx("div", {
|
|
24
27
|
css: nonCustomToolbarWrapperStyle
|
|
25
|
-
}, props.beforeIcon &&
|
|
28
|
+
}, props.beforeIcon && jsx("div", {
|
|
26
29
|
css: mainToolbarIconBeforeStyle
|
|
27
|
-
}, props.beforeIcon),
|
|
30
|
+
}, props.beforeIcon), jsx(Toolbar, {
|
|
28
31
|
editorView: props.editorView,
|
|
29
32
|
editorActions: props.editorActions,
|
|
30
33
|
eventDispatcher: props.eventDispatcher,
|
|
@@ -40,17 +43,16 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
|
|
|
40
43
|
hasMinWidth: props.hasMinWidth,
|
|
41
44
|
twoLineEditorToolbar: twoLineEditorToolbar
|
|
42
45
|
}));
|
|
43
|
-
var customToolbar =
|
|
46
|
+
var customToolbar = jsx("div", {
|
|
44
47
|
css: customToolbarWrapperStyle
|
|
45
|
-
}, twoLineEditorToolbar && !!props.customPrimaryToolbarComponents && 'before' in props.customPrimaryToolbarComponents ?
|
|
48
|
+
}, twoLineEditorToolbar && !!props.customPrimaryToolbarComponents && 'before' in props.customPrimaryToolbarComponents ? jsx(BeforePrimaryToolbarWrapper, {
|
|
46
49
|
beforePrimaryToolbarComponents: props.customPrimaryToolbarComponents.before
|
|
47
50
|
}) : 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__*/
|
|
49
51
|
// Avatars are moved to Confluence codebase for Edit in Context
|
|
50
52
|
// When Edit in Context is enabled customPrimaryToolbarComponents is undefined
|
|
51
53
|
// For more details please check
|
|
52
54
|
// https://hello.atlassian.net/wiki/spaces/PCG/pages/2851572180/Editor+toolbar+for+live+pages+and+edit+in+context+projects
|
|
53
|
-
|
|
55
|
+
jsx(AvatarsWithPluginState, {
|
|
54
56
|
editorView: props.editorView,
|
|
55
57
|
eventDispatcher: props.eventDispatcher,
|
|
56
58
|
inviteToEditComponent: (_props$collabEdit = props.collabEdit) === null || _props$collabEdit === void 0 ? void 0 : _props$collabEdit.inviteToEditComponent,
|
|
@@ -58,7 +60,7 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
|
|
|
58
60
|
isInviteToEditButtonSelected: (_props$collabEdit3 = props.collabEdit) === null || _props$collabEdit3 === void 0 ? void 0 : _props$collabEdit3.isInviteToEditButtonSelected,
|
|
59
61
|
featureFlags: props.featureFlags || {},
|
|
60
62
|
editorAnalyticsAPI: editorAPI === null || editorAPI === void 0 || (_editorAPI$analytics = editorAPI.analytics) === null || _editorAPI$analytics === void 0 ? void 0 : _editorAPI$analytics.actions
|
|
61
|
-
}), editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ?
|
|
63
|
+
}), editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ? jsx(FindReplaceToolbarButtonWithState, {
|
|
62
64
|
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
63
65
|
popupsMountPoint: props.popupsMountPoint,
|
|
64
66
|
popupsScrollableElement: props.popupsScrollableElement,
|
|
@@ -97,22 +99,22 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
|
|
|
97
99
|
event.preventDefault();
|
|
98
100
|
event.stopPropagation();
|
|
99
101
|
};
|
|
100
|
-
return
|
|
102
|
+
return jsx(ContextPanelConsumer, null, function (_ref) {
|
|
101
103
|
var contextPanelWidth = _ref.width;
|
|
102
|
-
return
|
|
104
|
+
return jsx(ToolbarArrowKeyNavigationProvider, {
|
|
103
105
|
editorView: props.editorView,
|
|
104
106
|
childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
|
|
105
107
|
isShortcutToFocusToolbar: isShortcutToFocusToolbar,
|
|
106
108
|
handleEscape: handleEscape,
|
|
107
109
|
intl: props.intl
|
|
108
|
-
},
|
|
110
|
+
}, jsx("div", {
|
|
109
111
|
css: mainToolbarStyle(props.showKeyline || contextPanelWidth > 0, twoLineEditorToolbar),
|
|
110
112
|
"data-testid": "ak-editor-main-toolbar"
|
|
111
|
-
},
|
|
113
|
+
}, jsx("div", {
|
|
112
114
|
css: mainToolbarFirstChildStyle(twoLineEditorToolbar),
|
|
113
115
|
role: "toolbar",
|
|
114
116
|
"aria-label": props.intl.formatMessage(messages.toolbarLabel)
|
|
115
|
-
}, shouldSplitToolbar ? customToolbar : nonCustomToolbar),
|
|
117
|
+
}, shouldSplitToolbar ? customToolbar : nonCustomToolbar), jsx("div", {
|
|
116
118
|
css: mainToolbarSecondChildStyle(twoLineEditorToolbar),
|
|
117
119
|
"data-testid": 'avatar-group-outside-plugin',
|
|
118
120
|
role: "region",
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
|
+
/** @jsx jsx */
|
|
3
4
|
import React, { useCallback, forwardRef } from 'react';
|
|
4
|
-
import { css } from '@emotion/react';
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
5
6
|
import WithFlash from '../WithFlash';
|
|
6
7
|
import { createEditorContentStyle } from '../ContentStyles';
|
|
7
8
|
import { ClickAreaMobile as ClickArea } from '../Addon';
|
|
@@ -53,20 +54,20 @@ export var MobileAppearance = /*#__PURE__*/forwardRef(function MobileAppearance(
|
|
|
53
54
|
currentIsExpanded = isExpanded;
|
|
54
55
|
}
|
|
55
56
|
}
|
|
56
|
-
return
|
|
57
|
+
return jsx(WithFlash, {
|
|
57
58
|
animate: maxContentSizeReached
|
|
58
|
-
},
|
|
59
|
+
}, jsx("div", {
|
|
59
60
|
css: mobileEditor,
|
|
60
61
|
ref: ref
|
|
61
|
-
},
|
|
62
|
+
}, jsx(ClickArea, {
|
|
62
63
|
editorView: editorView || undefined,
|
|
63
64
|
minHeight: minHeight,
|
|
64
65
|
persistScrollGutter: persistScrollGutter,
|
|
65
66
|
isExpanded: currentIsExpanded,
|
|
66
67
|
editorDisabled: editorDisabled
|
|
67
|
-
},
|
|
68
|
+
}, jsx(ContentArea, {
|
|
68
69
|
featureFlags: featureFlags
|
|
69
|
-
},
|
|
70
|
+
}, jsx("div", {
|
|
70
71
|
className: "ak-editor-content-area"
|
|
71
72
|
}, children)))));
|
|
72
73
|
}, [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,7 +7,9 @@ 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 */
|
|
10
11
|
import React from 'react';
|
|
12
|
+
import { jsx } from '@emotion/react';
|
|
11
13
|
import { PureComponent } from 'react';
|
|
12
14
|
import { inputStyle } from './styles';
|
|
13
15
|
import { injectIntl } from 'react-intl-next';
|
|
@@ -45,7 +47,7 @@ var ChromeCollapsed = /*#__PURE__*/function (_PureComponent) {
|
|
|
45
47
|
key: "render",
|
|
46
48
|
value: function render() {
|
|
47
49
|
var placeholder = this.props.text || this.props.intl.formatMessage(messages.chromeCollapsedPlaceholder);
|
|
48
|
-
return
|
|
50
|
+
return jsx("input", {
|
|
49
51
|
"data-testid": "chrome-collapsed",
|
|
50
52
|
css: inputStyle,
|
|
51
53
|
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
|
+
/** @jsx jsx */
|
|
6
6
|
import React from 'react';
|
|
7
|
-
import { css } from '@emotion/react';
|
|
7
|
+
import { css, jsx } 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 jsx("div", {
|
|
11
11
|
css: imageContainer
|
|
12
|
-
},
|
|
12
|
+
}, jsx("svg", {
|
|
13
13
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14
14
|
viewBox: "0 0 163.28 218",
|
|
15
15
|
height: "80"
|
|
16
|
-
},
|
|
16
|
+
}, jsx("defs", null, jsx("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
|
+
}, jsx("stop", {
|
|
24
24
|
offset: "0",
|
|
25
25
|
stopColor: "#ffd740"
|
|
26
|
-
}),
|
|
26
|
+
}), jsx("stop", {
|
|
27
27
|
offset: "1",
|
|
28
28
|
stopColor: "#ffab00"
|
|
29
|
-
})),
|
|
29
|
+
})), jsx("clipPath", {
|
|
30
30
|
id: "clip-path"
|
|
31
|
-
},
|
|
31
|
+
}, jsx("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
|
+
})), jsx("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}")), jsx("g", {
|
|
37
37
|
id: "Layer_2",
|
|
38
38
|
"data-name": "Layer 2"
|
|
39
|
-
},
|
|
39
|
+
}, jsx("g", {
|
|
40
40
|
id: "Software"
|
|
41
|
-
},
|
|
41
|
+
}, jsx("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
|
+
}), jsx("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
|
+
}), jsx("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
|
+
}), jsx("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
|
+
}), jsx("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
|
+
}), jsx("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,8 +4,9 @@ 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 */
|
|
7
8
|
import React, { Fragment } from 'react';
|
|
8
|
-
import { css } from '@emotion/react';
|
|
9
|
+
import { css, jsx } from '@emotion/react';
|
|
9
10
|
import { Checkbox as AKCheckbox } from '@atlaskit/checkbox';
|
|
10
11
|
import { Field } from '@atlaskit/form';
|
|
11
12
|
import AKToggle from '@atlaskit/toggle';
|
|
@@ -46,7 +47,7 @@ function Checkbox(_ref) {
|
|
|
46
47
|
isRequired = _field$isRequired === void 0 ? false : _field$isRequired,
|
|
47
48
|
_field$defaultValue = field.defaultValue,
|
|
48
49
|
defaultValue = _field$defaultValue === void 0 ? false : _field$defaultValue;
|
|
49
|
-
return
|
|
50
|
+
return jsx(Field, {
|
|
50
51
|
name: name,
|
|
51
52
|
isRequired: isRequired,
|
|
52
53
|
validate: function validate(value) {
|
|
@@ -58,13 +59,13 @@ function Checkbox(_ref) {
|
|
|
58
59
|
error = _ref2.error;
|
|
59
60
|
var isChecked = fieldProps.value,
|
|
60
61
|
restFieldProps = _objectWithoutProperties(fieldProps, _excluded);
|
|
61
|
-
return
|
|
62
|
+
return jsx(Fragment, null, jsx(AKCheckbox, _extends({}, restFieldProps, {
|
|
62
63
|
label: label,
|
|
63
64
|
onChange: function onChange(event) {
|
|
64
65
|
return handleOnChange(fieldProps.onChange, onFieldChange, event);
|
|
65
66
|
},
|
|
66
67
|
isChecked: parseBoolean(isChecked)
|
|
67
|
-
})),
|
|
68
|
+
})), jsx(FieldMessages, {
|
|
68
69
|
error: error,
|
|
69
70
|
description: description
|
|
70
71
|
}));
|
|
@@ -80,7 +81,7 @@ function Toggle(_ref3) {
|
|
|
80
81
|
isRequired = _field$isRequired2 === void 0 ? false : _field$isRequired2,
|
|
81
82
|
_field$defaultValue2 = field.defaultValue,
|
|
82
83
|
defaultValue = _field$defaultValue2 === void 0 ? false : _field$defaultValue2;
|
|
83
|
-
return
|
|
84
|
+
return jsx(Field, {
|
|
84
85
|
name: name,
|
|
85
86
|
isRequired: isRequired,
|
|
86
87
|
validate: function validate(value) {
|
|
@@ -93,21 +94,21 @@ function Toggle(_ref3) {
|
|
|
93
94
|
var id = fieldProps.id,
|
|
94
95
|
isChecked = fieldProps.value,
|
|
95
96
|
restFieldProps = _objectWithoutProperties(fieldProps, _excluded2);
|
|
96
|
-
return
|
|
97
|
+
return jsx(Fragment, null, jsx("div", {
|
|
97
98
|
css: toggleFieldWrapper
|
|
98
|
-
},
|
|
99
|
+
}, jsx("label", {
|
|
99
100
|
css: toggleLabel,
|
|
100
101
|
id: id,
|
|
101
102
|
htmlFor: id
|
|
102
|
-
}, label, isRequired ?
|
|
103
|
+
}, label, isRequired ? jsx("span", {
|
|
103
104
|
css: requiredIndicator,
|
|
104
105
|
"aria-hidden": "true"
|
|
105
|
-
}, "*") : null),
|
|
106
|
+
}, "*") : null), jsx(AKToggle, _extends({}, restFieldProps, {
|
|
106
107
|
onChange: function onChange(event) {
|
|
107
108
|
return handleOnChange(fieldProps.onChange, onFieldChange, event);
|
|
108
109
|
},
|
|
109
110
|
isChecked: parseBoolean(isChecked)
|
|
110
|
-
}))),
|
|
111
|
+
}))), jsx(FieldMessages, {
|
|
111
112
|
error: error,
|
|
112
113
|
description: description
|
|
113
114
|
}));
|
|
@@ -118,13 +119,13 @@ export default function Boolean(_ref5) {
|
|
|
118
119
|
field = _ref5.field,
|
|
119
120
|
onFieldChange = _ref5.onFieldChange;
|
|
120
121
|
if (field.style === 'toggle') {
|
|
121
|
-
return
|
|
122
|
+
return jsx(Toggle, {
|
|
122
123
|
name: name,
|
|
123
124
|
field: field,
|
|
124
125
|
onFieldChange: onFieldChange
|
|
125
126
|
});
|
|
126
127
|
}
|
|
127
|
-
return
|
|
128
|
+
return jsx(Checkbox, {
|
|
128
129
|
name: name,
|
|
129
130
|
field: field,
|
|
130
131
|
onFieldChange: onFieldChange
|
|
@@ -4,8 +4,9 @@ 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 */
|
|
7
8
|
import { Fragment, useCallback } from 'react';
|
|
8
|
-
import { css } from '@emotion/react';
|
|
9
|
+
import { css, jsx } from '@emotion/react';
|
|
9
10
|
import { Checkbox as AKCheckbox } from '@atlaskit/checkbox';
|
|
10
11
|
import { Field, Fieldset as AKFieldset } from '@atlaskit/form';
|
|
11
12
|
import { ValidationError } from '../types';
|
|
@@ -36,7 +37,7 @@ function CheckboxGroupInner(_ref) {
|
|
|
36
37
|
onChange(_toConsumableArray(active));
|
|
37
38
|
onFieldChange();
|
|
38
39
|
}
|
|
39
|
-
return
|
|
40
|
+
return jsx(Fragment, null, jsx(AKFieldset, {
|
|
40
41
|
legend: label
|
|
41
42
|
}, options.map(function (_ref2, i) {
|
|
42
43
|
var optionLabel = _ref2.label,
|
|
@@ -45,7 +46,7 @@ function CheckboxGroupInner(_ref) {
|
|
|
45
46
|
var onOptionChange = function onOptionChange(event) {
|
|
46
47
|
_onChange(optionValue, event.target.checked);
|
|
47
48
|
};
|
|
48
|
-
return
|
|
49
|
+
return jsx(AKCheckbox, _extends({
|
|
49
50
|
key: i
|
|
50
51
|
}, restFieldProps, {
|
|
51
52
|
isRequired: false,
|
|
@@ -53,7 +54,7 @@ function CheckboxGroupInner(_ref) {
|
|
|
53
54
|
isChecked: isChecked,
|
|
54
55
|
onChange: onOptionChange
|
|
55
56
|
}));
|
|
56
|
-
})),
|
|
57
|
+
})), jsx(FieldMessages, {
|
|
57
58
|
error: error,
|
|
58
59
|
description: description
|
|
59
60
|
}));
|
|
@@ -68,14 +69,14 @@ export default function CheckboxGroup(_ref3) {
|
|
|
68
69
|
_field$isRequired = field.isRequired,
|
|
69
70
|
isRequired = _field$isRequired === void 0 ? false : _field$isRequired,
|
|
70
71
|
options = field.items;
|
|
71
|
-
var label =
|
|
72
|
+
var label = jsx(Fragment, null, labelBase, isRequired ? jsx("span", {
|
|
72
73
|
css: requiredIndicator,
|
|
73
74
|
"aria-hidden": "true"
|
|
74
75
|
}, ' ', "*") : null);
|
|
75
76
|
var _onFieldChange = useCallback(function () {
|
|
76
77
|
onFieldChange(name, true);
|
|
77
78
|
}, [name, onFieldChange]);
|
|
78
|
-
return
|
|
79
|
+
return jsx(Field, {
|
|
79
80
|
name: name,
|
|
80
81
|
isRequired: isRequired,
|
|
81
82
|
defaultValue: defaultValue,
|
|
@@ -83,7 +84,7 @@ export default function CheckboxGroup(_ref3) {
|
|
|
83
84
|
return _validate(value, isRequired);
|
|
84
85
|
}
|
|
85
86
|
}, function (props) {
|
|
86
|
-
return
|
|
87
|
+
return jsx(CheckboxGroupInner, _extends({
|
|
87
88
|
label: label,
|
|
88
89
|
description: description,
|
|
89
90
|
options: options,
|
|
@@ -3,7 +3,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
3
3
|
var _templateObject, _templateObject2;
|
|
4
4
|
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; }
|
|
5
5
|
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) { _defineProperty(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; }
|
|
6
|
-
|
|
6
|
+
/** @jsx jsx */
|
|
7
|
+
import { jsx, css } from '@emotion/react';
|
|
7
8
|
import { Fragment } from 'react';
|
|
8
9
|
import { Field } from '@atlaskit/form';
|
|
9
10
|
import { DEFAULT_BORDER_COLOR } from '@atlaskit/editor-common/ui-color';
|
|
@@ -335,7 +336,7 @@ var ColorPicker = function ColorPicker(props) {
|
|
|
335
336
|
onChange(colorValue);
|
|
336
337
|
onFieldChange(name, currentColor !== colorValue);
|
|
337
338
|
};
|
|
338
|
-
return
|
|
339
|
+
return jsx(ColorPickerButton, {
|
|
339
340
|
title: title,
|
|
340
341
|
currentColor: currentColor,
|
|
341
342
|
onChange: onColorChange,
|
|
@@ -358,7 +359,7 @@ var ColorPickerField = function ColorPickerField(_ref) {
|
|
|
358
359
|
var label = field.label,
|
|
359
360
|
defaultValue = field.defaultValue,
|
|
360
361
|
isRequired = field.isRequired;
|
|
361
|
-
return
|
|
362
|
+
return jsx(Field, {
|
|
362
363
|
name: name,
|
|
363
364
|
isRequired: isRequired,
|
|
364
365
|
defaultValue: defaultValue,
|
|
@@ -368,21 +369,21 @@ var ColorPickerField = function ColorPickerField(_ref) {
|
|
|
368
369
|
}, function (_ref2) {
|
|
369
370
|
var fieldProps = _ref2.fieldProps,
|
|
370
371
|
error = _ref2.error;
|
|
371
|
-
return
|
|
372
|
+
return jsx(Fragment, null, jsx("div", {
|
|
372
373
|
css: colorPickerWrapper
|
|
373
|
-
},
|
|
374
|
+
}, jsx("label", {
|
|
374
375
|
css: colorPickerLabel
|
|
375
|
-
}, label, isRequired &&
|
|
376
|
+
}, label, isRequired && jsx("span", {
|
|
376
377
|
css: requiredIndicator,
|
|
377
378
|
"aria-hidden": "true"
|
|
378
|
-
}, "*")),
|
|
379
|
+
}, "*")), jsx(ColorPicker, {
|
|
379
380
|
name: name,
|
|
380
381
|
title: label,
|
|
381
382
|
currentColor: fieldProps.value,
|
|
382
383
|
onChange: fieldProps.onChange,
|
|
383
384
|
onFieldChange: onFieldChange,
|
|
384
385
|
featureFlags: featureFlags
|
|
385
|
-
})), error &&
|
|
386
|
+
})), error && jsx(FieldMessages, {
|
|
386
387
|
error: error,
|
|
387
388
|
description: ""
|
|
388
389
|
}));
|
|
@@ -6,8 +6,9 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
6
6
|
var _templateObject, _templateObject2, _templateObject3;
|
|
7
7
|
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; }
|
|
8
8
|
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) { _defineProperty(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; }
|
|
9
|
+
/** @jsx jsx */
|
|
9
10
|
import { Fragment, useState, useEffect, useMemo } from 'react';
|
|
10
|
-
import { css } from '@emotion/react';
|
|
11
|
+
import { css, jsx } from '@emotion/react';
|
|
11
12
|
import { injectIntl } from 'react-intl-next';
|
|
12
13
|
import { Field } from '@atlaskit/form';
|
|
13
14
|
import { RadioGroup } from '@atlaskit/radio';
|
|
@@ -31,10 +32,10 @@ var DateField = function DateField(_ref) {
|
|
|
31
32
|
onFieldChange = _ref.onFieldChange,
|
|
32
33
|
intl = _ref.intl,
|
|
33
34
|
isRequired = _ref.isRequired;
|
|
34
|
-
return
|
|
35
|
+
return jsx("div", {
|
|
35
36
|
css: horizontalFieldWrapper,
|
|
36
37
|
key: fieldName
|
|
37
|
-
},
|
|
38
|
+
}, jsx(Field, {
|
|
38
39
|
name: "".concat(scope, ".").concat(fieldName),
|
|
39
40
|
label: intl.formatMessage(messages[fieldName]),
|
|
40
41
|
defaultValue: getFromDefaultValue(parentField, fieldName),
|
|
@@ -47,13 +48,13 @@ var DateField = function DateField(_ref) {
|
|
|
47
48
|
}, function (_ref2) {
|
|
48
49
|
var fieldProps = _ref2.fieldProps,
|
|
49
50
|
error = _ref2.error;
|
|
50
|
-
return
|
|
51
|
+
return jsx(Fragment, null, jsx(DatePicker, _extends({}, fieldProps, {
|
|
51
52
|
onChange: function onChange(date) {
|
|
52
53
|
fieldProps.onChange(date);
|
|
53
54
|
onFieldChange(parentField.name, true);
|
|
54
55
|
},
|
|
55
56
|
locale: intl.locale
|
|
56
|
-
})),
|
|
57
|
+
})), jsx(FieldMessages, {
|
|
57
58
|
error: error
|
|
58
59
|
}));
|
|
59
60
|
}));
|
|
@@ -82,17 +83,17 @@ var DateRange = function DateRange(_ref3) {
|
|
|
82
83
|
// get the most up to date value after the form has been rendered
|
|
83
84
|
onFieldChange(name, true);
|
|
84
85
|
}, [currentValue, onFieldChange, name]);
|
|
85
|
-
var element =
|
|
86
|
+
var element = jsx(Fragment, null, jsx("div", {
|
|
86
87
|
css: hidden
|
|
87
|
-
},
|
|
88
|
+
}, jsx(Field, {
|
|
88
89
|
name: "".concat(name, ".type"),
|
|
89
90
|
defaultValue: 'date-range'
|
|
90
91
|
}, function (_ref4) {
|
|
91
92
|
var fieldProps = _ref4.fieldProps;
|
|
92
|
-
return
|
|
93
|
+
return jsx(TextField, _extends({}, fieldProps, {
|
|
93
94
|
type: "hidden"
|
|
94
95
|
}));
|
|
95
|
-
})),
|
|
96
|
+
})), jsx(Field, {
|
|
96
97
|
name: "".concat(name, ".value"),
|
|
97
98
|
label: field.label,
|
|
98
99
|
defaultValue: currentValue,
|
|
@@ -103,42 +104,42 @@ var DateRange = function DateRange(_ref3) {
|
|
|
103
104
|
}, function (_ref5) {
|
|
104
105
|
var fieldProps = _ref5.fieldProps,
|
|
105
106
|
error = _ref5.error;
|
|
106
|
-
return
|
|
107
|
+
return jsx(Fragment, null, jsx(RadioGroup, _extends({}, fieldProps, {
|
|
107
108
|
options: items,
|
|
108
109
|
onChange: function onChange(event) {
|
|
109
110
|
fieldProps.onChange(event.target.value);
|
|
110
111
|
setCurrentValue(event.target.value);
|
|
111
112
|
}
|
|
112
|
-
})),
|
|
113
|
+
})), jsx(FieldMessages, {
|
|
113
114
|
error: error
|
|
114
115
|
}));
|
|
115
|
-
}), currentValue !== 'custom' ?
|
|
116
|
+
}), currentValue !== 'custom' ? jsx("div", {
|
|
116
117
|
css: hidden
|
|
117
|
-
},
|
|
118
|
+
}, jsx(Field, {
|
|
118
119
|
name: "".concat(name, ".from"),
|
|
119
120
|
defaultValue: currentValue
|
|
120
121
|
}, function (_ref6) {
|
|
121
122
|
var fieldProps = _ref6.fieldProps;
|
|
122
|
-
return
|
|
123
|
+
return jsx(TextField, _extends({}, fieldProps, {
|
|
123
124
|
type: "hidden"
|
|
124
125
|
}));
|
|
125
|
-
})) :
|
|
126
|
+
})) : jsx("div", {
|
|
126
127
|
css: horizontalFields
|
|
127
|
-
},
|
|
128
|
+
}, jsx(DateField, {
|
|
128
129
|
scope: name,
|
|
129
130
|
parentField: field,
|
|
130
131
|
fieldName: "from",
|
|
131
132
|
onFieldChange: onFieldChange,
|
|
132
133
|
intl: intl,
|
|
133
134
|
isRequired: field.isRequired
|
|
134
|
-
}),
|
|
135
|
+
}), jsx(DateField, {
|
|
135
136
|
scope: name,
|
|
136
137
|
parentField: field,
|
|
137
138
|
fieldName: "to",
|
|
138
139
|
onFieldChange: onFieldChange,
|
|
139
140
|
intl: intl,
|
|
140
141
|
isRequired: field.isRequired
|
|
141
|
-
})),
|
|
142
|
+
})), jsx(FieldMessages, {
|
|
142
143
|
description: field.description
|
|
143
144
|
}));
|
|
144
145
|
return element;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
3
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
4
|
+
/** @jsx jsx */
|
|
4
5
|
import React, { useState } from 'react';
|
|
5
|
-
import { css } from '@emotion/react';
|
|
6
|
+
import { css, jsx } from '@emotion/react';
|
|
6
7
|
import { injectIntl } from 'react-intl-next';
|
|
7
8
|
import { N40 } from '@atlaskit/theme/colors';
|
|
8
9
|
import ChevronDownIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
@@ -26,26 +27,26 @@ function Expand(_ref) {
|
|
|
26
27
|
_useState2 = _slicedToArray(_useState, 2),
|
|
27
28
|
expanded = _useState2[0],
|
|
28
29
|
setExpanded = _useState2[1];
|
|
29
|
-
return
|
|
30
|
+
return jsx("div", {
|
|
30
31
|
"data-testid": "expand-config-field",
|
|
31
32
|
css: expandContainer
|
|
32
|
-
},
|
|
33
|
+
}, jsx("div", {
|
|
33
34
|
css: expandControl
|
|
34
|
-
},
|
|
35
|
+
}, jsx("div", {
|
|
35
36
|
css: labelContainer
|
|
36
|
-
}, field.label),
|
|
37
|
+
}, field.label), jsx("div", {
|
|
37
38
|
css: chevronContainer
|
|
38
|
-
},
|
|
39
|
+
}, jsx(Button, {
|
|
39
40
|
onClick: function onClick() {
|
|
40
41
|
setExpanded(!expanded);
|
|
41
42
|
},
|
|
42
43
|
testId: "form-expand-toggle",
|
|
43
|
-
iconBefore: expanded ?
|
|
44
|
+
iconBefore: expanded ? jsx(ChevronDownIcon, {
|
|
44
45
|
label: intl.formatMessage(messages.collapse)
|
|
45
|
-
}) :
|
|
46
|
+
}) : jsx(ChevronRightIcon, {
|
|
46
47
|
label: intl.formatMessage(messages.expand)
|
|
47
48
|
})
|
|
48
|
-
}))),
|
|
49
|
+
}))), jsx("div", {
|
|
49
50
|
"data-testid": "expand-content-container",
|
|
50
51
|
css: expandContentContainer(!expanded)
|
|
51
52
|
}, children));
|