@atlaskit/datetime-picker 15.1.1 → 15.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 +8 -0
- package/dist/cjs/components/date-picker.js +32 -30
- package/dist/cjs/components/date-time-picker.js +1 -1
- package/dist/cjs/components/time-picker.js +1 -1
- package/dist/es2019/components/date-picker.js +21 -32
- package/dist/es2019/components/date-time-picker.js +1 -1
- package/dist/es2019/components/time-picker.js +1 -1
- package/dist/esm/components/date-picker.js +32 -30
- package/dist/esm/components/date-time-picker.js +1 -1
- package/dist/esm/components/time-picker.js +1 -1
- package/dist/types/components/date-picker.d.ts +6 -42
- package/dist/types-ts4.5/components/date-picker.d.ts +6 -42
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/datetime-picker
|
|
2
2
|
|
|
3
|
+
## 15.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#147913](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/147913)
|
|
8
|
+
[`cc70a6a79755c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/cc70a6a79755c) -
|
|
9
|
+
Refactor internal prop destructuring in date picker.
|
|
10
|
+
|
|
3
11
|
## 15.1.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -36,34 +36,22 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
36
36
|
* @jsx jsx
|
|
37
37
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
38
38
|
var packageName = "@atlaskit/datetime-picker";
|
|
39
|
-
var packageVersion = "15.1.
|
|
39
|
+
var packageVersion = "15.1.2";
|
|
40
40
|
var datePickerDefaultProps = {
|
|
41
|
-
appearance: 'default',
|
|
42
|
-
autoFocus: false,
|
|
43
41
|
defaultIsOpen: false,
|
|
44
42
|
defaultValue: '',
|
|
45
43
|
disabled: [],
|
|
46
44
|
disabledDateFilter: function disabledDateFilter(_) {
|
|
47
45
|
return false;
|
|
48
46
|
},
|
|
49
|
-
|
|
50
|
-
icon: _calendar.default,
|
|
51
|
-
id: '',
|
|
52
|
-
innerProps: {},
|
|
53
|
-
isDisabled: false,
|
|
54
|
-
isInvalid: false,
|
|
55
|
-
label: '',
|
|
56
|
-
name: '',
|
|
47
|
+
locale: 'en-US',
|
|
57
48
|
// These disables are here for proper typing when used as defaults. They
|
|
58
49
|
// should *not* use the `noop` function.
|
|
59
50
|
/* eslint-disable @repo/internal/react/use-noop */
|
|
60
51
|
onBlur: function onBlur(_event) {},
|
|
61
52
|
onChange: function onChange(_value) {},
|
|
62
|
-
onFocus: function onFocus(_event) {}
|
|
53
|
+
onFocus: function onFocus(_event) {}
|
|
63
54
|
/* eslint-enable @repo/internal/react/use-noop */
|
|
64
|
-
selectProps: {},
|
|
65
|
-
spacing: 'default',
|
|
66
|
-
locale: 'en-US'
|
|
67
55
|
// Not including a default prop for value as it will
|
|
68
56
|
// Make the component a controlled component
|
|
69
57
|
};
|
|
@@ -71,6 +59,7 @@ var DatePickerComponent = exports.DatePickerWithoutAnalytics = /*#__PURE__*/func
|
|
|
71
59
|
(0, _inherits2.default)(DatePickerComponent, _Component);
|
|
72
60
|
var _super = _createSuper(DatePickerComponent);
|
|
73
61
|
function DatePickerComponent(props) {
|
|
62
|
+
var _this$props$selectPro2;
|
|
74
63
|
var _this;
|
|
75
64
|
(0, _classCallCheck2.default)(this, DatePickerComponent);
|
|
76
65
|
_this = _super.call(this, props);
|
|
@@ -293,7 +282,8 @@ var DatePickerComponent = exports.DatePickerWithoutAnalytics = /*#__PURE__*/func
|
|
|
293
282
|
}
|
|
294
283
|
});
|
|
295
284
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleSelectInputChange", function (selectInputValue, actionMeta) {
|
|
296
|
-
var
|
|
285
|
+
var _this$props$selectPro;
|
|
286
|
+
var onInputChange = (_this$props$selectPro = _this.props.selectProps) === null || _this$props$selectPro === void 0 ? void 0 : _this$props$selectPro.onInputChange;
|
|
297
287
|
if (onInputChange) {
|
|
298
288
|
onInputChange(selectInputValue, actionMeta);
|
|
299
289
|
}
|
|
@@ -314,7 +304,7 @@ var DatePickerComponent = exports.DatePickerWithoutAnalytics = /*#__PURE__*/func
|
|
|
314
304
|
isOpen: _this.props.defaultIsOpen,
|
|
315
305
|
isFocused: false,
|
|
316
306
|
clearingFromIcon: false,
|
|
317
|
-
selectInputValue: _this.props.selectProps.inputValue || '',
|
|
307
|
+
selectInputValue: ((_this$props$selectPro2 = _this.props.selectProps) === null || _this$props$selectPro2 === void 0 ? void 0 : _this$props$selectPro2.inputValue) || '',
|
|
318
308
|
value: _this.props.value || _this.props.defaultValue,
|
|
319
309
|
calendarValue: _this.props.value || _this.props.defaultValue || (0, _parseDate.getShortISOString)(new Date()),
|
|
320
310
|
l10n: (0, _locale.createLocalizationProvider)(_this.props.locale),
|
|
@@ -327,26 +317,38 @@ var DatePickerComponent = exports.DatePickerWithoutAnalytics = /*#__PURE__*/func
|
|
|
327
317
|
key: "render",
|
|
328
318
|
value: function render() {
|
|
329
319
|
var _this$props = this.props,
|
|
330
|
-
|
|
320
|
+
_this$props$appearanc = _this$props.appearance,
|
|
321
|
+
appearance = _this$props$appearanc === void 0 ? 'default' : _this$props$appearanc,
|
|
331
322
|
ariaDescribedBy = _this$props['aria-describedby'],
|
|
332
|
-
autoFocus = _this$props.autoFocus,
|
|
323
|
+
_this$props$autoFocus = _this$props.autoFocus,
|
|
324
|
+
autoFocus = _this$props$autoFocus === void 0 ? false : _this$props$autoFocus,
|
|
333
325
|
disabled = _this$props.disabled,
|
|
334
|
-
hideIcon = _this$props.hideIcon,
|
|
335
|
-
icon = _this$props.icon,
|
|
336
|
-
id = _this$props.id,
|
|
337
|
-
innerProps = _this$props.innerProps,
|
|
338
|
-
isDisabled = _this$props.isDisabled,
|
|
339
326
|
disabledDateFilter = _this$props.disabledDateFilter,
|
|
327
|
+
_this$props$hideIcon = _this$props.hideIcon,
|
|
328
|
+
hideIcon = _this$props$hideIcon === void 0 ? false : _this$props$hideIcon,
|
|
329
|
+
_this$props$icon = _this$props.icon,
|
|
330
|
+
icon = _this$props$icon === void 0 ? _calendar.default : _this$props$icon,
|
|
331
|
+
_this$props$id = _this$props.id,
|
|
332
|
+
id = _this$props$id === void 0 ? '' : _this$props$id,
|
|
333
|
+
_this$props$innerProp = _this$props.innerProps,
|
|
334
|
+
innerProps = _this$props$innerProp === void 0 ? {} : _this$props$innerProp,
|
|
335
|
+
_this$props$isDisable = _this$props.isDisabled,
|
|
336
|
+
isDisabled = _this$props$isDisable === void 0 ? false : _this$props$isDisable,
|
|
337
|
+
_this$props$isInvalid = _this$props.isInvalid,
|
|
338
|
+
isInvalid = _this$props$isInvalid === void 0 ? false : _this$props$isInvalid,
|
|
339
|
+
_this$props$label = _this$props.label,
|
|
340
|
+
label = _this$props$label === void 0 ? '' : _this$props$label,
|
|
341
|
+
locale = _this$props.locale,
|
|
340
342
|
maxDate = _this$props.maxDate,
|
|
341
343
|
minDate = _this$props.minDate,
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
name = _this$props.name,
|
|
344
|
+
_this$props$name = _this$props.name,
|
|
345
|
+
name = _this$props$name === void 0 ? '' : _this$props$name,
|
|
345
346
|
nextMonthLabel = _this$props.nextMonthLabel,
|
|
346
347
|
previousMonthLabel = _this$props.previousMonthLabel,
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
348
|
+
_this$props$selectPro3 = _this$props.selectProps,
|
|
349
|
+
selectProps = _this$props$selectPro3 === void 0 ? {} : _this$props$selectPro3,
|
|
350
|
+
_this$props$spacing = _this$props.spacing,
|
|
351
|
+
spacing = _this$props$spacing === void 0 ? 'default' : _this$props$spacing,
|
|
350
352
|
testId = _this$props.testId,
|
|
351
353
|
weekStartDay = _this$props.weekStartDay;
|
|
352
354
|
var _this$state = this.state,
|
|
@@ -32,7 +32,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
32
32
|
* @jsx jsx
|
|
33
33
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
34
34
|
var packageName = "@atlaskit/datetime-picker";
|
|
35
|
-
var packageVersion = "15.1.
|
|
35
|
+
var packageVersion = "15.1.2";
|
|
36
36
|
// Make DatePicker 50% the width of DateTimePicker
|
|
37
37
|
// If rendering an icon container, shrink the TimePicker
|
|
38
38
|
var datePickerContainerStyles = (0, _react2.css)({
|
|
@@ -27,7 +27,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
27
27
|
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; }
|
|
28
28
|
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; }
|
|
29
29
|
var packageName = "@atlaskit/datetime-picker";
|
|
30
|
-
var packageVersion = "15.1.
|
|
30
|
+
var packageVersion = "15.1.2";
|
|
31
31
|
var menuStyles = {
|
|
32
32
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
33
33
|
position: 'static',
|
|
@@ -19,37 +19,26 @@ import { Menu } from '../internal/menu';
|
|
|
19
19
|
import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date';
|
|
20
20
|
import { makeSingleValue } from '../internal/single-value';
|
|
21
21
|
const packageName = "@atlaskit/datetime-picker";
|
|
22
|
-
const packageVersion = "15.1.
|
|
22
|
+
const packageVersion = "15.1.2";
|
|
23
23
|
const datePickerDefaultProps = {
|
|
24
|
-
appearance: 'default',
|
|
25
|
-
autoFocus: false,
|
|
26
24
|
defaultIsOpen: false,
|
|
27
25
|
defaultValue: '',
|
|
28
26
|
disabled: [],
|
|
29
27
|
disabledDateFilter: _ => false,
|
|
30
|
-
|
|
31
|
-
icon: CalendarIcon,
|
|
32
|
-
id: '',
|
|
33
|
-
innerProps: {},
|
|
34
|
-
isDisabled: false,
|
|
35
|
-
isInvalid: false,
|
|
36
|
-
label: '',
|
|
37
|
-
name: '',
|
|
28
|
+
locale: 'en-US',
|
|
38
29
|
// These disables are here for proper typing when used as defaults. They
|
|
39
30
|
// should *not* use the `noop` function.
|
|
40
31
|
/* eslint-disable @repo/internal/react/use-noop */
|
|
41
32
|
onBlur: _event => {},
|
|
42
33
|
onChange: _value => {},
|
|
43
|
-
onFocus: _event => {}
|
|
34
|
+
onFocus: _event => {}
|
|
44
35
|
/* eslint-enable @repo/internal/react/use-noop */
|
|
45
|
-
selectProps: {},
|
|
46
|
-
spacing: 'default',
|
|
47
|
-
locale: 'en-US'
|
|
48
36
|
// Not including a default prop for value as it will
|
|
49
37
|
// Make the component a controlled component
|
|
50
38
|
};
|
|
51
39
|
class DatePickerComponent extends Component {
|
|
52
40
|
constructor(props) {
|
|
41
|
+
var _this$props$selectPro2;
|
|
53
42
|
super(props);
|
|
54
43
|
_defineProperty(this, "containerRef", null);
|
|
55
44
|
// All state needs to be accessed via this function so that the state is mapped from props
|
|
@@ -277,9 +266,8 @@ class DatePickerComponent extends Component {
|
|
|
277
266
|
}
|
|
278
267
|
});
|
|
279
268
|
_defineProperty(this, "handleSelectInputChange", (selectInputValue, actionMeta) => {
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
} = this.props.selectProps;
|
|
269
|
+
var _this$props$selectPro;
|
|
270
|
+
const onInputChange = (_this$props$selectPro = this.props.selectProps) === null || _this$props$selectPro === void 0 ? void 0 : _this$props$selectPro.onInputChange;
|
|
283
271
|
if (onInputChange) {
|
|
284
272
|
onInputChange(selectInputValue, actionMeta);
|
|
285
273
|
}
|
|
@@ -300,7 +288,7 @@ class DatePickerComponent extends Component {
|
|
|
300
288
|
isOpen: this.props.defaultIsOpen,
|
|
301
289
|
isFocused: false,
|
|
302
290
|
clearingFromIcon: false,
|
|
303
|
-
selectInputValue: this.props.selectProps.inputValue || '',
|
|
291
|
+
selectInputValue: ((_this$props$selectPro2 = this.props.selectProps) === null || _this$props$selectPro2 === void 0 ? void 0 : _this$props$selectPro2.inputValue) || '',
|
|
304
292
|
value: this.props.value || this.props.defaultValue,
|
|
305
293
|
calendarValue: this.props.value || this.props.defaultValue || getShortISOString(new Date()),
|
|
306
294
|
l10n: createLocalizationProvider(this.props.locale),
|
|
@@ -320,26 +308,27 @@ class DatePickerComponent extends Component {
|
|
|
320
308
|
}
|
|
321
309
|
render() {
|
|
322
310
|
const {
|
|
323
|
-
appearance,
|
|
311
|
+
appearance = 'default',
|
|
324
312
|
'aria-describedby': ariaDescribedBy,
|
|
325
|
-
autoFocus,
|
|
313
|
+
autoFocus = false,
|
|
326
314
|
disabled,
|
|
327
|
-
hideIcon,
|
|
328
|
-
icon,
|
|
329
|
-
id,
|
|
330
|
-
innerProps,
|
|
331
|
-
isDisabled,
|
|
332
315
|
disabledDateFilter,
|
|
316
|
+
hideIcon = false,
|
|
317
|
+
// TODO: Resolve this typing to be more intuitive
|
|
318
|
+
icon = CalendarIcon,
|
|
319
|
+
id = '',
|
|
320
|
+
innerProps = {},
|
|
321
|
+
isDisabled = false,
|
|
322
|
+
isInvalid = false,
|
|
323
|
+
label = '',
|
|
324
|
+
locale,
|
|
333
325
|
maxDate,
|
|
334
326
|
minDate,
|
|
335
|
-
|
|
336
|
-
label,
|
|
337
|
-
name,
|
|
327
|
+
name = '',
|
|
338
328
|
nextMonthLabel,
|
|
339
329
|
previousMonthLabel,
|
|
340
|
-
selectProps,
|
|
341
|
-
spacing,
|
|
342
|
-
locale,
|
|
330
|
+
selectProps = {},
|
|
331
|
+
spacing = 'default',
|
|
343
332
|
testId,
|
|
344
333
|
weekStartDay
|
|
345
334
|
} = this.props;
|
|
@@ -18,7 +18,7 @@ import { convertTokens } from '../internal/parse-tokens';
|
|
|
18
18
|
import DatePicker from './date-picker';
|
|
19
19
|
import TimePicker from './time-picker';
|
|
20
20
|
const packageName = "@atlaskit/datetime-picker";
|
|
21
|
-
const packageVersion = "15.1.
|
|
21
|
+
const packageVersion = "15.1.2";
|
|
22
22
|
// Make DatePicker 50% the width of DateTimePicker
|
|
23
23
|
// If rendering an icon container, shrink the TimePicker
|
|
24
24
|
const datePickerContainerStyles = css({
|
|
@@ -11,7 +11,7 @@ import parseTime from '../internal/parse-time';
|
|
|
11
11
|
import { convertTokens } from '../internal/parse-tokens';
|
|
12
12
|
import { makeSingleValue } from '../internal/single-value';
|
|
13
13
|
const packageName = "@atlaskit/datetime-picker";
|
|
14
|
-
const packageVersion = "15.1.
|
|
14
|
+
const packageVersion = "15.1.2";
|
|
15
15
|
const menuStyles = {
|
|
16
16
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
17
17
|
position: 'static',
|
|
@@ -29,34 +29,22 @@ import { Menu } from '../internal/menu';
|
|
|
29
29
|
import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date';
|
|
30
30
|
import { makeSingleValue } from '../internal/single-value';
|
|
31
31
|
var packageName = "@atlaskit/datetime-picker";
|
|
32
|
-
var packageVersion = "15.1.
|
|
32
|
+
var packageVersion = "15.1.2";
|
|
33
33
|
var datePickerDefaultProps = {
|
|
34
|
-
appearance: 'default',
|
|
35
|
-
autoFocus: false,
|
|
36
34
|
defaultIsOpen: false,
|
|
37
35
|
defaultValue: '',
|
|
38
36
|
disabled: [],
|
|
39
37
|
disabledDateFilter: function disabledDateFilter(_) {
|
|
40
38
|
return false;
|
|
41
39
|
},
|
|
42
|
-
|
|
43
|
-
icon: CalendarIcon,
|
|
44
|
-
id: '',
|
|
45
|
-
innerProps: {},
|
|
46
|
-
isDisabled: false,
|
|
47
|
-
isInvalid: false,
|
|
48
|
-
label: '',
|
|
49
|
-
name: '',
|
|
40
|
+
locale: 'en-US',
|
|
50
41
|
// These disables are here for proper typing when used as defaults. They
|
|
51
42
|
// should *not* use the `noop` function.
|
|
52
43
|
/* eslint-disable @repo/internal/react/use-noop */
|
|
53
44
|
onBlur: function onBlur(_event) {},
|
|
54
45
|
onChange: function onChange(_value) {},
|
|
55
|
-
onFocus: function onFocus(_event) {}
|
|
46
|
+
onFocus: function onFocus(_event) {}
|
|
56
47
|
/* eslint-enable @repo/internal/react/use-noop */
|
|
57
|
-
selectProps: {},
|
|
58
|
-
spacing: 'default',
|
|
59
|
-
locale: 'en-US'
|
|
60
48
|
// Not including a default prop for value as it will
|
|
61
49
|
// Make the component a controlled component
|
|
62
50
|
};
|
|
@@ -64,6 +52,7 @@ var DatePickerComponent = /*#__PURE__*/function (_Component) {
|
|
|
64
52
|
_inherits(DatePickerComponent, _Component);
|
|
65
53
|
var _super = _createSuper(DatePickerComponent);
|
|
66
54
|
function DatePickerComponent(props) {
|
|
55
|
+
var _this$props$selectPro2;
|
|
67
56
|
var _this;
|
|
68
57
|
_classCallCheck(this, DatePickerComponent);
|
|
69
58
|
_this = _super.call(this, props);
|
|
@@ -286,7 +275,8 @@ var DatePickerComponent = /*#__PURE__*/function (_Component) {
|
|
|
286
275
|
}
|
|
287
276
|
});
|
|
288
277
|
_defineProperty(_assertThisInitialized(_this), "handleSelectInputChange", function (selectInputValue, actionMeta) {
|
|
289
|
-
var
|
|
278
|
+
var _this$props$selectPro;
|
|
279
|
+
var onInputChange = (_this$props$selectPro = _this.props.selectProps) === null || _this$props$selectPro === void 0 ? void 0 : _this$props$selectPro.onInputChange;
|
|
290
280
|
if (onInputChange) {
|
|
291
281
|
onInputChange(selectInputValue, actionMeta);
|
|
292
282
|
}
|
|
@@ -307,7 +297,7 @@ var DatePickerComponent = /*#__PURE__*/function (_Component) {
|
|
|
307
297
|
isOpen: _this.props.defaultIsOpen,
|
|
308
298
|
isFocused: false,
|
|
309
299
|
clearingFromIcon: false,
|
|
310
|
-
selectInputValue: _this.props.selectProps.inputValue || '',
|
|
300
|
+
selectInputValue: ((_this$props$selectPro2 = _this.props.selectProps) === null || _this$props$selectPro2 === void 0 ? void 0 : _this$props$selectPro2.inputValue) || '',
|
|
311
301
|
value: _this.props.value || _this.props.defaultValue,
|
|
312
302
|
calendarValue: _this.props.value || _this.props.defaultValue || getShortISOString(new Date()),
|
|
313
303
|
l10n: createLocalizationProvider(_this.props.locale),
|
|
@@ -320,26 +310,38 @@ var DatePickerComponent = /*#__PURE__*/function (_Component) {
|
|
|
320
310
|
key: "render",
|
|
321
311
|
value: function render() {
|
|
322
312
|
var _this$props = this.props,
|
|
323
|
-
|
|
313
|
+
_this$props$appearanc = _this$props.appearance,
|
|
314
|
+
appearance = _this$props$appearanc === void 0 ? 'default' : _this$props$appearanc,
|
|
324
315
|
ariaDescribedBy = _this$props['aria-describedby'],
|
|
325
|
-
autoFocus = _this$props.autoFocus,
|
|
316
|
+
_this$props$autoFocus = _this$props.autoFocus,
|
|
317
|
+
autoFocus = _this$props$autoFocus === void 0 ? false : _this$props$autoFocus,
|
|
326
318
|
disabled = _this$props.disabled,
|
|
327
|
-
hideIcon = _this$props.hideIcon,
|
|
328
|
-
icon = _this$props.icon,
|
|
329
|
-
id = _this$props.id,
|
|
330
|
-
innerProps = _this$props.innerProps,
|
|
331
|
-
isDisabled = _this$props.isDisabled,
|
|
332
319
|
disabledDateFilter = _this$props.disabledDateFilter,
|
|
320
|
+
_this$props$hideIcon = _this$props.hideIcon,
|
|
321
|
+
hideIcon = _this$props$hideIcon === void 0 ? false : _this$props$hideIcon,
|
|
322
|
+
_this$props$icon = _this$props.icon,
|
|
323
|
+
icon = _this$props$icon === void 0 ? CalendarIcon : _this$props$icon,
|
|
324
|
+
_this$props$id = _this$props.id,
|
|
325
|
+
id = _this$props$id === void 0 ? '' : _this$props$id,
|
|
326
|
+
_this$props$innerProp = _this$props.innerProps,
|
|
327
|
+
innerProps = _this$props$innerProp === void 0 ? {} : _this$props$innerProp,
|
|
328
|
+
_this$props$isDisable = _this$props.isDisabled,
|
|
329
|
+
isDisabled = _this$props$isDisable === void 0 ? false : _this$props$isDisable,
|
|
330
|
+
_this$props$isInvalid = _this$props.isInvalid,
|
|
331
|
+
isInvalid = _this$props$isInvalid === void 0 ? false : _this$props$isInvalid,
|
|
332
|
+
_this$props$label = _this$props.label,
|
|
333
|
+
label = _this$props$label === void 0 ? '' : _this$props$label,
|
|
334
|
+
locale = _this$props.locale,
|
|
333
335
|
maxDate = _this$props.maxDate,
|
|
334
336
|
minDate = _this$props.minDate,
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
name = _this$props.name,
|
|
337
|
+
_this$props$name = _this$props.name,
|
|
338
|
+
name = _this$props$name === void 0 ? '' : _this$props$name,
|
|
338
339
|
nextMonthLabel = _this$props.nextMonthLabel,
|
|
339
340
|
previousMonthLabel = _this$props.previousMonthLabel,
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
341
|
+
_this$props$selectPro3 = _this$props.selectProps,
|
|
342
|
+
selectProps = _this$props$selectPro3 === void 0 ? {} : _this$props$selectPro3,
|
|
343
|
+
_this$props$spacing = _this$props.spacing,
|
|
344
|
+
spacing = _this$props$spacing === void 0 ? 'default' : _this$props$spacing,
|
|
343
345
|
testId = _this$props.testId,
|
|
344
346
|
weekStartDay = _this$props.weekStartDay;
|
|
345
347
|
var _this$state = this.state,
|
|
@@ -28,7 +28,7 @@ import { convertTokens } from '../internal/parse-tokens';
|
|
|
28
28
|
import DatePicker from './date-picker';
|
|
29
29
|
import TimePicker from './time-picker';
|
|
30
30
|
var packageName = "@atlaskit/datetime-picker";
|
|
31
|
-
var packageVersion = "15.1.
|
|
31
|
+
var packageVersion = "15.1.2";
|
|
32
32
|
// Make DatePicker 50% the width of DateTimePicker
|
|
33
33
|
// If rendering an icon container, shrink the TimePicker
|
|
34
34
|
var datePickerContainerStyles = css({
|
|
@@ -17,7 +17,7 @@ import parseTime from '../internal/parse-time';
|
|
|
17
17
|
import { convertTokens } from '../internal/parse-tokens';
|
|
18
18
|
import { makeSingleValue } from '../internal/single-value';
|
|
19
19
|
var packageName = "@atlaskit/datetime-picker";
|
|
20
|
-
var packageVersion = "15.1.
|
|
20
|
+
var packageVersion = "15.1.2";
|
|
21
21
|
var menuStyles = {
|
|
22
22
|
/* Need to remove default absolute positioning as that causes issues with position fixed */
|
|
23
23
|
position: 'static',
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
import { Component } from 'react';
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
7
|
import { type LocalizationProvider } from '@atlaskit/locale';
|
|
8
|
-
import { type ActionMeta, type
|
|
9
|
-
import { type
|
|
8
|
+
import { type ActionMeta, type InputActionMeta } from '@atlaskit/select';
|
|
9
|
+
import { type DatePickerBaseProps } from '../types';
|
|
10
10
|
type DatePickerProps = typeof datePickerDefaultProps & DatePickerBaseProps;
|
|
11
11
|
interface State {
|
|
12
12
|
isOpen: boolean;
|
|
@@ -25,49 +25,25 @@ interface State {
|
|
|
25
25
|
shouldSetFocusOnCurrentDay: boolean;
|
|
26
26
|
}
|
|
27
27
|
declare const datePickerDefaultProps: {
|
|
28
|
-
appearance: Appearance;
|
|
29
|
-
autoFocus: boolean;
|
|
30
28
|
defaultIsOpen: boolean;
|
|
31
29
|
defaultValue: string;
|
|
32
30
|
disabled: string[];
|
|
33
31
|
disabledDateFilter: (_: string) => boolean;
|
|
34
|
-
|
|
35
|
-
icon: import("react").ComponentType<DropdownIndicatorProps<OptionType, boolean, GroupType<OptionType>>>;
|
|
36
|
-
id: string;
|
|
37
|
-
innerProps: {};
|
|
38
|
-
isDisabled: boolean;
|
|
39
|
-
isInvalid: boolean;
|
|
40
|
-
label: string;
|
|
41
|
-
name: string;
|
|
32
|
+
locale: string;
|
|
42
33
|
onBlur: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
43
34
|
onChange: (_value: string) => void;
|
|
44
35
|
onFocus: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
45
|
-
selectProps: {};
|
|
46
|
-
spacing: Spacing;
|
|
47
|
-
locale: string;
|
|
48
36
|
};
|
|
49
37
|
declare class DatePickerComponent extends Component<DatePickerProps, State> {
|
|
50
38
|
static defaultProps: {
|
|
51
|
-
appearance: Appearance;
|
|
52
|
-
autoFocus: boolean;
|
|
53
39
|
defaultIsOpen: boolean;
|
|
54
40
|
defaultValue: string;
|
|
55
41
|
disabled: string[];
|
|
56
42
|
disabledDateFilter: (_: string) => boolean;
|
|
57
|
-
|
|
58
|
-
icon: import("react").ComponentType<DropdownIndicatorProps<OptionType, boolean, GroupType<OptionType>>>;
|
|
59
|
-
id: string;
|
|
60
|
-
innerProps: {};
|
|
61
|
-
isDisabled: boolean;
|
|
62
|
-
isInvalid: boolean;
|
|
63
|
-
label: string;
|
|
64
|
-
name: string;
|
|
43
|
+
locale: string;
|
|
65
44
|
onBlur: (_event: import("react").FocusEvent<HTMLInputElement>) => void;
|
|
66
45
|
onChange: (_value: string) => void;
|
|
67
46
|
onFocus: (_event: import("react").FocusEvent<HTMLInputElement>) => void;
|
|
68
|
-
selectProps: {};
|
|
69
|
-
spacing: Spacing;
|
|
70
|
-
locale: string;
|
|
71
47
|
};
|
|
72
48
|
containerRef: HTMLElement | null;
|
|
73
49
|
constructor(props: any);
|
|
@@ -106,26 +82,14 @@ export { DatePickerComponent as DatePickerWithoutAnalytics };
|
|
|
106
82
|
* - [Code](https://atlassian.design/components/datetime-picker/date-picker/code)
|
|
107
83
|
* - [Usage](https://atlassian.design/components/datetime-picker/date-picker/usage)
|
|
108
84
|
*/
|
|
109
|
-
declare const DatePicker: import("react").ForwardRefExoticComponent<Pick<Pick<Omit<DatePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "testId" | "
|
|
110
|
-
appearance: Appearance;
|
|
111
|
-
autoFocus: boolean;
|
|
85
|
+
declare const DatePicker: import("react").ForwardRefExoticComponent<Pick<Pick<Omit<DatePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "testId" | "label" | "icon" | "appearance" | "selectProps" | "innerProps" | "isDisabled" | "id" | "aria-describedby" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "weekStartDay" | "value" | "autoFocus" | "name" | "spacing" | "isInvalid" | "isOpen" | "hideIcon"> & Partial<Pick<Omit<DatePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "disabled" | "defaultValue" | "onFocus" | "onBlur" | "onChange" | "disabledDateFilter" | "locale" | "defaultIsOpen">> & Partial<Pick<{
|
|
112
86
|
defaultIsOpen: boolean;
|
|
113
87
|
defaultValue: string;
|
|
114
88
|
disabled: string[];
|
|
115
89
|
disabledDateFilter: (_: string) => boolean;
|
|
116
|
-
|
|
117
|
-
icon: import("react").ComponentType<DropdownIndicatorProps<OptionType, boolean, GroupType<OptionType>>>;
|
|
118
|
-
id: string;
|
|
119
|
-
innerProps: {};
|
|
120
|
-
isDisabled: boolean;
|
|
121
|
-
isInvalid: boolean;
|
|
122
|
-
label: string;
|
|
123
|
-
name: string;
|
|
90
|
+
locale: string;
|
|
124
91
|
onBlur: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
125
92
|
onChange: (_value: string) => void;
|
|
126
93
|
onFocus: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
127
|
-
selectProps: {};
|
|
128
|
-
spacing: Spacing;
|
|
129
|
-
locale: string;
|
|
130
94
|
}, never>> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "disabled" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "testId" | "label" | "icon" | "appearance" | "selectProps" | "innerProps" | "isDisabled" | "key" | "defaultValue" | "id" | "aria-describedby" | "onFocus" | "onBlur" | "onChange" | "disabledDateFilter" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "locale" | "analyticsContext" | "weekStartDay" | "value" | "autoFocus" | "name" | "spacing" | "isInvalid" | "defaultIsOpen" | "isOpen" | "hideIcon"> & import("react").RefAttributes<any>>;
|
|
131
95
|
export default DatePicker;
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
import { Component } from 'react';
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
7
|
import { type LocalizationProvider } from '@atlaskit/locale';
|
|
8
|
-
import { type ActionMeta, type
|
|
9
|
-
import { type
|
|
8
|
+
import { type ActionMeta, type InputActionMeta } from '@atlaskit/select';
|
|
9
|
+
import { type DatePickerBaseProps } from '../types';
|
|
10
10
|
type DatePickerProps = typeof datePickerDefaultProps & DatePickerBaseProps;
|
|
11
11
|
interface State {
|
|
12
12
|
isOpen: boolean;
|
|
@@ -25,49 +25,25 @@ interface State {
|
|
|
25
25
|
shouldSetFocusOnCurrentDay: boolean;
|
|
26
26
|
}
|
|
27
27
|
declare const datePickerDefaultProps: {
|
|
28
|
-
appearance: Appearance;
|
|
29
|
-
autoFocus: boolean;
|
|
30
28
|
defaultIsOpen: boolean;
|
|
31
29
|
defaultValue: string;
|
|
32
30
|
disabled: string[];
|
|
33
31
|
disabledDateFilter: (_: string) => boolean;
|
|
34
|
-
|
|
35
|
-
icon: import("react").ComponentType<DropdownIndicatorProps<OptionType, boolean, GroupType<OptionType>>>;
|
|
36
|
-
id: string;
|
|
37
|
-
innerProps: {};
|
|
38
|
-
isDisabled: boolean;
|
|
39
|
-
isInvalid: boolean;
|
|
40
|
-
label: string;
|
|
41
|
-
name: string;
|
|
32
|
+
locale: string;
|
|
42
33
|
onBlur: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
43
34
|
onChange: (_value: string) => void;
|
|
44
35
|
onFocus: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
45
|
-
selectProps: {};
|
|
46
|
-
spacing: Spacing;
|
|
47
|
-
locale: string;
|
|
48
36
|
};
|
|
49
37
|
declare class DatePickerComponent extends Component<DatePickerProps, State> {
|
|
50
38
|
static defaultProps: {
|
|
51
|
-
appearance: Appearance;
|
|
52
|
-
autoFocus: boolean;
|
|
53
39
|
defaultIsOpen: boolean;
|
|
54
40
|
defaultValue: string;
|
|
55
41
|
disabled: string[];
|
|
56
42
|
disabledDateFilter: (_: string) => boolean;
|
|
57
|
-
|
|
58
|
-
icon: import("react").ComponentType<DropdownIndicatorProps<OptionType, boolean, GroupType<OptionType>>>;
|
|
59
|
-
id: string;
|
|
60
|
-
innerProps: {};
|
|
61
|
-
isDisabled: boolean;
|
|
62
|
-
isInvalid: boolean;
|
|
63
|
-
label: string;
|
|
64
|
-
name: string;
|
|
43
|
+
locale: string;
|
|
65
44
|
onBlur: (_event: import("react").FocusEvent<HTMLInputElement>) => void;
|
|
66
45
|
onChange: (_value: string) => void;
|
|
67
46
|
onFocus: (_event: import("react").FocusEvent<HTMLInputElement>) => void;
|
|
68
|
-
selectProps: {};
|
|
69
|
-
spacing: Spacing;
|
|
70
|
-
locale: string;
|
|
71
47
|
};
|
|
72
48
|
containerRef: HTMLElement | null;
|
|
73
49
|
constructor(props: any);
|
|
@@ -106,26 +82,14 @@ export { DatePickerComponent as DatePickerWithoutAnalytics };
|
|
|
106
82
|
* - [Code](https://atlassian.design/components/datetime-picker/date-picker/code)
|
|
107
83
|
* - [Usage](https://atlassian.design/components/datetime-picker/date-picker/usage)
|
|
108
84
|
*/
|
|
109
|
-
declare const DatePicker: import("react").ForwardRefExoticComponent<Pick<Pick<Omit<DatePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "testId" | "
|
|
110
|
-
appearance: Appearance;
|
|
111
|
-
autoFocus: boolean;
|
|
85
|
+
declare const DatePicker: import("react").ForwardRefExoticComponent<Pick<Pick<Omit<DatePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "testId" | "label" | "icon" | "appearance" | "selectProps" | "innerProps" | "isDisabled" | "id" | "aria-describedby" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "weekStartDay" | "value" | "autoFocus" | "name" | "spacing" | "isInvalid" | "isOpen" | "hideIcon"> & Partial<Pick<Omit<DatePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "disabled" | "defaultValue" | "onFocus" | "onBlur" | "onChange" | "disabledDateFilter" | "locale" | "defaultIsOpen">> & Partial<Pick<{
|
|
112
86
|
defaultIsOpen: boolean;
|
|
113
87
|
defaultValue: string;
|
|
114
88
|
disabled: string[];
|
|
115
89
|
disabledDateFilter: (_: string) => boolean;
|
|
116
|
-
|
|
117
|
-
icon: import("react").ComponentType<DropdownIndicatorProps<OptionType, boolean, GroupType<OptionType>>>;
|
|
118
|
-
id: string;
|
|
119
|
-
innerProps: {};
|
|
120
|
-
isDisabled: boolean;
|
|
121
|
-
isInvalid: boolean;
|
|
122
|
-
label: string;
|
|
123
|
-
name: string;
|
|
90
|
+
locale: string;
|
|
124
91
|
onBlur: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
125
92
|
onChange: (_value: string) => void;
|
|
126
93
|
onFocus: (_event: React.FocusEvent<HTMLInputElement>) => void;
|
|
127
|
-
selectProps: {};
|
|
128
|
-
spacing: Spacing;
|
|
129
|
-
locale: string;
|
|
130
94
|
}, never>> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "disabled" | "parseInputValue" | "dateFormat" | "formatDisplayLabel" | "placeholder" | "testId" | "label" | "icon" | "appearance" | "selectProps" | "innerProps" | "isDisabled" | "key" | "defaultValue" | "id" | "aria-describedby" | "onFocus" | "onBlur" | "onChange" | "disabledDateFilter" | "maxDate" | "minDate" | "nextMonthLabel" | "previousMonthLabel" | "locale" | "analyticsContext" | "weekStartDay" | "value" | "autoFocus" | "name" | "spacing" | "isInvalid" | "defaultIsOpen" | "isOpen" | "hideIcon"> & import("react").RefAttributes<any>>;
|
|
131
95
|
export default DatePicker;
|
package/package.json
CHANGED