@atlaskit/editor-json-transformer 8.6.4 → 8.7.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,43 @@
1
1
  # @atlaskit/editor-json-transformer
2
2
 
3
+ ## 8.7.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`c55c736ecea`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c55c736ecea) - Patch VULN AFP-3486 AFP-3487 AFP-3488 AFP-3489
8
+
9
+ ## 8.7.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`b230f366971`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b230f366971) - [ED-14008] Bump prosemirror-view from 1.20.2 to 1.23.1
14
+ - [`8bbb96540ea`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8bbb96540ea) - Add "fragment" mark to stage0 ADF schema
15
+
16
+ ### Patch Changes
17
+
18
+ - [`c6feed82071`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c6feed82071) - ED-11632: Bump prosemirror packages;
19
+
20
+ - prosmirror-commands 1.1.4 -> 1.1.11,
21
+ - prosemirror-model 1.11.0 -> 1.14.3,
22
+ - prosemirror-state 1.3.3 -> 1.3.4,
23
+ - prosemirror-transform 1.2.8 -> 1.3.2,
24
+ - prosemirror-view 1.15.4 + 1.18.8 -> 1.20.2.
25
+
26
+ - Updated dependencies
27
+
28
+ ## 8.6.6
29
+
30
+ ### Patch Changes
31
+
32
+ - [`2aef13b22d8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2aef13b22d8) - ED-12604: add localId for tables and dataConsumer mark for extensions in full schema
33
+ - Updated dependencies
34
+
35
+ ## 8.6.5
36
+
37
+ ### Patch Changes
38
+
39
+ - [`55e64e9e8d6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/55e64e9e8d6) - COLLAB-754: remove react peerDependency
40
+
3
41
  ## 8.6.4
4
42
 
5
43
  ### Patch Changes
@@ -5,6 +5,13 @@
5
5
  "target": "es5",
6
6
  "paths": {}
7
7
  },
8
- "include": ["../src/**/*.ts", "../src/**/*.tsx"],
9
- "exclude": ["../src/**/__tests__/*"]
10
- }
8
+ "include": [
9
+ "../src/**/*.ts",
10
+ "../src/**/*.tsx"
11
+ ],
12
+ "exclude": [
13
+ "../src/**/__tests__/*",
14
+ "../src/**/*.test.*",
15
+ "../src/**/test.*"
16
+ ]
17
+ }
package/dist/cjs/index.js CHANGED
@@ -53,6 +53,7 @@ var isUnsupportedNode = function isUnsupportedNode(node) {
53
53
  };
54
54
 
55
55
  var isDataConsumer = isType('dataConsumer');
56
+ var isFragmentMark = isType('fragment');
56
57
 
57
58
  var filterNull = function filterNull(subject) {
58
59
  return Object.keys(subject).reduce(function (acc, key) {
@@ -141,6 +142,14 @@ var toJSON = function toJSON(node) {
141
142
 
142
143
  var serialised = (0, _adfSchema.dataConsumerToJSON)(mark);
143
144
  return !serialised.attrs.sources || ((_serialised$attrs$sou = serialised.attrs.sources) === null || _serialised$attrs$sou === void 0 ? void 0 : _serialised$attrs$sou.length) === 0 ? null : serialised;
145
+ } else if (isFragmentMark(mark)) {
146
+ var fragmentMark = (0, _adfSchema.fragmentToJSON)(mark);
147
+
148
+ if (!fragmentMark.attrs.localId) {
149
+ return null;
150
+ }
151
+
152
+ return fragmentMark;
144
153
  } else {
145
154
  return mark.toJSON();
146
155
  }
@@ -3,16 +3,16 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- Object.defineProperty(exports, "sanitizeNode", {
6
+ Object.defineProperty(exports, "removeMarks", {
7
7
  enumerable: true,
8
8
  get: function get() {
9
- return _sanitizeNode.sanitizeNode;
9
+ return _removeMarks.removeMarks;
10
10
  }
11
11
  });
12
- Object.defineProperty(exports, "removeMarks", {
12
+ Object.defineProperty(exports, "sanitizeNode", {
13
13
  enumerable: true,
14
14
  get: function get() {
15
- return _removeMarks.removeMarks;
15
+ return _sanitizeNode.sanitizeNode;
16
16
  }
17
17
  });
18
18
 
package/dist/cjs/types.js CHANGED
@@ -1 +1,5 @@
1
- "use strict";
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-json-transformer",
3
- "version": "8.6.4",
3
+ "version": "8.7.1",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import isEqual from 'lodash/isEqual';
2
- import { codeBlockToJSON, dataConsumerToJSON, defaultSchema, expandToJSON, linkToJSON, mediaSingleToJSON, mediaToJSON, mentionToJSON, tableToJSON, toJSONTableCell, toJSONTableHeader } from '@atlaskit/adf-schema';
2
+ import { codeBlockToJSON, dataConsumerToJSON, defaultSchema, expandToJSON, fragmentToJSON, linkToJSON, mediaSingleToJSON, mediaToJSON, mentionToJSON, tableToJSON, toJSONTableCell, toJSONTableHeader } from '@atlaskit/adf-schema';
3
3
  import { markOverrideRuleFor } from './markOverrideRules';
4
4
  import { sanitizeNode } from './sanitize/sanitize-node';
5
5
 
@@ -23,6 +23,7 @@ const isNestedExpand = isType('nestedExpand');
23
23
  const isUnsupportedNode = node => isType('unsupportedBlock')(node) || isType('unsupportedInline')(node);
24
24
 
25
25
  const isDataConsumer = isType('dataConsumer');
26
+ const isFragmentMark = isType('fragment');
26
27
 
27
28
  const filterNull = subject => {
28
29
  return Object.keys(subject).reduce((acc, key) => {
@@ -113,6 +114,14 @@ const toJSON = node => {
113
114
 
114
115
  const serialised = dataConsumerToJSON(mark);
115
116
  return !serialised.attrs.sources || ((_serialised$attrs$sou = serialised.attrs.sources) === null || _serialised$attrs$sou === void 0 ? void 0 : _serialised$attrs$sou.length) === 0 ? null : serialised;
117
+ } else if (isFragmentMark(mark)) {
118
+ const fragmentMark = fragmentToJSON(mark);
119
+
120
+ if (!fragmentMark.attrs.localId) {
121
+ return null;
122
+ }
123
+
124
+ return fragmentMark;
116
125
  } else {
117
126
  return mark.toJSON();
118
127
  }
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-json-transformer",
3
- "version": "8.6.4",
3
+ "version": "8.7.1",
4
4
  "sideEffects": false
5
5
  }
package/dist/esm/index.js CHANGED
@@ -8,7 +8,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
8
8
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
9
9
 
10
10
  import isEqual from 'lodash/isEqual';
11
- import { codeBlockToJSON, dataConsumerToJSON, defaultSchema, expandToJSON, linkToJSON, mediaSingleToJSON, mediaToJSON, mentionToJSON, tableToJSON, toJSONTableCell, toJSONTableHeader } from '@atlaskit/adf-schema';
11
+ import { codeBlockToJSON, dataConsumerToJSON, defaultSchema, expandToJSON, fragmentToJSON, linkToJSON, mediaSingleToJSON, mediaToJSON, mentionToJSON, tableToJSON, toJSONTableCell, toJSONTableHeader } from '@atlaskit/adf-schema';
12
12
  import { markOverrideRuleFor } from './markOverrideRules';
13
13
  import { sanitizeNode } from './sanitize/sanitize-node';
14
14
 
@@ -38,6 +38,7 @@ var isUnsupportedNode = function isUnsupportedNode(node) {
38
38
  };
39
39
 
40
40
  var isDataConsumer = isType('dataConsumer');
41
+ var isFragmentMark = isType('fragment');
41
42
 
42
43
  var filterNull = function filterNull(subject) {
43
44
  return Object.keys(subject).reduce(function (acc, key) {
@@ -126,6 +127,14 @@ var toJSON = function toJSON(node) {
126
127
 
127
128
  var serialised = dataConsumerToJSON(mark);
128
129
  return !serialised.attrs.sources || ((_serialised$attrs$sou = serialised.attrs.sources) === null || _serialised$attrs$sou === void 0 ? void 0 : _serialised$attrs$sou.length) === 0 ? null : serialised;
130
+ } else if (isFragmentMark(mark)) {
131
+ var fragmentMark = fragmentToJSON(mark);
132
+
133
+ if (!fragmentMark.attrs.localId) {
134
+ return null;
135
+ }
136
+
137
+ return fragmentMark;
129
138
  } else {
130
139
  return mark.toJSON();
131
140
  }
package/dist/esm/types.js CHANGED
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-json-transformer",
3
- "version": "8.6.4",
3
+ "version": "8.7.1",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-json-transformer",
3
- "version": "8.6.4",
3
+ "version": "8.7.1",
4
4
  "description": "JSON transformer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -29,36 +29,37 @@
29
29
  "./types": "./src/types.ts"
30
30
  },
31
31
  "dependencies": {
32
- "@atlaskit/adf-schema": "^18.0.0",
33
- "@atlaskit/adf-utils": "^14.0.0",
32
+ "@atlaskit/adf-schema": "^20.1.0",
33
+ "@atlaskit/adf-utils": "^14.4.0",
34
34
  "@babel/runtime": "^7.0.0",
35
- "lodash": "^4.17.15",
36
- "prosemirror-model": "1.11.0"
37
- },
38
- "peerDependencies": {
39
- "react": "^16.8.0"
35
+ "lodash": "^4.17.21",
36
+ "prosemirror-model": "1.14.3"
40
37
  },
41
38
  "devDependencies": {
42
39
  "@atlaskit/docs": "*",
43
- "@atlaskit/editor-bitbucket-transformer": "^7.1.0",
44
- "@atlaskit/editor-common": "^57.1.0",
40
+ "@atlaskit/editor-bitbucket-transformer": "^7.2.0",
41
+ "@atlaskit/editor-common": "^62.1.0",
45
42
  "@atlaskit/editor-confluence-transformer": "^8.1.0",
46
- "@atlaskit/editor-core": "^144.0.0",
43
+ "@atlaskit/editor-core": "^153.1.0",
47
44
  "@atlaskit/editor-jira-transformer": "^8.1.0",
48
45
  "@atlaskit/editor-markdown-transformer": "^4.1.0",
49
- "@atlaskit/editor-test-helpers": "^15.3.0",
50
- "@atlaskit/editor-wikimarkup-transformer": "^9.3.0",
51
- "@atlaskit/util-data-test": "^15.0.0",
52
- "@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
46
+ "@atlaskit/editor-test-helpers": "^16.0.0",
47
+ "@atlaskit/editor-wikimarkup-transformer": "^11.0.0",
48
+ "@atlaskit/util-data-test": "^17.0.0",
49
+ "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
53
50
  "@types/prosemirror-model": "^1.11.0",
54
- "prosemirror-view": "1.15.4",
51
+ "prosemirror-view": "1.23.1",
52
+ "react": "^16.8.0",
55
53
  "styled-components": "^3.2.6",
56
54
  "typescript": "3.9.6"
57
55
  },
58
56
  "techstack": {
59
57
  "@atlassian/frontend": {
60
58
  "import-structure": "atlassian-conventions"
59
+ },
60
+ "@repo/internal": {
61
+ "deprecation": "no-deprecated-imports"
61
62
  }
62
63
  },
63
- "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.0"
64
+ "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
64
65
  }