@atlaskit/editor-core 189.4.9 → 189.4.12
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 +15 -0
- package/dist/cjs/composable-editor/editor-internal.js +3 -3
- package/dist/cjs/composable-editor/editor.js +202 -3
- package/dist/cjs/i18n/cs.js +1 -3
- package/dist/cjs/i18n/da.js +1 -3
- package/dist/cjs/i18n/de.js +1 -3
- package/dist/cjs/i18n/en.js +1 -3
- package/dist/cjs/i18n/en_GB.js +1 -3
- package/dist/cjs/i18n/en_ZZ.js +1 -3
- package/dist/cjs/i18n/es.js +1 -3
- package/dist/cjs/i18n/fi.js +1 -3
- package/dist/cjs/i18n/fr.js +1 -3
- package/dist/cjs/i18n/hu.js +1 -3
- package/dist/cjs/i18n/it.js +1 -3
- package/dist/cjs/i18n/ja.js +1 -3
- package/dist/cjs/i18n/ko.js +1 -3
- package/dist/cjs/i18n/nb.js +1 -3
- package/dist/cjs/i18n/nl.js +1 -3
- package/dist/cjs/i18n/pl.js +1 -3
- package/dist/cjs/i18n/pt_BR.js +1 -3
- package/dist/cjs/i18n/ru.js +1 -3
- package/dist/cjs/i18n/sv.js +1 -3
- package/dist/cjs/i18n/th.js +1 -3
- package/dist/cjs/i18n/tr.js +1 -3
- package/dist/cjs/i18n/uk.js +1 -3
- package/dist/cjs/i18n/vi.js +1 -3
- package/dist/cjs/i18n/zh.js +1 -3
- package/dist/cjs/i18n/zh_TW.js +1 -3
- package/dist/cjs/plugins/index.js +1 -15
- package/dist/cjs/presets/default.js +2 -2
- package/dist/cjs/presets/universal.js +2 -1
- package/dist/cjs/ui/ConfigPanel/ConfigPanel.js +11 -3
- package/dist/cjs/ui/ConfigPanel/constants.js +13 -0
- package/dist/cjs/ui/ConfigPanel/utils.js +44 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/composable-editor/editor-internal.js +4 -4
- package/dist/es2019/composable-editor/editor.js +208 -4
- package/dist/es2019/i18n/cs.js +1 -3
- package/dist/es2019/i18n/da.js +1 -3
- package/dist/es2019/i18n/de.js +1 -3
- package/dist/es2019/i18n/en.js +1 -3
- package/dist/es2019/i18n/en_GB.js +1 -3
- package/dist/es2019/i18n/en_ZZ.js +1 -3
- package/dist/es2019/i18n/es.js +1 -3
- package/dist/es2019/i18n/fi.js +1 -3
- package/dist/es2019/i18n/fr.js +1 -3
- package/dist/es2019/i18n/hu.js +1 -3
- package/dist/es2019/i18n/it.js +1 -3
- package/dist/es2019/i18n/ja.js +1 -3
- package/dist/es2019/i18n/ko.js +1 -3
- package/dist/es2019/i18n/nb.js +1 -3
- package/dist/es2019/i18n/nl.js +1 -3
- package/dist/es2019/i18n/pl.js +1 -3
- package/dist/es2019/i18n/pt_BR.js +1 -3
- package/dist/es2019/i18n/ru.js +1 -3
- package/dist/es2019/i18n/sv.js +1 -3
- package/dist/es2019/i18n/th.js +1 -3
- package/dist/es2019/i18n/tr.js +1 -3
- package/dist/es2019/i18n/uk.js +1 -3
- package/dist/es2019/i18n/vi.js +1 -3
- package/dist/es2019/i18n/zh.js +1 -3
- package/dist/es2019/i18n/zh_TW.js +1 -3
- package/dist/es2019/plugins/index.js +1 -3
- package/dist/es2019/presets/default.js +2 -2
- package/dist/es2019/presets/universal.js +2 -1
- package/dist/es2019/ui/ConfigPanel/ConfigPanel.js +11 -2
- package/dist/es2019/ui/ConfigPanel/constants.js +7 -0
- package/dist/es2019/ui/ConfigPanel/utils.js +35 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/composable-editor/editor-internal.js +3 -3
- package/dist/esm/composable-editor/editor.js +203 -4
- package/dist/esm/i18n/cs.js +1 -3
- package/dist/esm/i18n/da.js +1 -3
- package/dist/esm/i18n/de.js +1 -3
- package/dist/esm/i18n/en.js +1 -3
- package/dist/esm/i18n/en_GB.js +1 -3
- package/dist/esm/i18n/en_ZZ.js +1 -3
- package/dist/esm/i18n/es.js +1 -3
- package/dist/esm/i18n/fi.js +1 -3
- package/dist/esm/i18n/fr.js +1 -3
- package/dist/esm/i18n/hu.js +1 -3
- package/dist/esm/i18n/it.js +1 -3
- package/dist/esm/i18n/ja.js +1 -3
- package/dist/esm/i18n/ko.js +1 -3
- package/dist/esm/i18n/nb.js +1 -3
- package/dist/esm/i18n/nl.js +1 -3
- package/dist/esm/i18n/pl.js +1 -3
- package/dist/esm/i18n/pt_BR.js +1 -3
- package/dist/esm/i18n/ru.js +1 -3
- package/dist/esm/i18n/sv.js +1 -3
- package/dist/esm/i18n/th.js +1 -3
- package/dist/esm/i18n/tr.js +1 -3
- package/dist/esm/i18n/uk.js +1 -3
- package/dist/esm/i18n/vi.js +1 -3
- package/dist/esm/i18n/zh.js +1 -3
- package/dist/esm/i18n/zh_TW.js +1 -3
- package/dist/esm/plugins/index.js +1 -3
- package/dist/esm/presets/default.js +2 -2
- package/dist/esm/presets/universal.js +2 -1
- package/dist/esm/ui/ConfigPanel/ConfigPanel.js +11 -3
- package/dist/esm/ui/ConfigPanel/constants.js +7 -0
- package/dist/esm/ui/ConfigPanel/utils.js +42 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/composable-editor/editor-internal.d.ts +2 -1
- package/dist/types/i18n/cs.d.ts +0 -2
- package/dist/types/i18n/da.d.ts +0 -2
- package/dist/types/i18n/de.d.ts +0 -2
- package/dist/types/i18n/en.d.ts +0 -2
- package/dist/types/i18n/en_GB.d.ts +0 -2
- package/dist/types/i18n/en_ZZ.d.ts +0 -2
- package/dist/types/i18n/es.d.ts +0 -2
- package/dist/types/i18n/fi.d.ts +0 -2
- package/dist/types/i18n/fr.d.ts +0 -2
- package/dist/types/i18n/hu.d.ts +0 -2
- package/dist/types/i18n/it.d.ts +0 -2
- package/dist/types/i18n/ja.d.ts +0 -2
- package/dist/types/i18n/ko.d.ts +0 -2
- package/dist/types/i18n/nb.d.ts +0 -2
- package/dist/types/i18n/nl.d.ts +0 -2
- package/dist/types/i18n/pl.d.ts +0 -2
- package/dist/types/i18n/pt_BR.d.ts +0 -2
- package/dist/types/i18n/ru.d.ts +0 -2
- package/dist/types/i18n/sv.d.ts +0 -2
- package/dist/types/i18n/th.d.ts +0 -2
- package/dist/types/i18n/tr.d.ts +0 -2
- package/dist/types/i18n/uk.d.ts +0 -2
- package/dist/types/i18n/vi.d.ts +0 -2
- package/dist/types/i18n/zh.d.ts +0 -2
- package/dist/types/i18n/zh_TW.d.ts +0 -2
- package/dist/types/plugins/index.d.ts +0 -2
- package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +3 -4
- package/dist/types/ui/ConfigPanel/constants.d.ts +2 -0
- package/dist/types/ui/ConfigPanel/utils.d.ts +2 -1
- package/dist/types-ts4.5/composable-editor/editor-internal.d.ts +2 -1
- package/dist/types-ts4.5/i18n/cs.d.ts +0 -2
- package/dist/types-ts4.5/i18n/da.d.ts +0 -2
- package/dist/types-ts4.5/i18n/de.d.ts +0 -2
- package/dist/types-ts4.5/i18n/en.d.ts +0 -2
- package/dist/types-ts4.5/i18n/en_GB.d.ts +0 -2
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +0 -2
- package/dist/types-ts4.5/i18n/es.d.ts +0 -2
- package/dist/types-ts4.5/i18n/fi.d.ts +0 -2
- package/dist/types-ts4.5/i18n/fr.d.ts +0 -2
- package/dist/types-ts4.5/i18n/hu.d.ts +0 -2
- package/dist/types-ts4.5/i18n/it.d.ts +0 -2
- package/dist/types-ts4.5/i18n/ja.d.ts +0 -2
- package/dist/types-ts4.5/i18n/ko.d.ts +0 -2
- package/dist/types-ts4.5/i18n/nb.d.ts +0 -2
- package/dist/types-ts4.5/i18n/nl.d.ts +0 -2
- package/dist/types-ts4.5/i18n/pl.d.ts +0 -2
- package/dist/types-ts4.5/i18n/pt_BR.d.ts +0 -2
- package/dist/types-ts4.5/i18n/ru.d.ts +0 -2
- package/dist/types-ts4.5/i18n/sv.d.ts +0 -2
- package/dist/types-ts4.5/i18n/th.d.ts +0 -2
- package/dist/types-ts4.5/i18n/tr.d.ts +0 -2
- package/dist/types-ts4.5/i18n/uk.d.ts +0 -2
- package/dist/types-ts4.5/i18n/vi.d.ts +0 -2
- package/dist/types-ts4.5/i18n/zh.d.ts +0 -2
- package/dist/types-ts4.5/i18n/zh_TW.d.ts +0 -2
- package/dist/types-ts4.5/plugins/index.d.ts +0 -2
- package/dist/types-ts4.5/ui/ConfigPanel/ConfigPanel.d.ts +3 -4
- package/dist/types-ts4.5/ui/ConfigPanel/constants.d.ts +2 -0
- package/dist/types-ts4.5/ui/ConfigPanel/utils.d.ts +2 -1
- package/package.json +10 -6
- package/dist/cjs/plugins/clear-marks-on-change-to-empty-document/index.js +0 -35
- package/dist/cjs/plugins/code-bidi-warning/index.js +0 -22
- package/dist/cjs/plugins/code-bidi-warning/plugin-key.js +0 -8
- package/dist/cjs/plugins/code-bidi-warning/pm-plugins/main.js +0 -44
- package/dist/cjs/plugins/code-bidi-warning/pm-plugins/plugin-factory.js +0 -105
- package/dist/cjs/plugins/code-bidi-warning/pm-plugins/reducer.js +0 -9
- package/dist/cjs/plugins/code-bidi-warning/pm-plugins/types.js +0 -5
- package/dist/es2019/plugins/clear-marks-on-change-to-empty-document/index.js +0 -26
- package/dist/es2019/plugins/code-bidi-warning/index.js +0 -15
- package/dist/es2019/plugins/code-bidi-warning/plugin-key.js +0 -2
- package/dist/es2019/plugins/code-bidi-warning/pm-plugins/main.js +0 -41
- package/dist/es2019/plugins/code-bidi-warning/pm-plugins/plugin-factory.js +0 -97
- package/dist/es2019/plugins/code-bidi-warning/pm-plugins/reducer.js +0 -3
- package/dist/es2019/plugins/code-bidi-warning/pm-plugins/types.js +0 -1
- package/dist/esm/plugins/clear-marks-on-change-to-empty-document/index.js +0 -28
- package/dist/esm/plugins/code-bidi-warning/index.js +0 -16
- package/dist/esm/plugins/code-bidi-warning/plugin-key.js +0 -2
- package/dist/esm/plugins/code-bidi-warning/pm-plugins/main.js +0 -38
- package/dist/esm/plugins/code-bidi-warning/pm-plugins/plugin-factory.js +0 -98
- package/dist/esm/plugins/code-bidi-warning/pm-plugins/reducer.js +0 -3
- package/dist/esm/plugins/code-bidi-warning/pm-plugins/types.js +0 -1
- package/dist/types/plugins/clear-marks-on-change-to-empty-document/index.d.ts +0 -7
- package/dist/types/plugins/code-bidi-warning/index.d.ts +0 -8
- package/dist/types/plugins/code-bidi-warning/plugin-key.d.ts +0 -2
- package/dist/types/plugins/code-bidi-warning/pm-plugins/main.d.ts +0 -5
- package/dist/types/plugins/code-bidi-warning/pm-plugins/plugin-factory.d.ts +0 -8
- package/dist/types/plugins/code-bidi-warning/pm-plugins/reducer.d.ts +0 -3
- package/dist/types/plugins/code-bidi-warning/pm-plugins/types.d.ts +0 -6
- package/dist/types-ts4.5/plugins/clear-marks-on-change-to-empty-document/index.d.ts +0 -7
- package/dist/types-ts4.5/plugins/code-bidi-warning/index.d.ts +0 -8
- package/dist/types-ts4.5/plugins/code-bidi-warning/plugin-key.d.ts +0 -2
- package/dist/types-ts4.5/plugins/code-bidi-warning/pm-plugins/main.d.ts +0 -5
- package/dist/types-ts4.5/plugins/code-bidi-warning/pm-plugins/plugin-factory.d.ts +0 -8
- package/dist/types-ts4.5/plugins/code-bidi-warning/pm-plugins/reducer.d.ts +0 -3
- package/dist/types-ts4.5/plugins/code-bidi-warning/pm-plugins/types.d.ts +0 -6
package/dist/cjs/i18n/tr.js
CHANGED
|
@@ -36,7 +36,6 @@ var _default = exports.default = {
|
|
|
36
36
|
'fabric.editor.configPanel.invalid': 'Geçersiz alan',
|
|
37
37
|
'fabric.editor.configPanel.required': 'Gerekli alan',
|
|
38
38
|
'fabric.editor.configPanel.submit': 'Gönder',
|
|
39
|
-
'fabric.editor.decisionPlaceholder': 'Karar ekle…',
|
|
40
39
|
'fabric.editor.edit': 'Düzenle',
|
|
41
40
|
'fabric.editor.editorAssistiveLabel': 'Ana içerik alanı, metin girmek için yazmaya başlayın.',
|
|
42
41
|
'fabric.editor.editors': 'Düzenleyiciler',
|
|
@@ -55,6 +54,5 @@ var _default = exports.default = {
|
|
|
55
54
|
'fabric.editor.replace': 'Değiştir',
|
|
56
55
|
'fabric.editor.replaceAll': 'Tümünü değiştir',
|
|
57
56
|
'fabric.editor.replaceWith': 'Yeni değer',
|
|
58
|
-
'fabric.editor.resultsCount': '{selectedMatchPosition}/{totalResultsCount}'
|
|
59
|
-
'fabric.editor.taskPlaceholder': "Yapılacak eylemi yazın, birine atamak için '@' kullanın."
|
|
57
|
+
'fabric.editor.resultsCount': '{selectedMatchPosition}/{totalResultsCount}'
|
|
60
58
|
};
|
package/dist/cjs/i18n/uk.js
CHANGED
|
@@ -36,7 +36,6 @@ var _default = exports.default = {
|
|
|
36
36
|
'fabric.editor.configPanel.invalid': 'Недопустиме значення поля',
|
|
37
37
|
'fabric.editor.configPanel.required': 'Обов’язкове поле',
|
|
38
38
|
'fabric.editor.configPanel.submit': 'Надіслати',
|
|
39
|
-
'fabric.editor.decisionPlaceholder': 'Додати рішення...',
|
|
40
39
|
'fabric.editor.edit': 'Редагувати',
|
|
41
40
|
'fabric.editor.editorAssistiveLabel': 'Основна область вмісту: почніть вводити текст.',
|
|
42
41
|
'fabric.editor.editors': 'Редактори',
|
|
@@ -55,6 +54,5 @@ var _default = exports.default = {
|
|
|
55
54
|
'fabric.editor.replace': 'Замінити',
|
|
56
55
|
'fabric.editor.replaceAll': 'Замінити всі',
|
|
57
56
|
'fabric.editor.replaceWith': 'Замінити на',
|
|
58
|
-
'fabric.editor.resultsCount': '{selectedMatchPosition} з {totalResultsCount}'
|
|
59
|
-
'fabric.editor.taskPlaceholder': 'Вкажіть задачу. Призначте її комусь за допомогою символу «@».'
|
|
57
|
+
'fabric.editor.resultsCount': '{selectedMatchPosition} з {totalResultsCount}'
|
|
60
58
|
};
|
package/dist/cjs/i18n/vi.js
CHANGED
|
@@ -36,7 +36,6 @@ var _default = exports.default = {
|
|
|
36
36
|
'fabric.editor.configPanel.invalid': 'Trường không hợp lệ',
|
|
37
37
|
'fabric.editor.configPanel.required': 'Trường bắt buộc',
|
|
38
38
|
'fabric.editor.configPanel.submit': 'Gửi',
|
|
39
|
-
'fabric.editor.decisionPlaceholder': 'Thêm quyết định…',
|
|
40
39
|
'fabric.editor.edit': 'Chỉnh sửa',
|
|
41
40
|
'fabric.editor.editorAssistiveLabel': 'Vùng nội dung chính, bắt đầu gõ để nhập văn bản.',
|
|
42
41
|
'fabric.editor.editors': 'Người chỉnh sửa',
|
|
@@ -55,6 +54,5 @@ var _default = exports.default = {
|
|
|
55
54
|
'fabric.editor.replace': 'Thay thế',
|
|
56
55
|
'fabric.editor.replaceAll': 'Thay thế tất cả',
|
|
57
56
|
'fabric.editor.replaceWith': 'Thay thế bằng',
|
|
58
|
-
'fabric.editor.resultsCount': '{selectedMatchPosition}/{totalResultsCount}'
|
|
59
|
-
'fabric.editor.taskPlaceholder': "Nhập thao tác của bạn, sử dụng '@' để chỉ định cho người nào đó."
|
|
57
|
+
'fabric.editor.resultsCount': '{selectedMatchPosition}/{totalResultsCount}'
|
|
60
58
|
};
|
package/dist/cjs/i18n/zh.js
CHANGED
|
@@ -36,7 +36,6 @@ var _default = exports.default = {
|
|
|
36
36
|
'fabric.editor.configPanel.invalid': '无效字段',
|
|
37
37
|
'fabric.editor.configPanel.required': '必填字段',
|
|
38
38
|
'fabric.editor.configPanel.submit': '提交',
|
|
39
|
-
'fabric.editor.decisionPlaceholder': '添加决定...',
|
|
40
39
|
'fabric.editor.edit': '编辑',
|
|
41
40
|
'fabric.editor.editorAssistiveLabel': '主内容区域,开始键入以输入文本。',
|
|
42
41
|
'fabric.editor.editors': '编辑者',
|
|
@@ -55,6 +54,5 @@ var _default = exports.default = {
|
|
|
55
54
|
'fabric.editor.replace': '替换',
|
|
56
55
|
'fabric.editor.replaceAll': '全部替换',
|
|
57
56
|
'fabric.editor.replaceWith': '替换为',
|
|
58
|
-
'fabric.editor.resultsCount': '{selectedMatchPosition}/{totalResultsCount}'
|
|
59
|
-
'fabric.editor.taskPlaceholder': '输入您的操作,使用“@”进行分配。'
|
|
57
|
+
'fabric.editor.resultsCount': '{selectedMatchPosition}/{totalResultsCount}'
|
|
60
58
|
};
|
package/dist/cjs/i18n/zh_TW.js
CHANGED
|
@@ -36,7 +36,6 @@ var _default = exports.default = {
|
|
|
36
36
|
'fabric.editor.configPanel.invalid': '無效欄位',
|
|
37
37
|
'fabric.editor.configPanel.required': '必要欄位',
|
|
38
38
|
'fabric.editor.configPanel.submit': '提交',
|
|
39
|
-
'fabric.editor.decisionPlaceholder': '新增決定…',
|
|
40
39
|
'fabric.editor.edit': '編輯',
|
|
41
40
|
'fabric.editor.editorAssistiveLabel': '主要內容區域,打字即可輸入文字。',
|
|
42
41
|
'fabric.editor.editors': '編輯者',
|
|
@@ -55,6 +54,5 @@ var _default = exports.default = {
|
|
|
55
54
|
'fabric.editor.replace': '取代',
|
|
56
55
|
'fabric.editor.replaceAll': '全部取代',
|
|
57
56
|
'fabric.editor.replaceWith': '取代為',
|
|
58
|
-
'fabric.editor.resultsCount': '第 {selectedMatchPosition} 個,共 {totalResultsCount} 個'
|
|
59
|
-
'fabric.editor.taskPlaceholder': '輸入動作,使用「@」以指派給他人。'
|
|
57
|
+
'fabric.editor.resultsCount': '第 {selectedMatchPosition} 個,共 {totalResultsCount} 個'
|
|
60
58
|
};
|
|
@@ -34,18 +34,6 @@ Object.defineProperty(exports, "breakoutPlugin", {
|
|
|
34
34
|
return _breakout.default;
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
|
-
Object.defineProperty(exports, "clearMarksOnChangeToEmptyDocumentPlugin", {
|
|
38
|
-
enumerable: true,
|
|
39
|
-
get: function get() {
|
|
40
|
-
return _clearMarksOnChangeToEmptyDocument.default;
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
Object.defineProperty(exports, "codeBidiWarningPlugin", {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
get: function get() {
|
|
46
|
-
return _codeBidiWarning.default;
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
37
|
Object.defineProperty(exports, "collabEditPlugin", {
|
|
50
38
|
enumerable: true,
|
|
51
39
|
get: function get() {
|
|
@@ -118,7 +106,6 @@ Object.defineProperty(exports, "viewUpdateSubscriptionPlugin", {
|
|
|
118
106
|
return _viewUpdateSubscription.default;
|
|
119
107
|
}
|
|
120
108
|
});
|
|
121
|
-
var _clearMarksOnChangeToEmptyDocument = _interopRequireDefault(require("./clear-marks-on-change-to-empty-document"));
|
|
122
109
|
var _collabEdit = _interopRequireDefault(require("./collab-edit"));
|
|
123
110
|
var _extension = _interopRequireDefault(require("./extension"));
|
|
124
111
|
var _jiraIssue = _interopRequireDefault(require("./jira-issue"));
|
|
@@ -135,5 +122,4 @@ var _mobileSelection = _interopRequireDefault(require("./mobile-selection"));
|
|
|
135
122
|
var _undoRedo = _interopRequireDefault(require("./undo-redo"));
|
|
136
123
|
var _avatarGroup = _interopRequireDefault(require("./avatar-group"));
|
|
137
124
|
var _viewUpdateSubscription = _interopRequireDefault(require("./view-update-subscription"));
|
|
138
|
-
var _beforePrimaryToolbar = _interopRequireDefault(require("./before-primaryToolbar"));
|
|
139
|
-
var _codeBidiWarning = _interopRequireDefault(require("./code-bidi-warning"));
|
|
125
|
+
var _beforePrimaryToolbar = _interopRequireDefault(require("./before-primaryToolbar"));
|
|
@@ -8,7 +8,7 @@ exports.createDefaultPreset = createDefaultPreset;
|
|
|
8
8
|
exports.useDefaultPreset = useDefaultPreset;
|
|
9
9
|
var _paste = _interopRequireDefault(require("../plugins/paste"));
|
|
10
10
|
var _editorPluginBlockType = require("@atlaskit/editor-plugin-block-type");
|
|
11
|
-
var
|
|
11
|
+
var _editorPluginClearMarksOnEmptyDoc = require("@atlaskit/editor-plugin-clear-marks-on-empty-doc");
|
|
12
12
|
var _editorPluginHyperlink = require("@atlaskit/editor-plugin-hyperlink");
|
|
13
13
|
var _editorPluginTextFormatting = require("@atlaskit/editor-plugin-text-formatting");
|
|
14
14
|
var _editorPluginBetterTypeHistory = require("@atlaskit/editor-plugin-better-type-history");
|
|
@@ -61,7 +61,7 @@ function createDefaultPreset(options) {
|
|
|
61
61
|
return builder.add(p);
|
|
62
62
|
}
|
|
63
63
|
return builder;
|
|
64
|
-
}).add([_editorPluginBlockType.blockTypePlugin, options.blockType]).add(
|
|
64
|
+
}).add([_editorPluginBlockType.blockTypePlugin, options.blockType]).add(_editorPluginClearMarksOnEmptyDoc.clearMarksOnEmptyDocPlugin).maybeAdd(_annotation.default, function (p, builder) {
|
|
65
65
|
if (options.annotationProviders) {
|
|
66
66
|
return builder.add([p, options.annotationProviders]);
|
|
67
67
|
}
|
|
@@ -9,6 +9,7 @@ exports.isExpandInsertionEnabled = isExpandInsertionEnabled;
|
|
|
9
9
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
var _plugins = require("../plugins");
|
|
12
|
+
var _editorPluginCodeBidiWarning = require("@atlaskit/editor-plugin-code-bidi-warning");
|
|
12
13
|
var _editorPluginTasksAndDecisions = require("@atlaskit/editor-plugin-tasks-and-decisions");
|
|
13
14
|
var _editorPluginPanel = require("@atlaskit/editor-plugin-panel");
|
|
14
15
|
var _editorPluginTextColor = require("@atlaskit/editor-plugin-text-color");
|
|
@@ -416,7 +417,7 @@ function createUniversalPreset(appearance, props, featureFlags, prevAppearance,
|
|
|
416
417
|
return builder.add(plugin);
|
|
417
418
|
}
|
|
418
419
|
return builder;
|
|
419
|
-
}).add([
|
|
420
|
+
}).add([_editorPluginCodeBidiWarning.codeBidiWarningPlugin, {
|
|
420
421
|
appearance: appearance
|
|
421
422
|
}]);
|
|
422
423
|
return finalPreset;
|
|
@@ -36,8 +36,12 @@ var _WithPluginState = _interopRequireDefault(require("../WithPluginState"));
|
|
|
36
36
|
var _FormContent = _interopRequireDefault(require("./FormContent"));
|
|
37
37
|
var _messages = require("./messages");
|
|
38
38
|
var _FormErrorBoundary = require("./FormErrorBoundary");
|
|
39
|
+
var _utils = require("./utils");
|
|
40
|
+
var _constants = require("./constants");
|
|
39
41
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
40
42
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
43
|
+
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; }
|
|
44
|
+
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) { (0, _defineProperty2.default)(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; }
|
|
41
45
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
42
46
|
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; } }
|
|
43
47
|
function ConfigForm(_ref) {
|
|
@@ -336,16 +340,20 @@ var ConfigPanel = /*#__PURE__*/function (_React$Component) {
|
|
|
336
340
|
value: function componentWillUnmount() {
|
|
337
341
|
var _this$props4 = this.props,
|
|
338
342
|
createAnalyticsEvent = _this$props4.createAnalyticsEvent,
|
|
339
|
-
extensionManifest = _this$props4.extensionManifest
|
|
343
|
+
extensionManifest = _this$props4.extensionManifest,
|
|
344
|
+
fields = _this$props4.fields;
|
|
345
|
+
var currentParameters = this.state.currentParameters;
|
|
340
346
|
(0, _analytics.fireAnalyticsEvent)(createAnalyticsEvent)({
|
|
341
347
|
payload: {
|
|
342
348
|
action: _analytics.ACTION.CLOSED,
|
|
343
349
|
actionSubject: _analytics.ACTION_SUBJECT.CONFIG_PANEL,
|
|
344
350
|
eventType: _analytics.EVENT_TYPE.UI,
|
|
345
|
-
attributes: {
|
|
351
|
+
attributes: _objectSpread({
|
|
346
352
|
extensionKey: extensionManifest === null || extensionManifest === void 0 ? void 0 : extensionManifest.key,
|
|
347
353
|
extensionType: extensionManifest === null || extensionManifest === void 0 ? void 0 : extensionManifest.type
|
|
348
|
-
}
|
|
354
|
+
}, extensionManifest !== null && extensionManifest !== void 0 && extensionManifest.key && _constants.ALLOWED_LOGGED_MACRO_PARAMS[extensionManifest.key] ? {
|
|
355
|
+
parameters: (0, _utils.getLoggedParameters)(extensionManifest.key, currentParameters, fields)
|
|
356
|
+
} : {})
|
|
349
357
|
}
|
|
350
358
|
});
|
|
351
359
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ALLOWED_PARAM_TYPES = exports.ALLOWED_LOGGED_MACRO_PARAMS = void 0;
|
|
7
|
+
// Allowlist of { macroKey: parameterName[] } for analytics logging
|
|
8
|
+
var ALLOWED_LOGGED_MACRO_PARAMS = exports.ALLOWED_LOGGED_MACRO_PARAMS = {
|
|
9
|
+
children: ['all', 'first', 'depth', 'style', 'excerptType', 'sort', 'reverse'],
|
|
10
|
+
'recently-updated': ['width', 'types', 'max', 'theme', 'showProfilePic', 'hideHeading'],
|
|
11
|
+
excerpt: ['hidden']
|
|
12
|
+
};
|
|
13
|
+
var ALLOWED_PARAM_TYPES = exports.ALLOWED_PARAM_TYPES = ['enum', 'number', 'boolean'];
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
|
-
exports.validateRequired = exports.validate = exports.isDuplicateField = exports.getSafeParentedName = exports.getOptionFromValue = exports.getNameFromDuplicateField = void 0;
|
|
7
|
+
exports.validateRequired = exports.validate = exports.isDuplicateField = exports.getSafeParentedName = exports.getOptionFromValue = exports.getNameFromDuplicateField = exports.getLoggedParameters = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
7
9
|
var _types = require("./types");
|
|
10
|
+
var _constants = require("./constants");
|
|
11
|
+
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; }
|
|
12
|
+
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) { (0, _defineProperty2.default)(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; }
|
|
8
13
|
var validate = exports.validate = function validate(field, value) {
|
|
9
14
|
return validateRequired(field, value);
|
|
10
15
|
};
|
|
@@ -53,4 +58,42 @@ var isDuplicateField = exports.isDuplicateField = function isDuplicateField(key)
|
|
|
53
58
|
};
|
|
54
59
|
var getNameFromDuplicateField = exports.getNameFromDuplicateField = function getNameFromDuplicateField(key) {
|
|
55
60
|
return key.replace(duplicateFieldRegex, '');
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
// An overly cautious parser for sanitizing configuration parameters of UGC
|
|
64
|
+
var parseParamType = function parseParamType(paramValue, paramField) {
|
|
65
|
+
if (paramValue && paramField) {
|
|
66
|
+
if (paramField.type === 'string') {
|
|
67
|
+
if (paramField.name === 'types') {
|
|
68
|
+
// Parse types field as an array of valid content types
|
|
69
|
+
var contentTypes = ['page', 'blogpost', 'comment', 'attachment'];
|
|
70
|
+
return paramValue && paramValue.split(',').map(function (type) {
|
|
71
|
+
return type.trim();
|
|
72
|
+
}).filter(function (type) {
|
|
73
|
+
return contentTypes.includes(type);
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
if (paramField.name === 'width') {
|
|
77
|
+
return parseFloat(paramValue);
|
|
78
|
+
}
|
|
79
|
+
// Strings are very risky - return empty string in case anything slips through
|
|
80
|
+
return '';
|
|
81
|
+
}
|
|
82
|
+
if (_constants.ALLOWED_PARAM_TYPES.includes(paramField.type)) {
|
|
83
|
+
// The param types defined here are already parsed and safe to log
|
|
84
|
+
return paramValue;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
// Safety net
|
|
88
|
+
return null;
|
|
89
|
+
};
|
|
90
|
+
var getLoggedParameters = exports.getLoggedParameters = function getLoggedParameters(macroKey, currentParams, macroFields) {
|
|
91
|
+
// Get the parameters only defined in the allowlist of logged macro/parameter keys
|
|
92
|
+
return Object.keys(currentParams).filter(function (paramKey) {
|
|
93
|
+
return _constants.ALLOWED_LOGGED_MACRO_PARAMS[macroKey].includes(paramKey);
|
|
94
|
+
}).reduce(function (obj, param) {
|
|
95
|
+
return _objectSpread(_objectSpread({}, obj), {}, (0, _defineProperty2.default)({}, param, parseParamType(currentParams[param], macroFields === null || macroFields === void 0 ? void 0 : macroFields.find(function (field) {
|
|
96
|
+
return field.name === param;
|
|
97
|
+
}))));
|
|
98
|
+
}, {});
|
|
56
99
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
/** @jsx jsx */
|
|
3
|
-
import { Fragment, useCallback } from 'react';
|
|
3
|
+
import { memo, Fragment, useCallback } from 'react';
|
|
4
4
|
import { css, jsx } from '@emotion/react';
|
|
5
5
|
import { ACTION, ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
|
|
6
6
|
import { PortalProviderWithThemeProviders, PortalRenderer } from '@atlaskit/editor-common/portal-provider';
|
|
@@ -18,7 +18,7 @@ import { getBaseFontSize } from './utils/getBaseFontSize';
|
|
|
18
18
|
* EditorInternalComponent is used to capture the common component
|
|
19
19
|
* from the `render` method of `Editor` and share it with `EditorNext`.
|
|
20
20
|
*/
|
|
21
|
-
export
|
|
21
|
+
export const EditorInternal = /*#__PURE__*/memo(({
|
|
22
22
|
props,
|
|
23
23
|
handleAnalyticsEvent,
|
|
24
24
|
createAnalyticsEvent,
|
|
@@ -28,7 +28,7 @@ export function EditorInternal({
|
|
|
28
28
|
onEditorCreated,
|
|
29
29
|
onEditorDestroyed,
|
|
30
30
|
preset
|
|
31
|
-
}) {
|
|
31
|
+
}) => {
|
|
32
32
|
var _props$performanceTra, _props$performanceTra2, _props$performanceTra3, _props$performanceTra4;
|
|
33
33
|
const Component = getUiComponent(props.appearance);
|
|
34
34
|
const setEditorApi = useSetPresetContext();
|
|
@@ -126,7 +126,7 @@ export function EditorInternal({
|
|
|
126
126
|
portalProviderAPI: portalProviderAPI
|
|
127
127
|
}))
|
|
128
128
|
}))))));
|
|
129
|
-
}
|
|
129
|
+
});
|
|
130
130
|
function ReactEditorViewContextWrapper(props) {
|
|
131
131
|
const setInternalEditorAPI = useSetPresetContext();
|
|
132
132
|
const {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { useRef } from 'react';
|
|
2
|
+
import { useRef, useCallback, useMemo } from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
4
|
import uuid from 'uuid/v4';
|
|
5
5
|
import { FabricEditorAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
|
|
@@ -7,6 +7,7 @@ import { ACTION, fireAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
|
7
7
|
import { EditorExperience, ExperienceStore } from '@atlaskit/editor-common/ufo';
|
|
8
8
|
import { getAnalyticsAppearance, startMeasure, stopMeasure } from '@atlaskit/editor-common/utils';
|
|
9
9
|
import { basePlugin } from '@atlaskit/editor-plugin-base';
|
|
10
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
10
11
|
import EditorActions from '../actions';
|
|
11
12
|
import { createFeatureFlagsFromProps } from '../create-editor/feature-flags-from-props';
|
|
12
13
|
import { name, version } from '../version-wrapper';
|
|
@@ -84,16 +85,219 @@ function Editor(passedProps) {
|
|
|
84
85
|
providerFactory: providerFactory
|
|
85
86
|
});
|
|
86
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* Improved memonization for Editor wrapper that deals with the lifecycle logic of the editor
|
|
90
|
+
*/
|
|
91
|
+
function EditorButBetter(passedProps) {
|
|
92
|
+
const propsRef = useRef(passedProps);
|
|
93
|
+
const props = useMemo(() => {
|
|
94
|
+
// That sounds awful but this is the only way to make sure we didn't missed any EditorProps
|
|
95
|
+
const allProps = {
|
|
96
|
+
preset: passedProps.preset,
|
|
97
|
+
appearance: passedProps.appearance,
|
|
98
|
+
contentComponents: passedProps.contentComponents,
|
|
99
|
+
primaryToolbarIconBefore: passedProps.primaryToolbarIconBefore,
|
|
100
|
+
secondaryToolbarComponents: passedProps.secondaryToolbarComponents,
|
|
101
|
+
persistScrollGutter: passedProps.persistScrollGutter,
|
|
102
|
+
quickInsert: passedProps.quickInsert,
|
|
103
|
+
shouldFocus: passedProps.shouldFocus,
|
|
104
|
+
disabled: passedProps.disabled,
|
|
105
|
+
contextPanel: passedProps.contextPanel,
|
|
106
|
+
errorReporterHandler: passedProps.errorReporterHandler,
|
|
107
|
+
contentTransformerProvider: passedProps.contentTransformerProvider,
|
|
108
|
+
maxHeight: passedProps.maxHeight,
|
|
109
|
+
minHeight: passedProps.minHeight,
|
|
110
|
+
placeholder: passedProps.placeholder,
|
|
111
|
+
placeholderBracketHint: passedProps.placeholderBracketHint,
|
|
112
|
+
defaultValue: passedProps.defaultValue,
|
|
113
|
+
assistiveLabel: passedProps.assistiveLabel,
|
|
114
|
+
popupsMountPoint: passedProps.popupsMountPoint,
|
|
115
|
+
popupsBoundariesElement: passedProps.popupsBoundariesElement,
|
|
116
|
+
popupsScrollableElement: passedProps.popupsScrollableElement,
|
|
117
|
+
editorActions: passedProps.editorActions,
|
|
118
|
+
onEditorReady: passedProps.onEditorReady,
|
|
119
|
+
onDestroy: passedProps.onDestroy,
|
|
120
|
+
onChange: passedProps.onChange,
|
|
121
|
+
onCancel: passedProps.onCancel,
|
|
122
|
+
inputSamplingLimit: passedProps.inputSamplingLimit,
|
|
123
|
+
extensionProviders: passedProps.extensionProviders,
|
|
124
|
+
UNSAFE_useAnalyticsContext: passedProps.UNSAFE_useAnalyticsContext,
|
|
125
|
+
trackValidTransactions: passedProps.trackValidTransactions,
|
|
126
|
+
useStickyToolbar: passedProps.useStickyToolbar,
|
|
127
|
+
featureFlags: passedProps.featureFlags,
|
|
128
|
+
onSave: passedProps.onSave,
|
|
129
|
+
performanceTracking: passedProps.performanceTracking,
|
|
130
|
+
sanitizePrivateContent: passedProps.sanitizePrivateContent,
|
|
131
|
+
media: passedProps.media,
|
|
132
|
+
collabEdit: passedProps.collabEdit,
|
|
133
|
+
primaryToolbarComponents: passedProps.primaryToolbarComponents,
|
|
134
|
+
allowUndoRedoButtons: passedProps.allowUndoRedoButtons,
|
|
135
|
+
linking: passedProps.linking,
|
|
136
|
+
hideAvatarGroup: passedProps.hideAvatarGroup,
|
|
137
|
+
activityProvider: passedProps.activityProvider,
|
|
138
|
+
searchProvider: passedProps.searchProvider,
|
|
139
|
+
annotationProviders: passedProps.annotationProviders,
|
|
140
|
+
collabEditProvider: passedProps.collabEditProvider,
|
|
141
|
+
presenceProvider: passedProps.presenceProvider,
|
|
142
|
+
emojiProvider: passedProps.emojiProvider,
|
|
143
|
+
taskDecisionProvider: passedProps.taskDecisionProvider,
|
|
144
|
+
legacyImageUploadProvider: passedProps.legacyImageUploadProvider,
|
|
145
|
+
mentionProvider: passedProps.mentionProvider,
|
|
146
|
+
autoformattingProvider: passedProps.autoformattingProvider,
|
|
147
|
+
macroProvider: passedProps.macroProvider,
|
|
148
|
+
contextIdentifierProvider: passedProps.contextIdentifierProvider,
|
|
149
|
+
allowExpand: passedProps.allowExpand,
|
|
150
|
+
allowNestedTasks: passedProps.allowNestedTasks,
|
|
151
|
+
allowBlockType: passedProps.allowBlockType,
|
|
152
|
+
allowTasksAndDecisions: passedProps.allowTasksAndDecisions,
|
|
153
|
+
allowBreakout: passedProps.allowBreakout,
|
|
154
|
+
allowRule: passedProps.allowRule,
|
|
155
|
+
allowHelpDialog: passedProps.allowHelpDialog,
|
|
156
|
+
allowJiraIssue: passedProps.allowJiraIssue,
|
|
157
|
+
allowPanel: passedProps.allowPanel,
|
|
158
|
+
allowExtension: passedProps.allowExtension,
|
|
159
|
+
allowConfluenceInlineComment: passedProps.allowConfluenceInlineComment,
|
|
160
|
+
allowTemplatePlaceholders: passedProps.allowTemplatePlaceholders,
|
|
161
|
+
allowDate: passedProps.allowDate,
|
|
162
|
+
allowLayouts: passedProps.allowLayouts,
|
|
163
|
+
allowStatus: passedProps.allowStatus,
|
|
164
|
+
allowTextAlignment: passedProps.allowTextAlignment,
|
|
165
|
+
allowIndentation: passedProps.allowIndentation,
|
|
166
|
+
showIndentationButtons: passedProps.showIndentationButtons,
|
|
167
|
+
allowNewInsertionBehaviour: passedProps.allowNewInsertionBehaviour,
|
|
168
|
+
allowFindReplace: passedProps.allowFindReplace,
|
|
169
|
+
UNSAFE_allowBorderMark: passedProps.UNSAFE_allowBorderMark,
|
|
170
|
+
allowBorderMark: passedProps.allowBorderMark,
|
|
171
|
+
allowFragmentMark: passedProps.allowFragmentMark,
|
|
172
|
+
autoScrollIntoView: passedProps.autoScrollIntoView,
|
|
173
|
+
elementBrowser: passedProps.elementBrowser,
|
|
174
|
+
maxContentSize: passedProps.maxContentSize,
|
|
175
|
+
saveOnEnter: passedProps.saveOnEnter,
|
|
176
|
+
feedbackInfo: passedProps.feedbackInfo,
|
|
177
|
+
mention: passedProps.mention,
|
|
178
|
+
mentionInsertDisplayName: passedProps.mentionInsertDisplayName,
|
|
179
|
+
uploadErrorHandler: passedProps.uploadErrorHandler,
|
|
180
|
+
waitForMediaUpload: passedProps.waitForMediaUpload,
|
|
181
|
+
extensionHandlers: passedProps.extensionHandlers,
|
|
182
|
+
allowTextColor: passedProps.allowTextColor,
|
|
183
|
+
allowTables: passedProps.allowTables,
|
|
184
|
+
insertMenuItems: passedProps.insertMenuItems,
|
|
185
|
+
UNSAFE_cards: passedProps.UNSAFE_cards,
|
|
186
|
+
smartLinks: passedProps.smartLinks,
|
|
187
|
+
allowAnalyticsGASV3: passedProps.allowAnalyticsGASV3,
|
|
188
|
+
codeBlock: passedProps.codeBlock,
|
|
189
|
+
textFormatting: passedProps.textFormatting,
|
|
190
|
+
dangerouslyAppendPlugins: passedProps.dangerouslyAppendPlugins
|
|
191
|
+
};
|
|
192
|
+
const defaultProps = {
|
|
193
|
+
appearance: 'comment',
|
|
194
|
+
disabled: false,
|
|
195
|
+
quickInsert: true
|
|
196
|
+
};
|
|
197
|
+
const nextProps = {
|
|
198
|
+
...defaultProps,
|
|
199
|
+
...allProps
|
|
200
|
+
};
|
|
201
|
+
propsRef.current = nextProps;
|
|
202
|
+
return nextProps;
|
|
203
|
+
}, [passedProps.preset, passedProps.appearance, passedProps.contentComponents, passedProps.primaryToolbarIconBefore, passedProps.secondaryToolbarComponents, passedProps.persistScrollGutter, passedProps.quickInsert, passedProps.shouldFocus, passedProps.disabled, passedProps.contextPanel, passedProps.errorReporterHandler, passedProps.contentTransformerProvider, passedProps.maxHeight, passedProps.minHeight, passedProps.placeholder, passedProps.placeholderBracketHint, passedProps.defaultValue, passedProps.assistiveLabel, passedProps.popupsMountPoint, passedProps.popupsBoundariesElement, passedProps.popupsScrollableElement, passedProps.editorActions, passedProps.onEditorReady, passedProps.onDestroy, passedProps.onChange, passedProps.onCancel, passedProps.inputSamplingLimit, passedProps.extensionProviders, passedProps.UNSAFE_useAnalyticsContext, passedProps.trackValidTransactions, passedProps.useStickyToolbar, passedProps.featureFlags, passedProps.onSave, passedProps.performanceTracking, passedProps.sanitizePrivateContent, passedProps.media, passedProps.collabEdit, passedProps.primaryToolbarComponents, passedProps.allowUndoRedoButtons, passedProps.linking, passedProps.hideAvatarGroup, passedProps.activityProvider, passedProps.searchProvider, passedProps.annotationProviders, passedProps.collabEditProvider, passedProps.presenceProvider, passedProps.emojiProvider, passedProps.taskDecisionProvider, passedProps.legacyImageUploadProvider, passedProps.mentionProvider, passedProps.autoformattingProvider, passedProps.macroProvider, passedProps.contextIdentifierProvider, passedProps.allowExpand, passedProps.allowNestedTasks, passedProps.allowBlockType, passedProps.allowTasksAndDecisions, passedProps.allowBreakout, passedProps.allowRule, passedProps.allowHelpDialog, passedProps.allowJiraIssue, passedProps.allowPanel, passedProps.allowExtension, passedProps.allowConfluenceInlineComment, passedProps.allowTemplatePlaceholders, passedProps.allowDate, passedProps.allowLayouts, passedProps.allowStatus, passedProps.allowTextAlignment, passedProps.allowIndentation, passedProps.showIndentationButtons, passedProps.allowNewInsertionBehaviour, passedProps.allowFindReplace, passedProps.UNSAFE_allowBorderMark, passedProps.allowBorderMark, passedProps.allowFragmentMark, passedProps.autoScrollIntoView, passedProps.elementBrowser, passedProps.maxContentSize, passedProps.saveOnEnter, passedProps.feedbackInfo, passedProps.mention, passedProps.mentionInsertDisplayName, passedProps.uploadErrorHandler, passedProps.waitForMediaUpload, passedProps.extensionHandlers, passedProps.allowTextColor, passedProps.allowTables, passedProps.insertMenuItems, passedProps.UNSAFE_cards, passedProps.smartLinks, passedProps.allowAnalyticsGASV3, passedProps.codeBlock, passedProps.textFormatting, passedProps.dangerouslyAppendPlugins]);
|
|
204
|
+
const editorContext = useEditorContext();
|
|
205
|
+
const editorActionsPlaceholderInstance = useMemo(() => new EditorActions(), []);
|
|
206
|
+
const editorActions = editorContext.editorActions || editorActionsPlaceholderInstance;
|
|
207
|
+
const startTime = useRef(performance.now());
|
|
208
|
+
const {
|
|
209
|
+
createAnalyticsEvent
|
|
210
|
+
} = useAnalyticsEvents();
|
|
211
|
+
const experienceStore = useRef();
|
|
212
|
+
const handleAnalyticsEvent = useCallback(data => {
|
|
213
|
+
fireAnalyticsEvent(createAnalyticsEvent)(data);
|
|
214
|
+
}, [createAnalyticsEvent]);
|
|
215
|
+
useConstructor(() => {
|
|
216
|
+
trackEditorActions(editorActions, props.performanceTracking, value => handleAnalyticsEvent(value));
|
|
217
|
+
});
|
|
218
|
+
const getExperienceStore = useCallback(() => {
|
|
219
|
+
return experienceStore.current;
|
|
220
|
+
}, []);
|
|
221
|
+
const getFeatureFlagsFromRef = useCallback(() => {
|
|
222
|
+
return createFeatureFlagsFromProps(propsRef.current);
|
|
223
|
+
}, []);
|
|
224
|
+
const onEditorCreated = useCallback(instance => {
|
|
225
|
+
const {
|
|
226
|
+
contextIdentifierProvider,
|
|
227
|
+
onEditorReady,
|
|
228
|
+
performanceTracking,
|
|
229
|
+
featureFlags
|
|
230
|
+
} = propsRef.current;
|
|
231
|
+
editorActions._privateRegisterEditor(instance.view, instance.eventDispatcher, instance.transformer, getFeatureFlagsFromRef);
|
|
232
|
+
if (featureFlags !== null && featureFlags !== void 0 && featureFlags.ufo) {
|
|
233
|
+
var _experienceStore$curr2;
|
|
234
|
+
experienceStore.current = ExperienceStore.getInstance(instance.view);
|
|
235
|
+
(_experienceStore$curr2 = experienceStore.current) === null || _experienceStore$curr2 === void 0 ? void 0 : _experienceStore$curr2.start(EditorExperience.loadEditor, startTime.current);
|
|
236
|
+
}
|
|
237
|
+
if (onEditorReady) {
|
|
238
|
+
var _performanceTracking$;
|
|
239
|
+
const measureEditorReady = (performanceTracking === null || performanceTracking === void 0 ? void 0 : (_performanceTracking$ = performanceTracking.onEditorReadyCallbackTracking) === null || _performanceTracking$ === void 0 ? void 0 : _performanceTracking$.enabled) || (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.ufo);
|
|
240
|
+
measureEditorReady && startMeasure(measurements.ON_EDITOR_READY_CALLBACK);
|
|
241
|
+
onEditorReady(editorActions);
|
|
242
|
+
measureEditorReady && stopMeasure(measurements.ON_EDITOR_READY_CALLBACK, sendDurationAnalytics(ACTION.ON_EDITOR_READY_CALLBACK, {
|
|
243
|
+
contextIdentifierProvider,
|
|
244
|
+
featureFlags
|
|
245
|
+
}, getExperienceStore, createAnalyticsEvent));
|
|
246
|
+
}
|
|
247
|
+
}, [editorActions, createAnalyticsEvent, getFeatureFlagsFromRef, propsRef, getExperienceStore]);
|
|
248
|
+
const onEditorDestroyed = useCallback(_instance => {
|
|
249
|
+
const {
|
|
250
|
+
onDestroy
|
|
251
|
+
} = propsRef.current;
|
|
252
|
+
editorActions._privateUnregisterEditor();
|
|
253
|
+
if (onDestroy) {
|
|
254
|
+
onDestroy();
|
|
255
|
+
}
|
|
256
|
+
}, [editorActions, propsRef]);
|
|
257
|
+
useMeasureEditorMountTime(props, getExperienceStore, createAnalyticsEvent);
|
|
258
|
+
const providerFactory = useProviderFactory(props, editorActions, createAnalyticsEvent);
|
|
259
|
+
const {
|
|
260
|
+
onSave: onSaveFromProps
|
|
261
|
+
} = props;
|
|
262
|
+
const handleSave = useCallback(view => {
|
|
263
|
+
if (onSaveFromProps) {
|
|
264
|
+
onSaveFromProps(view);
|
|
265
|
+
}
|
|
266
|
+
}, [onSaveFromProps]);
|
|
267
|
+
return jsx(EditorInternal, {
|
|
268
|
+
props: props,
|
|
269
|
+
handleAnalyticsEvent: handleAnalyticsEvent,
|
|
270
|
+
createAnalyticsEvent: createAnalyticsEvent,
|
|
271
|
+
preset: props.preset,
|
|
272
|
+
handleSave: handleSave,
|
|
273
|
+
editorActions: editorActions,
|
|
274
|
+
onEditorCreated: onEditorCreated,
|
|
275
|
+
onEditorDestroyed: onEditorDestroyed,
|
|
276
|
+
providerFactory: providerFactory
|
|
277
|
+
});
|
|
278
|
+
}
|
|
87
279
|
export function ComposableEditor(props) {
|
|
88
280
|
const editorSessionId = useRef(uuid());
|
|
89
|
-
|
|
90
|
-
|
|
281
|
+
const data = useMemo(() => {
|
|
282
|
+
return {
|
|
91
283
|
packageName: name,
|
|
92
284
|
packageVersion: version,
|
|
93
285
|
componentName: 'editorCore',
|
|
94
286
|
appearance: getAnalyticsAppearance(props.appearance),
|
|
95
287
|
editorSessionId: editorSessionId.current
|
|
96
|
-
}
|
|
288
|
+
};
|
|
289
|
+
}, [props.appearance]);
|
|
290
|
+
if (getBooleanFF('platform.editor.less-editor-props-rerendering')) {
|
|
291
|
+
return jsx(FabricEditorAnalyticsContext
|
|
292
|
+
// @ts-expect-error Type 'string' is not assignable to type '"editorCore" | "renderer"'.
|
|
293
|
+
, {
|
|
294
|
+
data: data
|
|
295
|
+
}, jsx(EditorButBetter, props));
|
|
296
|
+
}
|
|
297
|
+
return jsx(FabricEditorAnalyticsContext
|
|
298
|
+
// @ts-expect-error Type 'string' is not assignable to type '"editorCore" | "renderer"'.
|
|
299
|
+
, {
|
|
300
|
+
data: data
|
|
97
301
|
}, jsx(Editor, props));
|
|
98
302
|
}
|
|
99
303
|
ComposableEditor.propTypes = {
|
package/dist/es2019/i18n/cs.js
CHANGED
|
@@ -30,7 +30,6 @@ export default {
|
|
|
30
30
|
'fabric.editor.configPanel.invalid': 'Neplatné pole',
|
|
31
31
|
'fabric.editor.configPanel.required': 'Povinné pole',
|
|
32
32
|
'fabric.editor.configPanel.submit': 'Odeslat',
|
|
33
|
-
'fabric.editor.decisionPlaceholder': 'Přidat rozhodnutí...',
|
|
34
33
|
'fabric.editor.edit': 'Upravit',
|
|
35
34
|
'fabric.editor.editorAssistiveLabel': 'Hlavní oblast obsahu. Začněte psát, abyste zadali text.',
|
|
36
35
|
'fabric.editor.editors': 'Editoři',
|
|
@@ -50,6 +49,5 @@ export default {
|
|
|
50
49
|
'fabric.editor.replace': 'Nahradit',
|
|
51
50
|
'fabric.editor.replaceAll': 'Nahradit vše',
|
|
52
51
|
'fabric.editor.replaceWith': 'Nahradit textem',
|
|
53
|
-
'fabric.editor.resultsCount': '{selectedMatchPosition} z {totalResultsCount}'
|
|
54
|
-
'fabric.editor.taskPlaceholder': 'Napište svou akci a použitím „@“ ji někomu přidělte.'
|
|
52
|
+
'fabric.editor.resultsCount': '{selectedMatchPosition} z {totalResultsCount}'
|
|
55
53
|
};
|
package/dist/es2019/i18n/da.js
CHANGED
|
@@ -30,7 +30,6 @@ export default {
|
|
|
30
30
|
'fabric.editor.configPanel.invalid': 'Ugyldigt felt',
|
|
31
31
|
'fabric.editor.configPanel.required': 'Påkrævet felt',
|
|
32
32
|
'fabric.editor.configPanel.submit': 'Send',
|
|
33
|
-
'fabric.editor.decisionPlaceholder': 'Tilføj en beslutning ...',
|
|
34
33
|
'fabric.editor.edit': 'Redigér',
|
|
35
34
|
'fabric.editor.editorAssistiveLabel': 'Område for hovedindhold. Begynd at taste for at skrive tekst.',
|
|
36
35
|
'fabric.editor.editors': 'Redaktører',
|
|
@@ -49,6 +48,5 @@ export default {
|
|
|
49
48
|
'fabric.editor.replace': 'Erstat',
|
|
50
49
|
'fabric.editor.replaceAll': 'Erstat alle',
|
|
51
50
|
'fabric.editor.replaceWith': 'Erstat med',
|
|
52
|
-
'fabric.editor.resultsCount': '{selectedMatchPosition} af {totalResultsCount}'
|
|
53
|
-
'fabric.editor.taskPlaceholder': 'Indtast din handling, og brug "@" for at tildele til nogen.'
|
|
51
|
+
'fabric.editor.resultsCount': '{selectedMatchPosition} af {totalResultsCount}'
|
|
54
52
|
};
|
package/dist/es2019/i18n/de.js
CHANGED
|
@@ -30,7 +30,6 @@ export default {
|
|
|
30
30
|
'fabric.editor.configPanel.invalid': 'Ungültiges Feld',
|
|
31
31
|
'fabric.editor.configPanel.required': 'Pflichtfeld',
|
|
32
32
|
'fabric.editor.configPanel.submit': 'Senden',
|
|
33
|
-
'fabric.editor.decisionPlaceholder': 'Entscheidung hinzufügen …',
|
|
34
33
|
'fabric.editor.edit': 'Bearbeiten',
|
|
35
34
|
'fabric.editor.editorAssistiveLabel': 'Hauptinhaltsbereich – geben Sie hier Ihren Text ein.',
|
|
36
35
|
'fabric.editor.editors': 'Editoren',
|
|
@@ -49,6 +48,5 @@ export default {
|
|
|
49
48
|
'fabric.editor.replace': 'Ersetzen',
|
|
50
49
|
'fabric.editor.replaceAll': 'Alle ersetzen',
|
|
51
50
|
'fabric.editor.replaceWith': 'Ersetzen mit',
|
|
52
|
-
'fabric.editor.resultsCount': '{selectedMatchPosition} von {totalResultsCount}'
|
|
53
|
-
'fabric.editor.taskPlaceholder': 'Geben Sie Ihre Aktion ein und weisen Sie sie mithilfe von „@” jemandem zu.'
|
|
51
|
+
'fabric.editor.resultsCount': '{selectedMatchPosition} von {totalResultsCount}'
|
|
54
52
|
};
|
package/dist/es2019/i18n/en.js
CHANGED
|
@@ -31,7 +31,6 @@ export default {
|
|
|
31
31
|
'fabric.editor.configPanel.invalid': 'Invalid field',
|
|
32
32
|
'fabric.editor.configPanel.required': 'Required field',
|
|
33
33
|
'fabric.editor.configPanel.submit': 'Submit',
|
|
34
|
-
'fabric.editor.decisionPlaceholder': 'Add a decision…',
|
|
35
34
|
'fabric.editor.edit': 'Edit',
|
|
36
35
|
'fabric.editor.editorAssistiveLabel': 'Main content area, start typing to enter text.',
|
|
37
36
|
'fabric.editor.editors': 'Editors',
|
|
@@ -51,6 +50,5 @@ export default {
|
|
|
51
50
|
'fabric.editor.replace': 'Replace',
|
|
52
51
|
'fabric.editor.replaceAll': 'Replace all',
|
|
53
52
|
'fabric.editor.replaceWith': 'Replace with',
|
|
54
|
-
'fabric.editor.resultsCount': '{selectedMatchPosition} of {totalResultsCount}'
|
|
55
|
-
'fabric.editor.taskPlaceholder': "Type your action, use '@' to assign to someone."
|
|
53
|
+
'fabric.editor.resultsCount': '{selectedMatchPosition} of {totalResultsCount}'
|
|
56
54
|
};
|
|
@@ -31,7 +31,6 @@ export default {
|
|
|
31
31
|
'fabric.editor.configPanel.invalid': 'Invalid field',
|
|
32
32
|
'fabric.editor.configPanel.required': 'Required field',
|
|
33
33
|
'fabric.editor.configPanel.submit': 'Submit',
|
|
34
|
-
'fabric.editor.decisionPlaceholder': 'Add a decision…',
|
|
35
34
|
'fabric.editor.edit': 'Edit',
|
|
36
35
|
'fabric.editor.editorAssistiveLabel': 'Main content area, start typing to enter text.',
|
|
37
36
|
'fabric.editor.editors': 'Editors',
|
|
@@ -51,6 +50,5 @@ export default {
|
|
|
51
50
|
'fabric.editor.replace': 'Replace',
|
|
52
51
|
'fabric.editor.replaceAll': 'Replace all',
|
|
53
52
|
'fabric.editor.replaceWith': 'Replace with',
|
|
54
|
-
'fabric.editor.resultsCount': '{selectedMatchPosition} of {totalResultsCount}'
|
|
55
|
-
'fabric.editor.taskPlaceholder': "Type your action, use '@' to assign to someone."
|
|
53
|
+
'fabric.editor.resultsCount': '{selectedMatchPosition} of {totalResultsCount}'
|
|
56
54
|
};
|