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