@atlaskit/editor-plugin-table 4.0.2 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/cjs/i18n/cs.js +2 -3
- package/dist/cjs/i18n/da.js +2 -3
- package/dist/cjs/i18n/de.js +2 -3
- package/dist/cjs/i18n/en.js +2 -3
- package/dist/cjs/i18n/en_GB.js +2 -3
- package/dist/cjs/i18n/en_ZZ.js +2 -3
- package/dist/cjs/i18n/es.js +2 -3
- package/dist/cjs/i18n/fi.js +2 -3
- package/dist/cjs/i18n/fr.js +2 -3
- package/dist/cjs/i18n/hu.js +2 -3
- package/dist/cjs/i18n/it.js +2 -3
- package/dist/cjs/i18n/ja.js +2 -3
- package/dist/cjs/i18n/ko.js +2 -3
- package/dist/cjs/i18n/nb.js +2 -3
- package/dist/cjs/i18n/nl.js +2 -3
- package/dist/cjs/i18n/pl.js +2 -3
- package/dist/cjs/i18n/pt_BR.js +2 -3
- package/dist/cjs/i18n/ru.js +2 -3
- package/dist/cjs/i18n/sv.js +2 -3
- package/dist/cjs/i18n/th.js +2 -3
- package/dist/cjs/i18n/tr.js +2 -3
- package/dist/cjs/i18n/uk.js +2 -3
- package/dist/cjs/i18n/vi.js +2 -3
- package/dist/cjs/i18n/zh.js +2 -3
- package/dist/cjs/i18n/zh_TW.js +2 -3
- package/dist/cjs/plugins/table/commands/clear.js +3 -5
- package/dist/cjs/plugins/table/commands/collapse.js +2 -3
- package/dist/cjs/plugins/table/commands/go-to-next-cell.js +2 -3
- package/dist/cjs/plugins/table/commands/hover.js +8 -15
- package/dist/cjs/plugins/table/commands/insert.js +6 -11
- package/dist/cjs/plugins/table/commands/misc.js +23 -45
- package/dist/cjs/plugins/table/commands/referentiality.js +2 -3
- package/dist/cjs/plugins/table/commands/selection.js +3 -6
- package/dist/cjs/plugins/table/commands/sort.js +2 -3
- package/dist/cjs/plugins/table/commands/split-cell.js +2 -3
- package/dist/cjs/plugins/table/commands/toggle.js +7 -13
- package/dist/cjs/plugins/table/commands-with-analytics.js +19 -37
- package/dist/cjs/plugins/table/create-plugin-config.js +2 -3
- package/dist/cjs/plugins/table/event-handlers.js +12 -22
- package/dist/cjs/plugins/table/handlers.js +2 -3
- package/dist/cjs/plugins/table/index.js +8 -9
- package/dist/cjs/plugins/table/nodeviews/OverflowShadowsObserver.js +5 -6
- package/dist/cjs/plugins/table/nodeviews/TableComponent.js +2 -3
- package/dist/cjs/plugins/table/nodeviews/TableContainer.js +10 -13
- package/dist/cjs/plugins/table/nodeviews/TableResizer.js +4 -5
- package/dist/cjs/plugins/table/nodeviews/TableStickyScrollbar.js +5 -10
- package/dist/cjs/plugins/table/nodeviews/table.js +4 -6
- package/dist/cjs/plugins/table/nodeviews/tableCell.js +2 -3
- package/dist/cjs/plugins/table/nodeviews/update-overflow-shadows.js +2 -3
- package/dist/cjs/plugins/table/pm-plugins/decorations/plugin.js +5 -9
- package/dist/cjs/plugins/table/pm-plugins/decorations/utils/column-controls.js +3 -5
- package/dist/cjs/plugins/table/pm-plugins/decorations/utils/column-resizing.js +3 -5
- package/dist/cjs/plugins/table/pm-plugins/decorations/utils/compose-decorations.js +2 -3
- package/dist/cjs/plugins/table/pm-plugins/default-table-selection.js +2 -3
- package/dist/cjs/plugins/table/pm-plugins/keymap.js +1 -2
- package/dist/cjs/plugins/table/pm-plugins/main.js +2 -3
- package/dist/cjs/plugins/table/pm-plugins/plugin-factory.js +3 -6
- package/dist/cjs/plugins/table/pm-plugins/plugin-key.js +1 -2
- package/dist/cjs/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +3 -5
- package/dist/cjs/plugins/table/pm-plugins/sticky-headers/commands.js +3 -5
- package/dist/cjs/plugins/table/pm-plugins/sticky-headers/nodeviews/dom.js +3 -5
- package/dist/cjs/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +6 -8
- package/dist/cjs/plugins/table/pm-plugins/sticky-headers/plugin-key.js +1 -2
- package/dist/cjs/plugins/table/pm-plugins/sticky-headers/plugin-state.js +2 -4
- package/dist/cjs/plugins/table/pm-plugins/sticky-headers/plugin.js +2 -3
- package/dist/cjs/plugins/table/pm-plugins/sticky-headers/util.js +2 -3
- package/dist/cjs/plugins/table/pm-plugins/table-analytics.js +5 -8
- package/dist/cjs/plugins/table/pm-plugins/table-local-id.js +2 -3
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/commands.js +7 -13
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/event-handlers.js +3 -4
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/plugin-factory.js +3 -6
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/plugin-key.js +1 -2
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/reducer.js +2 -3
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/colgroup.js +7 -13
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/column-state.js +5 -10
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/consts.js +2 -4
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/dom.js +8 -15
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/misc.js +2 -3
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/resize-column.js +2 -3
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/resize-logic.js +70 -71
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +11 -21
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +5 -9
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/unit-to-number.js +2 -3
- package/dist/cjs/plugins/table/pm-plugins/table-selection-keymap.js +1 -2
- package/dist/cjs/plugins/table/pm-plugins/table-width.js +3 -5
- package/dist/cjs/plugins/table/reducer.js +2 -3
- package/dist/cjs/plugins/table/toolbar.js +5 -9
- package/dist/cjs/plugins/table/transforms/column-width.js +4 -6
- package/dist/cjs/plugins/table/transforms/delete-columns.js +58 -58
- package/dist/cjs/plugins/table/transforms/delete-rows.js +52 -52
- package/dist/cjs/plugins/table/transforms/fix-tables.js +3 -6
- package/dist/cjs/plugins/table/transforms/replace-table.js +3 -4
- package/dist/cjs/plugins/table/types.js +5 -9
- package/dist/cjs/plugins/table/ui/ColumnResizeWidget/index.js +2 -3
- package/dist/cjs/plugins/table/ui/FloatingContextualButton/FixedButton.js +5 -10
- package/dist/cjs/plugins/table/ui/FloatingContextualButton/styles.js +3 -5
- package/dist/cjs/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +4 -7
- package/dist/cjs/plugins/table/ui/FloatingContextualMenu/index.js +1 -2
- package/dist/cjs/plugins/table/ui/FloatingContextualMenu/styles.js +2 -4
- package/dist/cjs/plugins/table/ui/FloatingDeleteButton/DeleteButton.js +1 -2
- package/dist/cjs/plugins/table/ui/FloatingDeleteButton/index.js +1 -2
- package/dist/cjs/plugins/table/ui/FloatingInsertButton/InsertButton.js +1 -2
- package/dist/cjs/plugins/table/ui/FloatingInsertButton/getPopupOptions.js +1 -2
- package/dist/cjs/plugins/table/ui/FloatingInsertButton/index.js +2 -4
- package/dist/cjs/plugins/table/ui/LayoutButton/index.js +1 -2
- package/dist/cjs/plugins/table/ui/TableFloatingControls/CornerControls/index.js +1 -2
- package/dist/cjs/plugins/table/ui/TableFloatingControls/NumberColumn/index.js +2 -3
- package/dist/cjs/plugins/table/ui/TableFloatingControls/RowControls/index.js +1 -2
- package/dist/cjs/plugins/table/ui/TableFloatingControls/index.js +1 -2
- package/dist/cjs/plugins/table/ui/common-styles.js +23 -14
- package/dist/cjs/plugins/table/ui/consts.js +47 -94
- package/dist/cjs/plugins/table/ui/messages.js +2 -3
- package/dist/cjs/plugins/table/ui/ui-styles.js +32 -38
- package/dist/cjs/plugins/table/utils/analytics.js +7 -12
- package/dist/cjs/plugins/table/utils/collapse.js +3 -5
- package/dist/cjs/plugins/table/utils/column-controls.js +6 -11
- package/dist/cjs/plugins/table/utils/decoration.js +10 -19
- package/dist/cjs/plugins/table/utils/dom.js +16 -28
- package/dist/cjs/plugins/table/utils/guidelines.js +1 -2
- package/dist/cjs/plugins/table/utils/nodes.js +12 -23
- package/dist/cjs/plugins/table/utils/paste.js +10 -16
- package/dist/cjs/plugins/table/utils/row-controls.js +7 -13
- package/dist/cjs/plugins/table/utils/selection.js +5 -9
- package/dist/cjs/plugins/table/utils/snapping.js +4 -7
- package/dist/cjs/plugins/table/utils/table.js +3 -5
- package/dist/cjs/plugins/table/utils/update-plugin-state-decorations.js +2 -3
- package/dist/cjs/plugins/table-plugin.js +1 -2
- package/dist/es2019/plugins/table/ui/common-styles.js +40 -4
- package/dist/es2019/plugins/table/ui/ui-styles.js +223 -85
- package/dist/esm/plugins/table/event-handlers.js +1 -1
- package/dist/esm/plugins/table/index.js +7 -7
- package/dist/esm/plugins/table/nodeviews/OverflowShadowsObserver.js +3 -3
- package/dist/esm/plugins/table/nodeviews/TableComponent.js +1 -1
- package/dist/esm/plugins/table/nodeviews/TableContainer.js +6 -6
- package/dist/esm/plugins/table/nodeviews/TableResizer.js +2 -2
- package/dist/esm/plugins/table/nodeviews/TableStickyScrollbar.js +3 -7
- package/dist/esm/plugins/table/nodeviews/table.js +1 -1
- package/dist/esm/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +3 -3
- package/dist/esm/plugins/table/pm-plugins/table-analytics.js +1 -1
- package/dist/esm/plugins/table/pm-plugins/table-resizing/event-handlers.js +1 -1
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/resize-logic.js +68 -67
- package/dist/esm/plugins/table/toolbar.js +1 -1
- package/dist/esm/plugins/table/transforms/column-width.js +1 -1
- package/dist/esm/plugins/table/transforms/delete-columns.js +56 -55
- package/dist/esm/plugins/table/transforms/delete-rows.js +51 -50
- package/dist/esm/plugins/table/transforms/replace-table.js +1 -1
- package/dist/esm/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +1 -1
- package/dist/esm/plugins/table/ui/common-styles.js +20 -6
- package/dist/esm/plugins/table/ui/ui-styles.js +18 -10
- package/dist/esm/plugins/table/utils/analytics.js +1 -1
- package/dist/esm/plugins/table/utils/dom.js +1 -1
- package/dist/esm/plugins/table/utils/paste.js +4 -4
- package/dist/types/plugins/table/index.d.ts +1 -0
- package/dist/types-ts4.5/plugins/table/index.d.ts +1 -0
- package/package.json +5 -2
- package/report.api.md +2 -0
- package/src/plugins/table/index.tsx +1 -1
- package/src/plugins/table/ui/common-styles.ts +46 -4
- package/src/plugins/table/ui/ui-styles.ts +235 -90
- package/tmp/api-report-tmp.d.ts +2 -0
|
@@ -26,7 +26,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
26
26
|
// #endregion
|
|
27
27
|
|
|
28
28
|
// #region Commands
|
|
29
|
-
var setEditorFocus = function setEditorFocus(editorHasFocus) {
|
|
29
|
+
var setEditorFocus = exports.setEditorFocus = function setEditorFocus(editorHasFocus) {
|
|
30
30
|
return (0, _pluginFactory.createCommand)({
|
|
31
31
|
type: 'SET_EDITOR_FOCUS',
|
|
32
32
|
data: {
|
|
@@ -34,8 +34,7 @@ var setEditorFocus = function setEditorFocus(editorHasFocus) {
|
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
};
|
|
37
|
-
exports.
|
|
38
|
-
var setTableRef = function setTableRef(ref) {
|
|
37
|
+
var setTableRef = exports.setTableRef = function setTableRef(ref) {
|
|
39
38
|
return (0, _pluginFactory.createCommand)(function (state) {
|
|
40
39
|
var tableRef = ref;
|
|
41
40
|
var foundTable = (0, _utils2.findTable)(state.selection);
|
|
@@ -64,8 +63,7 @@ var setTableRef = function setTableRef(ref) {
|
|
|
64
63
|
return tr.setMeta('addToHistory', false);
|
|
65
64
|
});
|
|
66
65
|
};
|
|
67
|
-
exports.
|
|
68
|
-
var setCellAttr = function setCellAttr(name, value) {
|
|
66
|
+
var setCellAttr = exports.setCellAttr = function setCellAttr(name, value) {
|
|
69
67
|
return function (state, dispatch) {
|
|
70
68
|
var tr = state.tr,
|
|
71
69
|
selection = state.selection;
|
|
@@ -96,8 +94,7 @@ var setCellAttr = function setCellAttr(name, value) {
|
|
|
96
94
|
return false;
|
|
97
95
|
};
|
|
98
96
|
};
|
|
99
|
-
exports.
|
|
100
|
-
var triggerUnlessTableHeader = function triggerUnlessTableHeader(command) {
|
|
97
|
+
var triggerUnlessTableHeader = exports.triggerUnlessTableHeader = function triggerUnlessTableHeader(command) {
|
|
101
98
|
return function (state, dispatch, view) {
|
|
102
99
|
var selection = state.selection,
|
|
103
100
|
tableHeader = state.schema.nodes.tableHeader;
|
|
@@ -116,8 +113,7 @@ var triggerUnlessTableHeader = function triggerUnlessTableHeader(command) {
|
|
|
116
113
|
return false;
|
|
117
114
|
};
|
|
118
115
|
};
|
|
119
|
-
exports.
|
|
120
|
-
var transformSliceRemoveCellBackgroundColor = function transformSliceRemoveCellBackgroundColor(slice, schema) {
|
|
116
|
+
var transformSliceRemoveCellBackgroundColor = exports.transformSliceRemoveCellBackgroundColor = function transformSliceRemoveCellBackgroundColor(slice, schema) {
|
|
121
117
|
var _schema$nodes = schema.nodes,
|
|
122
118
|
tableCell = _schema$nodes.tableCell,
|
|
123
119
|
tableHeader = _schema$nodes.tableHeader;
|
|
@@ -130,8 +126,7 @@ var transformSliceRemoveCellBackgroundColor = function transformSliceRemoveCellB
|
|
|
130
126
|
return maybeCell;
|
|
131
127
|
});
|
|
132
128
|
};
|
|
133
|
-
exports.
|
|
134
|
-
var transformSliceToAddTableHeaders = function transformSliceToAddTableHeaders(slice, schema) {
|
|
129
|
+
var transformSliceToAddTableHeaders = exports.transformSliceToAddTableHeaders = function transformSliceToAddTableHeaders(slice, schema) {
|
|
135
130
|
var _schema$nodes2 = schema.nodes,
|
|
136
131
|
table = _schema$nodes2.table,
|
|
137
132
|
tableHeader = _schema$nodes2.tableHeader,
|
|
@@ -151,8 +146,7 @@ var transformSliceToAddTableHeaders = function transformSliceToAddTableHeaders(s
|
|
|
151
146
|
return maybeTable;
|
|
152
147
|
});
|
|
153
148
|
};
|
|
154
|
-
exports.
|
|
155
|
-
var transformSliceToRemoveColumnsWidths = function transformSliceToRemoveColumnsWidths(slice, schema) {
|
|
149
|
+
var transformSliceToRemoveColumnsWidths = exports.transformSliceToRemoveColumnsWidths = function transformSliceToRemoveColumnsWidths(slice, schema) {
|
|
156
150
|
var _schema$nodes3 = schema.nodes,
|
|
157
151
|
tableHeader = _schema$nodes3.tableHeader,
|
|
158
152
|
tableCell = _schema$nodes3.tableCell;
|
|
@@ -168,22 +162,19 @@ var transformSliceToRemoveColumnsWidths = function transformSliceToRemoveColumns
|
|
|
168
162
|
return maybeCell;
|
|
169
163
|
});
|
|
170
164
|
};
|
|
171
|
-
exports.
|
|
172
|
-
var deleteTable = function deleteTable(state, dispatch) {
|
|
165
|
+
var deleteTable = exports.deleteTable = function deleteTable(state, dispatch) {
|
|
173
166
|
if (dispatch) {
|
|
174
167
|
dispatch((0, _utils2.removeTable)(state.tr));
|
|
175
168
|
}
|
|
176
169
|
return true;
|
|
177
170
|
};
|
|
178
|
-
exports.
|
|
179
|
-
var deleteTableIfSelected = function deleteTableIfSelected(state, dispatch) {
|
|
171
|
+
var deleteTableIfSelected = exports.deleteTableIfSelected = function deleteTableIfSelected(state, dispatch) {
|
|
180
172
|
if ((0, _utils2.isTableSelected)(state.selection)) {
|
|
181
173
|
return deleteTable(state, dispatch);
|
|
182
174
|
}
|
|
183
175
|
return false;
|
|
184
176
|
};
|
|
185
|
-
exports.
|
|
186
|
-
var convertFirstRowToHeader = function convertFirstRowToHeader(schema) {
|
|
177
|
+
var convertFirstRowToHeader = exports.convertFirstRowToHeader = function convertFirstRowToHeader(schema) {
|
|
187
178
|
return function (tr) {
|
|
188
179
|
var table = (0, _utils2.findTable)(tr.selection);
|
|
189
180
|
var map = _tableMap.TableMap.get(table.node);
|
|
@@ -194,8 +185,7 @@ var convertFirstRowToHeader = function convertFirstRowToHeader(schema) {
|
|
|
194
185
|
return tr;
|
|
195
186
|
};
|
|
196
187
|
};
|
|
197
|
-
exports.
|
|
198
|
-
var moveCursorBackward = function moveCursorBackward(state, dispatch) {
|
|
188
|
+
var moveCursorBackward = exports.moveCursorBackward = function moveCursorBackward(state, dispatch) {
|
|
199
189
|
var _ref = state.selection,
|
|
200
190
|
$cursor = _ref.$cursor;
|
|
201
191
|
// if cursor is in the middle of a text node, do nothing
|
|
@@ -257,8 +247,7 @@ var moveCursorBackward = function moveCursorBackward(state, dispatch) {
|
|
|
257
247
|
}
|
|
258
248
|
return true;
|
|
259
249
|
};
|
|
260
|
-
exports.
|
|
261
|
-
var setMultipleCellAttrs = function setMultipleCellAttrs(attrs, targetCellPosition) {
|
|
250
|
+
var setMultipleCellAttrs = exports.setMultipleCellAttrs = function setMultipleCellAttrs(attrs, targetCellPosition) {
|
|
262
251
|
return function (state, dispatch) {
|
|
263
252
|
var cursorPos;
|
|
264
253
|
var tr = state.tr;
|
|
@@ -283,8 +272,7 @@ var setMultipleCellAttrs = function setMultipleCellAttrs(attrs, targetCellPositi
|
|
|
283
272
|
return false;
|
|
284
273
|
};
|
|
285
274
|
};
|
|
286
|
-
exports.
|
|
287
|
-
var selectColumn = function selectColumn(column, expand) {
|
|
275
|
+
var selectColumn = exports.selectColumn = function selectColumn(column, expand) {
|
|
288
276
|
return (0, _pluginFactory.createCommand)(function (state) {
|
|
289
277
|
var cells = (0, _utils2.getCellsInColumn)(column)(state.tr.selection);
|
|
290
278
|
if (!cells || !cells.length || typeof cells[0].pos !== 'number') {
|
|
@@ -304,8 +292,7 @@ var selectColumn = function selectColumn(column, expand) {
|
|
|
304
292
|
return (0, _utils2.selectColumn)(column, expand)(tr).setMeta('addToHistory', false);
|
|
305
293
|
});
|
|
306
294
|
};
|
|
307
|
-
exports.
|
|
308
|
-
var selectRow = function selectRow(row, expand) {
|
|
295
|
+
var selectRow = exports.selectRow = function selectRow(row, expand) {
|
|
309
296
|
return (0, _pluginFactory.createCommand)(function (state) {
|
|
310
297
|
var targetCellPosition;
|
|
311
298
|
var cells = (0, _utils2.getCellsInRow)(row)(state.tr.selection);
|
|
@@ -322,8 +309,7 @@ var selectRow = function selectRow(row, expand) {
|
|
|
322
309
|
return (0, _utils2.selectRow)(row, expand)(tr).setMeta('addToHistory', false);
|
|
323
310
|
});
|
|
324
311
|
};
|
|
325
|
-
exports.
|
|
326
|
-
var showInsertColumnButton = function showInsertColumnButton(columnIndex) {
|
|
312
|
+
var showInsertColumnButton = exports.showInsertColumnButton = function showInsertColumnButton(columnIndex) {
|
|
327
313
|
return (0, _pluginFactory.createCommand)(function (_) {
|
|
328
314
|
return columnIndex > -1 ? {
|
|
329
315
|
type: 'SHOW_INSERT_COLUMN_BUTTON',
|
|
@@ -335,8 +321,7 @@ var showInsertColumnButton = function showInsertColumnButton(columnIndex) {
|
|
|
335
321
|
return tr.setMeta('addToHistory', false);
|
|
336
322
|
});
|
|
337
323
|
};
|
|
338
|
-
exports.
|
|
339
|
-
var showInsertRowButton = function showInsertRowButton(rowIndex) {
|
|
324
|
+
var showInsertRowButton = exports.showInsertRowButton = function showInsertRowButton(rowIndex) {
|
|
340
325
|
return (0, _pluginFactory.createCommand)(function (_) {
|
|
341
326
|
return rowIndex > -1 ? {
|
|
342
327
|
type: 'SHOW_INSERT_ROW_BUTTON',
|
|
@@ -348,16 +333,14 @@ var showInsertRowButton = function showInsertRowButton(rowIndex) {
|
|
|
348
333
|
return tr.setMeta('addToHistory', false);
|
|
349
334
|
});
|
|
350
335
|
};
|
|
351
|
-
exports.
|
|
352
|
-
var hideInsertColumnOrRowButton = function hideInsertColumnOrRowButton() {
|
|
336
|
+
var hideInsertColumnOrRowButton = exports.hideInsertColumnOrRowButton = function hideInsertColumnOrRowButton() {
|
|
353
337
|
return (0, _pluginFactory.createCommand)({
|
|
354
338
|
type: 'HIDE_INSERT_COLUMN_OR_ROW_BUTTON'
|
|
355
339
|
}, function (tr) {
|
|
356
340
|
return tr.setMeta('addToHistory', false);
|
|
357
341
|
});
|
|
358
342
|
};
|
|
359
|
-
exports.
|
|
360
|
-
var addResizeHandleDecorations = function addResizeHandleDecorations(rowIndex, columnIndex, includeTooltip) {
|
|
343
|
+
var addResizeHandleDecorations = exports.addResizeHandleDecorations = function addResizeHandleDecorations(rowIndex, columnIndex, includeTooltip) {
|
|
361
344
|
return (0, _pluginFactory.createCommand)(function (state) {
|
|
362
345
|
var tableNode = (0, _utils2.findTable)(state.selection);
|
|
363
346
|
var _getPluginState = (0, _pluginFactory.getPluginState)(state),
|
|
@@ -382,8 +365,7 @@ var addResizeHandleDecorations = function addResizeHandleDecorations(rowIndex, c
|
|
|
382
365
|
return tr.setMeta('addToHistory', false);
|
|
383
366
|
});
|
|
384
367
|
};
|
|
385
|
-
exports.
|
|
386
|
-
var updateResizeHandleDecorations = function updateResizeHandleDecorations(rowIndex, columnIndex, includeTooltip) {
|
|
368
|
+
var updateResizeHandleDecorations = exports.updateResizeHandleDecorations = function updateResizeHandleDecorations(rowIndex, columnIndex, includeTooltip) {
|
|
387
369
|
return (0, _pluginFactory.createCommand)(function (state) {
|
|
388
370
|
var tableNode = (0, _utils2.findTable)(state.selection);
|
|
389
371
|
var _getPluginState2 = (0, _pluginFactory.getPluginState)(state),
|
|
@@ -417,8 +399,7 @@ var updateResizeHandleDecorations = function updateResizeHandleDecorations(rowIn
|
|
|
417
399
|
return tr.setMeta('addToHistory', false);
|
|
418
400
|
});
|
|
419
401
|
};
|
|
420
|
-
exports.
|
|
421
|
-
var removeResizeHandleDecorations = function removeResizeHandleDecorations() {
|
|
402
|
+
var removeResizeHandleDecorations = exports.removeResizeHandleDecorations = function removeResizeHandleDecorations() {
|
|
422
403
|
return (0, _pluginFactory.createCommand)(function (state) {
|
|
423
404
|
return {
|
|
424
405
|
type: 'REMOVE_RESIZE_HANDLE_DECORATIONS',
|
|
@@ -433,16 +414,14 @@ var removeResizeHandleDecorations = function removeResizeHandleDecorations() {
|
|
|
433
414
|
return tr.setMeta('addToHistory', false);
|
|
434
415
|
});
|
|
435
416
|
};
|
|
436
|
-
exports.
|
|
437
|
-
var autoSizeTable = function autoSizeTable(view, node, table, basePos, opts) {
|
|
417
|
+
var autoSizeTable = exports.autoSizeTable = function autoSizeTable(view, node, table, basePos, opts) {
|
|
438
418
|
if (typeof basePos !== 'number') {
|
|
439
419
|
return false;
|
|
440
420
|
}
|
|
441
421
|
view.dispatch((0, _transforms.fixAutoSizedTable)(view, node, table, basePos, opts));
|
|
442
422
|
return true;
|
|
443
423
|
};
|
|
444
|
-
exports.
|
|
445
|
-
var addBoldInEmptyHeaderCells = function addBoldInEmptyHeaderCells(tableCellHeader) {
|
|
424
|
+
var addBoldInEmptyHeaderCells = exports.addBoldInEmptyHeaderCells = function addBoldInEmptyHeaderCells(tableCellHeader) {
|
|
446
425
|
return function (state, dispatch) {
|
|
447
426
|
var tr = state.tr;
|
|
448
427
|
if (
|
|
@@ -466,5 +445,4 @@ var addBoldInEmptyHeaderCells = function addBoldInEmptyHeaderCells(tableCellHead
|
|
|
466
445
|
return false;
|
|
467
446
|
};
|
|
468
447
|
};
|
|
469
|
-
// #endregion
|
|
470
|
-
exports.addBoldInEmptyHeaderCells = addBoldInEmptyHeaderCells;
|
|
448
|
+
// #endregion
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.removeDescendantNodes = void 0;
|
|
7
7
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
8
8
|
var _pluginFactory = require("../pm-plugins/plugin-factory");
|
|
9
|
-
var removeDescendantNodes = function removeDescendantNodes(sourceNode) {
|
|
9
|
+
var removeDescendantNodes = exports.removeDescendantNodes = function removeDescendantNodes(sourceNode) {
|
|
10
10
|
return (0, _pluginFactory.createCommand)({
|
|
11
11
|
type: 'UPDATE_STATE',
|
|
12
12
|
data: {
|
|
@@ -15,5 +15,4 @@ var removeDescendantNodes = function removeDescendantNodes(sourceNode) {
|
|
|
15
15
|
}, function (tr, state) {
|
|
16
16
|
return sourceNode ? (0, _utils.removeConnectedNodes)(state, sourceNode) : tr;
|
|
17
17
|
});
|
|
18
|
-
};
|
|
19
|
-
exports.removeDescendantNodes = removeDescendantNodes;
|
|
18
|
+
};
|
|
@@ -9,13 +9,12 @@ var _state = require("@atlaskit/editor-prosemirror/state");
|
|
|
9
9
|
var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
|
|
10
10
|
var _tableMap = require("@atlaskit/editor-tables/table-map");
|
|
11
11
|
var _utils = require("@atlaskit/editor-tables/utils");
|
|
12
|
-
var TableSelectionDirection = /*#__PURE__*/function (TableSelectionDirection) {
|
|
12
|
+
var TableSelectionDirection = exports.TableSelectionDirection = /*#__PURE__*/function (TableSelectionDirection) {
|
|
13
13
|
TableSelectionDirection["TopToBottom"] = "TopToBottom";
|
|
14
14
|
TableSelectionDirection["BottomToTop"] = "BottomToTop";
|
|
15
15
|
return TableSelectionDirection;
|
|
16
16
|
}({});
|
|
17
|
-
exports.
|
|
18
|
-
var arrowLeftFromTable = function arrowLeftFromTable(editorSelectionAPI) {
|
|
17
|
+
var arrowLeftFromTable = exports.arrowLeftFromTable = function arrowLeftFromTable(editorSelectionAPI) {
|
|
19
18
|
return function () {
|
|
20
19
|
return function (state, dispatch) {
|
|
21
20
|
var selection = state.selection;
|
|
@@ -30,8 +29,7 @@ var arrowLeftFromTable = function arrowLeftFromTable(editorSelectionAPI) {
|
|
|
30
29
|
};
|
|
31
30
|
};
|
|
32
31
|
};
|
|
33
|
-
exports.
|
|
34
|
-
var arrowRightFromTable = function arrowRightFromTable(editorSelectionAPI) {
|
|
32
|
+
var arrowRightFromTable = exports.arrowRightFromTable = function arrowRightFromTable(editorSelectionAPI) {
|
|
35
33
|
return function () {
|
|
36
34
|
return function (state, dispatch) {
|
|
37
35
|
var selection = state.selection;
|
|
@@ -46,7 +44,6 @@ var arrowRightFromTable = function arrowRightFromTable(editorSelectionAPI) {
|
|
|
46
44
|
};
|
|
47
45
|
};
|
|
48
46
|
};
|
|
49
|
-
exports.arrowRightFromTable = arrowRightFromTable;
|
|
50
47
|
var arrowLeftFromCellSelection = function arrowLeftFromCellSelection(editorSelectionAPI) {
|
|
51
48
|
return function (selection) {
|
|
52
49
|
return function (state, dispatch) {
|
|
@@ -20,7 +20,7 @@ var createGetInlineCardTextFromStore = function createGetInlineCardTextFromStore
|
|
|
20
20
|
cardUrl = _ref2.url;
|
|
21
21
|
return cardUrl;
|
|
22
22
|
};
|
|
23
|
-
var sortByColumn = function sortByColumn(columnIndex) {
|
|
23
|
+
var sortByColumn = exports.sortByColumn = function sortByColumn(columnIndex) {
|
|
24
24
|
var order = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _customSteps.TableSortOrder.DESC;
|
|
25
25
|
return (0, _pluginFactory.createCommand)(function () {
|
|
26
26
|
return {
|
|
@@ -67,5 +67,4 @@ var sortByColumn = function sortByColumn(columnIndex) {
|
|
|
67
67
|
tr.step(new _customSteps.TableSortStep(table.pos, prev, next));
|
|
68
68
|
return tr.setSelection(_state.Selection.near(tr.doc.resolve(table.start + pos)));
|
|
69
69
|
});
|
|
70
|
-
};
|
|
71
|
-
exports.sortByColumn = sortByColumn;
|
|
70
|
+
};
|
|
@@ -10,7 +10,7 @@ var _pluginFactory = require("../pm-plugins/plugin-factory");
|
|
|
10
10
|
* We need to split cell keeping the right type of cell given current table configuration.
|
|
11
11
|
* We are using editor-tables splitCellWithType that allows you to choose what cell type should be.
|
|
12
12
|
*/
|
|
13
|
-
var splitCell = function splitCell(state, dispatch) {
|
|
13
|
+
var splitCell = exports.splitCell = function splitCell(state, dispatch) {
|
|
14
14
|
var tableState = (0, _pluginFactory.getPluginState)(state);
|
|
15
15
|
var _state$schema$nodes = state.schema.nodes,
|
|
16
16
|
tableHeader = _state$schema$nodes.tableHeader,
|
|
@@ -26,5 +26,4 @@ var splitCell = function splitCell(state, dispatch) {
|
|
|
26
26
|
})(state, dispatch);
|
|
27
27
|
}
|
|
28
28
|
return true;
|
|
29
|
-
};
|
|
30
|
-
exports.splitCell = splitCell;
|
|
29
|
+
};
|
|
@@ -19,7 +19,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
19
19
|
* Table layout toggle logic
|
|
20
20
|
* default -> wide -> full-width -> default
|
|
21
21
|
*/
|
|
22
|
-
var getNextLayout = function getNextLayout(currentLayout) {
|
|
22
|
+
var getNextLayout = exports.getNextLayout = function getNextLayout(currentLayout) {
|
|
23
23
|
switch (currentLayout) {
|
|
24
24
|
case 'default':
|
|
25
25
|
return 'wide';
|
|
@@ -34,8 +34,7 @@ var getNextLayout = function getNextLayout(currentLayout) {
|
|
|
34
34
|
// #endregion
|
|
35
35
|
|
|
36
36
|
// #region Actions
|
|
37
|
-
exports.
|
|
38
|
-
var toggleHeaderRow = function toggleHeaderRow(state, dispatch) {
|
|
37
|
+
var toggleHeaderRow = exports.toggleHeaderRow = function toggleHeaderRow(state, dispatch) {
|
|
39
38
|
return (0, _utils.toggleHeader)('row')(state, function (tr) {
|
|
40
39
|
return (0, _pluginFactory.createCommand)({
|
|
41
40
|
type: 'TOGGLE_HEADER_ROW'
|
|
@@ -44,8 +43,7 @@ var toggleHeaderRow = function toggleHeaderRow(state, dispatch) {
|
|
|
44
43
|
})(state, dispatch);
|
|
45
44
|
});
|
|
46
45
|
};
|
|
47
|
-
exports.
|
|
48
|
-
var toggleHeaderColumn = function toggleHeaderColumn(state, dispatch) {
|
|
46
|
+
var toggleHeaderColumn = exports.toggleHeaderColumn = function toggleHeaderColumn(state, dispatch) {
|
|
49
47
|
return (0, _utils.toggleHeader)('column')(state, function (tr) {
|
|
50
48
|
return (0, _pluginFactory.createCommand)({
|
|
51
49
|
type: 'TOGGLE_HEADER_COLUMN'
|
|
@@ -54,8 +52,7 @@ var toggleHeaderColumn = function toggleHeaderColumn(state, dispatch) {
|
|
|
54
52
|
})(state, dispatch);
|
|
55
53
|
});
|
|
56
54
|
};
|
|
57
|
-
exports.
|
|
58
|
-
var toggleNumberColumn = function toggleNumberColumn(state, dispatch) {
|
|
55
|
+
var toggleNumberColumn = exports.toggleNumberColumn = function toggleNumberColumn(state, dispatch) {
|
|
59
56
|
var tr = state.tr;
|
|
60
57
|
var _ref = (0, _utils.findTable)(state.selection),
|
|
61
58
|
node = _ref.node,
|
|
@@ -74,8 +71,7 @@ var toggleNumberColumn = function toggleNumberColumn(state, dispatch) {
|
|
|
74
71
|
}
|
|
75
72
|
return true;
|
|
76
73
|
};
|
|
77
|
-
exports.
|
|
78
|
-
var toggleTableLayout = function toggleTableLayout(state, dispatch) {
|
|
74
|
+
var toggleTableLayout = exports.toggleTableLayout = function toggleTableLayout(state, dispatch) {
|
|
79
75
|
var table = (0, _utils.findTable)(state.selection);
|
|
80
76
|
if (!table) {
|
|
81
77
|
return false;
|
|
@@ -96,13 +92,11 @@ var toggleTableLayout = function toggleTableLayout(state, dispatch) {
|
|
|
96
92
|
return tr.setMeta('scrollIntoView', false);
|
|
97
93
|
})(state, dispatch);
|
|
98
94
|
};
|
|
99
|
-
exports.
|
|
100
|
-
var toggleContextualMenu = function toggleContextualMenu() {
|
|
95
|
+
var toggleContextualMenu = exports.toggleContextualMenu = function toggleContextualMenu() {
|
|
101
96
|
return (0, _pluginFactory.createCommand)({
|
|
102
97
|
type: 'TOGGLE_CONTEXTUAL_MENU'
|
|
103
98
|
}, function (tr) {
|
|
104
99
|
return tr.setMeta('addToHistory', false);
|
|
105
100
|
});
|
|
106
101
|
};
|
|
107
|
-
// #endregion
|
|
108
|
-
exports.toggleContextualMenu = toggleContextualMenu;
|
|
102
|
+
// #endregion
|
|
@@ -32,7 +32,7 @@ var TABLE_BREAKOUT_NAME_MAPPING = {
|
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
// #region Analytics wrappers
|
|
35
|
-
var emptyMultipleCellsWithAnalytics = function emptyMultipleCellsWithAnalytics(editorAnalyticsAPI) {
|
|
35
|
+
var emptyMultipleCellsWithAnalytics = exports.emptyMultipleCellsWithAnalytics = function emptyMultipleCellsWithAnalytics(editorAnalyticsAPI) {
|
|
36
36
|
return function (inputMethod, targetCellPosition) {
|
|
37
37
|
return (0, _analytics2.withEditorAnalyticsAPI)(function (_ref) {
|
|
38
38
|
var selection = _ref.selection;
|
|
@@ -57,8 +57,7 @@ var emptyMultipleCellsWithAnalytics = function emptyMultipleCellsWithAnalytics(e
|
|
|
57
57
|
})(editorAnalyticsAPI)((0, _clear.clearMultipleCells)(targetCellPosition));
|
|
58
58
|
};
|
|
59
59
|
};
|
|
60
|
-
exports.
|
|
61
|
-
var mergeCellsWithAnalytics = function mergeCellsWithAnalytics(editorAnalyticsAPI) {
|
|
60
|
+
var mergeCellsWithAnalytics = exports.mergeCellsWithAnalytics = function mergeCellsWithAnalytics(editorAnalyticsAPI) {
|
|
62
61
|
return function (inputMethod) {
|
|
63
62
|
return (0, _analytics2.withEditorAnalyticsAPI)(function (_ref2) {
|
|
64
63
|
var selection = _ref2.selection;
|
|
@@ -90,8 +89,7 @@ var mergeCellsWithAnalytics = function mergeCellsWithAnalytics(editorAnalyticsAP
|
|
|
90
89
|
});
|
|
91
90
|
};
|
|
92
91
|
};
|
|
93
|
-
exports.
|
|
94
|
-
var splitCellWithAnalytics = function splitCellWithAnalytics(editorAnalyticsAPI) {
|
|
92
|
+
var splitCellWithAnalytics = exports.splitCellWithAnalytics = function splitCellWithAnalytics(editorAnalyticsAPI) {
|
|
95
93
|
return function (inputMethod) {
|
|
96
94
|
return (0, _analytics2.withEditorAnalyticsAPI)(function (_ref3) {
|
|
97
95
|
var selection = _ref3.selection;
|
|
@@ -122,8 +120,7 @@ var splitCellWithAnalytics = function splitCellWithAnalytics(editorAnalyticsAPI)
|
|
|
122
120
|
})(editorAnalyticsAPI)(_splitCell.splitCell);
|
|
123
121
|
};
|
|
124
122
|
};
|
|
125
|
-
exports.
|
|
126
|
-
var setColorWithAnalytics = function setColorWithAnalytics(editorAnalyticsAPI) {
|
|
123
|
+
var setColorWithAnalytics = exports.setColorWithAnalytics = function setColorWithAnalytics(editorAnalyticsAPI) {
|
|
127
124
|
return function (inputMethod, cellColor, targetCellPosition) {
|
|
128
125
|
return (0, _analytics2.withEditorAnalyticsAPI)(function (_ref4) {
|
|
129
126
|
var selection = _ref4.selection;
|
|
@@ -153,8 +150,7 @@ var setColorWithAnalytics = function setColorWithAnalytics(editorAnalyticsAPI) {
|
|
|
153
150
|
}, targetCellPosition));
|
|
154
151
|
};
|
|
155
152
|
};
|
|
156
|
-
exports.
|
|
157
|
-
var addRowAroundSelection = function addRowAroundSelection(editorAnalyticsAPI) {
|
|
153
|
+
var addRowAroundSelection = exports.addRowAroundSelection = function addRowAroundSelection(editorAnalyticsAPI) {
|
|
158
154
|
return function (side) {
|
|
159
155
|
return function (state, dispatch) {
|
|
160
156
|
var selection = state.selection;
|
|
@@ -172,8 +168,7 @@ var addRowAroundSelection = function addRowAroundSelection(editorAnalyticsAPI) {
|
|
|
172
168
|
};
|
|
173
169
|
};
|
|
174
170
|
};
|
|
175
|
-
exports.
|
|
176
|
-
var insertRowWithAnalytics = function insertRowWithAnalytics(editorAnalyticsAPI) {
|
|
171
|
+
var insertRowWithAnalytics = exports.insertRowWithAnalytics = function insertRowWithAnalytics(editorAnalyticsAPI) {
|
|
177
172
|
return function (inputMethod, options) {
|
|
178
173
|
return (0, _analytics2.withEditorAnalyticsAPI)(function (state) {
|
|
179
174
|
var _getSelectedTableInfo = (0, _utils2.getSelectedTableInfo)(state.selection),
|
|
@@ -194,8 +189,7 @@ var insertRowWithAnalytics = function insertRowWithAnalytics(editorAnalyticsAPI)
|
|
|
194
189
|
})(editorAnalyticsAPI)((0, _insert.insertRow)(options.index, options.moveCursorToInsertedRow));
|
|
195
190
|
};
|
|
196
191
|
};
|
|
197
|
-
exports.
|
|
198
|
-
var insertColumnWithAnalytics = function insertColumnWithAnalytics(getEditorContainerWidth, editorAnalyticsAPI) {
|
|
192
|
+
var insertColumnWithAnalytics = exports.insertColumnWithAnalytics = function insertColumnWithAnalytics(getEditorContainerWidth, editorAnalyticsAPI) {
|
|
199
193
|
return function (inputMethod, position) {
|
|
200
194
|
return (0, _analytics2.withEditorAnalyticsAPI)(function (state) {
|
|
201
195
|
var _getSelectedTableInfo2 = (0, _utils2.getSelectedTableInfo)(state.selection),
|
|
@@ -216,8 +210,7 @@ var insertColumnWithAnalytics = function insertColumnWithAnalytics(getEditorCont
|
|
|
216
210
|
})(editorAnalyticsAPI)((0, _insert.insertColumn)(getEditorContainerWidth)(position));
|
|
217
211
|
};
|
|
218
212
|
};
|
|
219
|
-
exports.
|
|
220
|
-
var deleteRowsWithAnalytics = function deleteRowsWithAnalytics(editorAnalyticsAPI) {
|
|
213
|
+
var deleteRowsWithAnalytics = exports.deleteRowsWithAnalytics = function deleteRowsWithAnalytics(editorAnalyticsAPI) {
|
|
221
214
|
return function (inputMethod, rect, isHeaderRowRequired) {
|
|
222
215
|
return (0, _analytics2.withEditorAnalyticsAPI)(function (_ref5) {
|
|
223
216
|
var selection = _ref5.selection;
|
|
@@ -245,8 +238,7 @@ var deleteRowsWithAnalytics = function deleteRowsWithAnalytics(editorAnalyticsAP
|
|
|
245
238
|
});
|
|
246
239
|
};
|
|
247
240
|
};
|
|
248
|
-
exports.
|
|
249
|
-
var deleteColumnsWithAnalytics = function deleteColumnsWithAnalytics(editorAnalyticsAPI) {
|
|
241
|
+
var deleteColumnsWithAnalytics = exports.deleteColumnsWithAnalytics = function deleteColumnsWithAnalytics(editorAnalyticsAPI) {
|
|
250
242
|
return function (inputMethod, rect) {
|
|
251
243
|
return (0, _analytics2.withEditorAnalyticsAPI)(function (_ref6) {
|
|
252
244
|
var selection = _ref6.selection;
|
|
@@ -274,7 +266,6 @@ var deleteColumnsWithAnalytics = function deleteColumnsWithAnalytics(editorAnaly
|
|
|
274
266
|
});
|
|
275
267
|
};
|
|
276
268
|
};
|
|
277
|
-
exports.deleteColumnsWithAnalytics = deleteColumnsWithAnalytics;
|
|
278
269
|
var getTableDeletedAnalytics = function getTableDeletedAnalytics(selection, inputMethod) {
|
|
279
270
|
var _getSelectedTableInfo5 = (0, _utils2.getSelectedTableInfo)(selection),
|
|
280
271
|
totalRowCount = _getSelectedTableInfo5.totalRowCount,
|
|
@@ -290,14 +281,13 @@ var getTableDeletedAnalytics = function getTableDeletedAnalytics(selection, inpu
|
|
|
290
281
|
eventType: _analytics.EVENT_TYPE.TRACK
|
|
291
282
|
};
|
|
292
283
|
};
|
|
293
|
-
var deleteTableWithAnalytics = function deleteTableWithAnalytics(editorAnalyticsAPI) {
|
|
284
|
+
var deleteTableWithAnalytics = exports.deleteTableWithAnalytics = function deleteTableWithAnalytics(editorAnalyticsAPI) {
|
|
294
285
|
return (0, _analytics2.withEditorAnalyticsAPI)(function (_ref7) {
|
|
295
286
|
var selection = _ref7.selection;
|
|
296
287
|
return getTableDeletedAnalytics(selection, _analytics.INPUT_METHOD.FLOATING_TB);
|
|
297
288
|
})(editorAnalyticsAPI)(_misc.deleteTable);
|
|
298
289
|
};
|
|
299
|
-
exports.
|
|
300
|
-
var deleteTableIfSelectedWithAnalytics = function deleteTableIfSelectedWithAnalytics(editorAnalyticsAPI) {
|
|
290
|
+
var deleteTableIfSelectedWithAnalytics = exports.deleteTableIfSelectedWithAnalytics = function deleteTableIfSelectedWithAnalytics(editorAnalyticsAPI) {
|
|
301
291
|
return function (inputMethod) {
|
|
302
292
|
return (0, _analytics2.withEditorAnalyticsAPI)(function (_ref8) {
|
|
303
293
|
var selection = _ref8.selection;
|
|
@@ -305,8 +295,7 @@ var deleteTableIfSelectedWithAnalytics = function deleteTableIfSelectedWithAnaly
|
|
|
305
295
|
})(editorAnalyticsAPI)(_misc.deleteTableIfSelected);
|
|
306
296
|
};
|
|
307
297
|
};
|
|
308
|
-
exports.
|
|
309
|
-
var toggleHeaderRowWithAnalytics = function toggleHeaderRowWithAnalytics(editorAnalyticsAPI) {
|
|
298
|
+
var toggleHeaderRowWithAnalytics = exports.toggleHeaderRowWithAnalytics = function toggleHeaderRowWithAnalytics(editorAnalyticsAPI) {
|
|
310
299
|
return (0, _analytics2.withEditorAnalyticsAPI)(function (state) {
|
|
311
300
|
var _getSelectedTableInfo6 = (0, _utils2.getSelectedTableInfo)(state.selection),
|
|
312
301
|
totalRowCount = _getSelectedTableInfo6.totalRowCount,
|
|
@@ -326,8 +315,7 @@ var toggleHeaderRowWithAnalytics = function toggleHeaderRowWithAnalytics(editorA
|
|
|
326
315
|
};
|
|
327
316
|
})(editorAnalyticsAPI)(_toggle.toggleHeaderRow);
|
|
328
317
|
};
|
|
329
|
-
exports.
|
|
330
|
-
var toggleHeaderColumnWithAnalytics = function toggleHeaderColumnWithAnalytics(editorAnalyticsAPI) {
|
|
318
|
+
var toggleHeaderColumnWithAnalytics = exports.toggleHeaderColumnWithAnalytics = function toggleHeaderColumnWithAnalytics(editorAnalyticsAPI) {
|
|
331
319
|
return (0, _analytics2.withEditorAnalyticsAPI)(function (state) {
|
|
332
320
|
var _getSelectedTableInfo7 = (0, _utils2.getSelectedTableInfo)(state.selection),
|
|
333
321
|
totalRowCount = _getSelectedTableInfo7.totalRowCount,
|
|
@@ -347,8 +335,7 @@ var toggleHeaderColumnWithAnalytics = function toggleHeaderColumnWithAnalytics(e
|
|
|
347
335
|
};
|
|
348
336
|
})(editorAnalyticsAPI)(_toggle.toggleHeaderColumn);
|
|
349
337
|
};
|
|
350
|
-
exports.
|
|
351
|
-
var toggleNumberColumnWithAnalytics = function toggleNumberColumnWithAnalytics(editorAnalyticsAPI) {
|
|
338
|
+
var toggleNumberColumnWithAnalytics = exports.toggleNumberColumnWithAnalytics = function toggleNumberColumnWithAnalytics(editorAnalyticsAPI) {
|
|
352
339
|
return (0, _analytics2.withEditorAnalyticsAPI)(function (state) {
|
|
353
340
|
var _getSelectedTableInfo8 = (0, _utils2.getSelectedTableInfo)(state.selection),
|
|
354
341
|
totalRowCount = _getSelectedTableInfo8.totalRowCount,
|
|
@@ -366,8 +353,7 @@ var toggleNumberColumnWithAnalytics = function toggleNumberColumnWithAnalytics(e
|
|
|
366
353
|
};
|
|
367
354
|
})(editorAnalyticsAPI)(_toggle.toggleNumberColumn);
|
|
368
355
|
};
|
|
369
|
-
exports.
|
|
370
|
-
var toggleTableLayoutWithAnalytics = function toggleTableLayoutWithAnalytics(editorAnalyticsAPI) {
|
|
356
|
+
var toggleTableLayoutWithAnalytics = exports.toggleTableLayoutWithAnalytics = function toggleTableLayoutWithAnalytics(editorAnalyticsAPI) {
|
|
371
357
|
return (0, _analytics2.withEditorAnalyticsAPI)(function (state) {
|
|
372
358
|
var _getSelectedTableInfo9 = (0, _utils2.getSelectedTableInfo)(state.selection),
|
|
373
359
|
table = _getSelectedTableInfo9.table,
|
|
@@ -392,8 +378,7 @@ var toggleTableLayoutWithAnalytics = function toggleTableLayoutWithAnalytics(edi
|
|
|
392
378
|
return;
|
|
393
379
|
})(editorAnalyticsAPI)(_toggle.toggleTableLayout);
|
|
394
380
|
};
|
|
395
|
-
exports.
|
|
396
|
-
var sortColumnWithAnalytics = function sortColumnWithAnalytics(editorAnalyticsAPI) {
|
|
381
|
+
var sortColumnWithAnalytics = exports.sortColumnWithAnalytics = function sortColumnWithAnalytics(editorAnalyticsAPI) {
|
|
397
382
|
return function (inputMethod, columnIndex, sortOrder) {
|
|
398
383
|
return (0, _analytics2.withEditorAnalyticsAPI)(function (state) {
|
|
399
384
|
var _getSelectedTableInfo10 = (0, _utils2.getSelectedTableInfo)(state.selection),
|
|
@@ -415,8 +400,7 @@ var sortColumnWithAnalytics = function sortColumnWithAnalytics(editorAnalyticsAP
|
|
|
415
400
|
})(editorAnalyticsAPI)((0, _sort.sortByColumn)(columnIndex, sortOrder));
|
|
416
401
|
};
|
|
417
402
|
};
|
|
418
|
-
exports.
|
|
419
|
-
var distributeColumnsWidthsWithAnalytics = function distributeColumnsWidthsWithAnalytics(editorAnalyticsAPI) {
|
|
403
|
+
var distributeColumnsWidthsWithAnalytics = exports.distributeColumnsWidthsWithAnalytics = function distributeColumnsWidthsWithAnalytics(editorAnalyticsAPI) {
|
|
420
404
|
return function (inputMethod, _ref10) {
|
|
421
405
|
var resizeState = _ref10.resizeState,
|
|
422
406
|
table = _ref10.table,
|
|
@@ -439,8 +423,7 @@ var distributeColumnsWidthsWithAnalytics = function distributeColumnsWidthsWithA
|
|
|
439
423
|
});
|
|
440
424
|
};
|
|
441
425
|
};
|
|
442
|
-
exports.
|
|
443
|
-
var wrapTableInExpandWithAnalytics = function wrapTableInExpandWithAnalytics(editorAnalyticsAPI) {
|
|
426
|
+
var wrapTableInExpandWithAnalytics = exports.wrapTableInExpandWithAnalytics = function wrapTableInExpandWithAnalytics(editorAnalyticsAPI) {
|
|
444
427
|
return (0, _analytics2.withEditorAnalyticsAPI)(function (state) {
|
|
445
428
|
var _getSelectedTableInfo11 = (0, _utils2.getSelectedTableInfo)(state.selection),
|
|
446
429
|
totalRowCount = _getSelectedTableInfo11.totalRowCount,
|
|
@@ -457,5 +440,4 @@ var wrapTableInExpandWithAnalytics = function wrapTableInExpandWithAnalytics(edi
|
|
|
457
440
|
};
|
|
458
441
|
})(editorAnalyticsAPI)(_collapse.wrapTableInExpand);
|
|
459
442
|
};
|
|
460
|
-
// #endregion
|
|
461
|
-
exports.wrapTableInExpandWithAnalytics = wrapTableInExpandWithAnalytics;
|
|
443
|
+
// #endregion
|
|
@@ -8,7 +8,7 @@ exports.pluginConfig = void 0;
|
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
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; }
|
|
10
10
|
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; }
|
|
11
|
-
var pluginConfig = function pluginConfig() {
|
|
11
|
+
var pluginConfig = exports.pluginConfig = function pluginConfig() {
|
|
12
12
|
var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
13
13
|
return config.advanced ? _objectSpread({
|
|
14
14
|
allowBackgroundColor: true,
|
|
@@ -20,5 +20,4 @@ var pluginConfig = function pluginConfig() {
|
|
|
20
20
|
permittedLayouts: 'all',
|
|
21
21
|
allowControls: true
|
|
22
22
|
}, config) : config;
|
|
23
|
-
};
|
|
24
|
-
exports.pluginConfig = pluginConfig;
|
|
23
|
+
};
|