@atlaskit/adf-schema 51.5.4 → 51.5.6
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,19 @@
|
|
|
1
1
|
# @atlaskit/adf-schema
|
|
2
2
|
|
|
3
|
+
## 51.5.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`8eca3ae04714e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8eca3ae04714e) -
|
|
8
|
+
Fixed mixed HTML/Editor content copy/paste issue on Status node.
|
|
9
|
+
|
|
10
|
+
## 51.5.5
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [`4e6624861c374`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4e6624861c374) -
|
|
15
|
+
[NO-ISSUE] Moves eslint to devDependencies
|
|
16
|
+
|
|
3
17
|
## 51.5.4
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.status = void 0;
|
|
7
7
|
var _uuid = require("../../utils/uuid");
|
|
8
8
|
var _nodeTypes = require("../../next-schema/generated/nodeTypes");
|
|
9
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
9
10
|
/**
|
|
10
11
|
* @name status_node
|
|
11
12
|
*/
|
|
@@ -16,10 +17,16 @@ var status = exports.status = (0, _nodeTypes.status)({
|
|
|
16
17
|
getAttrs: function getAttrs(domNode) {
|
|
17
18
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
18
19
|
var dom = domNode;
|
|
20
|
+
|
|
21
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
22
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
23
|
+
var textContent = dom.textContent.replace(/\n/, '').trim();
|
|
24
|
+
|
|
25
|
+
// Prefer data-text attribute over textContent
|
|
26
|
+
// When NodeView DOM is copied, inner text content may not be preserved
|
|
27
|
+
var text = (0, _expValEquals.expValEquals)('platform_editor_copy_paste_issue_fix', 'isEnabled', true) ? dom.getAttribute('data-text') || textContent : textContent;
|
|
19
28
|
return {
|
|
20
|
-
|
|
21
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
22
|
-
text: dom.textContent.replace(/\n/, '').trim(),
|
|
29
|
+
text: text,
|
|
23
30
|
color: dom.getAttribute('data-color'),
|
|
24
31
|
localId: _uuid.uuid.generate(),
|
|
25
32
|
style: dom.getAttribute('data-style')
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { uuid } from '../../utils/uuid';
|
|
2
2
|
import { status as statusFactory } from '../../next-schema/generated/nodeTypes';
|
|
3
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* @name status_node
|
|
@@ -11,10 +12,16 @@ export const status = statusFactory({
|
|
|
11
12
|
getAttrs: domNode => {
|
|
12
13
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
13
14
|
const dom = domNode;
|
|
15
|
+
|
|
16
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
18
|
+
const textContent = dom.textContent.replace(/\n/u, '').trim();
|
|
19
|
+
|
|
20
|
+
// Prefer data-text attribute over textContent
|
|
21
|
+
// When NodeView DOM is copied, inner text content may not be preserved
|
|
22
|
+
const text = expValEquals('platform_editor_copy_paste_issue_fix', 'isEnabled', true) ? dom.getAttribute('data-text') || textContent : textContent;
|
|
14
23
|
return {
|
|
15
|
-
|
|
16
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
17
|
-
text: dom.textContent.replace(/\n/u, '').trim(),
|
|
24
|
+
text,
|
|
18
25
|
color: dom.getAttribute('data-color'),
|
|
19
26
|
localId: uuid.generate(),
|
|
20
27
|
style: dom.getAttribute('data-style')
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { uuid } from '../../utils/uuid';
|
|
2
2
|
import { status as statusFactory } from '../../next-schema/generated/nodeTypes';
|
|
3
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* @name status_node
|
|
@@ -11,10 +12,16 @@ export var status = statusFactory({
|
|
|
11
12
|
getAttrs: function getAttrs(domNode) {
|
|
12
13
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
13
14
|
var dom = domNode;
|
|
15
|
+
|
|
16
|
+
// @ts-ignore TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
18
|
+
var textContent = dom.textContent.replace(/\n/, '').trim();
|
|
19
|
+
|
|
20
|
+
// Prefer data-text attribute over textContent
|
|
21
|
+
// When NodeView DOM is copied, inner text content may not be preserved
|
|
22
|
+
var text = expValEquals('platform_editor_copy_paste_issue_fix', 'isEnabled', true) ? dom.getAttribute('data-text') || textContent : textContent;
|
|
14
23
|
return {
|
|
15
|
-
|
|
16
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
17
|
-
text: dom.textContent.replace(/\n/, '').trim(),
|
|
24
|
+
text: text,
|
|
18
25
|
color: dom.getAttribute('data-color'),
|
|
19
26
|
localId: uuid.generate(),
|
|
20
27
|
style: dom.getAttribute('data-style')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/adf-schema",
|
|
3
|
-
"version": "51.5.
|
|
3
|
+
"version": "51.5.6",
|
|
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/"
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"@atlaskit/adf-schema-generator": "^2.1.0",
|
|
44
44
|
"@atlaskit/editor-prosemirror": "^7.2.0",
|
|
45
45
|
"@atlaskit/feature-gate-js-client": "^5.5.0",
|
|
46
|
+
"@atlaskit/tmp-editor-statsig": "^16.30.0",
|
|
46
47
|
"@babel/runtime": "^7.0.0",
|
|
47
48
|
"css-color-names": "0.0.4",
|
|
48
|
-
"eslint": "^8.57.0",
|
|
49
49
|
"linkify-it": "^3.0.3",
|
|
50
50
|
"memoize-one": "^6.0.0"
|
|
51
51
|
},
|
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
"@types/linkify-it": "^3.0.2",
|
|
72
72
|
"@types/node": "~22.17.1",
|
|
73
73
|
"babel-plugin-transform-define": "^2.0.0",
|
|
74
|
+
"eslint": "^8.57.0",
|
|
74
75
|
"jest": "^29.7.0",
|
|
75
76
|
"jest-environment-jsdom": "^29.7.0",
|
|
76
77
|
"json-schema-diff-validator": "^0.4.1",
|