@atlaskit/editor-plugin-date 1.2.5 → 1.3.0
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 +20 -0
- package/dist/cjs/plugin.js +5 -1
- package/dist/es2019/plugin.js +5 -1
- package/dist/esm/plugin.js +5 -1
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-date
|
|
2
2
|
|
|
3
|
+
## 1.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#114156](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/114156)
|
|
8
|
+
[`bc6a63af2d1d0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/bc6a63af2d1d0) -
|
|
9
|
+
Bump adf-schema to 37.0.0 and adf-schema-json to 1.16.0
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 1.2.6
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [#112831](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/112831)
|
|
20
|
+
[`4449002c52e44`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4449002c52e44) -
|
|
21
|
+
[ux] [ED-23702] Open date picker when it is the first node in an inline comment
|
|
22
|
+
|
|
3
23
|
## 1.2.5
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -13,6 +13,7 @@ var _analytics = require("@atlaskit/editor-common/analytics");
|
|
|
13
13
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
14
14
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
15
15
|
var _quickInsert = require("@atlaskit/editor-common/quick-insert");
|
|
16
|
+
var _styles = require("@atlaskit/editor-common/styles");
|
|
16
17
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
17
18
|
var _actions = require("./actions");
|
|
18
19
|
var _commands = require("./commands");
|
|
@@ -53,12 +54,15 @@ function ContentComponent(_ref) {
|
|
|
53
54
|
isNew = dateState.isNew,
|
|
54
55
|
focusDateInput = dateState.focusDateInput;
|
|
55
56
|
var element = (0, _utils.findDomRefAtPos)(showDatePickerAt, domAtPos);
|
|
57
|
+
|
|
58
|
+
// Resolves ED-23702 for when the date is wrapped in an inline comment
|
|
59
|
+
var dateNode = element !== null && element !== void 0 && element.classList.contains(_styles.DateSharedCssClassName.DATE_CONTAINER) ? element : element === null || element === void 0 ? void 0 : element.querySelector(".".concat(_styles.DateSharedCssClassName.DATE_CONTAINER));
|
|
56
60
|
return /*#__PURE__*/_react.default.createElement(DatePicker, {
|
|
57
61
|
mountTo: popupsMountPoint,
|
|
58
62
|
boundariesElement: popupsBoundariesElement,
|
|
59
63
|
scrollableElement: popupsScrollableElement,
|
|
60
64
|
key: showDatePickerAt,
|
|
61
|
-
element: element,
|
|
65
|
+
element: dateNode || element,
|
|
62
66
|
isNew: isNew,
|
|
63
67
|
autoFocus: focusDateInput,
|
|
64
68
|
onDelete: function onDelete() {
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -5,6 +5,7 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } f
|
|
|
5
5
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
6
6
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
7
7
|
import { IconDate } from '@atlaskit/editor-common/quick-insert';
|
|
8
|
+
import { DateSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
8
9
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
9
10
|
import { closeDatePicker, closeDatePickerWithAnalytics, createDate } from './actions';
|
|
10
11
|
import { deleteDateCommand, insertDateCommand } from './commands';
|
|
@@ -41,12 +42,15 @@ function ContentComponent({
|
|
|
41
42
|
focusDateInput
|
|
42
43
|
} = dateState;
|
|
43
44
|
const element = findDomRefAtPos(showDatePickerAt, domAtPos);
|
|
45
|
+
|
|
46
|
+
// Resolves ED-23702 for when the date is wrapped in an inline comment
|
|
47
|
+
const dateNode = element !== null && element !== void 0 && element.classList.contains(DateSharedCssClassName.DATE_CONTAINER) ? element : element === null || element === void 0 ? void 0 : element.querySelector(`.${DateSharedCssClassName.DATE_CONTAINER}`);
|
|
44
48
|
return /*#__PURE__*/React.createElement(DatePicker, {
|
|
45
49
|
mountTo: popupsMountPoint,
|
|
46
50
|
boundariesElement: popupsBoundariesElement,
|
|
47
51
|
scrollableElement: popupsScrollableElement,
|
|
48
52
|
key: showDatePickerAt,
|
|
49
|
-
element: element,
|
|
53
|
+
element: dateNode || element,
|
|
50
54
|
isNew: isNew,
|
|
51
55
|
autoFocus: focusDateInput,
|
|
52
56
|
onDelete: () => {
|
package/dist/esm/plugin.js
CHANGED
|
@@ -5,6 +5,7 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } f
|
|
|
5
5
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
6
6
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
7
7
|
import { IconDate } from '@atlaskit/editor-common/quick-insert';
|
|
8
|
+
import { DateSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
8
9
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
9
10
|
import { closeDatePicker as _closeDatePicker, closeDatePickerWithAnalytics as _closeDatePickerWithAnalytics, createDate } from './actions';
|
|
10
11
|
import { deleteDateCommand, insertDateCommand } from './commands';
|
|
@@ -41,12 +42,15 @@ function ContentComponent(_ref) {
|
|
|
41
42
|
isNew = dateState.isNew,
|
|
42
43
|
focusDateInput = dateState.focusDateInput;
|
|
43
44
|
var element = findDomRefAtPos(showDatePickerAt, domAtPos);
|
|
45
|
+
|
|
46
|
+
// Resolves ED-23702 for when the date is wrapped in an inline comment
|
|
47
|
+
var dateNode = element !== null && element !== void 0 && element.classList.contains(DateSharedCssClassName.DATE_CONTAINER) ? element : element === null || element === void 0 ? void 0 : element.querySelector(".".concat(DateSharedCssClassName.DATE_CONTAINER));
|
|
44
48
|
return /*#__PURE__*/React.createElement(DatePicker, {
|
|
45
49
|
mountTo: popupsMountPoint,
|
|
46
50
|
boundariesElement: popupsBoundariesElement,
|
|
47
51
|
scrollableElement: popupsScrollableElement,
|
|
48
52
|
key: showDatePickerAt,
|
|
49
|
-
element: element,
|
|
53
|
+
element: dateNode || element,
|
|
50
54
|
isNew: isNew,
|
|
51
55
|
autoFocus: focusDateInput,
|
|
52
56
|
onDelete: function onDelete() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-date",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Date plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,19 +32,19 @@
|
|
|
32
32
|
".": "./src/index.ts"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@atlaskit/adf-schema": "^
|
|
36
|
-
"@atlaskit/calendar": "^14.
|
|
35
|
+
"@atlaskit/adf-schema": "^37.0.0",
|
|
36
|
+
"@atlaskit/calendar": "^14.3.0",
|
|
37
37
|
"@atlaskit/date": "^0.10.0",
|
|
38
|
-
"@atlaskit/editor-common": "^82.
|
|
39
|
-
"@atlaskit/editor-plugin-analytics": "^1.
|
|
38
|
+
"@atlaskit/editor-common": "^82.12.0",
|
|
39
|
+
"@atlaskit/editor-plugin-analytics": "^1.3.0",
|
|
40
40
|
"@atlaskit/editor-plugin-editor-disabled": "^1.1.0",
|
|
41
41
|
"@atlaskit/editor-prosemirror": "4.0.1",
|
|
42
42
|
"@atlaskit/editor-shared-styles": "^2.12.0",
|
|
43
|
-
"@atlaskit/form": "^10.
|
|
43
|
+
"@atlaskit/form": "^10.4.0",
|
|
44
44
|
"@atlaskit/locale": "^2.7.0",
|
|
45
45
|
"@atlaskit/textfield": "6.4.0",
|
|
46
|
-
"@atlaskit/theme": "^12.
|
|
47
|
-
"@atlaskit/tokens": "^1.
|
|
46
|
+
"@atlaskit/theme": "^12.11.0",
|
|
47
|
+
"@atlaskit/tokens": "^1.53.0",
|
|
48
48
|
"@babel/runtime": "^7.0.0",
|
|
49
49
|
"@emotion/react": "^11.7.1",
|
|
50
50
|
"date-fns": "^2.17.0",
|
|
@@ -54,15 +54,15 @@
|
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@atlaskit/editor-plugin-composition": "^1.1.0",
|
|
57
|
-
"@atlaskit/editor-plugin-content-insertion": "^1.
|
|
57
|
+
"@atlaskit/editor-plugin-content-insertion": "^1.3.0",
|
|
58
58
|
"@atlaskit/editor-plugin-decorations": "^1.1.0",
|
|
59
59
|
"@atlaskit/editor-plugin-feature-flags": "^1.1.0",
|
|
60
60
|
"@atlaskit/editor-plugin-guideline": "^1.1.0",
|
|
61
61
|
"@atlaskit/editor-plugin-quick-insert": "^1.1.0",
|
|
62
62
|
"@atlaskit/editor-plugin-selection": "^1.2.0",
|
|
63
|
-
"@atlaskit/editor-plugin-table": "^7.
|
|
64
|
-
"@atlaskit/editor-plugin-tasks-and-decisions": "^1.
|
|
65
|
-
"@atlaskit/editor-plugin-type-ahead": "^1.
|
|
63
|
+
"@atlaskit/editor-plugin-table": "^7.18.0",
|
|
64
|
+
"@atlaskit/editor-plugin-tasks-and-decisions": "^1.4.0",
|
|
65
|
+
"@atlaskit/editor-plugin-type-ahead": "^1.3.0",
|
|
66
66
|
"@atlaskit/editor-plugin-width": "^1.1.0",
|
|
67
67
|
"@testing-library/react": "^12.1.5"
|
|
68
68
|
},
|