@atlaskit/share 6.6.2 → 6.7.0
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 +18 -0
- package/dist/cjs/components/LazyShareForm/LazyShareForm.js +4 -2
- package/dist/cjs/components/LazyShareForm/LazyShareFormNext.js +4 -2
- package/dist/cjs/components/ShareDialogContainer.js +4 -2
- package/dist/cjs/components/ShareDialogWithTrigger.js +4 -2
- package/dist/cjs/components/ShareDialogWithTriggerNext.js +4 -2
- package/dist/cjs/components/ShareForm.js +79 -167
- package/dist/cjs/components/ShareFormNext.js +70 -169
- package/dist/cjs/components/analytics/analytics.js +1 -1
- package/dist/es2019/components/LazyShareForm/LazyShareForm.js +4 -2
- package/dist/es2019/components/LazyShareForm/LazyShareFormNext.js +4 -2
- package/dist/es2019/components/ShareDialogContainer.js +4 -2
- package/dist/es2019/components/ShareDialogWithTrigger.js +4 -2
- package/dist/es2019/components/ShareDialogWithTriggerNext.js +4 -2
- package/dist/es2019/components/ShareForm.js +47 -121
- package/dist/es2019/components/ShareFormNext.js +37 -122
- package/dist/es2019/components/analytics/analytics.js +1 -1
- package/dist/esm/components/LazyShareForm/LazyShareForm.js +4 -2
- package/dist/esm/components/LazyShareForm/LazyShareFormNext.js +4 -2
- package/dist/esm/components/ShareDialogContainer.js +4 -2
- package/dist/esm/components/ShareDialogWithTrigger.js +4 -2
- package/dist/esm/components/ShareDialogWithTriggerNext.js +4 -2
- package/dist/esm/components/ShareForm.js +79 -167
- package/dist/esm/components/ShareFormNext.js +70 -169
- package/dist/esm/components/analytics/analytics.js +1 -1
- package/dist/types/components/LazyShareForm/LazyShareForm.d.ts +1 -1
- package/dist/types/components/LazyShareForm/LazyShareFormNext.d.ts +1 -1
- package/dist/types/components/ShareDialogContainer.d.ts +35 -34
- package/dist/types/index.d.ts +1 -1
- package/dist/types/types/ShareDialogContainer.d.ts +2 -0
- package/dist/types/types/ShareDialogWithTrigger.d.ts +1 -1
- package/dist/types/types/ShareForm.d.ts +2 -1
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types-ts4.5/components/LazyShareForm/LazyShareForm.d.ts +1 -1
- package/dist/types-ts4.5/components/LazyShareForm/LazyShareFormNext.d.ts +1 -1
- package/dist/types-ts4.5/components/ShareDialogContainer.d.ts +35 -34
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/dist/types-ts4.5/types/ShareDialogContainer.d.ts +2 -0
- package/dist/types-ts4.5/types/ShareDialogWithTrigger.d.ts +1 -1
- package/dist/types-ts4.5/types/ShareForm.d.ts +2 -1
- package/dist/types-ts4.5/types/index.d.ts +1 -1
- package/package.json +4 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/share
|
|
2
2
|
|
|
3
|
+
## 6.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#159242](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/159242)
|
|
8
|
+
[`d465c0632984c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d465c0632984c) -
|
|
9
|
+
[ux] Exposing a new `CustomSubmitButton` prop to control behaviour of share form submit button.
|
|
10
|
+
This is only used when the extended share dialog is enabled.
|
|
11
|
+
|
|
12
|
+
## 6.6.3
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#160514](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/160514)
|
|
17
|
+
[`106f4550f0e10`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/106f4550f0e10) -
|
|
18
|
+
clean outgoing mail fix feature gate
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 6.6.2
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -87,7 +87,8 @@ function LazyShareForm(props) {
|
|
|
87
87
|
userPickerOptions = props.userPickerOptions,
|
|
88
88
|
isSubmitShareDisabled = props.isSubmitShareDisabled,
|
|
89
89
|
additionalUserFields = props.additionalUserFields,
|
|
90
|
-
isExtendedShareDialogEnabled = props.isExtendedShareDialogEnabled
|
|
90
|
+
isExtendedShareDialogEnabled = props.isExtendedShareDialogEnabled,
|
|
91
|
+
CustomSubmitButton = props.CustomSubmitButton;
|
|
91
92
|
var header = customHeader ? (0, _react2.jsx)("div", {
|
|
92
93
|
css: headerCustomStyles
|
|
93
94
|
}, customHeader) : null;
|
|
@@ -154,7 +155,8 @@ function LazyShareForm(props) {
|
|
|
154
155
|
userPickerOptions: userPickerOptions,
|
|
155
156
|
isSubmitShareDisabled: isSubmitShareDisabled,
|
|
156
157
|
additionalUserFields: additionalUserFields,
|
|
157
|
-
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
158
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled,
|
|
159
|
+
CustomSubmitButton: CustomSubmitButton
|
|
158
160
|
}) : (0, _react2.jsx)(_compiled.Text, {
|
|
159
161
|
as: "p"
|
|
160
162
|
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _i18n.messages.formNoPermissions))));
|
|
@@ -74,7 +74,8 @@ function LazyShareForm(props) {
|
|
|
74
74
|
userPickerOptions = props.userPickerOptions,
|
|
75
75
|
isSubmitShareDisabled = props.isSubmitShareDisabled,
|
|
76
76
|
additionalUserFields = props.additionalUserFields,
|
|
77
|
-
isExtendedShareDialogEnabled = props.isExtendedShareDialogEnabled
|
|
77
|
+
isExtendedShareDialogEnabled = props.isExtendedShareDialogEnabled,
|
|
78
|
+
CustomSubmitButton = props.CustomSubmitButton;
|
|
78
79
|
var header = customHeader ? /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
79
80
|
xcss: styles.headerCustomStyles
|
|
80
81
|
}, customHeader) : null;
|
|
@@ -141,7 +142,8 @@ function LazyShareForm(props) {
|
|
|
141
142
|
userPickerOptions: userPickerOptions,
|
|
142
143
|
isSubmitShareDisabled: isSubmitShareDisabled,
|
|
143
144
|
additionalUserFields: additionalUserFields,
|
|
144
|
-
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
145
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled,
|
|
146
|
+
CustomSubmitButton: CustomSubmitButton
|
|
145
147
|
}) : /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
146
148
|
as: "p"
|
|
147
149
|
}, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _i18n.messages.formNoPermissions))));
|
|
@@ -371,7 +371,8 @@ var ShareDialogContainerInternal = exports.ShareDialogContainerInternal = /*#__P
|
|
|
371
371
|
userPickerOptions = _this$props3.userPickerOptions,
|
|
372
372
|
isSubmitShareDisabled = _this$props3.isSubmitShareDisabled,
|
|
373
373
|
additionalUserFields = _this$props3.additionalUserFields,
|
|
374
|
-
isExtendedShareDialogEnabled = _this$props3.isExtendedShareDialogEnabled
|
|
374
|
+
isExtendedShareDialogEnabled = _this$props3.isExtendedShareDialogEnabled,
|
|
375
|
+
CustomSubmitButton = _this$props3.CustomSubmitButton;
|
|
375
376
|
var _this$state = this.state,
|
|
376
377
|
config = _this$state.config,
|
|
377
378
|
isFetchingConfig = _this$state.isFetchingConfig;
|
|
@@ -427,7 +428,8 @@ var ShareDialogContainerInternal = exports.ShareDialogContainerInternal = /*#__P
|
|
|
427
428
|
builtInTabContentWidth: builtInTabContentWidth,
|
|
428
429
|
isSubmitShareDisabled: isSubmitShareDisabled,
|
|
429
430
|
additionalUserFields: additionalUserFields,
|
|
430
|
-
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
431
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled,
|
|
432
|
+
CustomSubmitButton: CustomSubmitButton
|
|
431
433
|
})));
|
|
432
434
|
}
|
|
433
435
|
}]);
|
|
@@ -578,7 +578,8 @@ var ShareDialogWithTriggerInternalLegacy = exports.ShareDialogWithTriggerInterna
|
|
|
578
578
|
userPickerOptions = _this$props7.userPickerOptions,
|
|
579
579
|
isSubmitShareDisabled = _this$props7.isSubmitShareDisabled,
|
|
580
580
|
additionalUserFields = _this$props7.additionalUserFields,
|
|
581
|
-
isExtendedShareDialogEnabled = _this$props7.isExtendedShareDialogEnabled
|
|
581
|
+
isExtendedShareDialogEnabled = _this$props7.isExtendedShareDialogEnabled,
|
|
582
|
+
CustomSubmitButton = _this$props7.CustomSubmitButton;
|
|
582
583
|
var style = typeof tabIndex !== 'undefined' && tabIndex >= 0 ? {
|
|
583
584
|
outline: 'none'
|
|
584
585
|
} : undefined;
|
|
@@ -647,7 +648,8 @@ var ShareDialogWithTriggerInternalLegacy = exports.ShareDialogWithTriggerInterna
|
|
|
647
648
|
isBrowseUsersDisabled: isBrowseUsersDisabled,
|
|
648
649
|
userPickerOptions: userPickerOptions,
|
|
649
650
|
additionalUserFields: additionalUserFields,
|
|
650
|
-
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
651
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled,
|
|
652
|
+
CustomSubmitButton: CustomSubmitButton
|
|
651
653
|
}));
|
|
652
654
|
},
|
|
653
655
|
isOpen: isDialogOpen,
|
|
@@ -561,7 +561,8 @@ var ShareDialogWithTriggerInternal = exports.ShareDialogWithTriggerInternal = /*
|
|
|
561
561
|
userPickerOptions = _this$props7.userPickerOptions,
|
|
562
562
|
isSubmitShareDisabled = _this$props7.isSubmitShareDisabled,
|
|
563
563
|
additionalUserFields = _this$props7.additionalUserFields,
|
|
564
|
-
isExtendedShareDialogEnabled = _this$props7.isExtendedShareDialogEnabled
|
|
564
|
+
isExtendedShareDialogEnabled = _this$props7.isExtendedShareDialogEnabled,
|
|
565
|
+
CustomSubmitButton = _this$props7.CustomSubmitButton;
|
|
565
566
|
var footer = (0, _utils.resolveShareFooter)(integrationMode, this.state.tabIndex, customFooter);
|
|
566
567
|
|
|
567
568
|
// for performance purposes, we may want to have a loadable content i.e. ShareForm
|
|
@@ -622,7 +623,8 @@ var ShareDialogWithTriggerInternal = exports.ShareDialogWithTriggerInternal = /*
|
|
|
622
623
|
isBrowseUsersDisabled: isBrowseUsersDisabled,
|
|
623
624
|
userPickerOptions: userPickerOptions,
|
|
624
625
|
additionalUserFields: additionalUserFields,
|
|
625
|
-
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
626
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled,
|
|
627
|
+
CustomSubmitButton: CustomSubmitButton
|
|
626
628
|
}));
|
|
627
629
|
},
|
|
628
630
|
isOpen: isDialogOpen,
|
|
@@ -157,7 +157,10 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
157
157
|
userPickerOptions = _this$props.userPickerOptions,
|
|
158
158
|
productAttributes = _this$props.productAttributes,
|
|
159
159
|
additionalUserFields = _this$props.additionalUserFields,
|
|
160
|
-
isExtendedShareDialogEnabled = _this$props.isExtendedShareDialogEnabled
|
|
160
|
+
isExtendedShareDialogEnabled = _this$props.isExtendedShareDialogEnabled,
|
|
161
|
+
isSharing = _this$props.isSharing,
|
|
162
|
+
isSubmitShareDisabled = _this$props.isSubmitShareDisabled,
|
|
163
|
+
CustomSubmitButton = _this$props.CustomSubmitButton;
|
|
161
164
|
return (0, _react2.jsx)(_analyticsNext.AnalyticsContext, {
|
|
162
165
|
data: {
|
|
163
166
|
source: _analytics.ANALYTICS_SOURCE
|
|
@@ -224,7 +227,13 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
224
227
|
copyTooltipText: copyTooltipText,
|
|
225
228
|
copyLinkButtonText: formatMessage(isPublicLink ? _i18n.messages.copyPublicLinkButtonText : _i18n.messages.copyLinkButtonText),
|
|
226
229
|
copiedToClipboardText: formatMessage(_i18n.messages.copiedToClipboardMessage)
|
|
227
|
-
}),
|
|
230
|
+
}), isExtendedShareDialogEnabled && CustomSubmitButton ? (0, _react2.jsx)(CustomSubmitButton, {
|
|
231
|
+
shareError: shareError,
|
|
232
|
+
isSharing: isSharing,
|
|
233
|
+
isDisabled: isDisabled,
|
|
234
|
+
isSubmitShareDisabled: isSubmitShareDisabled,
|
|
235
|
+
isPublicLink: isPublicLink
|
|
236
|
+
}) : _this.renderSubmitButton())));
|
|
228
237
|
});
|
|
229
238
|
(0, _defineProperty2.default)(_this, "renderSubmitButton", function () {
|
|
230
239
|
var _this$props2 = _this.props,
|
|
@@ -245,7 +254,7 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
245
254
|
var formSendLabel = _i18n.messages.formShare;
|
|
246
255
|
var sendLabel = isPublicLink ? formPublicLabel : formSendLabel;
|
|
247
256
|
var buttonLabel = isRetryableError ? _i18n.messages.formRetry : sendLabel;
|
|
248
|
-
var buttonDisabled = isDisabled || isNonRetryableError || isSubmitShareDisabled
|
|
257
|
+
var buttonDisabled = isDisabled || isNonRetryableError || isSubmitShareDisabled;
|
|
249
258
|
var ButtonLabelWrapper = buttonAppearance === 'warning' ? 'strong' : _react.default.Fragment;
|
|
250
259
|
return (0, _react2.jsx)("div", {
|
|
251
260
|
css: submitButtonWrapperStyles
|
|
@@ -318,163 +327,64 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
318
327
|
handleCloseDialog = _this$props7.handleCloseDialog,
|
|
319
328
|
isExtendedShareDialogEnabled = _this$props7.isExtendedShareDialogEnabled;
|
|
320
329
|
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) {
|
|
330
|
+
var hasShareIntegrations = shareIntegrations && shareIntegrations.length;
|
|
331
|
+
var hasAdditionalTabs = additionalTabs && additionalTabs.length;
|
|
332
|
+
if (integrationMode === 'off' || !hasShareIntegrations && !hasAdditionalTabs) {
|
|
427
333
|
return this.renderShareForm();
|
|
428
334
|
}
|
|
429
|
-
var firstIntegration = shareIntegrations[0];
|
|
430
335
|
if (selectedMenuItem === 'default') {
|
|
431
336
|
return this.renderShareForm();
|
|
432
337
|
}
|
|
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
|
-
|
|
338
|
+
if (hasShareIntegrations) {
|
|
339
|
+
var firstIntegration = shareIntegrations[0];
|
|
340
|
+
if (selectedMenuItem === 'Slack') {
|
|
341
|
+
return (0, _react2.jsx)(_IntegrationForm.IntegrationForm, {
|
|
342
|
+
Content: firstIntegration.Content,
|
|
343
|
+
onIntegrationClose: function onIntegrationClose() {
|
|
344
|
+
return handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog();
|
|
345
|
+
}
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
if (integrationMode === 'menu') {
|
|
349
|
+
return (0, _react2.jsx)(_primitives.Box, {
|
|
350
|
+
xcss: menuGroupContainerStyles
|
|
351
|
+
}, (0, _react2.jsx)(_menu.MenuGroup, null, (0, _react2.jsx)(_ShareMenuItem.ShareMenuItem, {
|
|
352
|
+
iconName: (0, _react2.jsx)(firstIntegration.Icon, null),
|
|
353
|
+
labelId: _i18n.messages.slackMenuItemText,
|
|
354
|
+
onClickHandler: function onClickHandler() {
|
|
355
|
+
return _this2.changeMenuItem('Slack');
|
|
356
|
+
}
|
|
357
|
+
}), (0, _react2.jsx)(_ShareMenuItem.ShareMenuItem, {
|
|
358
|
+
iconName: (0, _react2.jsx)(_email.default, {
|
|
359
|
+
color: "currentColor",
|
|
360
|
+
label: "",
|
|
361
|
+
LEGACY_size: "medium",
|
|
362
|
+
spacing: "spacious"
|
|
363
|
+
}),
|
|
364
|
+
labelId: _i18n.messages.emailMenuItemText,
|
|
365
|
+
onClickHandler: function onClickHandler() {
|
|
366
|
+
return _this2.changeMenuItem('default');
|
|
367
|
+
}
|
|
368
|
+
})));
|
|
369
|
+
}
|
|
462
370
|
}
|
|
463
371
|
if (integrationMode === 'tabs') {
|
|
464
|
-
var
|
|
372
|
+
var DEFAULT_TAB_CONTENT_WIDTH = isExtendedShareDialogEnabled ? 452 : 304;
|
|
465
373
|
return (0, _react2.jsx)(_tabs.default, {
|
|
466
374
|
id: "ShareForm-Tabs-Integrations",
|
|
467
375
|
onChange: this.changeTab,
|
|
468
376
|
selected: this.state.selectedTab
|
|
469
377
|
}, (0, _react2.jsx)(_tabs.TabList, null, (0, _react2.jsx)(_tabs.Tab, {
|
|
470
378
|
key: "share-tab-default"
|
|
471
|
-
}, this.renderMainTabTitle()),
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
379
|
+
}, this.renderMainTabTitle()), shareIntegrations === null || shareIntegrations === void 0 ? void 0 : shareIntegrations.map(function (integration) {
|
|
380
|
+
return (0, _react2.jsx)(_tabs.Tab, {
|
|
381
|
+
key: "share-tab-".concat(integration.type)
|
|
382
|
+
}, (0, _react2.jsx)("div", {
|
|
383
|
+
css: integrationWrapperStyles
|
|
384
|
+
}, (0, _react2.jsx)("span", {
|
|
385
|
+
css: integrationIconWrapperStyles
|
|
386
|
+
}, (0, _react2.jsx)(integration.Icon, null)), integrationTabText(integration.type)));
|
|
387
|
+
}), (0, _platformFeatureFlags.fg)('smart_links_for_plans_platform') && (additionalTabs === null || additionalTabs === void 0 ? void 0 : additionalTabs.map(function (tab) {
|
|
478
388
|
return (0, _react2.jsx)(_tabs.Tab, {
|
|
479
389
|
key: "share-tab-".concat(tab.label)
|
|
480
390
|
}, tab.label);
|
|
@@ -484,27 +394,29 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
484
394
|
css: formWrapperStyles
|
|
485
395
|
}, (0, _react2.jsx)("div", {
|
|
486
396
|
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
|
|
397
|
+
width: "".concat(builtInTabContentWidth || DEFAULT_TAB_CONTENT_WIDTH, "px")
|
|
494
398
|
}
|
|
495
|
-
}, (
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
399
|
+
}, this.renderShareForm()))), shareIntegrations === null || shareIntegrations === void 0 ? void 0 : shareIntegrations.map(function (integration) {
|
|
400
|
+
return (0, _react2.jsx)(_tabs.TabPanel, {
|
|
401
|
+
key: "share-tabPanel-integration"
|
|
402
|
+
}, (0, _react2.jsx)(_analyticsNext.AnalyticsContext, {
|
|
403
|
+
data: {
|
|
404
|
+
source: _analytics.INTEGRATION_MODAL_SOURCE
|
|
405
|
+
}
|
|
406
|
+
}, (0, _react2.jsx)("div", {
|
|
407
|
+
css: formWrapperStyles
|
|
408
|
+
}, (0, _react2.jsx)("div", {
|
|
409
|
+
style: {
|
|
410
|
+
width: "".concat(builtInTabContentWidth || DEFAULT_TAB_CONTENT_WIDTH, "px")
|
|
411
|
+
}
|
|
412
|
+
}, (0, _react2.jsx)(_IntegrationForm.IntegrationForm, {
|
|
413
|
+
Content: integration.Content,
|
|
414
|
+
onIntegrationClose: function onIntegrationClose() {
|
|
415
|
+
return handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog();
|
|
416
|
+
},
|
|
417
|
+
changeTab: _this2.changeTab
|
|
418
|
+
})))));
|
|
419
|
+
}), (0, _platformFeatureFlags.fg)('smart_links_for_plans_platform') && (additionalTabs === null || additionalTabs === void 0 ? void 0 : additionalTabs.map(function (tab) {
|
|
508
420
|
return (0, _react2.jsx)(_tabs.TabPanel, {
|
|
509
421
|
key: "share-tabPanel-".concat(tab.label)
|
|
510
422
|
}, (0, _react2.jsx)("div", {
|