@atlaskit/editor-core 189.6.3 → 189.6.5
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 +12 -0
- package/dist/cjs/ui/ConfigPanel/ConfigPanel.js +7 -1
- package/dist/cjs/ui/ConfigPanel/Header.js +19 -4
- package/dist/cjs/ui/ConfigPanel/messages.js +5 -0
- package/dist/cjs/ui/ContentStyles/index.js +1 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/ConfigPanel/ConfigPanel.js +7 -1
- package/dist/es2019/ui/ConfigPanel/Header.js +20 -2
- package/dist/es2019/ui/ConfigPanel/messages.js +5 -0
- package/dist/es2019/ui/ContentStyles/index.js +4 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/ui/ConfigPanel/ConfigPanel.js +7 -1
- package/dist/esm/ui/ConfigPanel/Header.js +19 -4
- package/dist/esm/ui/ConfigPanel/messages.js +5 -0
- package/dist/esm/ui/ContentStyles/index.js +2 -2
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/ui/ConfigPanel/Header.d.ts +2 -0
- package/dist/types/ui/ConfigPanel/messages.d.ts +5 -0
- package/dist/types-ts4.5/ui/ConfigPanel/Header.d.ts +2 -0
- package/dist/types-ts4.5/ui/ConfigPanel/messages.d.ts +5 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 189.6.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#59654](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/59654) [`af9025d9eca2`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/af9025d9eca2) - [ux] Update "Documentation" link text in ConfigPanel for select Confluence macros
|
|
8
|
+
|
|
9
|
+
## 189.6.4
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#58702](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/58702) [`f49d6c29036c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f49d6c29036c) - [ux] ED-20924 Fixed smart card avatar being cut off on safari by preventing the code block in lists fix for li elements in cards.
|
|
14
|
+
|
|
3
15
|
## 189.6.3
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -277,6 +277,11 @@ var ConfigPanel = /*#__PURE__*/function (_React$Component) {
|
|
|
277
277
|
var _this$props2 = _this.props,
|
|
278
278
|
onCancel = _this$props2.onCancel,
|
|
279
279
|
showHeader = _this$props2.showHeader;
|
|
280
|
+
|
|
281
|
+
// Use a temporary allowlist of top 3 macros to test out a new "Documentation" CTA ("Need help?")
|
|
282
|
+
// This will be removed when Top 5 Modernized Macros updates are rolled out
|
|
283
|
+
var modernizedMacrosList = ['children', 'recently-updated', 'excerpt'];
|
|
284
|
+
var enableHelpCTA = modernizedMacrosList.includes(extensionManifest.key);
|
|
280
285
|
if (!showHeader) {
|
|
281
286
|
return null;
|
|
282
287
|
}
|
|
@@ -286,7 +291,8 @@ var ConfigPanel = /*#__PURE__*/function (_React$Component) {
|
|
|
286
291
|
description: extensionManifest.description,
|
|
287
292
|
summary: extensionManifest.summary,
|
|
288
293
|
documentationUrl: extensionManifest.documentationUrl,
|
|
289
|
-
onClose: onCancel
|
|
294
|
+
onClose: onCancel,
|
|
295
|
+
enableHelpCTA: enableHelpCTA
|
|
290
296
|
});
|
|
291
297
|
}));
|
|
292
298
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getFirstVisibleFieldName", (0, _memoizeOne.default)(function (fields) {
|
|
@@ -16,7 +16,7 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
16
16
|
var _colors = require("@atlaskit/theme/colors");
|
|
17
17
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
18
18
|
var _messages = require("./messages");
|
|
19
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
19
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
20
20
|
/** @jsx jsx */
|
|
21
21
|
var iconWidth = 40;
|
|
22
22
|
var buttonWidth = 40;
|
|
@@ -28,13 +28,15 @@ var itemBody = (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _tag
|
|
|
28
28
|
var centeredItemTitle = (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n"])));
|
|
29
29
|
var itemText = (0, _react2.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n max-width: 100%;\n white-space: initial;\n .item-summary {\n font-size: ", ";\n color: ", ";\n margin-top: ", ";\n\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"])), (0, _editorSharedStyles.relativeFontSizeToBase16)(11.67), "var(--ds-text-subtlest, ".concat(_colors.N200, ")"), "var(--ds-space-050, 4px)");
|
|
30
30
|
var descriptionStyle = (0, _react2.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n margin-bottom: ", ";\n"])), "var(--ds-space-300, 24px)");
|
|
31
|
-
var
|
|
31
|
+
var helpLinkStyle = (0, _react2.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n padding-top: ", ";\n"])), "var(--ds-space-150, 12px)");
|
|
32
|
+
var closeButtonWrapper = (0, _react2.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n width: ", "px;\n text-align: right;\n"])), buttonWidth);
|
|
32
33
|
var Header = function Header(_ref) {
|
|
33
34
|
var icon = _ref.icon,
|
|
34
35
|
title = _ref.title,
|
|
35
36
|
description = _ref.description,
|
|
36
37
|
summary = _ref.summary,
|
|
37
38
|
documentationUrl = _ref.documentationUrl,
|
|
39
|
+
enableHelpCTA = _ref.enableHelpCTA,
|
|
38
40
|
onClose = _ref.onClose,
|
|
39
41
|
intl = _ref.intl;
|
|
40
42
|
var ResolvedIcon = (0, _reactLoadable.default)({
|
|
@@ -74,11 +76,24 @@ var Header = function Header(_ref) {
|
|
|
74
76
|
}))), (description || documentationUrl) && (0, _react2.jsx)("p", {
|
|
75
77
|
css: descriptionStyle,
|
|
76
78
|
"data-testid": "config-panel-header-description"
|
|
77
|
-
}, description && (0, _react2.jsx)(_react.Fragment, null, description.replace(/([^.])$/, '$1.'), " "), documentationUrl && (0, _react2.jsx)("
|
|
79
|
+
}, description && (0, _react2.jsx)(_react.Fragment, null, description.replace(/([^.])$/, '$1.'), " "), documentationUrl && (enableHelpCTA ? (0, _react2.jsx)("p", {
|
|
80
|
+
css: helpLinkStyle
|
|
81
|
+
}, (0, _react2.jsx)(HelpLink, {
|
|
82
|
+
documentationUrl: documentationUrl,
|
|
83
|
+
label: intl.formatMessage(_messages.messages.help)
|
|
84
|
+
})) : (0, _react2.jsx)(HelpLink, {
|
|
85
|
+
documentationUrl: documentationUrl,
|
|
86
|
+
label: intl.formatMessage(_messages.messages.documentation)
|
|
87
|
+
}))));
|
|
88
|
+
};
|
|
89
|
+
var HelpLink = function HelpLink(_ref2) {
|
|
90
|
+
var documentationUrl = _ref2.documentationUrl,
|
|
91
|
+
label = _ref2.label;
|
|
92
|
+
return (0, _react2.jsx)("a", {
|
|
78
93
|
target: "_blank",
|
|
79
94
|
rel: "noopener noreferrer",
|
|
80
95
|
href: documentationUrl,
|
|
81
96
|
"data-testid": "config-panel-header-documentation-link"
|
|
82
|
-
},
|
|
97
|
+
}, label);
|
|
83
98
|
};
|
|
84
99
|
var _default = exports.default = (0, _reactIntlNext.injectIntl)(Header);
|
|
@@ -56,6 +56,11 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
|
|
|
56
56
|
defaultMessage: 'Documentation',
|
|
57
57
|
description: 'Label for the documentation link'
|
|
58
58
|
},
|
|
59
|
+
help: {
|
|
60
|
+
id: 'fabric.editor.configPanel.help',
|
|
61
|
+
defaultMessage: 'Need help?',
|
|
62
|
+
description: 'Label for documentation link v.2 (to replace "Documentation" text)'
|
|
63
|
+
},
|
|
59
64
|
custom: {
|
|
60
65
|
id: 'fabric.editor.configPanel.dateRange.option.custom',
|
|
61
66
|
defaultMessage: 'Custom',
|
|
@@ -41,7 +41,7 @@ var ruleStyles = function ruleStyles(props) {
|
|
|
41
41
|
return (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n ", ";\n\n hr {\n cursor: pointer;\n padding: ", " 0;\n margin: calc(", "em - 4px) 0;\n background-clip: content-box;\n\n &.", " {\n outline: none;\n background-color: ", ";\n }\n }\n }\n"])), (0, _styles.ruleSharedStyles)(props), "var(--ds-space-050, 4px)", _editorSharedStyles.akEditorLineHeight, _editorSharedStyles.akEditorSelectedNodeClassName, "var(--ds-border-selected, ".concat(_editorSharedStyles.akEditorSelectedBorderColor, ")"));
|
|
42
42
|
};
|
|
43
43
|
var mentionsStyles = (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n &.", " [data-mention-id] > span {\n ", "\n\n /* need to specify dark text colour because personal mentions\n (in dark blue) have white text by default */\n color: ", ";\n }\n }\n\n .danger {\n .", ".", "\n > span\n > span\n > span {\n box-shadow: 0 0 0 ", "px ", ";\n background-color: ", ";\n }\n .", " > span > span > span {\n background-color: ", ";\n color: ", ";\n }\n }\n"])), _mention.MentionSharedCssClassName.MENTION_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Background]), "var(--ds-text-subtle, ".concat(_colors.N500, ")"), _mention.MentionSharedCssClassName.MENTION_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedBorderSize, _editorSharedStyles.akEditorDeleteBorder, "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackgroundWithOpacity, ")"), _mention.MentionSharedCssClassName.MENTION_CONTAINER, "var(--ds-background-neutral, ".concat(_colors.N30A, ")"), "var(--ds-text-subtle, ".concat(_colors.N500, ")"));
|
|
44
|
-
var listsStyles = (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n li {\n position: relative;\n\n > p:not(:first-child) {\n margin: ", " 0 0 0;\n }\n\n // In SSR the above rule will apply to all p tags because first-child would be a style tag.\n // The following rule resets the first p tag back to its original margin\n // defined in packages/editor/editor-common/src/styles/shared/paragraph.ts\n > style:first-child + p {\n margin-top: ", ";\n }\n }\n\n
|
|
44
|
+
var listsStyles = (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n li {\n position: relative;\n\n > p:not(:first-child) {\n margin: ", " 0 0 0;\n }\n\n // In SSR the above rule will apply to all p tags because first-child would be a style tag.\n // The following rule resets the first p tag back to its original margin\n // defined in packages/editor/editor-common/src/styles/shared/paragraph.ts\n > style:first-child + p {\n margin-top: ", ";\n }\n }\n\n &:not([data-node-type='decisionList']) > li,\n // This prevents https://product-fabric.atlassian.net/browse/ED-20924\n &:not(.", ") > li {\n ", "\n }\n }\n"])), "var(--ds-space-050, 4px)", _editorSharedStyles.blockNodesVerticalMargin, _styles.SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, _utils.browser.safari ? _styles.codeBlockInListSafariFix : '');
|
|
45
45
|
var emojiStyles = (0, _react2.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n display: inline-block;\n\n .", " {\n cursor: pointer;\n\n &.", " > span {\n /** needed for selection style to cover custom emoji image properly */\n display: flex;\n }\n }\n\n &.", " {\n .", ",\n .", " {\n border-radius: 2px;\n ", "\n }\n }\n }\n"])), _emoji.EmojiSharedCssClassName.EMOJI_CONTAINER, _emoji.EmojiSharedCssClassName.EMOJI_NODE, _emoji.EmojiSharedCssClassName.EMOJI_IMAGE, _editorSharedStyles.akEditorSelectedNodeClassName, _emoji.EmojiSharedCssClassName.EMOJI_SPRITE, _emoji.EmojiSharedCssClassName.EMOJI_IMAGE, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Blanket, _editorSharedStyles.SelectionStyle.BoxShadow]));
|
|
46
46
|
var placeholderStyles = exports.placeholderStyles = (0, _react2.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror .placeholder-decoration {\n color: ", ";\n width: 100%;\n pointer-events: none;\n user-select: none;\n\n .placeholder-android {\n pointer-events: none;\n outline: none;\n user-select: none;\n position: absolute;\n }\n }\n"])), "var(--ds-text-subtlest, ".concat(_colors.N200, ")"));
|
|
47
47
|
var contentStyles = function contentStyles(props) {
|
|
@@ -219,6 +219,11 @@ class ConfigPanel extends React.Component {
|
|
|
219
219
|
onCancel,
|
|
220
220
|
showHeader
|
|
221
221
|
} = this.props;
|
|
222
|
+
|
|
223
|
+
// Use a temporary allowlist of top 3 macros to test out a new "Documentation" CTA ("Need help?")
|
|
224
|
+
// This will be removed when Top 5 Modernized Macros updates are rolled out
|
|
225
|
+
const modernizedMacrosList = ['children', 'recently-updated', 'excerpt'];
|
|
226
|
+
const enableHelpCTA = modernizedMacrosList.includes(extensionManifest.key);
|
|
222
227
|
if (!showHeader) {
|
|
223
228
|
return null;
|
|
224
229
|
}
|
|
@@ -228,7 +233,8 @@ class ConfigPanel extends React.Component {
|
|
|
228
233
|
description: extensionManifest.description,
|
|
229
234
|
summary: extensionManifest.summary,
|
|
230
235
|
documentationUrl: extensionManifest.documentationUrl,
|
|
231
|
-
onClose: onCancel
|
|
236
|
+
onClose: onCancel,
|
|
237
|
+
enableHelpCTA: enableHelpCTA
|
|
232
238
|
});
|
|
233
239
|
}));
|
|
234
240
|
_defineProperty(this, "getFirstVisibleFieldName", memoizeOne(fields => {
|
|
@@ -65,6 +65,9 @@ const itemText = css`
|
|
|
65
65
|
const descriptionStyle = css`
|
|
66
66
|
margin-bottom: ${"var(--ds-space-300, 24px)"};
|
|
67
67
|
`;
|
|
68
|
+
const helpLinkStyle = css`
|
|
69
|
+
padding-top: ${"var(--ds-space-150, 12px)"};
|
|
70
|
+
`;
|
|
68
71
|
const closeButtonWrapper = css`
|
|
69
72
|
width: ${buttonWidth}px;
|
|
70
73
|
text-align: right;
|
|
@@ -75,6 +78,7 @@ const Header = ({
|
|
|
75
78
|
description,
|
|
76
79
|
summary,
|
|
77
80
|
documentationUrl,
|
|
81
|
+
enableHelpCTA,
|
|
78
82
|
onClose,
|
|
79
83
|
intl
|
|
80
84
|
}) => {
|
|
@@ -113,11 +117,25 @@ const Header = ({
|
|
|
113
117
|
}))), (description || documentationUrl) && jsx("p", {
|
|
114
118
|
css: descriptionStyle,
|
|
115
119
|
"data-testid": "config-panel-header-description"
|
|
116
|
-
}, description && jsx(Fragment, null, description.replace(/([^.])$/, '$1.'), " "), documentationUrl && jsx("
|
|
120
|
+
}, description && jsx(Fragment, null, description.replace(/([^.])$/, '$1.'), " "), documentationUrl && (enableHelpCTA ? jsx("p", {
|
|
121
|
+
css: helpLinkStyle
|
|
122
|
+
}, jsx(HelpLink, {
|
|
123
|
+
documentationUrl: documentationUrl,
|
|
124
|
+
label: intl.formatMessage(messages.help)
|
|
125
|
+
})) : jsx(HelpLink, {
|
|
126
|
+
documentationUrl: documentationUrl,
|
|
127
|
+
label: intl.formatMessage(messages.documentation)
|
|
128
|
+
}))));
|
|
129
|
+
};
|
|
130
|
+
const HelpLink = ({
|
|
131
|
+
documentationUrl,
|
|
132
|
+
label
|
|
133
|
+
}) => {
|
|
134
|
+
return jsx("a", {
|
|
117
135
|
target: "_blank",
|
|
118
136
|
rel: "noopener noreferrer",
|
|
119
137
|
href: documentationUrl,
|
|
120
138
|
"data-testid": "config-panel-header-documentation-link"
|
|
121
|
-
},
|
|
139
|
+
}, label);
|
|
122
140
|
};
|
|
123
141
|
export default injectIntl(Header);
|
|
@@ -50,6 +50,11 @@ export const messages = defineMessages({
|
|
|
50
50
|
defaultMessage: 'Documentation',
|
|
51
51
|
description: 'Label for the documentation link'
|
|
52
52
|
},
|
|
53
|
+
help: {
|
|
54
|
+
id: 'fabric.editor.configPanel.help',
|
|
55
|
+
defaultMessage: 'Need help?',
|
|
56
|
+
description: 'Label for documentation link v.2 (to replace "Documentation" text)'
|
|
57
|
+
},
|
|
53
58
|
custom: {
|
|
54
59
|
id: 'fabric.editor.configPanel.dateRange.option.custom',
|
|
55
60
|
defaultMessage: 'Custom',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React, { useMemo } from 'react';
|
|
3
3
|
import { jsx, css, useTheme } from '@emotion/react';
|
|
4
|
-
import { whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, shadowSharedStyle, dateSharedStyle, tasksAndDecisionsStyles, annotationSharedStyles, smartCardSharedStyles, textColorStyles, resizerStyles, gridStyles, smartCardStyles, embedCardStyles, codeBlockInListSafariFix, unsupportedStyles } from '@atlaskit/editor-common/styles';
|
|
4
|
+
import { whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, shadowSharedStyle, dateSharedStyle, tasksAndDecisionsStyles, annotationSharedStyles, smartCardSharedStyles, textColorStyles, resizerStyles, gridStyles, smartCardStyles, embedCardStyles, codeBlockInListSafariFix, unsupportedStyles, SmartCardSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
5
5
|
import { akEditorSelectedBorderSize, akEditorDeleteBorder, akEditorDeleteBackgroundWithOpacity, akEditorSelectedNodeClassName, blockNodesVerticalMargin, editorFontSize, getSelectionStyles, SelectionStyle, akEditorLineHeight, akEditorSelectedBorderColor } from '@atlaskit/editor-shared-styles';
|
|
6
6
|
import { MentionSharedCssClassName } from '@atlaskit/editor-common/mention';
|
|
7
7
|
import { telepointerStyle } from '../../plugins/collab-edit/styles';
|
|
@@ -90,7 +90,9 @@ const listsStyles = css`
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
|
|
93
|
+
&:not([data-node-type='decisionList']) > li,
|
|
94
|
+
// This prevents https://product-fabric.atlassian.net/browse/ED-20924
|
|
95
|
+
&:not(.${SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER}) > li {
|
|
94
96
|
${browser.safari ? codeBlockInListSafariFix : ''}
|
|
95
97
|
}
|
|
96
98
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "189.6.
|
|
2
|
+
export const version = "189.6.5";
|
|
@@ -268,6 +268,11 @@ var ConfigPanel = /*#__PURE__*/function (_React$Component) {
|
|
|
268
268
|
var _this$props2 = _this.props,
|
|
269
269
|
onCancel = _this$props2.onCancel,
|
|
270
270
|
showHeader = _this$props2.showHeader;
|
|
271
|
+
|
|
272
|
+
// Use a temporary allowlist of top 3 macros to test out a new "Documentation" CTA ("Need help?")
|
|
273
|
+
// This will be removed when Top 5 Modernized Macros updates are rolled out
|
|
274
|
+
var modernizedMacrosList = ['children', 'recently-updated', 'excerpt'];
|
|
275
|
+
var enableHelpCTA = modernizedMacrosList.includes(extensionManifest.key);
|
|
271
276
|
if (!showHeader) {
|
|
272
277
|
return null;
|
|
273
278
|
}
|
|
@@ -277,7 +282,8 @@ var ConfigPanel = /*#__PURE__*/function (_React$Component) {
|
|
|
277
282
|
description: extensionManifest.description,
|
|
278
283
|
summary: extensionManifest.summary,
|
|
279
284
|
documentationUrl: extensionManifest.documentationUrl,
|
|
280
|
-
onClose: onCancel
|
|
285
|
+
onClose: onCancel,
|
|
286
|
+
enableHelpCTA: enableHelpCTA
|
|
281
287
|
});
|
|
282
288
|
}));
|
|
283
289
|
_defineProperty(_assertThisInitialized(_this), "getFirstVisibleFieldName", memoizeOne(function (fields) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import { Fragment } from 'react';
|
|
5
5
|
import { css, jsx } from '@emotion/react';
|
|
@@ -21,13 +21,15 @@ var itemBody = css(_templateObject3 || (_templateObject3 = _taggedTemplateLitera
|
|
|
21
21
|
var centeredItemTitle = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n"])));
|
|
22
22
|
var itemText = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n max-width: 100%;\n white-space: initial;\n .item-summary {\n font-size: ", ";\n color: ", ";\n margin-top: ", ";\n\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"])), relativeFontSizeToBase16(11.67), "var(--ds-text-subtlest, ".concat(N200, ")"), "var(--ds-space-050, 4px)");
|
|
23
23
|
var descriptionStyle = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n"])), "var(--ds-space-300, 24px)");
|
|
24
|
-
var
|
|
24
|
+
var helpLinkStyle = css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n padding-top: ", ";\n"])), "var(--ds-space-150, 12px)");
|
|
25
|
+
var closeButtonWrapper = css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n width: ", "px;\n text-align: right;\n"])), buttonWidth);
|
|
25
26
|
var Header = function Header(_ref) {
|
|
26
27
|
var icon = _ref.icon,
|
|
27
28
|
title = _ref.title,
|
|
28
29
|
description = _ref.description,
|
|
29
30
|
summary = _ref.summary,
|
|
30
31
|
documentationUrl = _ref.documentationUrl,
|
|
32
|
+
enableHelpCTA = _ref.enableHelpCTA,
|
|
31
33
|
onClose = _ref.onClose,
|
|
32
34
|
intl = _ref.intl;
|
|
33
35
|
var ResolvedIcon = Loadable({
|
|
@@ -67,11 +69,24 @@ var Header = function Header(_ref) {
|
|
|
67
69
|
}))), (description || documentationUrl) && jsx("p", {
|
|
68
70
|
css: descriptionStyle,
|
|
69
71
|
"data-testid": "config-panel-header-description"
|
|
70
|
-
}, description && jsx(Fragment, null, description.replace(/([^.])$/, '$1.'), " "), documentationUrl && jsx("
|
|
72
|
+
}, description && jsx(Fragment, null, description.replace(/([^.])$/, '$1.'), " "), documentationUrl && (enableHelpCTA ? jsx("p", {
|
|
73
|
+
css: helpLinkStyle
|
|
74
|
+
}, jsx(HelpLink, {
|
|
75
|
+
documentationUrl: documentationUrl,
|
|
76
|
+
label: intl.formatMessage(messages.help)
|
|
77
|
+
})) : jsx(HelpLink, {
|
|
78
|
+
documentationUrl: documentationUrl,
|
|
79
|
+
label: intl.formatMessage(messages.documentation)
|
|
80
|
+
}))));
|
|
81
|
+
};
|
|
82
|
+
var HelpLink = function HelpLink(_ref2) {
|
|
83
|
+
var documentationUrl = _ref2.documentationUrl,
|
|
84
|
+
label = _ref2.label;
|
|
85
|
+
return jsx("a", {
|
|
71
86
|
target: "_blank",
|
|
72
87
|
rel: "noopener noreferrer",
|
|
73
88
|
href: documentationUrl,
|
|
74
89
|
"data-testid": "config-panel-header-documentation-link"
|
|
75
|
-
},
|
|
90
|
+
}, label);
|
|
76
91
|
};
|
|
77
92
|
export default injectIntl(Header);
|
|
@@ -50,6 +50,11 @@ export var messages = defineMessages({
|
|
|
50
50
|
defaultMessage: 'Documentation',
|
|
51
51
|
description: 'Label for the documentation link'
|
|
52
52
|
},
|
|
53
|
+
help: {
|
|
54
|
+
id: 'fabric.editor.configPanel.help',
|
|
55
|
+
defaultMessage: 'Need help?',
|
|
56
|
+
description: 'Label for documentation link v.2 (to replace "Documentation" text)'
|
|
57
|
+
},
|
|
53
58
|
custom: {
|
|
54
59
|
id: 'fabric.editor.configPanel.dateRange.option.custom',
|
|
55
60
|
defaultMessage: 'Custom',
|
|
@@ -3,7 +3,7 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import React, { useMemo } from 'react';
|
|
5
5
|
import { jsx, css, useTheme } from '@emotion/react';
|
|
6
|
-
import { whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, shadowSharedStyle, dateSharedStyle, tasksAndDecisionsStyles, annotationSharedStyles, smartCardSharedStyles, textColorStyles, resizerStyles, gridStyles, smartCardStyles, embedCardStyles, codeBlockInListSafariFix, unsupportedStyles } from '@atlaskit/editor-common/styles';
|
|
6
|
+
import { whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, shadowSharedStyle, dateSharedStyle, tasksAndDecisionsStyles, annotationSharedStyles, smartCardSharedStyles, textColorStyles, resizerStyles, gridStyles, smartCardStyles, embedCardStyles, codeBlockInListSafariFix, unsupportedStyles, SmartCardSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
7
7
|
import { akEditorSelectedBorderSize, akEditorDeleteBorder, akEditorDeleteBackgroundWithOpacity, akEditorSelectedNodeClassName, blockNodesVerticalMargin, editorFontSize, getSelectionStyles, SelectionStyle, akEditorLineHeight, akEditorSelectedBorderColor } from '@atlaskit/editor-shared-styles';
|
|
8
8
|
import { MentionSharedCssClassName } from '@atlaskit/editor-common/mention';
|
|
9
9
|
import { telepointerStyle } from '../../plugins/collab-edit/styles';
|
|
@@ -33,7 +33,7 @@ var ruleStyles = function ruleStyles(props) {
|
|
|
33
33
|
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .ProseMirror {\n ", ";\n\n hr {\n cursor: pointer;\n padding: ", " 0;\n margin: calc(", "em - 4px) 0;\n background-clip: content-box;\n\n &.", " {\n outline: none;\n background-color: ", ";\n }\n }\n }\n"])), ruleSharedStyles(props), "var(--ds-space-050, 4px)", akEditorLineHeight, akEditorSelectedNodeClassName, "var(--ds-border-selected, ".concat(akEditorSelectedBorderColor, ")"));
|
|
34
34
|
};
|
|
35
35
|
var mentionsStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .", " {\n &.", " [data-mention-id] > span {\n ", "\n\n /* need to specify dark text colour because personal mentions\n (in dark blue) have white text by default */\n color: ", ";\n }\n }\n\n .danger {\n .", ".", "\n > span\n > span\n > span {\n box-shadow: 0 0 0 ", "px ", ";\n background-color: ", ";\n }\n .", " > span > span > span {\n background-color: ", ";\n color: ", ";\n }\n }\n"])), MentionSharedCssClassName.MENTION_CONTAINER, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Background]), "var(--ds-text-subtle, ".concat(N500, ")"), MentionSharedCssClassName.MENTION_CONTAINER, akEditorSelectedNodeClassName, akEditorSelectedBorderSize, akEditorDeleteBorder, "var(--ds-background-danger, ".concat(akEditorDeleteBackgroundWithOpacity, ")"), MentionSharedCssClassName.MENTION_CONTAINER, "var(--ds-background-neutral, ".concat(N30A, ")"), "var(--ds-text-subtle, ".concat(N500, ")"));
|
|
36
|
-
var listsStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n .ProseMirror {\n li {\n position: relative;\n\n > p:not(:first-child) {\n margin: ", " 0 0 0;\n }\n\n // In SSR the above rule will apply to all p tags because first-child would be a style tag.\n // The following rule resets the first p tag back to its original margin\n // defined in packages/editor/editor-common/src/styles/shared/paragraph.ts\n > style:first-child + p {\n margin-top: ", ";\n }\n }\n\n
|
|
36
|
+
var listsStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n .ProseMirror {\n li {\n position: relative;\n\n > p:not(:first-child) {\n margin: ", " 0 0 0;\n }\n\n // In SSR the above rule will apply to all p tags because first-child would be a style tag.\n // The following rule resets the first p tag back to its original margin\n // defined in packages/editor/editor-common/src/styles/shared/paragraph.ts\n > style:first-child + p {\n margin-top: ", ";\n }\n }\n\n &:not([data-node-type='decisionList']) > li,\n // This prevents https://product-fabric.atlassian.net/browse/ED-20924\n &:not(.", ") > li {\n ", "\n }\n }\n"])), "var(--ds-space-050, 4px)", blockNodesVerticalMargin, SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, browser.safari ? codeBlockInListSafariFix : '');
|
|
37
37
|
var emojiStyles = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n .", " {\n display: inline-block;\n\n .", " {\n cursor: pointer;\n\n &.", " > span {\n /** needed for selection style to cover custom emoji image properly */\n display: flex;\n }\n }\n\n &.", " {\n .", ",\n .", " {\n border-radius: 2px;\n ", "\n }\n }\n }\n"])), EmojiSharedCssClassName.EMOJI_CONTAINER, EmojiSharedCssClassName.EMOJI_NODE, EmojiSharedCssClassName.EMOJI_IMAGE, akEditorSelectedNodeClassName, EmojiSharedCssClassName.EMOJI_SPRITE, EmojiSharedCssClassName.EMOJI_IMAGE, getSelectionStyles([SelectionStyle.Blanket, SelectionStyle.BoxShadow]));
|
|
38
38
|
export var placeholderStyles = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n .ProseMirror .placeholder-decoration {\n color: ", ";\n width: 100%;\n pointer-events: none;\n user-select: none;\n\n .placeholder-android {\n pointer-events: none;\n outline: none;\n user-select: none;\n position: absolute;\n }\n }\n"])), "var(--ds-text-subtlest, ".concat(N200, ")"));
|
|
39
39
|
var contentStyles = function contentStyles(props) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "189.6.
|
|
2
|
+
export var version = "189.6.5";
|
|
@@ -6,6 +6,7 @@ declare const _default: import("react").FC<import("react-intl-next").WithIntlPro
|
|
|
6
6
|
description?: string | undefined;
|
|
7
7
|
summary?: string | undefined;
|
|
8
8
|
documentationUrl?: string | undefined;
|
|
9
|
+
enableHelpCTA?: boolean | undefined;
|
|
9
10
|
icon: Icon;
|
|
10
11
|
onClose: () => void;
|
|
11
12
|
} & WrappedComponentProps<"intl">>> & {
|
|
@@ -14,6 +15,7 @@ declare const _default: import("react").FC<import("react-intl-next").WithIntlPro
|
|
|
14
15
|
description?: string | undefined;
|
|
15
16
|
summary?: string | undefined;
|
|
16
17
|
documentationUrl?: string | undefined;
|
|
18
|
+
enableHelpCTA?: boolean | undefined;
|
|
17
19
|
icon: Icon;
|
|
18
20
|
onClose: () => void;
|
|
19
21
|
} & WrappedComponentProps<"intl">>;
|
|
@@ -6,6 +6,7 @@ declare const _default: import("react").FC<import("react-intl-next").WithIntlPro
|
|
|
6
6
|
description?: string | undefined;
|
|
7
7
|
summary?: string | undefined;
|
|
8
8
|
documentationUrl?: string | undefined;
|
|
9
|
+
enableHelpCTA?: boolean | undefined;
|
|
9
10
|
icon: Icon;
|
|
10
11
|
onClose: () => void;
|
|
11
12
|
} & WrappedComponentProps<"intl">>> & {
|
|
@@ -14,6 +15,7 @@ declare const _default: import("react").FC<import("react-intl-next").WithIntlPro
|
|
|
14
15
|
description?: string | undefined;
|
|
15
16
|
summary?: string | undefined;
|
|
16
17
|
documentationUrl?: string | undefined;
|
|
18
|
+
enableHelpCTA?: boolean | undefined;
|
|
17
19
|
icon: Icon;
|
|
18
20
|
onClose: () => void;
|
|
19
21
|
} & WrappedComponentProps<"intl">>;
|