@atlaskit/share 5.0.0 → 5.0.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 +8 -0
- package/afm-cc/tsconfig.json +3 -0
- package/afm-jira/tsconfig.json +3 -0
- package/dist/cjs/components/CopyLinkButton.js +11 -7
- package/dist/cjs/components/CopyLinkButtonNext.compiled.css +8 -0
- package/dist/cjs/components/CopyLinkButtonNext.js +180 -0
- package/dist/cjs/components/IntegrationButton.js +10 -1
- package/dist/cjs/components/IntegrationButtonNext.compiled.css +7 -0
- package/dist/cjs/components/IntegrationButtonNext.js +38 -0
- package/dist/cjs/components/LazyShareForm/LazyShareFormNext.compiled.css +5 -0
- package/dist/cjs/components/LazyShareForm/LazyShareFormNext.js +138 -0
- package/dist/cjs/components/LazyShareForm/lazy.js +3 -1
- package/dist/cjs/components/LazyShareForm/lazyNext.compiled.css +5 -0
- package/dist/cjs/components/LazyShareForm/lazyNext.js +58 -0
- package/dist/cjs/components/ShareDialogWithTrigger.js +12 -8
- package/dist/cjs/components/ShareDialogWithTriggerNext.compiled.css +4 -0
- package/dist/cjs/components/ShareDialogWithTriggerNext.js +653 -0
- package/dist/cjs/components/ShareFormNext.compiled.css +21 -0
- package/dist/cjs/components/ShareFormNext.js +473 -0
- package/dist/cjs/components/ShareFormWrapper/ShareFormWrapper.js +6 -2
- package/dist/cjs/components/ShareFormWrapper/compiled.compiled.css +7 -0
- package/dist/cjs/components/ShareFormWrapper/compiled.js +48 -0
- package/dist/cjs/components/SplitButton.js +25 -17
- package/dist/cjs/components/UserPickerField.js +3 -1
- package/dist/cjs/components/analytics/analytics.js +1 -1
- package/dist/es2019/components/CopyLinkButton.js +3 -1
- package/dist/es2019/components/CopyLinkButtonNext.compiled.css +8 -0
- package/dist/es2019/components/CopyLinkButtonNext.js +151 -0
- package/dist/es2019/components/IntegrationButton.js +9 -1
- package/dist/es2019/components/IntegrationButtonNext.compiled.css +7 -0
- package/dist/es2019/components/IntegrationButtonNext.js +33 -0
- package/dist/es2019/components/LazyShareForm/LazyShareFormNext.compiled.css +5 -0
- package/dist/es2019/components/LazyShareForm/LazyShareFormNext.js +136 -0
- package/dist/es2019/components/LazyShareForm/lazy.js +3 -1
- package/dist/es2019/components/LazyShareForm/lazyNext.compiled.css +5 -0
- package/dist/es2019/components/LazyShareForm/lazyNext.js +43 -0
- package/dist/es2019/components/ShareDialogWithTrigger.js +4 -2
- package/dist/es2019/components/ShareDialogWithTriggerNext.compiled.css +4 -0
- package/dist/es2019/components/ShareDialogWithTriggerNext.js +593 -0
- package/dist/es2019/components/ShareFormNext.compiled.css +21 -0
- package/dist/es2019/components/ShareFormNext.js +417 -0
- package/dist/es2019/components/ShareFormWrapper/ShareFormWrapper.js +6 -2
- package/dist/es2019/components/ShareFormWrapper/compiled.compiled.css +7 -0
- package/dist/es2019/components/ShareFormWrapper/compiled.js +41 -0
- package/dist/es2019/components/SplitButton.js +9 -3
- package/dist/es2019/components/UserPickerField.js +3 -1
- package/dist/es2019/components/analytics/analytics.js +1 -1
- package/dist/esm/components/CopyLinkButton.js +10 -6
- package/dist/esm/components/CopyLinkButtonNext.compiled.css +8 -0
- package/dist/esm/components/CopyLinkButtonNext.js +173 -0
- package/dist/esm/components/IntegrationButton.js +11 -1
- package/dist/esm/components/IntegrationButtonNext.compiled.css +7 -0
- package/dist/esm/components/IntegrationButtonNext.js +31 -0
- package/dist/esm/components/LazyShareForm/LazyShareFormNext.compiled.css +5 -0
- package/dist/esm/components/LazyShareForm/LazyShareFormNext.js +131 -0
- package/dist/esm/components/LazyShareForm/lazy.js +3 -1
- package/dist/esm/components/LazyShareForm/lazyNext.compiled.css +5 -0
- package/dist/esm/components/LazyShareForm/lazyNext.js +46 -0
- package/dist/esm/components/ShareDialogWithTrigger.js +11 -7
- package/dist/esm/components/ShareDialogWithTriggerNext.compiled.css +4 -0
- package/dist/esm/components/ShareDialogWithTriggerNext.js +646 -0
- package/dist/esm/components/ShareFormNext.compiled.css +21 -0
- package/dist/esm/components/ShareFormNext.js +463 -0
- package/dist/esm/components/ShareFormWrapper/ShareFormWrapper.js +6 -2
- package/dist/esm/components/ShareFormWrapper/compiled.compiled.css +7 -0
- package/dist/esm/components/ShareFormWrapper/compiled.js +41 -0
- package/dist/esm/components/SplitButton.js +25 -17
- package/dist/esm/components/UserPickerField.js +3 -1
- package/dist/esm/components/analytics/analytics.js +1 -1
- package/dist/types/components/CopyLinkButton.d.ts +2 -1
- package/dist/types/components/CopyLinkButtonNext.d.ts +35 -0
- package/dist/types/components/IntegrationButtonNext.d.ts +11 -0
- package/dist/types/components/LazyShareForm/LazyShareFormNext.d.ts +21 -0
- package/dist/types/components/LazyShareForm/lazyNext.d.ts +4 -0
- package/dist/types/components/ShareDialogWithTrigger.d.ts +3 -3
- package/dist/types/components/ShareDialogWithTriggerNext.d.ts +47 -0
- package/dist/types/components/ShareFormNext.d.ts +9 -0
- package/dist/types/components/ShareFormWrapper/compiled.d.ts +10 -0
- package/dist/types-ts4.5/components/CopyLinkButton.d.ts +2 -1
- package/dist/types-ts4.5/components/CopyLinkButtonNext.d.ts +35 -0
- package/dist/types-ts4.5/components/IntegrationButtonNext.d.ts +11 -0
- package/dist/types-ts4.5/components/LazyShareForm/LazyShareFormNext.d.ts +21 -0
- package/dist/types-ts4.5/components/LazyShareForm/lazyNext.d.ts +4 -0
- package/dist/types-ts4.5/components/ShareDialogWithTrigger.d.ts +3 -3
- package/dist/types-ts4.5/components/ShareDialogWithTriggerNext.d.ts +47 -0
- package/dist/types-ts4.5/components/ShareFormNext.d.ts +9 -0
- package/dist/types-ts4.5/components/ShareFormWrapper/compiled.d.ts +10 -0
- package/package.json +15 -11
|
@@ -0,0 +1,653 @@
|
|
|
1
|
+
/* ShareDialogWithTriggerNext.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.defaultShareContentState = exports.ShareDialogWithTriggerInternal = exports.ShareDialogWithTrigger = exports.IconShare = void 0;
|
|
9
|
+
require("./ShareDialogWithTriggerNext.compiled.css");
|
|
10
|
+
var _runtime = require("@compiled/react/runtime");
|
|
11
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
12
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
13
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
14
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
15
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
16
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
17
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
18
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
19
|
+
var _react = _interopRequireDefault(require("react"));
|
|
20
|
+
var _reactIntlNext = require("react-intl-next");
|
|
21
|
+
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
22
|
+
var _css = require("@atlaskit/css");
|
|
23
|
+
var _share = _interopRequireDefault(require("@atlaskit/icon/core/migration/share"));
|
|
24
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
25
|
+
var _popup = _interopRequireDefault(require("@atlaskit/popup"));
|
|
26
|
+
var _portal = _interopRequireDefault(require("@atlaskit/portal"));
|
|
27
|
+
var _compiled = require("@atlaskit/primitives/compiled");
|
|
28
|
+
var _constants = require("@atlaskit/theme/constants");
|
|
29
|
+
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
30
|
+
var _i18n = require("../i18n");
|
|
31
|
+
var _types = require("../types");
|
|
32
|
+
var _analytics = require("./analytics/analytics");
|
|
33
|
+
var _ufoExperienceHelper = require("./analytics/ufoExperienceHelper");
|
|
34
|
+
var _ufoExperiences = require("./analytics/ufoExperiences");
|
|
35
|
+
var _lazy = _interopRequireDefault(require("./LazyShareForm/lazy"));
|
|
36
|
+
var _ShareButton = _interopRequireDefault(require("./ShareButton"));
|
|
37
|
+
var _SplitButton = _interopRequireDefault(require("./SplitButton"));
|
|
38
|
+
var _utils = require("./utils");
|
|
39
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
40
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
41
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
42
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
43
|
+
var styles = {
|
|
44
|
+
shareButtonWrapperStyles: "_12ji1r31 _1qu2glyw _12y31o36 _1e0c116y",
|
|
45
|
+
outlineNone: "_12ji1r31 _1qu2glyw _12y31o36"
|
|
46
|
+
};
|
|
47
|
+
var defaultShareContentState = exports.defaultShareContentState = {
|
|
48
|
+
users: [],
|
|
49
|
+
comment: {
|
|
50
|
+
format: 'plain_text',
|
|
51
|
+
value: ''
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
var IconShare = exports.IconShare = function IconShare() {
|
|
55
|
+
return /*#__PURE__*/_react.default.createElement(_share.default, {
|
|
56
|
+
spacing: "spacious",
|
|
57
|
+
label: "",
|
|
58
|
+
color: "currentColor"
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
63
|
+
var ShareDialogWithTriggerInternal = exports.ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureComponent) {
|
|
64
|
+
function ShareDialogWithTriggerInternal() {
|
|
65
|
+
var _this;
|
|
66
|
+
(0, _classCallCheck2.default)(this, ShareDialogWithTriggerInternal);
|
|
67
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
68
|
+
args[_key] = arguments[_key];
|
|
69
|
+
}
|
|
70
|
+
_this = _callSuper(this, ShareDialogWithTriggerInternal, [].concat(args));
|
|
71
|
+
(0, _defineProperty2.default)(_this, "containerRef", /*#__PURE__*/_react.default.createRef());
|
|
72
|
+
/**
|
|
73
|
+
* Because the PopUp component has a higher zIndex it causes
|
|
74
|
+
* the select to be rendered within it, and add scrollbars.
|
|
75
|
+
* We will render the select options the PopUp outside,
|
|
76
|
+
*/
|
|
77
|
+
(0, _defineProperty2.default)(_this, "selectPortalRef", /*#__PURE__*/_react.default.createRef());
|
|
78
|
+
(0, _defineProperty2.default)(_this, "start", 0);
|
|
79
|
+
(0, _defineProperty2.default)(_this, "state", {
|
|
80
|
+
isDialogOpen: false,
|
|
81
|
+
isSharing: false,
|
|
82
|
+
ignoreIntermediateState: false,
|
|
83
|
+
defaultValue: defaultShareContentState,
|
|
84
|
+
isUsingSplitButton: false,
|
|
85
|
+
showIntegrationForm: false,
|
|
86
|
+
selectedIntegration: null,
|
|
87
|
+
tabIndex: 0,
|
|
88
|
+
isMenuItemSelected: false,
|
|
89
|
+
isLoading: false
|
|
90
|
+
});
|
|
91
|
+
(0, _defineProperty2.default)(_this, "closeAndResetDialog", function () {
|
|
92
|
+
_this.setState({
|
|
93
|
+
defaultValue: defaultShareContentState,
|
|
94
|
+
ignoreIntermediateState: true,
|
|
95
|
+
shareError: undefined,
|
|
96
|
+
isDialogOpen: false,
|
|
97
|
+
showIntegrationForm: false,
|
|
98
|
+
selectedIntegration: null,
|
|
99
|
+
isMenuItemSelected: false
|
|
100
|
+
});
|
|
101
|
+
var _this$props = _this.props,
|
|
102
|
+
onUserSelectionChange = _this$props.onUserSelectionChange,
|
|
103
|
+
onDialogClose = _this$props.onDialogClose;
|
|
104
|
+
if (onUserSelectionChange) {
|
|
105
|
+
onUserSelectionChange(defaultShareContentState.users);
|
|
106
|
+
}
|
|
107
|
+
if (onDialogClose) {
|
|
108
|
+
onDialogClose();
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
(0, _defineProperty2.default)(_this, "createAndFireEvent", function (payload) {
|
|
112
|
+
var _this$props2 = _this.props,
|
|
113
|
+
createAnalyticsEvent = _this$props2.createAnalyticsEvent,
|
|
114
|
+
analyticsDecorator = _this$props2.analyticsDecorator;
|
|
115
|
+
if (analyticsDecorator) {
|
|
116
|
+
payload = analyticsDecorator(payload);
|
|
117
|
+
}
|
|
118
|
+
if (createAnalyticsEvent) {
|
|
119
|
+
createAnalyticsEvent(payload).fire(_analytics.CHANNEL_ID);
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
(0, _defineProperty2.default)(_this, "onTabChange", function (index) {
|
|
123
|
+
var subjectId = 'shareTab';
|
|
124
|
+
var shareContentType = _this.props.shareContentType;
|
|
125
|
+
if (index === 1) {
|
|
126
|
+
subjectId = 'shareToSlackTab';
|
|
127
|
+
}
|
|
128
|
+
_this.createAndFireEvent((0, _analytics.shareTabClicked)(subjectId, shareContentType));
|
|
129
|
+
_this.setState({
|
|
130
|
+
tabIndex: index
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
(0, _defineProperty2.default)(_this, "onMenuItemChange", function (menuType) {
|
|
134
|
+
var subjectId = menuType === 'Slack' ? 'shareToSlackMenuItem' : 'shareMenuItem';
|
|
135
|
+
var shareContentType = _this.props.shareContentType;
|
|
136
|
+
_this.createAndFireEvent((0, _analytics.shareMenuItemClicked)(subjectId, shareContentType));
|
|
137
|
+
_this.setState({
|
|
138
|
+
isMenuItemSelected: true
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
(0, _defineProperty2.default)(_this, "getFlags", function () {
|
|
142
|
+
var formatMessage = _this.props.intl.formatMessage;
|
|
143
|
+
|
|
144
|
+
// The reason for providing message property is that in jira,
|
|
145
|
+
// the Flag system takes only Message Descriptor as payload
|
|
146
|
+
// and formatMessage is called for every flag
|
|
147
|
+
// if the translation data is not provided, a translated default message
|
|
148
|
+
// will be displayed
|
|
149
|
+
return [{
|
|
150
|
+
appearance: 'success',
|
|
151
|
+
title: _objectSpread(_objectSpread({}, _i18n.messages.shareSuccessMessage), {}, {
|
|
152
|
+
defaultMessage: formatMessage(_i18n.messages.shareSuccessMessage, {
|
|
153
|
+
object: _this.props.shareContentType.toLowerCase()
|
|
154
|
+
})
|
|
155
|
+
}),
|
|
156
|
+
type: _types.OBJECT_SHARED
|
|
157
|
+
}];
|
|
158
|
+
});
|
|
159
|
+
(0, _defineProperty2.default)(_this, "setIsLoading", function (isLoading) {
|
|
160
|
+
_this.setState({
|
|
161
|
+
isLoading: isLoading
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
(0, _defineProperty2.default)(_this, "focus", function () {
|
|
165
|
+
if (_this.containerRef.current) {
|
|
166
|
+
_this.containerRef.current.focus();
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
(0, _defineProperty2.default)(_this, "handleKeyDown", function (event) {
|
|
170
|
+
var _this$state = _this.state,
|
|
171
|
+
isLoading = _this$state.isLoading,
|
|
172
|
+
isDialogOpen = _this$state.isDialogOpen;
|
|
173
|
+
var shouldCloseOnEscapePress = _this.props.shouldCloseOnEscapePress;
|
|
174
|
+
if (isLoading) {
|
|
175
|
+
event.stopPropagation();
|
|
176
|
+
_this.focus();
|
|
177
|
+
}
|
|
178
|
+
if (isDialogOpen) {
|
|
179
|
+
switch (event.key) {
|
|
180
|
+
case 'Esc':
|
|
181
|
+
case 'Escape':
|
|
182
|
+
// The @atlaskit/popup will capture the event and auto-close, we
|
|
183
|
+
// need to prevent that if the dialog is set to not close on `ESC`
|
|
184
|
+
if (!shouldCloseOnEscapePress) {
|
|
185
|
+
event.preventDefault();
|
|
186
|
+
event.stopPropagation();
|
|
187
|
+
// put the focus back onto the share dialog so that
|
|
188
|
+
// the user can press the escape key again to close the dialog
|
|
189
|
+
_this.focus();
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
// The dialog will auto-close in @atlaskit/popup, we just need to fire
|
|
193
|
+
// the right events.
|
|
194
|
+
if (shouldCloseOnEscapePress) {
|
|
195
|
+
// This experience should be aborted in a scenario when a user closes the dialog before the shareClient.getConfig() call is finished
|
|
196
|
+
// It is a race condition between the `SUCCEEDED` case and the `ABORTED` case of this experience
|
|
197
|
+
// UFO experiences can only have one FINAL state so it doesn't matter if we call .abort() after the experience has succeeded and vice versa
|
|
198
|
+
_ufoExperiences.renderShareDialogExp.abort();
|
|
199
|
+
_this.createAndFireEvent((0, _analytics.cancelShare)(_this.start));
|
|
200
|
+
_this.closeAndResetDialog();
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
(0, _defineProperty2.default)(_this, "handleDialogOpen", function () {
|
|
206
|
+
_this.setState(function (state) {
|
|
207
|
+
return {
|
|
208
|
+
isDialogOpen: !state.isDialogOpen,
|
|
209
|
+
ignoreIntermediateState: false,
|
|
210
|
+
showIntegrationForm: false,
|
|
211
|
+
selectedIntegration: null
|
|
212
|
+
};
|
|
213
|
+
}, function () {
|
|
214
|
+
var _this$props3 = _this.props,
|
|
215
|
+
onDialogOpen = _this$props3.onDialogOpen,
|
|
216
|
+
isPublicLink = _this$props3.isPublicLink;
|
|
217
|
+
var isDialogOpen = _this.state.isDialogOpen;
|
|
218
|
+
if (isDialogOpen) {
|
|
219
|
+
_this.start = Date.now();
|
|
220
|
+
_this.createAndFireEvent((0, _analytics.screenEvent)({
|
|
221
|
+
isPublicLink: isPublicLink
|
|
222
|
+
}));
|
|
223
|
+
if (onDialogOpen) {
|
|
224
|
+
onDialogOpen();
|
|
225
|
+
}
|
|
226
|
+
_this.focus();
|
|
227
|
+
} else {
|
|
228
|
+
_this.handleCloseDialog();
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
});
|
|
232
|
+
(0, _defineProperty2.default)(_this, "onTriggerClick", function () {
|
|
233
|
+
var onTriggerButtonClick = _this.props.onTriggerButtonClick;
|
|
234
|
+
_this.createAndFireEvent((0, _analytics.shareTriggerButtonClicked)());
|
|
235
|
+
_this.handleDialogOpen();
|
|
236
|
+
if (onTriggerButtonClick) {
|
|
237
|
+
onTriggerButtonClick();
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
(0, _defineProperty2.default)(_this, "handleCloseDialog", function () {
|
|
241
|
+
if (_this.props.onDialogClose) {
|
|
242
|
+
_this.props.onDialogClose();
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// This experience should be aborted in a scenario when a user closes the dialog before the shareClient.getConfig() call is finished
|
|
246
|
+
// It is a race condition between the `SUCCEEDED` case and the `ABORTED` case of this experience
|
|
247
|
+
// UFO experiences can only have one FINAL state so it doesn't matter if we call .abort() after the experience has succeeded and vice versa
|
|
248
|
+
_ufoExperiences.renderShareDialogExp.abort();
|
|
249
|
+
_this.setState({
|
|
250
|
+
isDialogOpen: false,
|
|
251
|
+
showIntegrationForm: false,
|
|
252
|
+
selectedIntegration: null,
|
|
253
|
+
tabIndex: 0,
|
|
254
|
+
isMenuItemSelected: false
|
|
255
|
+
});
|
|
256
|
+
});
|
|
257
|
+
(0, _defineProperty2.default)(_this, "handleShareSubmit", function (data) {
|
|
258
|
+
var _this$props4 = _this.props,
|
|
259
|
+
onShareSubmit = _this$props4.onShareSubmit,
|
|
260
|
+
shareContentType = _this$props4.shareContentType,
|
|
261
|
+
shareContentSubType = _this$props4.shareContentSubType,
|
|
262
|
+
shareContentId = _this$props4.shareContentId,
|
|
263
|
+
formShareOrigin = _this$props4.formShareOrigin,
|
|
264
|
+
showFlags = _this$props4.showFlags,
|
|
265
|
+
isPublicLink = _this$props4.isPublicLink;
|
|
266
|
+
if (!onShareSubmit) {
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
_ufoExperiences.shareSubmitExp.start();
|
|
270
|
+
_this.setState({
|
|
271
|
+
isSharing: true
|
|
272
|
+
});
|
|
273
|
+
_this.createAndFireEvent((0, _analytics.formShareSubmitted)({
|
|
274
|
+
start: _this.start,
|
|
275
|
+
data: data,
|
|
276
|
+
shareContentType: shareContentType,
|
|
277
|
+
shareOrigin: formShareOrigin,
|
|
278
|
+
isPublicLink: isPublicLink,
|
|
279
|
+
shareContentSubType: shareContentSubType,
|
|
280
|
+
shareContentId: shareContentId
|
|
281
|
+
}));
|
|
282
|
+
onShareSubmit(data).then(function () {
|
|
283
|
+
_this.closeAndResetDialog();
|
|
284
|
+
_this.setState({
|
|
285
|
+
isSharing: false
|
|
286
|
+
});
|
|
287
|
+
showFlags(_this.getFlags());
|
|
288
|
+
_ufoExperiences.shareSubmitExp.success();
|
|
289
|
+
}).catch( /*#__PURE__*/function () {
|
|
290
|
+
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(err) {
|
|
291
|
+
var shareError;
|
|
292
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
293
|
+
while (1) switch (_context.prev = _context.next) {
|
|
294
|
+
case 0:
|
|
295
|
+
_context.next = 2;
|
|
296
|
+
return _this.generateShareError(err).catch(function (errorGenFailed) {
|
|
297
|
+
return {
|
|
298
|
+
message: err.message || errorGenFailed.message || 'Unknown error',
|
|
299
|
+
retryable: true
|
|
300
|
+
};
|
|
301
|
+
});
|
|
302
|
+
case 2:
|
|
303
|
+
shareError = _context.sent;
|
|
304
|
+
_this.setState({
|
|
305
|
+
isSharing: false,
|
|
306
|
+
shareError: shareError
|
|
307
|
+
});
|
|
308
|
+
(0, _ufoExperienceHelper.isValidFailedExperience)(_ufoExperiences.shareSubmitExp, err);
|
|
309
|
+
case 5:
|
|
310
|
+
case "end":
|
|
311
|
+
return _context.stop();
|
|
312
|
+
}
|
|
313
|
+
}, _callee);
|
|
314
|
+
}));
|
|
315
|
+
return function (_x) {
|
|
316
|
+
return _ref.apply(this, arguments);
|
|
317
|
+
};
|
|
318
|
+
}());
|
|
319
|
+
});
|
|
320
|
+
(0, _defineProperty2.default)(_this, "handleFormDismiss", function (data) {
|
|
321
|
+
_this.setState(function (_ref2) {
|
|
322
|
+
var ignoreIntermediateState = _ref2.ignoreIntermediateState;
|
|
323
|
+
return ignoreIntermediateState ? null : {
|
|
324
|
+
defaultValue: data
|
|
325
|
+
};
|
|
326
|
+
});
|
|
327
|
+
});
|
|
328
|
+
(0, _defineProperty2.default)(_this, "calculatePopupOffset", function (_ref3) {
|
|
329
|
+
var isMenuItemSelected = _ref3.isMenuItemSelected,
|
|
330
|
+
dialogPlacement = _ref3.dialogPlacement;
|
|
331
|
+
if (isMenuItemSelected && dialogPlacement === 'bottom-end') {
|
|
332
|
+
return [-0.1, 8];
|
|
333
|
+
}
|
|
334
|
+
return [0, 8];
|
|
335
|
+
});
|
|
336
|
+
(0, _defineProperty2.default)(_this, "handleCopyLink", function () {
|
|
337
|
+
var _this$props5 = _this.props,
|
|
338
|
+
copyLinkOrigin = _this$props5.copyLinkOrigin,
|
|
339
|
+
shareContentType = _this$props5.shareContentType,
|
|
340
|
+
shareContentSubType = _this$props5.shareContentSubType,
|
|
341
|
+
shareContentId = _this$props5.shareContentId,
|
|
342
|
+
isPublicLink = _this$props5.isPublicLink,
|
|
343
|
+
shareAri = _this$props5.shareAri;
|
|
344
|
+
_this.createAndFireEvent((0, _analytics.copyLinkButtonClicked)({
|
|
345
|
+
start: _this.start,
|
|
346
|
+
shareContentType: shareContentType,
|
|
347
|
+
shareOrigin: copyLinkOrigin,
|
|
348
|
+
isPublicLink: isPublicLink,
|
|
349
|
+
ari: shareAri,
|
|
350
|
+
shareContentSubType: shareContentSubType,
|
|
351
|
+
shareContentId: shareContentId
|
|
352
|
+
}));
|
|
353
|
+
});
|
|
354
|
+
(0, _defineProperty2.default)(_this, "handleIntegrationClick", function (integration) {
|
|
355
|
+
_this.setState({
|
|
356
|
+
isUsingSplitButton: false,
|
|
357
|
+
isDialogOpen: true,
|
|
358
|
+
showIntegrationForm: true,
|
|
359
|
+
selectedIntegration: integration
|
|
360
|
+
});
|
|
361
|
+
});
|
|
362
|
+
(0, _defineProperty2.default)(_this, "renderShareTriggerButton", function (triggerProps) {
|
|
363
|
+
var _this$state2 = _this.state,
|
|
364
|
+
isDialogOpen = _this$state2.isDialogOpen,
|
|
365
|
+
isUsingSplitButton = _this$state2.isUsingSplitButton;
|
|
366
|
+
var _this$props6 = _this.props,
|
|
367
|
+
formatMessage = _this$props6.intl.formatMessage,
|
|
368
|
+
isDisabled = _this$props6.isDisabled,
|
|
369
|
+
renderCustomTriggerButton = _this$props6.renderCustomTriggerButton,
|
|
370
|
+
triggerButtonIcon = _this$props6.triggerButtonIcon,
|
|
371
|
+
triggerButtonTooltipText = _this$props6.triggerButtonTooltipText,
|
|
372
|
+
triggerButtonTooltipPosition = _this$props6.triggerButtonTooltipPosition,
|
|
373
|
+
triggerButtonAppearance = _this$props6.triggerButtonAppearance,
|
|
374
|
+
triggerButtonStyle = _this$props6.triggerButtonStyle,
|
|
375
|
+
integrationMode = _this$props6.integrationMode,
|
|
376
|
+
shareIntegrations = _this$props6.shareIntegrations,
|
|
377
|
+
dialogZIndex = _this$props6.dialogZIndex,
|
|
378
|
+
dialogPlacement = _this$props6.dialogPlacement;
|
|
379
|
+
var button;
|
|
380
|
+
var ShareButtonIcon = triggerButtonIcon || IconShare;
|
|
381
|
+
|
|
382
|
+
// Render a custom or standard button.
|
|
383
|
+
if (renderCustomTriggerButton) {
|
|
384
|
+
var shareError = _this.state.shareError;
|
|
385
|
+
button = renderCustomTriggerButton({
|
|
386
|
+
error: shareError,
|
|
387
|
+
isDisabled: isDisabled,
|
|
388
|
+
isSelected: isDialogOpen,
|
|
389
|
+
onClick: _this.onTriggerClick
|
|
390
|
+
}, triggerProps);
|
|
391
|
+
} else {
|
|
392
|
+
button = /*#__PURE__*/_react.default.createElement(_ShareButton.default, {
|
|
393
|
+
appearance: triggerButtonAppearance,
|
|
394
|
+
text: triggerButtonStyle !== 'icon-only' ? /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _i18n.messages.shareTriggerButtonText) : null,
|
|
395
|
+
"aria-label": formatMessage(_i18n.messages.shareTriggerButtonText),
|
|
396
|
+
onClick: _this.onTriggerClick,
|
|
397
|
+
iconBefore: triggerButtonStyle !== 'text-only' ? /*#__PURE__*/_react.default.createElement(ShareButtonIcon, {
|
|
398
|
+
label: ""
|
|
399
|
+
}) : undefined,
|
|
400
|
+
isSelected: isDialogOpen,
|
|
401
|
+
isDisabled: isDisabled,
|
|
402
|
+
ref: triggerProps.ref
|
|
403
|
+
// When we autoFocus the dialog, we want to autofocus the trigger as well, that way when the dialog is closed, the trigger is focused
|
|
404
|
+
,
|
|
405
|
+
autoFocus: _this.props.isAutoOpenDialog
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
// If the button only shows the icon, wrap it in a tooltip containing the button text.
|
|
410
|
+
if (triggerButtonStyle === 'icon-only') {
|
|
411
|
+
button = /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
412
|
+
content: !isUsingSplitButton ? triggerButtonTooltipText || formatMessage(_i18n.messages.shareTriggerButtonTooltipText) : null,
|
|
413
|
+
position: triggerButtonTooltipPosition,
|
|
414
|
+
hideTooltipOnClick: true
|
|
415
|
+
}, button);
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
// If there are any integrations, wrap the share button in a split button with integrations.
|
|
419
|
+
if (integrationMode === 'split' && shareIntegrations !== null && shareIntegrations !== void 0 && shareIntegrations.length) {
|
|
420
|
+
button = /*#__PURE__*/_react.default.createElement(_SplitButton.default, {
|
|
421
|
+
shareButton: button,
|
|
422
|
+
handleOpenSplitButton: _this.handleOpenSplitButton,
|
|
423
|
+
handleCloseSplitButton: _this.handleCloseSplitButton,
|
|
424
|
+
isUsingSplitButton: isUsingSplitButton,
|
|
425
|
+
triggerButtonAppearance: triggerButtonAppearance,
|
|
426
|
+
dialogZIndex: dialogZIndex,
|
|
427
|
+
dialogPlacement: dialogPlacement,
|
|
428
|
+
shareIntegrations: shareIntegrations,
|
|
429
|
+
onIntegrationClick: _this.handleIntegrationClick,
|
|
430
|
+
createAndFireEvent: _this.createAndFireEvent
|
|
431
|
+
});
|
|
432
|
+
}
|
|
433
|
+
return button;
|
|
434
|
+
});
|
|
435
|
+
(0, _defineProperty2.default)(_this, "handleOpenSplitButton", function () {
|
|
436
|
+
_this.setState({
|
|
437
|
+
isUsingSplitButton: true
|
|
438
|
+
}, function () {
|
|
439
|
+
return _this.handleCloseDialog();
|
|
440
|
+
});
|
|
441
|
+
_this.createAndFireEvent((0, _analytics.shareSplitButtonEvent)());
|
|
442
|
+
});
|
|
443
|
+
(0, _defineProperty2.default)(_this, "handleCloseSplitButton", function () {
|
|
444
|
+
_this.setState({
|
|
445
|
+
isUsingSplitButton: false
|
|
446
|
+
});
|
|
447
|
+
});
|
|
448
|
+
(0, _defineProperty2.default)(_this, "handleOnUserSelectionChange", function (value) {
|
|
449
|
+
var onUserSelectionChange = _this.props.onUserSelectionChange;
|
|
450
|
+
_this.setState({
|
|
451
|
+
shareError: undefined
|
|
452
|
+
});
|
|
453
|
+
onUserSelectionChange === null || onUserSelectionChange === void 0 || onUserSelectionChange(value);
|
|
454
|
+
});
|
|
455
|
+
return _this;
|
|
456
|
+
}
|
|
457
|
+
(0, _inherits2.default)(ShareDialogWithTriggerInternal, _React$PureComponent);
|
|
458
|
+
return (0, _createClass2.default)(ShareDialogWithTriggerInternal, [{
|
|
459
|
+
key: "componentDidMount",
|
|
460
|
+
value: function componentDidMount() {
|
|
461
|
+
if (this.props.isAutoOpenDialog) {
|
|
462
|
+
this.handleDialogOpen();
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
}, {
|
|
466
|
+
key: "componentDidUpdate",
|
|
467
|
+
value: function componentDidUpdate(prevProps) {
|
|
468
|
+
if (this.props.isAutoOpenDialog !== prevProps.isAutoOpenDialog && this.props.isAutoOpenDialog) {
|
|
469
|
+
this.handleDialogOpen();
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
}, {
|
|
473
|
+
key: "componentWillUnmount",
|
|
474
|
+
value: function componentWillUnmount() {
|
|
475
|
+
if (this.props.isAutoOpenDialog && this.props.onDialogClose) {
|
|
476
|
+
this.props.onDialogClose();
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
}, {
|
|
480
|
+
key: "generateShareError",
|
|
481
|
+
value: function () {
|
|
482
|
+
var _generateShareError = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(err) {
|
|
483
|
+
var _errorBody$messagesDe;
|
|
484
|
+
var errorBody, firstErrorFromBody;
|
|
485
|
+
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
486
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
487
|
+
case 0:
|
|
488
|
+
if (!err.body) {
|
|
489
|
+
_context2.next = 6;
|
|
490
|
+
break;
|
|
491
|
+
}
|
|
492
|
+
_context2.next = 3;
|
|
493
|
+
return err.body;
|
|
494
|
+
case 3:
|
|
495
|
+
_context2.t0 = _context2.sent;
|
|
496
|
+
_context2.next = 7;
|
|
497
|
+
break;
|
|
498
|
+
case 6:
|
|
499
|
+
_context2.t0 = {};
|
|
500
|
+
case 7:
|
|
501
|
+
errorBody = _context2.t0;
|
|
502
|
+
// We'll only try and deal with the first error, sorry
|
|
503
|
+
firstErrorFromBody = (_errorBody$messagesDe = errorBody.messagesDetails) === null || _errorBody$messagesDe === void 0 ? void 0 : _errorBody$messagesDe[0];
|
|
504
|
+
return _context2.abrupt("return", {
|
|
505
|
+
message: (firstErrorFromBody === null || firstErrorFromBody === void 0 ? void 0 : firstErrorFromBody.message) || err.message,
|
|
506
|
+
errorCode: firstErrorFromBody === null || firstErrorFromBody === void 0 ? void 0 : firstErrorFromBody.errorCode,
|
|
507
|
+
helpUrl: firstErrorFromBody === null || firstErrorFromBody === void 0 ? void 0 : firstErrorFromBody.helpUrl,
|
|
508
|
+
retryable: (firstErrorFromBody === null || firstErrorFromBody === void 0 ? void 0 : firstErrorFromBody.errorCode) === undefined
|
|
509
|
+
});
|
|
510
|
+
case 10:
|
|
511
|
+
case "end":
|
|
512
|
+
return _context2.stop();
|
|
513
|
+
}
|
|
514
|
+
}, _callee2);
|
|
515
|
+
}));
|
|
516
|
+
function generateShareError(_x2) {
|
|
517
|
+
return _generateShareError.apply(this, arguments);
|
|
518
|
+
}
|
|
519
|
+
return generateShareError;
|
|
520
|
+
}()
|
|
521
|
+
}, {
|
|
522
|
+
key: "render",
|
|
523
|
+
value: function render() {
|
|
524
|
+
var _this2 = this;
|
|
525
|
+
var _this$state3 = this.state,
|
|
526
|
+
isDialogOpen = _this$state3.isDialogOpen,
|
|
527
|
+
isSharing = _this$state3.isSharing,
|
|
528
|
+
shareError = _this$state3.shareError,
|
|
529
|
+
defaultValue = _this$state3.defaultValue,
|
|
530
|
+
showIntegrationForm = _this$state3.showIntegrationForm,
|
|
531
|
+
selectedIntegration = _this$state3.selectedIntegration,
|
|
532
|
+
isMenuItemSelected = _this$state3.isMenuItemSelected;
|
|
533
|
+
var _this$props7 = this.props,
|
|
534
|
+
copyLink = _this$props7.copyLink,
|
|
535
|
+
dialogPlacement = _this$props7.dialogPlacement,
|
|
536
|
+
config = _this$props7.config,
|
|
537
|
+
isFetchingConfig = _this$props7.isFetchingConfig,
|
|
538
|
+
loadUserOptions = _this$props7.loadUserOptions,
|
|
539
|
+
shareFormTitle = _this$props7.shareFormTitle,
|
|
540
|
+
shareFormHelperMessage = _this$props7.shareFormHelperMessage,
|
|
541
|
+
bottomMessage = _this$props7.bottomMessage,
|
|
542
|
+
submitButtonLabel = _this$props7.submitButtonLabel,
|
|
543
|
+
product = _this$props7.product,
|
|
544
|
+
productAttributes = _this$props7.productAttributes,
|
|
545
|
+
customFooter = _this$props7.customFooter,
|
|
546
|
+
enableSmartUserPicker = _this$props7.enableSmartUserPicker,
|
|
547
|
+
loggedInAccountId = _this$props7.loggedInAccountId,
|
|
548
|
+
cloudId = _this$props7.cloudId,
|
|
549
|
+
orgId = _this$props7.orgId,
|
|
550
|
+
shareFieldsFooter = _this$props7.shareFieldsFooter,
|
|
551
|
+
dialogZIndex = _this$props7.dialogZIndex,
|
|
552
|
+
isPublicLink = _this$props7.isPublicLink,
|
|
553
|
+
tabIndex = _this$props7.tabIndex,
|
|
554
|
+
copyTooltipText = _this$props7.copyTooltipText,
|
|
555
|
+
integrationMode = _this$props7.integrationMode,
|
|
556
|
+
shareIntegrations = _this$props7.shareIntegrations,
|
|
557
|
+
additionalTabs = _this$props7.additionalTabs,
|
|
558
|
+
builtInTabContentWidth = _this$props7.builtInTabContentWidth,
|
|
559
|
+
isBrowseUsersDisabled = _this$props7.isBrowseUsersDisabled,
|
|
560
|
+
userPickerOptions = _this$props7.userPickerOptions,
|
|
561
|
+
isSubmitShareDisabled = _this$props7.isSubmitShareDisabled;
|
|
562
|
+
var footer = (0, _utils.resolveShareFooter)(integrationMode, this.state.tabIndex, customFooter);
|
|
563
|
+
|
|
564
|
+
// for performance purposes, we may want to have a loadable content i.e. ShareForm
|
|
565
|
+
return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
566
|
+
xcss: (0, _css.cx)(styles.shareButtonWrapperStyles, typeof tabIndex !== 'undefined' && tabIndex >= 0 && styles.outlineNone),
|
|
567
|
+
tabIndex: tabIndex,
|
|
568
|
+
onKeyDown: this.handleKeyDown
|
|
569
|
+
}, /*#__PURE__*/_react.default.createElement(_popup.default, {
|
|
570
|
+
content: function content() {
|
|
571
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
572
|
+
ref: _this2.containerRef
|
|
573
|
+
}, /*#__PURE__*/_react.default.createElement(_lazy.default, {
|
|
574
|
+
Content: selectedIntegration && selectedIntegration.Content,
|
|
575
|
+
selectedIntegration: selectedIntegration,
|
|
576
|
+
copyLink: copyLink,
|
|
577
|
+
showIntegrationForm: showIntegrationForm,
|
|
578
|
+
bottomMessage: bottomMessage,
|
|
579
|
+
customFooter: footer,
|
|
580
|
+
loadOptions: loadUserOptions,
|
|
581
|
+
isSharing: isSharing,
|
|
582
|
+
shareFormTitle: shareFormTitle,
|
|
583
|
+
showTitle: integrationMode !== 'tabs' || !shareIntegrations || !shareIntegrations.length,
|
|
584
|
+
shareFormHelperMessage: shareFormHelperMessage,
|
|
585
|
+
shareError: shareError,
|
|
586
|
+
defaultValue: defaultValue,
|
|
587
|
+
config: config,
|
|
588
|
+
isFetchingConfig: isFetchingConfig,
|
|
589
|
+
setIsLoading: _this2.setIsLoading,
|
|
590
|
+
submitButtonLabel: submitButtonLabel,
|
|
591
|
+
product: product,
|
|
592
|
+
productAttributes: productAttributes,
|
|
593
|
+
enableSmartUserPicker: enableSmartUserPicker,
|
|
594
|
+
loggedInAccountId: loggedInAccountId,
|
|
595
|
+
cloudId: cloudId,
|
|
596
|
+
orgId: orgId,
|
|
597
|
+
onUserSelectionChange: _this2.handleOnUserSelectionChange,
|
|
598
|
+
shareFieldsFooter: shareFieldsFooter,
|
|
599
|
+
isPublicLink: isPublicLink,
|
|
600
|
+
copyTooltipText: copyTooltipText,
|
|
601
|
+
integrationMode: integrationMode,
|
|
602
|
+
shareIntegrations: shareIntegrations,
|
|
603
|
+
additionalTabs: additionalTabs,
|
|
604
|
+
builtInTabContentWidth: builtInTabContentWidth,
|
|
605
|
+
isMenuItemSelected: isMenuItemSelected,
|
|
606
|
+
isSubmitShareDisabled: isSubmitShareDisabled
|
|
607
|
+
// actions
|
|
608
|
+
,
|
|
609
|
+
onLinkCopy: _this2.handleCopyLink,
|
|
610
|
+
onSubmit: _this2.handleShareSubmit,
|
|
611
|
+
onDismiss: _this2.handleFormDismiss,
|
|
612
|
+
onDialogClose: _this2.handleCloseDialog,
|
|
613
|
+
onTabChange: _this2.onTabChange,
|
|
614
|
+
onMenuItemChange: _this2.onMenuItemChange
|
|
615
|
+
//ref
|
|
616
|
+
,
|
|
617
|
+
selectPortalRef: _this2.selectPortalRef,
|
|
618
|
+
isBrowseUsersDisabled: isBrowseUsersDisabled,
|
|
619
|
+
userPickerOptions: userPickerOptions
|
|
620
|
+
}));
|
|
621
|
+
},
|
|
622
|
+
isOpen: isDialogOpen,
|
|
623
|
+
onClose: this.handleCloseDialog,
|
|
624
|
+
placement: dialogPlacement,
|
|
625
|
+
trigger: this.renderShareTriggerButton,
|
|
626
|
+
zIndex: dialogZIndex,
|
|
627
|
+
label: this.props.intl.formatMessage(_i18n.messages.sharePopupLabel),
|
|
628
|
+
role: "dialog"
|
|
629
|
+
// TODO: remove after https://hello.atlassian.net/wiki/x/SoEGzQ experiment is finished
|
|
630
|
+
,
|
|
631
|
+
offset: this.calculatePopupOffset({
|
|
632
|
+
isMenuItemSelected: isMenuItemSelected,
|
|
633
|
+
dialogPlacement: dialogPlacement
|
|
634
|
+
}),
|
|
635
|
+
shouldRenderToParent: (0, _platformFeatureFlags.fg)('enable-appropriate-reading-order-in-share-dialog')
|
|
636
|
+
}), /*#__PURE__*/_react.default.createElement(_portal.default, {
|
|
637
|
+
zIndex: (0, _utils.generateSelectZIndex)(dialogZIndex)
|
|
638
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
639
|
+
ref: this.selectPortalRef
|
|
640
|
+
})));
|
|
641
|
+
}
|
|
642
|
+
}]);
|
|
643
|
+
}(_react.default.PureComponent);
|
|
644
|
+
(0, _defineProperty2.default)(ShareDialogWithTriggerInternal, "defaultProps", {
|
|
645
|
+
isDisabled: false,
|
|
646
|
+
dialogPlacement: 'bottom-end',
|
|
647
|
+
shouldCloseOnEscapePress: true,
|
|
648
|
+
triggerButtonAppearance: 'subtle',
|
|
649
|
+
triggerButtonStyle: 'icon-only',
|
|
650
|
+
triggerButtonTooltipPosition: 'top',
|
|
651
|
+
dialogZIndex: _constants.layers.modal()
|
|
652
|
+
});
|
|
653
|
+
var ShareDialogWithTrigger = exports.ShareDialogWithTrigger = (0, _analyticsNext.withAnalyticsEvents)()((0, _reactIntlNext.injectIntl)(ShareDialogWithTriggerInternal));
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
._11c81vlj{font:var(--ds-font-body-small,normal 400 11px/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
|
|
2
|
+
._2rkoglpi{border-radius:var(--ds-border-radius,4px)}
|
|
3
|
+
._18zrutpp{padding-inline:var(--ds-space-150,9pt)}
|
|
4
|
+
._195g10v4{margin-inline:var(--ds-space-negative-300,-24px)}
|
|
5
|
+
._1moux0bf{margin-block:var(--ds-space-negative-100,-8px)}
|
|
6
|
+
._1rjcze3t{padding-block:var(--ds-space-0,0)}
|
|
7
|
+
._18u01wug{margin-left:auto}
|
|
8
|
+
._19pku2gc{margin-top:var(--ds-space-100,8px)}
|
|
9
|
+
._1bah1y6m{justify-content:flex-start}
|
|
10
|
+
._1bsb1osq{width:100%}
|
|
11
|
+
._1bsb1w81{width:150px}
|
|
12
|
+
._1e0c1txw{display:flex}
|
|
13
|
+
._1wpz1h6o{align-self:center}
|
|
14
|
+
._2hwx1b66{margin-right:var(--ds-space-050,4px)}
|
|
15
|
+
._4cvr1h6o{align-items:center}
|
|
16
|
+
._4cvr1y6m{align-items:flex-start}
|
|
17
|
+
._otyr196n{margin-bottom:var(--ds-space-negative-075,-6px)}
|
|
18
|
+
._otyrpxbi{margin-bottom:var(--ds-space-200,1pc)}
|
|
19
|
+
._otyrutpp{margin-bottom:var(--ds-space-150,9pt)}
|
|
20
|
+
._syaz1fxt{color:var(--ds-text,#172b4d)}
|
|
21
|
+
._syaz1n3s{color:var(--ds-text-subtle,#5e6c84)}
|