@atlaskit/give-kudos 4.2.0 → 4.3.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 +12 -0
- package/dist/cjs/types.js +5 -1
- package/dist/cjs/ui/GiveKudosLauncher/main.js +2 -1
- package/dist/es2019/types.js +5 -1
- package/dist/es2019/ui/GiveKudosLauncher/main.js +2 -1
- package/dist/esm/types.js +5 -1
- package/dist/esm/ui/GiveKudosLauncher/main.js +2 -1
- package/dist/types/types.d.ts +5 -0
- package/dist/types-ts4.5/types.d.ts +5 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlassian/give-kudos
|
|
2
2
|
|
|
3
|
+
## 4.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#158114](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/158114)
|
|
8
|
+
[`68a4a8356d5bf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/68a4a8356d5bf) -
|
|
9
|
+
New prop for prepopulating kudos user picker via project key or goal key
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 4.2.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/dist/cjs/types.js
CHANGED
|
@@ -21,4 +21,8 @@ var FlagEventType = exports.FlagEventType = /*#__PURE__*/function (FlagEventType
|
|
|
21
21
|
}({});
|
|
22
22
|
var isFlagEventTypeValue = exports.isFlagEventTypeValue = function isFlagEventTypeValue(value) {
|
|
23
23
|
return Object.values(FlagEventType).includes(value);
|
|
24
|
-
};
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
// The kudos user picker can be prepopulated with
|
|
27
|
+
// contributors from a project or
|
|
28
|
+
// members of contributing teams from a goal
|
|
@@ -241,7 +241,8 @@ var GiveKudosLauncher = function GiveKudosLauncher(props) {
|
|
|
241
241
|
handleCloseDrawerClickedFuncRef.current();
|
|
242
242
|
};
|
|
243
243
|
var recipientParam = props.recipient ? "&type=".concat(props.recipient.type, "&recipientId=").concat(props.recipient.recipientId) : '';
|
|
244
|
-
var
|
|
244
|
+
var populateRecipientsViaParam = props.prepopulateRecipientsVia ? "&entityType=".concat(props.prepopulateRecipientsVia.entityType, "&entityARI=").concat(props.prepopulateRecipientsVia.entityARI) : '';
|
|
245
|
+
var giveKudosUrl = "".concat(props.teamCentralBaseUrl, "/give-kudos?cloudId=").concat(props.cloudId).concat(recipientParam).concat(populateRecipientsViaParam, "&unsavedMessage=").concat(intl.formatMessage(_messages.default.unsavedKudosWarning));
|
|
245
246
|
var renderDrawer = (0, _react.useMemo)(function () {
|
|
246
247
|
if (props.isOpen) {
|
|
247
248
|
sendAnalytic('opened', {});
|
package/dist/es2019/types.js
CHANGED
|
@@ -15,4 +15,8 @@ export let FlagEventType = /*#__PURE__*/function (FlagEventType) {
|
|
|
15
15
|
}({});
|
|
16
16
|
export const isFlagEventTypeValue = value => {
|
|
17
17
|
return Object.values(FlagEventType).includes(value);
|
|
18
|
-
};
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// The kudos user picker can be prepopulated with
|
|
21
|
+
// contributors from a project or
|
|
22
|
+
// members of contributing teams from a goal
|
|
@@ -221,7 +221,8 @@ const GiveKudosLauncher = props => {
|
|
|
221
221
|
handleCloseDrawerClickedFuncRef.current();
|
|
222
222
|
};
|
|
223
223
|
const recipientParam = props.recipient ? `&type=${props.recipient.type}&recipientId=${props.recipient.recipientId}` : '';
|
|
224
|
-
const
|
|
224
|
+
const populateRecipientsViaParam = props.prepopulateRecipientsVia ? `&entityType=${props.prepopulateRecipientsVia.entityType}&entityARI=${props.prepopulateRecipientsVia.entityARI}` : '';
|
|
225
|
+
const giveKudosUrl = `${props.teamCentralBaseUrl}/give-kudos?cloudId=${props.cloudId}${recipientParam}${populateRecipientsViaParam}&unsavedMessage=${intl.formatMessage(messages.unsavedKudosWarning)}`;
|
|
225
226
|
const renderDrawer = useMemo(() => {
|
|
226
227
|
if (props.isOpen) {
|
|
227
228
|
sendAnalytic('opened', {});
|
package/dist/esm/types.js
CHANGED
|
@@ -15,4 +15,8 @@ export var FlagEventType = /*#__PURE__*/function (FlagEventType) {
|
|
|
15
15
|
}({});
|
|
16
16
|
export var isFlagEventTypeValue = function isFlagEventTypeValue(value) {
|
|
17
17
|
return Object.values(FlagEventType).includes(value);
|
|
18
|
-
};
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// The kudos user picker can be prepopulated with
|
|
21
|
+
// contributors from a project or
|
|
22
|
+
// members of contributing teams from a goal
|
|
@@ -231,7 +231,8 @@ var GiveKudosLauncher = function GiveKudosLauncher(props) {
|
|
|
231
231
|
handleCloseDrawerClickedFuncRef.current();
|
|
232
232
|
};
|
|
233
233
|
var recipientParam = props.recipient ? "&type=".concat(props.recipient.type, "&recipientId=").concat(props.recipient.recipientId) : '';
|
|
234
|
-
var
|
|
234
|
+
var populateRecipientsViaParam = props.prepopulateRecipientsVia ? "&entityType=".concat(props.prepopulateRecipientsVia.entityType, "&entityARI=").concat(props.prepopulateRecipientsVia.entityARI) : '';
|
|
235
|
+
var giveKudosUrl = "".concat(props.teamCentralBaseUrl, "/give-kudos?cloudId=").concat(props.cloudId).concat(recipientParam).concat(populateRecipientsViaParam, "&unsavedMessage=").concat(intl.formatMessage(messages.unsavedKudosWarning));
|
|
235
236
|
var renderDrawer = useMemo(function () {
|
|
236
237
|
if (props.isOpen) {
|
|
237
238
|
sendAnalytic('opened', {});
|
package/dist/types/types.d.ts
CHANGED
|
@@ -32,6 +32,10 @@ export interface KudosRecipient {
|
|
|
32
32
|
type: KudosType;
|
|
33
33
|
recipientId: string;
|
|
34
34
|
}
|
|
35
|
+
export interface PrepopulateRecipientsVia {
|
|
36
|
+
entityType: 'PROJECT' | 'GOAL';
|
|
37
|
+
entityARI: string;
|
|
38
|
+
}
|
|
35
39
|
export interface FlagEvent {
|
|
36
40
|
eventType: FlagEventType;
|
|
37
41
|
kudosUuid?: string;
|
|
@@ -44,6 +48,7 @@ export interface GiveKudosDrawerProps {
|
|
|
44
48
|
onClose: () => void;
|
|
45
49
|
analyticsSource: string;
|
|
46
50
|
recipient?: KudosRecipient;
|
|
51
|
+
prepopulateRecipientsVia?: PrepopulateRecipientsVia;
|
|
47
52
|
teamCentralBaseUrl: string;
|
|
48
53
|
cloudId: string;
|
|
49
54
|
addFlag?: (flag: any) => void;
|
|
@@ -32,6 +32,10 @@ export interface KudosRecipient {
|
|
|
32
32
|
type: KudosType;
|
|
33
33
|
recipientId: string;
|
|
34
34
|
}
|
|
35
|
+
export interface PrepopulateRecipientsVia {
|
|
36
|
+
entityType: 'PROJECT' | 'GOAL';
|
|
37
|
+
entityARI: string;
|
|
38
|
+
}
|
|
35
39
|
export interface FlagEvent {
|
|
36
40
|
eventType: FlagEventType;
|
|
37
41
|
kudosUuid?: string;
|
|
@@ -44,6 +48,7 @@ export interface GiveKudosDrawerProps {
|
|
|
44
48
|
onClose: () => void;
|
|
45
49
|
analyticsSource: string;
|
|
46
50
|
recipient?: KudosRecipient;
|
|
51
|
+
prepopulateRecipientsVia?: PrepopulateRecipientsVia;
|
|
47
52
|
teamCentralBaseUrl: string;
|
|
48
53
|
cloudId: string;
|
|
49
54
|
addFlag?: (flag: any) => void;
|