@atlaskit/give-kudos 4.4.10 → 4.5.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 +13 -0
- package/dist/cjs/common/utils/fetch-messages-for-locale.js +5 -4
- package/dist/cjs/ui/GiveKudosLauncher/main.js +9 -3
- package/dist/es2019/common/utils/fetch-messages-for-locale.js +3 -2
- package/dist/es2019/ui/GiveKudosLauncher/main.js +8 -3
- package/dist/esm/common/utils/fetch-messages-for-locale.js +3 -2
- package/dist/esm/ui/GiveKudosLauncher/main.js +9 -3
- package/dist/types/types.d.ts +1 -0
- package/dist/types-ts4.5/types.d.ts +1 -0
- package/package.json +12 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlassian/give-kudos
|
|
2
2
|
|
|
3
|
+
## 4.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`8e123b2ec5d04`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8e123b2ec5d04) -
|
|
8
|
+
Added zIndex prop to kudos launcher
|
|
9
|
+
|
|
10
|
+
## 4.4.11
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 4.4.10
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -10,6 +10,7 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"))
|
|
|
10
10
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
11
|
var _en = _interopRequireDefault(require("../../i18n/en"));
|
|
12
12
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
13
|
+
function _tsRewriteRelativeImportExtensions(t, e) { return "string" == typeof t && /^\.\.?\//.test(t) ? t.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+)?)\.([cm]?)ts$/i, function (t, s, r, n, o) { return s ? e ? ".jsx" : ".js" : !r || n && o ? r + n + "." + o.toLowerCase() + "js" : t; }) : t; }
|
|
13
14
|
var localeMap = {
|
|
14
15
|
pt: 'pt-BR',
|
|
15
16
|
'pt-PT': 'pt-BR',
|
|
@@ -32,11 +33,11 @@ var fetchMessagesForLocale = exports.fetchMessagesForLocale = /*#__PURE__*/funct
|
|
|
32
33
|
_context.next = 6;
|
|
33
34
|
return function (specifier) {
|
|
34
35
|
return new Promise(function (r) {
|
|
35
|
-
return r(specifier);
|
|
36
|
+
return r("".concat(specifier));
|
|
36
37
|
}).then(function (s) {
|
|
37
38
|
return _interopRequireWildcard(require(s));
|
|
38
39
|
});
|
|
39
|
-
}( /* webpackChunkName: "@atlaskit-internal_@atlassian/team-central-i18n-[request]" */"../../i18n/".concat(targetLocale));
|
|
40
|
+
}( /* webpackChunkName: "@atlaskit-internal_@atlassian/team-central-i18n-[request]" */_tsRewriteRelativeImportExtensions("../../i18n/".concat(targetLocale)));
|
|
40
41
|
case 6:
|
|
41
42
|
_messages = _context.sent;
|
|
42
43
|
return _context.abrupt("return", _messages.default);
|
|
@@ -49,11 +50,11 @@ var fetchMessagesForLocale = exports.fetchMessagesForLocale = /*#__PURE__*/funct
|
|
|
49
50
|
_context.next = 16;
|
|
50
51
|
return function (specifier) {
|
|
51
52
|
return new Promise(function (r) {
|
|
52
|
-
return r(specifier);
|
|
53
|
+
return r("".concat(specifier));
|
|
53
54
|
}).then(function (s) {
|
|
54
55
|
return _interopRequireWildcard(require(s));
|
|
55
56
|
});
|
|
56
|
-
}( /* webpackChunkName: "@atlaskit-internal_@atlassian/team-central-i18n-[request]" */"../../i18n/".concat(parentLocale));
|
|
57
|
+
}( /* webpackChunkName: "@atlaskit-internal_@atlassian/team-central-i18n-[request]" */_tsRewriteRelativeImportExtensions("../../i18n/".concat(parentLocale)));
|
|
57
58
|
case 16:
|
|
58
59
|
_messages2 = _context.sent;
|
|
59
60
|
return _context.abrupt("return", _messages2.default);
|
|
@@ -24,6 +24,7 @@ var _arrowLeft = _interopRequireDefault(require("@atlaskit/icon/core/migration/a
|
|
|
24
24
|
var _intlMessagesProvider = require("@atlaskit/intl-messages-provider");
|
|
25
25
|
var _link = _interopRequireDefault(require("@atlaskit/link"));
|
|
26
26
|
var _modalDialog = _interopRequireWildcard(require("@atlaskit/modal-dialog"));
|
|
27
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
27
28
|
var _portal = _interopRequireDefault(require("@atlaskit/portal"));
|
|
28
29
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
29
30
|
var _constants = require("@atlaskit/theme/constants");
|
|
@@ -61,7 +62,12 @@ var GiveKudosLauncher = function GiveKudosLauncher(props) {
|
|
|
61
62
|
onClose = props.onClose,
|
|
62
63
|
testId = props.testId,
|
|
63
64
|
onCreateKudosSuccess = props.onCreateKudosSuccess,
|
|
64
|
-
isActionsEnabled = props.isActionsEnabled
|
|
65
|
+
isActionsEnabled = props.isActionsEnabled,
|
|
66
|
+
_props$zIndex = props.zIndex,
|
|
67
|
+
zIndex = _props$zIndex === void 0 ? _constants.layers.modal() : _props$zIndex;
|
|
68
|
+
|
|
69
|
+
// TODO: ptc-enable-team-profilecard-package - Remove this block when cleaning up FG
|
|
70
|
+
var zIndexNext = (0, _platformFeatureFlags.fg)('ptc-enable-team-profilecard-package') ? zIndex : _constants.layers.modal();
|
|
65
71
|
var shouldBlockTransition = (0, _react.useCallback)(function (e) {
|
|
66
72
|
e.preventDefault();
|
|
67
73
|
e.returnValue = intl.formatMessage(_messages.default.unsavedKudosWarning);
|
|
@@ -249,7 +255,7 @@ var GiveKudosLauncher = function GiveKudosLauncher(props) {
|
|
|
249
255
|
return /*#__PURE__*/React.createElement(_drawer.Drawer, {
|
|
250
256
|
width: "full",
|
|
251
257
|
isOpen: props.isOpen,
|
|
252
|
-
zIndex:
|
|
258
|
+
zIndex: zIndexNext,
|
|
253
259
|
onClose: handleCloseDrawerClicked
|
|
254
260
|
}, /*#__PURE__*/React.createElement("div", {
|
|
255
261
|
className: (0, _runtime.ax)([styles.drawerCloseButtonContainer])
|
|
@@ -271,7 +277,7 @@ var GiveKudosLauncher = function GiveKudosLauncher(props) {
|
|
|
271
277
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
272
278
|
}, [(_props$recipient4 = props.recipient) === null || _props$recipient4 === void 0 ? void 0 : _props$recipient4.recipientId, props.isOpen]);
|
|
273
279
|
return /*#__PURE__*/React.createElement(_portal.default, {
|
|
274
|
-
zIndex:
|
|
280
|
+
zIndex: zIndexNext
|
|
275
281
|
}, /*#__PURE__*/React.createElement("div", {
|
|
276
282
|
"data-testid": testId
|
|
277
283
|
}, /*#__PURE__*/React.createElement(_modalDialog.ModalTransition, null, isCloseConfirmModalOpen && /*#__PURE__*/React.createElement(_modalDialog.default, {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
function _tsRewriteRelativeImportExtensions(t, e) { return "string" == typeof t && /^\.\.?\//.test(t) ? t.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+)?)\.([cm]?)ts$/i, function (t, s, r, n, o) { return s ? e ? ".jsx" : ".js" : !r || n && o ? r + n + "." + o.toLowerCase() + "js" : t; }) : t; }
|
|
1
2
|
import messages from '../../i18n/en';
|
|
2
3
|
const localeMap = {
|
|
3
4
|
pt: 'pt-BR',
|
|
@@ -11,14 +12,14 @@ export const fetchMessagesForLocale = async locale => {
|
|
|
11
12
|
if (!targetLocale) {
|
|
12
13
|
throw new Error('No mapped locale');
|
|
13
14
|
}
|
|
14
|
-
const messages = await import( /* webpackChunkName: "@atlaskit-internal_@atlassian/team-central-i18n-[request]"
|
|
15
|
+
const messages = await import( /* webpackChunkName: "@atlaskit-internal_@atlassian/team-central-i18n-[request]" */_tsRewriteRelativeImportExtensions(`../../i18n/${targetLocale}`));
|
|
15
16
|
return messages.default;
|
|
16
17
|
} catch (e) {
|
|
17
18
|
// ignore
|
|
18
19
|
}
|
|
19
20
|
try {
|
|
20
21
|
const parentLocale = locale.split(/[-_]/)[0];
|
|
21
|
-
const messages = await import( /* webpackChunkName: "@atlaskit-internal_@atlassian/team-central-i18n-[request]"
|
|
22
|
+
const messages = await import( /* webpackChunkName: "@atlaskit-internal_@atlassian/team-central-i18n-[request]" */_tsRewriteRelativeImportExtensions(`../../i18n/${parentLocale}`));
|
|
22
23
|
return messages.default;
|
|
23
24
|
} catch (e) {
|
|
24
25
|
// ignore
|
|
@@ -14,6 +14,7 @@ import ArrowLeft from '@atlaskit/icon/core/migration/arrow-left';
|
|
|
14
14
|
import { IntlMessagesProvider } from '@atlaskit/intl-messages-provider';
|
|
15
15
|
import Link from '@atlaskit/link';
|
|
16
16
|
import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
|
|
17
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
18
|
import Portal from '@atlaskit/portal';
|
|
18
19
|
import { Inline } from '@atlaskit/primitives/compiled';
|
|
19
20
|
import { layers } from '@atlaskit/theme/constants';
|
|
@@ -44,8 +45,12 @@ const GiveKudosLauncher = props => {
|
|
|
44
45
|
onClose,
|
|
45
46
|
testId,
|
|
46
47
|
onCreateKudosSuccess,
|
|
47
|
-
isActionsEnabled
|
|
48
|
+
isActionsEnabled,
|
|
49
|
+
zIndex = layers.modal()
|
|
48
50
|
} = props;
|
|
51
|
+
|
|
52
|
+
// TODO: ptc-enable-team-profilecard-package - Remove this block when cleaning up FG
|
|
53
|
+
const zIndexNext = fg('ptc-enable-team-profilecard-package') ? zIndex : layers.modal();
|
|
49
54
|
const shouldBlockTransition = useCallback(e => {
|
|
50
55
|
e.preventDefault();
|
|
51
56
|
e.returnValue = intl.formatMessage(messages.unsavedKudosWarning);
|
|
@@ -230,7 +235,7 @@ const GiveKudosLauncher = props => {
|
|
|
230
235
|
return /*#__PURE__*/React.createElement(Drawer, {
|
|
231
236
|
width: "full",
|
|
232
237
|
isOpen: props.isOpen,
|
|
233
|
-
zIndex:
|
|
238
|
+
zIndex: zIndexNext,
|
|
234
239
|
onClose: handleCloseDrawerClicked
|
|
235
240
|
}, /*#__PURE__*/React.createElement("div", {
|
|
236
241
|
className: ax([styles.drawerCloseButtonContainer])
|
|
@@ -252,7 +257,7 @@ const GiveKudosLauncher = props => {
|
|
|
252
257
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
253
258
|
}, [(_props$recipient4 = props.recipient) === null || _props$recipient4 === void 0 ? void 0 : _props$recipient4.recipientId, props.isOpen]);
|
|
254
259
|
return /*#__PURE__*/React.createElement(Portal, {
|
|
255
|
-
zIndex:
|
|
260
|
+
zIndex: zIndexNext
|
|
256
261
|
}, /*#__PURE__*/React.createElement("div", {
|
|
257
262
|
"data-testid": testId
|
|
258
263
|
}, /*#__PURE__*/React.createElement(ModalTransition, null, isCloseConfirmModalOpen && /*#__PURE__*/React.createElement(Modal, {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
2
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
|
+
function _tsRewriteRelativeImportExtensions(t, e) { return "string" == typeof t && /^\.\.?\//.test(t) ? t.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+)?)\.([cm]?)ts$/i, function (t, s, r, n, o) { return s ? e ? ".jsx" : ".js" : !r || n && o ? r + n + "." + o.toLowerCase() + "js" : t; }) : t; }
|
|
3
4
|
import messages from '../../i18n/en';
|
|
4
5
|
var localeMap = {
|
|
5
6
|
pt: 'pt-BR',
|
|
@@ -21,7 +22,7 @@ export var fetchMessagesForLocale = /*#__PURE__*/function () {
|
|
|
21
22
|
throw new Error('No mapped locale');
|
|
22
23
|
case 4:
|
|
23
24
|
_context.next = 6;
|
|
24
|
-
return import( /* webpackChunkName: "@atlaskit-internal_@atlassian/team-central-i18n-[request]" */"../../i18n/".concat(targetLocale));
|
|
25
|
+
return import( /* webpackChunkName: "@atlaskit-internal_@atlassian/team-central-i18n-[request]" */_tsRewriteRelativeImportExtensions(_tsRewriteRelativeImportExtensions("../../i18n/".concat(targetLocale))));
|
|
25
26
|
case 6:
|
|
26
27
|
_messages = _context.sent;
|
|
27
28
|
return _context.abrupt("return", _messages.default);
|
|
@@ -32,7 +33,7 @@ export var fetchMessagesForLocale = /*#__PURE__*/function () {
|
|
|
32
33
|
_context.prev = 12;
|
|
33
34
|
parentLocale = locale.split(/[-_]/)[0];
|
|
34
35
|
_context.next = 16;
|
|
35
|
-
return import( /* webpackChunkName: "@atlaskit-internal_@atlassian/team-central-i18n-[request]" */"../../i18n/".concat(parentLocale));
|
|
36
|
+
return import( /* webpackChunkName: "@atlaskit-internal_@atlassian/team-central-i18n-[request]" */_tsRewriteRelativeImportExtensions(_tsRewriteRelativeImportExtensions("../../i18n/".concat(parentLocale))));
|
|
36
37
|
case 16:
|
|
37
38
|
_messages2 = _context.sent;
|
|
38
39
|
return _context.abrupt("return", _messages2.default);
|
|
@@ -18,6 +18,7 @@ import ArrowLeft from '@atlaskit/icon/core/migration/arrow-left';
|
|
|
18
18
|
import { IntlMessagesProvider } from '@atlaskit/intl-messages-provider';
|
|
19
19
|
import Link from '@atlaskit/link';
|
|
20
20
|
import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
|
|
21
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
21
22
|
import Portal from '@atlaskit/portal';
|
|
22
23
|
import { Inline } from '@atlaskit/primitives/compiled';
|
|
23
24
|
import { layers } from '@atlaskit/theme/constants';
|
|
@@ -52,7 +53,12 @@ var GiveKudosLauncher = function GiveKudosLauncher(props) {
|
|
|
52
53
|
onClose = props.onClose,
|
|
53
54
|
testId = props.testId,
|
|
54
55
|
onCreateKudosSuccess = props.onCreateKudosSuccess,
|
|
55
|
-
isActionsEnabled = props.isActionsEnabled
|
|
56
|
+
isActionsEnabled = props.isActionsEnabled,
|
|
57
|
+
_props$zIndex = props.zIndex,
|
|
58
|
+
zIndex = _props$zIndex === void 0 ? layers.modal() : _props$zIndex;
|
|
59
|
+
|
|
60
|
+
// TODO: ptc-enable-team-profilecard-package - Remove this block when cleaning up FG
|
|
61
|
+
var zIndexNext = fg('ptc-enable-team-profilecard-package') ? zIndex : layers.modal();
|
|
56
62
|
var shouldBlockTransition = useCallback(function (e) {
|
|
57
63
|
e.preventDefault();
|
|
58
64
|
e.returnValue = intl.formatMessage(messages.unsavedKudosWarning);
|
|
@@ -240,7 +246,7 @@ var GiveKudosLauncher = function GiveKudosLauncher(props) {
|
|
|
240
246
|
return /*#__PURE__*/React.createElement(Drawer, {
|
|
241
247
|
width: "full",
|
|
242
248
|
isOpen: props.isOpen,
|
|
243
|
-
zIndex:
|
|
249
|
+
zIndex: zIndexNext,
|
|
244
250
|
onClose: handleCloseDrawerClicked
|
|
245
251
|
}, /*#__PURE__*/React.createElement("div", {
|
|
246
252
|
className: ax([styles.drawerCloseButtonContainer])
|
|
@@ -262,7 +268,7 @@ var GiveKudosLauncher = function GiveKudosLauncher(props) {
|
|
|
262
268
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
263
269
|
}, [(_props$recipient4 = props.recipient) === null || _props$recipient4 === void 0 ? void 0 : _props$recipient4.recipientId, props.isOpen]);
|
|
264
270
|
return /*#__PURE__*/React.createElement(Portal, {
|
|
265
|
-
zIndex:
|
|
271
|
+
zIndex: zIndexNext
|
|
266
272
|
}, /*#__PURE__*/React.createElement("div", {
|
|
267
273
|
"data-testid": testId
|
|
268
274
|
}, /*#__PURE__*/React.createElement(ModalTransition, null, isCloseConfirmModalOpen && /*#__PURE__*/React.createElement(Modal, {
|
package/dist/types/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/give-kudos",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"description": "Give Kudos experience ",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -39,17 +39,18 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@atlaskit/afm-i18n-platform-team-central-give-kudos": "2.9.0",
|
|
41
41
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
42
|
-
"@atlaskit/button": "^23.
|
|
43
|
-
"@atlaskit/css": "^0.
|
|
42
|
+
"@atlaskit/button": "^23.9.0",
|
|
43
|
+
"@atlaskit/css": "^0.19.0",
|
|
44
44
|
"@atlaskit/drawer": "^11.0.0",
|
|
45
|
-
"@atlaskit/icon": "^29.
|
|
45
|
+
"@atlaskit/icon": "^29.3.0",
|
|
46
46
|
"@atlaskit/intl-messages-provider": "^2.0.0",
|
|
47
47
|
"@atlaskit/link": "^3.2.0",
|
|
48
48
|
"@atlaskit/modal-dialog": "^14.9.0",
|
|
49
|
+
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
49
50
|
"@atlaskit/portal": "^5.1.0",
|
|
50
|
-
"@atlaskit/primitives": "^
|
|
51
|
+
"@atlaskit/primitives": "^17.0.0",
|
|
51
52
|
"@atlaskit/theme": "^21.0.0",
|
|
52
|
-
"@atlaskit/tokens": "^
|
|
53
|
+
"@atlaskit/tokens": "^9.0.0",
|
|
53
54
|
"@babel/runtime": "^7.0.0",
|
|
54
55
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
55
56
|
},
|
|
@@ -100,5 +101,10 @@
|
|
|
100
101
|
"import-no-extraneous-disable-for-examples-and-docs"
|
|
101
102
|
]
|
|
102
103
|
}
|
|
104
|
+
},
|
|
105
|
+
"platform-feature-flags": {
|
|
106
|
+
"ptc-enable-team-profilecard-package": {
|
|
107
|
+
"type": "boolean"
|
|
108
|
+
}
|
|
103
109
|
}
|
|
104
110
|
}
|