@atlaskit/profilecard 19.16.0 → 19.16.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,19 @@
1
1
  # @atlaskit/profilecard
2
2
 
3
+ ## 19.16.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 19.16.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [#120020](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/120020)
14
+ [`a047cf9d11d9a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a047cf9d11d9a) -
15
+ PTC-6012 implement localTime in FE, get ready for cloudUser migration
16
+
3
17
  ## 19.16.0
4
18
 
5
19
  ### Minor Changes
@@ -57,7 +57,7 @@ var addHeaders = exports.addHeaders = function addHeaders(headers) {
57
57
  headers.append('X-ExperimentalApi', 'teams-beta');
58
58
  headers.append('X-ExperimentalApi', 'team-members-beta');
59
59
  headers.append('atl-client-name', "@atlaskit/profilecard");
60
- headers.append('atl-client-version', "19.16.0");
60
+ headers.append('atl-client-version', "19.16.2");
61
61
  return headers;
62
62
  };
63
63
  function getTeamFromAGG(_x, _x2, _x3) {
@@ -44,7 +44,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
44
44
  actionSubjectId: actionSubjectId,
45
45
  attributes: _objectSpread(_objectSpread({
46
46
  packageName: "@atlaskit/profilecard",
47
- packageVersion: "19.16.0"
47
+ packageVersion: "19.16.2"
48
48
  }, attributes), {}, {
49
49
  firedAt: Math.round((0, _performance.getPageTime)())
50
50
  })
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.localTime = void 0;
7
+ var _dateFnsTz = require("date-fns-tz");
8
+ var localTime = exports.localTime = function localTime(timezone, format) {
9
+ if (!timezone) {
10
+ return null;
11
+ }
12
+ try {
13
+ return (0, _dateFnsTz.formatInTimeZone)(new Date(), timezone, format);
14
+ } catch (error) {
15
+ return null;
16
+ }
17
+ };
@@ -67,7 +67,7 @@ export const addHeaders = headers => {
67
67
  headers.append('X-ExperimentalApi', 'teams-beta');
68
68
  headers.append('X-ExperimentalApi', 'team-members-beta');
69
69
  headers.append('atl-client-name', "@atlaskit/profilecard");
70
- headers.append('atl-client-version', "19.16.0");
70
+ headers.append('atl-client-version', "19.16.2");
71
71
  return headers;
72
72
  };
73
73
  export async function getTeamFromAGG(url, teamId, siteId) {
@@ -31,7 +31,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
31
31
  actionSubjectId,
32
32
  attributes: {
33
33
  packageName: "@atlaskit/profilecard",
34
- packageVersion: "19.16.0",
34
+ packageVersion: "19.16.2",
35
35
  ...attributes,
36
36
  firedAt: Math.round(getPageTime())
37
37
  }
@@ -0,0 +1,11 @@
1
+ import { formatInTimeZone } from 'date-fns-tz';
2
+ export const localTime = (timezone, format) => {
3
+ if (!timezone) {
4
+ return null;
5
+ }
6
+ try {
7
+ return formatInTimeZone(new Date(), timezone, format);
8
+ } catch (error) {
9
+ return null;
10
+ }
11
+ };
@@ -48,7 +48,7 @@ export var addHeaders = function addHeaders(headers) {
48
48
  headers.append('X-ExperimentalApi', 'teams-beta');
49
49
  headers.append('X-ExperimentalApi', 'team-members-beta');
50
50
  headers.append('atl-client-name', "@atlaskit/profilecard");
51
- headers.append('atl-client-version', "19.16.0");
51
+ headers.append('atl-client-version', "19.16.2");
52
52
  return headers;
53
53
  };
54
54
  export function getTeamFromAGG(_x, _x2, _x3) {
@@ -38,7 +38,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
38
38
  actionSubjectId: actionSubjectId,
39
39
  attributes: _objectSpread(_objectSpread({
40
40
  packageName: "@atlaskit/profilecard",
41
- packageVersion: "19.16.0"
41
+ packageVersion: "19.16.2"
42
42
  }, attributes), {}, {
43
43
  firedAt: Math.round(getPageTime())
44
44
  })
@@ -0,0 +1,11 @@
1
+ import { formatInTimeZone } from 'date-fns-tz';
2
+ export var localTime = function localTime(timezone, format) {
3
+ if (!timezone) {
4
+ return null;
5
+ }
6
+ try {
7
+ return formatInTimeZone(new Date(), timezone, format);
8
+ } catch (error) {
9
+ return null;
10
+ }
11
+ };
@@ -0,0 +1 @@
1
+ export declare const localTime: (timezone: string, format: string) => string | null;
@@ -0,0 +1 @@
1
+ export declare const localTime: (timezone: string, format: string) => string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "19.16.0",
3
+ "version": "19.16.2",
4
4
  "description": "A React component to display a card with user information.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -56,25 +56,26 @@
56
56
  "@atlaskit/atlassian-context": "^0.0.0",
57
57
  "@atlaskit/avatar": "^21.11.0",
58
58
  "@atlaskit/avatar-group": "^9.9.0",
59
- "@atlaskit/button": "^18.4.0",
59
+ "@atlaskit/button": "^19.0.0",
60
60
  "@atlaskit/dropdown-menu": "^12.14.0",
61
61
  "@atlaskit/empty-state": "^7.9.0",
62
62
  "@atlaskit/focus-ring": "^1.5.0",
63
63
  "@atlaskit/give-kudos": "^2.1.1",
64
64
  "@atlaskit/icon": "^22.6.0",
65
65
  "@atlaskit/lozenge": "^11.9.0",
66
- "@atlaskit/menu": "^2.7.0",
66
+ "@atlaskit/menu": "^2.8.0",
67
67
  "@atlaskit/platform-feature-flags": "^0.3.0",
68
68
  "@atlaskit/popup": "^1.20.0",
69
69
  "@atlaskit/primitives": "^11.0.0",
70
70
  "@atlaskit/spinner": "^16.2.0",
71
71
  "@atlaskit/theme": "^12.11.0",
72
- "@atlaskit/tokens": "^1.54.0",
72
+ "@atlaskit/tokens": "^1.56.0",
73
73
  "@atlaskit/tooltip": "^18.5.0",
74
74
  "@babel/runtime": "^7.0.0",
75
75
  "@emotion/react": "^11.7.1",
76
76
  "@emotion/styled": "^11.0.0",
77
77
  "date-fns": "^2.17.0",
78
+ "date-fns-tz": "^2.0.0",
78
79
  "lodash": "^4.17.21",
79
80
  "lru_map": "^0.4.1",
80
81
  "react-intl-next": "npm:react-intl@^5.18.1"