@atlaskit/editor-common 76.34.0 → 76.36.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 +53 -1
- package/dist/cjs/collab/index.js +27 -2
- package/dist/cjs/core-utils/document-logger.js +171 -0
- package/dist/cjs/core-utils/index.js +8 -1
- package/dist/cjs/extensibility/Extension/Extension/index.js +151 -0
- package/dist/cjs/extensibility/Extension/Extension/styles.js +17 -0
- package/dist/cjs/extensibility/Extension/InlineExtension/index.js +50 -0
- package/dist/cjs/extensibility/Extension/InlineExtension/styles.js +12 -0
- package/dist/cjs/extensibility/Extension/Lozenge.js +95 -0
- package/dist/cjs/extensibility/Extension/styles.js +30 -0
- package/dist/cjs/extensibility/Extension.js +79 -0
- package/dist/cjs/extensibility/ExtensionComponent.js +252 -0
- package/dist/cjs/extensibility/ExtensionNodeWrapper.js +21 -0
- package/dist/cjs/extensibility/MultiBodiedExtension/index.js +264 -0
- package/dist/cjs/extensibility/extensionNodeView.js +91 -0
- package/dist/cjs/extensibility/index.js +42 -0
- package/dist/cjs/extensibility/types.js +5 -0
- package/dist/cjs/i18n/cs.js +5 -2
- package/dist/cjs/i18n/da.js +5 -2
- package/dist/cjs/i18n/de.js +5 -2
- package/dist/cjs/i18n/en.js +7 -1
- package/dist/cjs/i18n/en_GB.js +8 -2
- package/dist/cjs/i18n/en_ZZ.js +8 -2
- package/dist/cjs/i18n/es.js +5 -2
- package/dist/cjs/i18n/fi.js +5 -2
- package/dist/cjs/i18n/fr.js +5 -2
- package/dist/cjs/i18n/hu.js +5 -2
- package/dist/cjs/i18n/it.js +5 -2
- package/dist/cjs/i18n/ja.js +1 -2
- package/dist/cjs/i18n/ko.js +5 -2
- package/dist/cjs/i18n/nb.js +1 -2
- package/dist/cjs/i18n/nl.js +5 -2
- package/dist/cjs/i18n/pl.js +5 -2
- package/dist/cjs/i18n/pt_BR.js +5 -2
- package/dist/cjs/i18n/ru.js +5 -2
- package/dist/cjs/i18n/sv.js +5 -2
- package/dist/cjs/i18n/th.js +5 -2
- package/dist/cjs/i18n/tr.js +5 -2
- package/dist/cjs/i18n/uk.js +5 -2
- package/dist/cjs/i18n/vi.js +5 -2
- package/dist/cjs/i18n/zh.js +5 -2
- package/dist/cjs/i18n/zh_TW.js +5 -2
- package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -1
- package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/index.js +1 -2
- package/dist/cjs/monitoring/error.js +3 -2
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/collab/index.js +54 -1
- package/dist/es2019/core-utils/document-logger.js +161 -0
- package/dist/es2019/core-utils/index.js +2 -1
- package/dist/es2019/extensibility/Extension/Extension/index.js +155 -0
- package/dist/es2019/extensibility/Extension/Extension/styles.js +42 -0
- package/dist/es2019/extensibility/Extension/InlineExtension/index.js +26 -0
- package/dist/es2019/extensibility/Extension/InlineExtension/styles.js +26 -0
- package/dist/es2019/extensibility/Extension/Lozenge.js +71 -0
- package/dist/es2019/extensibility/Extension/styles.js +62 -0
- package/dist/es2019/extensibility/Extension.js +52 -0
- package/dist/es2019/extensibility/ExtensionComponent.js +204 -0
- package/dist/es2019/extensibility/ExtensionNodeWrapper.js +13 -0
- package/dist/es2019/extensibility/MultiBodiedExtension/index.js +283 -0
- package/dist/es2019/extensibility/extensionNodeView.js +62 -0
- package/dist/es2019/extensibility/index.js +4 -0
- package/dist/es2019/extensibility/types.js +1 -0
- package/dist/es2019/i18n/cs.js +5 -2
- package/dist/es2019/i18n/da.js +5 -2
- package/dist/es2019/i18n/de.js +5 -2
- package/dist/es2019/i18n/en.js +7 -1
- package/dist/es2019/i18n/en_GB.js +8 -2
- package/dist/es2019/i18n/en_ZZ.js +8 -2
- package/dist/es2019/i18n/es.js +5 -2
- package/dist/es2019/i18n/fi.js +5 -2
- package/dist/es2019/i18n/fr.js +5 -2
- package/dist/es2019/i18n/hu.js +5 -2
- package/dist/es2019/i18n/it.js +5 -2
- package/dist/es2019/i18n/ja.js +1 -2
- package/dist/es2019/i18n/ko.js +5 -2
- package/dist/es2019/i18n/nb.js +1 -2
- package/dist/es2019/i18n/nl.js +5 -2
- package/dist/es2019/i18n/pl.js +5 -2
- package/dist/es2019/i18n/pt_BR.js +5 -2
- package/dist/es2019/i18n/ru.js +5 -2
- package/dist/es2019/i18n/sv.js +5 -2
- package/dist/es2019/i18n/th.js +5 -2
- package/dist/es2019/i18n/tr.js +5 -2
- package/dist/es2019/i18n/uk.js +5 -2
- package/dist/es2019/i18n/vi.js +5 -2
- package/dist/es2019/i18n/zh.js +5 -2
- package/dist/es2019/i18n/zh_TW.js +5 -2
- package/dist/es2019/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -1
- package/dist/es2019/link/LinkPicker/HyperlinkAddToolbar/index.js +1 -4
- package/dist/es2019/monitoring/error.js +3 -2
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/collab/index.js +23 -1
- package/dist/esm/core-utils/document-logger.js +165 -0
- package/dist/esm/core-utils/index.js +2 -1
- package/dist/esm/extensibility/Extension/Extension/index.js +146 -0
- package/dist/esm/extensibility/Extension/Extension/styles.js +10 -0
- package/dist/esm/extensibility/Extension/InlineExtension/index.js +43 -0
- package/dist/esm/extensibility/Extension/InlineExtension/styles.js +5 -0
- package/dist/esm/extensibility/Extension/Lozenge.js +90 -0
- package/dist/esm/extensibility/Extension/styles.js +11 -0
- package/dist/esm/extensibility/Extension.js +69 -0
- package/dist/esm/extensibility/ExtensionComponent.js +243 -0
- package/dist/esm/extensibility/ExtensionNodeWrapper.js +14 -0
- package/dist/esm/extensibility/MultiBodiedExtension/index.js +257 -0
- package/dist/esm/extensibility/extensionNodeView.js +83 -0
- package/dist/esm/extensibility/index.js +4 -0
- package/dist/esm/extensibility/types.js +1 -0
- package/dist/esm/i18n/cs.js +5 -2
- package/dist/esm/i18n/da.js +5 -2
- package/dist/esm/i18n/de.js +5 -2
- package/dist/esm/i18n/en.js +7 -1
- package/dist/esm/i18n/en_GB.js +8 -2
- package/dist/esm/i18n/en_ZZ.js +8 -2
- package/dist/esm/i18n/es.js +5 -2
- package/dist/esm/i18n/fi.js +5 -2
- package/dist/esm/i18n/fr.js +5 -2
- package/dist/esm/i18n/hu.js +5 -2
- package/dist/esm/i18n/it.js +5 -2
- package/dist/esm/i18n/ja.js +1 -2
- package/dist/esm/i18n/ko.js +5 -2
- package/dist/esm/i18n/nb.js +1 -2
- package/dist/esm/i18n/nl.js +5 -2
- package/dist/esm/i18n/pl.js +5 -2
- package/dist/esm/i18n/pt_BR.js +5 -2
- package/dist/esm/i18n/ru.js +5 -2
- package/dist/esm/i18n/sv.js +5 -2
- package/dist/esm/i18n/th.js +5 -2
- package/dist/esm/i18n/tr.js +5 -2
- package/dist/esm/i18n/uk.js +5 -2
- package/dist/esm/i18n/vi.js +5 -2
- package/dist/esm/i18n/zh.js +5 -2
- package/dist/esm/i18n/zh_TW.js +5 -2
- package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -1
- package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/index.js +1 -2
- package/dist/esm/monitoring/error.js +3 -2
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/collab/index.d.ts +7 -0
- package/dist/types/core-utils/document-logger.d.ts +6 -0
- package/dist/types/core-utils/index.d.ts +1 -0
- package/dist/types/extensibility/Extension/Extension/index.d.ts +108 -0
- package/dist/types/extensibility/Extension/Extension/styles.d.ts +5 -0
- package/dist/types/extensibility/Extension/InlineExtension/index.d.ts +12 -0
- package/dist/types/extensibility/Extension/InlineExtension/styles.d.ts +1 -0
- package/dist/types/extensibility/Extension/Lozenge.d.ts +14 -0
- package/dist/types/extensibility/Extension/styles.d.ts +7 -0
- package/dist/types/extensibility/Extension.d.ts +29 -0
- package/dist/types/extensibility/ExtensionComponent.d.ts +53 -0
- package/dist/types/extensibility/ExtensionNodeWrapper.d.ts +14 -0
- package/dist/types/extensibility/MultiBodiedExtension/index.d.ts +26 -0
- package/dist/types/extensibility/extensionNodeView.d.ts +31 -0
- package/dist/types/extensibility/index.d.ts +4 -0
- package/dist/types/extensibility/types.d.ts +6 -0
- package/dist/types/i18n/cs.d.ts +5 -2
- package/dist/types/i18n/da.d.ts +5 -2
- package/dist/types/i18n/de.d.ts +5 -2
- package/dist/types/i18n/en.d.ts +7 -1
- package/dist/types/i18n/en_GB.d.ts +7 -1
- package/dist/types/i18n/en_ZZ.d.ts +7 -1
- package/dist/types/i18n/es.d.ts +5 -2
- package/dist/types/i18n/fi.d.ts +5 -2
- package/dist/types/i18n/fr.d.ts +5 -2
- package/dist/types/i18n/hu.d.ts +5 -2
- package/dist/types/i18n/it.d.ts +5 -2
- package/dist/types/i18n/ja.d.ts +1 -2
- package/dist/types/i18n/ko.d.ts +5 -2
- package/dist/types/i18n/nb.d.ts +1 -2
- package/dist/types/i18n/nl.d.ts +5 -2
- package/dist/types/i18n/pl.d.ts +5 -2
- package/dist/types/i18n/pt_BR.d.ts +5 -2
- package/dist/types/i18n/ru.d.ts +5 -2
- package/dist/types/i18n/sv.d.ts +5 -2
- package/dist/types/i18n/th.d.ts +5 -2
- package/dist/types/i18n/tr.d.ts +5 -2
- package/dist/types/i18n/uk.d.ts +5 -2
- package/dist/types/i18n/vi.d.ts +5 -2
- package/dist/types/i18n/zh.d.ts +5 -2
- package/dist/types/i18n/zh_TW.d.ts +5 -2
- package/dist/types/link/LinkPicker/HyperlinkAddToolbar/index.d.ts +7 -7
- package/dist/types/types/floating-toolbar.d.ts +1 -1
- package/dist/types/types/hyperlink.d.ts +1 -0
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types/types/next-editor-plugin.d.ts +0 -1
- package/dist/types/ui/DropList/index.d.ts +1 -1
- package/dist/types/ui/OverflowShadow/index.d.ts +1 -1
- package/dist/types/ui/with-outer-listeners.d.ts +2 -2
- package/dist/types/ui-menu/ColorPickerButton/index.d.ts +1 -1
- package/dist/types/ui-menu/ToolbarButton/index.d.ts +1 -1
- package/dist/types/ui-react/with-react-editor-view-outer-listeners.d.ts +2 -2
- package/dist/types-ts4.5/collab/index.d.ts +7 -0
- package/dist/types-ts4.5/core-utils/document-logger.d.ts +6 -0
- package/dist/types-ts4.5/core-utils/index.d.ts +1 -0
- package/dist/types-ts4.5/extensibility/Extension/Extension/index.d.ts +108 -0
- package/dist/types-ts4.5/extensibility/Extension/Extension/styles.d.ts +5 -0
- package/dist/types-ts4.5/extensibility/Extension/InlineExtension/index.d.ts +12 -0
- package/dist/types-ts4.5/extensibility/Extension/InlineExtension/styles.d.ts +1 -0
- package/dist/types-ts4.5/extensibility/Extension/Lozenge.d.ts +14 -0
- package/dist/types-ts4.5/extensibility/Extension/styles.d.ts +7 -0
- package/dist/types-ts4.5/extensibility/Extension.d.ts +29 -0
- package/dist/types-ts4.5/extensibility/ExtensionComponent.d.ts +53 -0
- package/dist/types-ts4.5/extensibility/ExtensionNodeWrapper.d.ts +14 -0
- package/dist/types-ts4.5/extensibility/MultiBodiedExtension/index.d.ts +26 -0
- package/dist/types-ts4.5/extensibility/extensionNodeView.d.ts +31 -0
- package/dist/types-ts4.5/extensibility/index.d.ts +4 -0
- package/dist/types-ts4.5/extensibility/types.d.ts +8 -0
- package/dist/types-ts4.5/i18n/cs.d.ts +5 -2
- package/dist/types-ts4.5/i18n/da.d.ts +5 -2
- package/dist/types-ts4.5/i18n/de.d.ts +5 -2
- package/dist/types-ts4.5/i18n/en.d.ts +7 -1
- package/dist/types-ts4.5/i18n/en_GB.d.ts +7 -1
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +7 -1
- package/dist/types-ts4.5/i18n/es.d.ts +5 -2
- package/dist/types-ts4.5/i18n/fi.d.ts +5 -2
- package/dist/types-ts4.5/i18n/fr.d.ts +5 -2
- package/dist/types-ts4.5/i18n/hu.d.ts +5 -2
- package/dist/types-ts4.5/i18n/it.d.ts +5 -2
- package/dist/types-ts4.5/i18n/ja.d.ts +1 -2
- package/dist/types-ts4.5/i18n/ko.d.ts +5 -2
- package/dist/types-ts4.5/i18n/nb.d.ts +1 -2
- package/dist/types-ts4.5/i18n/nl.d.ts +5 -2
- package/dist/types-ts4.5/i18n/pl.d.ts +5 -2
- package/dist/types-ts4.5/i18n/pt_BR.d.ts +5 -2
- package/dist/types-ts4.5/i18n/ru.d.ts +5 -2
- package/dist/types-ts4.5/i18n/sv.d.ts +5 -2
- package/dist/types-ts4.5/i18n/th.d.ts +5 -2
- package/dist/types-ts4.5/i18n/tr.d.ts +5 -2
- package/dist/types-ts4.5/i18n/uk.d.ts +5 -2
- package/dist/types-ts4.5/i18n/vi.d.ts +5 -2
- package/dist/types-ts4.5/i18n/zh.d.ts +5 -2
- package/dist/types-ts4.5/i18n/zh_TW.d.ts +5 -2
- package/dist/types-ts4.5/link/LinkPicker/HyperlinkAddToolbar/index.d.ts +7 -7
- package/dist/types-ts4.5/types/floating-toolbar.d.ts +1 -1
- package/dist/types-ts4.5/types/hyperlink.d.ts +1 -0
- package/dist/types-ts4.5/types/index.d.ts +1 -1
- package/dist/types-ts4.5/types/next-editor-plugin.d.ts +0 -3
- package/dist/types-ts4.5/ui/DropList/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/OverflowShadow/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/with-outer-listeners.d.ts +2 -2
- package/dist/types-ts4.5/ui-menu/ColorPickerButton/index.d.ts +1 -1
- package/dist/types-ts4.5/ui-menu/ToolbarButton/index.d.ts +1 -1
- package/dist/types-ts4.5/ui-react/with-react-editor-view-outer-listeners.d.ts +2 -2
- package/extensibility/package.json +15 -0
- package/package.json +8 -7
package/dist/es2019/i18n/tr.js
CHANGED
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
export default {
|
|
10
10
|
'fabric.editor.action': 'Yapılacaklar listesi',
|
|
11
11
|
'fabric.editor.action.description': 'Yapılacaklar listesi oluşturun ve atayın',
|
|
12
|
+
'fabric.editor.addColumn': 'Sağa sütun ekle',
|
|
12
13
|
'fabric.editor.addMediaFiles': 'Görsel, video ya da dosya ekle',
|
|
14
|
+
'fabric.editor.addRow': 'Aşağıya satır ekle',
|
|
13
15
|
'fabric.editor.alignCenter': 'Ortaya hizala',
|
|
14
16
|
'fabric.editor.alignImageCenter': 'Ortaya hizala',
|
|
15
17
|
'fabric.editor.alignImageLeft': 'Sola hizala',
|
|
@@ -17,6 +19,7 @@ export default {
|
|
|
17
19
|
'fabric.editor.alignLeft': 'Sola hizala',
|
|
18
20
|
'fabric.editor.alignRight': 'Sağa hizala',
|
|
19
21
|
'fabric.editor.annotationToolbar': 'Not ekleme araç çubuğu',
|
|
22
|
+
'fabric.editor.backgroundColor': 'Arkaplan Rengi',
|
|
20
23
|
'fabric.editor.blockCardUnavailable': 'Satır içi bağlantı {node} düğümündedir ve görüntüsü değiştirilemez',
|
|
21
24
|
'fabric.editor.blockDescription': 'Bağlantı hakkında özet ve işlemler de dahil olmak üzere daha fazla bilgi gösterir',
|
|
22
25
|
'fabric.editor.blockTitle': 'Kart',
|
|
@@ -138,7 +141,6 @@ export default {
|
|
|
138
141
|
'fabric.editor.infoPanel': 'Bilgi panosu',
|
|
139
142
|
'fabric.editor.infoPanel.description': 'Renkli bir panoda bilgileri vurgulayın',
|
|
140
143
|
'fabric.editor.inlineDescription': 'Bağlantıyı satır içi metin olarak gösterir',
|
|
141
|
-
'fabric.editor.inlineOverlay': 'Görünümü değiştir',
|
|
142
144
|
'fabric.editor.inlineTitle': 'Satır içi',
|
|
143
145
|
'fabric.editor.insertColumn': 'Sağa sütun ekle',
|
|
144
146
|
'fabric.editor.insertColumnDrag': 'Sütun ekle',
|
|
@@ -211,7 +213,8 @@ export default {
|
|
|
211
213
|
'fabric.editor.table': 'Tablo',
|
|
212
214
|
'fabric.editor.table.description': 'Tablo ekleyin',
|
|
213
215
|
'fabric.editor.tableOptions': 'Tablo seçenekleri',
|
|
214
|
-
'fabric.editor.
|
|
216
|
+
'fabric.editor.tableResizeDecreaseScreenReaderInformation': '{newWidth, plural, one {Tablo genişliği {newWidth,number} piksele düşürüldü.} other {Tablo genişliği {newWidth,number} piksele düşürüldü.}}',
|
|
217
|
+
'fabric.editor.tableResizeIncreaseScreenReaderInformation': '{newWidth, plural, one {Tablo genişliği {newWidth,number} piksele artırıldı.} other {Tablo genişliği {newWidth,number} piksele artırıldı.}}',
|
|
215
218
|
'fabric.editor.tables.adjustColumn': 'Sütunu ayarla',
|
|
216
219
|
'fabric.editor.tables.confirmDeleteLinkedModalMessage': '{nodeName} düğümünün silinmesi, bu düğüme bağlı her şeyin bozulmasına neden olur.',
|
|
217
220
|
'fabric.editor.tables.confirmDeleteLinkedModalOKButton': 'Sil',
|
package/dist/es2019/i18n/uk.js
CHANGED
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
export default {
|
|
10
10
|
'fabric.editor.action': 'Задача',
|
|
11
11
|
'fabric.editor.action.description': 'Створити та призначити задачу',
|
|
12
|
+
'fabric.editor.addColumn': 'Додати стовпець справа',
|
|
12
13
|
'fabric.editor.addMediaFiles': 'Додати зображення, відео або файл',
|
|
14
|
+
'fabric.editor.addRow': 'Додати рядок знизу',
|
|
13
15
|
'fabric.editor.alignCenter': 'Вирівнювання по центру',
|
|
14
16
|
'fabric.editor.alignImageCenter': 'Вирівнювання по центру',
|
|
15
17
|
'fabric.editor.alignImageLeft': 'Вирівнювання по лівому краю',
|
|
@@ -17,6 +19,7 @@ export default {
|
|
|
17
19
|
'fabric.editor.alignLeft': 'Вирівнювання по лівому краю',
|
|
18
20
|
'fabric.editor.alignRight': 'Вирівнювання по правому краю',
|
|
19
21
|
'fabric.editor.annotationToolbar': 'Панель приміток',
|
|
22
|
+
'fabric.editor.backgroundColor': 'Колір фону',
|
|
20
23
|
'fabric.editor.blockCardUnavailable': 'Вбудоване посилання знаходиться у вузлі {node}, тому змінити подання не можна',
|
|
21
24
|
'fabric.editor.blockDescription': 'Показати більше інформації про посилання, у тому числі зведені дані й дії',
|
|
22
25
|
'fabric.editor.blockTitle': 'Картка',
|
|
@@ -138,7 +141,6 @@ export default {
|
|
|
138
141
|
'fabric.editor.infoPanel': 'Панель з інформацією',
|
|
139
142
|
'fabric.editor.infoPanel.description': 'Панель із виділеною кольорами інформацією',
|
|
140
143
|
'fabric.editor.inlineDescription': 'Показати посилання як вбудований текст',
|
|
141
|
-
'fabric.editor.inlineOverlay': 'Змінити подання',
|
|
142
144
|
'fabric.editor.inlineTitle': 'У рядку',
|
|
143
145
|
'fabric.editor.insertColumn': 'Вставити стовпець справа',
|
|
144
146
|
'fabric.editor.insertColumnDrag': 'Вставити стовпець',
|
|
@@ -211,7 +213,8 @@ export default {
|
|
|
211
213
|
'fabric.editor.table': 'Таблиця',
|
|
212
214
|
'fabric.editor.table.description': 'Вставити таблицю',
|
|
213
215
|
'fabric.editor.tableOptions': 'Параметри таблиці',
|
|
214
|
-
'fabric.editor.
|
|
216
|
+
'fabric.editor.tableResizeDecreaseScreenReaderInformation': '{newWidth, plural, one {Ширину таблиці зменшено до {newWidth,number} пікселя.} few {Ширину таблиці зменшено до {newWidth,number} пікселів.} many {Ширину таблиці зменшено до {newWidth,number} пікселів.} other {Ширину таблиці зменшено до {newWidth,number} пікселів.}}',
|
|
217
|
+
'fabric.editor.tableResizeIncreaseScreenReaderInformation': '{newWidth, plural, one {Ширину таблиці збільшено до {newWidth,number} пікселя.} few {Ширину таблиці збільшено до {newWidth,number} пікселів.} many {Ширину таблиці збільшено до {newWidth,number} пікселів.} other {Ширину таблиці збільшено до {newWidth,number} пікселів.}}',
|
|
215
218
|
'fabric.editor.tables.adjustColumn': 'Налаштувати стовпець',
|
|
216
219
|
'fabric.editor.tables.confirmDeleteLinkedModalMessage': 'Видалення розширення {nodeName} порушить роботу всього, що з ним пов’язано.',
|
|
217
220
|
'fabric.editor.tables.confirmDeleteLinkedModalOKButton': 'Видалити',
|
package/dist/es2019/i18n/vi.js
CHANGED
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
export default {
|
|
10
10
|
'fabric.editor.action': 'Mục thao tác',
|
|
11
11
|
'fabric.editor.action.description': 'Tạo và chỉ định các mục thao tác',
|
|
12
|
+
'fabric.editor.addColumn': 'Thêm cột bên phải',
|
|
12
13
|
'fabric.editor.addMediaFiles': 'Thêm ảnh, video hoặc tệp',
|
|
14
|
+
'fabric.editor.addRow': 'Thêm dòng bên dưới',
|
|
13
15
|
'fabric.editor.alignCenter': 'Căn giữa',
|
|
14
16
|
'fabric.editor.alignImageCenter': 'Căn giữa',
|
|
15
17
|
'fabric.editor.alignImageLeft': 'Căn trái',
|
|
@@ -17,6 +19,7 @@ export default {
|
|
|
17
19
|
'fabric.editor.alignLeft': 'Căn trái',
|
|
18
20
|
'fabric.editor.alignRight': 'Căn phải',
|
|
19
21
|
'fabric.editor.annotationToolbar': 'Thanh công cụ chú thích',
|
|
22
|
+
'fabric.editor.backgroundColor': 'Màu nền',
|
|
20
23
|
'fabric.editor.blockCardUnavailable': 'Liên kết nội tuyến nằm trong {node} và không thể thay đổi chế độ xem liên kết',
|
|
21
24
|
'fabric.editor.blockDescription': 'Hiển thị thêm thông tin về liên kết, bao gồm bản tóm tắt và các thao tác',
|
|
22
25
|
'fabric.editor.blockTitle': 'Thẻ',
|
|
@@ -138,7 +141,6 @@ export default {
|
|
|
138
141
|
'fabric.editor.infoPanel': 'Ô thông tin',
|
|
139
142
|
'fabric.editor.infoPanel.description': 'Bôi đậm thông tin bằng ô màu',
|
|
140
143
|
'fabric.editor.inlineDescription': 'Hiển thị liên kết dưới dạng văn bản nội tuyến',
|
|
141
|
-
'fabric.editor.inlineOverlay': 'Thay đổi trình xem',
|
|
142
144
|
'fabric.editor.inlineTitle': 'Nội tuyến',
|
|
143
145
|
'fabric.editor.insertColumn': 'Chèn cột vào bên phải',
|
|
144
146
|
'fabric.editor.insertColumnDrag': 'Chèn cột',
|
|
@@ -211,7 +213,8 @@ export default {
|
|
|
211
213
|
'fabric.editor.table': 'Bảng',
|
|
212
214
|
'fabric.editor.table.description': 'Chèn bảng',
|
|
213
215
|
'fabric.editor.tableOptions': 'Tùy chọn bảng',
|
|
214
|
-
'fabric.editor.
|
|
216
|
+
'fabric.editor.tableResizeDecreaseScreenReaderInformation': '{newWidth, plural, other {Chiều rộng bảng đã giảm xuống {newWidth,number} pixel.}}',
|
|
217
|
+
'fabric.editor.tableResizeIncreaseScreenReaderInformation': '{newWidth, plural, other {Chiều rộng bảng đã tăng lên {newWidth,number} pixel.}}',
|
|
215
218
|
'fabric.editor.tables.adjustColumn': 'Điều chỉnh cột',
|
|
216
219
|
'fabric.editor.tables.confirmDeleteLinkedModalMessage': 'Việc xóa {nodeName} sẽ ngắt mọi nội dung được kết nối.',
|
|
217
220
|
'fabric.editor.tables.confirmDeleteLinkedModalOKButton': 'Xóa',
|
package/dist/es2019/i18n/zh.js
CHANGED
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
export default {
|
|
10
10
|
'fabric.editor.action': '操作项',
|
|
11
11
|
'fabric.editor.action.description': '创建和指派操作项目',
|
|
12
|
+
'fabric.editor.addColumn': '在右侧添加列',
|
|
12
13
|
'fabric.editor.addMediaFiles': '添加图像、视频或文件',
|
|
14
|
+
'fabric.editor.addRow': '在下方添加行',
|
|
13
15
|
'fabric.editor.alignCenter': '居中对齐',
|
|
14
16
|
'fabric.editor.alignImageCenter': '居中',
|
|
15
17
|
'fabric.editor.alignImageLeft': '左对齐',
|
|
@@ -17,6 +19,7 @@ export default {
|
|
|
17
19
|
'fabric.editor.alignLeft': '左对齐',
|
|
18
20
|
'fabric.editor.alignRight': '右对齐',
|
|
19
21
|
'fabric.editor.annotationToolbar': '标注工具栏',
|
|
22
|
+
'fabric.editor.backgroundColor': '背景颜色',
|
|
20
23
|
'fabric.editor.blockCardUnavailable': '内联链接位于 {node} 内部,无法更改其视图',
|
|
21
24
|
'fabric.editor.blockDescription': '显示有关链接的更多信息,包括摘要和操作',
|
|
22
25
|
'fabric.editor.blockTitle': '卡片',
|
|
@@ -138,7 +141,6 @@ export default {
|
|
|
138
141
|
'fabric.editor.infoPanel': '信息面板',
|
|
139
142
|
'fabric.editor.infoPanel.description': '在彩色面板高亮显示信息',
|
|
140
143
|
'fabric.editor.inlineDescription': '以内联文本显示链接',
|
|
141
|
-
'fabric.editor.inlineOverlay': '更改视图',
|
|
142
144
|
'fabric.editor.inlineTitle': '内联',
|
|
143
145
|
'fabric.editor.insertColumn': '在右侧插入列',
|
|
144
146
|
'fabric.editor.insertColumnDrag': '插入列',
|
|
@@ -211,7 +213,8 @@ export default {
|
|
|
211
213
|
'fabric.editor.table': '表格',
|
|
212
214
|
'fabric.editor.table.description': '插入表格',
|
|
213
215
|
'fabric.editor.tableOptions': '表格选项',
|
|
214
|
-
'fabric.editor.
|
|
216
|
+
'fabric.editor.tableResizeDecreaseScreenReaderInformation': '{newWidth, plural, other {表格宽度已减少到 {newWidth,number} 像素。}}',
|
|
217
|
+
'fabric.editor.tableResizeIncreaseScreenReaderInformation': '{newWidth, plural, other {表格宽度已增加到 {newWidth,number} 像素。}}',
|
|
215
218
|
'fabric.editor.tables.adjustColumn': '调整列',
|
|
216
219
|
'fabric.editor.tables.confirmDeleteLinkedModalMessage': '删除 {nodeName} 将断开与其连接的所有内容。',
|
|
217
220
|
'fabric.editor.tables.confirmDeleteLinkedModalOKButton': '删除',
|
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
export default {
|
|
10
10
|
'fabric.editor.action': '動作項目',
|
|
11
11
|
'fabric.editor.action.description': '建立並指派動作項目',
|
|
12
|
+
'fabric.editor.addColumn': '新增右欄',
|
|
12
13
|
'fabric.editor.addMediaFiles': '新增圖片、影片或檔案',
|
|
14
|
+
'fabric.editor.addRow': '在下方新增列',
|
|
13
15
|
'fabric.editor.alignCenter': '置中對齊',
|
|
14
16
|
'fabric.editor.alignImageCenter': '置中對齊',
|
|
15
17
|
'fabric.editor.alignImageLeft': '靠左對齊',
|
|
@@ -17,6 +19,7 @@ export default {
|
|
|
17
19
|
'fabric.editor.alignLeft': '靠左對齊',
|
|
18
20
|
'fabric.editor.alignRight': '靠右對齊',
|
|
19
21
|
'fabric.editor.annotationToolbar': '註解工具列',
|
|
22
|
+
'fabric.editor.backgroundColor': '背景顏色',
|
|
20
23
|
'fabric.editor.blockCardUnavailable': '內嵌連結位於 {node} 內,無法變更其檢視',
|
|
21
24
|
'fabric.editor.blockDescription': '顯示有關連結的更多資訊,包括摘要和動作',
|
|
22
25
|
'fabric.editor.blockTitle': '卡片',
|
|
@@ -138,7 +141,6 @@ export default {
|
|
|
138
141
|
'fabric.editor.infoPanel': '資訊面板',
|
|
139
142
|
'fabric.editor.infoPanel.description': '以彩色面板醒目提示資訊',
|
|
140
143
|
'fabric.editor.inlineDescription': '將連結顯示為內嵌文字',
|
|
141
|
-
'fabric.editor.inlineOverlay': '變更檢視畫面',
|
|
142
144
|
'fabric.editor.inlineTitle': '內嵌',
|
|
143
145
|
'fabric.editor.insertColumn': '在右側插入直欄',
|
|
144
146
|
'fabric.editor.insertColumnDrag': '插入直欄',
|
|
@@ -211,7 +213,8 @@ export default {
|
|
|
211
213
|
'fabric.editor.table': '表格',
|
|
212
214
|
'fabric.editor.table.description': '插入表格',
|
|
213
215
|
'fabric.editor.tableOptions': '表格選項',
|
|
214
|
-
'fabric.editor.
|
|
216
|
+
'fabric.editor.tableResizeDecreaseScreenReaderInformation': '{newWidth, plural, other {表格寬度已降低至 {newWidth,number} 像素。}}',
|
|
217
|
+
'fabric.editor.tableResizeIncreaseScreenReaderInformation': '{newWidth, plural, other {表格寬度已提升至 {newWidth,number} 像素。}}',
|
|
215
218
|
'fabric.editor.tables.adjustColumn': '調整欄',
|
|
216
219
|
'fabric.editor.tables.confirmDeleteLinkedModalMessage': '刪除 {nodeName} 將中斷與其連結的任何內容。',
|
|
217
220
|
'fabric.editor.tables.confirmDeleteLinkedModalOKButton': '刪除',
|
|
@@ -685,7 +685,8 @@ export class HyperlinkLinkAddToolbar extends PureComponent {
|
|
|
685
685
|
const screenReaderText = browser.safari && this.getScreenReaderText();
|
|
686
686
|
return jsx("div", {
|
|
687
687
|
"aria-label": "Hyperlink Edit",
|
|
688
|
-
className: "recent-list"
|
|
688
|
+
className: "recent-list",
|
|
689
|
+
"data-testid": "hyperlink-add-toolbar"
|
|
689
690
|
}, jsx("div", {
|
|
690
691
|
css: [container, !!activityProvider && containerWithProvider, containerPadding],
|
|
691
692
|
ref: this.wrapperRef
|
|
@@ -25,7 +25,7 @@ export function HyperlinkAddToolbar({
|
|
|
25
25
|
view,
|
|
26
26
|
onCancel,
|
|
27
27
|
invokeMethod,
|
|
28
|
-
|
|
28
|
+
lpLinkPicker,
|
|
29
29
|
onClose,
|
|
30
30
|
onEscapeCallback,
|
|
31
31
|
onClickAwayCallback,
|
|
@@ -38,9 +38,6 @@ export function HyperlinkAddToolbar({
|
|
|
38
38
|
activityProvider,
|
|
39
39
|
searchProvider
|
|
40
40
|
}) => {
|
|
41
|
-
const {
|
|
42
|
-
lpLinkPicker
|
|
43
|
-
} = featureFlags;
|
|
44
41
|
if (lpLinkPicker) {
|
|
45
42
|
return /*#__PURE__*/React.createElement(EditorLinkPicker, _extends({
|
|
46
43
|
view: view,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
2
2
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
3
|
-
const packageVersion = "76.
|
|
3
|
+
const packageVersion = "76.36.0";
|
|
4
4
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
5
5
|
// Remove URL as it has UGC
|
|
6
6
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -50,13 +50,14 @@ export const logException = async (error, tags) => {
|
|
|
50
50
|
const hub = getCurrentHub();
|
|
51
51
|
hub.bindClient(client);
|
|
52
52
|
hub.withScope(scope => {
|
|
53
|
+
var _buildInfo;
|
|
53
54
|
scope.setTags({
|
|
54
55
|
// Jira environment variables
|
|
55
56
|
'jira-bundler': window.BUNDLER_VERSION,
|
|
56
57
|
'jira-variant': window.BUILD_VARIANT,
|
|
57
58
|
'jira-release': window.BUILD_KEY,
|
|
58
59
|
// Confluence environment variables
|
|
59
|
-
'confluence-frontend-version': window.__buildInfo.FRONTEND_VERSION,
|
|
60
|
+
'confluence-frontend-version': (_buildInfo = window.__buildInfo) === null || _buildInfo === void 0 ? void 0 : _buildInfo.FRONTEND_VERSION,
|
|
60
61
|
...tags
|
|
61
62
|
});
|
|
62
63
|
// Explicitly remove the breadcrumbs as it's too likely to log UGC/PII to side-step the hub integrations not being respected
|
|
@@ -7,7 +7,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
|
|
|
7
7
|
import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
8
8
|
import Layer from '../Layer';
|
|
9
9
|
const packageName = "@atlaskit/editor-common";
|
|
10
|
-
const packageVersion = "76.
|
|
10
|
+
const packageVersion = "76.36.0";
|
|
11
11
|
const halfFocusRing = 1;
|
|
12
12
|
const dropOffset = '0, 8';
|
|
13
13
|
class DropList extends Component {
|
package/dist/esm/collab/index.js
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
var _templateObject;
|
|
3
|
+
import { css } from '@emotion/react';
|
|
4
|
+
import { hexToRgba } from '@atlaskit/adf-schema';
|
|
5
|
+
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
6
|
+
import * as themeColors from '@atlaskit/theme/colors';
|
|
7
|
+
|
|
1
8
|
// Format of the payload returned by the callback function passed to the collab provider
|
|
2
9
|
// that gets called when syncing with the back-end service fails.
|
|
3
10
|
// Format of the document and its metadata returned from the collab provider
|
|
@@ -118,4 +125,19 @@ export var DisconnectReason = /*#__PURE__*/function (DisconnectReason) {
|
|
|
118
125
|
DisconnectReason["SOCKET_TIMEOUT"] = "SOCKET_TIMEOUT";
|
|
119
126
|
DisconnectReason["UNKNOWN_DISCONNECT"] = "UNKNOWN_DISCONNECT";
|
|
120
127
|
return DisconnectReason;
|
|
121
|
-
}({});
|
|
128
|
+
}({});
|
|
129
|
+
// TODO: https://product-fabric.atlassian.net/browse/DSP-7269
|
|
130
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
131
|
+
export var colors = [themeColors.R100, themeColors.R300, themeColors.R500, themeColors.Y100, themeColors.Y300, themeColors.Y500, themeColors.G100, themeColors.G300, themeColors.G500, themeColors.T100, themeColors.T300, themeColors.T500, themeColors.B100, themeColors.B300, themeColors.B500, themeColors.P100, themeColors.P300, themeColors.P500, themeColors.N70, themeColors.N200, themeColors.N800].map(function (solid) {
|
|
132
|
+
return {
|
|
133
|
+
solid: solid,
|
|
134
|
+
selection: hexToRgba(solid, 0.2)
|
|
135
|
+
};
|
|
136
|
+
});
|
|
137
|
+
var telepointerColorStyle = function telepointerColorStyle(color, index) {
|
|
138
|
+
return "\n &.color-".concat(index, " {\n background-color: ").concat(color.selection, ";\n &::after {\n background-color: ").concat(color.solid, ";\n color: ", "var(--ds-text-inverse, #fff)", ";\n border-color: ").concat(color.solid, ";\n }\n }\n");
|
|
139
|
+
};
|
|
140
|
+
export var TELEPOINTER_DIM_CLASS = 'telepointer-dim';
|
|
141
|
+
export var telepointerStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror .telepointer {\n position: relative;\n transition: opacity 200ms;\n\n &.telepointer-selection {\n line-height: 1.2;\n pointer-events: none;\n user-select: none;\n }\n\n &.telepointer-selection-badge::after {\n content: attr(data-initial);\n position: absolute;\n display: block;\n top: -14px;\n font-size: ", ";\n padding: ", ";\n color: ", ";\n left: -1px;\n border-radius: 2px 2px 2px 0;\n line-height: initial;\n }\n\n &.", " {\n opacity: 0.2;\n }\n\n ", ";\n }\n"])), relativeFontSizeToBase16(9), "var(--ds-space-025, 2px)", "var(--ds-text-inverse, white)", TELEPOINTER_DIM_CLASS, colors.map(function (color, index) {
|
|
142
|
+
return telepointerColorStyle(color, index);
|
|
143
|
+
}));
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
var hash = {
|
|
2
|
+
nodes: {
|
|
3
|
+
doc: 'doc',
|
|
4
|
+
paragraph: 'p',
|
|
5
|
+
text: 't',
|
|
6
|
+
bulletList: 'ul',
|
|
7
|
+
orderedList: 'ol',
|
|
8
|
+
listItem: 'li',
|
|
9
|
+
heading: 'h',
|
|
10
|
+
blockquote: 'blockq',
|
|
11
|
+
codeBlock: 'codebl',
|
|
12
|
+
panel: 'pnl',
|
|
13
|
+
rule: 'rl',
|
|
14
|
+
hardBreak: 'br',
|
|
15
|
+
mention: 'ment',
|
|
16
|
+
emoji: 'emj',
|
|
17
|
+
image: 'img',
|
|
18
|
+
caption: 'cap',
|
|
19
|
+
media: 'media',
|
|
20
|
+
mediaGroup: 'mediag',
|
|
21
|
+
mediaSingle: 'medias',
|
|
22
|
+
plain: 'pln',
|
|
23
|
+
table: 'table',
|
|
24
|
+
tableCell: 'td',
|
|
25
|
+
tableHeader: 'th',
|
|
26
|
+
tableRow: 'tr',
|
|
27
|
+
decisionList: 'dl',
|
|
28
|
+
decisionItem: 'di',
|
|
29
|
+
taskList: 'tl',
|
|
30
|
+
taskItem: 'ti',
|
|
31
|
+
extension: 'ext',
|
|
32
|
+
inlineExtension: 'exti',
|
|
33
|
+
bodiedExtension: 'extb',
|
|
34
|
+
multiBodiedExtension: 'extmbe',
|
|
35
|
+
extensionFrame: 'extfrm',
|
|
36
|
+
status: 'sts',
|
|
37
|
+
placeholder: 'plh',
|
|
38
|
+
inlineCard: 'cardi',
|
|
39
|
+
blockCard: 'cardb',
|
|
40
|
+
embedCard: 'carde',
|
|
41
|
+
expand: 'exp',
|
|
42
|
+
nestedExpand: 'expn',
|
|
43
|
+
unsupportedBlock: 'unsupb',
|
|
44
|
+
unsupportedInline: 'unsupi',
|
|
45
|
+
unknownBlock: 'unkb',
|
|
46
|
+
date: 'date'
|
|
47
|
+
},
|
|
48
|
+
marks: {
|
|
49
|
+
em: 'em',
|
|
50
|
+
strong: 'strong',
|
|
51
|
+
code: 'code',
|
|
52
|
+
strike: 'strike',
|
|
53
|
+
underline: 'undline',
|
|
54
|
+
link: 'lnk',
|
|
55
|
+
subsup: 'subsup',
|
|
56
|
+
textColor: 'txtclr',
|
|
57
|
+
unsupportedMark: 'unsupmrk',
|
|
58
|
+
unsupportedNodeAttribute: 'unsupnattr',
|
|
59
|
+
annotation: 'anno'
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
function shortHash(type, isMark) {
|
|
63
|
+
var code = hash[isMark ? 'marks' : 'nodes'][type];
|
|
64
|
+
return code ? code : type;
|
|
65
|
+
}
|
|
66
|
+
function compactStringifier(node) {
|
|
67
|
+
var _node$marks;
|
|
68
|
+
var isContentEmpty = !node.content;
|
|
69
|
+
var isTextNode = (node === null || node === void 0 ? void 0 : node.type) === 'text';
|
|
70
|
+
var hasMarks = (_node$marks = node.marks) === null || _node$marks === void 0 ? void 0 : _node$marks.length;
|
|
71
|
+
var isContentArray = Array.isArray(node.content);
|
|
72
|
+
var marks = function marks(child) {
|
|
73
|
+
if (hasMarks) {
|
|
74
|
+
return node.marks.reduce(function (str, mark) {
|
|
75
|
+
return "".concat(shortHash(mark, true), "(").concat(str, ")");
|
|
76
|
+
}, child);
|
|
77
|
+
}
|
|
78
|
+
return child;
|
|
79
|
+
};
|
|
80
|
+
var content;
|
|
81
|
+
if (isTextNode) {
|
|
82
|
+
content = String(node.nodeSize);
|
|
83
|
+
} else if (isContentEmpty) {
|
|
84
|
+
content = '';
|
|
85
|
+
} else if (isContentArray) {
|
|
86
|
+
content = node.content.map(function (node) {
|
|
87
|
+
return compactStringifier(node);
|
|
88
|
+
}).join(',');
|
|
89
|
+
}
|
|
90
|
+
return marks("".concat(shortHash(node.type, false), "(").concat(content, ")"));
|
|
91
|
+
}
|
|
92
|
+
export var getDocStructure = function getDocStructure(doc, options) {
|
|
93
|
+
try {
|
|
94
|
+
var result = getBlockNode(doc, 0);
|
|
95
|
+
if (options !== null && options !== void 0 && options.compact) {
|
|
96
|
+
return compactStringifier(result);
|
|
97
|
+
}
|
|
98
|
+
return result;
|
|
99
|
+
} catch (error) {
|
|
100
|
+
return "Error logging document structure: ".concat(error);
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
var getBlockNode = function getBlockNode(node, pos) {
|
|
104
|
+
var blockNode = {
|
|
105
|
+
type: node.type.name,
|
|
106
|
+
pos: pos,
|
|
107
|
+
nodeSize: node.nodeSize
|
|
108
|
+
};
|
|
109
|
+
var content = getBlockNodeContent(node.content, pos);
|
|
110
|
+
if (content.length > 0) {
|
|
111
|
+
blockNode.content = content;
|
|
112
|
+
}
|
|
113
|
+
var marks = getMarks(node);
|
|
114
|
+
if (marks.length > 0) {
|
|
115
|
+
blockNode.marks = marks;
|
|
116
|
+
}
|
|
117
|
+
return blockNode;
|
|
118
|
+
};
|
|
119
|
+
var getBlockNodeContent = function getBlockNodeContent(node, pos) {
|
|
120
|
+
if (!node || !node.content || !node.content.length) {
|
|
121
|
+
return [];
|
|
122
|
+
}
|
|
123
|
+
var blockNodeContent = [];
|
|
124
|
+
var content = node.content;
|
|
125
|
+
if (content[0].isBlock) {
|
|
126
|
+
// children are block nodes
|
|
127
|
+
var prevNode;
|
|
128
|
+
blockNodeContent = content.map(function (node) {
|
|
129
|
+
pos += prevNode ? prevNode.nodeSize : 1;
|
|
130
|
+
prevNode = node;
|
|
131
|
+
return getBlockNode(node, pos);
|
|
132
|
+
});
|
|
133
|
+
} else {
|
|
134
|
+
// children are inline nodes .
|
|
135
|
+
var result = getInlineNodes(content, pos);
|
|
136
|
+
blockNodeContent = result.inlineNodes;
|
|
137
|
+
pos = result.pos;
|
|
138
|
+
}
|
|
139
|
+
return blockNodeContent;
|
|
140
|
+
};
|
|
141
|
+
var getInlineNodes = function getInlineNodes(nodes, pos) {
|
|
142
|
+
var inlineNodes = nodes.map(function (node) {
|
|
143
|
+
var nodeSize = node.nodeSize;
|
|
144
|
+
var inlineNode = {
|
|
145
|
+
type: node.type.name,
|
|
146
|
+
pos: pos,
|
|
147
|
+
nodeSize: nodeSize
|
|
148
|
+
};
|
|
149
|
+
var marks = getMarks(node);
|
|
150
|
+
if (marks.length > 0) {
|
|
151
|
+
inlineNode.marks = marks;
|
|
152
|
+
}
|
|
153
|
+
pos += nodeSize;
|
|
154
|
+
return inlineNode;
|
|
155
|
+
});
|
|
156
|
+
return {
|
|
157
|
+
inlineNodes: inlineNodes,
|
|
158
|
+
pos: pos
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
var getMarks = function getMarks(node) {
|
|
162
|
+
return node.marks.map(function (mark) {
|
|
163
|
+
return mark.type.name;
|
|
164
|
+
});
|
|
165
|
+
};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { insideTable } from './inside';
|
|
1
|
+
export { insideTable } from './inside';
|
|
2
|
+
export { getDocStructure } from './document-logger';
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
+
var _excluded = ["type"];
|
|
5
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
|
+
/** @jsx jsx */
|
|
8
|
+
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import { jsx } from '@emotion/react';
|
|
11
|
+
import classnames from 'classnames';
|
|
12
|
+
import { WithPluginState } from '../../..//with-plugin-state';
|
|
13
|
+
import { useSharedPluginState } from '../../../hooks';
|
|
14
|
+
import { overflowShadow } from '../../../ui';
|
|
15
|
+
import { calculateBreakoutStyles } from '../../../utils';
|
|
16
|
+
import ExtensionLozenge from '../Lozenge';
|
|
17
|
+
import { overlay } from '../styles';
|
|
18
|
+
import { content, contentWrapper, header, widerLayoutClassName, wrapperStyle } from './styles';
|
|
19
|
+
function ExtensionWithPluginState(props) {
|
|
20
|
+
var node = props.node,
|
|
21
|
+
handleContentDOMRef = props.handleContentDOMRef,
|
|
22
|
+
children = props.children,
|
|
23
|
+
_props$widthState = props.widthState,
|
|
24
|
+
widthState = _props$widthState === void 0 ? {
|
|
25
|
+
width: 0
|
|
26
|
+
} : _props$widthState,
|
|
27
|
+
handleRef = props.handleRef,
|
|
28
|
+
shadowClassNames = props.shadowClassNames,
|
|
29
|
+
hideFrame = props.hideFrame,
|
|
30
|
+
editorAppearance = props.editorAppearance;
|
|
31
|
+
var hasBody = ['bodiedExtension', 'multiBodiedExtension'].includes(node.type.name);
|
|
32
|
+
var isMobile = editorAppearance === 'mobile';
|
|
33
|
+
var hasChildren = !!children;
|
|
34
|
+
var removeBorder = hideFrame && !isMobile && !hasBody || false;
|
|
35
|
+
var getPos = props.getPos,
|
|
36
|
+
view = props.view;
|
|
37
|
+
var isTopLevelNode = React.useMemo(function () {
|
|
38
|
+
var pos = typeof getPos === 'function' ? getPos() : undefined;
|
|
39
|
+
return typeof pos !== 'undefined' && !isNaN(pos) && view.state.doc.resolve(pos).depth === 0;
|
|
40
|
+
return false;
|
|
41
|
+
}, [view, getPos]);
|
|
42
|
+
var shouldBreakout =
|
|
43
|
+
// Extension should breakout when the layout is set to 'full-width' or 'wide'.
|
|
44
|
+
['full-width', 'wide'].includes(node.attrs.layout) &&
|
|
45
|
+
// Extension breakout state should only be respected for top level nodes.
|
|
46
|
+
isTopLevelNode &&
|
|
47
|
+
// Extension breakout state should not be respected when the editor appearance is full-width mode
|
|
48
|
+
editorAppearance !== 'full-width';
|
|
49
|
+
var classNames = classnames('extension-container', 'block', shadowClassNames, _defineProperty({
|
|
50
|
+
'with-overlay': !hasBody,
|
|
51
|
+
'without-frame': removeBorder
|
|
52
|
+
}, widerLayoutClassName, shouldBreakout));
|
|
53
|
+
var headerClassNames = classnames({
|
|
54
|
+
'with-children': hasChildren,
|
|
55
|
+
'without-frame': removeBorder
|
|
56
|
+
});
|
|
57
|
+
var customContainerStyles = {
|
|
58
|
+
width: '100%'
|
|
59
|
+
};
|
|
60
|
+
var newContentStyles = {};
|
|
61
|
+
if (shouldBreakout) {
|
|
62
|
+
var _calculateBreakoutSty = calculateBreakoutStyles({
|
|
63
|
+
mode: node.attrs.layout,
|
|
64
|
+
widthStateWidth: widthState.width,
|
|
65
|
+
widthStateLineLength: widthState.lineLength
|
|
66
|
+
}),
|
|
67
|
+
type = _calculateBreakoutSty.type,
|
|
68
|
+
breakoutStyles = _objectWithoutProperties(_calculateBreakoutSty, _excluded);
|
|
69
|
+
newContentStyles = _objectSpread({}, breakoutStyles);
|
|
70
|
+
customContainerStyles = breakoutStyles;
|
|
71
|
+
}
|
|
72
|
+
newContentStyles = _objectSpread(_objectSpread({}, newContentStyles), contentWrapper);
|
|
73
|
+
return jsx("div", {
|
|
74
|
+
ref: handleRef,
|
|
75
|
+
"data-layout": node.attrs.layout,
|
|
76
|
+
className: classNames,
|
|
77
|
+
css: wrapperStyle,
|
|
78
|
+
style: customContainerStyles
|
|
79
|
+
}, jsx("div", {
|
|
80
|
+
className: "extension-overflow-wrapper ".concat(hasBody ? 'with-body' : '')
|
|
81
|
+
}, jsx("div", {
|
|
82
|
+
css: overlay,
|
|
83
|
+
className: "extension-overlay"
|
|
84
|
+
}), jsx("div", {
|
|
85
|
+
css: header,
|
|
86
|
+
contentEditable: false,
|
|
87
|
+
className: headerClassNames
|
|
88
|
+
}, !removeBorder && jsx(ExtensionLozenge, {
|
|
89
|
+
node: node
|
|
90
|
+
}), children), hasBody && jsx("div", {
|
|
91
|
+
css: newContentStyles
|
|
92
|
+
}, jsx("div", {
|
|
93
|
+
css: content,
|
|
94
|
+
ref: handleContentDOMRef,
|
|
95
|
+
className: "extension-content block"
|
|
96
|
+
}))));
|
|
97
|
+
}
|
|
98
|
+
var Extension = function Extension(props) {
|
|
99
|
+
// TODO: ED-17836 This code is here because confluence injects
|
|
100
|
+
// the `editor-referentiality` plugin via `dangerouslyAppendPlugins`
|
|
101
|
+
// which cannot access the `pluginInjectionApi`. When we move
|
|
102
|
+
// Confluence to using presets we can remove this workaround.
|
|
103
|
+
var pluginInjectionApi = props.pluginInjectionApi;
|
|
104
|
+
return pluginInjectionApi === undefined ? jsx(ExtensionDeprecated, props) : jsx(ExtensionWithSharedState, props);
|
|
105
|
+
};
|
|
106
|
+
var ExtensionWithSharedState = function ExtensionWithSharedState(props) {
|
|
107
|
+
var pluginInjectionApi = props.pluginInjectionApi;
|
|
108
|
+
var _useSharedPluginState = useSharedPluginState(pluginInjectionApi, ['width']),
|
|
109
|
+
widthState = _useSharedPluginState.widthState;
|
|
110
|
+
return jsx(ExtensionWithPluginState, _extends({
|
|
111
|
+
widthState: widthState
|
|
112
|
+
}, props));
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
// TODO: ED-17836 This code is here because Confluence injects
|
|
116
|
+
// the `editor-referentiality` plugin via `dangerouslyAppendPlugins`
|
|
117
|
+
// which cannot access the `pluginInjectionApi`. When we move
|
|
118
|
+
// Confluence to using presets we can remove this workaround.
|
|
119
|
+
// @ts-ignore
|
|
120
|
+
var widthPluginKey = {
|
|
121
|
+
key: 'widthPlugin$',
|
|
122
|
+
getState: function getState(state) {
|
|
123
|
+
return state['widthPlugin$'];
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
var ExtensionDeprecated = function ExtensionDeprecated(props) {
|
|
127
|
+
return jsx(WithPluginState, {
|
|
128
|
+
editorView: props.view,
|
|
129
|
+
plugins: {
|
|
130
|
+
widthState: widthPluginKey
|
|
131
|
+
},
|
|
132
|
+
render: function render(_ref) {
|
|
133
|
+
var widthState = _ref.widthState;
|
|
134
|
+
return jsx(ExtensionWithPluginState, _extends({
|
|
135
|
+
widthState: widthState
|
|
136
|
+
}, props));
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
};
|
|
140
|
+
/**
|
|
141
|
+
* End workaround
|
|
142
|
+
*/
|
|
143
|
+
|
|
144
|
+
export default overflowShadow(Extension, {
|
|
145
|
+
overflowSelector: '.extension-overflow-wrapper'
|
|
146
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
3
|
+
import { css } from '@emotion/react';
|
|
4
|
+
import { N30 } from '@atlaskit/theme/colors';
|
|
5
|
+
import { padding, wrapperDefault } from '../styles';
|
|
6
|
+
export var widerLayoutClassName = 'wider-layout';
|
|
7
|
+
export var wrapperStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n\n &.without-frame {\n background: transparent;\n }\n cursor: pointer;\n width: 100%;\n\n .extension-overflow-wrapper:not(.with-body) {\n overflow-x: auto;\n }\n"])), wrapperDefault);
|
|
8
|
+
export var header = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: ", "px ", "px 0px;\n vertical-align: middle;\n\n &.with-children:not(.without-frame) {\n padding: ", " ", "\n ", ";\n }\n &.without-frame {\n padding: 0;\n }\n"])), padding / 2, padding / 2, "var(--ds-space-050, 4px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)");
|
|
9
|
+
export var content = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding: ", "px;\n background: ", ";\n border: 1px solid ", ";\n border-radius: ", ";\n cursor: initial;\n width: 100%;\n"])), padding, "var(--ds-surface, white)", "var(--ds-border, ".concat(N30, ")"), "var(--ds-border-radius, 3px)");
|
|
10
|
+
export var contentWrapper = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding: 0 ", "px ", "px;\n display: flex;\n justify-content: center;\n"])), padding, padding);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
|
+
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
7
|
+
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; } }
|
|
8
|
+
/** @jsx jsx */
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import { Component } from 'react';
|
|
11
|
+
import { jsx } from '@emotion/react';
|
|
12
|
+
import ExtensionLozenge from '../Lozenge';
|
|
13
|
+
import { overlay } from '../styles';
|
|
14
|
+
import { wrapperStyle } from './styles';
|
|
15
|
+
var InlineExtension = /*#__PURE__*/function (_Component) {
|
|
16
|
+
_inherits(InlineExtension, _Component);
|
|
17
|
+
var _super = _createSuper(InlineExtension);
|
|
18
|
+
function InlineExtension() {
|
|
19
|
+
_classCallCheck(this, InlineExtension);
|
|
20
|
+
return _super.apply(this, arguments);
|
|
21
|
+
}
|
|
22
|
+
_createClass(InlineExtension, [{
|
|
23
|
+
key: "render",
|
|
24
|
+
value: function render() {
|
|
25
|
+
var _this$props = this.props,
|
|
26
|
+
node = _this$props.node,
|
|
27
|
+
children = _this$props.children;
|
|
28
|
+
var hasChildren = !!children;
|
|
29
|
+
var className = hasChildren ? 'with-overlay with-children' : 'with-overlay';
|
|
30
|
+
return jsx("div", {
|
|
31
|
+
css: wrapperStyle,
|
|
32
|
+
className: "extension-container inline ".concat(className)
|
|
33
|
+
}, jsx("div", {
|
|
34
|
+
css: overlay,
|
|
35
|
+
className: "extension-overlay"
|
|
36
|
+
}), children ? children : jsx(ExtensionLozenge, {
|
|
37
|
+
node: node
|
|
38
|
+
}));
|
|
39
|
+
}
|
|
40
|
+
}]);
|
|
41
|
+
return InlineExtension;
|
|
42
|
+
}(Component);
|
|
43
|
+
export { InlineExtension as default };
|