@atlaskit/renderer 89.0.0 → 92.0.0
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 +28 -0
- package/dist/cjs/analytics/enums.js +1 -0
- package/dist/cjs/i18n/cs.js +9 -3
- package/dist/cjs/i18n/da.js +9 -3
- package/dist/cjs/i18n/de.js +9 -3
- package/dist/cjs/i18n/en_ZZ.js +28 -0
- package/dist/cjs/i18n/es.js +9 -3
- package/dist/cjs/i18n/fi.js +9 -3
- package/dist/cjs/i18n/fr.js +9 -3
- package/dist/cjs/i18n/hu.js +9 -3
- package/dist/cjs/i18n/it.js +9 -3
- package/dist/cjs/i18n/ja.js +9 -3
- package/dist/cjs/i18n/ko.js +9 -3
- package/dist/cjs/i18n/nb.js +9 -3
- package/dist/cjs/i18n/nl.js +9 -3
- package/dist/cjs/i18n/pl.js +2 -2
- package/dist/cjs/i18n/pt_BR.js +9 -3
- package/dist/cjs/i18n/ru.js +9 -3
- package/dist/cjs/i18n/sv.js +9 -3
- package/dist/cjs/i18n/th.js +9 -3
- package/dist/cjs/i18n/tr.js +9 -3
- package/dist/cjs/i18n/uk.js +9 -3
- package/dist/cjs/i18n/vi.js +9 -3
- package/dist/cjs/i18n/zh.js +9 -3
- package/dist/cjs/i18n/zh_TW.js +9 -3
- package/dist/cjs/react/nodes/codeBlock.js +17 -16
- package/dist/cjs/react/nodes/heading.js +4 -2
- package/dist/cjs/react/nodes/layoutColumn.js +7 -2
- package/dist/cjs/react/nodes/media.js +7 -6
- package/dist/cjs/react/nodes/table/sticky.js +13 -2
- package/dist/cjs/react/utils/inject-props.js +33 -0
- package/dist/cjs/ui/Expand.js +15 -11
- package/dist/cjs/ui/Renderer/index.js +44 -25
- package/dist/cjs/ui/Renderer/style.js +19 -7
- package/dist/cjs/ui/annotations/draft/component.js +22 -12
- package/dist/cjs/ui/annotations/element/mark.js +9 -5
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/analytics/enums.js +1 -0
- package/dist/es2019/i18n/cs.js +9 -3
- package/dist/es2019/i18n/da.js +9 -3
- package/dist/es2019/i18n/de.js +9 -3
- package/dist/es2019/i18n/en_ZZ.js +20 -0
- package/dist/es2019/i18n/es.js +9 -3
- package/dist/es2019/i18n/fi.js +9 -3
- package/dist/es2019/i18n/fr.js +9 -3
- package/dist/es2019/i18n/hu.js +9 -3
- package/dist/es2019/i18n/it.js +9 -3
- package/dist/es2019/i18n/ja.js +9 -3
- package/dist/es2019/i18n/ko.js +9 -3
- package/dist/es2019/i18n/nb.js +9 -3
- package/dist/es2019/i18n/nl.js +9 -3
- package/dist/es2019/i18n/pl.js +2 -2
- package/dist/es2019/i18n/pt_BR.js +9 -3
- package/dist/es2019/i18n/ru.js +9 -3
- package/dist/es2019/i18n/sv.js +9 -3
- package/dist/es2019/i18n/th.js +9 -3
- package/dist/es2019/i18n/tr.js +9 -3
- package/dist/es2019/i18n/uk.js +9 -3
- package/dist/es2019/i18n/vi.js +9 -3
- package/dist/es2019/i18n/zh.js +9 -3
- package/dist/es2019/i18n/zh_TW.js +9 -3
- package/dist/es2019/react/nodes/codeBlock.js +25 -23
- package/dist/es2019/react/nodes/heading.js +4 -2
- package/dist/es2019/react/nodes/layoutColumn.js +7 -3
- package/dist/es2019/react/nodes/media.js +9 -5
- package/dist/es2019/react/nodes/table/sticky.js +16 -5
- package/dist/es2019/react/utils/inject-props.js +24 -0
- package/dist/es2019/ui/Expand.js +17 -12
- package/dist/es2019/ui/Renderer/index.js +45 -25
- package/dist/es2019/ui/Renderer/style.js +40 -24
- package/dist/es2019/ui/annotations/draft/component.js +18 -12
- package/dist/es2019/ui/annotations/element/mark.js +12 -6
- package/dist/es2019/version.json +1 -1
- package/dist/esm/analytics/enums.js +1 -0
- package/dist/esm/i18n/cs.js +9 -3
- package/dist/esm/i18n/da.js +9 -3
- package/dist/esm/i18n/de.js +9 -3
- package/dist/esm/i18n/en_ZZ.js +20 -0
- package/dist/esm/i18n/es.js +9 -3
- package/dist/esm/i18n/fi.js +9 -3
- package/dist/esm/i18n/fr.js +9 -3
- package/dist/esm/i18n/hu.js +9 -3
- package/dist/esm/i18n/it.js +9 -3
- package/dist/esm/i18n/ja.js +9 -3
- package/dist/esm/i18n/ko.js +9 -3
- package/dist/esm/i18n/nb.js +9 -3
- package/dist/esm/i18n/nl.js +9 -3
- package/dist/esm/i18n/pl.js +2 -2
- package/dist/esm/i18n/pt_BR.js +9 -3
- package/dist/esm/i18n/ru.js +9 -3
- package/dist/esm/i18n/sv.js +9 -3
- package/dist/esm/i18n/th.js +9 -3
- package/dist/esm/i18n/tr.js +9 -3
- package/dist/esm/i18n/uk.js +9 -3
- package/dist/esm/i18n/vi.js +9 -3
- package/dist/esm/i18n/zh.js +9 -3
- package/dist/esm/i18n/zh_TW.js +9 -3
- package/dist/esm/react/nodes/codeBlock.js +18 -14
- package/dist/esm/react/nodes/heading.js +4 -2
- package/dist/esm/react/nodes/layoutColumn.js +7 -3
- package/dist/esm/react/nodes/media.js +8 -5
- package/dist/esm/react/nodes/table/sticky.js +12 -2
- package/dist/esm/react/utils/inject-props.js +24 -0
- package/dist/esm/ui/Expand.js +16 -12
- package/dist/esm/ui/Renderer/index.js +46 -25
- package/dist/esm/ui/Renderer/style.js +16 -8
- package/dist/esm/ui/annotations/draft/component.js +18 -11
- package/dist/esm/ui/annotations/element/mark.js +11 -4
- package/dist/esm/version.json +1 -1
- package/dist/types/analytics/enums.d.ts +1 -0
- package/dist/types/analytics/events.d.ts +6 -1
- package/dist/types/i18n/cs.d.ts +7 -1
- package/dist/types/i18n/da.d.ts +7 -1
- package/dist/types/i18n/de.d.ts +7 -1
- package/dist/types/i18n/en_ZZ.d.ts +20 -0
- package/dist/types/i18n/es.d.ts +7 -1
- package/dist/types/i18n/fi.d.ts +7 -1
- package/dist/types/i18n/fr.d.ts +7 -1
- package/dist/types/i18n/hu.d.ts +7 -1
- package/dist/types/i18n/it.d.ts +7 -1
- package/dist/types/i18n/ja.d.ts +7 -1
- package/dist/types/i18n/ko.d.ts +7 -1
- package/dist/types/i18n/nb.d.ts +7 -1
- package/dist/types/i18n/nl.d.ts +7 -1
- package/dist/types/i18n/pl.d.ts +1 -1
- package/dist/types/i18n/pt_BR.d.ts +7 -1
- package/dist/types/i18n/ru.d.ts +7 -1
- package/dist/types/i18n/sv.d.ts +7 -1
- package/dist/types/i18n/th.d.ts +7 -1
- package/dist/types/i18n/tr.d.ts +7 -1
- package/dist/types/i18n/uk.d.ts +7 -1
- package/dist/types/i18n/vi.d.ts +7 -1
- package/dist/types/i18n/zh.d.ts +7 -1
- package/dist/types/i18n/zh_TW.d.ts +7 -1
- package/dist/types/react/nodes/codeBlock.d.ts +4 -14
- package/dist/types/react/nodes/heading.d.ts +1 -0
- package/dist/types/react/nodes/index.d.ts +1 -13
- package/dist/types/react/nodes/layoutColumn.d.ts +3 -1
- package/dist/types/react/nodes/media.d.ts +3 -1
- package/dist/types/react/utils/inject-props.d.ts +6 -0
- package/dist/types/ui/Expand.d.ts +1 -0
- package/dist/types/ui/Renderer/index.d.ts +5 -3
- package/dist/types/ui/Renderer/style.d.ts +3 -1
- package/dist/types/ui/annotations/draft/component.d.ts +1 -0
- package/dist/types/ui/annotations/element/mark.d.ts +1 -0
- package/package.json +14 -13
package/dist/esm/i18n/sv.js
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* NOTE:
|
|
3
3
|
*
|
|
4
|
-
* This file is automatically generated by
|
|
4
|
+
* This file is automatically generated by Traduki 2.0.
|
|
5
5
|
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
6
|
*/
|
|
7
|
-
//
|
|
7
|
+
//Swedish
|
|
8
8
|
export default {
|
|
9
9
|
'fabric.editor.codeBlockCopyButton.copiedToClipboard': 'Kopierad!',
|
|
10
10
|
'fabric.editor.codeBlockCopyButton.copyToClipboard': 'Kopiera',
|
|
11
|
+
'fabric.editor.headingLink.ascOrderLabel': 'Sortera kolumn Ö till A',
|
|
12
|
+
'fabric.editor.headingLink.ascSortingLabel': 'stigande',
|
|
11
13
|
'fabric.editor.headingLink.copied': 'Kopierad!',
|
|
12
14
|
'fabric.editor.headingLink.copyAnchorLink': 'Kopiera länk till rubrik',
|
|
13
|
-
'fabric.editor.headingLink.
|
|
15
|
+
'fabric.editor.headingLink.copyAriaLabel': 'Kopiera',
|
|
16
|
+
'fabric.editor.headingLink.descOrderLabel': '⚠️ Du kan inte sortera en tabell med sammanslagna celler',
|
|
17
|
+
'fabric.editor.headingLink.failedToCopy': 'Kopiering misslyckades',
|
|
18
|
+
'fabric.editor.headingLink.noOrderLabel': 'Sortera kolumn A till Ö',
|
|
19
|
+
'fabric.editor.headingLink.noneSortingLabel': 'fallande'
|
|
14
20
|
};
|
package/dist/esm/i18n/th.js
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* NOTE:
|
|
3
3
|
*
|
|
4
|
-
* This file is automatically generated by
|
|
4
|
+
* This file is automatically generated by Traduki 2.0.
|
|
5
5
|
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
6
|
*/
|
|
7
|
-
//
|
|
7
|
+
//Thai (Thailand)
|
|
8
8
|
export default {
|
|
9
9
|
'fabric.editor.codeBlockCopyButton.copiedToClipboard': 'คัดลอกแล้ว!',
|
|
10
10
|
'fabric.editor.codeBlockCopyButton.copyToClipboard': 'คัดลอก',
|
|
11
|
+
'fabric.editor.headingLink.ascOrderLabel': 'เรียงจากคอลัมน์ Z ไป A',
|
|
12
|
+
'fabric.editor.headingLink.ascSortingLabel': 'จากน้อยไปหามาก',
|
|
11
13
|
'fabric.editor.headingLink.copied': 'คัดลอกแล้ว!',
|
|
12
14
|
'fabric.editor.headingLink.copyAnchorLink': 'คัดลอกลิงก์ที่เชื่อมไปยังหัวเรื่อง',
|
|
13
|
-
'fabric.editor.headingLink.
|
|
15
|
+
'fabric.editor.headingLink.copyAriaLabel': 'คัดลอก',
|
|
16
|
+
'fabric.editor.headingLink.descOrderLabel': '⚠️ คุณไม่สามารถจัดเรียงตารางด้วยช่องข้อมูลที่ถูกรวมได้',
|
|
17
|
+
'fabric.editor.headingLink.failedToCopy': 'การคัดลอกไม่สำเร็จ',
|
|
18
|
+
'fabric.editor.headingLink.noOrderLabel': 'เรียงจากคอลัมน์ A ไป Z',
|
|
19
|
+
'fabric.editor.headingLink.noneSortingLabel': 'จากมากไปหาน้อย'
|
|
14
20
|
};
|
package/dist/esm/i18n/tr.js
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* NOTE:
|
|
3
3
|
*
|
|
4
|
-
* This file is automatically generated by
|
|
4
|
+
* This file is automatically generated by Traduki 2.0.
|
|
5
5
|
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
6
|
*/
|
|
7
|
-
//
|
|
7
|
+
//Turkish (Turkey)
|
|
8
8
|
export default {
|
|
9
9
|
'fabric.editor.codeBlockCopyButton.copiedToClipboard': 'Kopyalandı!',
|
|
10
10
|
'fabric.editor.codeBlockCopyButton.copyToClipboard': 'Kopyala',
|
|
11
|
+
'fabric.editor.headingLink.ascOrderLabel': "Sütunu Z'den A'ya sırala",
|
|
12
|
+
'fabric.editor.headingLink.ascSortingLabel': 'artan',
|
|
11
13
|
'fabric.editor.headingLink.copied': 'Kopyalandı!',
|
|
12
14
|
'fabric.editor.headingLink.copyAnchorLink': 'Başlık bağlantısını kopyala',
|
|
13
|
-
'fabric.editor.headingLink.
|
|
15
|
+
'fabric.editor.headingLink.copyAriaLabel': 'Kopyala',
|
|
16
|
+
'fabric.editor.headingLink.descOrderLabel': '⚠️ Birleştirilmiş hücre içeren bir tabloyu sıralayamazsınız',
|
|
17
|
+
'fabric.editor.headingLink.failedToCopy': 'Kopyalama işlemi başarısız oldu',
|
|
18
|
+
'fabric.editor.headingLink.noOrderLabel': "Sütunu A'dan Z'ye sırala",
|
|
19
|
+
'fabric.editor.headingLink.noneSortingLabel': 'azalan'
|
|
14
20
|
};
|
package/dist/esm/i18n/uk.js
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* NOTE:
|
|
3
3
|
*
|
|
4
|
-
* This file is automatically generated by
|
|
4
|
+
* This file is automatically generated by Traduki 2.0.
|
|
5
5
|
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
6
|
*/
|
|
7
|
-
//
|
|
7
|
+
//Ukrainian (Ukraine)
|
|
8
8
|
export default {
|
|
9
9
|
'fabric.editor.codeBlockCopyButton.copiedToClipboard': 'Скопійовано',
|
|
10
10
|
'fabric.editor.codeBlockCopyButton.copyToClipboard': 'Скопіювати',
|
|
11
|
+
'fabric.editor.headingLink.ascOrderLabel': 'Сортувати стовпці від Я до А',
|
|
12
|
+
'fabric.editor.headingLink.ascSortingLabel': 'за зростанням',
|
|
11
13
|
'fabric.editor.headingLink.copied': 'Скопійовано',
|
|
12
14
|
'fabric.editor.headingLink.copyAnchorLink': 'Скопіювати посилання на заголовок',
|
|
13
|
-
'fabric.editor.headingLink.
|
|
15
|
+
'fabric.editor.headingLink.copyAriaLabel': 'Копіювати',
|
|
16
|
+
'fabric.editor.headingLink.descOrderLabel': '⚠️ Не можна сортувати таблицю, у якій є об’єднані клітинки',
|
|
17
|
+
'fabric.editor.headingLink.failedToCopy': 'Не вдалося скопіювати',
|
|
18
|
+
'fabric.editor.headingLink.noOrderLabel': 'Сортувати стовпці від А до Я',
|
|
19
|
+
'fabric.editor.headingLink.noneSortingLabel': 'за спаданням'
|
|
14
20
|
};
|
package/dist/esm/i18n/vi.js
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* NOTE:
|
|
3
3
|
*
|
|
4
|
-
* This file is automatically generated by
|
|
4
|
+
* This file is automatically generated by Traduki 2.0.
|
|
5
5
|
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
6
|
*/
|
|
7
|
-
//
|
|
7
|
+
//Vietnamese (Vietnam)
|
|
8
8
|
export default {
|
|
9
9
|
'fabric.editor.codeBlockCopyButton.copiedToClipboard': 'Đã sao chép!',
|
|
10
10
|
'fabric.editor.codeBlockCopyButton.copyToClipboard': 'Sao chép',
|
|
11
|
+
'fabric.editor.headingLink.ascOrderLabel': 'Sắp xếp cột theo thứ tự từ Z đến A',
|
|
12
|
+
'fabric.editor.headingLink.ascSortingLabel': 'tăng dần',
|
|
11
13
|
'fabric.editor.headingLink.copied': 'Đã sao chép!',
|
|
12
14
|
'fabric.editor.headingLink.copyAnchorLink': 'Sao chép liên kết vào tiêu đề',
|
|
13
|
-
'fabric.editor.headingLink.
|
|
15
|
+
'fabric.editor.headingLink.copyAriaLabel': 'Sao chép',
|
|
16
|
+
'fabric.editor.headingLink.descOrderLabel': '⚠️ Bạn không thể sắp xếp bảng có các ô đã hợp nhất',
|
|
17
|
+
'fabric.editor.headingLink.failedToCopy': 'Sao chép không thành công',
|
|
18
|
+
'fabric.editor.headingLink.noOrderLabel': 'Sắp xếp cột theo thứ tự từ A đến Z',
|
|
19
|
+
'fabric.editor.headingLink.noneSortingLabel': 'giảm dần'
|
|
14
20
|
};
|
package/dist/esm/i18n/zh.js
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* NOTE:
|
|
3
3
|
*
|
|
4
|
-
* This file is automatically generated by
|
|
4
|
+
* This file is automatically generated by Traduki 2.0.
|
|
5
5
|
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
6
|
*/
|
|
7
|
-
//
|
|
7
|
+
//Chinese (Simplified)
|
|
8
8
|
export default {
|
|
9
9
|
'fabric.editor.codeBlockCopyButton.copiedToClipboard': '已复制!',
|
|
10
10
|
'fabric.editor.codeBlockCopyButton.copyToClipboard': '复制',
|
|
11
|
+
'fabric.editor.headingLink.ascOrderLabel': '按照 Z 到 A 进行列排序',
|
|
12
|
+
'fabric.editor.headingLink.ascSortingLabel': '升序',
|
|
11
13
|
'fabric.editor.headingLink.copied': '已复制!',
|
|
12
14
|
'fabric.editor.headingLink.copyAnchorLink': '复制标题链接',
|
|
13
|
-
'fabric.editor.headingLink.
|
|
15
|
+
'fabric.editor.headingLink.copyAriaLabel': '复制',
|
|
16
|
+
'fabric.editor.headingLink.descOrderLabel': '⚠️ 无法对包含合并单元格的表格进行排序',
|
|
17
|
+
'fabric.editor.headingLink.failedToCopy': '复制失败',
|
|
18
|
+
'fabric.editor.headingLink.noOrderLabel': '按照 A 到 Z 进行列排序',
|
|
19
|
+
'fabric.editor.headingLink.noneSortingLabel': '降序'
|
|
14
20
|
};
|
package/dist/esm/i18n/zh_TW.js
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* NOTE:
|
|
3
3
|
*
|
|
4
|
-
* This file is automatically generated by
|
|
4
|
+
* This file is automatically generated by Traduki 2.0.
|
|
5
5
|
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
6
|
*/
|
|
7
|
-
//
|
|
7
|
+
//Chinese (Traditional)
|
|
8
8
|
export default {
|
|
9
9
|
'fabric.editor.codeBlockCopyButton.copiedToClipboard': '已複製!',
|
|
10
10
|
'fabric.editor.codeBlockCopyButton.copyToClipboard': '複製',
|
|
11
|
+
'fabric.editor.headingLink.ascOrderLabel': '從 Z 欄排序到 A 欄',
|
|
12
|
+
'fabric.editor.headingLink.ascSortingLabel': '遞增',
|
|
11
13
|
'fabric.editor.headingLink.copied': '已複製!',
|
|
12
14
|
'fabric.editor.headingLink.copyAnchorLink': '複製標題連結',
|
|
13
|
-
'fabric.editor.headingLink.
|
|
15
|
+
'fabric.editor.headingLink.copyAriaLabel': '複製',
|
|
16
|
+
'fabric.editor.headingLink.descOrderLabel': '⚠️ 您無法排序具有合併儲存格的表格',
|
|
17
|
+
'fabric.editor.headingLink.failedToCopy': '複製失敗',
|
|
18
|
+
'fabric.editor.headingLink.noOrderLabel': '從 A 欄排序到 Z 欄',
|
|
19
|
+
'fabric.editor.headingLink.noneSortingLabel': '遞減'
|
|
14
20
|
};
|
|
@@ -2,9 +2,9 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
|
|
3
3
|
var _templateObject;
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
/** @jsx jsx */
|
|
6
|
+
import { jsx, css } from '@emotion/react';
|
|
6
7
|
import { injectIntl } from 'react-intl-next';
|
|
7
|
-
import styled from 'styled-components';
|
|
8
8
|
import { CodeBlock as AkCodeBlock } from '@atlaskit/code';
|
|
9
9
|
import { overflowShadow, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
10
10
|
import { N20, DN50 } from '@atlaskit/theme/colors';
|
|
@@ -14,6 +14,16 @@ import { codeBidiWarningMessages } from '@atlaskit/editor-common/messages';
|
|
|
14
14
|
import { useFeatureFlags } from '../../use-feature-flags';
|
|
15
15
|
import CopyButton from './codeBlockCopyButton';
|
|
16
16
|
|
|
17
|
+
var codeBlockStyle = function codeBlockStyle(props) {
|
|
18
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n tab-size: 4;\n [data-ds--code--code-block] {\n font-size: ", ";\n line-height: 1.5rem;\n background-image: ", ";\n background-attachment: local, scroll, scroll;\n background-position: 100% 0, 100% 0, 0 0;\n\n "])), relativeFontSizeToBase16(fontSize()), overflowShadow({
|
|
19
|
+
background: themed({
|
|
20
|
+
light: N20,
|
|
21
|
+
dark: DN50
|
|
22
|
+
})(props),
|
|
23
|
+
width: "".concat(gridSize(), "px")
|
|
24
|
+
}));
|
|
25
|
+
};
|
|
26
|
+
|
|
17
27
|
function CodeBlock(props) {
|
|
18
28
|
var text = props.text,
|
|
19
29
|
language = props.language,
|
|
@@ -23,11 +33,12 @@ function CodeBlock(props) {
|
|
|
23
33
|
var featureFlags = useFeatureFlags();
|
|
24
34
|
var codeBidiWarningLabel = props.intl.formatMessage(codeBidiWarningMessages.label);
|
|
25
35
|
var className = ['code-block', props.className].join(' ');
|
|
26
|
-
return
|
|
27
|
-
className: className
|
|
28
|
-
|
|
36
|
+
return jsx("div", {
|
|
37
|
+
className: className,
|
|
38
|
+
css: codeBlockStyle
|
|
39
|
+
}, allowCopyToClipboard ? jsx(CopyButton, {
|
|
29
40
|
content: text
|
|
30
|
-
}) : null,
|
|
41
|
+
}) : null, jsx(AkCodeBlock, {
|
|
31
42
|
language: language,
|
|
32
43
|
text: text,
|
|
33
44
|
codeBidiWarnings: featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.codeBidiWarnings,
|
|
@@ -36,11 +47,4 @@ function CodeBlock(props) {
|
|
|
36
47
|
}));
|
|
37
48
|
}
|
|
38
49
|
|
|
39
|
-
|
|
40
|
-
export default styled(IntlCodeBlock)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n tab-size: 4;\n [data-ds--code--code-block] {\n font-size: ", ";\n line-height: 1.5rem;\n background-image: ", ";\n background-attachment: local, scroll, scroll;\n background-position: 100% 0, 100% 0, 0 0;\n }\n"])), relativeFontSizeToBase16(fontSize()), overflowShadow({
|
|
41
|
-
background: themed({
|
|
42
|
-
light: N20,
|
|
43
|
-
dark: DN50
|
|
44
|
-
}),
|
|
45
|
-
width: "".concat(gridSize(), "px")
|
|
46
|
-
}));
|
|
50
|
+
export default injectIntl(CodeBlock);
|
|
@@ -34,13 +34,15 @@ function Heading(props) {
|
|
|
34
34
|
var headingId = props.headingId,
|
|
35
35
|
dataAttributes = props.dataAttributes,
|
|
36
36
|
allowHeadingAnchorLinks = props.allowHeadingAnchorLinks,
|
|
37
|
-
marks = props.marks
|
|
37
|
+
marks = props.marks,
|
|
38
|
+
invisible = props.invisible;
|
|
38
39
|
var HX = "h".concat(props.level);
|
|
39
40
|
var showAnchorLink = !!props.showAnchorLink;
|
|
40
41
|
var isRightAligned = hasRightAlignmentMark(marks);
|
|
41
42
|
var enableNestedHeaderLinks = allowHeadingAnchorLinks && allowHeadingAnchorLinks.allowNestedHeaderLinks;
|
|
43
|
+
var headingIdToUse = invisible ? undefined : headingId;
|
|
42
44
|
return /*#__PURE__*/React.createElement(HX, _extends({
|
|
43
|
-
id:
|
|
45
|
+
id: headingIdToUse
|
|
44
46
|
}, dataAttributes), /*#__PURE__*/React.createElement(React.Fragment, null, showAnchorLink && isRightAligned ? WrapChildTextInSpan(props.children) : props.children, showAnchorLink && /*#__PURE__*/React.createElement(CopyTextConsumer, null, function (_ref) {
|
|
45
47
|
var copyTextToClipboard = _ref.copyTextToClipboard;
|
|
46
48
|
return headingId && /*#__PURE__*/React.createElement(AnalyticsContext.Consumer, null, function (_ref2) {
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import { WidthProvider, clearNextSiblingMarginTopStyle } from '@atlaskit/editor-common/ui';
|
|
3
5
|
export default function LayoutSection(props) {
|
|
4
|
-
return
|
|
6
|
+
return jsx("div", {
|
|
5
7
|
"data-layout-column": true,
|
|
6
8
|
"data-column-width": props.width,
|
|
7
9
|
style: {
|
|
8
10
|
flexBasis: "".concat(props.width, "%")
|
|
9
11
|
}
|
|
10
|
-
},
|
|
12
|
+
}, jsx(WidthProvider, null, jsx("div", {
|
|
13
|
+
css: clearNextSiblingMarginTopStyle
|
|
14
|
+
}), props.children));
|
|
11
15
|
}
|
|
@@ -11,10 +11,12 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
11
11
|
|
|
12
12
|
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; } }
|
|
13
13
|
|
|
14
|
+
/** @jsx jsx */
|
|
14
15
|
import React from 'react';
|
|
15
16
|
import { PureComponent } from 'react';
|
|
17
|
+
import { jsx } from '@emotion/react';
|
|
16
18
|
import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
17
|
-
import {
|
|
19
|
+
import { mediaLinkStyle } from '@atlaskit/editor-common/ui';
|
|
18
20
|
import { MediaCard } from '../../ui/MediaCard';
|
|
19
21
|
import { getEventHandler } from '../../utils';
|
|
20
22
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../../analytics/enums';
|
|
@@ -53,7 +55,7 @@ var Media = /*#__PURE__*/function (_PureComponent) {
|
|
|
53
55
|
var linkHref = linkMark === null || linkMark === void 0 ? void 0 : linkMark.attrs.href;
|
|
54
56
|
var eventHandlers = linkHref ? undefined : _this.props.eventHandlers;
|
|
55
57
|
var shouldOpenMediaViewer = !linkHref && allowMediaViewer;
|
|
56
|
-
var mediaComponent =
|
|
58
|
+
var mediaComponent = jsx(MediaCard, _extends({
|
|
57
59
|
mediaProvider: mediaProvider,
|
|
58
60
|
contextIdentifierProvider: contextIdentifierProvider
|
|
59
61
|
}, _this.props, {
|
|
@@ -64,11 +66,12 @@ var Media = /*#__PURE__*/function (_PureComponent) {
|
|
|
64
66
|
shouldEnableDownloadButton: enableDownloadButton,
|
|
65
67
|
ssr: ssr
|
|
66
68
|
}));
|
|
67
|
-
return linkHref ?
|
|
69
|
+
return linkHref ? jsx("a", {
|
|
68
70
|
href: linkHref,
|
|
69
71
|
rel: "noreferrer noopener",
|
|
70
72
|
onClick: _this.handleMediaLinkClick,
|
|
71
|
-
"data-block-link": linkHref
|
|
73
|
+
"data-block-link": linkHref,
|
|
74
|
+
css: mediaLinkStyle
|
|
72
75
|
}, mediaComponent) : mediaComponent;
|
|
73
76
|
});
|
|
74
77
|
|
|
@@ -115,7 +118,7 @@ var Media = /*#__PURE__*/function (_PureComponent) {
|
|
|
115
118
|
return this.renderCard();
|
|
116
119
|
}
|
|
117
120
|
|
|
118
|
-
return
|
|
121
|
+
return jsx(WithProviders, {
|
|
119
122
|
providers: ['mediaProvider', 'contextIdentifierProvider'],
|
|
120
123
|
providerFactory: providers,
|
|
121
124
|
renderNode: this.renderCard
|
|
@@ -12,6 +12,7 @@ import * as colors from '@atlaskit/theme/colors';
|
|
|
12
12
|
var N40A = colors.N40A;
|
|
13
13
|
import { findHorizontalOverflowScrollParent } from '../../../utils';
|
|
14
14
|
import { Table } from './table';
|
|
15
|
+
import { recursivelyInjectProps } from '../../utils/inject-props';
|
|
15
16
|
export var tableStickyPadding = 8;
|
|
16
17
|
// creates a new stacking context and places the div in the same
|
|
17
18
|
// position as the table
|
|
@@ -34,7 +35,7 @@ export var FixedTableDiv = styled.div.attrs({
|
|
|
34
35
|
width: wrapperWidth
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
|
-
})(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", ";\n ", ";\n ", ";\n\n z-index: ", ";\n\n
|
|
38
|
+
})(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", ";\n ", ";\n ", ";\n\n z-index: ", ";\n\n // Fix this when move we move this to use emotion\n &&&\n .", ",\n &&&\n .", "\n > table {\n margin-top: 0;\n margin-bottom: 0;\n }\n\n border-top: ", "px solid white;\n background: white;\n box-shadow: 0 6px 4px -4px ", ";\n\n div[data-expanded='false'] & {\n display: none;\n }\n\n &&&\n .", ".right-shadow::after,\n &&&\n .", ".left-shadow::before {\n top: 0px;\n height: 100%;\n }\n"])), function (props) {
|
|
38
39
|
return props.mode === 'stick' ? 'position: fixed' : '';
|
|
39
40
|
}, function (props) {
|
|
40
41
|
return props.mode === 'pin-bottom' ? 'position: absolute' : '';
|
|
@@ -82,7 +83,16 @@ export var StickyTable = function StickyTable(_ref3) {
|
|
|
82
83
|
isNumberColumnEnabled: isNumberColumnEnabled,
|
|
83
84
|
renderWidth: renderWidth,
|
|
84
85
|
allowDynamicTextSizing: allowDynamicTextSizing
|
|
85
|
-
},
|
|
86
|
+
},
|
|
87
|
+
/**
|
|
88
|
+
* @see https://product-fabric.atlassian.net/browse/ED-10235
|
|
89
|
+
* We pass prop 'invisible' to our table's children nodes meaning
|
|
90
|
+
* they exist inside of the 'invisible' duplicated table component that
|
|
91
|
+
* enables sticky headers.
|
|
92
|
+
*/
|
|
93
|
+
recursivelyInjectProps(children, {
|
|
94
|
+
invisible: true
|
|
95
|
+
}))))));
|
|
86
96
|
};
|
|
87
97
|
export var OverflowParent = /*#__PURE__*/function () {
|
|
88
98
|
function OverflowParent(ref) {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Helper function to recursively injects props to
|
|
4
|
+
* all valid children react nodes.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export function recursivelyInjectProps(children, propsToInject) {
|
|
8
|
+
return React.Children.toArray(children).map(function (child) {
|
|
9
|
+
// Cannot add a prop to an invalid element, so just return the child
|
|
10
|
+
if (! /*#__PURE__*/React.isValidElement(child)) {
|
|
11
|
+
return child;
|
|
12
|
+
} // Recursive call if child has nested children
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
if (child.props.children) {
|
|
16
|
+
child = /*#__PURE__*/React.cloneElement(child, {
|
|
17
|
+
children: recursivelyInjectProps(child.props.children, propsToInject)
|
|
18
|
+
});
|
|
19
|
+
} // Add props to react child node
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
return /*#__PURE__*/React.cloneElement(child, propsToInject);
|
|
23
|
+
});
|
|
24
|
+
}
|
package/dist/esm/ui/Expand.js
CHANGED
|
@@ -4,12 +4,14 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
4
4
|
|
|
5
5
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
6
6
|
|
|
7
|
+
/** @jsx jsx */
|
|
7
8
|
import React, { forwardRef, useRef, useCallback } from 'react';
|
|
9
|
+
import { jsx } from '@emotion/react';
|
|
8
10
|
import styled from 'styled-components';
|
|
9
11
|
import { gridSize, fontSize } from '@atlaskit/theme/constants';
|
|
10
12
|
import ChevronRightIcon from '@atlaskit/icon/glyph/chevron-right';
|
|
11
13
|
import Tooltip from '@atlaskit/tooltip';
|
|
12
|
-
import { expandMessages, sharedExpandStyles, WidthProvider, ExpandIconWrapper, ExpandLayoutWrapper,
|
|
14
|
+
import { expandMessages, sharedExpandStyles, WidthProvider, ExpandIconWrapper, ExpandLayoutWrapper, clearNextSiblingMarginTopStyle } from '@atlaskit/editor-common/ui';
|
|
13
15
|
import { akEditorLineHeight, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
14
16
|
import { PLATFORM, MODE } from '../analytics/events';
|
|
15
17
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics/enums';
|
|
@@ -29,7 +31,7 @@ var ContentContainer = styled.div(_templateObject4 || (_templateObject4 = _tagge
|
|
|
29
31
|
});
|
|
30
32
|
var ExpandLayoutWrapperWithRef = /*#__PURE__*/forwardRef(function WithRef(props, ref) {
|
|
31
33
|
// @ts-ignore: incorrect innerRef typing
|
|
32
|
-
return
|
|
34
|
+
return jsx(ExpandLayoutWrapper, _extends({}, props, {
|
|
33
35
|
innerRef: ref
|
|
34
36
|
}));
|
|
35
37
|
});
|
|
@@ -80,18 +82,18 @@ function Expand(_ref) {
|
|
|
80
82
|
var handleBlur = useCallback(function () {
|
|
81
83
|
return setFocused(false);
|
|
82
84
|
}, []);
|
|
83
|
-
return
|
|
85
|
+
return jsx(Container, {
|
|
84
86
|
"data-node-type": nodeType,
|
|
85
87
|
"data-title": title,
|
|
86
88
|
"data-expanded": expanded,
|
|
87
89
|
expanded: expanded,
|
|
88
90
|
focused: focused
|
|
89
|
-
}, nestedHeaderIds && nestedHeaderIds.length > 0 ?
|
|
91
|
+
}, nestedHeaderIds && nestedHeaderIds.length > 0 ? jsx(ActiveHeaderIdConsumer, {
|
|
90
92
|
nestedHeaderIds: nestedHeaderIds,
|
|
91
93
|
onNestedHeaderIdMatch: function onNestedHeaderIdMatch() {
|
|
92
94
|
return setExpanded(true);
|
|
93
95
|
}
|
|
94
|
-
}) : null,
|
|
96
|
+
}) : null, jsx(TitleContainer, {
|
|
95
97
|
onClick: function onClick(e) {
|
|
96
98
|
e.stopPropagation();
|
|
97
99
|
fireExpandToggleAnalytics(nodeType, expanded, fireAnalyticsEvent);
|
|
@@ -106,21 +108,23 @@ function Expand(_ref) {
|
|
|
106
108
|
"aria-expanded": expanded,
|
|
107
109
|
contentEditable: false,
|
|
108
110
|
expanded: expanded
|
|
109
|
-
},
|
|
111
|
+
}, jsx(Tooltip, {
|
|
110
112
|
content: label,
|
|
111
113
|
position: "top",
|
|
112
114
|
tag: ExpandLayoutWrapperWithRef
|
|
113
|
-
},
|
|
115
|
+
}, jsx(ExpandIconWrapper, {
|
|
114
116
|
expanded: expanded
|
|
115
|
-
},
|
|
117
|
+
}, jsx(ChevronRightIcon, {
|
|
116
118
|
label: label
|
|
117
|
-
}))),
|
|
119
|
+
}))), jsx(Title, {
|
|
118
120
|
id: id
|
|
119
|
-
}, title || intl.formatMessage(expandMessages.expandDefaultTitle))),
|
|
121
|
+
}, title || intl.formatMessage(expandMessages.expandDefaultTitle))), jsx(ContentContainer, {
|
|
120
122
|
expanded: expanded
|
|
121
|
-
},
|
|
123
|
+
}, jsx("div", {
|
|
122
124
|
className: "".concat(nodeType, "-content-wrapper")
|
|
123
|
-
},
|
|
125
|
+
}, jsx(WidthProvider, null, jsx("div", {
|
|
126
|
+
css: clearNextSiblingMarginTopStyle
|
|
127
|
+
}), children))));
|
|
124
128
|
}
|
|
125
129
|
|
|
126
130
|
export default injectIntl(Expand);
|