@atlaskit/editor-core 149.0.2 → 150.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +47 -0
- package/dist/cjs/create-editor/create-plugins-list.js +2 -1
- package/dist/cjs/i18n/cs.js +18 -2
- package/dist/cjs/i18n/da.js +18 -2
- package/dist/cjs/i18n/de.js +18 -2
- package/dist/cjs/i18n/es.js +13 -2
- package/dist/cjs/i18n/et.js +0 -1
- package/dist/cjs/i18n/fi.js +13 -2
- package/dist/cjs/i18n/fr.js +13 -2
- package/dist/cjs/i18n/hu.js +14 -3
- package/dist/cjs/i18n/it.js +18 -2
- package/dist/cjs/i18n/ja.js +13 -2
- package/dist/cjs/i18n/ko.js +13 -2
- package/dist/cjs/i18n/nb.js +13 -2
- package/dist/cjs/i18n/nl.js +18 -2
- package/dist/cjs/i18n/pl.js +16 -2
- package/dist/cjs/i18n/pt_BR.js +14 -3
- package/dist/cjs/i18n/pt_PT.js +0 -1
- package/dist/cjs/i18n/ru.js +13 -2
- package/dist/cjs/i18n/sk.js +0 -1
- package/dist/cjs/i18n/sv.js +18 -2
- package/dist/cjs/i18n/th.js +18 -2
- package/dist/cjs/i18n/tr.js +16 -2
- package/dist/cjs/i18n/uk.js +18 -2
- package/dist/cjs/i18n/vi.js +13 -2
- package/dist/cjs/i18n/zh.js +18 -2
- package/dist/cjs/i18n/zh_TW.js +18 -2
- package/dist/cjs/messages.js +4 -4
- package/dist/cjs/plugins/analytics/types/enums.js +0 -1
- package/dist/cjs/plugins/analytics/types/node-events.js +1 -0
- package/dist/cjs/plugins/collab-edit/ui/to-avatar.js +4 -8
- package/dist/cjs/plugins/floating-toolbar/ui/{EditorHideEmojiIcon.js → EditorRemoveEmojiIcon.js} +2 -2
- package/dist/cjs/plugins/floating-toolbar/ui/EmojiPickerButton.js +5 -2
- package/dist/cjs/plugins/floating-toolbar/ui/EmojiPickerButton.test.js +14 -0
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +19 -22
- package/dist/cjs/plugins/layout/actions.js +70 -16
- package/dist/cjs/plugins/layout/index.js +3 -2
- package/dist/cjs/plugins/layout/pm-plugins/main.js +3 -1
- package/dist/cjs/plugins/layout/toolbar-messages.js +5 -0
- package/dist/cjs/plugins/layout/toolbar.js +11 -2
- package/dist/cjs/plugins/list/pm-plugins/main.js +0 -38
- package/dist/cjs/plugins/mentions/analytics.js +2 -3
- package/dist/cjs/plugins/mentions/type-ahead/index.js +46 -15
- package/dist/cjs/plugins/panel/nodeviews/panel.js +7 -3
- package/dist/cjs/plugins/panel/toolbar.js +8 -6
- package/dist/cjs/plugins/panel/toolbar.test.js +25 -11
- package/dist/cjs/plugins/table/commands/insert.js +25 -10
- package/dist/cjs/plugins/table/commands/misc.js +3 -3
- package/dist/cjs/plugins/table/nodeviews/TableComponent.js +5 -4
- package/dist/cjs/plugins/table/nodeviews/tableCell.js +20 -6
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +3 -1
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +1 -0
- package/dist/cjs/plugins/table/toolbar.js +4 -4
- package/dist/cjs/plugins/table/transforms/column-width.js +72 -12
- package/dist/cjs/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +1 -1
- package/dist/cjs/plugins/table/ui/FloatingInsertButton/index.js +1 -1
- package/dist/cjs/plugins/table/utils/table.js +17 -2
- package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/index.js +3 -7
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadPopup.js +1 -3
- package/dist/cjs/ui/ColorPickerButton/index.js +5 -2
- package/dist/cjs/ui/ColorPickerButton/index.test.js +16 -0
- package/dist/cjs/ui/ConfigPanel/Fields/Expand.js +2 -4
- package/dist/cjs/ui/ConfigPanel/Fields/Fieldset.js +1 -3
- package/dist/cjs/ui/ConfigPanel/NestedForms/RemovableField.js +1 -3
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/create-editor/create-plugins-list.js +2 -1
- package/dist/es2019/i18n/cs.js +18 -2
- package/dist/es2019/i18n/da.js +18 -2
- package/dist/es2019/i18n/de.js +18 -2
- package/dist/es2019/i18n/es.js +13 -2
- package/dist/es2019/i18n/et.js +0 -1
- package/dist/es2019/i18n/fi.js +13 -2
- package/dist/es2019/i18n/fr.js +13 -2
- package/dist/es2019/i18n/hu.js +14 -3
- package/dist/es2019/i18n/it.js +18 -2
- package/dist/es2019/i18n/ja.js +13 -2
- package/dist/es2019/i18n/ko.js +13 -2
- package/dist/es2019/i18n/nb.js +13 -2
- package/dist/es2019/i18n/nl.js +18 -2
- package/dist/es2019/i18n/pl.js +16 -2
- package/dist/es2019/i18n/pt_BR.js +14 -3
- package/dist/es2019/i18n/pt_PT.js +0 -1
- package/dist/es2019/i18n/ru.js +13 -2
- package/dist/es2019/i18n/sk.js +0 -1
- package/dist/es2019/i18n/sv.js +18 -2
- package/dist/es2019/i18n/th.js +18 -2
- package/dist/es2019/i18n/tr.js +16 -2
- package/dist/es2019/i18n/uk.js +18 -2
- package/dist/es2019/i18n/vi.js +13 -2
- package/dist/es2019/i18n/zh.js +18 -2
- package/dist/es2019/i18n/zh_TW.js +18 -2
- package/dist/es2019/messages.js +4 -4
- package/dist/es2019/plugins/analytics/types/enums.js +0 -1
- package/dist/es2019/plugins/analytics/types/node-events.js +1 -0
- package/dist/es2019/plugins/collab-edit/ui/to-avatar.js +2 -6
- package/dist/es2019/plugins/floating-toolbar/ui/{EditorHideEmojiIcon.js → EditorRemoveEmojiIcon.js} +1 -1
- package/dist/es2019/plugins/floating-toolbar/ui/EmojiPickerButton.js +5 -3
- package/dist/es2019/plugins/floating-toolbar/ui/EmojiPickerButton.test.js +14 -0
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +20 -23
- package/dist/es2019/plugins/layout/actions.js +64 -13
- package/dist/es2019/plugins/layout/index.js +3 -2
- package/dist/es2019/plugins/layout/pm-plugins/main.js +3 -1
- package/dist/es2019/plugins/layout/toolbar-messages.js +5 -0
- package/dist/es2019/plugins/layout/toolbar.js +10 -2
- package/dist/es2019/plugins/list/pm-plugins/main.js +1 -41
- package/dist/es2019/plugins/mentions/analytics.js +2 -3
- package/dist/es2019/plugins/mentions/type-ahead/index.js +30 -17
- package/dist/es2019/plugins/panel/nodeviews/panel.js +5 -3
- package/dist/es2019/plugins/panel/toolbar.js +8 -6
- package/dist/es2019/plugins/panel/toolbar.test.js +18 -8
- package/dist/es2019/plugins/table/commands/insert.js +27 -12
- package/dist/es2019/plugins/table/commands/misc.js +3 -3
- package/dist/es2019/plugins/table/nodeviews/TableComponent.js +5 -4
- package/dist/es2019/plugins/table/nodeviews/tableCell.js +19 -6
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +1 -2
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +1 -1
- package/dist/es2019/plugins/table/toolbar.js +4 -4
- package/dist/es2019/plugins/table/transforms/column-width.js +62 -11
- package/dist/es2019/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +1 -1
- package/dist/es2019/plugins/table/ui/FloatingInsertButton/index.js +1 -1
- package/dist/es2019/plugins/table/utils/table.js +7 -1
- package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/index.js +3 -7
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadPopup.js +1 -2
- package/dist/es2019/ui/ColorPickerButton/index.js +6 -3
- package/dist/es2019/ui/ColorPickerButton/index.test.js +15 -0
- package/dist/es2019/ui/ConfigPanel/Fields/Expand.js +3 -4
- package/dist/es2019/ui/ConfigPanel/Fields/Fieldset.js +2 -3
- package/dist/es2019/ui/ConfigPanel/NestedForms/RemovableField.js +1 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/create-editor/create-plugins-list.js +2 -1
- package/dist/esm/i18n/cs.js +18 -2
- package/dist/esm/i18n/da.js +18 -2
- package/dist/esm/i18n/de.js +18 -2
- package/dist/esm/i18n/es.js +13 -2
- package/dist/esm/i18n/et.js +0 -1
- package/dist/esm/i18n/fi.js +13 -2
- package/dist/esm/i18n/fr.js +13 -2
- package/dist/esm/i18n/hu.js +14 -3
- package/dist/esm/i18n/it.js +18 -2
- package/dist/esm/i18n/ja.js +13 -2
- package/dist/esm/i18n/ko.js +13 -2
- package/dist/esm/i18n/nb.js +13 -2
- package/dist/esm/i18n/nl.js +18 -2
- package/dist/esm/i18n/pl.js +16 -2
- package/dist/esm/i18n/pt_BR.js +14 -3
- package/dist/esm/i18n/pt_PT.js +0 -1
- package/dist/esm/i18n/ru.js +13 -2
- package/dist/esm/i18n/sk.js +0 -1
- package/dist/esm/i18n/sv.js +18 -2
- package/dist/esm/i18n/th.js +18 -2
- package/dist/esm/i18n/tr.js +16 -2
- package/dist/esm/i18n/uk.js +18 -2
- package/dist/esm/i18n/vi.js +13 -2
- package/dist/esm/i18n/zh.js +18 -2
- package/dist/esm/i18n/zh_TW.js +18 -2
- package/dist/esm/messages.js +4 -4
- package/dist/esm/plugins/analytics/types/enums.js +0 -1
- package/dist/esm/plugins/analytics/types/node-events.js +1 -0
- package/dist/esm/plugins/collab-edit/ui/to-avatar.js +4 -8
- package/dist/esm/plugins/floating-toolbar/ui/{EditorHideEmojiIcon.js → EditorRemoveEmojiIcon.js} +1 -1
- package/dist/esm/plugins/floating-toolbar/ui/EmojiPickerButton.js +6 -3
- package/dist/esm/plugins/floating-toolbar/ui/EmojiPickerButton.test.js +14 -0
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +20 -23
- package/dist/esm/plugins/layout/actions.js +66 -13
- package/dist/esm/plugins/layout/index.js +3 -2
- package/dist/esm/plugins/layout/pm-plugins/main.js +3 -1
- package/dist/esm/plugins/layout/toolbar-messages.js +5 -0
- package/dist/esm/plugins/layout/toolbar.js +10 -2
- package/dist/esm/plugins/list/pm-plugins/main.js +1 -37
- package/dist/esm/plugins/mentions/analytics.js +2 -3
- package/dist/esm/plugins/mentions/type-ahead/index.js +46 -15
- package/dist/esm/plugins/panel/nodeviews/panel.js +5 -3
- package/dist/esm/plugins/panel/toolbar.js +8 -6
- package/dist/esm/plugins/panel/toolbar.test.js +25 -11
- package/dist/esm/plugins/table/commands/insert.js +26 -11
- package/dist/esm/plugins/table/commands/misc.js +3 -3
- package/dist/esm/plugins/table/nodeviews/TableComponent.js +5 -4
- package/dist/esm/plugins/table/nodeviews/tableCell.js +21 -7
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +1 -2
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +1 -1
- package/dist/esm/plugins/table/toolbar.js +4 -4
- package/dist/esm/plugins/table/transforms/column-width.js +62 -10
- package/dist/esm/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +1 -1
- package/dist/esm/plugins/table/ui/FloatingInsertButton/index.js +1 -1
- package/dist/esm/plugins/table/utils/table.js +9 -0
- package/dist/esm/plugins/text-color/ui/ToolbarTextColor/index.js +3 -7
- package/dist/esm/plugins/type-ahead/ui/TypeAheadPopup.js +1 -2
- package/dist/esm/ui/ColorPickerButton/index.js +6 -3
- package/dist/esm/ui/ColorPickerButton/index.test.js +15 -0
- package/dist/esm/ui/ConfigPanel/Fields/Expand.js +2 -3
- package/dist/esm/ui/ConfigPanel/Fields/Fieldset.js +1 -2
- package/dist/esm/ui/ConfigPanel/NestedForms/RemovableField.js +1 -2
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/editor.d.ts +1 -1
- package/dist/types/i18n/cs.d.ts +16 -0
- package/dist/types/i18n/da.d.ts +16 -0
- package/dist/types/i18n/de.d.ts +16 -0
- package/dist/types/i18n/es.d.ts +11 -0
- package/dist/types/i18n/et.d.ts +0 -1
- package/dist/types/i18n/fi.d.ts +11 -0
- package/dist/types/i18n/fr.d.ts +11 -0
- package/dist/types/i18n/hu.d.ts +11 -0
- package/dist/types/i18n/it.d.ts +16 -0
- package/dist/types/i18n/ja.d.ts +11 -0
- package/dist/types/i18n/ko.d.ts +11 -0
- package/dist/types/i18n/nb.d.ts +11 -0
- package/dist/types/i18n/nl.d.ts +16 -0
- package/dist/types/i18n/pl.d.ts +14 -0
- package/dist/types/i18n/pt_BR.d.ts +11 -0
- package/dist/types/i18n/pt_PT.d.ts +0 -1
- package/dist/types/i18n/ru.d.ts +11 -0
- package/dist/types/i18n/sk.d.ts +0 -1
- package/dist/types/i18n/sv.d.ts +16 -0
- package/dist/types/i18n/th.d.ts +16 -0
- package/dist/types/i18n/tr.d.ts +14 -0
- package/dist/types/i18n/uk.d.ts +16 -0
- package/dist/types/i18n/vi.d.ts +11 -0
- package/dist/types/i18n/zh.d.ts +16 -0
- package/dist/types/i18n/zh_TW.d.ts +16 -0
- package/dist/types/messages.d.ts +1 -1
- package/dist/types/plugins/analytics/analytics-queue.d.ts +1 -1
- package/dist/types/plugins/analytics/types/enums.d.ts +0 -1
- package/dist/types/plugins/analytics/types/general-events.d.ts +1 -1
- package/dist/types/plugins/analytics/types/list-events.d.ts +1 -5
- package/dist/types/plugins/analytics/types/node-events.d.ts +1 -0
- package/dist/types/plugins/collab-edit/ui/to-avatar.d.ts +1 -1
- package/dist/types/plugins/extension/ui/Extension/ExtensionComponent.d.ts +2 -2
- package/dist/types/plugins/floating-toolbar/ui/EditorRemoveEmojiIcon.d.ts +1 -0
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/create-items.d.ts +1 -1
- package/dist/types/plugins/layout/actions.d.ts +1 -0
- package/dist/types/plugins/layout/pm-plugins/types.d.ts +1 -0
- package/dist/types/plugins/layout/toolbar-messages.d.ts +5 -0
- package/dist/types/plugins/layout/toolbar.d.ts +1 -1
- package/dist/types/plugins/layout/types.d.ts +2 -1
- package/dist/types/plugins/mentions/analytics.d.ts +1 -1
- package/dist/types/plugins/quick-insert/index.d.ts +1 -1
- package/dist/types/plugins/table/nodeviews/tableCell.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/table-resizing/utils/resize-state.d.ts +2 -0
- package/dist/types/plugins/table/pm-plugins/table-resizing/utils/scale-table.d.ts +1 -0
- package/dist/types/plugins/table/transforms/column-width.d.ts +10 -0
- package/dist/types/plugins/table/utils/table.d.ts +2 -0
- package/dist/types/ui/ConfigPanel/Fields/Expand.d.ts +1 -1
- package/package.json +22 -22
- package/dist/types/plugins/floating-toolbar/ui/EditorHideEmojiIcon.d.ts +0 -1
package/dist/cjs/i18n/vi.js
CHANGED
|
@@ -33,6 +33,7 @@ var _default = {
|
|
|
33
33
|
'fabric.editor.blockquote.description': 'Chèn trích dẫn hoặc tham chiếu',
|
|
34
34
|
'fabric.editor.blockquote2': 'Trích dẫn',
|
|
35
35
|
'fabric.editor.bold': 'In đậm',
|
|
36
|
+
'fabric.editor.bug': 'Lỗi',
|
|
36
37
|
'fabric.editor.canNotSortTable': '⚠️ Bạn không thể sắp xếp bảng có các ô đã hợp nhất',
|
|
37
38
|
'fabric.editor.cancelButton': 'Hủy',
|
|
38
39
|
'fabric.editor.captionPlaceholder': 'Thêm chú thích',
|
|
@@ -50,6 +51,7 @@ var _default = {
|
|
|
50
51
|
'fabric.editor.code': 'Mã',
|
|
51
52
|
'fabric.editor.codeblock': 'Đoạn mã',
|
|
52
53
|
'fabric.editor.codeblock.description': 'Hiển thị mã có bôi đậm cú pháp',
|
|
54
|
+
'fabric.editor.collapseTable': 'Thu gọn bảng',
|
|
53
55
|
'fabric.editor.columns': 'Bố cục',
|
|
54
56
|
'fabric.editor.columns.description': 'Thiết lập cấu trúc trang của bạn bằng cách sử dụng các mục',
|
|
55
57
|
'fabric.editor.configFailedToLoad': 'Không thể tải',
|
|
@@ -78,6 +80,7 @@ var _default = {
|
|
|
78
80
|
'fabric.editor.decision': 'Quyết định',
|
|
79
81
|
'fabric.editor.decision.description': 'Thu thập các quyết định để dễ dàng theo dõi',
|
|
80
82
|
'fabric.editor.decisionPlaceholder': 'Thêm quyết định…',
|
|
83
|
+
'fabric.editor.defaultAltText': 'Mục danh sách',
|
|
81
84
|
'fabric.editor.displayBlock': 'Hiển thị thẻ',
|
|
82
85
|
'fabric.editor.displayEmbed': 'Hiển thị đối tượng nhúng',
|
|
83
86
|
'fabric.editor.displayInline': 'Hiển thị nội tuyến',
|
|
@@ -87,8 +90,11 @@ var _default = {
|
|
|
87
90
|
'fabric.editor.distributeColumns': 'Phân phối cột',
|
|
88
91
|
'fabric.editor.edit': 'Chỉnh sửa',
|
|
89
92
|
'fabric.editor.editAltText': 'Chỉnh sửa văn bản thay thế',
|
|
93
|
+
'fabric.editor.editDateText': 'Sửa ngày',
|
|
90
94
|
'fabric.editor.editLink': 'Chỉnh sửa liên kết',
|
|
91
95
|
'fabric.editor.editMode.inviteToEditButton.title': 'Mời chỉnh sửa',
|
|
96
|
+
'fabric.editor.editStatusColor': 'Sửa màu trạng thái',
|
|
97
|
+
'fabric.editor.editStatusText': 'Sửa trạng thái',
|
|
92
98
|
'fabric.editor.editorHelp': 'Hỗ trợ chỉnh sửa',
|
|
93
99
|
'fabric.editor.elementBrowser.help': 'Trợ giúp',
|
|
94
100
|
'fabric.editor.elementbrowser.categorylist.category-admin': 'Quản trị',
|
|
@@ -109,6 +115,7 @@ var _default = {
|
|
|
109
115
|
'fabric.editor.emoji': 'Biểu tượng cảm xúc',
|
|
110
116
|
'fabric.editor.emoji.description': 'Sử dụng biểu tượng cảm xúc để thể hiện ý kiến 🎉 và cảm xúc 😄',
|
|
111
117
|
'fabric.editor.emptyLink': 'Vui lòng nhập một liên kết.',
|
|
118
|
+
'fabric.editor.epic': 'Quá trình',
|
|
112
119
|
'fabric.editor.error': 'Lỗi',
|
|
113
120
|
'fabric.editor.errorPanel': 'Ô lỗi',
|
|
114
121
|
'fabric.editor.errorPanel.description': 'Chỉ ra lỗi bằng ô màu',
|
|
@@ -147,8 +154,9 @@ var _default = {
|
|
|
147
154
|
'fabric.editor.horizontalRule.description': 'Chia tách nội dung bằng một đường ngang',
|
|
148
155
|
'fabric.editor.hyperlink.searchLinkAriaDescription': 'Các đề xuất sẽ xuất hiện bên dưới khi bạn nhập thông tin vào trường',
|
|
149
156
|
'fabric.editor.hyperlink.searchLinkResults': '{count, plural, =0 {không tìm thấy kết quả} other {Đã tìm thấy {count,number} kết quả}}',
|
|
150
|
-
'fabric.editor.hyperlinkToolbarPlaceholder': 'Dán
|
|
157
|
+
'fabric.editor.hyperlinkToolbarPlaceholder': 'Dán hoặc tìm kiếm liên kết',
|
|
151
158
|
'fabric.editor.image': 'hình ảnh',
|
|
159
|
+
'fabric.editor.improvement': 'Cải tiến',
|
|
152
160
|
'fabric.editor.info': 'Thông tin',
|
|
153
161
|
'fabric.editor.infoPanel': 'Ô thông tin',
|
|
154
162
|
'fabric.editor.infoPanel.description': 'Bôi đậm thông tin bằng ô màu',
|
|
@@ -186,7 +194,7 @@ var _default = {
|
|
|
186
194
|
'fabric.editor.orderedList.description': 'Tạo một danh sách kiểu sắp xếp',
|
|
187
195
|
'fabric.editor.other': 'Khác...',
|
|
188
196
|
'fabric.editor.panel.backgroundColor': 'Màu nền',
|
|
189
|
-
'fabric.editor.panel.emoji': 'Thêm biểu tượng',
|
|
197
|
+
'fabric.editor.panel.emoji': 'Thêm biểu tượng cảm xúc',
|
|
190
198
|
'fabric.editor.pastePlainText': 'Dán văn bản thuần túy',
|
|
191
199
|
'fabric.editor.placeholderAltText': 'Mô tả hình ảnh này bằng văn bản thay thế',
|
|
192
200
|
'fabric.editor.placeholderText': 'Văn bản giữ chỗ',
|
|
@@ -211,7 +219,9 @@ var _default = {
|
|
|
211
219
|
'fabric.editor.status': 'Trạng thái',
|
|
212
220
|
'fabric.editor.status.description': 'Thêm một nhãn trạng thái tùy chỉnh',
|
|
213
221
|
'fabric.editor.statusPlaceholder': 'Đặt trạng thái',
|
|
222
|
+
'fabric.editor.story': 'Câu chuyện',
|
|
214
223
|
'fabric.editor.strike': 'Gạch ngang',
|
|
224
|
+
'fabric.editor.subTask': 'Tác vụ con',
|
|
215
225
|
'fabric.editor.subscript': 'Chỉ số dưới',
|
|
216
226
|
'fabric.editor.success': 'Thành công',
|
|
217
227
|
'fabric.editor.successPanel': 'Ô thành công',
|
|
@@ -223,6 +233,7 @@ var _default = {
|
|
|
223
233
|
'fabric.editor.tableOptions': 'Tùy chọn bảng',
|
|
224
234
|
'fabric.editor.tables.confirmDeleteLinkedModalMessage': 'Việc xóa bảng này cũng sẽ xóa mọi dữ liệu có trong bất kỳ biểu đồ được kết nối nào.',
|
|
225
235
|
'fabric.editor.tables.confirmDeleteLinkedModalOKButton': 'Xóa bảng và dữ liệu',
|
|
236
|
+
'fabric.editor.task': 'Tác vụ',
|
|
226
237
|
'fabric.editor.taskPlaceholder': "Nhập thao tác của bạn, sử dụng '@' để chỉ định cho người nào đó.",
|
|
227
238
|
'fabric.editor.textColor': 'Màu văn bản',
|
|
228
239
|
'fabric.editor.textColor.lessColors': 'Ít màu hơn',
|
package/dist/cjs/i18n/zh.js
CHANGED
|
@@ -33,6 +33,7 @@ var _default = {
|
|
|
33
33
|
'fabric.editor.blockquote.description': '插入引用',
|
|
34
34
|
'fabric.editor.blockquote2': '引用',
|
|
35
35
|
'fabric.editor.bold': '粗体',
|
|
36
|
+
'fabric.editor.bug': '缺陷',
|
|
36
37
|
'fabric.editor.canNotSortTable': '⚠️ 无法对包含合并单元格的表格进行排序',
|
|
37
38
|
'fabric.editor.cancelButton': '取消',
|
|
38
39
|
'fabric.editor.captionPlaceholder': '添加标题',
|
|
@@ -50,6 +51,7 @@ var _default = {
|
|
|
50
51
|
'fabric.editor.code': '代码',
|
|
51
52
|
'fabric.editor.codeblock': '代码片段',
|
|
52
53
|
'fabric.editor.codeblock.description': '显示带语法高亮的代码',
|
|
54
|
+
'fabric.editor.collapseTable': '收起表格',
|
|
53
55
|
'fabric.editor.columns': '布局',
|
|
54
56
|
'fabric.editor.columns.description': '使用分段组织页面',
|
|
55
57
|
'fabric.editor.configFailedToLoad': '无法加载',
|
|
@@ -78,6 +80,7 @@ var _default = {
|
|
|
78
80
|
'fabric.editor.decision': '决定',
|
|
79
81
|
'fabric.editor.decision.description': '捕获决策,以便轻松跟踪',
|
|
80
82
|
'fabric.editor.decisionPlaceholder': '添加决定...',
|
|
83
|
+
'fabric.editor.defaultAltText': '列出项目',
|
|
81
84
|
'fabric.editor.displayBlock': '显示卡片',
|
|
82
85
|
'fabric.editor.displayEmbed': '显示嵌入',
|
|
83
86
|
'fabric.editor.displayInline': '显示内嵌',
|
|
@@ -87,8 +90,11 @@ var _default = {
|
|
|
87
90
|
'fabric.editor.distributeColumns': '分散列',
|
|
88
91
|
'fabric.editor.edit': '编辑',
|
|
89
92
|
'fabric.editor.editAltText': '编辑替代文本',
|
|
93
|
+
'fabric.editor.editDateText': '编辑日期',
|
|
90
94
|
'fabric.editor.editLink': '编辑链接',
|
|
91
95
|
'fabric.editor.editMode.inviteToEditButton.title': '邀请编辑',
|
|
96
|
+
'fabric.editor.editStatusColor': '编辑状态颜色',
|
|
97
|
+
'fabric.editor.editStatusText': '编辑状态',
|
|
92
98
|
'fabric.editor.editorHelp': '编辑器帮助',
|
|
93
99
|
'fabric.editor.elementBrowser.help': '帮助',
|
|
94
100
|
'fabric.editor.elementbrowser.categorylist.category-admin': '管理',
|
|
@@ -109,6 +115,7 @@ var _default = {
|
|
|
109
115
|
'fabric.editor.emoji': '表情符号',
|
|
110
116
|
'fabric.editor.emoji.description': '使用表情符号传达理念 🎉 和情绪 😄',
|
|
111
117
|
'fabric.editor.emptyLink': '请输入链接。',
|
|
118
|
+
'fabric.editor.epic': '长篇故事',
|
|
112
119
|
'fabric.editor.error': '错误',
|
|
113
120
|
'fabric.editor.errorPanel': '错误面板',
|
|
114
121
|
'fabric.editor.errorPanel.description': '在彩色面板调出错误',
|
|
@@ -123,6 +130,9 @@ var _default = {
|
|
|
123
130
|
'fabric.editor.findNext': '查找下一个',
|
|
124
131
|
'fabric.editor.findPrevious': '查找上一个',
|
|
125
132
|
'fabric.editor.findReplaceToolbarButton': '查找和替换',
|
|
133
|
+
'fabric.editor.floatingToolbar.confirmModalCancel': '取消',
|
|
134
|
+
'fabric.editor.floatingToolbar.confirmModalHeading': '您确定吗?',
|
|
135
|
+
'fabric.editor.floatingToolbar.confirmModalOK': '确定',
|
|
126
136
|
'fabric.editor.headerColumn': '标头列',
|
|
127
137
|
'fabric.editor.headerRow': '表头行',
|
|
128
138
|
'fabric.editor.heading1': '标题 1',
|
|
@@ -144,8 +154,9 @@ var _default = {
|
|
|
144
154
|
'fabric.editor.horizontalRule.description': '使用水平线分隔内容',
|
|
145
155
|
'fabric.editor.hyperlink.searchLinkAriaDescription': '在字段中输入内容时,下方会显示建议内容',
|
|
146
156
|
'fabric.editor.hyperlink.searchLinkResults': '{count, plural, =0 {未找到结果} other {找到 {count,number} 个结果}}',
|
|
147
|
-
'fabric.editor.hyperlinkToolbarPlaceholder': '
|
|
157
|
+
'fabric.editor.hyperlinkToolbarPlaceholder': '粘贴或搜索链接',
|
|
148
158
|
'fabric.editor.image': '图片',
|
|
159
|
+
'fabric.editor.improvement': '改进',
|
|
149
160
|
'fabric.editor.info': '信息',
|
|
150
161
|
'fabric.editor.infoPanel': '信息面板',
|
|
151
162
|
'fabric.editor.infoPanel.description': '在彩色面板高亮显示信息',
|
|
@@ -183,7 +194,7 @@ var _default = {
|
|
|
183
194
|
'fabric.editor.orderedList.description': '创建有序列表',
|
|
184
195
|
'fabric.editor.other': '其他...',
|
|
185
196
|
'fabric.editor.panel.backgroundColor': '背景颜色',
|
|
186
|
-
'fabric.editor.panel.emoji': '
|
|
197
|
+
'fabric.editor.panel.emoji': '添加表情',
|
|
187
198
|
'fabric.editor.pastePlainText': '粘贴纯文本',
|
|
188
199
|
'fabric.editor.placeholderAltText': '用替代文本描述此图片',
|
|
189
200
|
'fabric.editor.placeholderText': '占位文本',
|
|
@@ -208,7 +219,9 @@ var _default = {
|
|
|
208
219
|
'fabric.editor.status': '状态',
|
|
209
220
|
'fabric.editor.status.description': '添加自定义状态标签',
|
|
210
221
|
'fabric.editor.statusPlaceholder': '设置状态',
|
|
222
|
+
'fabric.editor.story': '故事',
|
|
211
223
|
'fabric.editor.strike': '删除线',
|
|
224
|
+
'fabric.editor.subTask': '子任务',
|
|
212
225
|
'fabric.editor.subscript': '下标',
|
|
213
226
|
'fabric.editor.success': '成功',
|
|
214
227
|
'fabric.editor.successPanel': '成功面板',
|
|
@@ -218,6 +231,9 @@ var _default = {
|
|
|
218
231
|
'fabric.editor.table': '表格',
|
|
219
232
|
'fabric.editor.table.description': '插入表格',
|
|
220
233
|
'fabric.editor.tableOptions': '表格选项',
|
|
234
|
+
'fabric.editor.tables.confirmDeleteLinkedModalMessage': '删除此表格还将删除所有已连接图表中包含的全部数据。',
|
|
235
|
+
'fabric.editor.tables.confirmDeleteLinkedModalOKButton': '删除表格和数据',
|
|
236
|
+
'fabric.editor.task': '任务',
|
|
221
237
|
'fabric.editor.taskPlaceholder': '输入您的操作,使用“@”进行分配。',
|
|
222
238
|
'fabric.editor.textColor': '文本颜色',
|
|
223
239
|
'fabric.editor.textColor.lessColors': '减少颜色',
|
package/dist/cjs/i18n/zh_TW.js
CHANGED
|
@@ -33,6 +33,7 @@ var _default = {
|
|
|
33
33
|
'fabric.editor.blockquote.description': '插入引述或引文',
|
|
34
34
|
'fabric.editor.blockquote2': '引述',
|
|
35
35
|
'fabric.editor.bold': '粗體',
|
|
36
|
+
'fabric.editor.bug': '錯誤',
|
|
36
37
|
'fabric.editor.canNotSortTable': '⚠️ 您無法排序包含合併儲存格的表格',
|
|
37
38
|
'fabric.editor.cancelButton': '取消',
|
|
38
39
|
'fabric.editor.captionPlaceholder': '新增標題',
|
|
@@ -50,6 +51,7 @@ var _default = {
|
|
|
50
51
|
'fabric.editor.code': '程式碼',
|
|
51
52
|
'fabric.editor.codeblock': '程式碼片段',
|
|
52
53
|
'fabric.editor.codeblock.description': '顯示程式碼並醒目提示語法',
|
|
54
|
+
'fabric.editor.collapseTable': '摺疊表格',
|
|
53
55
|
'fabric.editor.columns': '版面配置',
|
|
54
56
|
'fabric.editor.columns.description': '使用區段建立頁面的結構',
|
|
55
57
|
'fabric.editor.configFailedToLoad': '無法載入',
|
|
@@ -78,6 +80,7 @@ var _default = {
|
|
|
78
80
|
'fabric.editor.decision': '決定',
|
|
79
81
|
'fabric.editor.decision.description': '擷取決定以便追蹤',
|
|
80
82
|
'fabric.editor.decisionPlaceholder': '新增決定…',
|
|
83
|
+
'fabric.editor.defaultAltText': '清單項目',
|
|
81
84
|
'fabric.editor.displayBlock': '顯示卡片',
|
|
82
85
|
'fabric.editor.displayEmbed': '顯示嵌入',
|
|
83
86
|
'fabric.editor.displayInline': '顯示內嵌',
|
|
@@ -87,8 +90,11 @@ var _default = {
|
|
|
87
90
|
'fabric.editor.distributeColumns': '平均分配直欄寬度',
|
|
88
91
|
'fabric.editor.edit': '編輯',
|
|
89
92
|
'fabric.editor.editAltText': '編輯替代文字',
|
|
93
|
+
'fabric.editor.editDateText': '編輯日期',
|
|
90
94
|
'fabric.editor.editLink': '編輯連結',
|
|
91
95
|
'fabric.editor.editMode.inviteToEditButton.title': '邀請編輯',
|
|
96
|
+
'fabric.editor.editStatusColor': '編輯狀態顏色',
|
|
97
|
+
'fabric.editor.editStatusText': '編輯狀態',
|
|
92
98
|
'fabric.editor.editorHelp': '編輯器說明',
|
|
93
99
|
'fabric.editor.elementBrowser.help': '說明',
|
|
94
100
|
'fabric.editor.elementbrowser.categorylist.category-admin': '管理',
|
|
@@ -109,6 +115,7 @@ var _default = {
|
|
|
109
115
|
'fabric.editor.emoji': '表情符號',
|
|
110
116
|
'fabric.editor.emoji.description': '使用表情符號來傳達想法 🎉 和情緒 😄',
|
|
111
117
|
'fabric.editor.emptyLink': '請輸入連結。',
|
|
118
|
+
'fabric.editor.epic': '大型工作',
|
|
112
119
|
'fabric.editor.error': '錯誤',
|
|
113
120
|
'fabric.editor.errorPanel': '錯誤面板',
|
|
114
121
|
'fabric.editor.errorPanel.description': '以彩色面板呼叫錯誤',
|
|
@@ -123,6 +130,9 @@ var _default = {
|
|
|
123
130
|
'fabric.editor.findNext': '尋找下一個',
|
|
124
131
|
'fabric.editor.findPrevious': '尋找上一個',
|
|
125
132
|
'fabric.editor.findReplaceToolbarButton': '尋找與取代',
|
|
133
|
+
'fabric.editor.floatingToolbar.confirmModalCancel': '取消',
|
|
134
|
+
'fabric.editor.floatingToolbar.confirmModalHeading': '您確定嗎?',
|
|
135
|
+
'fabric.editor.floatingToolbar.confirmModalOK': '確定',
|
|
126
136
|
'fabric.editor.headerColumn': '標題欄',
|
|
127
137
|
'fabric.editor.headerRow': '標題列',
|
|
128
138
|
'fabric.editor.heading1': '標題 1',
|
|
@@ -144,8 +154,9 @@ var _default = {
|
|
|
144
154
|
'fabric.editor.horizontalRule.description': '使用水平線來區隔內容',
|
|
145
155
|
'fabric.editor.hyperlink.searchLinkAriaDescription': '當您在欄位中輸入內容時,建議會顯示在下方',
|
|
146
156
|
'fabric.editor.hyperlink.searchLinkResults': '{count, plural, =0 {沒有找到任何結果} other {找到 {count,number} 個結果}}',
|
|
147
|
-
'fabric.editor.hyperlinkToolbarPlaceholder': '
|
|
157
|
+
'fabric.editor.hyperlinkToolbarPlaceholder': '貼上或搜尋連結',
|
|
148
158
|
'fabric.editor.image': '影像',
|
|
159
|
+
'fabric.editor.improvement': '改善',
|
|
149
160
|
'fabric.editor.info': '資訊',
|
|
150
161
|
'fabric.editor.infoPanel': '資訊面板',
|
|
151
162
|
'fabric.editor.infoPanel.description': '以彩色面板醒目提示資訊',
|
|
@@ -183,7 +194,7 @@ var _default = {
|
|
|
183
194
|
'fabric.editor.orderedList.description': '建立已排序的清單',
|
|
184
195
|
'fabric.editor.other': '其他...',
|
|
185
196
|
'fabric.editor.panel.backgroundColor': '背景顏色',
|
|
186
|
-
'fabric.editor.panel.emoji': '
|
|
197
|
+
'fabric.editor.panel.emoji': '新增表情符號',
|
|
187
198
|
'fabric.editor.pastePlainText': '貼上純文字',
|
|
188
199
|
'fabric.editor.placeholderAltText': '使用替代文字描述這張圖片',
|
|
189
200
|
'fabric.editor.placeholderText': '預留位置文字',
|
|
@@ -208,7 +219,9 @@ var _default = {
|
|
|
208
219
|
'fabric.editor.status': '狀態',
|
|
209
220
|
'fabric.editor.status.description': '新增自訂狀態標籤',
|
|
210
221
|
'fabric.editor.statusPlaceholder': '設定狀態',
|
|
222
|
+
'fabric.editor.story': '故事',
|
|
211
223
|
'fabric.editor.strike': '刪除線',
|
|
224
|
+
'fabric.editor.subTask': '子任務',
|
|
212
225
|
'fabric.editor.subscript': '下標',
|
|
213
226
|
'fabric.editor.success': '成功',
|
|
214
227
|
'fabric.editor.successPanel': '成功面板',
|
|
@@ -218,6 +231,9 @@ var _default = {
|
|
|
218
231
|
'fabric.editor.table': '表格',
|
|
219
232
|
'fabric.editor.table.description': '插入表格',
|
|
220
233
|
'fabric.editor.tableOptions': '表格選項',
|
|
234
|
+
'fabric.editor.tables.confirmDeleteLinkedModalMessage': '移除這個表格也會將已連結圖表中的所有資料移除。',
|
|
235
|
+
'fabric.editor.tables.confirmDeleteLinkedModalOKButton': '移除表格和資料',
|
|
236
|
+
'fabric.editor.task': '任務',
|
|
221
237
|
'fabric.editor.taskPlaceholder': '輸入動作,使用「@」以指派給他人。',
|
|
222
238
|
'fabric.editor.textColor': '文字顏色',
|
|
223
239
|
'fabric.editor.textColor.lessColors': '較少色彩',
|
package/dist/cjs/messages.js
CHANGED
|
@@ -117,10 +117,10 @@ var _default = (0, _reactIntl.defineMessages)({
|
|
|
117
117
|
defaultMessage: 'Remove',
|
|
118
118
|
description: 'Delete the element (image, panel, table, etc.) from your document'
|
|
119
119
|
},
|
|
120
|
-
|
|
121
|
-
id: 'fabric.editor.
|
|
122
|
-
defaultMessage: '
|
|
123
|
-
description: '
|
|
120
|
+
removeEmoji: {
|
|
121
|
+
id: 'fabric.editor.removeEmoji',
|
|
122
|
+
defaultMessage: 'Remove emoji',
|
|
123
|
+
description: 'Remove the emoji panel icon from custom panel'
|
|
124
124
|
},
|
|
125
125
|
visit: {
|
|
126
126
|
id: 'fabric.editor.visit',
|
|
@@ -98,7 +98,6 @@ exports.ACTION = ACTION;
|
|
|
98
98
|
ACTION["VIEWED"] = "viewed";
|
|
99
99
|
ACTION["VISITED"] = "visited";
|
|
100
100
|
ACTION["WITH_PLUGIN_STATE_CALLED"] = "withPluginStateCalled";
|
|
101
|
-
ACTION["FIXED"] = "fixed";
|
|
102
101
|
ACTION["RENDERED"] = "rendered";
|
|
103
102
|
ACTION["ON_EDITOR_READY_CALLBACK"] = "onEditorReadyCallback";
|
|
104
103
|
ACTION["ON_CHANGE_CALLBACK"] = "onChangeCalled";
|
|
@@ -8,6 +8,7 @@ var LAYOUT_TYPE;
|
|
|
8
8
|
exports.LAYOUT_TYPE = LAYOUT_TYPE;
|
|
9
9
|
|
|
10
10
|
(function (LAYOUT_TYPE) {
|
|
11
|
+
LAYOUT_TYPE["SINGLE_COL"] = "singleColumn";
|
|
11
12
|
LAYOUT_TYPE["TWO_COLS_EQUAL"] = "twoColumnsEqual";
|
|
12
13
|
LAYOUT_TYPE["THREE_COLS_EQUAL"] = "threeColumnsEqual";
|
|
13
14
|
LAYOUT_TYPE["LEFT_SIDEBAR"] = "twoColumnsLeftSidebar";
|
|
@@ -27,18 +27,14 @@ var toAvatar = function toAvatar(participant) {
|
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var _default = (0, _memoizeOne.default)(toAvatar, function participantEquals(_ref, _ref2) {
|
|
31
31
|
var _ref3 = (0, _slicedToArray2.default)(_ref, 1),
|
|
32
|
-
|
|
32
|
+
a = _ref3[0];
|
|
33
33
|
|
|
34
34
|
var _ref4 = (0, _slicedToArray2.default)(_ref2, 1),
|
|
35
|
-
|
|
35
|
+
b = _ref4[0];
|
|
36
36
|
|
|
37
|
-
var a = aRaw;
|
|
38
|
-
var b = bRaw;
|
|
39
37
|
return a.name === b.name && a.avatar === b.avatar && a.sessionId === b.sessionId;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
var _default = (0, _memoizeOne.default)(toAvatar, participantEquals);
|
|
38
|
+
});
|
|
43
39
|
|
|
44
40
|
exports.default = _default;
|
package/dist/cjs/plugins/floating-toolbar/ui/{EditorHideEmojiIcon.js → EditorRemoveEmojiIcon.js}
RENAMED
|
@@ -5,11 +5,11 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.default =
|
|
8
|
+
exports.default = EditorRemoveEmojiIcon;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
|
|
12
|
-
function
|
|
12
|
+
function EditorRemoveEmojiIcon() {
|
|
13
13
|
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
14
14
|
width: "24",
|
|
15
15
|
height: "24",
|
|
@@ -38,6 +38,8 @@ var EmojiPickerButton = function EmojiPickerButton(props) {
|
|
|
38
38
|
isPopupOpen = _React$useState2[0],
|
|
39
39
|
setIsPopupOpen = _React$useState2[1];
|
|
40
40
|
|
|
41
|
+
var EmojiPickerWithListener = (0, _editorCommon.withOuterListeners)(_emoji.EmojiPicker);
|
|
42
|
+
|
|
41
43
|
var togglePopup = function togglePopup() {
|
|
42
44
|
setIsPopupOpen(!isPopupOpen);
|
|
43
45
|
};
|
|
@@ -52,10 +54,11 @@ var EmojiPickerButton = function EmojiPickerButton(props) {
|
|
|
52
54
|
return null;
|
|
53
55
|
}
|
|
54
56
|
|
|
55
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
57
|
+
return /*#__PURE__*/_react.default.createElement(EmojiPickerWithListener, {
|
|
56
58
|
emojiProvider: providers.emojiProvider,
|
|
57
59
|
onSelection: updateEmoji,
|
|
58
|
-
onPickerRef: function onPickerRef() {}
|
|
60
|
+
onPickerRef: function onPickerRef() {},
|
|
61
|
+
handleClickOutside: togglePopup
|
|
59
62
|
});
|
|
60
63
|
};
|
|
61
64
|
|
|
@@ -61,6 +61,20 @@ describe('emoji-picker-button', function () {
|
|
|
61
61
|
|
|
62
62
|
expect(wrapper.find('Popup')).toHaveLength(1);
|
|
63
63
|
});
|
|
64
|
+
it('should close EmojiPicker popup after clicking outside', function () {
|
|
65
|
+
// clicking on the button to open the popup
|
|
66
|
+
wrapper.find('button').simulate('click'); // make sure the popup and picker are shown
|
|
67
|
+
|
|
68
|
+
expect(wrapper.find('Popup')).toHaveLength(1);
|
|
69
|
+
var emojiPicker = wrapper.find('EmojiPickerInternal').instance(); // calling click outside
|
|
70
|
+
|
|
71
|
+
(0, _testUtils.act)(function () {
|
|
72
|
+
emojiPicker.props.handleClickOutside();
|
|
73
|
+
});
|
|
74
|
+
wrapper.update(); // make sure popup is hidden
|
|
75
|
+
|
|
76
|
+
expect(wrapper.find('Popup')).toHaveLength(0);
|
|
77
|
+
});
|
|
64
78
|
it('should hide popup and call onChange after selecting an emoji', function () {
|
|
65
79
|
// click the button
|
|
66
80
|
wrapper.find('button').simulate('click'); // make sure the popup and picker are shown
|
|
@@ -69,6 +69,8 @@ var _blockInsertMenu = require("./block-insert-menu");
|
|
|
69
69
|
|
|
70
70
|
var _commands6 = require("../../../rule/commands");
|
|
71
71
|
|
|
72
|
+
var _withOuterListeners = _interopRequireDefault(require("../../../../ui/with-outer-listeners"));
|
|
73
|
+
|
|
72
74
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
73
75
|
|
|
74
76
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
@@ -86,6 +88,8 @@ var isDetachedElement = function isDetachedElement(el) {
|
|
|
86
88
|
|
|
87
89
|
var noop = function noop() {};
|
|
88
90
|
|
|
91
|
+
var EmojiPickerWithListeners = (0, _withOuterListeners.default)(_picker.EmojiPicker);
|
|
92
|
+
|
|
89
93
|
var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
90
94
|
(0, _inherits2.default)(ToolbarInsertBlock, _React$PureComponent);
|
|
91
95
|
|
|
@@ -173,6 +177,18 @@ var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
173
177
|
}
|
|
174
178
|
});
|
|
175
179
|
});
|
|
180
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleEmojiPressEscape", function () {
|
|
181
|
+
_this.toggleEmojiPicker(_analytics.INPUT_METHOD.KEYBOARD);
|
|
182
|
+
});
|
|
183
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleEmojiClickOutside", function (e) {
|
|
184
|
+
// Ignore click events for detached elements.
|
|
185
|
+
// Workaround for FS-1322 - where two onClicks fire - one when the upload button is
|
|
186
|
+
// still in the document, and one once it's detached. Does not always occur, and
|
|
187
|
+
// may be a side effect of a react render optimisation
|
|
188
|
+
if (e.target && !isDetachedElement(e.target)) {
|
|
189
|
+
_this.toggleEmojiPicker(_analytics.INPUT_METHOD.TOOLBAR);
|
|
190
|
+
}
|
|
191
|
+
});
|
|
176
192
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleEmojiButtonRef", function (button) {
|
|
177
193
|
var ref = _reactDom.default.findDOMNode(button);
|
|
178
194
|
|
|
@@ -194,26 +210,6 @@ var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
194
210
|
_this.dropdownButtonRef = ref;
|
|
195
211
|
}
|
|
196
212
|
});
|
|
197
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onPickerRef", function (ref) {
|
|
198
|
-
if (ref) {
|
|
199
|
-
document.addEventListener('click', _this.handleClickOutside);
|
|
200
|
-
} else {
|
|
201
|
-
document.removeEventListener('click', _this.handleClickOutside);
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
_this.pickerRef = ref;
|
|
205
|
-
});
|
|
206
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleClickOutside", function (e) {
|
|
207
|
-
var picker = _this.pickerRef && _reactDom.default.findDOMNode(_this.pickerRef); // Ignore click events for detached elements.
|
|
208
|
-
// Workaround for FS-1322 - where two onClicks fire - one when the upload button is
|
|
209
|
-
// still in the document, and one once it's detached. Does not always occur, and
|
|
210
|
-
// may be a side effect of a react render optimisation
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
if (!picker || e.target && !isDetachedElement(e.target) && !picker.contains(e.target)) {
|
|
214
|
-
_this.toggleEmojiPicker();
|
|
215
|
-
}
|
|
216
|
-
});
|
|
217
213
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "toggleLinkPanel", function (inputMethod) {
|
|
218
214
|
var editorView = _this.props.editorView;
|
|
219
215
|
(0, _commands5.showLinkToolbar)(inputMethod)(editorView.state, editorView.dispatch);
|
|
@@ -501,10 +497,11 @@ var ToolbarInsertBlock = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
501
497
|
mountTo: popupsMountPoint,
|
|
502
498
|
boundariesElement: popupsBoundariesElement,
|
|
503
499
|
scrollableElement: popupsScrollableElement
|
|
504
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
500
|
+
}, /*#__PURE__*/_react.default.createElement(EmojiPickerWithListeners, {
|
|
505
501
|
emojiProvider: emojiProvider,
|
|
506
502
|
onSelection: this.handleSelectedEmoji,
|
|
507
|
-
|
|
503
|
+
handleClickOutside: this.handleEmojiClickOutside,
|
|
504
|
+
handleEscapeKeydown: this.handleEmojiPressEscape
|
|
508
505
|
}));
|
|
509
506
|
}
|
|
510
507
|
}, {
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.forceSectionToPresetLayout = forceSectionToPresetLayout;
|
|
9
|
-
exports.deleteActiveLayoutNode = exports.fixColumnStructure = exports.fixColumnSizes = exports.setPresetLayout = exports.insertLayoutColumnsWithAnalytics = exports.insertLayoutColumns = exports.createDefaultLayoutSection = exports.getSelectedLayout = exports.getPresetLayout = exports.THREE_COL_LAYOUTS = exports.TWO_COL_LAYOUTS = void 0;
|
|
9
|
+
exports.deleteActiveLayoutNode = exports.fixColumnStructure = exports.fixColumnSizes = exports.setPresetLayout = exports.insertLayoutColumnsWithAnalytics = exports.insertLayoutColumns = exports.createDefaultLayoutSection = exports.getSelectedLayout = exports.getPresetLayout = exports.THREE_COL_LAYOUTS = exports.TWO_COL_LAYOUTS = exports.ONE_COL_LAYOUTS = void 0;
|
|
10
10
|
|
|
11
11
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
12
|
|
|
@@ -32,6 +32,8 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
32
32
|
|
|
33
33
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
34
34
|
|
|
35
|
+
var ONE_COL_LAYOUTS = ['single'];
|
|
36
|
+
exports.ONE_COL_LAYOUTS = ONE_COL_LAYOUTS;
|
|
35
37
|
var TWO_COL_LAYOUTS = ['two_equal', 'two_left_sidebar', 'two_right_sidebar'];
|
|
36
38
|
exports.TWO_COL_LAYOUTS = TWO_COL_LAYOUTS;
|
|
37
39
|
var THREE_COL_LAYOUTS = ['three_equal', 'three_with_sidebars'];
|
|
@@ -39,6 +41,9 @@ exports.THREE_COL_LAYOUTS = THREE_COL_LAYOUTS;
|
|
|
39
41
|
|
|
40
42
|
var getWidthsForPreset = function getWidthsForPreset(presetLayout) {
|
|
41
43
|
switch (presetLayout) {
|
|
44
|
+
case 'single':
|
|
45
|
+
return [100];
|
|
46
|
+
|
|
42
47
|
case 'two_equal':
|
|
43
48
|
return [50, 50];
|
|
44
49
|
|
|
@@ -67,6 +72,9 @@ var getPresetLayout = function getPresetLayout(section) {
|
|
|
67
72
|
}).join(',');
|
|
68
73
|
|
|
69
74
|
switch (widths) {
|
|
75
|
+
case '100':
|
|
76
|
+
return 'single';
|
|
77
|
+
|
|
70
78
|
case '33.33,33.33,33.33':
|
|
71
79
|
return 'three_equal';
|
|
72
80
|
|
|
@@ -135,6 +143,47 @@ var insertLayoutColumnsWithAnalytics = function insertLayoutColumnsWithAnalytics
|
|
|
135
143
|
eventType: _enums.EVENT_TYPE.TRACK
|
|
136
144
|
})(insertLayoutColumns);
|
|
137
145
|
};
|
|
146
|
+
/**
|
|
147
|
+
* Add a column to the right of existing layout
|
|
148
|
+
*/
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
exports.insertLayoutColumnsWithAnalytics = insertLayoutColumnsWithAnalytics;
|
|
152
|
+
|
|
153
|
+
function addColumn(schema, pos) {
|
|
154
|
+
return function (tr) {
|
|
155
|
+
tr.replaceWith(tr.mapping.map(pos), tr.mapping.map(pos), schema.nodes.layoutColumn.createAndFill());
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
function removeLastColumnInLayout(column, columnPos, insideRightEdgePos) {
|
|
160
|
+
return function (tr) {
|
|
161
|
+
if ((0, _utils.isEmptyDocument)(column)) {
|
|
162
|
+
tr.replaceRange(tr.mapping.map(columnPos - 1), tr.mapping.map(insideRightEdgePos), _prosemirrorModel.Slice.empty);
|
|
163
|
+
} else {
|
|
164
|
+
tr.replaceRange(tr.mapping.map(columnPos - 1), tr.mapping.map(columnPos + 1), _prosemirrorModel.Slice.empty);
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
var fromTwoColsToThree = addColumn;
|
|
170
|
+
var fromOneColToTwo = addColumn;
|
|
171
|
+
var fromTwoColsToOne = removeLastColumnInLayout;
|
|
172
|
+
var fromThreeColsToTwo = removeLastColumnInLayout;
|
|
173
|
+
|
|
174
|
+
var fromOneColToThree = function fromOneColToThree(schema, pos) {
|
|
175
|
+
return function (tr) {
|
|
176
|
+
addColumn(schema, pos)(tr);
|
|
177
|
+
addColumn(schema, pos)(tr);
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
var fromThreeColstoOne = function fromThreeColstoOne(node, tr, insideRightEdgePos) {
|
|
182
|
+
var thirdColumn = node.content.child(2);
|
|
183
|
+
fromThreeColsToTwo(thirdColumn, insideRightEdgePos - thirdColumn.nodeSize, insideRightEdgePos)(tr);
|
|
184
|
+
var secondColumn = node.content.child(1);
|
|
185
|
+
fromTwoColsToOne(secondColumn, insideRightEdgePos - thirdColumn.nodeSize - secondColumn.nodeSize, insideRightEdgePos)(tr);
|
|
186
|
+
};
|
|
138
187
|
/**
|
|
139
188
|
* Handles switching from 2 -> 3 cols, or 3 -> 2 cols
|
|
140
189
|
* Switching from 2 -> 3 just adds a new one at the end
|
|
@@ -143,27 +192,29 @@ var insertLayoutColumnsWithAnalytics = function insertLayoutColumnsWithAnalytics
|
|
|
143
192
|
*/
|
|
144
193
|
|
|
145
194
|
|
|
146
|
-
exports.insertLayoutColumnsWithAnalytics = insertLayoutColumnsWithAnalytics;
|
|
147
|
-
|
|
148
195
|
function forceColumnStructure(state, node, pos, presetLayout) {
|
|
149
196
|
var tr = state.tr;
|
|
150
197
|
var insideRightEdgeOfLayoutSection = pos + node.nodeSize - 1;
|
|
151
|
-
var numCols = node.childCount;
|
|
198
|
+
var numCols = node.childCount; // 3 columns -> 2 columns
|
|
152
199
|
|
|
153
200
|
if (TWO_COL_LAYOUTS.indexOf(presetLayout) >= 0 && numCols === 3) {
|
|
154
201
|
var thirdColumn = node.content.child(2);
|
|
155
|
-
var
|
|
156
|
-
|
|
157
|
-
if ((0, _utils.isEmptyDocument)(thirdColumn)) {
|
|
158
|
-
tr.replaceRange( // end pos of second column
|
|
159
|
-
tr.mapping.map(thirdColumnPos - 1), tr.mapping.map(insideRightEdgeOfLayoutSection), _prosemirrorModel.Slice.empty);
|
|
160
|
-
} else {
|
|
161
|
-
tr.replaceRange( // end pos of second column
|
|
162
|
-
tr.mapping.map(thirdColumnPos - 1), // start pos of third column
|
|
163
|
-
tr.mapping.map(thirdColumnPos + 1), _prosemirrorModel.Slice.empty);
|
|
164
|
-
}
|
|
202
|
+
var columnPos = insideRightEdgeOfLayoutSection - thirdColumn.nodeSize;
|
|
203
|
+
fromThreeColsToTwo(thirdColumn, columnPos, insideRightEdgeOfLayoutSection)(tr); // 2 columns -> 3 columns
|
|
165
204
|
} else if (THREE_COL_LAYOUTS.indexOf(presetLayout) >= 0 && numCols === 2) {
|
|
166
|
-
|
|
205
|
+
fromTwoColsToThree(state.schema, insideRightEdgeOfLayoutSection)(tr); // 2 columns -> 1 column
|
|
206
|
+
} else if (ONE_COL_LAYOUTS.indexOf(presetLayout) >= 0 && numCols === 2) {
|
|
207
|
+
var secondColumn = node.content.child(1);
|
|
208
|
+
|
|
209
|
+
var _columnPos = insideRightEdgeOfLayoutSection - secondColumn.nodeSize;
|
|
210
|
+
|
|
211
|
+
fromTwoColsToOne(secondColumn, _columnPos, insideRightEdgeOfLayoutSection)(tr); // 3 columns -> 1 column
|
|
212
|
+
} else if (ONE_COL_LAYOUTS.indexOf(presetLayout) >= 0 && numCols === 3) {
|
|
213
|
+
fromThreeColstoOne(node, tr, insideRightEdgeOfLayoutSection); // 1 column -> 2 columns
|
|
214
|
+
} else if (TWO_COL_LAYOUTS.indexOf(presetLayout) >= 0 && numCols === 1) {
|
|
215
|
+
fromOneColToTwo(state.schema, insideRightEdgeOfLayoutSection)(tr); // 1 column -> 3 columns
|
|
216
|
+
} else if (THREE_COL_LAYOUTS.indexOf(presetLayout) >= 0 && numCols === 1) {
|
|
217
|
+
fromOneColToThree(state.schema, insideRightEdgeOfLayoutSection)(tr);
|
|
167
218
|
}
|
|
168
219
|
|
|
169
220
|
return tr;
|
|
@@ -259,7 +310,7 @@ function getLayoutChange(node, pos, schema) {
|
|
|
259
310
|
return;
|
|
260
311
|
}
|
|
261
312
|
|
|
262
|
-
var presetLayout = node.childCount === 2 ? 'two_equal' : 'three_equal';
|
|
313
|
+
var presetLayout = node.childCount === 2 ? 'two_equal' : node.childCount === 3 ? 'three_equal' : 'single';
|
|
263
314
|
var fixedColumns = columnWidth(node, schema, getWidthsForPreset(presetLayout));
|
|
264
315
|
return {
|
|
265
316
|
from: pos + 1,
|
|
@@ -360,6 +411,9 @@ exports.deleteActiveLayoutNode = deleteActiveLayoutNode;
|
|
|
360
411
|
|
|
361
412
|
var formatLayoutName = function formatLayoutName(layout) {
|
|
362
413
|
switch (layout) {
|
|
414
|
+
case 'single':
|
|
415
|
+
return _nodeEvents.LAYOUT_TYPE.SINGLE_COL;
|
|
416
|
+
|
|
363
417
|
case 'two_equal':
|
|
364
418
|
return _nodeEvents.LAYOUT_TYPE.TWO_COLS_EQUAL;
|
|
365
419
|
|
|
@@ -57,10 +57,11 @@ var layoutPlugin = function layoutPlugin() {
|
|
|
57
57
|
var _ref = _pluginKey.pluginKey.getState(state),
|
|
58
58
|
pos = _ref.pos,
|
|
59
59
|
allowBreakout = _ref.allowBreakout,
|
|
60
|
-
addSidebarLayouts = _ref.addSidebarLayouts
|
|
60
|
+
addSidebarLayouts = _ref.addSidebarLayouts,
|
|
61
|
+
allowSingleColumnLayout = _ref.allowSingleColumnLayout;
|
|
61
62
|
|
|
62
63
|
if (pos !== null) {
|
|
63
|
-
return (0, _toolbar.buildToolbar)(state, intl, pos, allowBreakout, addSidebarLayouts);
|
|
64
|
+
return (0, _toolbar.buildToolbar)(state, intl, pos, allowBreakout, addSidebarLayouts, allowSingleColumnLayout);
|
|
64
65
|
}
|
|
65
66
|
|
|
66
67
|
return undefined;
|
|
@@ -76,13 +76,15 @@ var getInitialPluginState = function getInitialPluginState(options, state) {
|
|
|
76
76
|
var maybeLayoutSection = (0, _prosemirrorUtils.findParentNodeOfType)(state.schema.nodes.layoutSection)(state.selection);
|
|
77
77
|
var allowBreakout = options.allowBreakout || false;
|
|
78
78
|
var addSidebarLayouts = options.UNSAFE_addSidebarLayouts || false;
|
|
79
|
+
var allowSingleColumnLayout = options.UNSAFE_allowSingleColumnLayout || false;
|
|
79
80
|
var pos = maybeLayoutSection ? maybeLayoutSection.pos : null;
|
|
80
81
|
var selectedLayout = (0, _actions.getSelectedLayout)(maybeLayoutSection && maybeLayoutSection.node, DEFAULT_LAYOUT);
|
|
81
82
|
return {
|
|
82
83
|
pos: pos,
|
|
83
84
|
allowBreakout: allowBreakout,
|
|
84
85
|
addSidebarLayouts: addSidebarLayouts,
|
|
85
|
-
selectedLayout: selectedLayout
|
|
86
|
+
selectedLayout: selectedLayout,
|
|
87
|
+
allowSingleColumnLayout: allowSingleColumnLayout
|
|
86
88
|
};
|
|
87
89
|
};
|
|
88
90
|
|