@atlaskit/share 3.7.1 → 3.7.3
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/clients/AtlassianUrlShortenerClient.js +0 -22
- package/dist/cjs/clients/ShareServiceClient.js +1 -12
- package/dist/cjs/clients/index.js +0 -1
- package/dist/cjs/components/CommentField.js +0 -9
- package/dist/cjs/components/CopyLinkButton.js +8 -48
- package/dist/cjs/components/ErrorBoundary.js +0 -26
- package/dist/cjs/components/IntegrationButton.js +3 -15
- package/dist/cjs/components/IntegrationForm.js +8 -17
- package/dist/cjs/components/LazyShareForm/LazyShareForm.js +35 -51
- package/dist/cjs/components/LazyShareForm/index.js +0 -2
- package/dist/cjs/components/LazyShareForm/lazy.js +4 -18
- package/dist/cjs/components/MessagesIntlProvider.js +1 -14
- package/dist/cjs/components/ShareButton.js +1 -9
- package/dist/cjs/components/ShareDialogContainer.js +55 -124
- package/dist/cjs/components/ShareDialogWithTrigger.js +85 -159
- package/dist/cjs/components/ShareForm.js +41 -100
- package/dist/cjs/components/ShareFormWrapper/ShareFormWrapper.js +5 -11
- package/dist/cjs/components/ShareFormWrapper/index.js +0 -2
- package/dist/cjs/components/ShareFormWrapper/styled.js +2 -9
- package/dist/cjs/components/ShareHeader.js +0 -14
- package/dist/cjs/components/SlackIcon.js +0 -4
- package/dist/cjs/components/SplitButton.js +18 -43
- package/dist/cjs/components/UserPickerField.js +21 -71
- package/dist/cjs/components/analytics/analytics.js +6 -39
- package/dist/cjs/components/analytics/ufoExperienceHelper.js +0 -4
- package/dist/cjs/components/analytics/ufoExperiences.js +0 -2
- package/dist/cjs/components/colorSlackIcon.js +0 -4
- package/dist/cjs/components/localStorageUtils.js +0 -11
- package/dist/cjs/components/monochromeSlackIcon.js +2 -4
- package/dist/cjs/components/styles.js +2 -16
- package/dist/cjs/components/utils.js +4 -19
- package/dist/cjs/i18n/cs.js +0 -1
- package/dist/cjs/i18n/da.js +0 -1
- package/dist/cjs/i18n/de.js +0 -1
- package/dist/cjs/i18n/en.js +0 -1
- package/dist/cjs/i18n/en_GB.js +0 -1
- package/dist/cjs/i18n/en_ZZ.js +0 -1
- package/dist/cjs/i18n/es.js +0 -1
- package/dist/cjs/i18n/et.js +0 -1
- package/dist/cjs/i18n/fi.js +0 -1
- package/dist/cjs/i18n/fr.js +0 -1
- package/dist/cjs/i18n/hu.js +0 -1
- package/dist/cjs/i18n/index.js +0 -31
- package/dist/cjs/i18n/is.js +0 -1
- package/dist/cjs/i18n/it.js +0 -1
- package/dist/cjs/i18n/ja.js +0 -1
- package/dist/cjs/i18n/ko.js +0 -1
- package/dist/cjs/i18n/languages.js +0 -1
- package/dist/cjs/i18n/nb.js +0 -1
- package/dist/cjs/i18n/nl.js +0 -1
- package/dist/cjs/i18n/pl.js +0 -1
- package/dist/cjs/i18n/pt_BR.js +0 -1
- package/dist/cjs/i18n/pt_PT.js +0 -1
- package/dist/cjs/i18n/ro.js +0 -1
- package/dist/cjs/i18n/ru.js +0 -1
- package/dist/cjs/i18n/sk.js +0 -1
- package/dist/cjs/i18n/sv.js +0 -1
- package/dist/cjs/i18n/th.js +0 -1
- package/dist/cjs/i18n/tr.js +0 -1
- package/dist/cjs/i18n/uk.js +0 -1
- package/dist/cjs/i18n/vi.js +0 -1
- package/dist/cjs/i18n/zh.js +0 -1
- package/dist/cjs/i18n/zh_TW.js +0 -1
- package/dist/cjs/i18n.js +2 -3
- package/dist/cjs/index.js +0 -3
- package/dist/cjs/types/ShareEntities.js +0 -1
- package/dist/cjs/types/index.js +0 -2
- package/dist/cjs/util/i18n-util.js +2 -8
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/clients/AtlassianUrlShortenerClient.js +0 -6
- package/dist/es2019/clients/ShareServiceClient.js +1 -4
- package/dist/es2019/components/CopyLinkButton.js +2 -13
- package/dist/es2019/components/ErrorBoundary.js +0 -10
- package/dist/es2019/components/IntegrationButton.js +0 -2
- package/dist/es2019/components/LazyShareForm/LazyShareForm.js +2 -4
- package/dist/es2019/components/LazyShareForm/lazy.js +3 -5
- package/dist/es2019/components/MessagesIntlProvider.js +2 -3
- package/dist/es2019/components/ShareDialogContainer.js +19 -59
- package/dist/es2019/components/ShareDialogWithTrigger.js +28 -65
- package/dist/es2019/components/ShareForm.js +4 -24
- package/dist/es2019/components/ShareFormWrapper/ShareFormWrapper.js +0 -2
- package/dist/es2019/components/ShareFormWrapper/styled.js +2 -1
- package/dist/es2019/components/SlackIcon.js +0 -2
- package/dist/es2019/components/SplitButton.js +2 -5
- package/dist/es2019/components/UserPickerField.js +3 -24
- package/dist/es2019/components/analytics/analytics.js +9 -13
- package/dist/es2019/components/analytics/ufoExperienceHelper.js +0 -2
- package/dist/es2019/components/colorSlackIcon.js +0 -2
- package/dist/es2019/components/localStorageUtils.js +0 -3
- package/dist/es2019/components/monochromeSlackIcon.js +2 -2
- package/dist/es2019/components/styles.js +3 -2
- package/dist/es2019/components/utils.js +7 -8
- package/dist/es2019/i18n.js +2 -1
- package/dist/es2019/index.js +2 -1
- package/dist/es2019/types/ShareEntities.js +1 -1
- package/dist/es2019/util/i18n-util.js +1 -5
- package/dist/es2019/version.json +1 -1
- package/dist/esm/clients/AtlassianUrlShortenerClient.js +0 -16
- package/dist/esm/clients/ShareServiceClient.js +1 -7
- package/dist/esm/components/CopyLinkButton.js +8 -31
- package/dist/esm/components/ErrorBoundary.js +0 -18
- package/dist/esm/components/IntegrationButton.js +3 -8
- package/dist/esm/components/IntegrationForm.js +8 -10
- package/dist/esm/components/LazyShareForm/LazyShareForm.js +35 -37
- package/dist/esm/components/LazyShareForm/lazy.js +5 -7
- package/dist/esm/components/MessagesIntlProvider.js +1 -6
- package/dist/esm/components/ShareButton.js +1 -2
- package/dist/esm/components/ShareDialogContainer.js +55 -109
- package/dist/esm/components/ShareDialogWithTrigger.js +89 -155
- package/dist/esm/components/ShareForm.js +41 -74
- package/dist/esm/components/ShareFormWrapper/ShareFormWrapper.js +5 -7
- package/dist/esm/components/ShareFormWrapper/styled.js +2 -1
- package/dist/esm/components/ShareHeader.js +0 -2
- package/dist/esm/components/SlackIcon.js +0 -2
- package/dist/esm/components/SplitButton.js +18 -24
- package/dist/esm/components/UserPickerField.js +21 -55
- package/dist/esm/components/analytics/analytics.js +6 -15
- package/dist/esm/components/analytics/ufoExperienceHelper.js +0 -2
- package/dist/esm/components/colorSlackIcon.js +0 -2
- package/dist/esm/components/localStorageUtils.js +0 -3
- package/dist/esm/components/monochromeSlackIcon.js +2 -2
- package/dist/esm/components/styles.js +2 -7
- package/dist/esm/components/utils.js +7 -8
- package/dist/esm/i18n.js +2 -1
- package/dist/esm/index.js +2 -1
- package/dist/esm/types/ShareEntities.js +1 -1
- package/dist/esm/util/i18n-util.js +1 -5
- package/dist/esm/version.json +1 -1
- package/dist/types/types/ShareDialogContainer.d.ts +3 -1
- package/package.json +5 -3
|
@@ -5,52 +5,38 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
5
5
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
|
|
9
8
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10
|
-
|
|
11
9
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
12
|
-
|
|
13
10
|
import React from 'react';
|
|
14
11
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
15
12
|
import { CHANNEL_ID, errorEncountered } from './analytics/analytics';
|
|
16
|
-
|
|
17
13
|
// ErrorBoundary does not support in functional component
|
|
18
14
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
19
15
|
var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
20
16
|
_inherits(ErrorBoundary, _React$Component);
|
|
21
|
-
|
|
22
17
|
var _super = _createSuper(ErrorBoundary);
|
|
23
|
-
|
|
24
18
|
function ErrorBoundary() {
|
|
25
19
|
var _this;
|
|
26
|
-
|
|
27
20
|
_classCallCheck(this, ErrorBoundary);
|
|
28
|
-
|
|
29
21
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
30
22
|
args[_key] = arguments[_key];
|
|
31
23
|
}
|
|
32
|
-
|
|
33
24
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
34
|
-
|
|
35
25
|
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
36
26
|
hasError: false
|
|
37
27
|
});
|
|
38
|
-
|
|
39
28
|
return _this;
|
|
40
29
|
}
|
|
41
|
-
|
|
42
30
|
_createClass(ErrorBoundary, [{
|
|
43
31
|
key: "componentDidCatch",
|
|
44
32
|
value: function componentDidCatch(error) {
|
|
45
33
|
var createAnalyticsEvent = this.props.createAnalyticsEvent;
|
|
46
|
-
|
|
47
34
|
if (createAnalyticsEvent) {
|
|
48
35
|
createAnalyticsEvent(errorEncountered(undefined, {
|
|
49
36
|
message: error.message,
|
|
50
37
|
errorClass: error.name
|
|
51
38
|
})).fire(CHANNEL_ID);
|
|
52
39
|
}
|
|
53
|
-
|
|
54
40
|
this.setState({
|
|
55
41
|
hasError: true
|
|
56
42
|
});
|
|
@@ -59,17 +45,13 @@ var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
59
45
|
key: "render",
|
|
60
46
|
value: function render() {
|
|
61
47
|
var hasError = this.state.hasError;
|
|
62
|
-
|
|
63
48
|
if (hasError) {
|
|
64
49
|
// Silently fail.
|
|
65
50
|
return null;
|
|
66
51
|
}
|
|
67
|
-
|
|
68
52
|
return this.props.children;
|
|
69
53
|
}
|
|
70
54
|
}]);
|
|
71
|
-
|
|
72
55
|
return ErrorBoundary;
|
|
73
56
|
}(React.Component);
|
|
74
|
-
|
|
75
57
|
export default withAnalyticsEvents()(ErrorBoundary);
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
3
|
var _excluded = ["text", "textColor", "IntegrationIcon"];
|
|
4
|
-
|
|
5
4
|
var _templateObject, _templateObject2;
|
|
6
|
-
|
|
7
5
|
/** @jsx jsx */
|
|
8
6
|
import React from 'react';
|
|
9
7
|
import { css, jsx } from '@emotion/react';
|
|
@@ -11,13 +9,11 @@ import Button from '@atlaskit/button/custom-theme-button';
|
|
|
11
9
|
import { N500 } from '@atlaskit/theme/colors';
|
|
12
10
|
var integrationButtonCopyWrapperStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: left;\n"])));
|
|
13
11
|
var integrationIconWrapperStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin: 1px 8px 0 0;\n"])));
|
|
14
|
-
|
|
15
12
|
var IntegrationButton = function IntegrationButton(props) {
|
|
16
13
|
var text = props.text,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
textColor = props.textColor,
|
|
15
|
+
IntegrationIcon = props.IntegrationIcon,
|
|
16
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
21
17
|
return jsx(Button, restProps, jsx("span", {
|
|
22
18
|
css: integrationButtonCopyWrapperStyle,
|
|
23
19
|
style: {
|
|
@@ -27,6 +23,5 @@ var IntegrationButton = function IntegrationButton(props) {
|
|
|
27
23
|
css: integrationIconWrapperStyle
|
|
28
24
|
}, jsx(IntegrationIcon, null)), jsx("span", null, text)));
|
|
29
25
|
};
|
|
30
|
-
|
|
31
26
|
IntegrationButton.displayName = 'IntegrationButton';
|
|
32
27
|
export default IntegrationButton;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
|
|
3
2
|
var _templateObject;
|
|
4
|
-
|
|
5
3
|
/** @jsx jsx */
|
|
6
4
|
import React from 'react';
|
|
7
5
|
import { css, jsx } from '@emotion/react';
|
|
@@ -9,14 +7,14 @@ import { h500 } from '@atlaskit/theme/typography';
|
|
|
9
7
|
export var formWrapperStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n [class^='FormHeader__FormHeaderWrapper'] {\n h1:first-child {\n ", "\n\n > span {\n /* jira has a class override font settings on h1 > span in gh-custom-field-pickers.css */\n font-size: inherit !important;\n line-height: inherit !important;\n letter-spacing: inherit !important;\n }\n }\n }\n\n [class^='FormSection__FormSectionWrapper'] {\n margin-top: 0px;\n }\n\n [class^='FormFooter__FormFooterWrapper'] {\n justify-content: space-between;\n margin-top: 12px;\n margin-bottom: 24px;\n }\n\n [class^='Field__FieldWrapper']:not(:first-child) {\n margin-top: 12px;\n }\n"])), h500());
|
|
10
8
|
export var IntegrationForm = function IntegrationForm(_ref) {
|
|
11
9
|
var Content = _ref.Content,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
_ref$onIntegrationClo = _ref.onIntegrationClose,
|
|
11
|
+
onIntegrationClose = _ref$onIntegrationClo === void 0 ? function () {
|
|
12
|
+
return undefined;
|
|
13
|
+
} : _ref$onIntegrationClo,
|
|
14
|
+
_ref$changeTab = _ref.changeTab,
|
|
15
|
+
changeTab = _ref$changeTab === void 0 ? function () {
|
|
16
|
+
return undefined;
|
|
17
|
+
} : _ref$changeTab;
|
|
20
18
|
return jsx("div", {
|
|
21
19
|
css: formWrapperStyle
|
|
22
20
|
}, Content && jsx(Content, {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
|
|
3
2
|
/** @jsxFrag */
|
|
4
3
|
import React from 'react';
|
|
5
4
|
import { jsx } from '@emotion/react';
|
|
@@ -12,46 +11,45 @@ import { IntegrationForm } from '../IntegrationForm';
|
|
|
12
11
|
import { ShareForm } from '../ShareForm';
|
|
13
12
|
import { ShareFormWrapper } from '../ShareFormWrapper';
|
|
14
13
|
import { allowEmails } from '../utils';
|
|
15
|
-
|
|
16
14
|
/**
|
|
17
15
|
* A Share form content which is lazy-loaded.
|
|
18
16
|
* Make sure this component is not exported inside main entry points `src/index.ts`
|
|
19
17
|
*/
|
|
20
18
|
function LazyShareForm(props) {
|
|
21
19
|
var copyLink = props.copyLink,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
20
|
+
config = props.config,
|
|
21
|
+
isFetchingConfig = props.isFetchingConfig,
|
|
22
|
+
setIsLoading = props.setIsLoading,
|
|
23
|
+
loadOptions = props.loadOptions,
|
|
24
|
+
shareFormTitle = props.shareFormTitle,
|
|
25
|
+
shareFormHelperMessage = props.shareFormHelperMessage,
|
|
26
|
+
bottomMessage = props.bottomMessage,
|
|
27
|
+
submitButtonLabel = props.submitButtonLabel,
|
|
28
|
+
product = props.product,
|
|
29
|
+
customFooter = props.customFooter,
|
|
30
|
+
enableSmartUserPicker = props.enableSmartUserPicker,
|
|
31
|
+
loggedInAccountId = props.loggedInAccountId,
|
|
32
|
+
cloudId = props.cloudId,
|
|
33
|
+
shareFieldsFooter = props.shareFieldsFooter,
|
|
34
|
+
onUserSelectionChange = props.onUserSelectionChange,
|
|
35
|
+
isPublicLink = props.isPublicLink,
|
|
36
|
+
copyTooltipText = props.copyTooltipText,
|
|
37
|
+
shareIntegrations = props.shareIntegrations,
|
|
38
|
+
integrationMode = props.integrationMode,
|
|
39
|
+
onLinkCopy = props.onLinkCopy,
|
|
40
|
+
onDismiss = props.onDismiss,
|
|
41
|
+
onSubmit = props.onSubmit,
|
|
42
|
+
onDialogClose = props.onDialogClose,
|
|
43
|
+
onTabChange = props.onTabChange,
|
|
44
|
+
selectPortalRef = props.selectPortalRef,
|
|
45
|
+
showIntegrationForm = props.showIntegrationForm,
|
|
46
|
+
selectedIntegration = props.selectedIntegration,
|
|
47
|
+
isSharing = props.isSharing,
|
|
48
|
+
shareError = props.shareError,
|
|
49
|
+
defaultValue = props.defaultValue,
|
|
50
|
+
showTitle = props.showTitle,
|
|
51
|
+
orgId = props.orgId,
|
|
52
|
+
isBrowseUsersDisabled = props.isBrowseUsersDisabled;
|
|
55
53
|
var footer = jsx("div", null, bottomMessage ? jsx("div", {
|
|
56
54
|
css: {
|
|
57
55
|
width: "".concat(gridSize() * 44, "px")
|
|
@@ -66,7 +64,8 @@ function LazyShareForm(props) {
|
|
|
66
64
|
});
|
|
67
65
|
var allowEmail = allowEmails(config);
|
|
68
66
|
return jsx(ShareFormWrapper, {
|
|
69
|
-
footer: footer
|
|
67
|
+
footer: footer
|
|
68
|
+
// form title will be determined by `title` and `showTitle` prop passed to `ShareForm`,
|
|
70
69
|
// so we don't need to show title via ShareFormWrapper
|
|
71
70
|
,
|
|
72
71
|
shouldShowTitle: false
|
|
@@ -109,5 +108,4 @@ function LazyShareForm(props) {
|
|
|
109
108
|
isBrowseUsersDisabled: isBrowseUsersDisabled
|
|
110
109
|
}) : jsx("p", null, jsx(FormattedMessage, messages.formNoPermissions))));
|
|
111
110
|
}
|
|
112
|
-
|
|
113
111
|
export default LazyShareForm;
|
|
@@ -5,22 +5,21 @@ import { lazyForPaint, LazySuspense } from 'react-loosely-lazy';
|
|
|
5
5
|
import Spinner from '@atlaskit/spinner';
|
|
6
6
|
import { ShareFormWrapper } from '../ShareFormWrapper';
|
|
7
7
|
var LazyShareFormLazy = lazyForPaint(function () {
|
|
8
|
-
return import(
|
|
9
|
-
/* webpackChunkName: "@atlaskit-internal_share-form" */
|
|
8
|
+
return import( /* webpackChunkName: "@atlaskit-internal_share-form" */
|
|
10
9
|
'./LazyShareForm');
|
|
11
10
|
}, {
|
|
12
11
|
ssr: false
|
|
13
12
|
});
|
|
14
|
-
|
|
15
13
|
var LoadingDialog = function LoadingDialog(_ref) {
|
|
16
14
|
var shareFormTitle = _ref.shareFormTitle,
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
showTitle = _ref.showTitle,
|
|
16
|
+
setIsLoading = _ref.setIsLoading;
|
|
19
17
|
React.useEffect(function () {
|
|
20
18
|
setIsLoading(true);
|
|
21
19
|
});
|
|
22
20
|
return jsx(ShareFormWrapper, {
|
|
23
|
-
shareFormTitle: shareFormTitle
|
|
21
|
+
shareFormTitle: shareFormTitle
|
|
22
|
+
// if `showTitle` is passed, we use it. Otherwise, we will show title for loading dialog.
|
|
24
23
|
,
|
|
25
24
|
shouldShowTitle: typeof showTitle === 'boolean' ? showTitle : true
|
|
26
25
|
}, jsx("div", {
|
|
@@ -33,7 +32,6 @@ var LoadingDialog = function LoadingDialog(_ref) {
|
|
|
33
32
|
}
|
|
34
33
|
}, jsx(Spinner, null)));
|
|
35
34
|
};
|
|
36
|
-
|
|
37
35
|
export default (function (props) {
|
|
38
36
|
return jsx(LazySuspense, {
|
|
39
37
|
fallback: jsx(LoadingDialog, {
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
|
|
3
2
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
-
|
|
5
3
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
-
|
|
7
4
|
import React, { useMemo } from 'react';
|
|
8
5
|
import { injectIntl, IntlProvider } from 'react-intl-next';
|
|
9
6
|
import { getMessagesForLocale } from '../util/i18n-util';
|
|
10
|
-
|
|
11
7
|
var MessagesIntlProvider = function MessagesIntlProvider(_ref) {
|
|
12
8
|
var intl = _ref.intl,
|
|
13
|
-
|
|
9
|
+
children = _ref.children;
|
|
14
10
|
var mergedMessages = useMemo(function () {
|
|
15
11
|
return _objectSpread(_objectSpread({}, intl.messages), getMessagesForLocale(intl.locale));
|
|
16
12
|
}, [intl.messages, intl.locale]);
|
|
@@ -19,5 +15,4 @@ var MessagesIntlProvider = function MessagesIntlProvider(_ref) {
|
|
|
19
15
|
messages: mergedMessages
|
|
20
16
|
}, children);
|
|
21
17
|
};
|
|
22
|
-
|
|
23
18
|
export default injectIntl(MessagesIntlProvider);
|
|
@@ -5,8 +5,7 @@ import React from 'react';
|
|
|
5
5
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
6
6
|
export var ShareButton = /*#__PURE__*/React.forwardRef(function ShareButton(_ref, ref) {
|
|
7
7
|
var text = _ref.text,
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
10
9
|
return /*#__PURE__*/React.createElement(Button, _extends({
|
|
11
10
|
ref: ref,
|
|
12
11
|
"aria-expanded": props.isSelected
|