@atlaskit/share 6.6.1 → 6.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/cjs/components/ShareForm.js +68 -165
- package/dist/cjs/components/ShareFormNext.js +70 -169
- package/dist/cjs/components/analytics/analytics.js +1 -1
- package/dist/es2019/components/ShareForm.js +36 -119
- package/dist/es2019/components/ShareFormNext.js +37 -122
- package/dist/es2019/components/analytics/analytics.js +1 -1
- package/dist/esm/components/ShareForm.js +68 -165
- package/dist/esm/components/ShareFormNext.js +70 -169
- package/dist/esm/components/analytics/analytics.js +1 -1
- package/package.json +4 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/share
|
|
2
2
|
|
|
3
|
+
## 6.6.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#160514](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/160514)
|
|
8
|
+
[`106f4550f0e10`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/106f4550f0e10) -
|
|
9
|
+
clean outgoing mail fix feature gate
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 6.6.2
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 6.6.1
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -245,7 +245,7 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
245
245
|
var formSendLabel = _i18n.messages.formShare;
|
|
246
246
|
var sendLabel = isPublicLink ? formPublicLabel : formSendLabel;
|
|
247
247
|
var buttonLabel = isRetryableError ? _i18n.messages.formRetry : sendLabel;
|
|
248
|
-
var buttonDisabled = isDisabled || isNonRetryableError || isSubmitShareDisabled
|
|
248
|
+
var buttonDisabled = isDisabled || isNonRetryableError || isSubmitShareDisabled;
|
|
249
249
|
var ButtonLabelWrapper = buttonAppearance === 'warning' ? 'strong' : _react.default.Fragment;
|
|
250
250
|
return (0, _react2.jsx)("div", {
|
|
251
251
|
css: submitButtonWrapperStyles
|
|
@@ -318,163 +318,64 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
318
318
|
handleCloseDialog = _this$props7.handleCloseDialog,
|
|
319
319
|
isExtendedShareDialogEnabled = _this$props7.isExtendedShareDialogEnabled;
|
|
320
320
|
var selectedMenuItem = this.state.selectedMenuItem;
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
if (integrationMode === 'off' || !hasShareIntegrations && !hasAdditionalTabs) {
|
|
325
|
-
return this.renderShareForm();
|
|
326
|
-
}
|
|
327
|
-
if (selectedMenuItem === 'default') {
|
|
328
|
-
return this.renderShareForm();
|
|
329
|
-
}
|
|
330
|
-
if (hasShareIntegrations) {
|
|
331
|
-
var _firstIntegration = shareIntegrations[0];
|
|
332
|
-
if (selectedMenuItem === 'Slack') {
|
|
333
|
-
return (0, _react2.jsx)(_IntegrationForm.IntegrationForm, {
|
|
334
|
-
Content: _firstIntegration.Content,
|
|
335
|
-
onIntegrationClose: function onIntegrationClose() {
|
|
336
|
-
return handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog();
|
|
337
|
-
}
|
|
338
|
-
});
|
|
339
|
-
}
|
|
340
|
-
if (integrationMode === 'menu') {
|
|
341
|
-
return (0, _react2.jsx)(_primitives.Box, {
|
|
342
|
-
xcss: menuGroupContainerStyles
|
|
343
|
-
}, (0, _react2.jsx)(_menu.MenuGroup, null, (0, _react2.jsx)(_ShareMenuItem.ShareMenuItem, {
|
|
344
|
-
iconName: (0, _react2.jsx)(_firstIntegration.Icon, null),
|
|
345
|
-
labelId: _i18n.messages.slackMenuItemText,
|
|
346
|
-
onClickHandler: function onClickHandler() {
|
|
347
|
-
return _this2.changeMenuItem('Slack');
|
|
348
|
-
}
|
|
349
|
-
}), (0, _react2.jsx)(_ShareMenuItem.ShareMenuItem, {
|
|
350
|
-
iconName: (0, _react2.jsx)(_email.default, {
|
|
351
|
-
color: "currentColor",
|
|
352
|
-
label: "",
|
|
353
|
-
LEGACY_size: "medium",
|
|
354
|
-
spacing: "spacious"
|
|
355
|
-
}),
|
|
356
|
-
labelId: _i18n.messages.emailMenuItemText,
|
|
357
|
-
onClickHandler: function onClickHandler() {
|
|
358
|
-
return _this2.changeMenuItem('default');
|
|
359
|
-
}
|
|
360
|
-
})));
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
if (integrationMode === 'tabs') {
|
|
364
|
-
var DEFAULT_TAB_CONTENT_WIDTH = isExtendedShareDialogEnabled ? 452 : 304;
|
|
365
|
-
return (0, _react2.jsx)(_tabs.default, {
|
|
366
|
-
id: "ShareForm-Tabs-Integrations",
|
|
367
|
-
onChange: this.changeTab,
|
|
368
|
-
selected: this.state.selectedTab
|
|
369
|
-
}, (0, _react2.jsx)(_tabs.TabList, null, (0, _react2.jsx)(_tabs.Tab, {
|
|
370
|
-
key: "share-tab-default"
|
|
371
|
-
}, this.renderMainTabTitle()), shareIntegrations === null || shareIntegrations === void 0 ? void 0 : shareIntegrations.map(function (integration) {
|
|
372
|
-
return (0, _react2.jsx)(_tabs.Tab, {
|
|
373
|
-
key: "share-tab-".concat(integration.type)
|
|
374
|
-
}, (0, _react2.jsx)("div", {
|
|
375
|
-
css: integrationWrapperStyles
|
|
376
|
-
}, (0, _react2.jsx)("span", {
|
|
377
|
-
css: integrationIconWrapperStyles
|
|
378
|
-
}, (0, _react2.jsx)(integration.Icon, null)), integrationTabText(integration.type)));
|
|
379
|
-
}), (0, _platformFeatureFlags.fg)('smart_links_for_plans_platform') && (additionalTabs === null || additionalTabs === void 0 ? void 0 : additionalTabs.map(function (tab) {
|
|
380
|
-
return (0, _react2.jsx)(_tabs.Tab, {
|
|
381
|
-
key: "share-tab-".concat(tab.label)
|
|
382
|
-
}, tab.label);
|
|
383
|
-
}))), (0, _react2.jsx)(_tabs.TabPanel, {
|
|
384
|
-
key: "share-tabPanel-default"
|
|
385
|
-
}, (0, _react2.jsx)("div", {
|
|
386
|
-
css: formWrapperStyles
|
|
387
|
-
}, (0, _react2.jsx)("div", {
|
|
388
|
-
style: {
|
|
389
|
-
width: "".concat(builtInTabContentWidth || DEFAULT_TAB_CONTENT_WIDTH, "px")
|
|
390
|
-
}
|
|
391
|
-
}, this.renderShareForm()))), shareIntegrations === null || shareIntegrations === void 0 ? void 0 : shareIntegrations.map(function (integration) {
|
|
392
|
-
return (0, _react2.jsx)(_tabs.TabPanel, {
|
|
393
|
-
key: "share-tabPanel-integration"
|
|
394
|
-
}, (0, _react2.jsx)(_analyticsNext.AnalyticsContext, {
|
|
395
|
-
data: {
|
|
396
|
-
source: _analytics.INTEGRATION_MODAL_SOURCE
|
|
397
|
-
}
|
|
398
|
-
}, (0, _react2.jsx)("div", {
|
|
399
|
-
css: formWrapperStyles
|
|
400
|
-
}, (0, _react2.jsx)("div", {
|
|
401
|
-
style: {
|
|
402
|
-
width: "".concat(builtInTabContentWidth || DEFAULT_TAB_CONTENT_WIDTH, "px")
|
|
403
|
-
}
|
|
404
|
-
}, (0, _react2.jsx)(_IntegrationForm.IntegrationForm, {
|
|
405
|
-
Content: integration.Content,
|
|
406
|
-
onIntegrationClose: function onIntegrationClose() {
|
|
407
|
-
return handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog();
|
|
408
|
-
},
|
|
409
|
-
changeTab: _this2.changeTab
|
|
410
|
-
})))));
|
|
411
|
-
}), (0, _platformFeatureFlags.fg)('smart_links_for_plans_platform') && (additionalTabs === null || additionalTabs === void 0 ? void 0 : additionalTabs.map(function (tab) {
|
|
412
|
-
return (0, _react2.jsx)(_tabs.TabPanel, {
|
|
413
|
-
key: "share-tabPanel-".concat(tab.label)
|
|
414
|
-
}, (0, _react2.jsx)("div", {
|
|
415
|
-
css: formWrapperStyles
|
|
416
|
-
}, (0, _react2.jsx)(_IntegrationForm.IntegrationForm, {
|
|
417
|
-
Content: tab.Content,
|
|
418
|
-
onIntegrationClose: function onIntegrationClose() {
|
|
419
|
-
return handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog();
|
|
420
|
-
},
|
|
421
|
-
changeTab: _this2.changeTab
|
|
422
|
-
})));
|
|
423
|
-
})));
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
if (integrationMode === 'off' || !shareIntegrations || !shareIntegrations.length) {
|
|
321
|
+
var hasShareIntegrations = shareIntegrations && shareIntegrations.length;
|
|
322
|
+
var hasAdditionalTabs = additionalTabs && additionalTabs.length;
|
|
323
|
+
if (integrationMode === 'off' || !hasShareIntegrations && !hasAdditionalTabs) {
|
|
427
324
|
return this.renderShareForm();
|
|
428
325
|
}
|
|
429
|
-
var firstIntegration = shareIntegrations[0];
|
|
430
326
|
if (selectedMenuItem === 'default') {
|
|
431
327
|
return this.renderShareForm();
|
|
432
328
|
}
|
|
433
|
-
if (
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
329
|
+
if (hasShareIntegrations) {
|
|
330
|
+
var firstIntegration = shareIntegrations[0];
|
|
331
|
+
if (selectedMenuItem === 'Slack') {
|
|
332
|
+
return (0, _react2.jsx)(_IntegrationForm.IntegrationForm, {
|
|
333
|
+
Content: firstIntegration.Content,
|
|
334
|
+
onIntegrationClose: function onIntegrationClose() {
|
|
335
|
+
return handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog();
|
|
336
|
+
}
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
if (integrationMode === 'menu') {
|
|
340
|
+
return (0, _react2.jsx)(_primitives.Box, {
|
|
341
|
+
xcss: menuGroupContainerStyles
|
|
342
|
+
}, (0, _react2.jsx)(_menu.MenuGroup, null, (0, _react2.jsx)(_ShareMenuItem.ShareMenuItem, {
|
|
343
|
+
iconName: (0, _react2.jsx)(firstIntegration.Icon, null),
|
|
344
|
+
labelId: _i18n.messages.slackMenuItemText,
|
|
345
|
+
onClickHandler: function onClickHandler() {
|
|
346
|
+
return _this2.changeMenuItem('Slack');
|
|
347
|
+
}
|
|
348
|
+
}), (0, _react2.jsx)(_ShareMenuItem.ShareMenuItem, {
|
|
349
|
+
iconName: (0, _react2.jsx)(_email.default, {
|
|
350
|
+
color: "currentColor",
|
|
351
|
+
label: "",
|
|
352
|
+
LEGACY_size: "medium",
|
|
353
|
+
spacing: "spacious"
|
|
354
|
+
}),
|
|
355
|
+
labelId: _i18n.messages.emailMenuItemText,
|
|
356
|
+
onClickHandler: function onClickHandler() {
|
|
357
|
+
return _this2.changeMenuItem('default');
|
|
358
|
+
}
|
|
359
|
+
})));
|
|
360
|
+
}
|
|
462
361
|
}
|
|
463
362
|
if (integrationMode === 'tabs') {
|
|
464
|
-
var
|
|
363
|
+
var DEFAULT_TAB_CONTENT_WIDTH = isExtendedShareDialogEnabled ? 452 : 304;
|
|
465
364
|
return (0, _react2.jsx)(_tabs.default, {
|
|
466
365
|
id: "ShareForm-Tabs-Integrations",
|
|
467
366
|
onChange: this.changeTab,
|
|
468
367
|
selected: this.state.selectedTab
|
|
469
368
|
}, (0, _react2.jsx)(_tabs.TabList, null, (0, _react2.jsx)(_tabs.Tab, {
|
|
470
369
|
key: "share-tab-default"
|
|
471
|
-
}, this.renderMainTabTitle()),
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
370
|
+
}, this.renderMainTabTitle()), shareIntegrations === null || shareIntegrations === void 0 ? void 0 : shareIntegrations.map(function (integration) {
|
|
371
|
+
return (0, _react2.jsx)(_tabs.Tab, {
|
|
372
|
+
key: "share-tab-".concat(integration.type)
|
|
373
|
+
}, (0, _react2.jsx)("div", {
|
|
374
|
+
css: integrationWrapperStyles
|
|
375
|
+
}, (0, _react2.jsx)("span", {
|
|
376
|
+
css: integrationIconWrapperStyles
|
|
377
|
+
}, (0, _react2.jsx)(integration.Icon, null)), integrationTabText(integration.type)));
|
|
378
|
+
}), (0, _platformFeatureFlags.fg)('smart_links_for_plans_platform') && (additionalTabs === null || additionalTabs === void 0 ? void 0 : additionalTabs.map(function (tab) {
|
|
478
379
|
return (0, _react2.jsx)(_tabs.Tab, {
|
|
479
380
|
key: "share-tab-".concat(tab.label)
|
|
480
381
|
}, tab.label);
|
|
@@ -484,27 +385,29 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
484
385
|
css: formWrapperStyles
|
|
485
386
|
}, (0, _react2.jsx)("div", {
|
|
486
387
|
style: {
|
|
487
|
-
width: "".concat(builtInTabContentWidth ||
|
|
488
|
-
}
|
|
489
|
-
}, this.renderShareForm()))), (0, _react2.jsx)(_tabs.TabPanel, {
|
|
490
|
-
key: "share-tabPanel-integration"
|
|
491
|
-
}, (0, _react2.jsx)(_analyticsNext.AnalyticsContext, {
|
|
492
|
-
data: {
|
|
493
|
-
source: _analytics.INTEGRATION_MODAL_SOURCE
|
|
494
|
-
}
|
|
495
|
-
}, (0, _react2.jsx)("div", {
|
|
496
|
-
css: formWrapperStyles
|
|
497
|
-
}, (0, _react2.jsx)("div", {
|
|
498
|
-
style: {
|
|
499
|
-
width: "".concat(builtInTabContentWidth || _DEFAULT_TAB_CONTENT_WIDTH, "px")
|
|
388
|
+
width: "".concat(builtInTabContentWidth || DEFAULT_TAB_CONTENT_WIDTH, "px")
|
|
500
389
|
}
|
|
501
|
-
}, (
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
390
|
+
}, this.renderShareForm()))), shareIntegrations === null || shareIntegrations === void 0 ? void 0 : shareIntegrations.map(function (integration) {
|
|
391
|
+
return (0, _react2.jsx)(_tabs.TabPanel, {
|
|
392
|
+
key: "share-tabPanel-integration"
|
|
393
|
+
}, (0, _react2.jsx)(_analyticsNext.AnalyticsContext, {
|
|
394
|
+
data: {
|
|
395
|
+
source: _analytics.INTEGRATION_MODAL_SOURCE
|
|
396
|
+
}
|
|
397
|
+
}, (0, _react2.jsx)("div", {
|
|
398
|
+
css: formWrapperStyles
|
|
399
|
+
}, (0, _react2.jsx)("div", {
|
|
400
|
+
style: {
|
|
401
|
+
width: "".concat(builtInTabContentWidth || DEFAULT_TAB_CONTENT_WIDTH, "px")
|
|
402
|
+
}
|
|
403
|
+
}, (0, _react2.jsx)(_IntegrationForm.IntegrationForm, {
|
|
404
|
+
Content: integration.Content,
|
|
405
|
+
onIntegrationClose: function onIntegrationClose() {
|
|
406
|
+
return handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog();
|
|
407
|
+
},
|
|
408
|
+
changeTab: _this2.changeTab
|
|
409
|
+
})))));
|
|
410
|
+
}), (0, _platformFeatureFlags.fg)('smart_links_for_plans_platform') && (additionalTabs === null || additionalTabs === void 0 ? void 0 : additionalTabs.map(function (tab) {
|
|
508
411
|
return (0, _react2.jsx)(_tabs.TabPanel, {
|
|
509
412
|
key: "share-tabPanel-".concat(tab.label)
|
|
510
413
|
}, (0, _react2.jsx)("div", {
|
|
@@ -170,7 +170,7 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
170
170
|
var formSendLabel = _i18n.messages.formShare;
|
|
171
171
|
var sendLabel = isPublicLink ? formPublicLabel : formSendLabel;
|
|
172
172
|
var buttonLabel = isRetryableError ? _i18n.messages.formRetry : sendLabel;
|
|
173
|
-
var buttonDisabled = isDisabled || isNonRetryableError || isSubmitShareDisabled
|
|
173
|
+
var buttonDisabled = isDisabled || isNonRetryableError || isSubmitShareDisabled;
|
|
174
174
|
var ButtonLabelWrapper = buttonAppearance === 'warning' ? 'strong' : _react.default.Fragment;
|
|
175
175
|
return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
176
176
|
xcss: (0, _css.cx)(styles.submitButtonWrapperStyles)
|
|
@@ -242,167 +242,66 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
242
242
|
builtInTabContentWidth = _this$props7.builtInTabContentWidth,
|
|
243
243
|
handleCloseDialog = _this$props7.handleCloseDialog;
|
|
244
244
|
var selectedMenuItem = this.state.selectedMenuItem;
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
if (integrationMode === 'off' || !hasShareIntegrations && !hasAdditionalTabs) {
|
|
249
|
-
return this.renderShareForm();
|
|
250
|
-
}
|
|
251
|
-
if (selectedMenuItem === 'default') {
|
|
252
|
-
return this.renderShareForm();
|
|
253
|
-
}
|
|
254
|
-
if (hasShareIntegrations) {
|
|
255
|
-
var _firstIntegration = shareIntegrations[0];
|
|
256
|
-
if (selectedMenuItem === 'Slack') {
|
|
257
|
-
return /*#__PURE__*/_react.default.createElement(_IntegrationForm.IntegrationForm, {
|
|
258
|
-
Content: _firstIntegration.Content,
|
|
259
|
-
onIntegrationClose: function onIntegrationClose() {
|
|
260
|
-
return handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog();
|
|
261
|
-
}
|
|
262
|
-
});
|
|
263
|
-
}
|
|
264
|
-
if (integrationMode === 'menu') {
|
|
265
|
-
return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
266
|
-
xcss: (0, _css.cx)(styles.menuGroupContainerStyles),
|
|
267
|
-
backgroundColor: "elevation.surface.overlay"
|
|
268
|
-
}, /*#__PURE__*/_react.default.createElement(_menu.MenuGroup, null, /*#__PURE__*/_react.default.createElement(_ShareMenuItem.ShareMenuItem, {
|
|
269
|
-
iconName: /*#__PURE__*/_react.default.createElement(_firstIntegration.Icon, null),
|
|
270
|
-
labelId: _i18n.messages.slackMenuItemText,
|
|
271
|
-
onClickHandler: function onClickHandler() {
|
|
272
|
-
return _this2.changeMenuItem('Slack');
|
|
273
|
-
}
|
|
274
|
-
}), /*#__PURE__*/_react.default.createElement(_ShareMenuItem.ShareMenuItem, {
|
|
275
|
-
iconName: /*#__PURE__*/_react.default.createElement(_email.default, {
|
|
276
|
-
color: "currentColor",
|
|
277
|
-
label: "",
|
|
278
|
-
LEGACY_size: "medium",
|
|
279
|
-
spacing: "spacious"
|
|
280
|
-
}),
|
|
281
|
-
labelId: _i18n.messages.emailMenuItemText,
|
|
282
|
-
onClickHandler: function onClickHandler() {
|
|
283
|
-
return _this2.changeMenuItem('default');
|
|
284
|
-
}
|
|
285
|
-
})));
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
if (integrationMode === 'tabs') {
|
|
289
|
-
var DEFAULT_TAB_CONTENT_WIDTH = 304;
|
|
290
|
-
return /*#__PURE__*/_react.default.createElement(_tabs.default, {
|
|
291
|
-
id: "ShareForm-Tabs-Integrations",
|
|
292
|
-
onChange: this.changeTab,
|
|
293
|
-
selected: this.state.selectedTab
|
|
294
|
-
}, /*#__PURE__*/_react.default.createElement(_tabs.TabList, null, /*#__PURE__*/_react.default.createElement(_tabs.Tab, {
|
|
295
|
-
key: "share-tab-default"
|
|
296
|
-
}, this.renderMainTabTitle()), shareIntegrations === null || shareIntegrations === void 0 ? void 0 : shareIntegrations.map(function (integration) {
|
|
297
|
-
return /*#__PURE__*/_react.default.createElement(_tabs.Tab, {
|
|
298
|
-
key: "share-tab-".concat(integration.type)
|
|
299
|
-
}, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
300
|
-
xcss: (0, _css.cx)(styles.integrationWrapperStyles)
|
|
301
|
-
}, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
302
|
-
as: "span",
|
|
303
|
-
xcss: (0, _css.cx)(styles.integrationIconWrapperStyles)
|
|
304
|
-
}, /*#__PURE__*/_react.default.createElement(integration.Icon, null)), integrationTabText(integration.type)));
|
|
305
|
-
}), (0, _platformFeatureFlags.fg)('smart_links_for_plans_platform') && (additionalTabs === null || additionalTabs === void 0 ? void 0 : additionalTabs.map(function (tab) {
|
|
306
|
-
return /*#__PURE__*/_react.default.createElement(_tabs.Tab, {
|
|
307
|
-
key: "share-tab-".concat(tab.label)
|
|
308
|
-
}, tab.label);
|
|
309
|
-
}))), /*#__PURE__*/_react.default.createElement(_tabs.TabPanel, {
|
|
310
|
-
key: "share-tabPanel-default"
|
|
311
|
-
}, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
312
|
-
xcss: (0, _css.cx)(styles.formWrapperStyles)
|
|
313
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
314
|
-
style: {
|
|
315
|
-
width: "".concat(builtInTabContentWidth || DEFAULT_TAB_CONTENT_WIDTH, "px")
|
|
316
|
-
}
|
|
317
|
-
}, this.renderShareForm()))), shareIntegrations === null || shareIntegrations === void 0 ? void 0 : shareIntegrations.map(function (integration) {
|
|
318
|
-
return /*#__PURE__*/_react.default.createElement(_tabs.TabPanel, {
|
|
319
|
-
key: "share-tabPanel-integration"
|
|
320
|
-
}, /*#__PURE__*/_react.default.createElement(_analyticsNext.AnalyticsContext, {
|
|
321
|
-
data: {
|
|
322
|
-
source: _analytics.INTEGRATION_MODAL_SOURCE
|
|
323
|
-
}
|
|
324
|
-
}, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
325
|
-
xcss: (0, _css.cx)(styles.formWrapperStyles)
|
|
326
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
327
|
-
style: {
|
|
328
|
-
width: "".concat(builtInTabContentWidth || DEFAULT_TAB_CONTENT_WIDTH, "px")
|
|
329
|
-
}
|
|
330
|
-
}, /*#__PURE__*/_react.default.createElement(_IntegrationForm.IntegrationForm, {
|
|
331
|
-
Content: integration.Content,
|
|
332
|
-
onIntegrationClose: function onIntegrationClose() {
|
|
333
|
-
return handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog();
|
|
334
|
-
},
|
|
335
|
-
changeTab: _this2.changeTab
|
|
336
|
-
})))));
|
|
337
|
-
}), (0, _platformFeatureFlags.fg)('smart_links_for_plans_platform') && (additionalTabs === null || additionalTabs === void 0 ? void 0 : additionalTabs.map(function (tab) {
|
|
338
|
-
return /*#__PURE__*/_react.default.createElement(_tabs.TabPanel, {
|
|
339
|
-
key: "share-tabPanel-".concat(tab.label)
|
|
340
|
-
}, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
341
|
-
xcss: (0, _css.cx)(styles.formWrapperStyles)
|
|
342
|
-
}, /*#__PURE__*/_react.default.createElement(_IntegrationForm.IntegrationForm, {
|
|
343
|
-
Content: tab.Content,
|
|
344
|
-
onIntegrationClose: function onIntegrationClose() {
|
|
345
|
-
return handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog();
|
|
346
|
-
},
|
|
347
|
-
changeTab: _this2.changeTab
|
|
348
|
-
})));
|
|
349
|
-
})));
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
if (integrationMode === 'off' || !shareIntegrations || !shareIntegrations.length) {
|
|
245
|
+
var hasShareIntegrations = shareIntegrations && shareIntegrations.length;
|
|
246
|
+
var hasAdditionalTabs = additionalTabs && additionalTabs.length;
|
|
247
|
+
if (integrationMode === 'off' || !hasShareIntegrations && !hasAdditionalTabs) {
|
|
353
248
|
return this.renderShareForm();
|
|
354
249
|
}
|
|
355
|
-
var firstIntegration = shareIntegrations[0];
|
|
356
250
|
if (selectedMenuItem === 'default') {
|
|
357
251
|
return this.renderShareForm();
|
|
358
252
|
}
|
|
359
|
-
if (
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
253
|
+
if (hasShareIntegrations) {
|
|
254
|
+
var firstIntegration = shareIntegrations[0];
|
|
255
|
+
if (selectedMenuItem === 'Slack') {
|
|
256
|
+
return /*#__PURE__*/_react.default.createElement(_IntegrationForm.IntegrationForm, {
|
|
257
|
+
Content: firstIntegration.Content,
|
|
258
|
+
onIntegrationClose: function onIntegrationClose() {
|
|
259
|
+
return handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog();
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
if (integrationMode === 'menu') {
|
|
264
|
+
return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
265
|
+
xcss: (0, _css.cx)(styles.menuGroupContainerStyles),
|
|
266
|
+
backgroundColor: "elevation.surface.overlay"
|
|
267
|
+
}, /*#__PURE__*/_react.default.createElement(_menu.MenuGroup, null, /*#__PURE__*/_react.default.createElement(_ShareMenuItem.ShareMenuItem, {
|
|
268
|
+
iconName: /*#__PURE__*/_react.default.createElement(firstIntegration.Icon, null),
|
|
269
|
+
labelId: _i18n.messages.slackMenuItemText,
|
|
270
|
+
onClickHandler: function onClickHandler() {
|
|
271
|
+
return _this2.changeMenuItem('Slack');
|
|
272
|
+
}
|
|
273
|
+
}), /*#__PURE__*/_react.default.createElement(_ShareMenuItem.ShareMenuItem, {
|
|
274
|
+
iconName: /*#__PURE__*/_react.default.createElement(_email.default, {
|
|
275
|
+
color: "currentColor",
|
|
276
|
+
label: "",
|
|
277
|
+
LEGACY_size: "medium",
|
|
278
|
+
spacing: "spacious"
|
|
279
|
+
}),
|
|
280
|
+
labelId: _i18n.messages.emailMenuItemText,
|
|
281
|
+
onClickHandler: function onClickHandler() {
|
|
282
|
+
return _this2.changeMenuItem('default');
|
|
283
|
+
}
|
|
284
|
+
})));
|
|
285
|
+
}
|
|
389
286
|
}
|
|
390
287
|
if (integrationMode === 'tabs') {
|
|
391
|
-
var
|
|
288
|
+
var DEFAULT_TAB_CONTENT_WIDTH = 304;
|
|
392
289
|
return /*#__PURE__*/_react.default.createElement(_tabs.default, {
|
|
393
290
|
id: "ShareForm-Tabs-Integrations",
|
|
394
291
|
onChange: this.changeTab,
|
|
395
292
|
selected: this.state.selectedTab
|
|
396
293
|
}, /*#__PURE__*/_react.default.createElement(_tabs.TabList, null, /*#__PURE__*/_react.default.createElement(_tabs.Tab, {
|
|
397
294
|
key: "share-tab-default"
|
|
398
|
-
}, this.renderMainTabTitle()),
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
295
|
+
}, this.renderMainTabTitle()), shareIntegrations === null || shareIntegrations === void 0 ? void 0 : shareIntegrations.map(function (integration) {
|
|
296
|
+
return /*#__PURE__*/_react.default.createElement(_tabs.Tab, {
|
|
297
|
+
key: "share-tab-".concat(integration.type)
|
|
298
|
+
}, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
299
|
+
xcss: (0, _css.cx)(styles.integrationWrapperStyles)
|
|
300
|
+
}, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
301
|
+
as: "span",
|
|
302
|
+
xcss: (0, _css.cx)(styles.integrationIconWrapperStyles)
|
|
303
|
+
}, /*#__PURE__*/_react.default.createElement(integration.Icon, null)), integrationTabText(integration.type)));
|
|
304
|
+
}), (0, _platformFeatureFlags.fg)('smart_links_for_plans_platform') && (additionalTabs === null || additionalTabs === void 0 ? void 0 : additionalTabs.map(function (tab) {
|
|
406
305
|
return /*#__PURE__*/_react.default.createElement(_tabs.Tab, {
|
|
407
306
|
key: "share-tab-".concat(tab.label)
|
|
408
307
|
}, tab.label);
|
|
@@ -412,27 +311,29 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
412
311
|
xcss: (0, _css.cx)(styles.formWrapperStyles)
|
|
413
312
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
414
313
|
style: {
|
|
415
|
-
width: "".concat(builtInTabContentWidth ||
|
|
416
|
-
}
|
|
417
|
-
}, this.renderShareForm()))), /*#__PURE__*/_react.default.createElement(_tabs.TabPanel, {
|
|
418
|
-
key: "share-tabPanel-integration"
|
|
419
|
-
}, /*#__PURE__*/_react.default.createElement(_analyticsNext.AnalyticsContext, {
|
|
420
|
-
data: {
|
|
421
|
-
source: _analytics.INTEGRATION_MODAL_SOURCE
|
|
314
|
+
width: "".concat(builtInTabContentWidth || DEFAULT_TAB_CONTENT_WIDTH, "px")
|
|
422
315
|
}
|
|
423
|
-
},
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
316
|
+
}, this.renderShareForm()))), shareIntegrations === null || shareIntegrations === void 0 ? void 0 : shareIntegrations.map(function (integration) {
|
|
317
|
+
return /*#__PURE__*/_react.default.createElement(_tabs.TabPanel, {
|
|
318
|
+
key: "share-tabPanel-integration"
|
|
319
|
+
}, /*#__PURE__*/_react.default.createElement(_analyticsNext.AnalyticsContext, {
|
|
320
|
+
data: {
|
|
321
|
+
source: _analytics.INTEGRATION_MODAL_SOURCE
|
|
322
|
+
}
|
|
323
|
+
}, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
324
|
+
xcss: (0, _css.cx)(styles.formWrapperStyles)
|
|
325
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
326
|
+
style: {
|
|
327
|
+
width: "".concat(builtInTabContentWidth || DEFAULT_TAB_CONTENT_WIDTH, "px")
|
|
328
|
+
}
|
|
329
|
+
}, /*#__PURE__*/_react.default.createElement(_IntegrationForm.IntegrationForm, {
|
|
330
|
+
Content: integration.Content,
|
|
331
|
+
onIntegrationClose: function onIntegrationClose() {
|
|
332
|
+
return handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog();
|
|
333
|
+
},
|
|
334
|
+
changeTab: _this2.changeTab
|
|
335
|
+
})))));
|
|
336
|
+
}), (0, _platformFeatureFlags.fg)('smart_links_for_plans_platform') && (additionalTabs === null || additionalTabs === void 0 ? void 0 : additionalTabs.map(function (tab) {
|
|
436
337
|
return /*#__PURE__*/_react.default.createElement(_tabs.TabPanel, {
|
|
437
338
|
key: "share-tabPanel-".concat(tab.label)
|
|
438
339
|
}, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
@@ -13,7 +13,7 @@ var buildAttributes = function buildAttributes() {
|
|
|
13
13
|
var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
14
14
|
return _objectSpread({
|
|
15
15
|
packageName: "@atlaskit/share",
|
|
16
|
-
packageVersion: "6.6.
|
|
16
|
+
packageVersion: "6.6.3"
|
|
17
17
|
}, attributes);
|
|
18
18
|
};
|
|
19
19
|
var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
|