@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
|
@@ -8,15 +8,10 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
8
8
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
9
9
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
10
10
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
11
|
-
|
|
12
11
|
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; }
|
|
13
|
-
|
|
14
12
|
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; }
|
|
15
|
-
|
|
16
13
|
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); }; }
|
|
17
|
-
|
|
18
14
|
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; } }
|
|
19
|
-
|
|
20
15
|
import React from 'react';
|
|
21
16
|
import deepEqual from 'fast-deep-equal';
|
|
22
17
|
import memoizeOne from 'memoize-one';
|
|
@@ -40,43 +35,33 @@ export var defaultConfig = {
|
|
|
40
35
|
var memoizedFormatCopyLink = memoizeOne(function (origin, link) {
|
|
41
36
|
return origin.addToUrl(link);
|
|
42
37
|
});
|
|
43
|
-
|
|
44
38
|
function getCurrentPageUrl() {
|
|
45
39
|
return window.location.href;
|
|
46
40
|
}
|
|
41
|
+
|
|
47
42
|
/**
|
|
48
43
|
* This component serves as a Provider to provide customizable implementations
|
|
49
44
|
* to ShareDialogTrigger component
|
|
50
45
|
*/
|
|
51
46
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
52
|
-
|
|
53
|
-
|
|
54
47
|
export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Component) {
|
|
55
48
|
_inherits(ShareDialogContainerInternal, _React$Component);
|
|
56
|
-
|
|
57
49
|
var _super = _createSuper(ShareDialogContainerInternal);
|
|
58
|
-
|
|
59
50
|
function ShareDialogContainerInternal(props) {
|
|
60
51
|
var _this;
|
|
61
|
-
|
|
62
52
|
_classCallCheck(this, ShareDialogContainerInternal);
|
|
53
|
+
_this = _super.call(this, props);
|
|
63
54
|
|
|
64
|
-
|
|
65
|
-
|
|
55
|
+
// v0.4 -> v0.5 .client -> .shareClient
|
|
66
56
|
_defineProperty(_assertThisInitialized(_this), "_isMounted", false);
|
|
67
|
-
|
|
68
57
|
_defineProperty(_assertThisInitialized(_this), "_urlShorteningRequestCounter", 0);
|
|
69
|
-
|
|
70
58
|
_defineProperty(_assertThisInitialized(_this), "_lastUrlShorteningWasTooSlow", false);
|
|
71
|
-
|
|
72
59
|
_defineProperty(_assertThisInitialized(_this), "createAndFireEvent", function (payload) {
|
|
73
60
|
var createAnalyticsEvent = _this.props.createAnalyticsEvent;
|
|
74
|
-
|
|
75
61
|
if (createAnalyticsEvent) {
|
|
76
62
|
createAnalyticsEvent(payload).fire(CHANNEL_ID);
|
|
77
63
|
}
|
|
78
64
|
});
|
|
79
|
-
|
|
80
65
|
_defineProperty(_assertThisInitialized(_this), "fetchConfig", function () {
|
|
81
66
|
_this.setState({
|
|
82
67
|
isFetchingConfig: true
|
|
@@ -90,42 +75,33 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
|
|
|
90
75
|
renderShareDialogExp.start();
|
|
91
76
|
_context.next = 4;
|
|
92
77
|
return _this.shareClient.getConfig(_this.props.cloudId);
|
|
93
|
-
|
|
94
78
|
case 4:
|
|
95
79
|
config = _context.sent;
|
|
96
|
-
|
|
97
80
|
if (_this._isMounted) {
|
|
98
81
|
_this.setState({
|
|
99
82
|
config: config,
|
|
100
83
|
isFetchingConfig: false
|
|
101
84
|
});
|
|
102
85
|
}
|
|
103
|
-
|
|
104
86
|
renderShareDialogExp.success();
|
|
105
87
|
_context.next = 15;
|
|
106
88
|
break;
|
|
107
|
-
|
|
108
89
|
case 9:
|
|
109
90
|
_context.prev = 9;
|
|
110
91
|
_context.t0 = _context["catch"](0);
|
|
111
|
-
|
|
112
92
|
if (_this._isMounted) {
|
|
113
93
|
_this.setState({
|
|
114
94
|
config: defaultConfig,
|
|
115
95
|
isFetchingConfig: false
|
|
116
96
|
});
|
|
117
97
|
}
|
|
118
|
-
|
|
119
98
|
errObj = _extends({}, _context.t0);
|
|
120
|
-
|
|
121
99
|
if (_context.t0 instanceof Error) {
|
|
122
100
|
errObj = _objectSpread(_objectSpread({}, errObj), {}, {
|
|
123
101
|
className: _context.t0.constructor.name
|
|
124
102
|
});
|
|
125
103
|
}
|
|
126
|
-
|
|
127
104
|
isValidFailedExperience(renderShareDialogExp, errObj);
|
|
128
|
-
|
|
129
105
|
case 15:
|
|
130
106
|
case "end":
|
|
131
107
|
return _context.stop();
|
|
@@ -134,19 +110,16 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
|
|
|
134
110
|
}, _callee, null, [[0, 9]]);
|
|
135
111
|
})));
|
|
136
112
|
});
|
|
137
|
-
|
|
138
113
|
_defineProperty(_assertThisInitialized(_this), "handleSubmitShare", function (_ref2) {
|
|
139
114
|
var users = _ref2.users,
|
|
140
|
-
|
|
141
|
-
|
|
115
|
+
comment = _ref2.comment;
|
|
142
116
|
var shareLink = _this.getFormShareLink();
|
|
143
|
-
|
|
144
117
|
var _this$props = _this.props,
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
118
|
+
productId = _this$props.productId,
|
|
119
|
+
shareAri = _this$props.shareAri,
|
|
120
|
+
shareContentType = _this$props.shareContentType,
|
|
121
|
+
shareTitle = _this$props.shareTitle,
|
|
122
|
+
shareeAction = _this$props.shareeAction;
|
|
150
123
|
var content = {
|
|
151
124
|
ari: shareAri,
|
|
152
125
|
link: shareLink,
|
|
@@ -161,9 +134,9 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
|
|
|
161
134
|
return _this.shareClient.share(content, optionDataToUsers(users), metaData, comment).then(function () {
|
|
162
135
|
if (!_this._isMounted) {
|
|
163
136
|
return;
|
|
164
|
-
}
|
|
165
|
-
|
|
137
|
+
}
|
|
166
138
|
|
|
139
|
+
// renew Origin Tracing Id per share action succeeded
|
|
167
140
|
_this.setState(function (state) {
|
|
168
141
|
return {
|
|
169
142
|
shareActionCount: state.shareActionCount + 1
|
|
@@ -171,7 +144,6 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
|
|
|
171
144
|
});
|
|
172
145
|
});
|
|
173
146
|
});
|
|
174
|
-
|
|
175
147
|
_defineProperty(_assertThisInitialized(_this), "handleDialogOpen", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
176
148
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
177
149
|
while (1) {
|
|
@@ -180,16 +152,14 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
|
|
|
180
152
|
if (_this.props.onDialogOpen) {
|
|
181
153
|
_this.props.onDialogOpen();
|
|
182
154
|
}
|
|
183
|
-
|
|
184
155
|
_this.setState({
|
|
185
156
|
currentPageUrl: getCurrentPageUrl()
|
|
186
157
|
}, function () {
|
|
187
158
|
_this.updateShortCopyLink();
|
|
188
|
-
});
|
|
189
|
-
|
|
159
|
+
});
|
|
190
160
|
|
|
161
|
+
// always refetch the config when modal is re-opened
|
|
191
162
|
_this.fetchConfig();
|
|
192
|
-
|
|
193
163
|
case 3:
|
|
194
164
|
case "end":
|
|
195
165
|
return _context2.stop();
|
|
@@ -197,7 +167,6 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
|
|
|
197
167
|
}
|
|
198
168
|
}, _callee2);
|
|
199
169
|
})));
|
|
200
|
-
|
|
201
170
|
_defineProperty(_assertThisInitialized(_this), "decorateAnalytics", function (payload) {
|
|
202
171
|
if (payload.type === COPY_LINK_EVENT.type && payload.action === COPY_LINK_EVENT.action && payload.actionSubjectId === COPY_LINK_EVENT.actionSubjectId) {
|
|
203
172
|
var isCopyLinkShortened = !!_this.getShortenedCopyLink();
|
|
@@ -206,46 +175,35 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
|
|
|
206
175
|
shortUrl: isCopyLinkShortened
|
|
207
176
|
})
|
|
208
177
|
});
|
|
209
|
-
|
|
210
178
|
if (_this.shouldShortenCopyLink() && !isCopyLinkShortened) {
|
|
211
179
|
_this._lastUrlShorteningWasTooSlow = true;
|
|
212
180
|
}
|
|
213
181
|
}
|
|
214
|
-
|
|
215
182
|
return payload;
|
|
216
183
|
});
|
|
217
|
-
|
|
218
184
|
_defineProperty(_assertThisInitialized(_this), "getUniqueCopyLinkOriginTracing", memoizeOne(function (link, originTracingFactory) {
|
|
219
185
|
return originTracingFactory();
|
|
220
186
|
}));
|
|
221
|
-
|
|
222
187
|
_defineProperty(_assertThisInitialized(_this), "getUniqueFormShareOriginTracing", memoizeOne(function (link, originTracingFactory, shareCount) {
|
|
223
188
|
return originTracingFactory();
|
|
224
189
|
}));
|
|
225
|
-
|
|
226
190
|
_defineProperty(_assertThisInitialized(_this), "getUpToDateShortenedCopyLink", memoizeOne(function (data) {
|
|
227
191
|
_this._lastUrlShorteningWasTooSlow = false;
|
|
228
192
|
_this._urlShorteningRequestCounter++;
|
|
229
|
-
|
|
230
193
|
_this.createAndFireEvent(shortUrlRequested());
|
|
231
|
-
|
|
232
194
|
var start = Date.now();
|
|
233
195
|
return _this.urlShortenerClient.shorten(data).then(function (response) {
|
|
234
196
|
_this.createAndFireEvent(shortUrlGenerated(start, _this._lastUrlShorteningWasTooSlow));
|
|
235
|
-
|
|
236
197
|
return response.shortUrl;
|
|
237
198
|
}).catch(function () {
|
|
238
199
|
_this.createAndFireEvent(errorEncountered('urlShortening'));
|
|
239
|
-
|
|
240
200
|
return null;
|
|
241
201
|
});
|
|
242
202
|
}, deepEqual));
|
|
243
|
-
|
|
244
203
|
_defineProperty(_assertThisInitialized(_this), "getFormShareLink", function () {
|
|
245
204
|
// original share link is used here
|
|
246
205
|
return _this.getRawLink();
|
|
247
206
|
});
|
|
248
|
-
|
|
249
207
|
assert(!props.client, 'elements/share: Breaking change, please update your props!');
|
|
250
208
|
_this.shareClient = props.shareClient || new ShareServiceClient();
|
|
251
209
|
_this.urlShortenerClient = props.urlShortenerClient || new AtlassianUrlShortenerClient();
|
|
@@ -258,7 +216,6 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
|
|
|
258
216
|
};
|
|
259
217
|
return _this;
|
|
260
218
|
}
|
|
261
|
-
|
|
262
219
|
_createClass(ShareDialogContainerInternal, [{
|
|
263
220
|
key: "componentDidMount",
|
|
264
221
|
value: function componentDidMount() {
|
|
@@ -332,17 +289,16 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
|
|
|
332
289
|
key: "getShortLinkData",
|
|
333
290
|
value: function getShortLinkData(props) {
|
|
334
291
|
var shortLinkData = props.shortLinkData,
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
292
|
+
useUrlShortener = props.useUrlShortener,
|
|
293
|
+
cloudId = props.cloudId,
|
|
294
|
+
product = props.product;
|
|
339
295
|
if (shortLinkData) {
|
|
340
296
|
return _objectSpread(_objectSpread({}, shortLinkData), {}, {
|
|
341
297
|
query: this.addOriginToShortQuery(shortLinkData.query)
|
|
342
298
|
});
|
|
343
|
-
}
|
|
344
|
-
|
|
299
|
+
}
|
|
345
300
|
|
|
301
|
+
// Use the legacy link type if old API is being used
|
|
346
302
|
if (useUrlShortener && product === 'confluence') {
|
|
347
303
|
return {
|
|
348
304
|
cloudId: cloudId,
|
|
@@ -353,36 +309,29 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
|
|
|
353
309
|
}
|
|
354
310
|
};
|
|
355
311
|
}
|
|
356
|
-
|
|
357
312
|
return undefined;
|
|
358
313
|
}
|
|
359
314
|
}, {
|
|
360
315
|
key: "updateShortCopyLink",
|
|
361
316
|
value: function updateShortCopyLink() {
|
|
362
317
|
var _this2 = this;
|
|
363
|
-
|
|
364
318
|
this.setState({
|
|
365
319
|
shortenedCopyLink: null
|
|
366
320
|
});
|
|
367
321
|
var shortLinkData = this.getShortLinkData(this.props);
|
|
368
|
-
|
|
369
322
|
if (!shortLinkData) {
|
|
370
323
|
return;
|
|
371
324
|
}
|
|
372
|
-
|
|
373
325
|
var shortLink = this.getUpToDateShortenedCopyLink(shortLinkData);
|
|
374
326
|
var requestCounter = this._urlShorteningRequestCounter;
|
|
375
327
|
shortLink.then(function (shortenedCopyLink) {
|
|
376
328
|
if (!_this2._isMounted) {
|
|
377
329
|
return;
|
|
378
330
|
}
|
|
379
|
-
|
|
380
331
|
var isRequestOutdated = requestCounter !== _this2._urlShorteningRequestCounter;
|
|
381
|
-
|
|
382
332
|
if (isRequestOutdated) {
|
|
383
333
|
return;
|
|
384
334
|
}
|
|
385
|
-
|
|
386
335
|
_this2.setState({
|
|
387
336
|
shortenedCopyLink: shortenedCopyLink
|
|
388
337
|
});
|
|
@@ -392,43 +341,44 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
|
|
|
392
341
|
key: "render",
|
|
393
342
|
value: function render() {
|
|
394
343
|
var _this$props2 = this.props,
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
344
|
+
cloudId = _this$props2.cloudId,
|
|
345
|
+
orgId = _this$props2.orgId,
|
|
346
|
+
isAutoOpenDialog = _this$props2.isAutoOpenDialog,
|
|
347
|
+
dialogPlacement = _this$props2.dialogPlacement,
|
|
348
|
+
loadUserOptions = _this$props2.loadUserOptions,
|
|
349
|
+
renderCustomTriggerButton = _this$props2.renderCustomTriggerButton,
|
|
350
|
+
shareContentType = _this$props2.shareContentType,
|
|
351
|
+
isJwmShareToSlackFFEnabled = _this$props2.isJwmShareToSlackFFEnabled,
|
|
352
|
+
shareFormTitle = _this$props2.shareFormTitle,
|
|
353
|
+
shareFormHelperMessage = _this$props2.shareFormHelperMessage,
|
|
354
|
+
shouldCloseOnEscapePress = _this$props2.shouldCloseOnEscapePress,
|
|
355
|
+
showFlags = _this$props2.showFlags,
|
|
356
|
+
enableSmartUserPicker = _this$props2.enableSmartUserPicker,
|
|
357
|
+
loggedInAccountId = _this$props2.loggedInAccountId,
|
|
358
|
+
triggerButtonAppearance = _this$props2.triggerButtonAppearance,
|
|
359
|
+
triggerButtonIcon = _this$props2.triggerButtonIcon,
|
|
360
|
+
triggerButtonStyle = _this$props2.triggerButtonStyle,
|
|
361
|
+
triggerButtonTooltipText = _this$props2.triggerButtonTooltipText,
|
|
362
|
+
triggerButtonTooltipPosition = _this$props2.triggerButtonTooltipPosition,
|
|
363
|
+
bottomMessage = _this$props2.bottomMessage,
|
|
364
|
+
shareeAction = _this$props2.shareeAction,
|
|
365
|
+
product = _this$props2.product,
|
|
366
|
+
customFooter = _this$props2.customFooter,
|
|
367
|
+
onTriggerButtonClick = _this$props2.onTriggerButtonClick,
|
|
368
|
+
onUserSelectionChange = _this$props2.onUserSelectionChange,
|
|
369
|
+
shareFieldsFooter = _this$props2.shareFieldsFooter,
|
|
370
|
+
isCopyDisabled = _this$props2.isCopyDisabled,
|
|
371
|
+
isPublicLink = _this$props2.isPublicLink,
|
|
372
|
+
integrationMode = _this$props2.integrationMode,
|
|
373
|
+
shareIntegrations = _this$props2.shareIntegrations,
|
|
374
|
+
shareAri = _this$props2.shareAri,
|
|
375
|
+
tabIndex = _this$props2.tabIndex,
|
|
376
|
+
copyTooltipText = _this$props2.copyTooltipText,
|
|
377
|
+
onDialogClose = _this$props2.onDialogClose,
|
|
378
|
+
isBrowseUsersDisabled = _this$props2.isBrowseUsersDisabled;
|
|
429
379
|
var _this$state = this.state,
|
|
430
|
-
|
|
431
|
-
|
|
380
|
+
config = _this$state.config,
|
|
381
|
+
isFetchingConfig = _this$state.isFetchingConfig;
|
|
432
382
|
return /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(MessagesIntlProvider, null, /*#__PURE__*/React.createElement(ShareDialogWithTrigger, {
|
|
433
383
|
onTriggerButtonClick: onTriggerButtonClick,
|
|
434
384
|
isAutoOpenDialog: isAutoOpenDialog,
|
|
@@ -442,6 +392,7 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
|
|
|
442
392
|
onShareSubmit: this.handleSubmitShare,
|
|
443
393
|
renderCustomTriggerButton: renderCustomTriggerButton,
|
|
444
394
|
shareContentType: shareContentType,
|
|
395
|
+
isJwmShareToSlackFFEnabled: isJwmShareToSlackFFEnabled,
|
|
445
396
|
shareFormTitle: shareFormTitle,
|
|
446
397
|
shareFormHelperMessage: shareFormHelperMessage,
|
|
447
398
|
copyLinkOrigin: this.getCopyLinkOriginTracing(),
|
|
@@ -475,14 +426,11 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
|
|
|
475
426
|
})));
|
|
476
427
|
}
|
|
477
428
|
}]);
|
|
478
|
-
|
|
479
429
|
return ShareDialogContainerInternal;
|
|
480
430
|
}(React.Component);
|
|
481
|
-
|
|
482
431
|
_defineProperty(ShareDialogContainerInternal, "defaultProps", {
|
|
483
432
|
enableSmartUserPicker: false,
|
|
484
433
|
shareeAction: 'view',
|
|
485
434
|
product: 'confluence'
|
|
486
435
|
});
|
|
487
|
-
|
|
488
436
|
export var ShareDialogContainer = withAnalyticsEvents()(ShareDialogContainerInternal);
|