@atlaskit/editor-tables 2.7.1 → 2.7.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 +288 -110
- package/dist/cjs/utils/add-column-at.js +2 -2
- package/dist/cjs/utils/add-column.js +8 -2
- package/dist/cjs/utils/add-row-at.js +2 -2
- package/dist/cjs/utils/add-row.js +8 -2
- package/dist/es2019/utils/add-column-at.js +2 -2
- package/dist/es2019/utils/add-column.js +8 -2
- package/dist/es2019/utils/add-row-at.js +2 -2
- package/dist/es2019/utils/add-row.js +8 -2
- package/dist/esm/utils/add-column-at.js +2 -2
- package/dist/esm/utils/add-column.js +8 -2
- package/dist/esm/utils/add-row-at.js +2 -2
- package/dist/esm/utils/add-row.js +8 -2
- package/dist/types/utils/add-column-at.d.ts +2 -2
- package/dist/types/utils/add-column.d.ts +4 -4
- package/dist/types/utils/add-row-at.d.ts +2 -2
- package/dist/types/utils/add-row.d.ts +3 -3
- package/dist/types-ts4.5/utils/add-column-at.d.ts +2 -2
- package/dist/types-ts4.5/utils/add-column.d.ts +4 -4
- package/dist/types-ts4.5/utils/add-row-at.d.ts +2 -2
- package/dist/types-ts4.5/utils/add-row.d.ts +3 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,430 +1,608 @@
|
|
|
1
1
|
# @atlaskit/editor-tables
|
|
2
2
|
|
|
3
|
+
## 2.7.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#94829](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/94829)
|
|
8
|
+
[`815fda434fe7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/815fda434fe7) -
|
|
9
|
+
[ED-22849] Align add column and row behaviour behind
|
|
10
|
+
platform_editor_table_duplicate_cell_colouring flag so that adding a column will copy cell
|
|
11
|
+
background from the left and adding a row will copy background colour from row above
|
|
12
|
+
|
|
13
|
+
## 2.7.2
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#97698](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/97698)
|
|
18
|
+
[`1c7b378c0d3b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1c7b378c0d3b) -
|
|
19
|
+
[HOT-108999] We had an incident where the cursor jumps back a character in table headers for any
|
|
20
|
+
language triggering composition on an empty line.This was fixed in a patch bump of
|
|
21
|
+
prosemirror-view. https://github.com/ProseMirror/prosemirror-view/compare/1.33.4...1.33.5
|
|
22
|
+
|
|
3
23
|
## 2.7.1
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
6
26
|
|
|
7
|
-
-
|
|
27
|
+
- [#92007](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/92007)
|
|
28
|
+
[`85525725cb0d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/85525725cb0d) -
|
|
29
|
+
Migrated to the new button component
|
|
8
30
|
|
|
9
31
|
## 2.7.0
|
|
10
32
|
|
|
11
33
|
### Minor Changes
|
|
12
34
|
|
|
13
|
-
-
|
|
35
|
+
- [#91934](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91934)
|
|
36
|
+
[`b76a78c6a199`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b76a78c6a199) -
|
|
37
|
+
bumped editor-prosemirror version to 4.0.0
|
|
14
38
|
|
|
15
39
|
## 2.6.3
|
|
16
40
|
|
|
17
41
|
### Patch Changes
|
|
18
42
|
|
|
19
|
-
-
|
|
43
|
+
- [#86368](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/86368)
|
|
44
|
+
[`8499e6f0fef4`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8499e6f0fef4) -
|
|
45
|
+
Remove custom-table-width feature flag
|
|
20
46
|
|
|
21
47
|
## 2.6.2
|
|
22
48
|
|
|
23
49
|
### Patch Changes
|
|
24
50
|
|
|
25
|
-
-
|
|
51
|
+
- [#88717](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/88717)
|
|
52
|
+
[`d92770eae702`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d92770eae702) -
|
|
53
|
+
Adding internal eslint opt outs for a new rule
|
|
54
|
+
`@atlaskit/design-system/no-direct-use-of-web-platform-drag-and-drop`.
|
|
26
55
|
|
|
27
56
|
## 2.6.1
|
|
28
57
|
|
|
29
58
|
### Patch Changes
|
|
30
59
|
|
|
31
|
-
-
|
|
60
|
+
- [#86621](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/86621)
|
|
61
|
+
[`819e262c9b0b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/819e262c9b0b) -
|
|
62
|
+
remove table-shift-click-selection-backward feature flag
|
|
32
63
|
|
|
33
64
|
## 2.6.0
|
|
34
65
|
|
|
35
66
|
### Minor Changes
|
|
36
67
|
|
|
37
|
-
-
|
|
68
|
+
- [#83612](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83612)
|
|
69
|
+
[`25b32cbfbb7e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/25b32cbfbb7e) -
|
|
70
|
+
[ux] Added new clone row/column behaviour to tables drag N drop. When the user holds the alt
|
|
71
|
+
modifier during the operation the row/column will be duplicated rather then moved.
|
|
38
72
|
|
|
39
73
|
## 2.5.8
|
|
40
74
|
|
|
41
75
|
### Patch Changes
|
|
42
76
|
|
|
43
|
-
-
|
|
77
|
+
- [#80612](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/80612)
|
|
78
|
+
[`b3a6ffbe9e15`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b3a6ffbe9e15) -
|
|
79
|
+
[ux] Fix Firefox table drag handle shift click selection
|
|
44
80
|
|
|
45
81
|
## 2.5.7
|
|
46
82
|
|
|
47
83
|
### Patch Changes
|
|
48
84
|
|
|
49
|
-
-
|
|
85
|
+
- [#77796](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/77796)
|
|
86
|
+
[`eab996d08513`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/eab996d08513) -
|
|
87
|
+
Add new statsig experiement for preserve table width, add support for passing through width to
|
|
88
|
+
create table. Allow tables to be inserted at full width
|
|
50
89
|
|
|
51
90
|
## 2.5.6
|
|
52
91
|
|
|
53
92
|
### Patch Changes
|
|
54
93
|
|
|
55
|
-
-
|
|
94
|
+
- [#77516](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/77516)
|
|
95
|
+
[`d6e79c5637c7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d6e79c5637c7) -
|
|
96
|
+
[ux] fix expand current selection by shift click
|
|
56
97
|
|
|
57
98
|
## 2.5.5
|
|
58
99
|
|
|
59
100
|
### Patch Changes
|
|
60
101
|
|
|
61
|
-
-
|
|
102
|
+
- [#72037](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/72037)
|
|
103
|
+
[`e59f0b7a9115`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e59f0b7a9115) -
|
|
104
|
+
[ux] add flexiable to make merged cells detection allow to detect edge merged cells
|
|
62
105
|
|
|
63
106
|
## 2.5.4
|
|
64
107
|
|
|
65
108
|
### Patch Changes
|
|
66
109
|
|
|
67
|
-
-
|
|
110
|
+
- [#68572](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68572)
|
|
111
|
+
[`15d407fe5143`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/15d407fe5143) -
|
|
112
|
+
Upgrading @atlaskit/editor-prosemirror dependency
|
|
68
113
|
|
|
69
114
|
## 2.5.3
|
|
70
115
|
|
|
71
116
|
### Patch Changes
|
|
72
117
|
|
|
73
|
-
-
|
|
118
|
+
- [#70718](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/70718)
|
|
119
|
+
[`e5d2832002bb`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e5d2832002bb) -
|
|
120
|
+
Patched a bug in the table paste logic which was throwing an error during the selection phase of
|
|
121
|
+
the paste event when the pasted data contained a table row ending with a merged cell. The error
|
|
122
|
+
from the selection is causing the table data to be injected as plain text inline.
|
|
74
123
|
|
|
75
124
|
## 2.5.2
|
|
76
125
|
|
|
77
126
|
### Patch Changes
|
|
78
127
|
|
|
79
|
-
-
|
|
128
|
+
- [#69650](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/69650)
|
|
129
|
+
[`91a5b96796cb`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/91a5b96796cb) -
|
|
130
|
+
Migrate @atlaskit/editor-tables to use declarative entry points
|
|
80
131
|
|
|
81
132
|
## 2.5.1
|
|
82
133
|
|
|
83
134
|
### Patch Changes
|
|
84
135
|
|
|
85
|
-
-
|
|
136
|
+
- [#69625](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/69625)
|
|
137
|
+
[`67d7971c6ddf`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/67d7971c6ddf) -
|
|
138
|
+
[ux] Tables DnD now supports dragging multiple rows/columns in a single drag using multi-select
|
|
86
139
|
|
|
87
140
|
## 2.5.0
|
|
88
141
|
|
|
89
142
|
### Minor Changes
|
|
90
143
|
|
|
91
|
-
-
|
|
144
|
+
- [#69232](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/69232)
|
|
145
|
+
[`93c8f231aa82`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/93c8f231aa82) -
|
|
146
|
+
Optimized the table move column logic to perform individual insert/deletes per row
|
|
92
147
|
|
|
93
148
|
## 2.4.0
|
|
94
149
|
|
|
95
150
|
### Minor Changes
|
|
96
151
|
|
|
97
|
-
-
|
|
152
|
+
- [#67400](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/67400)
|
|
153
|
+
[`191436e36f93`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/191436e36f93) -
|
|
154
|
+
Optimised the table move row logic to perform insert/delete steps rather than an entire table
|
|
155
|
+
replacement
|
|
98
156
|
|
|
99
157
|
## 2.3.18
|
|
100
158
|
|
|
101
159
|
### Patch Changes
|
|
102
160
|
|
|
103
|
-
-
|
|
161
|
+
- [#60278](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/60278)
|
|
162
|
+
[`bc2785a02329`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/bc2785a02329) -
|
|
163
|
+
Selection of multiple rows / column should remain when clicking the drag handle
|
|
104
164
|
|
|
105
165
|
## 2.3.17
|
|
106
166
|
|
|
107
167
|
### Patch Changes
|
|
108
168
|
|
|
109
|
-
-
|
|
169
|
+
- [#59009](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/59009)
|
|
170
|
+
[`f7e9d874ff37`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f7e9d874ff37) -
|
|
171
|
+
Fix table expand selection when `platform.editor.table-shift-click-selection-backward` FF is
|
|
172
|
+
enabled
|
|
110
173
|
|
|
111
174
|
## 2.3.16
|
|
112
175
|
|
|
113
176
|
### Patch Changes
|
|
114
177
|
|
|
115
|
-
-
|
|
178
|
+
- [#58433](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/58433)
|
|
179
|
+
[`4d8e164d7760`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4d8e164d7760) -
|
|
180
|
+
fix shift + click to expand column / row selection bug when
|
|
181
|
+
`platform.editor.table.drag-and-drop` is enabled
|
|
116
182
|
|
|
117
183
|
## 2.3.15
|
|
118
184
|
|
|
119
185
|
### Patch Changes
|
|
120
186
|
|
|
121
|
-
-
|
|
187
|
+
- [#43255](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/43255)
|
|
188
|
+
[`6c1b3270538`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6c1b3270538) - Remove
|
|
189
|
+
setSelection from move commands as it's unnecessary
|
|
122
190
|
|
|
123
191
|
## 2.3.14
|
|
124
192
|
|
|
125
193
|
### Patch Changes
|
|
126
194
|
|
|
127
|
-
-
|
|
195
|
+
- [#42754](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42754)
|
|
196
|
+
[`b2396966987`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b2396966987) - use
|
|
197
|
+
'as' type assertion rather than angle brackets
|
|
128
198
|
|
|
129
199
|
## 2.3.13
|
|
130
200
|
|
|
131
201
|
### Patch Changes
|
|
132
202
|
|
|
133
|
-
-
|
|
203
|
+
- [#42109](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42109)
|
|
204
|
+
[`d25ae495fed`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d25ae495fed) - [ux]
|
|
205
|
+
Adds a fix to keep selection on a dropped row or column.
|
|
134
206
|
|
|
135
207
|
## 2.3.12
|
|
136
208
|
|
|
137
209
|
### Patch Changes
|
|
138
210
|
|
|
139
|
-
-
|
|
211
|
+
- [#41991](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41991)
|
|
212
|
+
[`28a7171e7e3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/28a7171e7e3) - [ux]
|
|
213
|
+
add shift click select backward feature to expand selection
|
|
140
214
|
|
|
141
215
|
## 2.3.11
|
|
142
216
|
|
|
143
217
|
### Patch Changes
|
|
144
218
|
|
|
145
|
-
-
|
|
219
|
+
- [#39749](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/39749)
|
|
220
|
+
[`e6b69f455c3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e6b69f455c3) -
|
|
221
|
+
Connect yarn changeset to packages, upgrade adf-schema
|
|
146
222
|
|
|
147
223
|
## 2.3.10
|
|
148
224
|
|
|
149
225
|
### Patch Changes
|
|
150
226
|
|
|
151
|
-
-
|
|
227
|
+
- [#39984](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/39984)
|
|
228
|
+
[`37c62369dae`](https://bitbucket.org/atlassian/atlassian-frontend/commits/37c62369dae) -
|
|
229
|
+
NO-ISSUE Import doc builder types from editor-common
|
|
152
230
|
|
|
153
231
|
## 2.3.9
|
|
154
232
|
|
|
155
233
|
### Patch Changes
|
|
156
234
|
|
|
157
|
-
-
|
|
235
|
+
- [#39381](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/39381)
|
|
236
|
+
[`35242fb367a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/35242fb367a) - Add
|
|
237
|
+
custom-table-width feature flag and add width to table node when inserted
|
|
158
238
|
|
|
159
239
|
## 2.3.8
|
|
160
240
|
|
|
161
241
|
### Patch Changes
|
|
162
242
|
|
|
163
|
-
-
|
|
243
|
+
- Updated dependencies
|
|
164
244
|
|
|
165
245
|
## 2.3.7
|
|
166
246
|
|
|
167
247
|
### Patch Changes
|
|
168
248
|
|
|
169
|
-
-
|
|
249
|
+
- [#37785](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/37785)
|
|
250
|
+
[`4e6f1bf8511`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4e6f1bf8511) -
|
|
251
|
+
[ED-19233] Import prosemirror libraries from internal facade package
|
|
170
252
|
|
|
171
253
|
## 2.3.6
|
|
172
254
|
|
|
173
255
|
### Patch Changes
|
|
174
256
|
|
|
175
|
-
-
|
|
257
|
+
- [#36241](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/36241)
|
|
258
|
+
[`5f5ba16de66`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5f5ba16de66) -
|
|
259
|
+
[ED-13910] Fix prosemirror types
|
|
176
260
|
|
|
177
261
|
## 2.3.5
|
|
178
262
|
|
|
179
263
|
### Patch Changes
|
|
180
264
|
|
|
181
|
-
-
|
|
265
|
+
- [#35782](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/35782)
|
|
266
|
+
[`73b5128036b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/73b5128036b) -
|
|
267
|
+
[ED-17082] Mark package as a singleton one
|
|
182
268
|
|
|
183
269
|
## 2.3.4
|
|
184
270
|
|
|
185
271
|
### Patch Changes
|
|
186
272
|
|
|
187
|
-
-
|
|
273
|
+
- [#35533](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/35533)
|
|
274
|
+
[`fa1f53e0ae7`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fa1f53e0ae7) -
|
|
275
|
+
[ED-18167] Remove dependency of editor-tables on adf schema library to avoid a circular
|
|
276
|
+
dependency
|
|
188
277
|
|
|
189
278
|
## 2.3.3
|
|
190
279
|
|
|
191
280
|
### Patch Changes
|
|
192
281
|
|
|
193
|
-
-
|
|
282
|
+
- [#33793](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33793)
|
|
283
|
+
[`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure
|
|
284
|
+
legacy types are published for TS 4.5-4.8
|
|
194
285
|
|
|
195
286
|
## 2.3.2
|
|
196
287
|
|
|
197
288
|
### Patch Changes
|
|
198
289
|
|
|
199
|
-
-
|
|
290
|
+
- [#33771](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33771)
|
|
291
|
+
[`a142ba1aa28`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a142ba1aa28) -
|
|
292
|
+
[ED17172] Bump prosemirror-model to 1.16.0 and prosemirror-view to 1.23.7 and removed
|
|
293
|
+
work-arounds for fixed issues
|
|
200
294
|
|
|
201
295
|
## 2.3.1
|
|
202
296
|
|
|
203
297
|
### Patch Changes
|
|
204
298
|
|
|
205
|
-
-
|
|
299
|
+
- [#33649](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33649)
|
|
300
|
+
[`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) -
|
|
301
|
+
Upgrade Typescript from `4.5.5` to `4.9.5`
|
|
206
302
|
|
|
207
303
|
## 2.3.0
|
|
208
304
|
|
|
209
305
|
### Minor Changes
|
|
210
306
|
|
|
211
|
-
-
|
|
307
|
+
- [#33258](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33258)
|
|
308
|
+
[`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip
|
|
309
|
+
minor dependency bump
|
|
212
310
|
|
|
213
311
|
## 2.2.6
|
|
214
312
|
|
|
215
313
|
### Patch Changes
|
|
216
314
|
|
|
217
|
-
-
|
|
315
|
+
- [#33004](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33004)
|
|
316
|
+
[`0ffb55018c9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0ffb55018c9) - Revert
|
|
317
|
+
"[ED-17172] Bumped prosemirror-view from 1.23.2 to 1.23.7 and removed work-around for fixed
|
|
318
|
+
issues"
|
|
218
319
|
|
|
219
320
|
## 2.2.5
|
|
220
321
|
|
|
221
322
|
### Patch Changes
|
|
222
323
|
|
|
223
|
-
-
|
|
324
|
+
- [#32424](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/32424)
|
|
325
|
+
[`2e01c9c74b5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2e01c9c74b5) - DUMMY
|
|
326
|
+
remove before merging to master; dupe adf-schema via adf-utils
|
|
224
327
|
|
|
225
328
|
## 2.2.4
|
|
226
329
|
|
|
227
330
|
### Patch Changes
|
|
228
331
|
|
|
229
|
-
-
|
|
230
|
-
|
|
231
|
-
|
|
332
|
+
- [#28932](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/28932)
|
|
333
|
+
[`4080eb013ef`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4080eb013ef) - [ux]
|
|
334
|
+
Fix bug where pasting inside a table did not respect the table's headers. Pasted cells are
|
|
335
|
+
formatted based on the table they are being pasted into.
|
|
336
|
+
- [`4f6a895f1d5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4f6a895f1d5) - Set
|
|
337
|
+
selectable property for selectable nodes
|
|
338
|
+
- [`4f6a895f1d5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4f6a895f1d5) - Fix
|
|
339
|
+
arrow shift selection coming from outside of the table
|
|
232
340
|
|
|
233
341
|
## 2.2.3
|
|
234
342
|
|
|
235
343
|
### Patch Changes
|
|
236
344
|
|
|
237
|
-
-
|
|
345
|
+
- [#28090](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/28090)
|
|
346
|
+
[`dbef481f7df`](https://bitbucket.org/atlassian/atlassian-frontend/commits/dbef481f7df) - [ux]
|
|
347
|
+
ED-15724: fix the merged row(2nd row or later) cannot been recongnized as row selection and
|
|
348
|
+
cannot be deleted.
|
|
238
349
|
|
|
239
350
|
## 2.2.2
|
|
240
351
|
|
|
241
352
|
### Patch Changes
|
|
242
353
|
|
|
243
|
-
-
|
|
244
|
-
|
|
354
|
+
- [#26712](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/26712)
|
|
355
|
+
[`47f1f76cb80`](https://bitbucket.org/atlassian/atlassian-frontend/commits/47f1f76cb80) - Add
|
|
356
|
+
selectTableClosestToPos function
|
|
357
|
+
- [`755d7bf5c2a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/755d7bf5c2a) - [ux]
|
|
358
|
+
ED-12527 Prevents editor-tables handleMouseDown() from creating a cell selection when right
|
|
359
|
+
clicking in a table cell.
|
|
245
360
|
|
|
246
361
|
## 2.2.1
|
|
247
362
|
|
|
248
363
|
### Patch Changes
|
|
249
364
|
|
|
250
|
-
-
|
|
365
|
+
- [#27511](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/27511)
|
|
366
|
+
[`403e0d2d291`](https://bitbucket.org/atlassian/atlassian-frontend/commits/403e0d2d291) -
|
|
367
|
+
ED-16246 fix prevent @types/prosemirror-commands @types/prosemirror-keymap updating to
|
|
368
|
+
incompatible version.
|
|
251
369
|
|
|
252
370
|
## 2.2.0
|
|
253
371
|
|
|
254
372
|
### Minor Changes
|
|
255
373
|
|
|
256
|
-
-
|
|
374
|
+
- [#24710](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24710)
|
|
375
|
+
[`d8acf7254db`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d8acf7254db) -
|
|
376
|
+
ED-8567 added tracking for fixTables()
|
|
257
377
|
|
|
258
378
|
## 2.1.6
|
|
259
379
|
|
|
260
380
|
### Patch Changes
|
|
261
381
|
|
|
262
|
-
-
|
|
382
|
+
- [#24607](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24607)
|
|
383
|
+
[`95f007063cf`](https://bitbucket.org/atlassian/atlassian-frontend/commits/95f007063cf) -
|
|
384
|
+
Decoupling paste plugin and table plugin, copied `replaceSelectedTable` and
|
|
385
|
+
`getSelectedTableInfo` utils to editor-tables utils package and analytics dependency shifted to
|
|
386
|
+
paste plugin.
|
|
263
387
|
|
|
264
388
|
## 2.1.5
|
|
265
389
|
|
|
266
390
|
### Patch Changes
|
|
267
391
|
|
|
268
|
-
-
|
|
392
|
+
- [#23381](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/23381)
|
|
393
|
+
[`e6f25536fe3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e6f25536fe3) -
|
|
394
|
+
[ux][ed-15168] Fixes a bug where a width-less column was created when pasting table cells into a
|
|
395
|
+
table that had columns with set widths.
|
|
269
396
|
|
|
270
397
|
## 2.1.4
|
|
271
398
|
|
|
272
399
|
### Patch Changes
|
|
273
400
|
|
|
274
|
-
-
|
|
401
|
+
- [#20033](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/20033)
|
|
402
|
+
[`b29ce16dad8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b29ce16dad8) -
|
|
403
|
+
[ED-14606] Move bitbucket schema, confluence schema, jira schema, and default schema from
|
|
404
|
+
@atlaskit/adf-schema to their own entry points. These new entry points are as follows
|
|
275
405
|
|
|
276
|
-
|
|
406
|
+
@atlaskit/adf-schema/schema-bitbucket for:
|
|
277
407
|
|
|
278
|
-
|
|
408
|
+
- bitbucketSchema
|
|
279
409
|
|
|
280
|
-
|
|
410
|
+
@atlaskit/adf-schema/schema-confluence for:
|
|
281
411
|
|
|
282
|
-
|
|
283
|
-
|
|
412
|
+
- confluenceSchema
|
|
413
|
+
- confluenceSchemaWithMediaSingle
|
|
284
414
|
|
|
285
|
-
|
|
415
|
+
@atlaskit/adf-schema/schema-jira for:
|
|
286
416
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
417
|
+
- default as createJIRASchema
|
|
418
|
+
- isSchemaWithLists
|
|
419
|
+
- isSchemaWithMentions
|
|
420
|
+
- isSchemaWithEmojis
|
|
421
|
+
- isSchemaWithLinks
|
|
422
|
+
- isSchemaWithAdvancedTextFormattingMarks
|
|
423
|
+
- isSchemaWithCodeBlock
|
|
424
|
+
- isSchemaWithBlockQuotes
|
|
425
|
+
- isSchemaWithMedia
|
|
426
|
+
- isSchemaWithSubSupMark
|
|
427
|
+
- isSchemaWithTextColor
|
|
428
|
+
- isSchemaWithTables
|
|
299
429
|
|
|
300
|
-
|
|
430
|
+
@atlaskit/adf-schema/schema-default for:
|
|
301
431
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
432
|
+
- defaultSchema
|
|
433
|
+
- getSchemaBasedOnStage
|
|
434
|
+
- defaultSchemaConfig
|
|
305
435
|
|
|
306
|
-
|
|
436
|
+
This change also includes codemods in @atlaskit/adf-schema to update these entry points. It also
|
|
437
|
+
introduces a new util function "changeImportEntryPoint" to @atlaskit/codemod-utils to handle
|
|
438
|
+
this scenario.
|
|
307
439
|
|
|
308
440
|
## 2.1.3
|
|
309
441
|
|
|
310
442
|
### Patch Changes
|
|
311
443
|
|
|
312
|
-
-
|
|
444
|
+
- [#19618](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/19618)
|
|
445
|
+
[`cbfbaab61bb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cbfbaab61bb) -
|
|
446
|
+
[ux][ed-14300] Remove column width from table cells being pasted into another table as it should
|
|
447
|
+
take the formatting of the destination table.
|
|
313
448
|
|
|
314
449
|
## 2.1.2
|
|
315
450
|
|
|
316
451
|
### Patch Changes
|
|
317
452
|
|
|
318
|
-
-
|
|
453
|
+
- [#18526](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/18526)
|
|
454
|
+
[`4e6fbaf5898`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4e6fbaf5898) -
|
|
455
|
+
ED-14117 Change EditorState.apply type to receive readonly transaction
|
|
319
456
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
457
|
+
Transactions should not be mutated after being dispatched as it can lead to unexpected
|
|
458
|
+
behaviour. This change patches the relevant types declared in prosemirror-state as a
|
|
459
|
+
compile-time safeguard.
|
|
323
460
|
|
|
324
461
|
## 2.1.1
|
|
325
462
|
|
|
326
463
|
### Patch Changes
|
|
327
464
|
|
|
328
|
-
-
|
|
465
|
+
- [#16752](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/16752)
|
|
466
|
+
[`19d72473dfb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/19d72473dfb) -
|
|
467
|
+
ED-13025 Bump prosemirror-view 1.23.1 -> 1.23.2
|
|
329
468
|
|
|
330
469
|
## 2.1.0
|
|
331
470
|
|
|
332
471
|
### Minor Changes
|
|
333
472
|
|
|
334
|
-
-
|
|
473
|
+
- [#15998](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/15998)
|
|
474
|
+
[`b230f366971`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b230f366971) -
|
|
475
|
+
[ED-14008] Bump prosemirror-view from 1.20.2 to 1.23.1
|
|
335
476
|
|
|
336
477
|
### Patch Changes
|
|
337
478
|
|
|
338
|
-
-
|
|
479
|
+
- [`c6feed82071`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c6feed82071) -
|
|
480
|
+
ED-11632: Bump prosemirror packages;
|
|
339
481
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
482
|
+
- prosmirror-commands 1.1.4 -> 1.1.11,
|
|
483
|
+
- prosemirror-model 1.11.0 -> 1.14.3,
|
|
484
|
+
- prosemirror-state 1.3.3 -> 1.3.4,
|
|
485
|
+
- prosemirror-transform 1.2.8 -> 1.3.2,
|
|
486
|
+
- prosemirror-view 1.15.4 + 1.18.8 -> 1.20.2.
|
|
345
487
|
|
|
346
488
|
## 2.0.1
|
|
347
489
|
|
|
348
490
|
### Patch Changes
|
|
349
491
|
|
|
350
|
-
-
|
|
492
|
+
- [#13302](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/13302)
|
|
493
|
+
[`96c6146eef1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/96c6146eef1) -
|
|
494
|
+
ED-13187: localId optional & empty values filtered
|
|
351
495
|
|
|
352
496
|
## 2.0.0
|
|
353
497
|
|
|
354
498
|
### Major Changes
|
|
355
499
|
|
|
356
|
-
-
|
|
500
|
+
- [#9847](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/9847)
|
|
501
|
+
[`71318e96b5d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/71318e96b5d) -
|
|
502
|
+
NO-ISSUE Force bump editor-tables
|
|
357
503
|
|
|
358
504
|
## 1.1.5
|
|
359
505
|
|
|
360
506
|
### Patch Changes
|
|
361
507
|
|
|
362
|
-
-
|
|
363
|
-
|
|
508
|
+
- [#9510](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/9510)
|
|
509
|
+
[`5089bd2544d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5089bd2544d) -
|
|
510
|
+
ED-11919: generate localId for tables
|
|
511
|
+
- [`58b170725be`](https://bitbucket.org/atlassian/atlassian-frontend/commits/58b170725be) -
|
|
512
|
+
Renamed @atlaskit/editor-test-helpers/schema-builder to
|
|
513
|
+
@atlaskit/editor-test-helpers/doc-builder
|
|
364
514
|
|
|
365
515
|
## 1.1.4
|
|
366
516
|
|
|
367
517
|
### Patch Changes
|
|
368
518
|
|
|
369
|
-
-
|
|
370
|
-
|
|
519
|
+
- [#9083](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/9083)
|
|
520
|
+
[`d2e70ebaaa9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d2e70ebaaa9) -
|
|
521
|
+
NO-ISSUE: updated editor tests to use 'doc: DocBuilder' instead of 'doc: any'
|
|
522
|
+
- [`fe1c96a3d28`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fe1c96a3d28) - added
|
|
523
|
+
DocBuilder type to @atlaskit/editor-test-helpers, replaced duplicate definitions and
|
|
524
|
+
DocumentType
|
|
371
525
|
|
|
372
526
|
## 1.1.3
|
|
373
527
|
|
|
374
528
|
### Patch Changes
|
|
375
529
|
|
|
376
|
-
-
|
|
530
|
+
- [#5857](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/5857)
|
|
531
|
+
[`d3265f19be`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d3265f19be) -
|
|
532
|
+
Transpile packages using babel rather than tsc
|
|
377
533
|
|
|
378
534
|
## 1.1.2
|
|
379
535
|
|
|
380
536
|
### Patch Changes
|
|
381
537
|
|
|
382
|
-
-
|
|
538
|
+
- [#5860](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/5860)
|
|
539
|
+
[`703752d487`](https://bitbucket.org/atlassian/atlassian-frontend/commits/703752d487) - ED-10647
|
|
540
|
+
Remove caret from prosemirror-model, prosemirror-keymap, prosemirror-state,
|
|
541
|
+
prosemirror-transform to lock them down to an explicit version
|
|
383
542
|
|
|
384
543
|
## 1.1.1
|
|
385
544
|
|
|
386
545
|
### Patch Changes
|
|
387
546
|
|
|
388
|
-
-
|
|
389
|
-
|
|
547
|
+
- [#5516](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/5516)
|
|
548
|
+
[`e4abda244e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e4abda244e) - ED-9912:
|
|
549
|
+
replace prosemirror-tables with editor-tables
|
|
550
|
+
- [`d39fa49905`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d39fa49905) -
|
|
551
|
+
ED-10420: remove utils copied from prosemirror-utils
|
|
390
552
|
|
|
391
553
|
## 1.1.0
|
|
392
554
|
|
|
393
555
|
### Minor Changes
|
|
394
556
|
|
|
395
|
-
-
|
|
396
|
-
|
|
557
|
+
- [#4749](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/4749)
|
|
558
|
+
[`111eac563c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/111eac563c) - ED-9915:
|
|
559
|
+
added table utils from prosemirror-utils
|
|
560
|
+
- [`9a39500244`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9a39500244) - Bump
|
|
561
|
+
ProseMirror packages
|
|
397
562
|
|
|
398
|
-
|
|
563
|
+
Read more: https://product-fabric.atlassian.net/wiki/spaces/E/pages/1671956531/2020-08
|
|
399
564
|
|
|
400
565
|
### Patch Changes
|
|
401
566
|
|
|
402
|
-
-
|
|
403
|
-
-
|
|
404
|
-
-
|
|
405
|
-
-
|
|
406
|
-
-
|
|
407
|
-
-
|
|
567
|
+
- [`2d4bbe5e2e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2d4bbe5e2e) -
|
|
568
|
+
[ED-10503] Fix prosemirror-view version at 1.15.4 without carret
|
|
569
|
+
- [`9bf037e4e6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9bf037e4e6) -
|
|
570
|
+
ED-10252: tests for moveColumn
|
|
571
|
+
- [`b5e04ea3f6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b5e04ea3f6) -
|
|
572
|
+
ED-10052: added the original MIT license to the package's source code
|
|
573
|
+
- [`93be5de4de`](https://bitbucket.org/atlassian/atlassian-frontend/commits/93be5de4de) - Move
|
|
574
|
+
table_moveRow tests from prosemirror-utils to editor-tables
|
|
575
|
+
- [`aa65a361a1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/aa65a361a1) - Added
|
|
576
|
+
some util functions
|
|
577
|
+
- Updated dependencies
|
|
408
578
|
|
|
409
579
|
## 1.0.2
|
|
410
580
|
|
|
411
581
|
### Patch Changes
|
|
412
582
|
|
|
413
|
-
-
|
|
414
|
-
|
|
415
|
-
-
|
|
583
|
+
- [#4424](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/4424)
|
|
584
|
+
[`e485167c47`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e485167c47) -
|
|
585
|
+
ED-10018: bump prosemirror-tables to fix copy-pasting merged rows
|
|
586
|
+
- [`7325aff6d3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7325aff6d3) - ED-9626:
|
|
587
|
+
added unit tests for CellSelection and tableEditing plugin to editor-tables
|
|
588
|
+
- Updated dependencies
|
|
416
589
|
|
|
417
590
|
## 1.0.1
|
|
418
591
|
|
|
419
592
|
### Patch Changes
|
|
420
593
|
|
|
421
|
-
-
|
|
594
|
+
- [#3885](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/3885)
|
|
595
|
+
[`6c525a8229`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6c525a8229) - Upgraded
|
|
596
|
+
to TypeScript 3.9.6 and tslib to 2.0.0
|
|
422
597
|
|
|
423
|
-
|
|
424
|
-
|
|
598
|
+
Since tslib is a dependency for all our packages we recommend that products also follow this
|
|
599
|
+
tslib upgrade to prevent duplicates of tslib being bundled.
|
|
425
600
|
|
|
426
601
|
## 1.0.0
|
|
427
602
|
|
|
428
603
|
### Major Changes
|
|
429
604
|
|
|
430
|
-
-
|
|
605
|
+
- [#3428](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/3428)
|
|
606
|
+
[`b00bfbe3f3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b00bfbe3f3) - ED-9627
|
|
607
|
+
Added new @atlaskit/editor-tables package to include common editor tables related code. Included
|
|
608
|
+
TableMap class from prosemirror-tables package with it.
|
|
@@ -9,7 +9,7 @@ var _addColumn = require("./add-column");
|
|
|
9
9
|
var _cloneTr = require("./clone-tr");
|
|
10
10
|
var _find = require("./find");
|
|
11
11
|
// Returns a new transaction that adds a new column at index `columnIndex`.
|
|
12
|
-
var addColumnAt = exports.addColumnAt = function addColumnAt(columnIndex) {
|
|
12
|
+
var addColumnAt = exports.addColumnAt = function addColumnAt(columnIndex, isCellBackgroundDuplicated) {
|
|
13
13
|
return function (tr) {
|
|
14
14
|
var table = (0, _find.findTable)(tr.selection);
|
|
15
15
|
if (table) {
|
|
@@ -19,7 +19,7 @@ var addColumnAt = exports.addColumnAt = function addColumnAt(columnIndex) {
|
|
|
19
19
|
map: map,
|
|
20
20
|
tableStart: table.start,
|
|
21
21
|
table: table.node
|
|
22
|
-
}, columnIndex));
|
|
22
|
+
}, columnIndex, isCellBackgroundDuplicated));
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
return tr;
|
|
@@ -19,7 +19,7 @@ function columnIsHeader(map, table, col) {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
// Add a column at the given position in a table.
|
|
22
|
-
function addColumn(tr, _ref, col) {
|
|
22
|
+
function addColumn(tr, _ref, col, isCellBackgroundDuplicated) {
|
|
23
23
|
var map = _ref.map,
|
|
24
24
|
tableStart = _ref.tableStart,
|
|
25
25
|
table = _ref.table;
|
|
@@ -44,6 +44,7 @@ function addColumn(tr, _ref, col) {
|
|
|
44
44
|
row += attributes.rowspan - 1;
|
|
45
45
|
} else {
|
|
46
46
|
var type = void 0;
|
|
47
|
+
var attrs = {};
|
|
47
48
|
if (refColumn === null) {
|
|
48
49
|
type = (0, _tableNodeTypes.tableNodeTypes)(table.type.schema).cell;
|
|
49
50
|
} else {
|
|
@@ -53,9 +54,14 @@ function addColumn(tr, _ref, col) {
|
|
|
53
54
|
throw new Error("addColumn: invalid node at mapped pos ".concat(mappedPos));
|
|
54
55
|
}
|
|
55
56
|
type = _cell.type;
|
|
57
|
+
if (_cell.attrs.background && isCellBackgroundDuplicated) {
|
|
58
|
+
attrs = {
|
|
59
|
+
background: _cell.attrs.background
|
|
60
|
+
};
|
|
61
|
+
}
|
|
56
62
|
}
|
|
57
63
|
var _pos = map.positionAt(row, col, table);
|
|
58
|
-
tr.insert(tr.mapping.map(tableStart + _pos), type.createAndFill());
|
|
64
|
+
tr.insert(tr.mapping.map(tableStart + _pos), type.createAndFill(attrs));
|
|
59
65
|
}
|
|
60
66
|
}
|
|
61
67
|
return tr;
|
|
@@ -88,7 +88,7 @@ var cloneRowAt = exports.cloneRowAt = function cloneRowAt(rowIndex) {
|
|
|
88
88
|
};
|
|
89
89
|
|
|
90
90
|
// Returns a new transaction that adds a new row at index `rowIndex`. Optionally clone the previous row.
|
|
91
|
-
var addRowAt = exports.addRowAt = function addRowAt(rowIndex, clonePreviousRow) {
|
|
91
|
+
var addRowAt = exports.addRowAt = function addRowAt(rowIndex, clonePreviousRow, isCellBackgroundDuplicated) {
|
|
92
92
|
return function (tr) {
|
|
93
93
|
var table = (0, _find.findTable)(tr.selection);
|
|
94
94
|
if (table) {
|
|
@@ -102,7 +102,7 @@ var addRowAt = exports.addRowAt = function addRowAt(rowIndex, clonePreviousRow)
|
|
|
102
102
|
map: map,
|
|
103
103
|
tableStart: table.start,
|
|
104
104
|
table: table.node
|
|
105
|
-
}, rowIndex));
|
|
105
|
+
}, rowIndex, isCellBackgroundDuplicated));
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
return tr;
|
|
@@ -19,7 +19,7 @@ function rowIsHeader(map, table, row) {
|
|
|
19
19
|
}
|
|
20
20
|
return true;
|
|
21
21
|
}
|
|
22
|
-
function addRow(tr, _ref, row) {
|
|
22
|
+
function addRow(tr, _ref, row, isCellBackgroundDuplicated) {
|
|
23
23
|
var map = _ref.map,
|
|
24
24
|
tableStart = _ref.tableStart,
|
|
25
25
|
table = _ref.table;
|
|
@@ -47,6 +47,7 @@ function addRow(tr, _ref, row) {
|
|
|
47
47
|
col += attrs.colspan - 1;
|
|
48
48
|
} else {
|
|
49
49
|
var type = void 0;
|
|
50
|
+
var _attrs = {};
|
|
50
51
|
if (refRow == null) {
|
|
51
52
|
type = (0, _tableNodeTypes.tableNodeTypes)(table.type.schema).cell;
|
|
52
53
|
} else {
|
|
@@ -56,8 +57,13 @@ function addRow(tr, _ref, row) {
|
|
|
56
57
|
throw new Error("addRow: invalid node at mapped pos ".concat(mappedPos));
|
|
57
58
|
}
|
|
58
59
|
type = cell.type;
|
|
60
|
+
if (cell.attrs.background && isCellBackgroundDuplicated) {
|
|
61
|
+
_attrs = {
|
|
62
|
+
background: cell.attrs.background
|
|
63
|
+
};
|
|
64
|
+
}
|
|
59
65
|
}
|
|
60
|
-
cells.push(type.createAndFill());
|
|
66
|
+
cells.push(type.createAndFill(_attrs));
|
|
61
67
|
}
|
|
62
68
|
}
|
|
63
69
|
var rowType = (0, _tableNodeTypes.tableNodeTypes)(table.type.schema).row;
|
|
@@ -4,7 +4,7 @@ import { cloneTr } from './clone-tr';
|
|
|
4
4
|
import { findTable } from './find';
|
|
5
5
|
|
|
6
6
|
// Returns a new transaction that adds a new column at index `columnIndex`.
|
|
7
|
-
export const addColumnAt = columnIndex => tr => {
|
|
7
|
+
export const addColumnAt = (columnIndex, isCellBackgroundDuplicated) => tr => {
|
|
8
8
|
const table = findTable(tr.selection);
|
|
9
9
|
if (table) {
|
|
10
10
|
const map = TableMap.get(table.node);
|
|
@@ -13,7 +13,7 @@ export const addColumnAt = columnIndex => tr => {
|
|
|
13
13
|
map,
|
|
14
14
|
tableStart: table.start,
|
|
15
15
|
table: table.node
|
|
16
|
-
}, columnIndex));
|
|
16
|
+
}, columnIndex, isCellBackgroundDuplicated));
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
return tr;
|
|
@@ -16,7 +16,7 @@ export function addColumn(tr, {
|
|
|
16
16
|
map,
|
|
17
17
|
tableStart,
|
|
18
18
|
table
|
|
19
|
-
}, col) {
|
|
19
|
+
}, col, isCellBackgroundDuplicated) {
|
|
20
20
|
let refColumn = col > 0 ? -1 : 0;
|
|
21
21
|
if (columnIsHeader(map, table, col + refColumn)) {
|
|
22
22
|
refColumn = col === 0 || col === map.width ? null : 0;
|
|
@@ -38,6 +38,7 @@ export function addColumn(tr, {
|
|
|
38
38
|
row += attributes.rowspan - 1;
|
|
39
39
|
} else {
|
|
40
40
|
let type;
|
|
41
|
+
let attrs = {};
|
|
41
42
|
if (refColumn === null) {
|
|
42
43
|
type = tableNodeTypes(table.type.schema).cell;
|
|
43
44
|
} else {
|
|
@@ -47,9 +48,14 @@ export function addColumn(tr, {
|
|
|
47
48
|
throw new Error(`addColumn: invalid node at mapped pos ${mappedPos}`);
|
|
48
49
|
}
|
|
49
50
|
type = cell.type;
|
|
51
|
+
if (cell.attrs.background && isCellBackgroundDuplicated) {
|
|
52
|
+
attrs = {
|
|
53
|
+
background: cell.attrs.background
|
|
54
|
+
};
|
|
55
|
+
}
|
|
50
56
|
}
|
|
51
57
|
const pos = map.positionAt(row, col, table);
|
|
52
|
-
tr.insert(tr.mapping.map(tableStart + pos), type.createAndFill());
|
|
58
|
+
tr.insert(tr.mapping.map(tableStart + pos), type.createAndFill(attrs));
|
|
53
59
|
}
|
|
54
60
|
}
|
|
55
61
|
return tr;
|
|
@@ -73,7 +73,7 @@ export const cloneRowAt = rowIndex => tr => {
|
|
|
73
73
|
};
|
|
74
74
|
|
|
75
75
|
// Returns a new transaction that adds a new row at index `rowIndex`. Optionally clone the previous row.
|
|
76
|
-
export const addRowAt = (rowIndex, clonePreviousRow) => tr => {
|
|
76
|
+
export const addRowAt = (rowIndex, clonePreviousRow, isCellBackgroundDuplicated) => tr => {
|
|
77
77
|
const table = findTable(tr.selection);
|
|
78
78
|
if (table) {
|
|
79
79
|
const map = TableMap.get(table.node);
|
|
@@ -86,7 +86,7 @@ export const addRowAt = (rowIndex, clonePreviousRow) => tr => {
|
|
|
86
86
|
map,
|
|
87
87
|
tableStart: table.start,
|
|
88
88
|
table: table.node
|
|
89
|
-
}, rowIndex));
|
|
89
|
+
}, rowIndex, isCellBackgroundDuplicated));
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
return tr;
|
|
@@ -13,7 +13,7 @@ export function addRow(tr, {
|
|
|
13
13
|
map,
|
|
14
14
|
tableStart,
|
|
15
15
|
table
|
|
16
|
-
}, row) {
|
|
16
|
+
}, row, isCellBackgroundDuplicated) {
|
|
17
17
|
let rowPos = tableStart;
|
|
18
18
|
for (let i = 0; i < row; i++) {
|
|
19
19
|
rowPos += table.child(i).nodeSize;
|
|
@@ -41,6 +41,7 @@ export function addRow(tr, {
|
|
|
41
41
|
col += attrs.colspan - 1;
|
|
42
42
|
} else {
|
|
43
43
|
let type;
|
|
44
|
+
let attrs = {};
|
|
44
45
|
if (refRow == null) {
|
|
45
46
|
type = tableNodeTypes(table.type.schema).cell;
|
|
46
47
|
} else {
|
|
@@ -50,8 +51,13 @@ export function addRow(tr, {
|
|
|
50
51
|
throw new Error(`addRow: invalid node at mapped pos ${mappedPos}`);
|
|
51
52
|
}
|
|
52
53
|
type = cell.type;
|
|
54
|
+
if (cell.attrs.background && isCellBackgroundDuplicated) {
|
|
55
|
+
attrs = {
|
|
56
|
+
background: cell.attrs.background
|
|
57
|
+
};
|
|
58
|
+
}
|
|
53
59
|
}
|
|
54
|
-
cells.push(type.createAndFill());
|
|
60
|
+
cells.push(type.createAndFill(attrs));
|
|
55
61
|
}
|
|
56
62
|
}
|
|
57
63
|
const rowType = tableNodeTypes(table.type.schema).row;
|
|
@@ -4,7 +4,7 @@ import { cloneTr } from './clone-tr';
|
|
|
4
4
|
import { findTable } from './find';
|
|
5
5
|
|
|
6
6
|
// Returns a new transaction that adds a new column at index `columnIndex`.
|
|
7
|
-
export var addColumnAt = function addColumnAt(columnIndex) {
|
|
7
|
+
export var addColumnAt = function addColumnAt(columnIndex, isCellBackgroundDuplicated) {
|
|
8
8
|
return function (tr) {
|
|
9
9
|
var table = findTable(tr.selection);
|
|
10
10
|
if (table) {
|
|
@@ -14,7 +14,7 @@ export var addColumnAt = function addColumnAt(columnIndex) {
|
|
|
14
14
|
map: map,
|
|
15
15
|
tableStart: table.start,
|
|
16
16
|
table: table.node
|
|
17
|
-
}, columnIndex));
|
|
17
|
+
}, columnIndex, isCellBackgroundDuplicated));
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
return tr;
|
|
@@ -12,7 +12,7 @@ export function columnIsHeader(map, table, col) {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
// Add a column at the given position in a table.
|
|
15
|
-
export function addColumn(tr, _ref, col) {
|
|
15
|
+
export function addColumn(tr, _ref, col, isCellBackgroundDuplicated) {
|
|
16
16
|
var map = _ref.map,
|
|
17
17
|
tableStart = _ref.tableStart,
|
|
18
18
|
table = _ref.table;
|
|
@@ -37,6 +37,7 @@ export function addColumn(tr, _ref, col) {
|
|
|
37
37
|
row += attributes.rowspan - 1;
|
|
38
38
|
} else {
|
|
39
39
|
var type = void 0;
|
|
40
|
+
var attrs = {};
|
|
40
41
|
if (refColumn === null) {
|
|
41
42
|
type = tableNodeTypes(table.type.schema).cell;
|
|
42
43
|
} else {
|
|
@@ -46,9 +47,14 @@ export function addColumn(tr, _ref, col) {
|
|
|
46
47
|
throw new Error("addColumn: invalid node at mapped pos ".concat(mappedPos));
|
|
47
48
|
}
|
|
48
49
|
type = _cell.type;
|
|
50
|
+
if (_cell.attrs.background && isCellBackgroundDuplicated) {
|
|
51
|
+
attrs = {
|
|
52
|
+
background: _cell.attrs.background
|
|
53
|
+
};
|
|
54
|
+
}
|
|
49
55
|
}
|
|
50
56
|
var _pos = map.positionAt(row, col, table);
|
|
51
|
-
tr.insert(tr.mapping.map(tableStart + _pos), type.createAndFill());
|
|
57
|
+
tr.insert(tr.mapping.map(tableStart + _pos), type.createAndFill(attrs));
|
|
52
58
|
}
|
|
53
59
|
}
|
|
54
60
|
return tr;
|
|
@@ -81,7 +81,7 @@ export var cloneRowAt = function cloneRowAt(rowIndex) {
|
|
|
81
81
|
};
|
|
82
82
|
|
|
83
83
|
// Returns a new transaction that adds a new row at index `rowIndex`. Optionally clone the previous row.
|
|
84
|
-
export var addRowAt = function addRowAt(rowIndex, clonePreviousRow) {
|
|
84
|
+
export var addRowAt = function addRowAt(rowIndex, clonePreviousRow, isCellBackgroundDuplicated) {
|
|
85
85
|
return function (tr) {
|
|
86
86
|
var table = findTable(tr.selection);
|
|
87
87
|
if (table) {
|
|
@@ -95,7 +95,7 @@ export var addRowAt = function addRowAt(rowIndex, clonePreviousRow) {
|
|
|
95
95
|
map: map,
|
|
96
96
|
tableStart: table.start,
|
|
97
97
|
table: table.node
|
|
98
|
-
}, rowIndex));
|
|
98
|
+
}, rowIndex, isCellBackgroundDuplicated));
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
return tr;
|
|
@@ -12,7 +12,7 @@ function rowIsHeader(map, table, row) {
|
|
|
12
12
|
}
|
|
13
13
|
return true;
|
|
14
14
|
}
|
|
15
|
-
export function addRow(tr, _ref, row) {
|
|
15
|
+
export function addRow(tr, _ref, row, isCellBackgroundDuplicated) {
|
|
16
16
|
var map = _ref.map,
|
|
17
17
|
tableStart = _ref.tableStart,
|
|
18
18
|
table = _ref.table;
|
|
@@ -40,6 +40,7 @@ export function addRow(tr, _ref, row) {
|
|
|
40
40
|
col += attrs.colspan - 1;
|
|
41
41
|
} else {
|
|
42
42
|
var type = void 0;
|
|
43
|
+
var _attrs = {};
|
|
43
44
|
if (refRow == null) {
|
|
44
45
|
type = tableNodeTypes(table.type.schema).cell;
|
|
45
46
|
} else {
|
|
@@ -49,8 +50,13 @@ export function addRow(tr, _ref, row) {
|
|
|
49
50
|
throw new Error("addRow: invalid node at mapped pos ".concat(mappedPos));
|
|
50
51
|
}
|
|
51
52
|
type = cell.type;
|
|
53
|
+
if (cell.attrs.background && isCellBackgroundDuplicated) {
|
|
54
|
+
_attrs = {
|
|
55
|
+
background: cell.attrs.background
|
|
56
|
+
};
|
|
57
|
+
}
|
|
52
58
|
}
|
|
53
|
-
cells.push(type.createAndFill());
|
|
59
|
+
cells.push(type.createAndFill(_attrs));
|
|
54
60
|
}
|
|
55
61
|
}
|
|
56
62
|
var rowType = tableNodeTypes(table.type.schema).row;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
export declare const addColumnAt: (columnIndex: number) => (tr: Transaction) => Transaction;
|
|
1
|
+
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
+
export declare const addColumnAt: (columnIndex: number, isCellBackgroundDuplicated?: boolean) => (tr: Transaction) => Transaction;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import { TableContext, TableMap } from '../table-map';
|
|
1
|
+
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
+
import type { TableContext, TableMap } from '../table-map';
|
|
4
4
|
export declare function columnIsHeader(map: TableMap, table: PMNode, col: number): boolean;
|
|
5
|
-
export declare function addColumn(tr: Transaction, { map, tableStart, table }: TableContext, col: number): Transaction;
|
|
5
|
+
export declare function addColumn(tr: Transaction, { map, tableStart, table }: TableContext, col: number, isCellBackgroundDuplicated?: boolean): Transaction;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
1
|
+
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
2
|
export declare const cloneRowAt: (rowIndex: number) => (tr: Transaction) => Transaction;
|
|
3
|
-
export declare const addRowAt: (rowIndex: number, clonePreviousRow?: boolean) => (tr: Transaction) => Transaction;
|
|
3
|
+
export declare const addRowAt: (rowIndex: number, clonePreviousRow?: boolean, isCellBackgroundDuplicated?: boolean) => (tr: Transaction) => Transaction;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import { TableContext } from '../table-map';
|
|
3
|
-
export declare function addRow(tr: Transaction, { map, tableStart, table }: TableContext, row: number): Transaction;
|
|
1
|
+
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
+
import type { TableContext } from '../table-map';
|
|
3
|
+
export declare function addRow(tr: Transaction, { map, tableStart, table }: TableContext, row: number, isCellBackgroundDuplicated?: boolean): Transaction;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
export declare const addColumnAt: (columnIndex: number) => (tr: Transaction) => Transaction;
|
|
1
|
+
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
+
export declare const addColumnAt: (columnIndex: number, isCellBackgroundDuplicated?: boolean) => (tr: Transaction) => Transaction;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import { TableContext, TableMap } from '../table-map';
|
|
1
|
+
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
+
import type { TableContext, TableMap } from '../table-map';
|
|
4
4
|
export declare function columnIsHeader(map: TableMap, table: PMNode, col: number): boolean;
|
|
5
|
-
export declare function addColumn(tr: Transaction, { map, tableStart, table }: TableContext, col: number): Transaction;
|
|
5
|
+
export declare function addColumn(tr: Transaction, { map, tableStart, table }: TableContext, col: number, isCellBackgroundDuplicated?: boolean): Transaction;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
1
|
+
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
2
|
export declare const cloneRowAt: (rowIndex: number) => (tr: Transaction) => Transaction;
|
|
3
|
-
export declare const addRowAt: (rowIndex: number, clonePreviousRow?: boolean) => (tr: Transaction) => Transaction;
|
|
3
|
+
export declare const addRowAt: (rowIndex: number, clonePreviousRow?: boolean, isCellBackgroundDuplicated?: boolean) => (tr: Transaction) => Transaction;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import { TableContext } from '../table-map';
|
|
3
|
-
export declare function addRow(tr: Transaction, { map, tableStart, table }: TableContext, row: number): Transaction;
|
|
1
|
+
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
+
import type { TableContext } from '../table-map';
|
|
3
|
+
export declare function addRow(tr: Transaction, { map, tableStart, table }: TableContext, row: number, isCellBackgroundDuplicated?: boolean): Transaction;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-tables",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.3",
|
|
4
4
|
"description": "A package that contains common classes and utility functions for editor tables",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"releaseModel": "continuous"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@atlaskit/editor-prosemirror": "4.0.
|
|
31
|
+
"@atlaskit/editor-prosemirror": "4.0.1",
|
|
32
32
|
"@babel/runtime": "^7.0.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|