@atlaskit/editor-plugin-date 9.1.1 → 9.1.2
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,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-date
|
|
2
2
|
|
|
3
|
+
## 9.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`3dde4e51c90bf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3dde4e51c90bf) -
|
|
8
|
+
Fixed mixed HTML/Editor content copy/paste issue on Date node.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 9.1.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.dateToDOM = exports.dateNodeSpec = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
7
9
|
var _reactIntlNext = require("react-intl-next");
|
|
8
10
|
var _lazyNodeView = require("@atlaskit/editor-common/lazy-node-view");
|
|
9
11
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
10
12
|
var _whitespace = require("@atlaskit/editor-common/whitespace");
|
|
11
13
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
14
|
var _colors = require("@atlaskit/theme/colors");
|
|
15
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
13
16
|
var _utils2 = require("./utils");
|
|
17
|
+
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; }
|
|
18
|
+
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; }
|
|
14
19
|
var intlRef;
|
|
15
20
|
var dateNodeSpec = exports.dateNodeSpec = function dateNodeSpec(node) {
|
|
16
21
|
intlRef = intlRef || (0, _reactIntlNext.createIntl)({
|
|
@@ -42,15 +47,19 @@ var dateToDOM = exports.dateToDOM = function dateToDOM(node, state, getPos, intl
|
|
|
42
47
|
var _getDateInformation = (0, _utils2.getDateInformation)(timestamp, intl, state, pos),
|
|
43
48
|
displayString = _getDateInformation.displayString,
|
|
44
49
|
color = _getDateInformation.color;
|
|
45
|
-
var nodeWrapperAttrs = {
|
|
50
|
+
var nodeWrapperAttrs = _objectSpread(_objectSpread({
|
|
46
51
|
contenteditable: 'false',
|
|
47
52
|
timestamp: timestamp,
|
|
48
53
|
class: 'dateView-content-wrap inlineNodeView',
|
|
49
54
|
'data-prosemirror-content-type': 'node',
|
|
50
55
|
'data-prosemirror-node-name': 'date',
|
|
51
|
-
'data-prosemirror-node-inline': 'true'
|
|
56
|
+
'data-prosemirror-node-inline': 'true'
|
|
57
|
+
}, (0, _expValEquals.expValEquals)('platform_editor_copy_paste_issue_fix', 'isEnabled', true) ? {
|
|
58
|
+
'data-node-type': 'date',
|
|
59
|
+
'data-timestamp': timestamp
|
|
60
|
+
} : {}), {}, {
|
|
52
61
|
draggable: 'true'
|
|
53
|
-
};
|
|
62
|
+
});
|
|
54
63
|
if ((0, _platformFeatureFlags.fg)('platform_editor_adf_with_localid')) {
|
|
55
64
|
nodeWrapperAttrs['data-local-id'] = node.attrs.localId;
|
|
56
65
|
}
|
|
@@ -4,6 +4,7 @@ import { browser, timestampToString } from '@atlaskit/editor-common/utils';
|
|
|
4
4
|
import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/whitespace';
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
6
|
import { N30A, N800 } from '@atlaskit/theme/colors';
|
|
7
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
8
|
import { getDateInformation } from './utils';
|
|
8
9
|
let intlRef;
|
|
9
10
|
export const dateNodeSpec = node => {
|
|
@@ -44,6 +45,10 @@ export const dateToDOM = (node, state, getPos, intl) => {
|
|
|
44
45
|
'data-prosemirror-content-type': 'node',
|
|
45
46
|
'data-prosemirror-node-name': 'date',
|
|
46
47
|
'data-prosemirror-node-inline': 'true',
|
|
48
|
+
...(expValEquals('platform_editor_copy_paste_issue_fix', 'isEnabled', true) ? {
|
|
49
|
+
'data-node-type': 'date',
|
|
50
|
+
'data-timestamp': timestamp
|
|
51
|
+
} : {}),
|
|
47
52
|
draggable: 'true'
|
|
48
53
|
};
|
|
49
54
|
if (fg('platform_editor_adf_with_localid')) {
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
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; }
|
|
3
|
+
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) { _defineProperty(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; }
|
|
1
4
|
import { createIntl } from 'react-intl-next';
|
|
2
5
|
import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
|
|
3
6
|
import { browser, timestampToString } from '@atlaskit/editor-common/utils';
|
|
4
7
|
import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/whitespace';
|
|
5
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
9
|
import { N30A, N800 } from '@atlaskit/theme/colors';
|
|
10
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
11
|
import { getDateInformation } from './utils';
|
|
8
12
|
var intlRef;
|
|
9
13
|
export var dateNodeSpec = function dateNodeSpec(node) {
|
|
@@ -36,15 +40,19 @@ export var dateToDOM = function dateToDOM(node, state, getPos, intl) {
|
|
|
36
40
|
var _getDateInformation = getDateInformation(timestamp, intl, state, pos),
|
|
37
41
|
displayString = _getDateInformation.displayString,
|
|
38
42
|
color = _getDateInformation.color;
|
|
39
|
-
var nodeWrapperAttrs = {
|
|
43
|
+
var nodeWrapperAttrs = _objectSpread(_objectSpread({
|
|
40
44
|
contenteditable: 'false',
|
|
41
45
|
timestamp: timestamp,
|
|
42
46
|
class: 'dateView-content-wrap inlineNodeView',
|
|
43
47
|
'data-prosemirror-content-type': 'node',
|
|
44
48
|
'data-prosemirror-node-name': 'date',
|
|
45
|
-
'data-prosemirror-node-inline': 'true'
|
|
49
|
+
'data-prosemirror-node-inline': 'true'
|
|
50
|
+
}, expValEquals('platform_editor_copy_paste_issue_fix', 'isEnabled', true) ? {
|
|
51
|
+
'data-node-type': 'date',
|
|
52
|
+
'data-timestamp': timestamp
|
|
53
|
+
} : {}), {}, {
|
|
46
54
|
draggable: 'true'
|
|
47
|
-
};
|
|
55
|
+
});
|
|
48
56
|
if (fg('platform_editor_adf_with_localid')) {
|
|
49
57
|
nodeWrapperAttrs['data-local-id'] = node.attrs.localId;
|
|
50
58
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-date",
|
|
3
|
-
"version": "9.1.
|
|
3
|
+
"version": "9.1.2",
|
|
4
4
|
"description": "Date plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
45
45
|
"@atlaskit/textfield": "^8.2.0",
|
|
46
46
|
"@atlaskit/theme": "^21.0.0",
|
|
47
|
-
"@atlaskit/tmp-editor-statsig": "^16.
|
|
48
|
-
"@atlaskit/tokens": "^10.
|
|
47
|
+
"@atlaskit/tmp-editor-statsig": "^16.27.0",
|
|
48
|
+
"@atlaskit/tokens": "^10.1.0",
|
|
49
49
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
50
50
|
"@babel/runtime": "^7.0.0",
|
|
51
51
|
"bind-event-listener": "^3.0.0",
|