@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
|
@@ -6,8 +6,10 @@ import { safeInsert } from 'prosemirror-utils';
|
|
|
6
6
|
import { AddColumnStep } from '@atlaskit/adf-schema/steps';
|
|
7
7
|
import { getPluginState } from '../pm-plugins/plugin-factory';
|
|
8
8
|
import { checkIfHeaderRowEnabled, copyPreviousRow } from '../utils';
|
|
9
|
-
import { getAllowAddColumnCustomStep } from '../utils/get-allow-add-column-custom-step';
|
|
9
|
+
import { getAllowAddColumnCustomStep } from '../utils/get-allow-add-column-custom-step';
|
|
10
|
+
import { rescaleColumns } from '../transforms/column-width';
|
|
10
11
|
|
|
12
|
+
// #endregion
|
|
11
13
|
function addColumnAtCustomStep(column) {
|
|
12
14
|
return tr => {
|
|
13
15
|
const table = findTable(tr.selection);
|
|
@@ -20,17 +22,30 @@ function addColumnAtCustomStep(column) {
|
|
|
20
22
|
};
|
|
21
23
|
}
|
|
22
24
|
|
|
23
|
-
function addColumnAt(column, allowAddColumnCustomStep = false) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
function addColumnAt(column, allowAddColumnCustomStep = false, view) {
|
|
26
|
+
return tr => {
|
|
27
|
+
let updatedTr = tr;
|
|
28
|
+
|
|
29
|
+
if (allowAddColumnCustomStep) {
|
|
30
|
+
updatedTr = addColumnAtCustomStep(column)(updatedTr);
|
|
31
|
+
} else {
|
|
32
|
+
updatedTr = addColumnAtPMUtils(column)(updatedTr);
|
|
33
|
+
}
|
|
27
34
|
|
|
28
|
-
|
|
35
|
+
const table = findTable(updatedTr.selection);
|
|
36
|
+
|
|
37
|
+
if (table) {
|
|
38
|
+
// [ED-8288] Update colwidths manually to avoid multiple dispatch in TableComponent
|
|
39
|
+
updatedTr = rescaleColumns(table, view)(updatedTr);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return updatedTr;
|
|
43
|
+
};
|
|
29
44
|
} // :: (EditorState, dispatch: ?(tr: Transaction)) → bool
|
|
30
45
|
// Command to add a column before the column with the selection.
|
|
31
46
|
|
|
32
47
|
|
|
33
|
-
export const addColumnBefore = (state, dispatch) => {
|
|
48
|
+
export const addColumnBefore = (state, dispatch, view) => {
|
|
34
49
|
const table = findTable(state.selection);
|
|
35
50
|
|
|
36
51
|
if (!table) {
|
|
@@ -39,14 +54,14 @@ export const addColumnBefore = (state, dispatch) => {
|
|
|
39
54
|
|
|
40
55
|
if (dispatch) {
|
|
41
56
|
let rect = selectedRect(state);
|
|
42
|
-
dispatch(addColumnAt(rect.left, getAllowAddColumnCustomStep(state))(state.tr));
|
|
57
|
+
dispatch(addColumnAt(rect.left, getAllowAddColumnCustomStep(state), view)(state.tr));
|
|
43
58
|
}
|
|
44
59
|
|
|
45
60
|
return true;
|
|
46
61
|
}; // :: (EditorState, dispatch: ?(tr: Transaction)) → bool
|
|
47
62
|
// Command to add a column after the column with the selection.
|
|
48
63
|
|
|
49
|
-
export const addColumnAfter = (state, dispatch) => {
|
|
64
|
+
export const addColumnAfter = (state, dispatch, view) => {
|
|
50
65
|
const table = findTable(state.selection);
|
|
51
66
|
|
|
52
67
|
if (!table) {
|
|
@@ -55,14 +70,14 @@ export const addColumnAfter = (state, dispatch) => {
|
|
|
55
70
|
|
|
56
71
|
if (dispatch) {
|
|
57
72
|
let rect = selectedRect(state);
|
|
58
|
-
dispatch(addColumnAt(rect.right, getAllowAddColumnCustomStep(state))(state.tr));
|
|
73
|
+
dispatch(addColumnAt(rect.right, getAllowAddColumnCustomStep(state), view)(state.tr));
|
|
59
74
|
}
|
|
60
75
|
|
|
61
76
|
return true;
|
|
62
77
|
}; // #region Commands
|
|
63
78
|
|
|
64
|
-
export const insertColumn = column => (state, dispatch) => {
|
|
65
|
-
|
|
79
|
+
export const insertColumn = column => (state, dispatch, view) => {
|
|
80
|
+
let tr = addColumnAt(column, getAllowAddColumnCustomStep(state), view)(state.tr);
|
|
66
81
|
const table = findTable(tr.selection);
|
|
67
82
|
|
|
68
83
|
if (!table) {
|
|
@@ -89,7 +89,7 @@ export const setCellAttr = (name, value) => (state, dispatch) => {
|
|
|
89
89
|
|
|
90
90
|
return false;
|
|
91
91
|
};
|
|
92
|
-
export const triggerUnlessTableHeader = command => (state, dispatch) => {
|
|
92
|
+
export const triggerUnlessTableHeader = command => (state, dispatch, view) => {
|
|
93
93
|
const {
|
|
94
94
|
selection,
|
|
95
95
|
schema: {
|
|
@@ -103,7 +103,7 @@ export const triggerUnlessTableHeader = command => (state, dispatch) => {
|
|
|
103
103
|
const cell = findCellClosestToPos(selection.$from);
|
|
104
104
|
|
|
105
105
|
if (cell && cell.node.type !== tableHeader) {
|
|
106
|
-
return command(state, dispatch);
|
|
106
|
+
return command(state, dispatch, view);
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
|
|
@@ -111,7 +111,7 @@ export const triggerUnlessTableHeader = command => (state, dispatch) => {
|
|
|
111
111
|
const rect = getSelectionRect(selection);
|
|
112
112
|
|
|
113
113
|
if (!checkIfHeaderRowEnabled(state) || rect && rect.top > 0) {
|
|
114
|
-
return command(state, dispatch);
|
|
114
|
+
return command(state, dispatch, view);
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
|
|
@@ -156,16 +156,17 @@ class TableComponent extends React.Component {
|
|
|
156
156
|
const parentWidthChanged = parentWidth && parentWidth !== this.state.parentWidth;
|
|
157
157
|
const layoutSize = this.tableNodeLayoutSize(node, containerWidth.width, options);
|
|
158
158
|
const hasNumberedColumnChanged = prevAttrs.isNumberColumnEnabled !== node.attrs.isNumberColumnEnabled;
|
|
159
|
+
const noOfColumnsChanged = tablesHaveDifferentNoOfColumns(node, prevNode);
|
|
159
160
|
|
|
160
161
|
if ( // Breakout mode/layout changed
|
|
161
162
|
layoutChanged || // We need to react if our parent changes
|
|
162
163
|
// Scales the cols widths relative to the new parent width.
|
|
163
164
|
parentWidthChanged || // Enabling / disabling this feature reduces or adds size to the table.
|
|
164
|
-
hasNumberedColumnChanged || //
|
|
165
|
-
tablesHaveDifferentNoOfColumns(node, prevNode) || // This last check is also to cater for dynamic text sizing changing the 'default' layout width
|
|
165
|
+
hasNumberedColumnChanged || // This last check is also to cater for dynamic text sizing changing the 'default' layout width
|
|
166
166
|
// Usually happens on window resize.
|
|
167
|
-
layoutSize !== this.layoutSize) {
|
|
168
|
-
|
|
167
|
+
layoutSize !== this.layoutSize || noOfColumnsChanged) {
|
|
168
|
+
// If column has been inserted/deleted avoid multi dispatch
|
|
169
|
+
if (!hasNumberedColumnChanged && !noOfColumnsChanged) {
|
|
169
170
|
this.scaleTable({
|
|
170
171
|
parentWidth,
|
|
171
172
|
layoutChanged
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import uuid from 'uuid';
|
|
2
2
|
import { DOMSerializer } from 'prosemirror-model';
|
|
3
|
-
import {
|
|
3
|
+
import { getCellDomAttrs, getCellAttrs } from '@atlaskit/adf-schema';
|
|
4
4
|
import { getFeatureFlags } from '../../feature-flags-context';
|
|
5
5
|
export default class TableCellNodeView {
|
|
6
6
|
constructor(node, view, getPos, observer) {
|
|
@@ -25,13 +25,26 @@ export default class TableCellNodeView {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
updateNodeView(node) {
|
|
29
29
|
if (this.node.type !== node.type) {
|
|
30
30
|
return false;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
const attrs =
|
|
34
|
-
const nextAttrs =
|
|
33
|
+
const attrs = getCellDomAttrs(this.node);
|
|
34
|
+
const nextAttrs = getCellDomAttrs(node);
|
|
35
|
+
const {
|
|
36
|
+
colspan,
|
|
37
|
+
rowspan
|
|
38
|
+
} = getCellAttrs(this.dom); // need to rerender when colspan/rowspan in dom are different from the node attrs
|
|
39
|
+
// this can happen when undoing merge cells
|
|
40
|
+
|
|
41
|
+
const defaultColspan = 1,
|
|
42
|
+
defaultRowspan = 1;
|
|
43
|
+
|
|
44
|
+
if (colspan !== (node.attrs.colspan || defaultColspan) || rowspan !== (node.attrs.rowspan || defaultRowspan)) {
|
|
45
|
+
return false;
|
|
46
|
+
} // added + changed attributes
|
|
47
|
+
|
|
35
48
|
|
|
36
49
|
const addedAttrs = Object.entries(nextAttrs).filter(([key, value]) => attrs[key] !== value);
|
|
37
50
|
const removedAttrs = Object.keys(attrs).filter(key => !nextAttrs.hasOwnProperty(key));
|
|
@@ -51,9 +64,9 @@ export default class TableCellNodeView {
|
|
|
51
64
|
}
|
|
52
65
|
|
|
53
66
|
update(node) {
|
|
54
|
-
const
|
|
67
|
+
const didUpdate = this.updateNodeView(node);
|
|
55
68
|
this.node = node;
|
|
56
|
-
return
|
|
69
|
+
return didUpdate;
|
|
57
70
|
}
|
|
58
71
|
|
|
59
72
|
destroy() {
|
|
@@ -206,7 +206,7 @@ export const areColumnsEven = resizeState => {
|
|
|
206
206
|
return newResizeState.cols.every((col, i) => col.width === resizeState.cols[i].width);
|
|
207
207
|
}; // Get the layout
|
|
208
208
|
|
|
209
|
-
const normaliseTableLayout = input => {
|
|
209
|
+
export const normaliseTableLayout = input => {
|
|
210
210
|
switch (input) {
|
|
211
211
|
case 'wide':
|
|
212
212
|
return input;
|
|
@@ -218,7 +218,6 @@ const normaliseTableLayout = input => {
|
|
|
218
218
|
return 'default';
|
|
219
219
|
}
|
|
220
220
|
};
|
|
221
|
-
|
|
222
221
|
export const getNewResizeStateFromSelectedColumns = (rect, state, domAtPos, dynamicTextSizing) => {
|
|
223
222
|
const {
|
|
224
223
|
totalRowCount,
|
|
@@ -78,7 +78,7 @@ export const scaleWithParent = (tableRef, parentWidth, table, start, domAtPos) =
|
|
|
78
78
|
return scaleTableTo(resizeState, Math.floor(parentWidth));
|
|
79
79
|
}; // Scales the table to a given size and updates its colgroup DOM node
|
|
80
80
|
|
|
81
|
-
function scaleTableTo(state, maxSize) {
|
|
81
|
+
export function scaleTableTo(state, maxSize) {
|
|
82
82
|
const scaleFactor = maxSize / getTotalWidth(state);
|
|
83
83
|
let newState = { ...state,
|
|
84
84
|
maxSize,
|
|
@@ -97,12 +97,12 @@ export const getToolbarCellOptionsConfig = (editorState, initialSelectionRect, {
|
|
|
97
97
|
const options = [{
|
|
98
98
|
id: 'editor.table.insertColumn',
|
|
99
99
|
title: formatMessage(tableMessages.insertColumn),
|
|
100
|
-
onClick: (state, dispatch) => {
|
|
100
|
+
onClick: (state, dispatch, view) => {
|
|
101
101
|
const selectionRect = getClosestSelectionRect(state);
|
|
102
102
|
const index = selectionRect === null || selectionRect === void 0 ? void 0 : selectionRect.right;
|
|
103
103
|
|
|
104
104
|
if (index) {
|
|
105
|
-
insertColumnWithAnalytics(INPUT_METHOD.FLOATING_TB, index)(state, dispatch);
|
|
105
|
+
insertColumnWithAnalytics(INPUT_METHOD.FLOATING_TB, index)(state, dispatch, view);
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
return true;
|
|
@@ -132,11 +132,11 @@ export const getToolbarCellOptionsConfig = (editorState, initialSelectionRect, {
|
|
|
132
132
|
title: formatMessage(tableMessages.removeColumns, {
|
|
133
133
|
0: numberOfColumns
|
|
134
134
|
}),
|
|
135
|
-
onClick: (state, dispatch) => {
|
|
135
|
+
onClick: (state, dispatch, view) => {
|
|
136
136
|
const selectionRect = getClosestSelectionRect(state);
|
|
137
137
|
|
|
138
138
|
if (selectionRect) {
|
|
139
|
-
deleteColumnsWithAnalytics(INPUT_METHOD.FLOATING_TB, selectionRect)(state, dispatch);
|
|
139
|
+
deleteColumnsWithAnalytics(INPUT_METHOD.FLOATING_TB, selectionRect)(state, dispatch, view);
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
return true;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
2
|
+
import { hasTableBeenResized } from '../pm-plugins/table-resizing/utils';
|
|
2
3
|
import { setMeta } from './metadata';
|
|
4
|
+
import { getResizeState, normaliseTableLayout } from '../pm-plugins/table-resizing/utils/resize-state';
|
|
5
|
+
import { getTableMaxWidth } from '../pm-plugins/table-resizing/utils/misc';
|
|
6
|
+
import { tableCellMinWidth } from '@atlaskit/editor-common';
|
|
7
|
+
import { scaleTableTo } from '../pm-plugins/table-resizing/utils/scale-table';
|
|
3
8
|
export const updateColumnWidths = (resizeState, table, start) => tr => {
|
|
4
9
|
const map = TableMap.get(table);
|
|
5
10
|
const updatedCellsAttrs = {}; // calculating new attributes for each cell
|
|
@@ -84,19 +89,65 @@ export const updateColumnWidths = (resizeState, table, start) => tr => {
|
|
|
84
89
|
}
|
|
85
90
|
|
|
86
91
|
const tablePos = start - 1;
|
|
87
|
-
const
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
*
|
|
92
|
+
const selectionBookmark = tr.selection.getBookmark();
|
|
93
|
+
tr.replaceWith(tablePos, tablePos + table.nodeSize, table.type.createChecked(table.attrs, rows, table.marks));
|
|
94
|
+
/**
|
|
95
|
+
* We want to restore to the original selection but w/o applying the mapping. Function
|
|
96
|
+
* tr.replaceWith puts the selection after the inserted content. We need to manually
|
|
97
|
+
* set the selection back to original state. Mapping in this case doesn't quite work
|
|
98
|
+
* e.g. if we change the content before a selection. This is because mapping
|
|
99
|
+
* means moving it if the content in front of it changed. Instead we can get
|
|
100
|
+
* bookmark of selection.
|
|
92
101
|
*
|
|
93
|
-
*
|
|
94
|
-
* will map the selection to after the table as it thinks the original table
|
|
95
|
-
* node has been deleted.
|
|
102
|
+
* @see https://github.com/ProseMirror/prosemirror/issues/645
|
|
96
103
|
*/
|
|
97
104
|
|
|
98
|
-
|
|
99
|
-
|
|
105
|
+
return tr.setSelection(selectionBookmark.resolve(tr.doc));
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* This function is called when user inserts/deletes a column in a table to rescale all columns.
|
|
109
|
+
* This is done manually to avoid a multi-dispatch in TableComponent. See [ED-8288].
|
|
110
|
+
* @param table
|
|
111
|
+
* @param view
|
|
112
|
+
* @returns Updated transaction with rescaled columns for a given table
|
|
113
|
+
*/
|
|
114
|
+
|
|
115
|
+
export const rescaleColumns = (table, view) => tr => {
|
|
116
|
+
if (!view || !hasTableBeenResized(table.node)) {
|
|
117
|
+
return tr;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
const {
|
|
121
|
+
state
|
|
122
|
+
} = view;
|
|
123
|
+
const domAtPos = view.domAtPos.bind(view);
|
|
124
|
+
const maybeTable = domAtPos(table.start).node;
|
|
125
|
+
const tableRef = maybeTable.closest('table');
|
|
126
|
+
|
|
127
|
+
if (!tableRef) {
|
|
128
|
+
return tr;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
const layout = normaliseTableLayout(tableRef === null || tableRef === void 0 ? void 0 : tableRef.dataset.layout);
|
|
132
|
+
const maxSize = getTableMaxWidth({
|
|
133
|
+
table: table.node,
|
|
134
|
+
tableStart: table.start,
|
|
135
|
+
state,
|
|
136
|
+
layout,
|
|
137
|
+
dynamicTextSizing: true
|
|
138
|
+
});
|
|
139
|
+
let resizeState = getResizeState({
|
|
140
|
+
minWidth: tableCellMinWidth,
|
|
141
|
+
table: table.node,
|
|
142
|
+
start: table.start,
|
|
143
|
+
tableRef,
|
|
144
|
+
domAtPos,
|
|
145
|
+
maxSize
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
if (resizeState.overflow) {
|
|
149
|
+
resizeState = scaleTableTo(resizeState, maxSize);
|
|
150
|
+
}
|
|
100
151
|
|
|
101
|
-
return
|
|
152
|
+
return updateColumnWidths(resizeState, table.node, table.start)(tr);
|
|
102
153
|
};
|
|
@@ -296,7 +296,7 @@ class ContextualMenu extends Component {
|
|
|
296
296
|
break;
|
|
297
297
|
|
|
298
298
|
case 'insert_column':
|
|
299
|
-
insertColumnWithAnalytics(INPUT_METHOD.CONTEXT_MENU, selectionRect.right)(state, dispatch);
|
|
299
|
+
insertColumnWithAnalytics(INPUT_METHOD.CONTEXT_MENU, selectionRect.right)(state, dispatch, editorView);
|
|
300
300
|
this.toggleOpen();
|
|
301
301
|
break;
|
|
302
302
|
|
|
@@ -185,7 +185,7 @@ class FloatingInsertButton extends React.Component {
|
|
|
185
185
|
state,
|
|
186
186
|
dispatch
|
|
187
187
|
} = editorView;
|
|
188
|
-
insertColumnWithAnalytics(INPUT_METHOD.BUTTON, insertColumnButtonIndex)(state, dispatch);
|
|
188
|
+
insertColumnWithAnalytics(INPUT_METHOD.BUTTON, insertColumnButtonIndex)(state, dispatch, editorView);
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
|
|
@@ -117,12 +117,6 @@ class ToolbarTextColor extends React.Component {
|
|
|
117
117
|
isShowingMoreColors
|
|
118
118
|
} = this.state;
|
|
119
119
|
|
|
120
|
-
if (e.defaultPrevented) {
|
|
121
|
-
// This should be handled by stopping propogation, but as an additional safety net
|
|
122
|
-
// we ignore handled events for the purpose of hiding the popup.
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
120
|
if (isOpen === true) {
|
|
127
121
|
this.dispatchAnalyticsEvent(this.buildAnalyticsPalette(ACTION.CLOSED, {
|
|
128
122
|
isShowingMoreColors,
|
|
@@ -207,11 +201,13 @@ class ToolbarTextColor extends React.Component {
|
|
|
207
201
|
label: ""
|
|
208
202
|
})))
|
|
209
203
|
})
|
|
204
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
205
|
+
"data-testid": "text-color-palette"
|
|
210
206
|
}, /*#__PURE__*/React.createElement(ColorPalette, {
|
|
211
207
|
palette: palette,
|
|
212
208
|
onClick: color => this.changeTextColor(color, pluginState.disabled),
|
|
213
209
|
selectedColor: pluginState.color
|
|
214
|
-
}), showMoreColorsToggle && /*#__PURE__*/React.createElement(ShowMoreWrapper, null, /*#__PURE__*/React.createElement(Button, {
|
|
210
|
+
})), showMoreColorsToggle && /*#__PURE__*/React.createElement(ShowMoreWrapper, null, /*#__PURE__*/React.createElement(Button, {
|
|
215
211
|
appearance: "subtle",
|
|
216
212
|
onClick: this.handleShowMoreToggle,
|
|
217
213
|
iconBefore: /*#__PURE__*/React.createElement(EditorBackgroundColorIcon, {
|
|
@@ -4,14 +4,13 @@ import { akEditorFloatingDialogZIndex } from '@atlaskit/editor-shared-styles';
|
|
|
4
4
|
import { Popup } from '@atlaskit/editor-common';
|
|
5
5
|
import { borderRadius, gridSize } from '@atlaskit/theme/constants';
|
|
6
6
|
import { N0, N60A, N50A } from '@atlaskit/theme/colors';
|
|
7
|
-
import { divide } from '@atlaskit/theme/math';
|
|
8
7
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../../analytics';
|
|
9
8
|
import { TypeAheadList } from './TypeAheadList';
|
|
10
9
|
const TypeAheadContent = styled.div`
|
|
11
10
|
background: ${N0};
|
|
12
11
|
border-radius: ${borderRadius()}px;
|
|
13
12
|
box-shadow: 0 0 1px ${N60A}, 0 4px 8px -2px ${N50A};
|
|
14
|
-
padding: ${
|
|
13
|
+
padding: ${gridSize() / 2}px 0;
|
|
15
14
|
width: 320px;
|
|
16
15
|
max-height: 380px; /* ~5.5 visibile items */
|
|
17
16
|
overflow-y: auto;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
|
-
import { Popup } from '@atlaskit/editor-common';
|
|
3
|
+
import { Popup, withOuterListeners } from '@atlaskit/editor-common';
|
|
4
4
|
import Button from '@atlaskit/button';
|
|
5
5
|
import Tooltip from '@atlaskit/tooltip';
|
|
6
6
|
import { N60A } from '@atlaskit/theme/colors';
|
|
@@ -32,6 +32,8 @@ const ColorPickerButton = props => {
|
|
|
32
32
|
setIsPopupOpen(!isPopupOpen);
|
|
33
33
|
};
|
|
34
34
|
|
|
35
|
+
const ColorPaletteWithListeners = withOuterListeners(ColorPalette);
|
|
36
|
+
|
|
35
37
|
const onColorSelected = (color, label) => {
|
|
36
38
|
setIsPopupOpen(false);
|
|
37
39
|
|
|
@@ -68,11 +70,12 @@ const ColorPickerButton = props => {
|
|
|
68
70
|
fitWidth: 350,
|
|
69
71
|
offset: [0, 10],
|
|
70
72
|
alignX: props.alignX
|
|
71
|
-
}, /*#__PURE__*/React.createElement(ColorPickerWrapper, null, /*#__PURE__*/React.createElement(
|
|
73
|
+
}, /*#__PURE__*/React.createElement(ColorPickerWrapper, null, /*#__PURE__*/React.createElement(ColorPaletteWithListeners, {
|
|
72
74
|
palette: props.colorPalette,
|
|
73
75
|
cols: props.cols,
|
|
74
76
|
selectedColor: props.currentColor || null,
|
|
75
|
-
onClick: onColorSelected
|
|
77
|
+
onClick: onColorSelected,
|
|
78
|
+
handleClickOutside: togglePopup
|
|
76
79
|
})));
|
|
77
80
|
};
|
|
78
81
|
|
|
@@ -9,6 +9,7 @@ import { mockCreateAnalyticsEvent, mockFire } from '@atlaskit/editor-test-helper
|
|
|
9
9
|
import ColorPickerButton from './index';
|
|
10
10
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../../plugins/analytics/types';
|
|
11
11
|
import { editorAnalyticsChannel } from '../../plugins/analytics/consts';
|
|
12
|
+
import { act } from 'react-dom/test-utils';
|
|
12
13
|
describe('color-picker-button', () => {
|
|
13
14
|
const onChangeMock = jest.fn();
|
|
14
15
|
|
|
@@ -42,6 +43,20 @@ describe('color-picker-button', () => {
|
|
|
42
43
|
expect(wrapper.find('ColorPalette')).toHaveLength(1);
|
|
43
44
|
expect(wrapper.find('Color')).toHaveLength(21);
|
|
44
45
|
});
|
|
46
|
+
it('should close ColorPalette popup after clicking outside', () => {
|
|
47
|
+
const wrapper = getWrapper(); // show the popup
|
|
48
|
+
|
|
49
|
+
wrapper.find('button').simulate('click'); // make sure the popup and picker are shown
|
|
50
|
+
|
|
51
|
+
expect(wrapper.find('Popup')).toHaveLength(1);
|
|
52
|
+
const colorPalette = wrapper.find('InjectIntl(ColorPalette)').instance();
|
|
53
|
+
act(() => {
|
|
54
|
+
colorPalette.props.handleClickOutside();
|
|
55
|
+
});
|
|
56
|
+
wrapper.update(); // make sure popup is hidden
|
|
57
|
+
|
|
58
|
+
expect(wrapper.find('Popup')).toHaveLength(0);
|
|
59
|
+
});
|
|
45
60
|
it('should hide popup and call onChange after selecting a color', () => {
|
|
46
61
|
const wrapper = getWrapper();
|
|
47
62
|
selectColor(wrapper, 'Mintie'); // ensure popup is hidden
|
|
@@ -7,13 +7,12 @@ import ChevronRightIcon from '@atlaskit/icon/glyph/chevron-right';
|
|
|
7
7
|
import Button from '@atlaskit/button';
|
|
8
8
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
9
9
|
import { messages } from '../messages';
|
|
10
|
-
import { multiply } from '@atlaskit/theme/math';
|
|
11
10
|
export const ExpandContainer = styled.div`
|
|
12
11
|
border-bottom: 1px solid ${N40};
|
|
13
12
|
`;
|
|
14
13
|
export const ExpandControl = styled.div`
|
|
15
14
|
display: flex;
|
|
16
|
-
height: ${
|
|
15
|
+
height: ${gridSize() * 6}px;
|
|
17
16
|
justify-content: center;
|
|
18
17
|
padding-right: ${gridSize()}px;
|
|
19
18
|
`;
|
|
@@ -22,8 +21,8 @@ const ChevronContainer = styled.div`
|
|
|
22
21
|
align-items: center;
|
|
23
22
|
|
|
24
23
|
& > button {
|
|
25
|
-
width: ${
|
|
26
|
-
height: ${
|
|
24
|
+
width: ${gridSize() * 3}px;
|
|
25
|
+
height: ${gridSize() * 3}px;
|
|
27
26
|
}
|
|
28
27
|
`;
|
|
29
28
|
const LabelContainer = styled.div`
|
|
@@ -11,12 +11,11 @@ import { messages } from '../messages'; // eslint-disable-next-line import/no-cy
|
|
|
11
11
|
import FormContent from '../FormContent';
|
|
12
12
|
import { getNameFromDuplicateField, isDuplicateField } from '../utils';
|
|
13
13
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
14
|
-
import { multiply } from '@atlaskit/theme/math';
|
|
15
14
|
import { N40A } from '@atlaskit/theme/colors';
|
|
16
15
|
const ActionsWrapper = styled.div`
|
|
17
16
|
border-top: 1px solid ${N40A};
|
|
18
|
-
margin-top: ${
|
|
19
|
-
padding-top: ${
|
|
17
|
+
margin-top: ${gridSize() * 2}px;
|
|
18
|
+
padding-top: ${gridSize() * 2}px;
|
|
20
19
|
`;
|
|
21
20
|
|
|
22
21
|
const populateFromParameters = (parameters, fields) => {
|
|
@@ -2,14 +2,13 @@ import React from 'react';
|
|
|
2
2
|
import { injectIntl } from 'react-intl';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
5
|
-
import { multiply } from '@atlaskit/theme/math';
|
|
6
5
|
import CrossCircleIcon from '@atlaskit/icon/glyph/cross-circle';
|
|
7
6
|
import Tooltip from '@atlaskit/tooltip';
|
|
8
7
|
import * as colors from '@atlaskit/theme/colors';
|
|
9
8
|
import { messages } from '../messages';
|
|
10
9
|
const RemovableFieldWrapper = styled.div`
|
|
11
10
|
position: relative;
|
|
12
|
-
margin-bottom: ${props => props.hasMarginBottom ?
|
|
11
|
+
margin-bottom: ${props => props.hasMarginBottom ? gridSize() * 2 : 0}px;
|
|
13
12
|
`;
|
|
14
13
|
const RemoveButtonWrapper = styled.div`
|
|
15
14
|
position: absolute;
|
package/dist/es2019/version.json
CHANGED
|
@@ -312,7 +312,8 @@ export default function createPluginsList(props, prevProps, createAnalyticsEvent
|
|
|
312
312
|
|
|
313
313
|
if (props.allowLayouts) {
|
|
314
314
|
preset.add([layoutPlugin, _objectSpread(_objectSpread({}, typeof props.allowLayouts === 'boolean' ? {} : props.allowLayouts), {}, {
|
|
315
|
-
useLongPressSelection: false
|
|
315
|
+
useLongPressSelection: false,
|
|
316
|
+
UNSAFE_allowSingleColumnLayout: props.allowLayouts.UNSAFE_allowSingleColumnLayout
|
|
316
317
|
})]);
|
|
317
318
|
}
|
|
318
319
|
|
package/dist/esm/i18n/cs.js
CHANGED
|
@@ -26,6 +26,7 @@ export default {
|
|
|
26
26
|
'fabric.editor.blockquote.description': 'Vložit citaci',
|
|
27
27
|
'fabric.editor.blockquote2': 'Citace',
|
|
28
28
|
'fabric.editor.bold': 'Tučné',
|
|
29
|
+
'fabric.editor.bug': 'Chyba',
|
|
29
30
|
'fabric.editor.canNotSortTable': '⚠️ Tabulku se sloučenými buňkami nelze seřadit',
|
|
30
31
|
'fabric.editor.cancelButton': 'Zrušit',
|
|
31
32
|
'fabric.editor.captionPlaceholder': 'Přidejte popisek',
|
|
@@ -43,6 +44,7 @@ export default {
|
|
|
43
44
|
'fabric.editor.code': 'Kód',
|
|
44
45
|
'fabric.editor.codeblock': 'Fragment kódu',
|
|
45
46
|
'fabric.editor.codeblock.description': 'Zobrazit kód se zvýrazněním syntaxe',
|
|
47
|
+
'fabric.editor.collapseTable': 'Sbalit tabulku',
|
|
46
48
|
'fabric.editor.columns': 'Rozvržení',
|
|
47
49
|
'fabric.editor.columns.description': 'Uspořádejte svou stránku pomocí oddílů',
|
|
48
50
|
'fabric.editor.configFailedToLoad': 'Nepodařilo se načíst',
|
|
@@ -71,6 +73,7 @@ export default {
|
|
|
71
73
|
'fabric.editor.decision': 'Rozhodnutí',
|
|
72
74
|
'fabric.editor.decision.description': 'Zaznamenávejte rozhodnutí, aby se snadněji sledovala',
|
|
73
75
|
'fabric.editor.decisionPlaceholder': 'Přidat rozhodnutí...',
|
|
76
|
+
'fabric.editor.defaultAltText': 'Položka seznamu',
|
|
74
77
|
'fabric.editor.displayBlock': 'Zobrazit jako kartu',
|
|
75
78
|
'fabric.editor.displayEmbed': 'Zobrazit jako vložený objekt',
|
|
76
79
|
'fabric.editor.displayInline': 'Zobrazit v řádku',
|
|
@@ -80,8 +83,11 @@ export default {
|
|
|
80
83
|
'fabric.editor.distributeColumns': 'Rozložení sloupců',
|
|
81
84
|
'fabric.editor.edit': 'Upravit',
|
|
82
85
|
'fabric.editor.editAltText': 'Upravit alternativní text',
|
|
86
|
+
'fabric.editor.editDateText': 'Upravit datum',
|
|
83
87
|
'fabric.editor.editLink': 'Upravit odkaz',
|
|
84
88
|
'fabric.editor.editMode.inviteToEditButton.title': 'Pozvat k úpravám',
|
|
89
|
+
'fabric.editor.editStatusColor': 'Upravit barvu stavu',
|
|
90
|
+
'fabric.editor.editStatusText': 'Upravit stav',
|
|
85
91
|
'fabric.editor.editorHelp': 'Nápověda editoru.',
|
|
86
92
|
'fabric.editor.elementBrowser.help': 'Nápověda',
|
|
87
93
|
'fabric.editor.elementbrowser.categorylist.category-admin': 'Administrace',
|
|
@@ -102,6 +108,7 @@ export default {
|
|
|
102
108
|
'fabric.editor.emoji': 'Emoji',
|
|
103
109
|
'fabric.editor.emoji.description': 'Používejte emoji k vyjádření nápadů 🎉 a emocí 😄',
|
|
104
110
|
'fabric.editor.emptyLink': 'Zadejte odkaz.',
|
|
111
|
+
'fabric.editor.epic': 'Epic',
|
|
105
112
|
'fabric.editor.error': 'Chyba',
|
|
106
113
|
'fabric.editor.errorPanel': 'Panel chyb',
|
|
107
114
|
'fabric.editor.errorPanel.description': 'Chyby zobrazit v barevném panelu',
|
|
@@ -116,6 +123,9 @@ export default {
|
|
|
116
123
|
'fabric.editor.findNext': 'Najít další',
|
|
117
124
|
'fabric.editor.findPrevious': 'Najít předchozí',
|
|
118
125
|
'fabric.editor.findReplaceToolbarButton': 'Najít a nahradit',
|
|
126
|
+
'fabric.editor.floatingToolbar.confirmModalCancel': 'Zrušit',
|
|
127
|
+
'fabric.editor.floatingToolbar.confirmModalHeading': 'Jste si jistí?',
|
|
128
|
+
'fabric.editor.floatingToolbar.confirmModalOK': 'OK',
|
|
119
129
|
'fabric.editor.headerColumn': 'Sloupec záhlaví',
|
|
120
130
|
'fabric.editor.headerRow': 'Řádek záhlaví',
|
|
121
131
|
'fabric.editor.heading1': 'Nadpis 1',
|
|
@@ -137,8 +147,9 @@ export default {
|
|
|
137
147
|
'fabric.editor.horizontalRule.description': 'Rozdělit obsah horizontální čárou',
|
|
138
148
|
'fabric.editor.hyperlink.searchLinkAriaDescription': 'Níže se objeví návrhy na základě vámi napsaného textu v poli',
|
|
139
149
|
'fabric.editor.hyperlink.searchLinkResults': '{count, plural, =0 {nebyly nalezeny žádné výsledky} one {{count,number} nalezený výsledek} few {{count,number} nalezené výsledky} many {{count,number} nalezeného výsledku} other {{count,number} nalezených výsledků}}',
|
|
140
|
-
'fabric.editor.hyperlinkToolbarPlaceholder': 'Vložit
|
|
150
|
+
'fabric.editor.hyperlinkToolbarPlaceholder': 'Vložit nebo vyhledat odkaz',
|
|
141
151
|
'fabric.editor.image': 'Obrázek',
|
|
152
|
+
'fabric.editor.improvement': 'Vylepšení',
|
|
142
153
|
'fabric.editor.info': 'Informace',
|
|
143
154
|
'fabric.editor.infoPanel': 'Informační panel',
|
|
144
155
|
'fabric.editor.infoPanel.description': 'Zvýraznit informace v barevném panelu',
|
|
@@ -176,7 +187,7 @@ export default {
|
|
|
176
187
|
'fabric.editor.orderedList.description': 'Vytvořit seřazený seznam',
|
|
177
188
|
'fabric.editor.other': 'Jiné...',
|
|
178
189
|
'fabric.editor.panel.backgroundColor': 'Barva pozadí',
|
|
179
|
-
'fabric.editor.panel.emoji': 'Přidat
|
|
190
|
+
'fabric.editor.panel.emoji': 'Přidat emoji',
|
|
180
191
|
'fabric.editor.pastePlainText': 'Vložit prostý text',
|
|
181
192
|
'fabric.editor.placeholderAltText': 'Popište tento obrázek alternativním textem',
|
|
182
193
|
'fabric.editor.placeholderText': 'Text placeholderu',
|
|
@@ -201,7 +212,9 @@ export default {
|
|
|
201
212
|
'fabric.editor.status': 'Stav',
|
|
202
213
|
'fabric.editor.status.description': 'Přidat vlastní štítek stavu',
|
|
203
214
|
'fabric.editor.statusPlaceholder': 'Nastavit stav',
|
|
215
|
+
'fabric.editor.story': 'Story',
|
|
204
216
|
'fabric.editor.strike': 'Přeškrtnutí',
|
|
217
|
+
'fabric.editor.subTask': 'Podúkol',
|
|
205
218
|
'fabric.editor.subscript': 'Dolní index',
|
|
206
219
|
'fabric.editor.success': 'Úspěch',
|
|
207
220
|
'fabric.editor.successPanel': 'Panel úspěchů',
|
|
@@ -211,6 +224,9 @@ export default {
|
|
|
211
224
|
'fabric.editor.table': 'Tabulka',
|
|
212
225
|
'fabric.editor.table.description': 'Vložit tabulku',
|
|
213
226
|
'fabric.editor.tableOptions': 'Možnosti tabulky',
|
|
227
|
+
'fabric.editor.tables.confirmDeleteLinkedModalMessage': 'Odstraněním této tabulky se odstraní i všechna data obsažená v připojených grafech.',
|
|
228
|
+
'fabric.editor.tables.confirmDeleteLinkedModalOKButton': 'Odstranit tabulku a data',
|
|
229
|
+
'fabric.editor.task': 'Úkol',
|
|
214
230
|
'fabric.editor.taskPlaceholder': 'Napište svou akci a použitím „@“ ji někomu přidělte.',
|
|
215
231
|
'fabric.editor.textColor': 'Barva textu',
|
|
216
232
|
'fabric.editor.textColor.lessColors': 'Méně barev',
|