@atlaskit/adf-schema 51.1.0 → 51.1.1

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/adf-schema
2
2
 
3
+ ## 51.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - a5d311d: Update tableCellNodeSpecOptionsWithLocalId parseDOM method to include all cell attributes.
8
+
3
9
  ## 51.1.0
4
10
 
5
11
  ### Minor Changes
@@ -51,7 +51,7 @@ var getCellAttrs = exports.getCellAttrs = function getCellAttrs(dom) {
51
51
  }
52
52
  }
53
53
  var backgroundHexCode = dataCellBackgroundHexCode || (backgroundColor && backgroundColor !== defaultValues['background'] ? backgroundColor : null);
54
- var localId = dom.getAttribute('data-local-id') || defaultValues.localId;
54
+ var localId = defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.localId;
55
55
  return _objectSpread({
56
56
  colspan: colspan,
57
57
  rowspan: Number(dom.getAttribute('rowspan') || 1),
@@ -374,10 +374,10 @@ var tableRowWithLocalId = exports.tableRowWithLocalId = (0, _nodeTypes.tableRow)
374
374
  var tableCellNodeSpecOptionsWithLocalId = {
375
375
  parseDOM: [{
376
376
  tag: 'td',
377
- getAttrs: function getAttrs() {
378
- return {
377
+ getAttrs: function getAttrs(dom) {
378
+ return getCellAttrs(dom, {
379
379
  localId: _uuid.uuid.generate()
380
- };
380
+ });
381
381
  }
382
382
  }],
383
383
  toDOM: function toDOM(node) {
@@ -39,7 +39,7 @@ export const getCellAttrs = (dom, defaultValues = {}) => {
39
39
  }
40
40
  }
41
41
  const backgroundHexCode = dataCellBackgroundHexCode || (backgroundColor && backgroundColor !== defaultValues['background'] ? backgroundColor : null);
42
- const localId = dom.getAttribute('data-local-id') || defaultValues.localId;
42
+ const localId = defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.localId;
43
43
  return {
44
44
  colspan,
45
45
  rowspan: Number(dom.getAttribute('rowspan') || 1),
@@ -345,7 +345,7 @@ export const tableRowWithLocalId = tableRowFactory(tableRowNodeSpecOptionsWithLo
345
345
  const tableCellNodeSpecOptionsWithLocalId = {
346
346
  parseDOM: [{
347
347
  tag: 'td',
348
- getAttrs: () => ({
348
+ getAttrs: dom => getCellAttrs(dom, {
349
349
  localId: uuid.generate()
350
350
  })
351
351
  }],
@@ -44,7 +44,7 @@ export var getCellAttrs = function getCellAttrs(dom) {
44
44
  }
45
45
  }
46
46
  var backgroundHexCode = dataCellBackgroundHexCode || (backgroundColor && backgroundColor !== defaultValues['background'] ? backgroundColor : null);
47
- var localId = dom.getAttribute('data-local-id') || defaultValues.localId;
47
+ var localId = defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.localId;
48
48
  return _objectSpread({
49
49
  colspan: colspan,
50
50
  rowspan: Number(dom.getAttribute('rowspan') || 1),
@@ -367,10 +367,10 @@ export var tableRowWithLocalId = tableRowFactory(tableRowNodeSpecOptionsWithLoca
367
367
  var tableCellNodeSpecOptionsWithLocalId = {
368
368
  parseDOM: [{
369
369
  tag: 'td',
370
- getAttrs: function getAttrs() {
371
- return {
370
+ getAttrs: function getAttrs(dom) {
371
+ return getCellAttrs(dom, {
372
372
  localId: uuid.generate()
373
- };
373
+ });
374
374
  }
375
375
  }],
376
376
  toDOM: function toDOM(node) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "51.1.0",
3
+ "version": "51.1.1",
4
4
  "description": "Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"