@atlaskit/datetime-picker 12.8.0 → 12.8.1
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/components/date-picker.js +8 -7
- package/dist/cjs/components/date-time-picker.js +7 -7
- package/dist/cjs/components/time-picker.js +8 -9
- package/dist/cjs/internal/fixed-layer.js +2 -2
- package/dist/cjs/internal/index.js +3 -2
- package/dist/es2019/components/date-picker.js +5 -6
- package/dist/es2019/components/date-time-picker.js +5 -7
- package/dist/es2019/components/time-picker.js +5 -5
- package/dist/es2019/internal/index.js +3 -2
- package/dist/esm/components/date-picker.js +7 -8
- package/dist/esm/components/date-time-picker.js +7 -9
- package/dist/esm/components/time-picker.js +7 -7
- package/dist/esm/internal/fixed-layer.js +2 -2
- package/dist/esm/internal/index.js +3 -2
- package/dist/types/components/date-time-picker.d.ts +0 -2
- package/dist/types/internal/index.d.ts +3 -0
- package/dist/types-ts4.5/components/date-time-picker.d.ts +0 -2
- package/dist/types-ts4.5/internal/index.d.ts +3 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -33,15 +33,12 @@ var _singleValue = require("../internal/single-value");
|
|
|
33
33
|
var _utils = require("./utils");
|
|
34
34
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
35
35
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
36
|
-
function ownKeys(
|
|
37
|
-
function _objectSpread(
|
|
36
|
+
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; }
|
|
37
|
+
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; }
|
|
38
38
|
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); }; }
|
|
39
|
-
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; } }
|
|
39
|
+
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; } } /** @jsx jsx */
|
|
40
40
|
var packageName = "@atlaskit/datetime-picker";
|
|
41
|
-
var packageVersion = "12.8.
|
|
42
|
-
|
|
43
|
-
/* eslint-disable react/no-unused-prop-types */
|
|
44
|
-
|
|
41
|
+
var packageVersion = "12.8.1";
|
|
45
42
|
function getValidDate(iso) {
|
|
46
43
|
var date = (0, _dateFns.parseISO)(iso);
|
|
47
44
|
return (0, _dateFns.isValid)(date) ? {
|
|
@@ -103,9 +100,13 @@ var datePickerDefaultProps = {
|
|
|
103
100
|
isDisabled: false,
|
|
104
101
|
isInvalid: false,
|
|
105
102
|
name: '',
|
|
103
|
+
// These disables are here for proper typing when used as defaults. They
|
|
104
|
+
// should *not* use the `noop` function.
|
|
105
|
+
/* eslint-disable @repo/internal/react/use-noop */
|
|
106
106
|
onBlur: function onBlur(event) {},
|
|
107
107
|
onChange: function onChange(value) {},
|
|
108
108
|
onFocus: function onFocus(event) {},
|
|
109
|
+
/* eslint-enable @repo/internal/react/use-noop */
|
|
109
110
|
selectProps: {},
|
|
110
111
|
spacing: 'default',
|
|
111
112
|
locale: 'en-US'
|
|
@@ -28,13 +28,10 @@ var _timePicker = _interopRequireDefault(require("./time-picker"));
|
|
|
28
28
|
var _utils = require("./utils");
|
|
29
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); }; }
|
|
30
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; } }
|
|
31
|
-
function ownKeys(
|
|
32
|
-
function _objectSpread(
|
|
31
|
+
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; }
|
|
32
|
+
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; } /** @jsx jsx */
|
|
33
33
|
var packageName = "@atlaskit/datetime-picker";
|
|
34
|
-
var packageVersion = "12.8.
|
|
35
|
-
|
|
36
|
-
/* eslint-disable react/no-unused-prop-types */
|
|
37
|
-
|
|
34
|
+
var packageVersion = "12.8.1";
|
|
38
35
|
var isInvalidBorderStyles = (0, _react2.css)({
|
|
39
36
|
borderColor: "var(--ds-border-danger, ".concat(_colors.R400, ")")
|
|
40
37
|
});
|
|
@@ -137,9 +134,13 @@ var dateTimePickerDefaultProps = {
|
|
|
137
134
|
autoFocus: false,
|
|
138
135
|
isDisabled: false,
|
|
139
136
|
name: '',
|
|
137
|
+
// These disables are here for proper typing when used as defaults. They
|
|
138
|
+
// should *not* use the `noop` function.
|
|
139
|
+
/* eslint-disable @repo/internal/react/use-noop */
|
|
140
140
|
onBlur: function onBlur(event) {},
|
|
141
141
|
onChange: function onChange(value) {},
|
|
142
142
|
onFocus: function onFocus(event) {},
|
|
143
|
+
/* eslint-enable @repo/internal/react/use-noop */
|
|
143
144
|
innerProps: {},
|
|
144
145
|
id: '',
|
|
145
146
|
defaultValue: '',
|
|
@@ -171,7 +172,6 @@ var DateTimePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
171
172
|
}
|
|
172
173
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
173
174
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", {
|
|
174
|
-
active: 0,
|
|
175
175
|
dateValue: '',
|
|
176
176
|
isFocused: false,
|
|
177
177
|
timeValue: '',
|
|
@@ -28,21 +28,16 @@ var _parseTime = _interopRequireDefault(require("../internal/parse-time"));
|
|
|
28
28
|
var _singleValue = require("../internal/single-value");
|
|
29
29
|
var _utils = require("./utils");
|
|
30
30
|
var _excluded = ["selectProps"],
|
|
31
|
-
_excluded2 = ["styles"];
|
|
32
|
-
/* eslint-disable @repo/internal/react/use-noop */
|
|
33
|
-
// eslint-disable-next-line no-restricted-imports
|
|
31
|
+
_excluded2 = ["styles"]; // eslint-disable-next-line no-restricted-imports
|
|
34
32
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
35
33
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
36
34
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
37
|
-
function ownKeys(
|
|
38
|
-
function _objectSpread(
|
|
35
|
+
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; }
|
|
36
|
+
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; }
|
|
39
37
|
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); }; }
|
|
40
38
|
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; } }
|
|
41
39
|
var packageName = "@atlaskit/datetime-picker";
|
|
42
|
-
var packageVersion = "12.8.
|
|
43
|
-
|
|
44
|
-
/* eslint-disable react/no-unused-prop-types */
|
|
45
|
-
|
|
40
|
+
var packageVersion = "12.8.1";
|
|
46
41
|
var menuStyles = {
|
|
47
42
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
48
43
|
position: 'static',
|
|
@@ -74,9 +69,13 @@ var timePickerDefaultProps = {
|
|
|
74
69
|
isDisabled: false,
|
|
75
70
|
isInvalid: false,
|
|
76
71
|
name: '',
|
|
72
|
+
// These disables are here for proper typing when used as defaults. They
|
|
73
|
+
// should *not* use the `noop` function.
|
|
74
|
+
/* eslint-disable @repo/internal/react/use-noop */
|
|
77
75
|
onBlur: function onBlur(event) {},
|
|
78
76
|
onChange: function onChange(value) {},
|
|
79
77
|
onFocus: function onFocus(event) {},
|
|
78
|
+
/* eslint-enable @repo/internal/react/use-noop */
|
|
80
79
|
parseInputValue: function parseInputValue(time, timeFormat) {
|
|
81
80
|
return (0, _parseTime.default)(time);
|
|
82
81
|
},
|
|
@@ -19,8 +19,8 @@ var _icon = require("@atlaskit/icon");
|
|
|
19
19
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
20
|
var _popper = require("@atlaskit/popper");
|
|
21
21
|
var _constants = require("@atlaskit/theme/constants");
|
|
22
|
-
function ownKeys(
|
|
23
|
-
function _objectSpread(
|
|
22
|
+
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; }
|
|
23
|
+
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; }
|
|
24
24
|
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); }; }
|
|
25
25
|
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; } } // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
26
26
|
/**
|
|
@@ -7,8 +7,9 @@ exports.defaultTimes = exports.defaultTimeFormat = exports.defaultDateFormat = e
|
|
|
7
7
|
exports.formatDateTimeZoneIntoIso = formatDateTimeZoneIntoIso;
|
|
8
8
|
exports.padToTwo = padToTwo;
|
|
9
9
|
exports.placeholderDatetime = void 0;
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
/**
|
|
11
|
+
* This component is used to hide portions of Select component.
|
|
12
|
+
*/
|
|
12
13
|
var EmptyComponent = function EmptyComponent() {
|
|
13
14
|
return null;
|
|
14
15
|
};
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
-
/* eslint-disable @repo/internal/react/use-noop */
|
|
4
3
|
/** @jsx jsx */
|
|
5
4
|
import { Component } from 'react';
|
|
6
5
|
import { css, jsx } from '@emotion/react';
|
|
7
|
-
// eslint-disable-next-line no-restricted-imports
|
|
8
6
|
import { format, isValid, lastDayOfMonth, parseISO } from 'date-fns';
|
|
9
7
|
import pick from 'lodash/pick';
|
|
10
8
|
import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
@@ -20,10 +18,7 @@ import FixedLayer from '../internal/fixed-layer';
|
|
|
20
18
|
import { makeSingleValue } from '../internal/single-value';
|
|
21
19
|
import { convertTokens } from './utils';
|
|
22
20
|
const packageName = "@atlaskit/datetime-picker";
|
|
23
|
-
const packageVersion = "12.8.
|
|
24
|
-
|
|
25
|
-
/* eslint-disable react/no-unused-prop-types */
|
|
26
|
-
|
|
21
|
+
const packageVersion = "12.8.1";
|
|
27
22
|
function getValidDate(iso) {
|
|
28
23
|
const date = parseISO(iso);
|
|
29
24
|
return isValid(date) ? {
|
|
@@ -82,9 +77,13 @@ const datePickerDefaultProps = {
|
|
|
82
77
|
isDisabled: false,
|
|
83
78
|
isInvalid: false,
|
|
84
79
|
name: '',
|
|
80
|
+
// These disables are here for proper typing when used as defaults. They
|
|
81
|
+
// should *not* use the `noop` function.
|
|
82
|
+
/* eslint-disable @repo/internal/react/use-noop */
|
|
85
83
|
onBlur: event => {},
|
|
86
84
|
onChange: value => {},
|
|
87
85
|
onFocus: event => {},
|
|
86
|
+
/* eslint-enable @repo/internal/react/use-noop */
|
|
88
87
|
selectProps: {},
|
|
89
88
|
spacing: 'default',
|
|
90
89
|
locale: 'en-US'
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
-
/* eslint-disable @repo/internal/react/use-noop */
|
|
4
3
|
/** @jsx jsx */
|
|
5
4
|
import React from 'react';
|
|
6
5
|
import { css, jsx } from '@emotion/react';
|
|
7
|
-
// eslint-disable-next-line no-restricted-imports
|
|
8
6
|
import { format, isValid, parseISO } from 'date-fns';
|
|
9
7
|
import pick from 'lodash/pick';
|
|
10
8
|
import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
@@ -17,10 +15,7 @@ import DatePicker from './date-picker';
|
|
|
17
15
|
import TimePicker from './time-picker';
|
|
18
16
|
import { convertTokens } from './utils';
|
|
19
17
|
const packageName = "@atlaskit/datetime-picker";
|
|
20
|
-
const packageVersion = "12.8.
|
|
21
|
-
|
|
22
|
-
/* eslint-disable react/no-unused-prop-types */
|
|
23
|
-
|
|
18
|
+
const packageVersion = "12.8.1";
|
|
24
19
|
const isInvalidBorderStyles = css({
|
|
25
20
|
borderColor: `var(--ds-border-danger, ${R400})`
|
|
26
21
|
});
|
|
@@ -122,9 +117,13 @@ const dateTimePickerDefaultProps = {
|
|
|
122
117
|
autoFocus: false,
|
|
123
118
|
isDisabled: false,
|
|
124
119
|
name: '',
|
|
120
|
+
// These disables are here for proper typing when used as defaults. They
|
|
121
|
+
// should *not* use the `noop` function.
|
|
122
|
+
/* eslint-disable @repo/internal/react/use-noop */
|
|
125
123
|
onBlur: event => {},
|
|
126
124
|
onChange: value => {},
|
|
127
125
|
onFocus: event => {},
|
|
126
|
+
/* eslint-enable @repo/internal/react/use-noop */
|
|
128
127
|
innerProps: {},
|
|
129
128
|
id: '',
|
|
130
129
|
defaultValue: '',
|
|
@@ -147,7 +146,6 @@ class DateTimePicker extends React.Component {
|
|
|
147
146
|
constructor(...args) {
|
|
148
147
|
super(...args);
|
|
149
148
|
_defineProperty(this, "state", {
|
|
150
|
-
active: 0,
|
|
151
149
|
dateValue: '',
|
|
152
150
|
isFocused: false,
|
|
153
151
|
timeValue: '',
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
-
/* eslint-disable @repo/internal/react/use-noop */
|
|
4
3
|
import React from 'react';
|
|
5
4
|
|
|
6
5
|
// eslint-disable-next-line no-restricted-imports
|
|
@@ -17,10 +16,7 @@ import parseTime from '../internal/parse-time';
|
|
|
17
16
|
import { makeSingleValue } from '../internal/single-value';
|
|
18
17
|
import { convertTokens } from './utils';
|
|
19
18
|
const packageName = "@atlaskit/datetime-picker";
|
|
20
|
-
const packageVersion = "12.8.
|
|
21
|
-
|
|
22
|
-
/* eslint-disable react/no-unused-prop-types */
|
|
23
|
-
|
|
19
|
+
const packageVersion = "12.8.1";
|
|
24
20
|
const menuStyles = {
|
|
25
21
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
26
22
|
position: 'static',
|
|
@@ -51,9 +47,13 @@ const timePickerDefaultProps = {
|
|
|
51
47
|
isDisabled: false,
|
|
52
48
|
isInvalid: false,
|
|
53
49
|
name: '',
|
|
50
|
+
// These disables are here for proper typing when used as defaults. They
|
|
51
|
+
// should *not* use the `noop` function.
|
|
52
|
+
/* eslint-disable @repo/internal/react/use-noop */
|
|
54
53
|
onBlur: event => {},
|
|
55
54
|
onChange: value => {},
|
|
56
55
|
onFocus: event => {},
|
|
56
|
+
/* eslint-enable @repo/internal/react/use-noop */
|
|
57
57
|
parseInputValue: (time, timeFormat) => parseTime(time),
|
|
58
58
|
selectProps: {},
|
|
59
59
|
spacing: 'default',
|
|
@@ -7,15 +7,13 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
7
7
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
9
|
import _extends from "@babel/runtime/helpers/extends";
|
|
10
|
-
function ownKeys(
|
|
11
|
-
function _objectSpread(
|
|
10
|
+
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; }
|
|
11
|
+
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; }
|
|
12
12
|
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); }; }
|
|
13
13
|
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; } }
|
|
14
|
-
/* eslint-disable @repo/internal/react/use-noop */
|
|
15
14
|
/** @jsx jsx */
|
|
16
15
|
import { Component } from 'react';
|
|
17
16
|
import { css, jsx } from '@emotion/react';
|
|
18
|
-
// eslint-disable-next-line no-restricted-imports
|
|
19
17
|
import { format, isValid, lastDayOfMonth, parseISO } from 'date-fns';
|
|
20
18
|
import pick from 'lodash/pick';
|
|
21
19
|
import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
@@ -31,10 +29,7 @@ import FixedLayer from '../internal/fixed-layer';
|
|
|
31
29
|
import { makeSingleValue } from '../internal/single-value';
|
|
32
30
|
import { convertTokens } from './utils';
|
|
33
31
|
var packageName = "@atlaskit/datetime-picker";
|
|
34
|
-
var packageVersion = "12.8.
|
|
35
|
-
|
|
36
|
-
/* eslint-disable react/no-unused-prop-types */
|
|
37
|
-
|
|
32
|
+
var packageVersion = "12.8.1";
|
|
38
33
|
function getValidDate(iso) {
|
|
39
34
|
var date = parseISO(iso);
|
|
40
35
|
return isValid(date) ? {
|
|
@@ -96,9 +91,13 @@ var datePickerDefaultProps = {
|
|
|
96
91
|
isDisabled: false,
|
|
97
92
|
isInvalid: false,
|
|
98
93
|
name: '',
|
|
94
|
+
// These disables are here for proper typing when used as defaults. They
|
|
95
|
+
// should *not* use the `noop` function.
|
|
96
|
+
/* eslint-disable @repo/internal/react/use-noop */
|
|
99
97
|
onBlur: function onBlur(event) {},
|
|
100
98
|
onChange: function onChange(value) {},
|
|
101
99
|
onFocus: function onFocus(event) {},
|
|
100
|
+
/* eslint-enable @repo/internal/react/use-noop */
|
|
102
101
|
selectProps: {},
|
|
103
102
|
spacing: 'default',
|
|
104
103
|
locale: 'en-US'
|
|
@@ -8,13 +8,11 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
|
8
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
9
|
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); }; }
|
|
10
10
|
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; } }
|
|
11
|
-
function ownKeys(
|
|
12
|
-
function _objectSpread(
|
|
13
|
-
/* eslint-disable @repo/internal/react/use-noop */
|
|
11
|
+
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; }
|
|
12
|
+
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; }
|
|
14
13
|
/** @jsx jsx */
|
|
15
14
|
import React from 'react';
|
|
16
15
|
import { css, jsx } from '@emotion/react';
|
|
17
|
-
// eslint-disable-next-line no-restricted-imports
|
|
18
16
|
import { format, isValid, parseISO } from 'date-fns';
|
|
19
17
|
import pick from 'lodash/pick';
|
|
20
18
|
import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
@@ -27,10 +25,7 @@ import DatePicker from './date-picker';
|
|
|
27
25
|
import TimePicker from './time-picker';
|
|
28
26
|
import { convertTokens } from './utils';
|
|
29
27
|
var packageName = "@atlaskit/datetime-picker";
|
|
30
|
-
var packageVersion = "12.8.
|
|
31
|
-
|
|
32
|
-
/* eslint-disable react/no-unused-prop-types */
|
|
33
|
-
|
|
28
|
+
var packageVersion = "12.8.1";
|
|
34
29
|
var isInvalidBorderStyles = css({
|
|
35
30
|
borderColor: "var(--ds-border-danger, ".concat(R400, ")")
|
|
36
31
|
});
|
|
@@ -133,9 +128,13 @@ var dateTimePickerDefaultProps = {
|
|
|
133
128
|
autoFocus: false,
|
|
134
129
|
isDisabled: false,
|
|
135
130
|
name: '',
|
|
131
|
+
// These disables are here for proper typing when used as defaults. They
|
|
132
|
+
// should *not* use the `noop` function.
|
|
133
|
+
/* eslint-disable @repo/internal/react/use-noop */
|
|
136
134
|
onBlur: function onBlur(event) {},
|
|
137
135
|
onChange: function onChange(value) {},
|
|
138
136
|
onFocus: function onFocus(event) {},
|
|
137
|
+
/* eslint-enable @repo/internal/react/use-noop */
|
|
139
138
|
innerProps: {},
|
|
140
139
|
id: '',
|
|
141
140
|
defaultValue: '',
|
|
@@ -165,7 +164,6 @@ var DateTimePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
165
164
|
}
|
|
166
165
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
167
166
|
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
168
|
-
active: 0,
|
|
169
167
|
dateValue: '',
|
|
170
168
|
isFocused: false,
|
|
171
169
|
timeValue: '',
|
|
@@ -9,11 +9,10 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
9
9
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
10
10
|
var _excluded = ["selectProps"],
|
|
11
11
|
_excluded2 = ["styles"];
|
|
12
|
-
function ownKeys(
|
|
13
|
-
function _objectSpread(
|
|
12
|
+
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; }
|
|
13
|
+
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; }
|
|
14
14
|
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); }; }
|
|
15
15
|
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; } }
|
|
16
|
-
/* eslint-disable @repo/internal/react/use-noop */
|
|
17
16
|
import React from 'react';
|
|
18
17
|
|
|
19
18
|
// eslint-disable-next-line no-restricted-imports
|
|
@@ -30,10 +29,7 @@ import parseTime from '../internal/parse-time';
|
|
|
30
29
|
import { makeSingleValue } from '../internal/single-value';
|
|
31
30
|
import { convertTokens } from './utils';
|
|
32
31
|
var packageName = "@atlaskit/datetime-picker";
|
|
33
|
-
var packageVersion = "12.8.
|
|
34
|
-
|
|
35
|
-
/* eslint-disable react/no-unused-prop-types */
|
|
36
|
-
|
|
32
|
+
var packageVersion = "12.8.1";
|
|
37
33
|
var menuStyles = {
|
|
38
34
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
39
35
|
position: 'static',
|
|
@@ -65,9 +61,13 @@ var timePickerDefaultProps = {
|
|
|
65
61
|
isDisabled: false,
|
|
66
62
|
isInvalid: false,
|
|
67
63
|
name: '',
|
|
64
|
+
// These disables are here for proper typing when used as defaults. They
|
|
65
|
+
// should *not* use the `noop` function.
|
|
66
|
+
/* eslint-disable @repo/internal/react/use-noop */
|
|
68
67
|
onBlur: function onBlur(event) {},
|
|
69
68
|
onChange: function onChange(value) {},
|
|
70
69
|
onFocus: function onFocus(event) {},
|
|
70
|
+
/* eslint-enable @repo/internal/react/use-noop */
|
|
71
71
|
parseInputValue: function parseInputValue(time, timeFormat) {
|
|
72
72
|
return parseTime(time);
|
|
73
73
|
},
|
|
@@ -5,8 +5,8 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
5
5
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
function ownKeys(
|
|
9
|
-
function _objectSpread(
|
|
8
|
+
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; }
|
|
9
|
+
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; }
|
|
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
12
|
import React from 'react';
|
|
@@ -117,7 +117,6 @@ export interface DateTimePickerBaseProps extends WithAnalyticsEventsProps {
|
|
|
117
117
|
}
|
|
118
118
|
type DateTimePickerProps = typeof dateTimePickerDefaultProps & DateTimePickerBaseProps;
|
|
119
119
|
interface State {
|
|
120
|
-
active: 0 | 1 | 2;
|
|
121
120
|
dateValue: string;
|
|
122
121
|
isFocused: boolean;
|
|
123
122
|
timeValue: string;
|
|
@@ -175,7 +174,6 @@ declare class DateTimePicker extends React.Component<DateTimePickerProps, State>
|
|
|
175
174
|
timeValue: string;
|
|
176
175
|
zoneValue: string;
|
|
177
176
|
value: string;
|
|
178
|
-
active: 0 | 1 | 2;
|
|
179
177
|
isFocused: boolean;
|
|
180
178
|
};
|
|
181
179
|
parseValue(value: string, dateValue: string, timeValue: string, zoneValue: string): {
|
|
@@ -117,7 +117,6 @@ export interface DateTimePickerBaseProps extends WithAnalyticsEventsProps {
|
|
|
117
117
|
}
|
|
118
118
|
type DateTimePickerProps = typeof dateTimePickerDefaultProps & DateTimePickerBaseProps;
|
|
119
119
|
interface State {
|
|
120
|
-
active: 0 | 1 | 2;
|
|
121
120
|
dateValue: string;
|
|
122
121
|
isFocused: boolean;
|
|
123
122
|
timeValue: string;
|
|
@@ -175,7 +174,6 @@ declare class DateTimePicker extends React.Component<DateTimePickerProps, State>
|
|
|
175
174
|
timeValue: string;
|
|
176
175
|
zoneValue: string;
|
|
177
176
|
value: string;
|
|
178
|
-
active: 0 | 1 | 2;
|
|
179
177
|
isFocused: boolean;
|
|
180
178
|
};
|
|
181
179
|
parseValue(value: string, dateValue: string, timeValue: string, zoneValue: string): {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/datetime-picker",
|
|
3
|
-
"version": "12.8.
|
|
3
|
+
"version": "12.8.1",
|
|
4
4
|
"description": "A date time picker allows the user to select an associated date and time.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -33,15 +33,15 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
36
|
-
"@atlaskit/calendar": "^13.
|
|
36
|
+
"@atlaskit/calendar": "^13.3.0",
|
|
37
37
|
"@atlaskit/ds-lib": "^2.2.0",
|
|
38
38
|
"@atlaskit/icon": "^21.12.0",
|
|
39
39
|
"@atlaskit/locale": "^2.5.0",
|
|
40
40
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
41
41
|
"@atlaskit/popper": "^5.5.0",
|
|
42
42
|
"@atlaskit/select": "^16.5.0",
|
|
43
|
-
"@atlaskit/theme": "^12.
|
|
44
|
-
"@atlaskit/tokens": "^1.
|
|
43
|
+
"@atlaskit/theme": "^12.6.0",
|
|
44
|
+
"@atlaskit/tokens": "^1.18.0",
|
|
45
45
|
"@babel/runtime": "^7.0.0",
|
|
46
46
|
"@emotion/react": "^11.7.1",
|
|
47
47
|
"date-fns": "^2.17.0",
|