@atlaskit/share 3.7.0 → 3.7.2
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 +38 -61
- 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 +56 -123
- package/dist/cjs/components/ShareDialogWithTrigger.js +85 -161
- 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 +20 -70
- 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 +1 -2
- package/dist/cjs/i18n/de.js +0 -1
- package/dist/cjs/i18n/en.js +29 -22
- package/dist/cjs/i18n/en_GB.js +29 -22
- 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 +5 -14
- package/dist/es2019/components/LazyShareForm/lazy.js +3 -5
- package/dist/es2019/components/MessagesIntlProvider.js +2 -3
- package/dist/es2019/components/ShareDialogContainer.js +21 -59
- package/dist/es2019/components/ShareDialogWithTrigger.js +29 -68
- 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 +2 -23
- 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/da.js +1 -1
- package/dist/es2019/i18n/en.js +29 -21
- package/dist/es2019/i18n/en_GB.js +29 -21
- 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 +38 -47
- 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 +56 -108
- package/dist/esm/components/ShareDialogWithTrigger.js +89 -157
- 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 +20 -54
- 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/da.js +1 -1
- package/dist/esm/i18n/en.js +29 -21
- package/dist/esm/i18n/en_GB.js +29 -21
- 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/components/LazyShareForm/LazyShareForm.d.ts +1 -1
- package/dist/types/i18n/en.d.ts +27 -19
- package/dist/types/i18n/en_GB.d.ts +27 -19
- package/dist/types/types/ShareForm.d.ts +0 -1
- package/package.json +2 -2
|
@@ -7,13 +7,9 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
7
7
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
9
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
10
|
-
|
|
11
10
|
var _templateObject, _templateObject2;
|
|
12
|
-
|
|
13
11
|
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); }; }
|
|
14
|
-
|
|
15
12
|
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; } }
|
|
16
|
-
|
|
17
13
|
/** @jsx jsx */
|
|
18
14
|
import React from 'react';
|
|
19
15
|
import { css, jsx } from '@emotion/react';
|
|
@@ -31,7 +27,8 @@ export var AUTO_DISMISS_MS = AUTO_DISMISS_SECONDS * 1000;
|
|
|
31
27
|
export var messageContainerStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n margin: -8px -16px;\n"])));
|
|
32
28
|
var messageTextStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n text-indent: 6px;\n"])));
|
|
33
29
|
var isSafari = navigator.userAgent.indexOf('Safari');
|
|
34
|
-
export var HiddenInput = /*#__PURE__*/React.forwardRef(
|
|
30
|
+
export var HiddenInput = /*#__PURE__*/React.forwardRef(
|
|
31
|
+
// we need a hidden input to reliably copy to clipboard across all browsers.
|
|
35
32
|
function (props, ref) {
|
|
36
33
|
return jsx("input", {
|
|
37
34
|
style: {
|
|
@@ -48,47 +45,34 @@ function (props, ref) {
|
|
|
48
45
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
49
46
|
export var CopyLinkButton = /*#__PURE__*/function (_React$Component) {
|
|
50
47
|
_inherits(CopyLinkButton, _React$Component);
|
|
51
|
-
|
|
52
48
|
var _super = _createSuper(CopyLinkButton);
|
|
53
|
-
|
|
54
49
|
function CopyLinkButton() {
|
|
55
50
|
var _this;
|
|
56
|
-
|
|
57
51
|
_classCallCheck(this, CopyLinkButton);
|
|
58
|
-
|
|
59
52
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
60
53
|
args[_key] = arguments[_key];
|
|
61
54
|
}
|
|
62
|
-
|
|
63
55
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
64
|
-
|
|
65
56
|
_defineProperty(_assertThisInitialized(_this), "inputRef", /*#__PURE__*/React.createRef());
|
|
66
|
-
|
|
67
57
|
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
68
58
|
shouldShowCopiedMessage: false
|
|
69
59
|
});
|
|
70
|
-
|
|
71
60
|
_defineProperty(_assertThisInitialized(_this), "clearAutoDismiss", function () {
|
|
72
61
|
if (_this.autoDismiss) {
|
|
73
62
|
clearTimeout(_this.autoDismiss);
|
|
74
63
|
_this.autoDismiss = undefined;
|
|
75
64
|
}
|
|
76
65
|
});
|
|
77
|
-
|
|
78
66
|
_defineProperty(_assertThisInitialized(_this), "handleClick", function () {
|
|
79
67
|
_this.inputRef.current.select();
|
|
80
|
-
|
|
81
68
|
document.execCommand('copy');
|
|
82
|
-
|
|
83
69
|
if (_this.props.onLinkCopy) {
|
|
84
70
|
_this.props.onLinkCopy(_this.props.link);
|
|
85
71
|
}
|
|
86
|
-
|
|
87
72
|
_this.setState({
|
|
88
73
|
shouldShowCopiedMessage: true
|
|
89
74
|
}, function () {
|
|
90
75
|
_this.clearAutoDismiss();
|
|
91
|
-
|
|
92
76
|
_this.autoDismiss = setTimeout(function () {
|
|
93
77
|
_this.setState({
|
|
94
78
|
shouldShowCopiedMessage: false
|
|
@@ -96,21 +80,18 @@ export var CopyLinkButton = /*#__PURE__*/function (_React$Component) {
|
|
|
96
80
|
}, AUTO_DISMISS_MS);
|
|
97
81
|
});
|
|
98
82
|
});
|
|
99
|
-
|
|
100
83
|
_defineProperty(_assertThisInitialized(_this), "handleDismissCopiedMessage", function () {
|
|
101
84
|
_this.clearAutoDismiss();
|
|
102
|
-
|
|
103
85
|
_this.setState({
|
|
104
86
|
shouldShowCopiedMessage: false
|
|
105
87
|
});
|
|
106
88
|
});
|
|
107
|
-
|
|
108
89
|
_defineProperty(_assertThisInitialized(_this), "renderTriggerButton", function (triggerProps) {
|
|
109
90
|
var _this$props = _this.props,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
91
|
+
isDisabled = _this$props.isDisabled,
|
|
92
|
+
copyLinkButtonText = _this$props.copyLinkButtonText,
|
|
93
|
+
children = _this$props.children,
|
|
94
|
+
iconBefore = _this$props.iconBefore;
|
|
114
95
|
return jsx(Button, _extends({
|
|
115
96
|
"aria-label": copyLinkButtonText,
|
|
116
97
|
isDisabled: isDisabled,
|
|
@@ -122,10 +103,8 @@ export var CopyLinkButton = /*#__PURE__*/function (_React$Component) {
|
|
|
122
103
|
onClick: _this.handleClick
|
|
123
104
|
}, triggerProps), children || copyLinkButtonText);
|
|
124
105
|
});
|
|
125
|
-
|
|
126
106
|
return _this;
|
|
127
107
|
}
|
|
128
|
-
|
|
129
108
|
_createClass(CopyLinkButton, [{
|
|
130
109
|
key: "componentWillUnmount",
|
|
131
110
|
value: function componentWillUnmount() {
|
|
@@ -135,11 +114,10 @@ export var CopyLinkButton = /*#__PURE__*/function (_React$Component) {
|
|
|
135
114
|
key: "render",
|
|
136
115
|
value: function render() {
|
|
137
116
|
var _this2 = this;
|
|
138
|
-
|
|
139
117
|
var shouldShowCopiedMessage = this.state.shouldShowCopiedMessage;
|
|
140
118
|
var _this$props2 = this.props,
|
|
141
|
-
|
|
142
|
-
|
|
119
|
+
copyTooltipText = _this$props2.copyTooltipText,
|
|
120
|
+
copiedToClipboardText = _this$props2.copiedToClipboardText;
|
|
143
121
|
return jsx(React.Fragment, null, isSafari && jsx("div", {
|
|
144
122
|
className: "assistive",
|
|
145
123
|
"aria-live": "assertive"
|
|
@@ -171,7 +149,6 @@ export var CopyLinkButton = /*#__PURE__*/function (_React$Component) {
|
|
|
171
149
|
}));
|
|
172
150
|
}
|
|
173
151
|
}]);
|
|
174
|
-
|
|
175
152
|
return CopyLinkButton;
|
|
176
153
|
}(React.Component);
|
|
177
154
|
export default CopyLinkButton;
|
|
@@ -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,7 +1,4 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
|
|
3
1
|
/** @jsx jsx */
|
|
4
|
-
|
|
5
2
|
/** @jsxFrag */
|
|
6
3
|
import React from 'react';
|
|
7
4
|
import { jsx } from '@emotion/react';
|
|
@@ -14,48 +11,45 @@ import { IntegrationForm } from '../IntegrationForm';
|
|
|
14
11
|
import { ShareForm } from '../ShareForm';
|
|
15
12
|
import { ShareFormWrapper } from '../ShareFormWrapper';
|
|
16
13
|
import { allowEmails } from '../utils';
|
|
17
|
-
|
|
18
14
|
/**
|
|
19
15
|
* A Share form content which is lazy-loaded.
|
|
20
16
|
* Make sure this component is not exported inside main entry points `src/index.ts`
|
|
21
17
|
*/
|
|
22
18
|
function LazyShareForm(props) {
|
|
23
19
|
var copyLink = props.copyLink,
|
|
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
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
isJwmShareToSlackFFEnabled = props.isJwmShareToSlackFFEnabled,
|
|
58
|
-
isBrowseUsersDisabled = props.isBrowseUsersDisabled;
|
|
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;
|
|
59
53
|
var footer = jsx("div", null, bottomMessage ? jsx("div", {
|
|
60
54
|
css: {
|
|
61
55
|
width: "".concat(gridSize() * 44, "px")
|
|
@@ -70,7 +64,8 @@ function LazyShareForm(props) {
|
|
|
70
64
|
});
|
|
71
65
|
var allowEmail = allowEmails(config);
|
|
72
66
|
return jsx(ShareFormWrapper, {
|
|
73
|
-
footer: footer
|
|
67
|
+
footer: footer
|
|
68
|
+
// form title will be determined by `title` and `showTitle` prop passed to `ShareForm`,
|
|
74
69
|
// so we don't need to show title via ShareFormWrapper
|
|
75
70
|
,
|
|
76
71
|
shouldShowTitle: false
|
|
@@ -81,7 +76,7 @@ function LazyShareForm(props) {
|
|
|
81
76
|
}, jsx(IntegrationForm, {
|
|
82
77
|
Content: selectedIntegration.Content,
|
|
83
78
|
onIntegrationClose: onDialogClose
|
|
84
|
-
})) : jsx(React.Fragment, null, allowEmail || !isBrowseUsersDisabled ? jsx(ShareForm,
|
|
79
|
+
})) : jsx(React.Fragment, null, allowEmail || !isBrowseUsersDisabled ? jsx(ShareForm, {
|
|
85
80
|
copyLink: copyLink,
|
|
86
81
|
loadOptions: loadOptions,
|
|
87
82
|
title: shareFormTitle,
|
|
@@ -96,10 +91,7 @@ function LazyShareForm(props) {
|
|
|
96
91
|
loggedInAccountId: loggedInAccountId,
|
|
97
92
|
cloudId: cloudId,
|
|
98
93
|
fieldsFooter: shareFieldsFooter,
|
|
99
|
-
selectPortalRef: selectPortalRef
|
|
100
|
-
}, isJwmShareToSlackFFEnabled && {
|
|
101
|
-
shareContentType: shareContentType
|
|
102
|
-
}, {
|
|
94
|
+
selectPortalRef: selectPortalRef,
|
|
103
95
|
copyTooltipText: copyTooltipText,
|
|
104
96
|
integrationMode: integrationMode,
|
|
105
97
|
shareIntegrations: shareIntegrations,
|
|
@@ -114,7 +106,6 @@ function LazyShareForm(props) {
|
|
|
114
106
|
handleCloseDialog: onDialogClose,
|
|
115
107
|
onTabChange: onTabChange,
|
|
116
108
|
isBrowseUsersDisabled: isBrowseUsersDisabled
|
|
117
|
-
})
|
|
109
|
+
}) : jsx("p", null, jsx(FormattedMessage, messages.formNoPermissions))));
|
|
118
110
|
}
|
|
119
|
-
|
|
120
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
|