@atlaskit/give-kudos 4.8.0 → 4.9.0

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
  # @atlassian/give-kudos
2
2
 
3
+ ## 4.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`09c3b35420464`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/09c3b35420464) -
8
+ Update i18n NPM package versions for townsquare,team-central (Group 10)
9
+
10
+ ## 4.8.1
11
+
12
+ ### Patch Changes
13
+
14
+ - [`618326bff43d8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/618326bff43d8) -
15
+ PTC-15081: Add analytics for user profile tabs - hierarchy/goals/projects/kudos
16
+
3
17
  ## 4.8.0
4
18
 
5
19
  ### Minor Changes
@@ -80,10 +80,10 @@ var GiveKudosLauncher = function GiveKudosLauncher(props) {
80
80
  teamId: ((_props$recipient = props.recipient) === null || _props$recipient === void 0 ? void 0 : _props$recipient.type) === _types.KudosType.TEAM ? props.recipient.recipientId : undefined,
81
81
  KudosType: (_props$recipient2 = props.recipient) === null || _props$recipient2 === void 0 ? void 0 : _props$recipient2.type,
82
82
  recipientId: (_props$recipient3 = props.recipient) === null || _props$recipient3 === void 0 ? void 0 : _props$recipient3.recipientId
83
- })
83
+ }, action === 'opened' && props.openedEventAttributes)
84
84
  });
85
85
  analyticsEvent.fire(ANALYTICS_CHANNEL);
86
- }, [analyticsSource, createAnalyticsEvent, props.recipient]);
86
+ }, [analyticsSource, createAnalyticsEvent, props.recipient, props.openedEventAttributes]);
87
87
  var closeDrawer = (0, _react.useCallback)(function () {
88
88
  setIsDirty(false);
89
89
  setIsCloseConfirmModalOpen(false);
@@ -63,11 +63,12 @@ const GiveKudosLauncher = props => {
63
63
  analyticsSource,
64
64
  teamId: ((_props$recipient = props.recipient) === null || _props$recipient === void 0 ? void 0 : _props$recipient.type) === KudosType.TEAM ? props.recipient.recipientId : undefined,
65
65
  KudosType: (_props$recipient2 = props.recipient) === null || _props$recipient2 === void 0 ? void 0 : _props$recipient2.type,
66
- recipientId: (_props$recipient3 = props.recipient) === null || _props$recipient3 === void 0 ? void 0 : _props$recipient3.recipientId
66
+ recipientId: (_props$recipient3 = props.recipient) === null || _props$recipient3 === void 0 ? void 0 : _props$recipient3.recipientId,
67
+ ...(action === 'opened' && props.openedEventAttributes)
67
68
  }
68
69
  });
69
70
  analyticsEvent.fire(ANALYTICS_CHANNEL);
70
- }, [analyticsSource, createAnalyticsEvent, props.recipient]);
71
+ }, [analyticsSource, createAnalyticsEvent, props.recipient, props.openedEventAttributes]);
71
72
  const closeDrawer = useCallback(() => {
72
73
  setIsDirty(false);
73
74
  setIsCloseConfirmModalOpen(false);
@@ -71,10 +71,10 @@ var GiveKudosLauncher = function GiveKudosLauncher(props) {
71
71
  teamId: ((_props$recipient = props.recipient) === null || _props$recipient === void 0 ? void 0 : _props$recipient.type) === KudosType.TEAM ? props.recipient.recipientId : undefined,
72
72
  KudosType: (_props$recipient2 = props.recipient) === null || _props$recipient2 === void 0 ? void 0 : _props$recipient2.type,
73
73
  recipientId: (_props$recipient3 = props.recipient) === null || _props$recipient3 === void 0 ? void 0 : _props$recipient3.recipientId
74
- })
74
+ }, action === 'opened' && props.openedEventAttributes)
75
75
  });
76
76
  analyticsEvent.fire(ANALYTICS_CHANNEL);
77
- }, [analyticsSource, createAnalyticsEvent, props.recipient]);
77
+ }, [analyticsSource, createAnalyticsEvent, props.recipient, props.openedEventAttributes]);
78
78
  var closeDrawer = useCallback(function () {
79
79
  setIsDirty(false);
80
80
  setIsCloseConfirmModalOpen(false);
@@ -55,5 +55,9 @@ export interface GiveKudosDrawerProps {
55
55
  onCreateKudosSuccess?: (flagEvent: FlagEvent) => void;
56
56
  isActionsEnabled?: boolean;
57
57
  zIndex?: number;
58
+ /**
59
+ * Optional attributes merged into the createKudos opened analytics event (e.g. isNewUserProfile).
60
+ */
61
+ openedEventAttributes?: Record<string, string | boolean | undefined>;
58
62
  }
59
63
  export {};
@@ -55,5 +55,9 @@ export interface GiveKudosDrawerProps {
55
55
  onCreateKudosSuccess?: (flagEvent: FlagEvent) => void;
56
56
  isActionsEnabled?: boolean;
57
57
  zIndex?: number;
58
+ /**
59
+ * Optional attributes merged into the createKudos opened analytics event (e.g. isNewUserProfile).
60
+ */
61
+ openedEventAttributes?: Record<string, string | boolean | undefined>;
58
62
  }
59
63
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/give-kudos",
3
- "version": "4.8.0",
3
+ "version": "4.9.0",
4
4
  "description": "Give Kudos experience ",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -37,7 +37,7 @@
37
37
  "typecheck": "NODE_OPTIONS=--max-old-space-size=4096 tsc --noEmit --project ./tsconfig.json"
38
38
  },
39
39
  "dependencies": {
40
- "@atlaskit/afm-i18n-platform-team-central-give-kudos": "2.27.0",
40
+ "@atlaskit/afm-i18n-platform-team-central-give-kudos": "2.31.0",
41
41
  "@atlaskit/analytics-next": "^11.1.0",
42
42
  "@atlaskit/button": "^23.9.0",
43
43
  "@atlaskit/css": "^0.19.0",