@atlaskit/editor-plugin-status 11.0.4 → 11.0.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 +14 -0
- package/dist/cjs/nodeviews/StatusNodeView.js +4 -10
- package/dist/cjs/nodeviews/statusNodeSpec.js +4 -5
- package/dist/es2019/nodeviews/StatusNodeView.js +4 -10
- package/dist/es2019/nodeviews/statusNodeSpec.js +3 -6
- package/dist/esm/nodeviews/StatusNodeView.js +4 -10
- package/dist/esm/nodeviews/statusNodeSpec.js +4 -5
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-status
|
|
2
2
|
|
|
3
|
+
## 11.0.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 11.0.5
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`f7d7098ecbcbf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f7d7098ecbcbf) -
|
|
14
|
+
Cleanup exp platform_editor_copy_paste_issue_fix
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 11.0.4
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -11,7 +11,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
11
11
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
12
12
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
13
13
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
15
14
|
var _statusNodeSpec = require("./statusNodeSpec");
|
|
16
15
|
/**
|
|
17
16
|
*
|
|
@@ -63,24 +62,19 @@ var StatusNodeView = exports.StatusNodeView = /*#__PURE__*/function () {
|
|
|
63
62
|
return false;
|
|
64
63
|
}
|
|
65
64
|
if (this.textContainer && node.attrs.text !== this.node.attrs.text) {
|
|
65
|
+
var _this$domElement;
|
|
66
66
|
this.textContainer.textContent = node.attrs.text;
|
|
67
67
|
// Also update data-text on outer wrapper for parseDOM extraction when copying
|
|
68
|
-
|
|
69
|
-
var _this$domElement;
|
|
70
|
-
(_this$domElement = this.domElement) === null || _this$domElement === void 0 || _this$domElement.setAttribute('data-text', node.attrs.text);
|
|
71
|
-
}
|
|
68
|
+
(_this$domElement = this.domElement) === null || _this$domElement === void 0 || _this$domElement.setAttribute('data-text', node.attrs.text);
|
|
72
69
|
}
|
|
73
70
|
if (this.textContainer && node.attrs.style !== this.node.attrs.style && (0, _platformFeatureFlags.fg)('platform-dst-lozenge-tag-badge-visual-uplifts')) {
|
|
74
71
|
this.textContainer.style.textTransform = node.attrs.style !== 'mixedCase' ? 'uppercase' : '';
|
|
75
72
|
}
|
|
76
73
|
if (node.attrs.color !== this.node.attrs.color) {
|
|
77
|
-
var _this$box;
|
|
74
|
+
var _this$box, _this$domElement2;
|
|
78
75
|
(_this$box = this.box) === null || _this$box === void 0 || _this$box.setAttribute('data-color', node.attrs.color);
|
|
79
76
|
// Also update data-color on outer wrapper for parseDOM extraction when copying
|
|
80
|
-
|
|
81
|
-
var _this$domElement2;
|
|
82
|
-
(_this$domElement2 = this.domElement) === null || _this$domElement2 === void 0 || _this$domElement2.setAttribute('data-color', node.attrs.color);
|
|
83
|
-
}
|
|
77
|
+
(_this$domElement2 = this.domElement) === null || _this$domElement2 === void 0 || _this$domElement2.setAttribute('data-color', node.attrs.color);
|
|
84
78
|
}
|
|
85
79
|
if (!node.attrs.text) {
|
|
86
80
|
this.setPlaceholder();
|
|
@@ -10,7 +10,6 @@ var _browser = require("@atlaskit/editor-common/browser");
|
|
|
10
10
|
var _lazyNodeView = require("@atlaskit/editor-common/lazy-node-view");
|
|
11
11
|
var _whitespace = require("@atlaskit/editor-common/whitespace");
|
|
12
12
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
14
13
|
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; }
|
|
15
14
|
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; }
|
|
16
15
|
// eg. Version/4.0 Chrome/95.0.4638.50
|
|
@@ -24,16 +23,16 @@ var statusToDOM = exports.statusToDOM = function statusToDOM(node) {
|
|
|
24
23
|
color = _node$attrs.color,
|
|
25
24
|
style = _node$attrs.style,
|
|
26
25
|
localId = _node$attrs.localId;
|
|
27
|
-
var editorNodeWrapperAttrs =
|
|
26
|
+
var editorNodeWrapperAttrs = {
|
|
28
27
|
class: 'statusView-content-wrap inlineNodeView',
|
|
29
28
|
'data-testid': 'statusContainerView',
|
|
30
29
|
'data-prosemirror-node-name': 'status',
|
|
31
|
-
localid: localId
|
|
32
|
-
|
|
30
|
+
localid: localId,
|
|
31
|
+
// Required for parseDOM to correctly parse status when NodeView DOM is copied directly
|
|
33
32
|
'data-node-type': 'status',
|
|
34
33
|
'data-color': color,
|
|
35
34
|
'data-text': text // Text stored as attribute for parseDOM extraction
|
|
36
|
-
}
|
|
35
|
+
};
|
|
37
36
|
var statusElementAttrs = {
|
|
38
37
|
style: (0, _lazyNodeView.convertToInlineCss)(isAndroidChromium ? {
|
|
39
38
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
@@ -2,7 +2,6 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
import { statusMessages as messages } from '@atlaskit/editor-common/messages';
|
|
3
3
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
5
|
import { statusToDOM } from './statusNodeSpec';
|
|
7
6
|
|
|
8
7
|
/**
|
|
@@ -51,24 +50,19 @@ export class StatusNodeView {
|
|
|
51
50
|
return false;
|
|
52
51
|
}
|
|
53
52
|
if (this.textContainer && node.attrs.text !== this.node.attrs.text) {
|
|
53
|
+
var _this$domElement;
|
|
54
54
|
this.textContainer.textContent = node.attrs.text;
|
|
55
55
|
// Also update data-text on outer wrapper for parseDOM extraction when copying
|
|
56
|
-
|
|
57
|
-
var _this$domElement;
|
|
58
|
-
(_this$domElement = this.domElement) === null || _this$domElement === void 0 ? void 0 : _this$domElement.setAttribute('data-text', node.attrs.text);
|
|
59
|
-
}
|
|
56
|
+
(_this$domElement = this.domElement) === null || _this$domElement === void 0 ? void 0 : _this$domElement.setAttribute('data-text', node.attrs.text);
|
|
60
57
|
}
|
|
61
58
|
if (this.textContainer && node.attrs.style !== this.node.attrs.style && fg('platform-dst-lozenge-tag-badge-visual-uplifts')) {
|
|
62
59
|
this.textContainer.style.textTransform = node.attrs.style !== 'mixedCase' ? 'uppercase' : '';
|
|
63
60
|
}
|
|
64
61
|
if (node.attrs.color !== this.node.attrs.color) {
|
|
65
|
-
var _this$box;
|
|
62
|
+
var _this$box, _this$domElement2;
|
|
66
63
|
(_this$box = this.box) === null || _this$box === void 0 ? void 0 : _this$box.setAttribute('data-color', node.attrs.color);
|
|
67
64
|
// Also update data-color on outer wrapper for parseDOM extraction when copying
|
|
68
|
-
|
|
69
|
-
var _this$domElement2;
|
|
70
|
-
(_this$domElement2 = this.domElement) === null || _this$domElement2 === void 0 ? void 0 : _this$domElement2.setAttribute('data-color', node.attrs.color);
|
|
71
|
-
}
|
|
65
|
+
(_this$domElement2 = this.domElement) === null || _this$domElement2 === void 0 ? void 0 : _this$domElement2.setAttribute('data-color', node.attrs.color);
|
|
72
66
|
}
|
|
73
67
|
if (!node.attrs.text) {
|
|
74
68
|
this.setPlaceholder();
|
|
@@ -2,7 +2,6 @@ import { getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
|
2
2
|
import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
|
|
3
3
|
import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/whitespace';
|
|
4
4
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
5
|
|
|
7
6
|
// eg. Version/4.0 Chrome/95.0.4638.50
|
|
8
7
|
const isAndroidChromium =
|
|
@@ -22,11 +21,9 @@ export const statusToDOM = node => {
|
|
|
22
21
|
'data-prosemirror-node-name': 'status',
|
|
23
22
|
localid: localId,
|
|
24
23
|
// Required for parseDOM to correctly parse status when NodeView DOM is copied directly
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
'data-text': text // Text stored as attribute for parseDOM extraction
|
|
29
|
-
} : {})
|
|
24
|
+
'data-node-type': 'status',
|
|
25
|
+
'data-color': color,
|
|
26
|
+
'data-text': text // Text stored as attribute for parseDOM extraction
|
|
30
27
|
};
|
|
31
28
|
const statusElementAttrs = {
|
|
32
29
|
style: convertToInlineCss(isAndroidChromium ? {
|
|
@@ -4,7 +4,6 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
4
4
|
import { statusMessages as messages } from '@atlaskit/editor-common/messages';
|
|
5
5
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
7
|
import { statusToDOM } from './statusNodeSpec';
|
|
9
8
|
|
|
10
9
|
/**
|
|
@@ -57,24 +56,19 @@ export var StatusNodeView = /*#__PURE__*/function () {
|
|
|
57
56
|
return false;
|
|
58
57
|
}
|
|
59
58
|
if (this.textContainer && node.attrs.text !== this.node.attrs.text) {
|
|
59
|
+
var _this$domElement;
|
|
60
60
|
this.textContainer.textContent = node.attrs.text;
|
|
61
61
|
// Also update data-text on outer wrapper for parseDOM extraction when copying
|
|
62
|
-
|
|
63
|
-
var _this$domElement;
|
|
64
|
-
(_this$domElement = this.domElement) === null || _this$domElement === void 0 || _this$domElement.setAttribute('data-text', node.attrs.text);
|
|
65
|
-
}
|
|
62
|
+
(_this$domElement = this.domElement) === null || _this$domElement === void 0 || _this$domElement.setAttribute('data-text', node.attrs.text);
|
|
66
63
|
}
|
|
67
64
|
if (this.textContainer && node.attrs.style !== this.node.attrs.style && fg('platform-dst-lozenge-tag-badge-visual-uplifts')) {
|
|
68
65
|
this.textContainer.style.textTransform = node.attrs.style !== 'mixedCase' ? 'uppercase' : '';
|
|
69
66
|
}
|
|
70
67
|
if (node.attrs.color !== this.node.attrs.color) {
|
|
71
|
-
var _this$box;
|
|
68
|
+
var _this$box, _this$domElement2;
|
|
72
69
|
(_this$box = this.box) === null || _this$box === void 0 || _this$box.setAttribute('data-color', node.attrs.color);
|
|
73
70
|
// Also update data-color on outer wrapper for parseDOM extraction when copying
|
|
74
|
-
|
|
75
|
-
var _this$domElement2;
|
|
76
|
-
(_this$domElement2 = this.domElement) === null || _this$domElement2 === void 0 || _this$domElement2.setAttribute('data-color', node.attrs.color);
|
|
77
|
-
}
|
|
71
|
+
(_this$domElement2 = this.domElement) === null || _this$domElement2 === void 0 || _this$domElement2.setAttribute('data-color', node.attrs.color);
|
|
78
72
|
}
|
|
79
73
|
if (!node.attrs.text) {
|
|
80
74
|
this.setPlaceholder();
|
|
@@ -5,7 +5,6 @@ import { getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
|
5
5
|
import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
|
|
6
6
|
import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/whitespace';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
8
|
|
|
10
9
|
// eg. Version/4.0 Chrome/95.0.4638.50
|
|
11
10
|
var isAndroidChromium =
|
|
@@ -18,16 +17,16 @@ export var statusToDOM = function statusToDOM(node) {
|
|
|
18
17
|
color = _node$attrs.color,
|
|
19
18
|
style = _node$attrs.style,
|
|
20
19
|
localId = _node$attrs.localId;
|
|
21
|
-
var editorNodeWrapperAttrs =
|
|
20
|
+
var editorNodeWrapperAttrs = {
|
|
22
21
|
class: 'statusView-content-wrap inlineNodeView',
|
|
23
22
|
'data-testid': 'statusContainerView',
|
|
24
23
|
'data-prosemirror-node-name': 'status',
|
|
25
|
-
localid: localId
|
|
26
|
-
|
|
24
|
+
localid: localId,
|
|
25
|
+
// Required for parseDOM to correctly parse status when NodeView DOM is copied directly
|
|
27
26
|
'data-node-type': 'status',
|
|
28
27
|
'data-color': color,
|
|
29
28
|
'data-text': text // Text stored as attribute for parseDOM extraction
|
|
30
|
-
}
|
|
29
|
+
};
|
|
31
30
|
var statusElementAttrs = {
|
|
32
31
|
style: convertToInlineCss(isAndroidChromium ? {
|
|
33
32
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-status",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.6",
|
|
4
4
|
"description": "Status plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
],
|
|
30
30
|
"atlaskit:src": "src/index.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@atlaskit/adf-schema": "^52.
|
|
32
|
+
"@atlaskit/adf-schema": "^52.6.0",
|
|
33
33
|
"@atlaskit/analytics-next": "^11.2.0",
|
|
34
34
|
"@atlaskit/browser-apis": "^0.0.1",
|
|
35
35
|
"@atlaskit/editor-plugin-analytics": "^10.0.0",
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
"@atlaskit/icon": "^34.3.0",
|
|
39
39
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
40
40
|
"@atlaskit/status": "^4.0.0",
|
|
41
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
41
|
+
"@atlaskit/tmp-editor-statsig": "^68.0.0",
|
|
42
42
|
"@atlaskit/tokens": "^13.0.0",
|
|
43
43
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
44
44
|
"@babel/runtime": "^7.0.0",
|
|
45
45
|
"@emotion/react": "^11.7.1"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@atlaskit/editor-common": "^114.
|
|
48
|
+
"@atlaskit/editor-common": "^114.9.0",
|
|
49
49
|
"react": "^18.2.0",
|
|
50
50
|
"react-dom": "^18.2.0",
|
|
51
51
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|