@atlaskit/datetime-picker 15.10.6 → 15.11.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 CHANGED
@@ -1,5 +1,26 @@
1
1
  # @atlaskit/datetime-picker
2
2
 
3
+ ## 15.11.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#105750](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/105750)
8
+ [`5b235146d0faa`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5b235146d0faa) -
9
+ Resolve dependency issue that masks test matcher problems.
10
+
11
+ ## 15.11.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [#102000](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/102000)
16
+ [`3e1546043c1c3`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3e1546043c1c3) -
17
+ We are testing adding year buttons to the calendar behind a feature flag. If this fix is
18
+ successful it will be available in a later release.
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies
23
+
3
24
  ## 15.10.6
4
25
 
5
26
  ### Patch Changes
@@ -41,7 +41,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
41
41
  * @jsx jsx
42
42
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
43
43
  var packageName = "@atlaskit/datetime-picker";
44
- var packageVersion = "15.10.6";
44
+ var packageVersion = "15.11.1";
45
45
  var dropdownIndicatorStyles = (0, _primitives.xcss)({
46
46
  minWidth: "var(--ds-space-300, 24px)",
47
47
  minHeight: "var(--ds-space-300, 24px)",
@@ -39,7 +39,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
39
39
  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; }
40
40
  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; }
41
41
  var packageName = "@atlaskit/datetime-picker";
42
- var packageVersion = "15.10.6";
42
+ var packageVersion = "15.11.1";
43
43
  var analyticsAttributes = {
44
44
  componentName: 'datePicker',
45
45
  packageName: packageName,
@@ -37,7 +37,7 @@ var DatePicker = (0, _ffComponent.componentWithCondition)(function () {
37
37
  return (0, _platformFeatureFlags.fg)('dst-date-picker-use-functional-component');
38
38
  }, _datePickerFc.default, _datePickerClass.default);
39
39
  var packageName = "@atlaskit/datetime-picker";
40
- var packageVersion = "15.10.6";
40
+ var packageVersion = "15.11.1";
41
41
  // Make DatePicker 50% the width of DateTimePicker
42
42
  // If rendering an icon container, shrink the TimePicker
43
43
  var datePickerContainerStyles = (0, _react2.css)({
@@ -37,7 +37,7 @@ function () {
37
37
  return (0, _platformFeatureFlags.fg)('dst-date-picker-use-functional-component');
38
38
  }, _datePickerFc.default, _datePickerClass.default);
39
39
  var packageName = "@atlaskit/datetime-picker";
40
- var packageVersion = "15.10.6";
40
+ var packageVersion = "15.11.1";
41
41
  var analyticsAttributes = {
42
42
  componentName: 'dateTimePicker',
43
43
  packageName: packageName,
@@ -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.10.6";
30
+ var packageVersion = "15.11.1";
31
31
  var menuStyles = {
32
32
  /* Need to remove default absolute positioning as that causes issues with position fixed */
33
33
  position: 'static',
@@ -25,7 +25,7 @@ import { Menu } from '../internal/menu';
25
25
  import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date';
26
26
  import { makeSingleValue } from '../internal/single-value';
27
27
  const packageName = "@atlaskit/datetime-picker";
28
- const packageVersion = "15.10.6";
28
+ const packageVersion = "15.11.1";
29
29
  const dropdownIndicatorStyles = xcss({
30
30
  minWidth: "var(--ds-space-300, 24px)",
31
31
  minHeight: "var(--ds-space-300, 24px)",
@@ -24,7 +24,7 @@ import { Menu } from '../internal/menu';
24
24
  import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date';
25
25
  import { makeSingleValue } from '../internal/single-value';
26
26
  const packageName = "@atlaskit/datetime-picker";
27
- const packageVersion = "15.10.6";
27
+ const packageVersion = "15.11.1";
28
28
  const analyticsAttributes = {
29
29
  componentName: 'datePicker',
30
30
  packageName,
@@ -22,7 +22,7 @@ import DatePickerNew from './date-picker-fc';
22
22
  import TimePicker from './time-picker';
23
23
  const DatePicker = componentWithCondition(() => fg('dst-date-picker-use-functional-component'), DatePickerNew, DatePickerOld);
24
24
  const packageName = "@atlaskit/datetime-picker";
25
- const packageVersion = "15.10.6";
25
+ const packageVersion = "15.11.1";
26
26
  // Make DatePicker 50% the width of DateTimePicker
27
27
  // If rendering an icon container, shrink the TimePicker
28
28
  const datePickerContainerStyles = css({
@@ -18,7 +18,7 @@ const DatePicker = componentWithCondition(
18
18
  // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
19
19
  () => fg('dst-date-picker-use-functional-component'), DatePickerNew, DatePickerOld);
20
20
  const packageName = "@atlaskit/datetime-picker";
21
- const packageVersion = "15.10.6";
21
+ const packageVersion = "15.11.1";
22
22
  const analyticsAttributes = {
23
23
  componentName: 'dateTimePicker',
24
24
  packageName,
@@ -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.10.6";
14
+ const packageVersion = "15.11.1";
15
15
  const menuStyles = {
16
16
  /* Need to remove default absolute positioning as that causes issues with position fixed */
17
17
  position: 'static',
@@ -34,7 +34,7 @@ import { Menu } from '../internal/menu';
34
34
  import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date';
35
35
  import { makeSingleValue } from '../internal/single-value';
36
36
  var packageName = "@atlaskit/datetime-picker";
37
- var packageVersion = "15.10.6";
37
+ var packageVersion = "15.11.1";
38
38
  var dropdownIndicatorStyles = xcss({
39
39
  minWidth: "var(--ds-space-300, 24px)",
40
40
  minHeight: "var(--ds-space-300, 24px)",
@@ -30,7 +30,7 @@ import { Menu } from '../internal/menu';
30
30
  import { getSafeCalendarValue, getShortISOString } from '../internal/parse-date';
31
31
  import { makeSingleValue } from '../internal/single-value';
32
32
  var packageName = "@atlaskit/datetime-picker";
33
- var packageVersion = "15.10.6";
33
+ var packageVersion = "15.11.1";
34
34
  var analyticsAttributes = {
35
35
  componentName: 'datePicker',
36
36
  packageName: packageName,
@@ -33,7 +33,7 @@ var DatePicker = componentWithCondition(function () {
33
33
  return fg('dst-date-picker-use-functional-component');
34
34
  }, DatePickerNew, DatePickerOld);
35
35
  var packageName = "@atlaskit/datetime-picker";
36
- var packageVersion = "15.10.6";
36
+ var packageVersion = "15.11.1";
37
37
  // Make DatePicker 50% the width of DateTimePicker
38
38
  // If rendering an icon container, shrink the TimePicker
39
39
  var datePickerContainerStyles = css({
@@ -27,7 +27,7 @@ function () {
27
27
  return fg('dst-date-picker-use-functional-component');
28
28
  }, DatePickerNew, DatePickerOld);
29
29
  var packageName = "@atlaskit/datetime-picker";
30
- var packageVersion = "15.10.6";
30
+ var packageVersion = "15.11.1";
31
31
  var analyticsAttributes = {
32
32
  componentName: 'dateTimePicker',
33
33
  packageName: packageName,
@@ -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.10.6";
20
+ var packageVersion = "15.11.1";
21
21
  var menuStyles = {
22
22
  /* Need to remove default absolute positioning as that causes issues with position fixed */
23
23
  position: 'static',
@@ -185,11 +185,16 @@ export interface DatePickerBaseProps extends WithAnalyticsEventsProps, PickerSel
185
185
  openCalendarLabel?: string;
186
186
  /**
187
187
  * A function for parsing input characters and transforming them into a Date object.
188
- * By default parses the date string based off the locale.
188
+ * By default parses the date string based off the locale. Note that this does
189
+ * not affect how the resulting value is displayed in the input. Use the
190
+ * `dateFormat` or `formatDisplayLabel` prop to handle how the value is
191
+ * displayed.
189
192
  */
190
193
  parseInputValue?: (date: string, dateFormat: string) => Date;
191
194
  /**
192
195
  * A function for formatting the date displayed in the input. By default composes together [`date-fns`'s parse method](https://date-fns.org/v1.29.0/docs/parse) and [`date-fns`'s format method](https://date-fns.org/v1.29.0/docs/format) to return a correctly formatted date string.
196
+ *
197
+ * Note that this does not affect how the input is parsed. This must be done using the `parseInputValue` prop.
193
198
  */
194
199
  formatDisplayLabel?: (value: string, dateFormat: string) => string;
195
200
  /**
@@ -228,9 +233,14 @@ export interface DatePickerBaseProps extends WithAnalyticsEventsProps, PickerSel
228
233
  */
229
234
  hideIcon?: boolean;
230
235
  /**
231
- * Format the date with a string that is accepted by [date-fn's format function](https://date-fns.org/v1.29.0/docs/format).
236
+ * Format the date with a string that is accepted by [date-fns's format
237
+ * function](https://date-fns.org/v1.29.0/docs/format). **This does not affect
238
+ * how the input is parsed.** This must be done using the `parseInputValue`
239
+ * prop.
232
240
  *
233
- * Note that though we are using `date-fns` version 2, we use [the tokens from `date-fns` version 1](https://date-fns.org/v1.30.1/docs/format) under the hood.
241
+ * Note that though we are using `date-fns` version 2, we use [the tokens from
242
+ * `date-fns` version 1](https://date-fns.org/v1.30.1/docs/format) under the
243
+ * hood.
234
244
  */
235
245
  dateFormat?: string;
236
246
  /**
@@ -294,7 +304,12 @@ export interface TimePickerBaseProps extends WithAnalyticsEventsProps, PickerSel
294
304
  */
295
305
  defaultValue?: string;
296
306
  /**
297
- * A function for formatting the displayed time value in the input. By default parses with an internal time parser, and formats using the [date-fns format function]((https://date-fns.org/v1.29.0/docs/format))
307
+ * A function for formatting the displayed time value in the input. By default
308
+ * parses with an internal time parser, and formats using the [date-fns format
309
+ * function]((https://date-fns.org/v1.29.0/docs/format)).
310
+ *
311
+ * Note that this does not affect how the input is parsed. This must be done
312
+ * using the `parseInputValue` prop.
298
313
  */
299
314
  formatDisplayLabel?: (time: string, timeFormat: string) => string;
300
315
  /**
@@ -342,8 +357,11 @@ export interface TimePickerBaseProps extends WithAnalyticsEventsProps, PickerSel
342
357
  */
343
358
  onFocus?: React.FocusEventHandler<HTMLElement>;
344
359
  /**
345
- * A function for parsing input characters and transforming them into either a string or a Date object.
346
- * By default parses the string based off the locale.
360
+ * A function for parsing input characters and transforming them into either a
361
+ * string or a Date object. By default parses the string based off the locale.
362
+ * Note that this does not affect how the resulting value is displayed in the
363
+ * input. To handle this, use either the `timeFormat` or `formatDisplayLabel`
364
+ * prop.
347
365
  */
348
366
  parseInputValue?: (time: string, timeFormat: string) => string | Date;
349
367
  /**
@@ -373,7 +391,14 @@ export interface TimePickerBaseProps extends WithAnalyticsEventsProps, PickerSel
373
391
  */
374
392
  hideIcon?: boolean;
375
393
  /**
376
- * Time format that is accepted by [date-fns's format function](https://date-fns.org/v1.29.0/docs/format).
394
+ * Format the time with a string that is accepted by [date-fns's format
395
+ * function](https://date-fns.org/v1.29.0/docs/format). **This does not affect
396
+ * how the input is parsed.** This must be done using the `parseInputValue`
397
+ * prop.
398
+ *
399
+ * Note that though we are using `date-fns` version 2, we use [the tokens from
400
+ * `date-fns` version 1](https://date-fns.org/v1.30.1/docs/format) under the
401
+ * hood.
377
402
  */
378
403
  timeFormat?: string;
379
404
  /**
@@ -185,11 +185,16 @@ export interface DatePickerBaseProps extends WithAnalyticsEventsProps, PickerSel
185
185
  openCalendarLabel?: string;
186
186
  /**
187
187
  * A function for parsing input characters and transforming them into a Date object.
188
- * By default parses the date string based off the locale.
188
+ * By default parses the date string based off the locale. Note that this does
189
+ * not affect how the resulting value is displayed in the input. Use the
190
+ * `dateFormat` or `formatDisplayLabel` prop to handle how the value is
191
+ * displayed.
189
192
  */
190
193
  parseInputValue?: (date: string, dateFormat: string) => Date;
191
194
  /**
192
195
  * A function for formatting the date displayed in the input. By default composes together [`date-fns`'s parse method](https://date-fns.org/v1.29.0/docs/parse) and [`date-fns`'s format method](https://date-fns.org/v1.29.0/docs/format) to return a correctly formatted date string.
196
+ *
197
+ * Note that this does not affect how the input is parsed. This must be done using the `parseInputValue` prop.
193
198
  */
194
199
  formatDisplayLabel?: (value: string, dateFormat: string) => string;
195
200
  /**
@@ -228,9 +233,14 @@ export interface DatePickerBaseProps extends WithAnalyticsEventsProps, PickerSel
228
233
  */
229
234
  hideIcon?: boolean;
230
235
  /**
231
- * Format the date with a string that is accepted by [date-fn's format function](https://date-fns.org/v1.29.0/docs/format).
236
+ * Format the date with a string that is accepted by [date-fns's format
237
+ * function](https://date-fns.org/v1.29.0/docs/format). **This does not affect
238
+ * how the input is parsed.** This must be done using the `parseInputValue`
239
+ * prop.
232
240
  *
233
- * Note that though we are using `date-fns` version 2, we use [the tokens from `date-fns` version 1](https://date-fns.org/v1.30.1/docs/format) under the hood.
241
+ * Note that though we are using `date-fns` version 2, we use [the tokens from
242
+ * `date-fns` version 1](https://date-fns.org/v1.30.1/docs/format) under the
243
+ * hood.
234
244
  */
235
245
  dateFormat?: string;
236
246
  /**
@@ -294,7 +304,12 @@ export interface TimePickerBaseProps extends WithAnalyticsEventsProps, PickerSel
294
304
  */
295
305
  defaultValue?: string;
296
306
  /**
297
- * A function for formatting the displayed time value in the input. By default parses with an internal time parser, and formats using the [date-fns format function]((https://date-fns.org/v1.29.0/docs/format))
307
+ * A function for formatting the displayed time value in the input. By default
308
+ * parses with an internal time parser, and formats using the [date-fns format
309
+ * function]((https://date-fns.org/v1.29.0/docs/format)).
310
+ *
311
+ * Note that this does not affect how the input is parsed. This must be done
312
+ * using the `parseInputValue` prop.
298
313
  */
299
314
  formatDisplayLabel?: (time: string, timeFormat: string) => string;
300
315
  /**
@@ -342,8 +357,11 @@ export interface TimePickerBaseProps extends WithAnalyticsEventsProps, PickerSel
342
357
  */
343
358
  onFocus?: React.FocusEventHandler<HTMLElement>;
344
359
  /**
345
- * A function for parsing input characters and transforming them into either a string or a Date object.
346
- * By default parses the string based off the locale.
360
+ * A function for parsing input characters and transforming them into either a
361
+ * string or a Date object. By default parses the string based off the locale.
362
+ * Note that this does not affect how the resulting value is displayed in the
363
+ * input. To handle this, use either the `timeFormat` or `formatDisplayLabel`
364
+ * prop.
347
365
  */
348
366
  parseInputValue?: (time: string, timeFormat: string) => string | Date;
349
367
  /**
@@ -373,7 +391,14 @@ export interface TimePickerBaseProps extends WithAnalyticsEventsProps, PickerSel
373
391
  */
374
392
  hideIcon?: boolean;
375
393
  /**
376
- * Time format that is accepted by [date-fns's format function](https://date-fns.org/v1.29.0/docs/format).
394
+ * Format the time with a string that is accepted by [date-fns's format
395
+ * function](https://date-fns.org/v1.29.0/docs/format). **This does not affect
396
+ * how the input is parsed.** This must be done using the `parseInputValue`
397
+ * prop.
398
+ *
399
+ * Note that though we are using `date-fns` version 2, we use [the tokens from
400
+ * `date-fns` version 1](https://date-fns.org/v1.30.1/docs/format) under the
401
+ * hood.
377
402
  */
378
403
  timeFormat?: string;
379
404
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/datetime-picker",
3
- "version": "15.10.6",
3
+ "version": "15.11.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/"
@@ -39,9 +39,9 @@
39
39
  "dependencies": {
40
40
  "@atlaskit/analytics-next": "^10.2.0",
41
41
  "@atlaskit/button": "^20.3.1",
42
- "@atlaskit/calendar": "^16.1.0",
42
+ "@atlaskit/calendar": "^16.2.0",
43
43
  "@atlaskit/ds-lib": "^3.3.0",
44
- "@atlaskit/icon": "^23.3.0",
44
+ "@atlaskit/icon": "^23.4.0",
45
45
  "@atlaskit/layering": "^1.0.0",
46
46
  "@atlaskit/locale": "^2.8.0",
47
47
  "@atlaskit/platform-feature-flags": "^0.3.0",
@@ -49,7 +49,7 @@
49
49
  "@atlaskit/primitives": "^13.3.0",
50
50
  "@atlaskit/select": "^18.9.0",
51
51
  "@atlaskit/theme": "^14.0.0",
52
- "@atlaskit/tokens": "^3.0.0",
52
+ "@atlaskit/tokens": "^3.2.0",
53
53
  "@atlaskit/visually-hidden": "^1.5.0",
54
54
  "@babel/runtime": "^7.0.0",
55
55
  "@emotion/react": "^11.7.1",
@@ -76,7 +76,6 @@
76
76
  "@atlassian/feature-flags-test-utils": "*",
77
77
  "@testing-library/react": "^12.1.5",
78
78
  "@testing-library/user-event": "^14.4.3",
79
- "@types/testing-library__jest-dom": "^5.14.5",
80
79
  "jest-in-case": "^1.0.2",
81
80
  "jscodeshift": "^0.13.0",
82
81
  "moment": "^2.29.2",
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
-
3
- import { DatePicker } from '../src';
4
-
5
- export default () => <DatePicker isOpen />;
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
-
3
- import { DateTimePicker } from '../src';
4
-
5
- export default () => <DateTimePicker />;
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
-
3
- import { TimePicker } from '../src';
4
-
5
- export default () => <TimePicker isOpen />;