@atlaskit/datetime-picker 17.5.1 → 17.5.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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/datetime-picker
2
2
 
3
+ ## 17.5.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`5db9e3f21a52f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5db9e3f21a52f) -
8
+ Internal refactoring
9
+ - Updated dependencies
10
+
3
11
  ## 17.5.1
4
12
 
5
13
  ### Patch Changes
@@ -409,7 +409,11 @@ function moveDateTimePickerProps(
409
409
  });
410
410
  }
411
411
 
412
- export default function transformer(fileInfo: FileInfo, { jscodeshift: j }: API, options: Options): string {
412
+ export default function transformer(
413
+ fileInfo: FileInfo,
414
+ { jscodeshift: j }: API,
415
+ options: Options,
416
+ ): string {
413
417
  const { source } = fileInfo;
414
418
  const collection = j(source);
415
419
 
@@ -33,7 +33,11 @@ export function getImportDeclarationCollection(
33
33
  .filter((importDeclarationPath) => importDeclarationPath.node.source.value === importPath);
34
34
  }
35
35
 
36
- export function hasDynamicImport(j: JSCodeshift, collection: Collection<any>, importPath: string): boolean {
36
+ export function hasDynamicImport(
37
+ j: JSCodeshift,
38
+ collection: Collection<any>,
39
+ importPath: string,
40
+ ): boolean {
37
41
  return getDynamicImportCollection(j, collection, importPath).length > 0;
38
42
  }
39
43
 
@@ -82,7 +86,9 @@ export function getImportSpecifierCollection(
82
86
  .filter((importSpecifierPath) => importSpecifierPath.node.imported.name === importName);
83
87
  }
84
88
 
85
- export function getImportSpecifierName(importSpecifierCollection: Collection<ImportSpecifier>): string | null {
89
+ export function getImportSpecifierName(
90
+ importSpecifierCollection: Collection<ImportSpecifier>,
91
+ ): string | null {
86
92
  if (importSpecifierCollection.length === 0) {
87
93
  return null;
88
94
  }
@@ -207,7 +213,12 @@ export function getJSXSpreadObjectExpressionAttributesByName(
207
213
  );
208
214
  }
209
215
 
210
- export const createRemoveFuncFor: (component: string, importName: string, prop: string, comment?: string) => (j: core.JSCodeshift, source: Collection<Node>) => void =
216
+ export const createRemoveFuncFor: (
217
+ component: string,
218
+ importName: string,
219
+ prop: string,
220
+ comment?: string,
221
+ ) => (j: core.JSCodeshift, source: Collection<Node>) => void =
211
222
  (component: string, importName: string, prop: string, comment?: string) =>
212
223
  (j: core.JSCodeshift, source: Collection<Node>) => {
213
224
  const specifier = getNamedSpecifier(j, source, component, importName);
@@ -226,7 +237,11 @@ export const createRemoveFuncFor: (component: string, importName: string, prop:
226
237
  });
227
238
  };
228
239
 
229
- export const getJSXAttributeByName: (j: JSCodeshift, jsxElementPath: ASTPath<JSXElement>, attributeName: string) => JSXAttribute | undefined = (
240
+ export const getJSXAttributeByName: (
241
+ j: JSCodeshift,
242
+ jsxElementPath: ASTPath<JSXElement>,
243
+ attributeName: string,
244
+ ) => JSXAttribute | undefined = (
230
245
  j: JSCodeshift,
231
246
  jsxElementPath: ASTPath<JSXElement>,
232
247
  attributeName: string,
@@ -236,11 +251,11 @@ export const getJSXAttributeByName: (j: JSCodeshift, jsxElementPath: ASTPath<JSX
236
251
  return attributes?.find((attr) => attr.name && attr.name.name === attributeName);
237
252
  };
238
253
 
239
- export const addJSXAttributeToJSXElement: (j: JSCodeshift, jsxElementPath: ASTPath<JSXElement>, jsxAttribute: JSXAttribute) => void = (
254
+ export const addJSXAttributeToJSXElement: (
240
255
  j: JSCodeshift,
241
256
  jsxElementPath: ASTPath<JSXElement>,
242
257
  jsxAttribute: JSXAttribute,
243
- ) => {
258
+ ) => void = (j: JSCodeshift, jsxElementPath: ASTPath<JSXElement>, jsxAttribute: JSXAttribute) => {
244
259
  j(jsxElementPath)
245
260
  .find(j.JSXOpeningElement)
246
261
  .forEach((openingElement) => {
@@ -248,11 +263,11 @@ export const addJSXAttributeToJSXElement: (j: JSCodeshift, jsxElementPath: ASTPa
248
263
  });
249
264
  };
250
265
 
251
- export const removeJSXAttributeByName: (j: JSCodeshift, jsxElementPath: ASTPath<JSXElement>, attrName: string) => void = (
266
+ export const removeJSXAttributeByName: (
252
267
  j: JSCodeshift,
253
268
  jsxElementPath: ASTPath<JSXElement>,
254
269
  attrName: string,
255
- ) => {
270
+ ) => void = (j: JSCodeshift, jsxElementPath: ASTPath<JSXElement>, attrName: string) => {
256
271
  const attributes = getJSXAttributes(jsxElementPath);
257
272
  const attr = getJSXAttributeByName(j, jsxElementPath, attrName);
258
273
  if (attr) {
@@ -260,10 +275,16 @@ export const removeJSXAttributeByName: (j: JSCodeshift, jsxElementPath: ASTPath<
260
275
  }
261
276
  };
262
277
 
263
- export const getJSXAttributes: (jsxElementPath: ASTPath<JSXElement>) => JSXAttribute[] = (jsxElementPath: ASTPath<JSXElement>) =>
264
- jsxElementPath.node.openingElement.attributes as JSXAttribute[];
278
+ export const getJSXAttributes: (jsxElementPath: ASTPath<JSXElement>) => JSXAttribute[] = (
279
+ jsxElementPath: ASTPath<JSXElement>,
280
+ ) => jsxElementPath.node.openingElement.attributes as JSXAttribute[];
265
281
 
266
- export const removeJSXAttributeObjectPropertyByName: (j: JSCodeshift, jsxElementPath: ASTPath<JSXElement>, attrName: string, propertyToRemove: string) => void = (
282
+ export const removeJSXAttributeObjectPropertyByName: (
283
+ j: JSCodeshift,
284
+ jsxElementPath: ASTPath<JSXElement>,
285
+ attrName: string,
286
+ propertyToRemove: string,
287
+ ) => void = (
267
288
  j: JSCodeshift,
268
289
  jsxElementPath: ASTPath<JSXElement>,
269
290
  attrName: string,
@@ -1,4 +1,4 @@
1
- ._154ize3t{top:var(--ds-space-0,0)}
1
+ ._152tze3t{inset-block-start:var(--ds-space-0,0)}
2
2
  ._1pbyowjs{z-index:300}
3
3
  ._bfhk1j28{background-color:transparent}
4
4
  ._kqswstnw{position:absolute}
@@ -21,7 +21,7 @@ var _popper = require("@atlaskit/popper");
21
21
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
22
22
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
23
23
  var styles = {
24
- root: "_bfhk1j28 _kqswstnw _154ize3t",
24
+ root: "_bfhk1j28 _kqswstnw _152tze3t",
25
25
  popperStyles: "_1pbyowjs"
26
26
  };
27
27
  /**
@@ -86,9 +86,7 @@ var FixedLayer = exports.default = /*#__PURE__*/function (_React$Component) {
86
86
  update = _ref2.update;
87
87
  _this2.update = update;
88
88
  return /*#__PURE__*/_react.default.createElement("div", {
89
- ref: ref
90
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
91
- ,
89
+ ref: ref,
92
90
  style: style,
93
91
  "data-testid": testId && "".concat(testId, "--popper--container"),
94
92
  className: (0, _runtime.ax)([styles.popperStyles])
@@ -1,4 +1,4 @@
1
- ._154ize3t{top:var(--ds-space-0,0)}
1
+ ._152tze3t{inset-block-start:var(--ds-space-0,0)}
2
2
  ._1pbyowjs{z-index:300}
3
3
  ._bfhk1j28{background-color:transparent}
4
4
  ._kqswstnw{position:absolute}
@@ -7,7 +7,7 @@ import noop from '@atlaskit/ds-lib/noop';
7
7
  import { sizes } from '@atlaskit/icon';
8
8
  import { Manager, Popper, Reference } from '@atlaskit/popper';
9
9
  const styles = {
10
- root: "_bfhk1j28 _kqswstnw _154ize3t",
10
+ root: "_bfhk1j28 _kqswstnw _152tze3t",
11
11
  popperStyles: "_1pbyowjs"
12
12
  };
13
13
  /**
@@ -61,9 +61,7 @@ export default class FixedLayer extends React.Component {
61
61
  }) => {
62
62
  this.update = update;
63
63
  return /*#__PURE__*/React.createElement("div", {
64
- ref: ref
65
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
66
- ,
64
+ ref: ref,
67
65
  style: style,
68
66
  "data-testid": testId && `${testId}--popper--container`,
69
67
  className: ax([styles.popperStyles])
@@ -1,4 +1,4 @@
1
- ._154ize3t{top:var(--ds-space-0,0)}
1
+ ._152tze3t{inset-block-start:var(--ds-space-0,0)}
2
2
  ._1pbyowjs{z-index:300}
3
3
  ._bfhk1j28{background-color:transparent}
4
4
  ._kqswstnw{position:absolute}
@@ -14,7 +14,7 @@ import noop from '@atlaskit/ds-lib/noop';
14
14
  import { sizes } from '@atlaskit/icon';
15
15
  import { Manager, Popper, Reference } from '@atlaskit/popper';
16
16
  var styles = {
17
- root: "_bfhk1j28 _kqswstnw _154ize3t",
17
+ root: "_bfhk1j28 _kqswstnw _152tze3t",
18
18
  popperStyles: "_1pbyowjs"
19
19
  };
20
20
  /**
@@ -79,9 +79,7 @@ var FixedLayer = /*#__PURE__*/function (_React$Component) {
79
79
  update = _ref2.update;
80
80
  _this2.update = update;
81
81
  return /*#__PURE__*/React.createElement("div", {
82
- ref: ref
83
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
84
- ,
82
+ ref: ref,
85
83
  style: style,
86
84
  "data-testid": testId && "".concat(testId, "--popper--container"),
87
85
  className: ax([styles.popperStyles])
@@ -51,8 +51,8 @@ export { DateTimePickerComponent as DateTimePickerWithoutAnalytics };
51
51
  * - [Code](https://atlassian.design/components/datetime-picker/code)
52
52
  * - [Usage](https://atlassian.design/components/datetime-picker/usage)
53
53
  */
54
- declare const DateTimePicker: React.ForwardRefExoticComponent<Omit<Omit<Pick<Omit<DateTimePickerBaseProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, never> & {
55
- appearance?: import("..").Appearance | undefined;
54
+ declare const DateTimePicker: React.ForwardRefExoticComponent<Omit<Omit<Pick<Omit<DateTimePickerBaseProps, keyof import('@atlaskit/analytics-next').WithAnalyticsEventsProps>, never> & {
55
+ appearance?: import('..').Appearance | undefined;
56
56
  isDisabled?: boolean | undefined;
57
57
  innerProps?: React.AllHTMLAttributes<HTMLElement> | undefined;
58
58
  defaultValue?: string | undefined;
@@ -69,9 +69,9 @@ declare const DateTimePicker: React.ForwardRefExoticComponent<Omit<Omit<Pick<Omi
69
69
  clearControlLabel?: string | undefined;
70
70
  isInvalid?: boolean | undefined;
71
71
  isRequired?: boolean | undefined;
72
- spacing?: import("..").Spacing | undefined;
73
- datePickerProps?: import("..").DatePickerProps | undefined;
74
- timePickerProps?: import("..").TimePickerProps | undefined;
72
+ spacing?: import('..').Spacing | undefined;
73
+ datePickerProps?: import('..').DatePickerProps | undefined;
74
+ timePickerProps?: import('..').TimePickerProps | undefined;
75
75
  parseValue?: ((dateTimeValue: string, date: string, time: string, timezone: string) => {
76
76
  dateValue: string;
77
77
  timeValue: string;
@@ -79,6 +79,6 @@ declare const DateTimePicker: React.ForwardRefExoticComponent<Omit<Omit<Pick<Omi
79
79
  }) | undefined;
80
80
  } & {
81
81
  ref?: React.Ref<any> | undefined;
82
- createAnalyticsEvent?: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | undefined;
83
- }, "ref"> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "ref"> & React.RefAttributes<any>>;
82
+ createAnalyticsEvent?: import('@atlaskit/analytics-next').CreateUIAnalyticsEvent | undefined;
83
+ }, 'ref'> & React.RefAttributes<any> & import('@atlaskit/analytics-next').WithContextProps, 'ref'> & React.RefAttributes<any>>;
84
84
  export default DateTimePicker;
@@ -1,5 +1,5 @@
1
- declare const DateTimePicker: import("react").FC<Omit<Omit<import("..").DateTimePickerProps, "ref"> & import("react").RefAttributes<HTMLElement>, "ref"> & Omit<Omit<Omit<Pick<Omit<import("..").DateTimePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, never> & {
2
- appearance?: import("..").Appearance | undefined;
1
+ declare const DateTimePicker: import('react').FC<Omit<Omit<import('..').DateTimePickerProps, 'ref'> & import('react').RefAttributes<HTMLElement>, 'ref'> & Omit<Omit<Omit<Pick<Omit<import('..').DateTimePickerProps, keyof import('@atlaskit/analytics-next').WithAnalyticsEventsProps>, never> & {
2
+ appearance?: import('..').Appearance | undefined;
3
3
  isDisabled?: boolean | undefined;
4
4
  innerProps?: React.AllHTMLAttributes<HTMLElement> | undefined;
5
5
  defaultValue?: string | undefined;
@@ -16,9 +16,9 @@ declare const DateTimePicker: import("react").FC<Omit<Omit<import("..").DateTime
16
16
  clearControlLabel?: string | undefined;
17
17
  isInvalid?: boolean | undefined;
18
18
  isRequired?: boolean | undefined;
19
- spacing?: import("..").Spacing | undefined;
20
- datePickerProps?: import("..").DatePickerProps | undefined;
21
- timePickerProps?: import("..").TimePickerProps | undefined;
19
+ spacing?: import('..').Spacing | undefined;
20
+ datePickerProps?: import('..').DatePickerProps | undefined;
21
+ timePickerProps?: import('..').TimePickerProps | undefined;
22
22
  parseValue?: ((dateTimeValue: string, date: string, time: string, timezone: string) => {
23
23
  dateValue: string;
24
24
  timeValue: string;
@@ -26,6 +26,6 @@ declare const DateTimePicker: import("react").FC<Omit<Omit<import("..").DateTime
26
26
  }) | undefined;
27
27
  } & {
28
28
  ref?: React.Ref<any> | undefined;
29
- createAnalyticsEvent?: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | undefined;
30
- }, "ref"> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "ref"> & import("react").RefAttributes<any>, "ref"> & import("react").RefAttributes<any>>;
29
+ createAnalyticsEvent?: import('@atlaskit/analytics-next').CreateUIAnalyticsEvent | undefined;
30
+ }, 'ref'> & import('react').RefAttributes<any> & import('@atlaskit/analytics-next').WithContextProps, 'ref'> & import('react').RefAttributes<any>, 'ref'> & import('react').RefAttributes<any>>;
31
31
  export default DateTimePicker;
@@ -51,8 +51,8 @@ export { DateTimePickerComponent as DateTimePickerWithoutAnalytics };
51
51
  * - [Code](https://atlassian.design/components/datetime-picker/code)
52
52
  * - [Usage](https://atlassian.design/components/datetime-picker/usage)
53
53
  */
54
- declare const DateTimePicker: React.ForwardRefExoticComponent<Omit<Omit<Pick<Omit<DateTimePickerBaseProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, never> & {
55
- appearance?: import("..").Appearance | undefined;
54
+ declare const DateTimePicker: React.ForwardRefExoticComponent<Omit<Omit<Pick<Omit<DateTimePickerBaseProps, keyof import('@atlaskit/analytics-next').WithAnalyticsEventsProps>, never> & {
55
+ appearance?: import('..').Appearance | undefined;
56
56
  isDisabled?: boolean | undefined;
57
57
  innerProps?: React.AllHTMLAttributes<HTMLElement> | undefined;
58
58
  defaultValue?: string | undefined;
@@ -69,9 +69,9 @@ declare const DateTimePicker: React.ForwardRefExoticComponent<Omit<Omit<Pick<Omi
69
69
  clearControlLabel?: string | undefined;
70
70
  isInvalid?: boolean | undefined;
71
71
  isRequired?: boolean | undefined;
72
- spacing?: import("..").Spacing | undefined;
73
- datePickerProps?: import("..").DatePickerProps | undefined;
74
- timePickerProps?: import("..").TimePickerProps | undefined;
72
+ spacing?: import('..').Spacing | undefined;
73
+ datePickerProps?: import('..').DatePickerProps | undefined;
74
+ timePickerProps?: import('..').TimePickerProps | undefined;
75
75
  parseValue?: ((dateTimeValue: string, date: string, time: string, timezone: string) => {
76
76
  dateValue: string;
77
77
  timeValue: string;
@@ -79,6 +79,6 @@ declare const DateTimePicker: React.ForwardRefExoticComponent<Omit<Omit<Pick<Omi
79
79
  }) | undefined;
80
80
  } & {
81
81
  ref?: React.Ref<any> | undefined;
82
- createAnalyticsEvent?: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | undefined;
83
- }, "ref"> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "ref"> & React.RefAttributes<any>>;
82
+ createAnalyticsEvent?: import('@atlaskit/analytics-next').CreateUIAnalyticsEvent | undefined;
83
+ }, 'ref'> & React.RefAttributes<any> & import('@atlaskit/analytics-next').WithContextProps, 'ref'> & React.RefAttributes<any>>;
84
84
  export default DateTimePicker;
@@ -1,5 +1,5 @@
1
- declare const DateTimePicker: import("react").FC<Omit<Omit<import("..").DateTimePickerProps, "ref"> & import("react").RefAttributes<HTMLElement>, "ref"> & Omit<Omit<Omit<Pick<Omit<import("..").DateTimePickerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, never> & {
2
- appearance?: import("..").Appearance | undefined;
1
+ declare const DateTimePicker: import('react').FC<Omit<Omit<import('..').DateTimePickerProps, 'ref'> & import('react').RefAttributes<HTMLElement>, 'ref'> & Omit<Omit<Omit<Pick<Omit<import('..').DateTimePickerProps, keyof import('@atlaskit/analytics-next').WithAnalyticsEventsProps>, never> & {
2
+ appearance?: import('..').Appearance | undefined;
3
3
  isDisabled?: boolean | undefined;
4
4
  innerProps?: React.AllHTMLAttributes<HTMLElement> | undefined;
5
5
  defaultValue?: string | undefined;
@@ -16,9 +16,9 @@ declare const DateTimePicker: import("react").FC<Omit<Omit<import("..").DateTime
16
16
  clearControlLabel?: string | undefined;
17
17
  isInvalid?: boolean | undefined;
18
18
  isRequired?: boolean | undefined;
19
- spacing?: import("..").Spacing | undefined;
20
- datePickerProps?: import("..").DatePickerProps | undefined;
21
- timePickerProps?: import("..").TimePickerProps | undefined;
19
+ spacing?: import('..').Spacing | undefined;
20
+ datePickerProps?: import('..').DatePickerProps | undefined;
21
+ timePickerProps?: import('..').TimePickerProps | undefined;
22
22
  parseValue?: ((dateTimeValue: string, date: string, time: string, timezone: string) => {
23
23
  dateValue: string;
24
24
  timeValue: string;
@@ -26,6 +26,6 @@ declare const DateTimePicker: import("react").FC<Omit<Omit<import("..").DateTime
26
26
  }) | undefined;
27
27
  } & {
28
28
  ref?: React.Ref<any> | undefined;
29
- createAnalyticsEvent?: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | undefined;
30
- }, "ref"> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "ref"> & import("react").RefAttributes<any>, "ref"> & import("react").RefAttributes<any>>;
29
+ createAnalyticsEvent?: import('@atlaskit/analytics-next').CreateUIAnalyticsEvent | undefined;
30
+ }, 'ref'> & import('react').RefAttributes<any> & import('@atlaskit/analytics-next').WithContextProps, 'ref'> & import('react').RefAttributes<any>, 'ref'> & import('react').RefAttributes<any>>;
31
31
  export default DateTimePicker;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/datetime-picker",
3
- "version": "17.5.1",
3
+ "version": "17.5.2",
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/"
@@ -58,11 +58,11 @@
58
58
  "@af/visual-regression": "workspace:^",
59
59
  "@atlaskit/code": "^17.4.0",
60
60
  "@atlaskit/codemod-utils": "^4.2.0",
61
- "@atlaskit/docs": "^11.3.0",
61
+ "@atlaskit/docs": "^11.4.0",
62
62
  "@atlaskit/form": "^15.3.0",
63
63
  "@atlaskit/heading": "^5.3.0",
64
64
  "@atlaskit/link": "^3.3.0",
65
- "@atlaskit/modal-dialog": "^14.10.0",
65
+ "@atlaskit/modal-dialog": "^14.11.0",
66
66
  "@atlaskit/popup": "^4.13.0",
67
67
  "@atlaskit/range": "^9.3.0",
68
68
  "@atlaskit/section-message": "^8.12.0",
@@ -108,9 +108,6 @@
108
108
  "dst-date-time-picker-use-functional-component": {
109
109
  "type": "boolean"
110
110
  },
111
- "platform-visual-refresh-icons": {
112
- "type": "boolean"
113
- },
114
111
  "platform-dst-shape-theme-default": {
115
112
  "type": "boolean"
116
113
  }