@atlaskit/give-kudos 4.8.0 → 4.8.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,12 @@
|
|
|
1
1
|
# @atlassian/give-kudos
|
|
2
2
|
|
|
3
|
+
## 4.8.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`618326bff43d8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/618326bff43d8) -
|
|
8
|
+
PTC-15081: Add analytics for user profile tabs - hierarchy/goals/projects/kudos
|
|
9
|
+
|
|
3
10
|
## 4.8.0
|
|
4
11
|
|
|
5
12
|
### 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);
|
package/dist/types/types.d.ts
CHANGED
|
@@ -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 {};
|