@atlaskit/editor-plugin-date 0.2.11 → 0.2.13
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 +12 -0
- package/dist/cjs/ui/DatePicker/date-picker-input.js +4 -3
- package/dist/cjs/ui/DatePicker/index.js +5 -4
- package/dist/es2019/ui/DatePicker/date-picker-input.js +5 -4
- package/dist/es2019/ui/DatePicker/index.js +6 -5
- package/dist/esm/ui/DatePicker/date-picker-input.js +5 -4
- package/dist/esm/ui/DatePicker/index.js +6 -5
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-date
|
|
2
2
|
|
|
3
|
+
## 0.2.13
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 0.2.12
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#59147](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/59147) [`f12e489f23b0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f12e489f23b0) - Re-build and deploy packages to NPM to resolve React/Compiled not found error (HOT-106483).
|
|
14
|
+
|
|
3
15
|
## 0.2.11
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -22,6 +22,7 @@ var _textfield = _interopRequireDefault(require("@atlaskit/textfield"));
|
|
|
22
22
|
var _formatParse = require("../../utils/formatParse");
|
|
23
23
|
var _internal = require("../../utils/internal");
|
|
24
24
|
var _templateObject;
|
|
25
|
+
/** @jsx jsx */
|
|
25
26
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
26
27
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
27
28
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
@@ -207,9 +208,9 @@ var DatePickerInput = /*#__PURE__*/function (_React$Component) {
|
|
|
207
208
|
|
|
208
209
|
// Don't display an error for an empty input.
|
|
209
210
|
var displayError = (attemptedDateParse === null || !possiblyValid) && inputText !== '';
|
|
210
|
-
return
|
|
211
|
+
return (0, _react2.jsx)("div", {
|
|
211
212
|
css: dateTextFieldWrapper
|
|
212
|
-
},
|
|
213
|
+
}, (0, _react2.jsx)(_textfield.default, {
|
|
213
214
|
name: "datetextfield",
|
|
214
215
|
value: inputText,
|
|
215
216
|
ref: this.handleInputRef,
|
|
@@ -219,7 +220,7 @@ var DatePickerInput = /*#__PURE__*/function (_React$Component) {
|
|
|
219
220
|
spellCheck: false,
|
|
220
221
|
autoComplete: "off",
|
|
221
222
|
isInvalid: displayError
|
|
222
|
-
}), displayError &&
|
|
223
|
+
}), displayError && (0, _react2.jsx)(_form.ErrorMessage, null, formatMessage(messages.invalidDateError)));
|
|
223
224
|
}
|
|
224
225
|
}, {
|
|
225
226
|
key: "componentDidUpdate",
|
|
@@ -26,6 +26,7 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
26
26
|
var _constants = require("@atlaskit/theme/constants");
|
|
27
27
|
var _datePickerInput = _interopRequireDefault(require("./date-picker-input"));
|
|
28
28
|
var _templateObject;
|
|
29
|
+
/** @jsx jsx */
|
|
29
30
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
30
31
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
31
32
|
var PopupWithListeners = (0, _ui.withOuterListeners)(_ui.Popup);
|
|
@@ -126,7 +127,7 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
126
127
|
if (!timestamp) {
|
|
127
128
|
return null;
|
|
128
129
|
}
|
|
129
|
-
return
|
|
130
|
+
return (0, _react2.jsx)(PopupWithListeners, {
|
|
130
131
|
target: element,
|
|
131
132
|
offset: [0, 8],
|
|
132
133
|
fitHeight: 327,
|
|
@@ -138,9 +139,9 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
138
139
|
boundariesElement: boundariesElement,
|
|
139
140
|
scrollableElement: scrollableElement,
|
|
140
141
|
ariaLabel: null
|
|
141
|
-
},
|
|
142
|
+
}, (0, _react2.jsx)("div", {
|
|
142
143
|
css: popupContentWrapper
|
|
143
|
-
},
|
|
144
|
+
}, (0, _react2.jsx)(_datePickerInput.default, {
|
|
144
145
|
date: date,
|
|
145
146
|
onNewDate: this.handleNewDate,
|
|
146
147
|
onSubmitDate: this.handleKeyboardSubmitDate,
|
|
@@ -149,7 +150,7 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
149
150
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
150
151
|
autoFocus: autoFocus,
|
|
151
152
|
autoSelectAll: isNew
|
|
152
|
-
}),
|
|
153
|
+
}), (0, _react2.jsx)(_calendar.default, {
|
|
153
154
|
onChange: this.handleOnChange,
|
|
154
155
|
onSelect: function onSelect(date) {
|
|
155
156
|
return _onSelect(date, _analytics.INPUT_METHOD.PICKER);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
/** @jsx jsx */
|
|
2
3
|
import React from 'react';
|
|
3
|
-
import { css } from '@emotion/react';
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
4
5
|
import { defineMessages, injectIntl } from 'react-intl-next';
|
|
5
6
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
6
7
|
import { ErrorMessage } from '@atlaskit/form';
|
|
@@ -201,9 +202,9 @@ class DatePickerInput extends React.Component {
|
|
|
201
202
|
|
|
202
203
|
// Don't display an error for an empty input.
|
|
203
204
|
const displayError = (attemptedDateParse === null || !possiblyValid) && inputText !== '';
|
|
204
|
-
return
|
|
205
|
+
return jsx("div", {
|
|
205
206
|
css: dateTextFieldWrapper
|
|
206
|
-
},
|
|
207
|
+
}, jsx(TextField, {
|
|
207
208
|
name: "datetextfield",
|
|
208
209
|
value: inputText,
|
|
209
210
|
ref: this.handleInputRef,
|
|
@@ -213,7 +214,7 @@ class DatePickerInput extends React.Component {
|
|
|
213
214
|
spellCheck: false,
|
|
214
215
|
autoComplete: "off",
|
|
215
216
|
isInvalid: displayError
|
|
216
|
-
}), displayError &&
|
|
217
|
+
}), displayError && jsx(ErrorMessage, null, formatMessage(messages.invalidDateError)));
|
|
217
218
|
}
|
|
218
219
|
componentDidUpdate() {
|
|
219
220
|
const setInputSelectionPos = this.setInputSelectionPos;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
/** @jsx jsx */
|
|
2
3
|
import React from 'react';
|
|
3
|
-
import { css } from '@emotion/react';
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
4
5
|
import ReactDOM from 'react-dom';
|
|
5
6
|
import { injectIntl } from 'react-intl-next';
|
|
6
7
|
import Calendar from '@atlaskit/calendar';
|
|
@@ -114,7 +115,7 @@ class DatePicker extends React.Component {
|
|
|
114
115
|
if (!timestamp) {
|
|
115
116
|
return null;
|
|
116
117
|
}
|
|
117
|
-
return
|
|
118
|
+
return jsx(PopupWithListeners, {
|
|
118
119
|
target: element,
|
|
119
120
|
offset: [0, 8],
|
|
120
121
|
fitHeight: 327,
|
|
@@ -126,9 +127,9 @@ class DatePicker extends React.Component {
|
|
|
126
127
|
boundariesElement: boundariesElement,
|
|
127
128
|
scrollableElement: scrollableElement,
|
|
128
129
|
ariaLabel: null
|
|
129
|
-
},
|
|
130
|
+
}, jsx("div", {
|
|
130
131
|
css: popupContentWrapper
|
|
131
|
-
},
|
|
132
|
+
}, jsx(DatePickerInput, {
|
|
132
133
|
date: date,
|
|
133
134
|
onNewDate: this.handleNewDate,
|
|
134
135
|
onSubmitDate: this.handleKeyboardSubmitDate,
|
|
@@ -137,7 +138,7 @@ class DatePicker extends React.Component {
|
|
|
137
138
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
138
139
|
autoFocus: autoFocus,
|
|
139
140
|
autoSelectAll: isNew
|
|
140
|
-
}),
|
|
141
|
+
}), jsx(Calendar, {
|
|
141
142
|
onChange: this.handleOnChange,
|
|
142
143
|
onSelect: date => onSelect(date, INPUT_METHOD.PICKER),
|
|
143
144
|
day: day,
|
|
@@ -9,8 +9,9 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
9
9
|
var _templateObject;
|
|
10
10
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11
11
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
12
|
+
/** @jsx jsx */
|
|
12
13
|
import React from 'react';
|
|
13
|
-
import { css } from '@emotion/react';
|
|
14
|
+
import { css, jsx } from '@emotion/react';
|
|
14
15
|
import { defineMessages, injectIntl } from 'react-intl-next';
|
|
15
16
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
16
17
|
import { ErrorMessage } from '@atlaskit/form';
|
|
@@ -201,9 +202,9 @@ var DatePickerInput = /*#__PURE__*/function (_React$Component) {
|
|
|
201
202
|
|
|
202
203
|
// Don't display an error for an empty input.
|
|
203
204
|
var displayError = (attemptedDateParse === null || !possiblyValid) && inputText !== '';
|
|
204
|
-
return
|
|
205
|
+
return jsx("div", {
|
|
205
206
|
css: dateTextFieldWrapper
|
|
206
|
-
},
|
|
207
|
+
}, jsx(TextField, {
|
|
207
208
|
name: "datetextfield",
|
|
208
209
|
value: inputText,
|
|
209
210
|
ref: this.handleInputRef,
|
|
@@ -213,7 +214,7 @@ var DatePickerInput = /*#__PURE__*/function (_React$Component) {
|
|
|
213
214
|
spellCheck: false,
|
|
214
215
|
autoComplete: "off",
|
|
215
216
|
isInvalid: displayError
|
|
216
|
-
}), displayError &&
|
|
217
|
+
}), displayError && jsx(ErrorMessage, null, formatMessage(messages.invalidDateError)));
|
|
217
218
|
}
|
|
218
219
|
}, {
|
|
219
220
|
key: "componentDidUpdate",
|
|
@@ -9,8 +9,9 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
9
9
|
var _templateObject;
|
|
10
10
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11
11
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
12
|
+
/** @jsx jsx */
|
|
12
13
|
import React from 'react';
|
|
13
|
-
import { css } from '@emotion/react';
|
|
14
|
+
import { css, jsx } from '@emotion/react';
|
|
14
15
|
import ReactDOM from 'react-dom';
|
|
15
16
|
import { injectIntl } from 'react-intl-next';
|
|
16
17
|
import Calendar from '@atlaskit/calendar';
|
|
@@ -120,7 +121,7 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
120
121
|
if (!timestamp) {
|
|
121
122
|
return null;
|
|
122
123
|
}
|
|
123
|
-
return
|
|
124
|
+
return jsx(PopupWithListeners, {
|
|
124
125
|
target: element,
|
|
125
126
|
offset: [0, 8],
|
|
126
127
|
fitHeight: 327,
|
|
@@ -132,9 +133,9 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
132
133
|
boundariesElement: boundariesElement,
|
|
133
134
|
scrollableElement: scrollableElement,
|
|
134
135
|
ariaLabel: null
|
|
135
|
-
},
|
|
136
|
+
}, jsx("div", {
|
|
136
137
|
css: popupContentWrapper
|
|
137
|
-
},
|
|
138
|
+
}, jsx(DatePickerInput, {
|
|
138
139
|
date: date,
|
|
139
140
|
onNewDate: this.handleNewDate,
|
|
140
141
|
onSubmitDate: this.handleKeyboardSubmitDate,
|
|
@@ -143,7 +144,7 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
143
144
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
144
145
|
autoFocus: autoFocus,
|
|
145
146
|
autoSelectAll: isNew
|
|
146
|
-
}),
|
|
147
|
+
}), jsx(Calendar, {
|
|
147
148
|
onChange: this.handleOnChange,
|
|
148
149
|
onSelect: function onSelect(date) {
|
|
149
150
|
return _onSelect(date, INPUT_METHOD.PICKER);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-date",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.13",
|
|
4
4
|
"description": "Date plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"@atlaskit/adf-schema": "^35.0.0",
|
|
35
35
|
"@atlaskit/calendar": "^14.0.0",
|
|
36
36
|
"@atlaskit/date": "^0.10.0",
|
|
37
|
-
"@atlaskit/editor-common": "^76.
|
|
38
|
-
"@atlaskit/editor-plugin-analytics": "^0.
|
|
37
|
+
"@atlaskit/editor-common": "^76.26.0",
|
|
38
|
+
"@atlaskit/editor-plugin-analytics": "^0.4.0",
|
|
39
39
|
"@atlaskit/editor-plugin-editor-disabled": "^0.2.0",
|
|
40
40
|
"@atlaskit/editor-prosemirror": "1.1.0",
|
|
41
41
|
"@atlaskit/editor-shared-styles": "^2.8.0",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@atlaskit/editor-plugin-selection": "^0.1.0",
|
|
62
62
|
"@atlaskit/editor-plugin-table": "^5.4.0",
|
|
63
63
|
"@atlaskit/editor-plugin-tasks-and-decisions": "^0.2.0",
|
|
64
|
-
"@atlaskit/editor-plugin-type-ahead": "^0.
|
|
64
|
+
"@atlaskit/editor-plugin-type-ahead": "^0.8.0",
|
|
65
65
|
"@atlaskit/editor-plugin-width": "^0.2.0",
|
|
66
66
|
"@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
|
|
67
67
|
"@testing-library/react": "^12.1.5"
|