@atlaskit/editor-plugin-date 0.2.10 → 0.2.11
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 +6 -0
- package/dist/cjs/ui/DatePicker/date-picker-input.js +3 -4
- package/dist/cjs/ui/DatePicker/index.js +4 -5
- package/dist/es2019/ui/DatePicker/date-picker-input.js +4 -5
- package/dist/es2019/ui/DatePicker/index.js +5 -6
- package/dist/esm/ui/DatePicker/date-picker-input.js +4 -5
- package/dist/esm/ui/DatePicker/index.js +5 -6
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-date
|
|
2
2
|
|
|
3
|
+
## 0.2.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#58763](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/58763) [`0fdbd64522bf`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0fdbd64522bf) - update ADF schema
|
|
8
|
+
|
|
3
9
|
## 0.2.10
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -22,7 +22,6 @@ 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 */
|
|
26
25
|
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); }; }
|
|
27
26
|
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; } }
|
|
28
27
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
@@ -208,9 +207,9 @@ var DatePickerInput = /*#__PURE__*/function (_React$Component) {
|
|
|
208
207
|
|
|
209
208
|
// Don't display an error for an empty input.
|
|
210
209
|
var displayError = (attemptedDateParse === null || !possiblyValid) && inputText !== '';
|
|
211
|
-
return
|
|
210
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
212
211
|
css: dateTextFieldWrapper
|
|
213
|
-
},
|
|
212
|
+
}, /*#__PURE__*/_react.default.createElement(_textfield.default, {
|
|
214
213
|
name: "datetextfield",
|
|
215
214
|
value: inputText,
|
|
216
215
|
ref: this.handleInputRef,
|
|
@@ -220,7 +219,7 @@ var DatePickerInput = /*#__PURE__*/function (_React$Component) {
|
|
|
220
219
|
spellCheck: false,
|
|
221
220
|
autoComplete: "off",
|
|
222
221
|
isInvalid: displayError
|
|
223
|
-
}), displayError &&
|
|
222
|
+
}), displayError && /*#__PURE__*/_react.default.createElement(_form.ErrorMessage, null, formatMessage(messages.invalidDateError)));
|
|
224
223
|
}
|
|
225
224
|
}, {
|
|
226
225
|
key: "componentDidUpdate",
|
|
@@ -26,7 +26,6 @@ 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 */
|
|
30
29
|
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); }; }
|
|
31
30
|
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; } }
|
|
32
31
|
var PopupWithListeners = (0, _ui.withOuterListeners)(_ui.Popup);
|
|
@@ -127,7 +126,7 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
127
126
|
if (!timestamp) {
|
|
128
127
|
return null;
|
|
129
128
|
}
|
|
130
|
-
return
|
|
129
|
+
return /*#__PURE__*/_react.default.createElement(PopupWithListeners, {
|
|
131
130
|
target: element,
|
|
132
131
|
offset: [0, 8],
|
|
133
132
|
fitHeight: 327,
|
|
@@ -139,9 +138,9 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
139
138
|
boundariesElement: boundariesElement,
|
|
140
139
|
scrollableElement: scrollableElement,
|
|
141
140
|
ariaLabel: null
|
|
142
|
-
},
|
|
141
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
143
142
|
css: popupContentWrapper
|
|
144
|
-
},
|
|
143
|
+
}, /*#__PURE__*/_react.default.createElement(_datePickerInput.default, {
|
|
145
144
|
date: date,
|
|
146
145
|
onNewDate: this.handleNewDate,
|
|
147
146
|
onSubmitDate: this.handleKeyboardSubmitDate,
|
|
@@ -150,7 +149,7 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
150
149
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
151
150
|
autoFocus: autoFocus,
|
|
152
151
|
autoSelectAll: isNew
|
|
153
|
-
}),
|
|
152
|
+
}), /*#__PURE__*/_react.default.createElement(_calendar.default, {
|
|
154
153
|
onChange: this.handleOnChange,
|
|
155
154
|
onSelect: function onSelect(date) {
|
|
156
155
|
return _onSelect(date, _analytics.INPUT_METHOD.PICKER);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
/** @jsx jsx */
|
|
3
2
|
import React from 'react';
|
|
4
|
-
import { css
|
|
3
|
+
import { css } from '@emotion/react';
|
|
5
4
|
import { defineMessages, injectIntl } from 'react-intl-next';
|
|
6
5
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
7
6
|
import { ErrorMessage } from '@atlaskit/form';
|
|
@@ -202,9 +201,9 @@ class DatePickerInput extends React.Component {
|
|
|
202
201
|
|
|
203
202
|
// Don't display an error for an empty input.
|
|
204
203
|
const displayError = (attemptedDateParse === null || !possiblyValid) && inputText !== '';
|
|
205
|
-
return
|
|
204
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
206
205
|
css: dateTextFieldWrapper
|
|
207
|
-
},
|
|
206
|
+
}, /*#__PURE__*/React.createElement(TextField, {
|
|
208
207
|
name: "datetextfield",
|
|
209
208
|
value: inputText,
|
|
210
209
|
ref: this.handleInputRef,
|
|
@@ -214,7 +213,7 @@ class DatePickerInput extends React.Component {
|
|
|
214
213
|
spellCheck: false,
|
|
215
214
|
autoComplete: "off",
|
|
216
215
|
isInvalid: displayError
|
|
217
|
-
}), displayError &&
|
|
216
|
+
}), displayError && /*#__PURE__*/React.createElement(ErrorMessage, null, formatMessage(messages.invalidDateError)));
|
|
218
217
|
}
|
|
219
218
|
componentDidUpdate() {
|
|
220
219
|
const setInputSelectionPos = this.setInputSelectionPos;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
/** @jsx jsx */
|
|
3
2
|
import React from 'react';
|
|
4
|
-
import { css
|
|
3
|
+
import { css } from '@emotion/react';
|
|
5
4
|
import ReactDOM from 'react-dom';
|
|
6
5
|
import { injectIntl } from 'react-intl-next';
|
|
7
6
|
import Calendar from '@atlaskit/calendar';
|
|
@@ -115,7 +114,7 @@ class DatePicker extends React.Component {
|
|
|
115
114
|
if (!timestamp) {
|
|
116
115
|
return null;
|
|
117
116
|
}
|
|
118
|
-
return
|
|
117
|
+
return /*#__PURE__*/React.createElement(PopupWithListeners, {
|
|
119
118
|
target: element,
|
|
120
119
|
offset: [0, 8],
|
|
121
120
|
fitHeight: 327,
|
|
@@ -127,9 +126,9 @@ class DatePicker extends React.Component {
|
|
|
127
126
|
boundariesElement: boundariesElement,
|
|
128
127
|
scrollableElement: scrollableElement,
|
|
129
128
|
ariaLabel: null
|
|
130
|
-
},
|
|
129
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
131
130
|
css: popupContentWrapper
|
|
132
|
-
},
|
|
131
|
+
}, /*#__PURE__*/React.createElement(DatePickerInput, {
|
|
133
132
|
date: date,
|
|
134
133
|
onNewDate: this.handleNewDate,
|
|
135
134
|
onSubmitDate: this.handleKeyboardSubmitDate,
|
|
@@ -138,7 +137,7 @@ class DatePicker extends React.Component {
|
|
|
138
137
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
139
138
|
autoFocus: autoFocus,
|
|
140
139
|
autoSelectAll: isNew
|
|
141
|
-
}),
|
|
140
|
+
}), /*#__PURE__*/React.createElement(Calendar, {
|
|
142
141
|
onChange: this.handleOnChange,
|
|
143
142
|
onSelect: date => onSelect(date, INPUT_METHOD.PICKER),
|
|
144
143
|
day: day,
|
|
@@ -9,9 +9,8 @@ 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 */
|
|
13
12
|
import React from 'react';
|
|
14
|
-
import { css
|
|
13
|
+
import { css } from '@emotion/react';
|
|
15
14
|
import { defineMessages, injectIntl } from 'react-intl-next';
|
|
16
15
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
17
16
|
import { ErrorMessage } from '@atlaskit/form';
|
|
@@ -202,9 +201,9 @@ var DatePickerInput = /*#__PURE__*/function (_React$Component) {
|
|
|
202
201
|
|
|
203
202
|
// Don't display an error for an empty input.
|
|
204
203
|
var displayError = (attemptedDateParse === null || !possiblyValid) && inputText !== '';
|
|
205
|
-
return
|
|
204
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
206
205
|
css: dateTextFieldWrapper
|
|
207
|
-
},
|
|
206
|
+
}, /*#__PURE__*/React.createElement(TextField, {
|
|
208
207
|
name: "datetextfield",
|
|
209
208
|
value: inputText,
|
|
210
209
|
ref: this.handleInputRef,
|
|
@@ -214,7 +213,7 @@ var DatePickerInput = /*#__PURE__*/function (_React$Component) {
|
|
|
214
213
|
spellCheck: false,
|
|
215
214
|
autoComplete: "off",
|
|
216
215
|
isInvalid: displayError
|
|
217
|
-
}), displayError &&
|
|
216
|
+
}), displayError && /*#__PURE__*/React.createElement(ErrorMessage, null, formatMessage(messages.invalidDateError)));
|
|
218
217
|
}
|
|
219
218
|
}, {
|
|
220
219
|
key: "componentDidUpdate",
|
|
@@ -9,9 +9,8 @@ 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 */
|
|
13
12
|
import React from 'react';
|
|
14
|
-
import { css
|
|
13
|
+
import { css } from '@emotion/react';
|
|
15
14
|
import ReactDOM from 'react-dom';
|
|
16
15
|
import { injectIntl } from 'react-intl-next';
|
|
17
16
|
import Calendar from '@atlaskit/calendar';
|
|
@@ -121,7 +120,7 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
121
120
|
if (!timestamp) {
|
|
122
121
|
return null;
|
|
123
122
|
}
|
|
124
|
-
return
|
|
123
|
+
return /*#__PURE__*/React.createElement(PopupWithListeners, {
|
|
125
124
|
target: element,
|
|
126
125
|
offset: [0, 8],
|
|
127
126
|
fitHeight: 327,
|
|
@@ -133,9 +132,9 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
133
132
|
boundariesElement: boundariesElement,
|
|
134
133
|
scrollableElement: scrollableElement,
|
|
135
134
|
ariaLabel: null
|
|
136
|
-
},
|
|
135
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
137
136
|
css: popupContentWrapper
|
|
138
|
-
},
|
|
137
|
+
}, /*#__PURE__*/React.createElement(DatePickerInput, {
|
|
139
138
|
date: date,
|
|
140
139
|
onNewDate: this.handleNewDate,
|
|
141
140
|
onSubmitDate: this.handleKeyboardSubmitDate,
|
|
@@ -144,7 +143,7 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
144
143
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
145
144
|
autoFocus: autoFocus,
|
|
146
145
|
autoSelectAll: isNew
|
|
147
|
-
}),
|
|
146
|
+
}), /*#__PURE__*/React.createElement(Calendar, {
|
|
148
147
|
onChange: this.handleOnChange,
|
|
149
148
|
onSelect: function onSelect(date) {
|
|
150
149
|
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.11",
|
|
4
4
|
"description": "Date plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
".": "./src/index.ts"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@atlaskit/adf-schema": "^
|
|
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.
|
|
37
|
+
"@atlaskit/editor-common": "^76.24.0",
|
|
38
38
|
"@atlaskit/editor-plugin-analytics": "^0.3.0",
|
|
39
39
|
"@atlaskit/editor-plugin-editor-disabled": "^0.2.0",
|
|
40
40
|
"@atlaskit/editor-prosemirror": "1.1.0",
|