@atlaskit/renderer 102.0.0 → 103.0.1
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 +27 -0
- package/dist/cjs/consts.js +2 -2
- package/dist/cjs/i18n/cs.js +4 -4
- package/dist/cjs/i18n/da.js +4 -4
- package/dist/cjs/i18n/de.js +4 -4
- package/dist/cjs/i18n/en.js +4 -4
- package/dist/cjs/i18n/en_GB.js +4 -4
- package/dist/cjs/i18n/es.js +4 -4
- package/dist/cjs/i18n/fi.js +4 -4
- package/dist/cjs/i18n/fr.js +4 -4
- package/dist/cjs/i18n/hu.js +4 -4
- package/dist/cjs/i18n/it.js +4 -4
- package/dist/cjs/i18n/ja.js +4 -4
- package/dist/cjs/i18n/ko.js +4 -4
- package/dist/cjs/i18n/nb.js +4 -4
- package/dist/cjs/i18n/nl.js +4 -4
- package/dist/cjs/i18n/pl.js +4 -4
- package/dist/cjs/i18n/pt_BR.js +4 -4
- package/dist/cjs/i18n/ru.js +4 -4
- package/dist/cjs/i18n/sv.js +4 -4
- package/dist/cjs/i18n/th.js +4 -4
- package/dist/cjs/i18n/tr.js +4 -4
- package/dist/cjs/i18n/uk.js +4 -4
- package/dist/cjs/i18n/vi.js +4 -4
- package/dist/cjs/i18n/zh.js +4 -4
- package/dist/cjs/i18n/zh_TW.js +4 -4
- package/dist/cjs/messages.js +1 -1
- package/dist/cjs/react/nodes/panel.js +19 -10
- package/dist/cjs/react/nodes/tableCell.js +8 -26
- package/dist/cjs/ui/ExtensionRenderer.js +9 -2
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/cjs/ui/Renderer/style.js +5 -3
- package/dist/cjs/ui/SortingIcon.js +55 -28
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/consts.js +2 -2
- package/dist/es2019/i18n/cs.js +4 -4
- package/dist/es2019/i18n/da.js +4 -4
- package/dist/es2019/i18n/de.js +4 -4
- package/dist/es2019/i18n/en.js +4 -4
- package/dist/es2019/i18n/en_GB.js +4 -4
- package/dist/es2019/i18n/es.js +4 -4
- package/dist/es2019/i18n/fi.js +4 -4
- package/dist/es2019/i18n/fr.js +4 -4
- package/dist/es2019/i18n/hu.js +4 -4
- package/dist/es2019/i18n/it.js +4 -4
- package/dist/es2019/i18n/ja.js +4 -4
- package/dist/es2019/i18n/ko.js +4 -4
- package/dist/es2019/i18n/nb.js +4 -4
- package/dist/es2019/i18n/nl.js +4 -4
- package/dist/es2019/i18n/pl.js +4 -4
- package/dist/es2019/i18n/pt_BR.js +4 -4
- package/dist/es2019/i18n/ru.js +4 -4
- package/dist/es2019/i18n/sv.js +4 -4
- package/dist/es2019/i18n/th.js +4 -4
- package/dist/es2019/i18n/tr.js +4 -4
- package/dist/es2019/i18n/uk.js +4 -4
- package/dist/es2019/i18n/vi.js +4 -4
- package/dist/es2019/i18n/zh.js +4 -4
- package/dist/es2019/i18n/zh_TW.js +4 -4
- package/dist/es2019/messages.js +1 -1
- package/dist/es2019/react/nodes/panel.js +16 -6
- package/dist/es2019/react/nodes/tableCell.js +8 -27
- package/dist/es2019/ui/ExtensionRenderer.js +7 -2
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/es2019/ui/Renderer/style.js +37 -16
- package/dist/es2019/ui/SortingIcon.js +89 -32
- package/dist/es2019/version.json +1 -1
- package/dist/esm/consts.js +2 -2
- package/dist/esm/i18n/cs.js +4 -4
- package/dist/esm/i18n/da.js +4 -4
- package/dist/esm/i18n/de.js +4 -4
- package/dist/esm/i18n/en.js +4 -4
- package/dist/esm/i18n/en_GB.js +4 -4
- package/dist/esm/i18n/es.js +4 -4
- package/dist/esm/i18n/fi.js +4 -4
- package/dist/esm/i18n/fr.js +4 -4
- package/dist/esm/i18n/hu.js +4 -4
- package/dist/esm/i18n/it.js +4 -4
- package/dist/esm/i18n/ja.js +4 -4
- package/dist/esm/i18n/ko.js +4 -4
- package/dist/esm/i18n/nb.js +4 -4
- package/dist/esm/i18n/nl.js +4 -4
- package/dist/esm/i18n/pl.js +4 -4
- package/dist/esm/i18n/pt_BR.js +4 -4
- package/dist/esm/i18n/ru.js +4 -4
- package/dist/esm/i18n/sv.js +4 -4
- package/dist/esm/i18n/th.js +4 -4
- package/dist/esm/i18n/tr.js +4 -4
- package/dist/esm/i18n/uk.js +4 -4
- package/dist/esm/i18n/vi.js +4 -4
- package/dist/esm/i18n/zh.js +4 -4
- package/dist/esm/i18n/zh_TW.js +4 -4
- package/dist/esm/messages.js +1 -1
- package/dist/esm/react/nodes/panel.js +18 -10
- package/dist/esm/react/nodes/tableCell.js +8 -26
- package/dist/esm/ui/ExtensionRenderer.js +9 -2
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/esm/ui/Renderer/style.js +5 -4
- package/dist/esm/ui/SortingIcon.js +55 -27
- package/dist/esm/version.json +1 -1
- package/dist/types/consts.d.ts +2 -2
- package/dist/types/i18n/cs.d.ts +2 -2
- package/dist/types/i18n/da.d.ts +2 -2
- package/dist/types/i18n/de.d.ts +2 -2
- package/dist/types/i18n/en.d.ts +2 -2
- package/dist/types/i18n/en_GB.d.ts +2 -2
- package/dist/types/i18n/es.d.ts +2 -2
- package/dist/types/i18n/fi.d.ts +2 -2
- package/dist/types/i18n/fr.d.ts +2 -2
- package/dist/types/i18n/hu.d.ts +2 -2
- package/dist/types/i18n/it.d.ts +2 -2
- package/dist/types/i18n/ja.d.ts +2 -2
- package/dist/types/i18n/ko.d.ts +2 -2
- package/dist/types/i18n/nb.d.ts +2 -2
- package/dist/types/i18n/nl.d.ts +2 -2
- package/dist/types/i18n/pl.d.ts +2 -2
- package/dist/types/i18n/pt_BR.d.ts +2 -2
- package/dist/types/i18n/ru.d.ts +2 -2
- package/dist/types/i18n/sv.d.ts +2 -2
- package/dist/types/i18n/th.d.ts +2 -2
- package/dist/types/i18n/tr.d.ts +2 -2
- package/dist/types/i18n/uk.d.ts +2 -2
- package/dist/types/i18n/vi.d.ts +2 -2
- package/dist/types/i18n/zh.d.ts +2 -2
- package/dist/types/i18n/zh_TW.d.ts +2 -2
- package/dist/types/react/nodes/bodiedExtension.d.ts +2 -1
- package/dist/types/react/nodes/extension.d.ts +2 -1
- package/dist/types/react/nodes/inlineExtension.d.ts +2 -0
- package/dist/types/ui/ExtensionRenderer.d.ts +2 -0
- package/dist/types/ui/SortingIcon.d.ts +4 -1
- package/dist/types-ts4.0/consts.d.ts +2 -2
- package/dist/types-ts4.0/i18n/cs.d.ts +2 -2
- package/dist/types-ts4.0/i18n/da.d.ts +2 -2
- package/dist/types-ts4.0/i18n/de.d.ts +2 -2
- package/dist/types-ts4.0/i18n/en.d.ts +2 -2
- package/dist/types-ts4.0/i18n/en_GB.d.ts +2 -2
- package/dist/types-ts4.0/i18n/es.d.ts +2 -2
- package/dist/types-ts4.0/i18n/fi.d.ts +2 -2
- package/dist/types-ts4.0/i18n/fr.d.ts +2 -2
- package/dist/types-ts4.0/i18n/hu.d.ts +2 -2
- package/dist/types-ts4.0/i18n/it.d.ts +2 -2
- package/dist/types-ts4.0/i18n/ja.d.ts +2 -2
- package/dist/types-ts4.0/i18n/ko.d.ts +2 -2
- package/dist/types-ts4.0/i18n/nb.d.ts +2 -2
- package/dist/types-ts4.0/i18n/nl.d.ts +2 -2
- package/dist/types-ts4.0/i18n/pl.d.ts +2 -2
- package/dist/types-ts4.0/i18n/pt_BR.d.ts +2 -2
- package/dist/types-ts4.0/i18n/ru.d.ts +2 -2
- package/dist/types-ts4.0/i18n/sv.d.ts +2 -2
- package/dist/types-ts4.0/i18n/th.d.ts +2 -2
- package/dist/types-ts4.0/i18n/tr.d.ts +2 -2
- package/dist/types-ts4.0/i18n/uk.d.ts +2 -2
- package/dist/types-ts4.0/i18n/vi.d.ts +2 -2
- package/dist/types-ts4.0/i18n/zh.d.ts +2 -2
- package/dist/types-ts4.0/i18n/zh_TW.d.ts +2 -2
- package/dist/types-ts4.0/react/nodes/bodiedExtension.d.ts +2 -1
- package/dist/types-ts4.0/react/nodes/extension.d.ts +2 -1
- package/dist/types-ts4.0/react/nodes/inlineExtension.d.ts +2 -0
- package/dist/types-ts4.0/ui/ExtensionRenderer.d.ts +2 -0
- package/dist/types-ts4.0/ui/SortingIcon.d.ts +4 -1
- package/package.json +20 -16
- package/report.api.md +359 -255
package/dist/esm/i18n/tr.js
CHANGED
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
*/
|
|
7
7
|
//Turkish (Turkey)
|
|
8
8
|
export default {
|
|
9
|
-
'fabric.editor.codeBlockCopyButton.copiedToClipboard': 'Kopyalandı!',
|
|
10
|
-
'fabric.editor.codeBlockCopyButton.copyToClipboard': 'Kopyala',
|
|
11
9
|
'fabric.editor.headingLink.ascOrderLabel': "Sütunu Z'den A'ya sırala",
|
|
12
10
|
'fabric.editor.headingLink.ascSortingLabel': 'artan',
|
|
13
11
|
'fabric.editor.headingLink.copied': 'Kopyalandı!',
|
|
14
12
|
'fabric.editor.headingLink.copyAnchorLink': 'Başlık bağlantısını kopyala',
|
|
15
13
|
'fabric.editor.headingLink.copyAriaLabel': 'Kopyala',
|
|
16
|
-
'fabric.editor.headingLink.descOrderLabel': '
|
|
14
|
+
'fabric.editor.headingLink.descOrderLabel': 'Sıralamayı temizle',
|
|
15
|
+
'fabric.editor.headingLink.descSortingLabel': 'azalan',
|
|
17
16
|
'fabric.editor.headingLink.failedToCopy': 'Kopyalama işlemi başarısız oldu',
|
|
17
|
+
'fabric.editor.headingLink.invalidLabel': '⚠️ Birleştirilmiş hücre içeren bir tabloyu sıralayamazsınız',
|
|
18
18
|
'fabric.editor.headingLink.noOrderLabel': "Sütunu A'dan Z'ye sırala",
|
|
19
|
-
'fabric.editor.headingLink.noneSortingLabel': '
|
|
19
|
+
'fabric.editor.headingLink.noneSortingLabel': 'yok'
|
|
20
20
|
};
|
package/dist/esm/i18n/uk.js
CHANGED
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
*/
|
|
7
7
|
//Ukrainian (Ukraine)
|
|
8
8
|
export default {
|
|
9
|
-
'fabric.editor.codeBlockCopyButton.copiedToClipboard': 'Скопійовано',
|
|
10
|
-
'fabric.editor.codeBlockCopyButton.copyToClipboard': 'Скопіювати',
|
|
11
9
|
'fabric.editor.headingLink.ascOrderLabel': 'Сортувати стовпці від Я до А',
|
|
12
10
|
'fabric.editor.headingLink.ascSortingLabel': 'за зростанням',
|
|
13
11
|
'fabric.editor.headingLink.copied': 'Скопійовано',
|
|
14
12
|
'fabric.editor.headingLink.copyAnchorLink': 'Скопіювати посилання на заголовок',
|
|
15
13
|
'fabric.editor.headingLink.copyAriaLabel': 'Копіювати',
|
|
16
|
-
'fabric.editor.headingLink.descOrderLabel': '
|
|
14
|
+
'fabric.editor.headingLink.descOrderLabel': 'Очистити сортування',
|
|
15
|
+
'fabric.editor.headingLink.descSortingLabel': 'за спаданням',
|
|
17
16
|
'fabric.editor.headingLink.failedToCopy': 'Не вдалося скопіювати',
|
|
17
|
+
'fabric.editor.headingLink.invalidLabel': '⚠️ Не можна сортувати таблицю, у якій є об’єднані клітинки',
|
|
18
18
|
'fabric.editor.headingLink.noOrderLabel': 'Сортувати стовпці від А до Я',
|
|
19
|
-
'fabric.editor.headingLink.noneSortingLabel': '
|
|
19
|
+
'fabric.editor.headingLink.noneSortingLabel': 'Немає'
|
|
20
20
|
};
|
package/dist/esm/i18n/vi.js
CHANGED
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
*/
|
|
7
7
|
//Vietnamese (Vietnam)
|
|
8
8
|
export default {
|
|
9
|
-
'fabric.editor.codeBlockCopyButton.copiedToClipboard': 'Đã sao chép!',
|
|
10
|
-
'fabric.editor.codeBlockCopyButton.copyToClipboard': 'Sao chép',
|
|
11
9
|
'fabric.editor.headingLink.ascOrderLabel': 'Sắp xếp cột theo thứ tự từ Z đến A',
|
|
12
10
|
'fabric.editor.headingLink.ascSortingLabel': 'tăng dần',
|
|
13
11
|
'fabric.editor.headingLink.copied': 'Đã sao chép!',
|
|
14
12
|
'fabric.editor.headingLink.copyAnchorLink': 'Sao chép liên kết vào tiêu đề',
|
|
15
13
|
'fabric.editor.headingLink.copyAriaLabel': 'Sao chép',
|
|
16
|
-
'fabric.editor.headingLink.descOrderLabel': '
|
|
14
|
+
'fabric.editor.headingLink.descOrderLabel': 'Bỏ sắp xếp',
|
|
15
|
+
'fabric.editor.headingLink.descSortingLabel': 'giảm dần',
|
|
17
16
|
'fabric.editor.headingLink.failedToCopy': 'Sao chép không thành công',
|
|
17
|
+
'fabric.editor.headingLink.invalidLabel': '⚠️ Bạn không thể sắp xếp bảng có các ô đã hợp nhất',
|
|
18
18
|
'fabric.editor.headingLink.noOrderLabel': 'Sắp xếp cột theo thứ tự từ A đến Z',
|
|
19
|
-
'fabric.editor.headingLink.noneSortingLabel': '
|
|
19
|
+
'fabric.editor.headingLink.noneSortingLabel': 'không có'
|
|
20
20
|
};
|
package/dist/esm/i18n/zh.js
CHANGED
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
*/
|
|
7
7
|
//Chinese (Simplified)
|
|
8
8
|
export default {
|
|
9
|
-
'fabric.editor.codeBlockCopyButton.copiedToClipboard': '已复制!',
|
|
10
|
-
'fabric.editor.codeBlockCopyButton.copyToClipboard': '复制',
|
|
11
9
|
'fabric.editor.headingLink.ascOrderLabel': '按照 Z 到 A 进行列排序',
|
|
12
10
|
'fabric.editor.headingLink.ascSortingLabel': '升序',
|
|
13
11
|
'fabric.editor.headingLink.copied': '已复制!',
|
|
14
12
|
'fabric.editor.headingLink.copyAnchorLink': '复制标题链接',
|
|
15
13
|
'fabric.editor.headingLink.copyAriaLabel': '复制',
|
|
16
|
-
'fabric.editor.headingLink.descOrderLabel': '
|
|
14
|
+
'fabric.editor.headingLink.descOrderLabel': '清除排序',
|
|
15
|
+
'fabric.editor.headingLink.descSortingLabel': '降序',
|
|
17
16
|
'fabric.editor.headingLink.failedToCopy': '复制失败',
|
|
17
|
+
'fabric.editor.headingLink.invalidLabel': '⚠️ 无法对包含合并单元格的表格进行排序',
|
|
18
18
|
'fabric.editor.headingLink.noOrderLabel': '按照 A 到 Z 进行列排序',
|
|
19
|
-
'fabric.editor.headingLink.noneSortingLabel': '
|
|
19
|
+
'fabric.editor.headingLink.noneSortingLabel': '无'
|
|
20
20
|
};
|
package/dist/esm/i18n/zh_TW.js
CHANGED
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
*/
|
|
7
7
|
//Chinese (Traditional)
|
|
8
8
|
export default {
|
|
9
|
-
'fabric.editor.codeBlockCopyButton.copiedToClipboard': '已複製!',
|
|
10
|
-
'fabric.editor.codeBlockCopyButton.copyToClipboard': '複製',
|
|
11
9
|
'fabric.editor.headingLink.ascOrderLabel': '從 Z 欄排序到 A 欄',
|
|
12
10
|
'fabric.editor.headingLink.ascSortingLabel': '遞增',
|
|
13
11
|
'fabric.editor.headingLink.copied': '已複製!',
|
|
14
12
|
'fabric.editor.headingLink.copyAnchorLink': '複製標題連結',
|
|
15
13
|
'fabric.editor.headingLink.copyAriaLabel': '複製',
|
|
16
|
-
'fabric.editor.headingLink.descOrderLabel': '
|
|
14
|
+
'fabric.editor.headingLink.descOrderLabel': '清除排序',
|
|
15
|
+
'fabric.editor.headingLink.descSortingLabel': '遞減',
|
|
17
16
|
'fabric.editor.headingLink.failedToCopy': '複製失敗',
|
|
17
|
+
'fabric.editor.headingLink.invalidLabel': '⚠️ 您無法排序包含合併儲存格的表格',
|
|
18
18
|
'fabric.editor.headingLink.noOrderLabel': '從 A 欄排序到 Z 欄',
|
|
19
|
-
'fabric.editor.headingLink.noneSortingLabel': '
|
|
19
|
+
'fabric.editor.headingLink.noneSortingLabel': '無'
|
|
20
20
|
};
|
package/dist/esm/messages.js
CHANGED
|
@@ -56,7 +56,7 @@ export var sortingIconMessages = defineMessages({
|
|
|
56
56
|
},
|
|
57
57
|
invalidLabel: {
|
|
58
58
|
id: 'fabric.editor.headingLink.invalidLabel',
|
|
59
|
-
defaultMessage: "\u26A0\uFE0F You can't sort a table with merged
|
|
59
|
+
defaultMessage: "\u26A0\uFE0F You can't sort a table with merged cells",
|
|
60
60
|
description: 'this sort is invalid for merged cells'
|
|
61
61
|
}
|
|
62
62
|
});
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
4
|
|
|
4
5
|
var _templateObject, _templateObject2;
|
|
5
6
|
|
|
7
|
+
var _excluded = ["backgroundColor", "hasIcon"];
|
|
8
|
+
|
|
6
9
|
/** @jsx jsx */
|
|
7
10
|
import React from 'react';
|
|
8
11
|
import { css, jsx } from '@emotion/react';
|
|
@@ -16,24 +19,28 @@ import EmojiItem from './emoji'; // AFP-2532 TODO: Fix automatic suppressions be
|
|
|
16
19
|
import { themed } from '@atlaskit/theme';
|
|
17
20
|
import { PanelInfoIcon, PanelSuccessIcon, PanelNoteIcon, PanelWarningIcon, PanelErrorIcon } from '@atlaskit/editor-common/icons';
|
|
18
21
|
|
|
19
|
-
var PanelStyled = function PanelStyled(
|
|
22
|
+
var PanelStyled = function PanelStyled(_ref) {
|
|
23
|
+
var backgroundColor = _ref.backgroundColor,
|
|
24
|
+
hasIcon = _ref.hasIcon,
|
|
25
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
26
|
+
|
|
20
27
|
var styles = function styles(theme) {
|
|
21
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &.", " {\n ", "\n }\n "])), PanelSharedCssClassName.prefix, panelSharedStylesWithoutPrefix({
|
|
28
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &.", " {\n ", "\n\n &[data-panel-type=", "] {\n ", "\n }\n }\n "])), PanelSharedCssClassName.prefix, panelSharedStylesWithoutPrefix({
|
|
22
29
|
theme: theme
|
|
23
|
-
}));
|
|
30
|
+
}), PanelType.CUSTOM, hasIcon ? '' : 'padding: 12px;');
|
|
24
31
|
};
|
|
25
32
|
|
|
26
|
-
if (props['data-panel-type'] === PanelType.CUSTOM &&
|
|
33
|
+
if (props['data-panel-type'] === PanelType.CUSTOM && backgroundColor) {
|
|
27
34
|
styles = function styles(theme) {
|
|
28
35
|
var customStyle = themed({
|
|
29
36
|
dark: getPanelBackgroundDarkModeColors,
|
|
30
|
-
light: "background-color: ".concat(
|
|
37
|
+
light: "background-color: ".concat(backgroundColor, ";")
|
|
31
38
|
})({
|
|
32
39
|
theme: theme
|
|
33
40
|
});
|
|
34
|
-
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n &.", " {\n ", "\n }\n\n &[data-panel-type=", "] {\n ", ";\n }\n "])), PanelSharedCssClassName.prefix, panelSharedStylesWithoutPrefix({
|
|
41
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n &.", " {\n ", "\n }\n\n &[data-panel-type=", "] {\n ", ";\n ", "\n }\n "])), PanelSharedCssClassName.prefix, panelSharedStylesWithoutPrefix({
|
|
35
42
|
theme: theme
|
|
36
|
-
}), PanelType.CUSTOM, customStyle);
|
|
43
|
+
}), PanelType.CUSTOM, customStyle, hasIcon ? '' : 'padding: 12px;');
|
|
37
44
|
};
|
|
38
45
|
}
|
|
39
46
|
|
|
@@ -86,9 +93,9 @@ var Panel = function Panel(props) {
|
|
|
86
93
|
});
|
|
87
94
|
};
|
|
88
95
|
|
|
89
|
-
var
|
|
90
|
-
var icon = getIcon();
|
|
96
|
+
var icon = getIcon();
|
|
91
97
|
|
|
98
|
+
var renderIcon = function renderIcon() {
|
|
92
99
|
if (icon) {
|
|
93
100
|
return jsx("div", {
|
|
94
101
|
className: PanelSharedCssClassName.icon
|
|
@@ -103,7 +110,8 @@ var Panel = function Panel(props) {
|
|
|
103
110
|
"data-panel-icon": panelIcon,
|
|
104
111
|
"data-panel-icon-id": panelIconId,
|
|
105
112
|
"data-panel-icon-text": panelIconText,
|
|
106
|
-
backgroundColor: panelColor
|
|
113
|
+
backgroundColor: panelColor,
|
|
114
|
+
hasIcon: Boolean(icon)
|
|
107
115
|
}, renderIcon(), jsx("div", {
|
|
108
116
|
className: PanelSharedCssClassName.content
|
|
109
117
|
}, children));
|
|
@@ -152,19 +152,11 @@ export var withSortableColumn = function withSortableColumn(WrapperComponent) {
|
|
|
152
152
|
if (keys.includes(event.key) && !IgnoreSorting.includes(tagName)) {
|
|
153
153
|
event.preventDefault();
|
|
154
154
|
|
|
155
|
-
_this.
|
|
155
|
+
_this.sort();
|
|
156
156
|
}
|
|
157
157
|
});
|
|
158
158
|
|
|
159
|
-
_defineProperty(_assertThisInitialized(_this), "
|
|
160
|
-
// ignore sorting when specific elements are clicked
|
|
161
|
-
var _ref2 = event.target,
|
|
162
|
-
tagName = _ref2.tagName;
|
|
163
|
-
|
|
164
|
-
if (IgnoreSorting.includes(tagName)) {
|
|
165
|
-
return;
|
|
166
|
-
}
|
|
167
|
-
|
|
159
|
+
_defineProperty(_assertThisInitialized(_this), "sort", function () {
|
|
168
160
|
var _this$props2 = _this.props,
|
|
169
161
|
fireAnalyticsEvent = _this$props2.fireAnalyticsEvent,
|
|
170
162
|
onSorting = _this$props2.onSorting,
|
|
@@ -217,28 +209,18 @@ export var withSortableColumn = function withSortableColumn(WrapperComponent) {
|
|
|
217
209
|
return /*#__PURE__*/React.createElement(WrapperComponent, this.props);
|
|
218
210
|
}
|
|
219
211
|
|
|
220
|
-
var className = RendererCssClassName.SORTABLE_COLUMN;
|
|
221
|
-
|
|
222
|
-
if (!onSorting) {
|
|
223
|
-
className = "".concat(className, " ").concat(RendererCssClassName.SORTABLE_COLUMN_NOT_ALLOWED);
|
|
224
|
-
}
|
|
225
|
-
|
|
226
212
|
return /*#__PURE__*/React.createElement(WrapperComponent, _extends({}, this.props, {
|
|
227
|
-
className:
|
|
213
|
+
className: RendererCssClassName.SORTABLE_COLUMN_WRAPPER,
|
|
228
214
|
ariaSort: getSortOrderLabel(intl, sortOrdered)
|
|
229
215
|
}), /*#__PURE__*/React.createElement("div", {
|
|
230
|
-
className: RendererCssClassName.
|
|
231
|
-
role: "button",
|
|
232
|
-
tabIndex: onSorting ? 0 : -1,
|
|
233
|
-
onClick: this.onClick,
|
|
234
|
-
onKeyDown: this.onKeyPress,
|
|
235
|
-
"aria-disabled": !onSorting
|
|
216
|
+
className: RendererCssClassName.SORTABLE_COLUMN
|
|
236
217
|
}, children, /*#__PURE__*/React.createElement("figure", {
|
|
237
|
-
"
|
|
238
|
-
className: "".concat(RendererCssClassName.SORTABLE_COLUMN_ICON, " ").concat(sortOrderedClassName)
|
|
218
|
+
className: "".concat(RendererCssClassName.SORTABLE_COLUMN_ICON_WRAPPER, " ").concat(sortOrderedClassName)
|
|
239
219
|
}, /*#__PURE__*/React.createElement(SortingIcon, {
|
|
240
220
|
isSortingAllowed: !!onSorting,
|
|
241
|
-
sortOrdered: sortOrdered
|
|
221
|
+
sortOrdered: sortOrdered,
|
|
222
|
+
onClick: this.sort,
|
|
223
|
+
onKeyDown: this.onKeyPress
|
|
242
224
|
}))));
|
|
243
225
|
}
|
|
244
226
|
}]);
|
|
@@ -49,6 +49,8 @@ var ExtensionRenderer = /*#__PURE__*/function (_React$Component) {
|
|
|
49
49
|
_defineProperty(_assertThisInitialized(_this), "getNodeRenderer", memoizeOne(getNodeRenderer));
|
|
50
50
|
|
|
51
51
|
_defineProperty(_assertThisInitialized(_this), "renderExtensionNode", function (extensionProvider) {
|
|
52
|
+
var _marks$find, _marks$find$attrs;
|
|
53
|
+
|
|
52
54
|
var _this$props = _this.props,
|
|
53
55
|
extensionHandlers = _this$props.extensionHandlers,
|
|
54
56
|
rendererContext = _this$props.rendererContext,
|
|
@@ -58,14 +60,19 @@ var ExtensionRenderer = /*#__PURE__*/function (_React$Component) {
|
|
|
58
60
|
content = _this$props.content,
|
|
59
61
|
text = _this$props.text,
|
|
60
62
|
type = _this$props.type,
|
|
61
|
-
localId = _this$props.localId
|
|
63
|
+
localId = _this$props.localId,
|
|
64
|
+
marks = _this$props.marks;
|
|
65
|
+
var fragmentLocalId = marks === null || marks === void 0 ? void 0 : (_marks$find = marks.find(function (m) {
|
|
66
|
+
return m.type.name === 'fragment';
|
|
67
|
+
})) === null || _marks$find === void 0 ? void 0 : (_marks$find$attrs = _marks$find.attrs) === null || _marks$find$attrs === void 0 ? void 0 : _marks$find$attrs.localId;
|
|
62
68
|
var node = {
|
|
63
69
|
type: type,
|
|
64
70
|
extensionKey: extensionKey,
|
|
65
71
|
extensionType: extensionType,
|
|
66
72
|
parameters: parameters,
|
|
67
73
|
content: content || text,
|
|
68
|
-
localId: localId
|
|
74
|
+
localId: localId,
|
|
75
|
+
fragmentLocalId: fragmentLocalId
|
|
69
76
|
};
|
|
70
77
|
var result = null;
|
|
71
78
|
|
|
@@ -50,7 +50,7 @@ import { RenderTracking } from '../../react/utils/performance/RenderTracking';
|
|
|
50
50
|
export var NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
51
51
|
export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
52
52
|
var packageName = "@atlaskit/renderer";
|
|
53
|
-
var packageVersion = "
|
|
53
|
+
var packageVersion = "103.0.1";
|
|
54
54
|
export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
55
55
|
_inherits(Renderer, _PureComponent);
|
|
56
56
|
|
|
@@ -8,8 +8,9 @@ import { gridSize, fontFamily, fontSize, borderRadius } from '@atlaskit/theme/co
|
|
|
8
8
|
import * as colors from '@atlaskit/theme/colors';
|
|
9
9
|
import { headingSizes as headingSizesImport } from '@atlaskit/theme/typography';
|
|
10
10
|
import { token } from '@atlaskit/tokens';
|
|
11
|
-
import { tableSharedStyle, columnLayoutSharedStyle, blockquoteSharedStyles, headingsSharedStyles, ruleSharedStyles, whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, mediaSingleSharedStyle, TableSharedCssClassName, tableMarginTop, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, richMediaClassName, tasksAndDecisionsStyles, smartCardSharedStyles, tableCellPadding, textColorStyles } from '@atlaskit/editor-common/styles';
|
|
11
|
+
import { tableSharedStyle, columnLayoutSharedStyle, blockquoteSharedStyles, headingsSharedStyles, ruleSharedStyles, whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, mediaSingleSharedStyle, TableSharedCssClassName, tableMarginTop, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, richMediaClassName, tasksAndDecisionsStyles, smartCardSharedStyles, tableCellPadding, textColorStyles, codeBlockInListSafariFix } from '@atlaskit/editor-common/styles';
|
|
12
12
|
import { shadowClassNames } from '@atlaskit/editor-common/ui';
|
|
13
|
+
import { browser } from '@atlaskit/editor-common/utils';
|
|
13
14
|
import { editorFontSize, blockNodesVerticalMargin, akEditorTableToolbar, akEditorTableToolbarDark, akEditorTableBorder, akEditorTableBorderDark, akEditorTableNumberColumnWidth, gridMediumMaxWidth, akEditorFullWidthLayoutWidth, akEditorStickyHeaderZIndex, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
14
15
|
import { RendererCssClassName } from '../../consts';
|
|
15
16
|
import { HeadingAnchorWrapperClassName } from '../../react/nodes/heading-anchor';
|
|
@@ -70,7 +71,7 @@ var tableSortableColumnStyle = function tableSortableColumnStyle(_ref2) {
|
|
|
70
71
|
headingsCss = "\n /**\n * When the sort button is enabled we want the heading's copy link button\n * to reserve space so that it can prematurely wrap to avoid the button\n * being displayed underneath the sort button (hidden or obscured).\n *\n * The two buttons fight each other since the sort button is displayed\n * on hover of the <th /> and the copy link button is displayed on hover\n * of the heading.\n *\n * Note that this can break the WYSIWYG experience in the case where\n * a heading fills the width of the table cell and the only thing which\n * wraps is the copy link button. This is hopefully a rare fringe case.\n */\n .".concat(HeadingAnchorWrapperClassName, " {\n position: unset;\n }\n > {\n h1, h2, h3, h4, h5, h6 {\n margin-right: 30px;\n }\n }\n ");
|
|
71
72
|
}
|
|
72
73
|
|
|
73
|
-
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .", " {\n padding: 0;\n\n .", " {\n width: 100%;\n height: 100%;\n
|
|
74
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .", " {\n padding: 0;\n\n .", " {\n width: 100%;\n height: 100%;\n padding: ", "px;\n border-width: 1.5px;\n border-style: solid;\n border-color: transparent;\n\n > *:first-child {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + *,\n > style:first-child + .ProseMirror-gapcursor + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + span + *,\n > style:first-child + .ProseMirror-gapcursor + span + * {\n margin-top: 0;\n }\n\n @supports selector(:focus-visible) {\n &:focus {\n outline: unset;\n }\n &:focus-visible {\n border-color: ", ";\n }\n }\n\n ", "\n }\n\n .", " {\n margin: 0;\n .", " {\n opacity: 1;\n transition: opacity 0.2s ease-in-out;\n }\n }\n\n .", " {\n .", " {\n opacity: 0;\n &:focus {\n opacity: 1;\n }\n }\n }\n\n &:hover {\n .", " {\n .", " {\n opacity: 1;\n }\n }\n }\n }\n "])), RendererCssClassName.SORTABLE_COLUMN_WRAPPER, RendererCssClassName.SORTABLE_COLUMN, tableCellPadding, token('color.border.focused', colors.B300), headingsCss, RendererCssClassName.SORTABLE_COLUMN_ICON_WRAPPER, RendererCssClassName.SORTABLE_COLUMN_ICON, RendererCssClassName.SORTABLE_COLUMN_NO_ORDER, RendererCssClassName.SORTABLE_COLUMN_ICON, RendererCssClassName.SORTABLE_COLUMN_NO_ORDER, RendererCssClassName.SORTABLE_COLUMN_ICON);
|
|
74
75
|
};
|
|
75
76
|
|
|
76
77
|
var fullPageStyles = function fullPageStyles(_ref3, _ref4) {
|
|
@@ -100,7 +101,7 @@ export var rendererStyles = function rendererStyles(wrapperProps) {
|
|
|
100
101
|
var themeProps = {
|
|
101
102
|
theme: theme
|
|
102
103
|
};
|
|
103
|
-
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n font-size: ", "px;\n line-height: 1.5rem;\n color: ", ";\n\n .", "::after {\n // we add a clearfix after ak-renderer-document in order to\n // contain internal floats (such as media images that are \"wrap-left\")\n // to just the renderer (and not spill outside of it)\n content: '';\n visibility: hidden;\n display: block;\n height: 0;\n clear: both;\n }\n\n ", "\n ", "\n\n & h1 {\n ", "\n }\n\n & h2 {\n ", "\n }\n\n & h3 {\n ", "\n }\n\n & h4 {\n ", "\n }\n\n & h5 {\n ", "\n }\n\n & h6 {\n ", "\n }\n\n & span.akActionMark {\n color: ", ";\n text-decoration: none;\n\n &:hover {\n color: ", ";\n text-decoration: underline;\n }\n\n &:active {\n color: ", ";\n }\n }\n\n & span.akActionMark {\n cursor: pointer;\n }\n\n & span[data-placeholder] {\n color: ", ";\n }\n\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", "\n\n & .UnknownBlock {\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n white-space: pre-wrap;\n word-wrap: break-word;\n }\n\n & span.date-node {\n background: ", ";\n border-radius: ", "px;\n color: ", ";\n padding: 2px 4px;\n margin: 0 1px;\n transition: background 0.3s;\n }\n\n & span.date-node-highlighted {\n background: ", ";\n color: ", ";\n }\n\n & .renderer-image {\n max-width: 100%;\n display: block;\n margin: ", "px 0;\n }\n\n .", ".rich-media-wrapped\n + .", ":not(.rich-media-wrapped) {\n clear: both;\n }\n\n & .code-block,\n & blockquote,\n & hr,\n & > div > div:not(.rich-media-wrapped),\n .", ".rich-media-wrapped\n + .rich-media-wrapped\n + *:not(.rich-media-wrapped),\n .", ".rich-media-wrapped + div:not(.rich-media-wrapped),\n .", ".image-align-start,\n .", ".image-center,\n .", ".image-align-end {\n clear: both;\n }\n\n & .rich-media-wrapped {\n & + h1,\n & + h2,\n & + h3,\n & + h4,\n & + h5,\n & + h6 {\n margin-top: 8px;\n }\n }\n\n ", "\n /* plugin styles */\n ", " &\n div[class^='image-wrap-'] + div[class^='image-wrap-'] {\n margin-left: 0;\n margin-right: 0;\n }\n\n /* Breakout for tables and extensions */\n .", " > {\n * .", " {\n width: 100% !important;\n left: 0 !important;\n }\n\n * .", " {\n overflow-x: auto;\n }\n\n & .", ":first-child {\n margin-top: 0;\n }\n }\n\n .", " {\n .", " {\n margin-top: ", ";\n }\n\n .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n .", " {\n overflow-x: auto;\n }\n\n .", "\n .", " {\n display: flex;\n }\n }\n\n ", "\n\n .", " .", " {\n z-index: 0;\n transition: all 0.1s linear;\n display: flex; /* needed to avoid position: fixed jumpiness in Chrome */\n\n /** Shadow overrides */\n &.", "::after,\n &.", "::before {\n top: ", "px;\n height: calc(100% - ", "px);\n z-index: ", ";\n }\n\n &\n .", ",\n &\n .", " {\n height: calc(100% - ", "px);\n }\n\n /**\n * A hack for making all the <th /> heights equal in case some have shorter\n * content than others.\n *\n * This is done to make sort buttons fill entire <th />.\n */\n table {\n height: 1px; /* will be ignored */\n ", ";\n margin-left: 0;\n margin-right: 0;\n }\n\n table tr:first-of-type {\n height: 100%;\n\n td,\n th {\n position: relative;\n }\n }\n\n table[data-number-column='true'] {\n .", " {\n background-color: ", ";\n border-right: 1px solid\n ", ";\n width: ", "px;\n text-align: center;\n color: ", ";\n font-size: ", ";\n }\n\n .fixed .", " {\n border-right: 0px none;\n }\n }\n }\n\n tr[data-header-row].fixed {\n position: fixed !important;\n display: flex;\n overflow: hidden;\n z-index: ", ";\n\n border-right: 1px solid\n ", ";\n border-bottom: 1px solid\n ", ";\n\n /* this is to compensate for the table border */\n transform: translateX(-1px);\n }\n\n .sticky > th {\n z-index: ", ";\n position: sticky !important;\n top: 0;\n }\n\n /* Make the number column header sticky */\n .sticky > td {\n position: sticky !important;\n top: 0;\n }\n\n /* add border for position: sticky\n and work around background-clip: padding-box\n bug for FF causing box-shadow bug in Chrome */\n .sticky th,\n .sticky td {\n box-shadow: 0px 1px\n ", ",\n 0px -0.5px ", ",\n inset -1px 0px ", ",\n 0px -1px ", ";\n }\n\n /* this will remove jumpiness caused in Chrome for sticky headers */\n .fixed + tr {\n min-height: 0px;\n }\n\n /*\n * We wrap CodeBlock in a grid to prevent it from overflowing the container of the renderer.\n * See ED-4159.\n */\n & .code-block {\n max-width: 100%;\n /* -ms- properties are necessary until MS supports the latest version of the grid spec */\n /* stylelint-disable value-no-vendor-prefix, declaration-block-no-duplicate-properties */\n display: -ms-grid;\n display: grid;\n -ms-grid-columns: auto 1fr;\n /* stylelint-enable */\n\n grid-template-columns: minmax(0, 1fr);\n position: relative;\n border-radius: ", "px;\n\n /*\n * The overall renderer has word-wrap: break; which causes issues with\n * code block line numbers in Safari / iOS.\n */\n word-wrap: normal;\n\n & > span {\n /* stylelint-disable value-no-vendor-prefix */\n -ms-grid-row: 1;\n -ms-grid-column: 2;\n /* stylelint-enable */\n grid-column: 1;\n }\n }\n\n & .MediaGroup,\n & .code-block {\n margin-top: ", ";\n\n &:first-child {\n margin-top: 0;\n }\n\n &:hover button.copy-to-clipboard,\n .copy-to-clipboard:focus {\n opacity: 1;\n position: absolute;\n height: 32px;\n width: 32px;\n right: 6px;\n top: 4px;\n padding: 2px;\n }\n }\n\n ", "\n\n ", ";\n & [data-layout-section] {\n margin-top: ", "px;\n & > div + div {\n margin-left: ", "px;\n }\n\n @media screen and (max-width: ", "px) {\n & > div + div {\n margin-left: 0;\n }\n }\n }\n "])), editorFontSize(themeProps), themed({
|
|
104
|
+
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n font-size: ", "px;\n line-height: 1.5rem;\n color: ", ";\n\n .", "::after {\n // we add a clearfix after ak-renderer-document in order to\n // contain internal floats (such as media images that are \"wrap-left\")\n // to just the renderer (and not spill outside of it)\n content: '';\n visibility: hidden;\n display: block;\n height: 0;\n clear: both;\n }\n\n ", "\n ", "\n\n & h1 {\n ", "\n }\n\n & h2 {\n ", "\n }\n\n & h3 {\n ", "\n }\n\n & h4 {\n ", "\n }\n\n & h5 {\n ", "\n }\n\n & h6 {\n ", "\n }\n\n & span.akActionMark {\n color: ", ";\n text-decoration: none;\n\n &:hover {\n color: ", ";\n text-decoration: underline;\n }\n\n &:active {\n color: ", ";\n }\n }\n\n & span.akActionMark {\n cursor: pointer;\n }\n\n & span[data-placeholder] {\n color: ", ";\n }\n\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", "\n\n & .UnknownBlock {\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n white-space: pre-wrap;\n word-wrap: break-word;\n }\n\n & span.date-node {\n background: ", ";\n border-radius: ", "px;\n color: ", ";\n padding: 2px 4px;\n margin: 0 1px;\n transition: background 0.3s;\n }\n\n & span.date-node-highlighted {\n background: ", ";\n color: ", ";\n }\n\n & .renderer-image {\n max-width: 100%;\n display: block;\n margin: ", "px 0;\n }\n\n .", ".rich-media-wrapped\n + .", ":not(.rich-media-wrapped) {\n clear: both;\n }\n\n & .code-block,\n & blockquote,\n & hr,\n & > div > div:not(.rich-media-wrapped),\n .", ".rich-media-wrapped\n + .rich-media-wrapped\n + *:not(.rich-media-wrapped),\n .", ".rich-media-wrapped + div:not(.rich-media-wrapped),\n .", ".image-align-start,\n .", ".image-center,\n .", ".image-align-end {\n clear: both;\n }\n\n & .rich-media-wrapped {\n & + h1,\n & + h2,\n & + h3,\n & + h4,\n & + h5,\n & + h6 {\n margin-top: 8px;\n }\n }\n\n ", "\n /* plugin styles */\n ", " &\n div[class^='image-wrap-'] + div[class^='image-wrap-'] {\n margin-left: 0;\n margin-right: 0;\n }\n\n /* Breakout for tables and extensions */\n .", " > {\n * .", " {\n width: 100% !important;\n left: 0 !important;\n }\n\n * .", " {\n overflow-x: auto;\n }\n\n & .", ":first-child {\n margin-top: 0;\n }\n }\n\n .", " {\n .", " {\n margin-top: ", ";\n }\n\n .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n .", " {\n overflow-x: auto;\n }\n\n .", "\n .", " {\n display: flex;\n }\n }\n\n ", "\n\n .", " .", " {\n z-index: 0;\n transition: all 0.1s linear;\n display: flex; /* needed to avoid position: fixed jumpiness in Chrome */\n\n /** Shadow overrides */\n &.", "::after,\n &.", "::before {\n top: ", "px;\n height: calc(100% - ", "px);\n z-index: ", ";\n }\n\n &\n .", ",\n &\n .", " {\n height: calc(100% - ", "px);\n }\n\n /**\n * A hack for making all the <th /> heights equal in case some have shorter\n * content than others.\n *\n * This is done to make sort buttons fill entire <th />.\n */\n table {\n height: 1px; /* will be ignored */\n ", ";\n margin-left: 0;\n margin-right: 0;\n }\n\n table tr:first-of-type {\n height: 100%;\n\n td,\n th {\n position: relative;\n }\n }\n\n table[data-number-column='true'] {\n .", " {\n background-color: ", ";\n border-right: 1px solid\n ", ";\n width: ", "px;\n text-align: center;\n color: ", ";\n font-size: ", ";\n }\n\n .fixed .", " {\n border-right: 0px none;\n }\n }\n }\n\n tr[data-header-row].fixed {\n position: fixed !important;\n display: flex;\n overflow: hidden;\n z-index: ", ";\n\n border-right: 1px solid\n ", ";\n border-bottom: 1px solid\n ", ";\n\n /* this is to compensate for the table border */\n transform: translateX(-1px);\n }\n\n .sticky > th {\n z-index: ", ";\n position: sticky !important;\n top: 0;\n }\n\n /* Make the number column header sticky */\n .sticky > td {\n position: sticky !important;\n top: 0;\n }\n\n /* add border for position: sticky\n and work around background-clip: padding-box\n bug for FF causing box-shadow bug in Chrome */\n .sticky th,\n .sticky td {\n box-shadow: 0px 1px\n ", ",\n 0px -0.5px ", ",\n inset -1px 0px ", ",\n 0px -1px ", ";\n }\n\n /* this will remove jumpiness caused in Chrome for sticky headers */\n .fixed + tr {\n min-height: 0px;\n }\n\n /*\n * We wrap CodeBlock in a grid to prevent it from overflowing the container of the renderer.\n * See ED-4159.\n */\n & .code-block {\n max-width: 100%;\n /* -ms- properties are necessary until MS supports the latest version of the grid spec */\n /* stylelint-disable value-no-vendor-prefix, declaration-block-no-duplicate-properties */\n display: -ms-grid;\n display: grid;\n -ms-grid-columns: auto 1fr;\n /* stylelint-enable */\n\n grid-template-columns: minmax(0, 1fr);\n position: relative;\n border-radius: ", "px;\n\n /*\n * The overall renderer has word-wrap: break; which causes issues with\n * code block line numbers in Safari / iOS.\n */\n word-wrap: normal;\n\n & > span {\n /* stylelint-disable value-no-vendor-prefix */\n -ms-grid-row: 1;\n -ms-grid-column: 2;\n /* stylelint-enable */\n grid-column: 1;\n }\n }\n\n & .MediaGroup,\n & .code-block {\n margin-top: ", ";\n\n &:first-child {\n margin-top: 0;\n }\n\n &:hover button.copy-to-clipboard,\n .copy-to-clipboard:focus {\n opacity: 1;\n position: absolute;\n height: 32px;\n width: 32px;\n right: 6px;\n top: 4px;\n padding: 2px;\n }\n }\n\n ", "\n\n ", ";\n & [data-layout-section] {\n margin-top: ", "px;\n & > div + div {\n margin-left: ", "px;\n }\n\n @media screen and (max-width: ", "px) {\n & > div + div {\n margin-left: 0;\n }\n }\n }\n\n & li {\n > .code-block {\n margin: ", " 0 0 0;\n }\n > .code-block:first-child {\n margin-top: 0;\n }\n\n > div:last-of-type.code-block {\n margin-bottom: ", ";\n }\n\n ", "\n }\n "])), editorFontSize(themeProps), themed({
|
|
104
105
|
light: token('color.text', colors.N800),
|
|
105
106
|
dark: token('color.text', '#B8C7E0')
|
|
106
107
|
})(themeProps), RendererCssClassName.DOCUMENT, fullPageStyles(wrapperProps, themeProps), fullWidthStyles(wrapperProps), headingAnchorStyle('h1'), headingAnchorStyle('h2'), headingAnchorStyle('h3'), headingAnchorStyle('h4'), headingAnchorStyle('h5'), headingAnchorStyle('h6'), token('color.link', colors.B400), token('color.link', colors.B300), token('color.link.pressed', colors.B500), colors.placeholderText(themeProps), whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles(themeProps), ruleSharedStyles(themeProps), paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, codeMarkSharedStyles(themeProps), shadowSharedStyle, dateSharedStyle, textColorStyles, tasksAndDecisionsStyles, smartCardSharedStyles, fontFamily(), relativeFontSizeToBase16(fontSize()), themed({
|
|
@@ -136,6 +137,6 @@ export var rendererStyles = function rendererStyles(wrapperProps) {
|
|
|
136
137
|
})(themeProps), themed({
|
|
137
138
|
light: token('color.border', akEditorTableToolbar),
|
|
138
139
|
dark: token('color.border', akEditorTableToolbarDark)
|
|
139
|
-
})(themeProps), borderRadius(), blockNodesVerticalMargin, getLightWeightCodeBlockStylesForRootRendererStyleSheet(), columnLayoutSharedStyle, gridSize() * 2.5, gridSize() * 4, gridMediumMaxWidth);
|
|
140
|
+
})(themeProps), borderRadius(), blockNodesVerticalMargin, getLightWeightCodeBlockStylesForRootRendererStyleSheet(), columnLayoutSharedStyle, gridSize() * 2.5, gridSize() * 4, gridMediumMaxWidth, blockNodesVerticalMargin, blockNodesVerticalMargin, browser.safari ? codeBlockInListSafariFix : '');
|
|
140
141
|
};
|
|
141
142
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
|
|
3
|
-
var _templateObject, _templateObject2;
|
|
3
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
4
4
|
|
|
5
5
|
/** @jsx jsx */
|
|
6
6
|
import { css, jsx } from '@emotion/react';
|
|
@@ -10,14 +10,9 @@ import { N20, N30 } from '@atlaskit/theme/colors';
|
|
|
10
10
|
import { SortOrder } from '@atlaskit/editor-common/types';
|
|
11
11
|
import { sortingIconMessages } from '../messages';
|
|
12
12
|
import { injectIntl } from 'react-intl-next';
|
|
13
|
-
import { token } from '@atlaskit/tokens';
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
// TODO: Quality ticket: https://product-fabric.atlassian.net/browse/DSP-4136
|
|
17
|
-
|
|
18
|
-
export var TableSortIconDataUrl = "data:image/svg+xml;utf8,".concat(encodeURIComponent("<svg xmlns=\"http://www.w3.org/2000/svg\"><g fill=\"none\" fill-rule=\"evenodd\"><path d=\"M-8-6h24v24H-8z\"></path><path d=\"M3 8.509V1c0-.552.449-1 1-1 .552 0 1 .448 1 1V8.51l1.217-1.206a1.05 1.05 0 011.477 0 1.03 1.03 0 01.004 1.463l-.003.002-2.956 2.93a1.053 1.053 0 01-1.478 0L.305 8.767a1.03 1.03 0 01.001-1.464 1.05 1.05 0 011.477 0L3 8.508z\" fill=\"#42526E\"></path></g></svg>"));
|
|
19
|
-
var TABLE_SORTING_ICON_CLASS = 'table-sorting-icon';
|
|
20
|
-
export var StatusClassNames; // TODO: get design to check border
|
|
13
|
+
import { token } from '@atlaskit/tokens';
|
|
14
|
+
import { RendererCssClassName } from '../consts';
|
|
15
|
+
export var StatusClassNames;
|
|
21
16
|
|
|
22
17
|
(function (StatusClassNames) {
|
|
23
18
|
StatusClassNames["ASC"] = "sorting-icon-svg__asc";
|
|
@@ -26,23 +21,34 @@ export var StatusClassNames; // TODO: get design to check border
|
|
|
26
21
|
StatusClassNames["SORTING_NOT_ALLOWED"] = "sorting-icon-svg__not-allowed";
|
|
27
22
|
})(StatusClassNames || (StatusClassNames = {}));
|
|
28
23
|
|
|
29
|
-
var
|
|
30
|
-
var
|
|
24
|
+
var buttonStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n display: flex;\n height: 28px;\n width: 28px;\n margin: 6px;\n right: 0;\n top: 0;\n border: 2px solid ", ";\n border-radius: ", "px;\n background-color: ", ";\n justify-content: center;\n align-items: center;\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n }\n\n &:active {\n background-color: ", ";\n }\n\n &.", "__not-allowed {\n cursor: not-allowed;\n }\n"])), token('color.border', '#fff'), gridSize() / 2, token('elevation.surface.overlay', N20), token('elevation.surface.overlay.hovered', N30), token('elevation.surface.overlay.pressed', 'rgba(179, 212, 255, 0.6)'), RendererCssClassName.SORTABLE_COLUMN_ICON);
|
|
25
|
+
var iconWrapperStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 8px;\n height: 12px;\n transition: transform 0.3s cubic-bezier(0.15, 1, 0.3, 1);\n transform-origin: 50% 50%;\n display: flex;\n justify-content: center;\n\n &.", " {\n transform: rotate(-180deg);\n }\n\n &.", "-inactive {\n opacity: 0.7;\n }\n"])), StatusClassNames.DESC, RendererCssClassName.SORTABLE_COLUMN_ICON); // The icon is created with CSS due to the following Firefox issue: https://product-fabric.atlassian.net/browse/ED-8001
|
|
26
|
+
// The TL;DR is that svg's in tables mess up how HTML is copied in Firefox. Using a styled div instead solves the problem.
|
|
27
|
+
// For this reason, svg's should be avoided in tables until this issue is fixed: https://bugzilla.mozilla.org/show_bug.cgi?id=1664350
|
|
28
|
+
|
|
29
|
+
var iconStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n height: 100%;\n width: 2px;\n border-radius: 50px;\n background: ", ";\n\n &::before,\n &::after {\n background: ", ";\n content: '';\n height: 2px;\n width: 6px;\n position: absolute;\n border-radius: 50px;\n }\n\n &::before {\n transform: rotate(45deg) translate(3.4px, 8.5px);\n }\n\n &::after {\n transform: rotate(-45deg) translate(-6.3px, 5.7px);\n }\n"])), token('color.icon', '#42526E'), token('color.icon', '#42526E'));
|
|
30
|
+
|
|
31
|
+
var getIconClassName = function getIconClassName(isSortingAllowed, sortOrdered) {
|
|
32
|
+
var activated = sortOrdered !== SortOrder.NO_ORDER;
|
|
33
|
+
var activeStatusClass = "".concat(RendererCssClassName.SORTABLE_COLUMN_ICON, "-").concat(activated ? 'active' : 'inactive');
|
|
34
|
+
|
|
35
|
+
if (!isSortingAllowed) {
|
|
36
|
+
return "".concat(StatusClassNames.SORTING_NOT_ALLOWED, " ").concat(activeStatusClass);
|
|
37
|
+
}
|
|
31
38
|
|
|
32
|
-
|
|
33
|
-
switch (status) {
|
|
39
|
+
switch (sortOrdered) {
|
|
34
40
|
case SortOrder.ASC:
|
|
35
|
-
return StatusClassNames.ASC;
|
|
41
|
+
return "".concat(StatusClassNames.ASC, " ").concat(activeStatusClass);
|
|
36
42
|
|
|
37
43
|
case SortOrder.DESC:
|
|
38
|
-
return StatusClassNames.DESC;
|
|
44
|
+
return "".concat(StatusClassNames.DESC, " ").concat(activeStatusClass);
|
|
39
45
|
|
|
40
46
|
default:
|
|
41
|
-
return StatusClassNames.NO_ORDER;
|
|
47
|
+
return "".concat(StatusClassNames.NO_ORDER, " ").concat(activeStatusClass);
|
|
42
48
|
}
|
|
43
49
|
};
|
|
44
50
|
|
|
45
|
-
var getTooltipTitle = function getTooltipTitle(intl, isSortingAllowed,
|
|
51
|
+
var getTooltipTitle = function getTooltipTitle(intl, isSortingAllowed, sortOrdered) {
|
|
46
52
|
var noOrderLabel = sortingIconMessages.noOrderLabel,
|
|
47
53
|
ascOrderLabel = sortingIconMessages.ascOrderLabel,
|
|
48
54
|
descOrderLabel = sortingIconMessages.descOrderLabel,
|
|
@@ -52,7 +58,7 @@ var getTooltipTitle = function getTooltipTitle(intl, isSortingAllowed, status) {
|
|
|
52
58
|
return intl.formatMessage(invalidLabel);
|
|
53
59
|
}
|
|
54
60
|
|
|
55
|
-
switch (
|
|
61
|
+
switch (sortOrdered) {
|
|
56
62
|
case SortOrder.NO_ORDER:
|
|
57
63
|
return intl.formatMessage(noOrderLabel);
|
|
58
64
|
|
|
@@ -69,21 +75,43 @@ var getTooltipTitle = function getTooltipTitle(intl, isSortingAllowed, status) {
|
|
|
69
75
|
var SortingIcon = function SortingIcon(_ref) {
|
|
70
76
|
var isSortingAllowed = _ref.isSortingAllowed,
|
|
71
77
|
sortOrdered = _ref.sortOrdered,
|
|
72
|
-
intl = _ref.intl
|
|
73
|
-
|
|
74
|
-
|
|
78
|
+
intl = _ref.intl,
|
|
79
|
+
onClick = _ref.onClick,
|
|
80
|
+
onKeyDown = _ref.onKeyDown;
|
|
81
|
+
var buttonClassName = "".concat(RendererCssClassName.SORTABLE_COLUMN_ICON).concat(isSortingAllowed ? '' : " ".concat(RendererCssClassName.SORTABLE_COLUMN_ICON, "__not-allowed"));
|
|
75
82
|
var content = getTooltipTitle(intl, isSortingAllowed, sortOrdered);
|
|
83
|
+
|
|
84
|
+
var handleClick = function handleClick() {
|
|
85
|
+
if (isSortingAllowed) {
|
|
86
|
+
onClick();
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
var handleKeyDown = function handleKeyDown(event) {
|
|
91
|
+
if (isSortingAllowed) {
|
|
92
|
+
onKeyDown(event);
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
|
|
76
96
|
return jsx(Tooltip, {
|
|
77
97
|
delay: 0,
|
|
78
98
|
content: content,
|
|
79
99
|
position: "top"
|
|
80
|
-
}, jsx("figure", {
|
|
81
|
-
css: wrapperStyles,
|
|
82
|
-
className: wrapperClassName
|
|
83
100
|
}, jsx("div", {
|
|
84
|
-
css:
|
|
85
|
-
className:
|
|
86
|
-
|
|
101
|
+
css: buttonStyles,
|
|
102
|
+
className: buttonClassName,
|
|
103
|
+
role: "button",
|
|
104
|
+
tabIndex: isSortingAllowed ? 0 : -1,
|
|
105
|
+
"aria-label": "sort column",
|
|
106
|
+
"aria-disabled": !isSortingAllowed,
|
|
107
|
+
onClick: handleClick,
|
|
108
|
+
onKeyDown: handleKeyDown
|
|
109
|
+
}, jsx("div", {
|
|
110
|
+
css: iconWrapperStyles,
|
|
111
|
+
className: getIconClassName(isSortingAllowed, sortOrdered)
|
|
112
|
+
}, jsx("div", {
|
|
113
|
+
css: iconStyles
|
|
114
|
+
}))));
|
|
87
115
|
};
|
|
88
116
|
|
|
89
117
|
export default injectIntl(SortingIcon);
|
package/dist/esm/version.json
CHANGED
package/dist/types/consts.d.ts
CHANGED
|
@@ -4,9 +4,9 @@ export declare const RendererCssClassName: {
|
|
|
4
4
|
EXTENSION_CENTER_ALIGN: string;
|
|
5
5
|
EXTENSION_OVERFLOW_CONTAINER: string;
|
|
6
6
|
NUMBER_COLUMN: string;
|
|
7
|
+
SORTABLE_COLUMN_WRAPPER: string;
|
|
7
8
|
SORTABLE_COLUMN: string;
|
|
8
|
-
|
|
9
|
-
SORTABLE_COLUMN_NOT_ALLOWED: string;
|
|
9
|
+
SORTABLE_COLUMN_ICON_WRAPPER: string;
|
|
10
10
|
SORTABLE_COLUMN_ICON: string;
|
|
11
11
|
SORTABLE_COLUMN_NO_ORDER: string;
|
|
12
12
|
};
|
package/dist/types/i18n/cs.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
'fabric.editor.codeBlockCopyButton.copiedToClipboard': string;
|
|
3
|
-
'fabric.editor.codeBlockCopyButton.copyToClipboard': string;
|
|
4
2
|
'fabric.editor.headingLink.ascOrderLabel': string;
|
|
5
3
|
'fabric.editor.headingLink.ascSortingLabel': string;
|
|
6
4
|
'fabric.editor.headingLink.copied': string;
|
|
7
5
|
'fabric.editor.headingLink.copyAnchorLink': string;
|
|
8
6
|
'fabric.editor.headingLink.copyAriaLabel': string;
|
|
9
7
|
'fabric.editor.headingLink.descOrderLabel': string;
|
|
8
|
+
'fabric.editor.headingLink.descSortingLabel': string;
|
|
10
9
|
'fabric.editor.headingLink.failedToCopy': string;
|
|
10
|
+
'fabric.editor.headingLink.invalidLabel': string;
|
|
11
11
|
'fabric.editor.headingLink.noOrderLabel': string;
|
|
12
12
|
'fabric.editor.headingLink.noneSortingLabel': string;
|
|
13
13
|
};
|
package/dist/types/i18n/da.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
'fabric.editor.codeBlockCopyButton.copiedToClipboard': string;
|
|
3
|
-
'fabric.editor.codeBlockCopyButton.copyToClipboard': string;
|
|
4
2
|
'fabric.editor.headingLink.ascOrderLabel': string;
|
|
5
3
|
'fabric.editor.headingLink.ascSortingLabel': string;
|
|
6
4
|
'fabric.editor.headingLink.copied': string;
|
|
7
5
|
'fabric.editor.headingLink.copyAnchorLink': string;
|
|
8
6
|
'fabric.editor.headingLink.copyAriaLabel': string;
|
|
9
7
|
'fabric.editor.headingLink.descOrderLabel': string;
|
|
8
|
+
'fabric.editor.headingLink.descSortingLabel': string;
|
|
10
9
|
'fabric.editor.headingLink.failedToCopy': string;
|
|
10
|
+
'fabric.editor.headingLink.invalidLabel': string;
|
|
11
11
|
'fabric.editor.headingLink.noOrderLabel': string;
|
|
12
12
|
'fabric.editor.headingLink.noneSortingLabel': string;
|
|
13
13
|
};
|
package/dist/types/i18n/de.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
'fabric.editor.codeBlockCopyButton.copiedToClipboard': string;
|
|
3
|
-
'fabric.editor.codeBlockCopyButton.copyToClipboard': string;
|
|
4
2
|
'fabric.editor.headingLink.ascOrderLabel': string;
|
|
5
3
|
'fabric.editor.headingLink.ascSortingLabel': string;
|
|
6
4
|
'fabric.editor.headingLink.copied': string;
|
|
7
5
|
'fabric.editor.headingLink.copyAnchorLink': string;
|
|
8
6
|
'fabric.editor.headingLink.copyAriaLabel': string;
|
|
9
7
|
'fabric.editor.headingLink.descOrderLabel': string;
|
|
8
|
+
'fabric.editor.headingLink.descSortingLabel': string;
|
|
10
9
|
'fabric.editor.headingLink.failedToCopy': string;
|
|
10
|
+
'fabric.editor.headingLink.invalidLabel': string;
|
|
11
11
|
'fabric.editor.headingLink.noOrderLabel': string;
|
|
12
12
|
'fabric.editor.headingLink.noneSortingLabel': string;
|
|
13
13
|
};
|
package/dist/types/i18n/en.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
'fabric.editor.codeBlockCopyButton.copiedToClipboard': string;
|
|
3
|
-
'fabric.editor.codeBlockCopyButton.copyToClipboard': string;
|
|
4
2
|
'fabric.editor.headingLink.ascOrderLabel': string;
|
|
5
3
|
'fabric.editor.headingLink.ascSortingLabel': string;
|
|
6
4
|
'fabric.editor.headingLink.copied': string;
|
|
7
5
|
'fabric.editor.headingLink.copyAnchorLink': string;
|
|
8
6
|
'fabric.editor.headingLink.copyAriaLabel': string;
|
|
9
7
|
'fabric.editor.headingLink.descOrderLabel': string;
|
|
8
|
+
'fabric.editor.headingLink.descSortingLabel': string;
|
|
10
9
|
'fabric.editor.headingLink.failedToCopy': string;
|
|
10
|
+
'fabric.editor.headingLink.invalidLabel': string;
|
|
11
11
|
'fabric.editor.headingLink.noOrderLabel': string;
|
|
12
12
|
'fabric.editor.headingLink.noneSortingLabel': string;
|
|
13
13
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
'fabric.editor.codeBlockCopyButton.copiedToClipboard': string;
|
|
3
|
-
'fabric.editor.codeBlockCopyButton.copyToClipboard': string;
|
|
4
2
|
'fabric.editor.headingLink.ascOrderLabel': string;
|
|
5
3
|
'fabric.editor.headingLink.ascSortingLabel': string;
|
|
6
4
|
'fabric.editor.headingLink.copied': string;
|
|
7
5
|
'fabric.editor.headingLink.copyAnchorLink': string;
|
|
8
6
|
'fabric.editor.headingLink.copyAriaLabel': string;
|
|
9
7
|
'fabric.editor.headingLink.descOrderLabel': string;
|
|
8
|
+
'fabric.editor.headingLink.descSortingLabel': string;
|
|
10
9
|
'fabric.editor.headingLink.failedToCopy': string;
|
|
10
|
+
'fabric.editor.headingLink.invalidLabel': string;
|
|
11
11
|
'fabric.editor.headingLink.noOrderLabel': string;
|
|
12
12
|
'fabric.editor.headingLink.noneSortingLabel': string;
|
|
13
13
|
};
|
package/dist/types/i18n/es.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
'fabric.editor.codeBlockCopyButton.copiedToClipboard': string;
|
|
3
|
-
'fabric.editor.codeBlockCopyButton.copyToClipboard': string;
|
|
4
2
|
'fabric.editor.headingLink.ascOrderLabel': string;
|
|
5
3
|
'fabric.editor.headingLink.ascSortingLabel': string;
|
|
6
4
|
'fabric.editor.headingLink.copied': string;
|
|
7
5
|
'fabric.editor.headingLink.copyAnchorLink': string;
|
|
8
6
|
'fabric.editor.headingLink.copyAriaLabel': string;
|
|
9
7
|
'fabric.editor.headingLink.descOrderLabel': string;
|
|
8
|
+
'fabric.editor.headingLink.descSortingLabel': string;
|
|
10
9
|
'fabric.editor.headingLink.failedToCopy': string;
|
|
10
|
+
'fabric.editor.headingLink.invalidLabel': string;
|
|
11
11
|
'fabric.editor.headingLink.noOrderLabel': string;
|
|
12
12
|
'fabric.editor.headingLink.noneSortingLabel': string;
|
|
13
13
|
};
|