@atlaskit/share 4.23.10 → 4.24.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 +15 -0
- package/dist/cjs/components/LazyShareForm/LazyShareForm.js +4 -2
- package/dist/cjs/components/ShareDialogContainer.js +4 -2
- package/dist/cjs/components/ShareDialogWithTrigger.js +4 -2
- package/dist/cjs/components/ShareForm.js +112 -5
- package/dist/cjs/components/ShareHeader.js +1 -0
- package/dist/cjs/components/analytics/analytics.js +1 -1
- package/dist/es2019/components/LazyShareForm/LazyShareForm.js +4 -2
- package/dist/es2019/components/ShareDialogContainer.js +4 -2
- package/dist/es2019/components/ShareDialogWithTrigger.js +4 -2
- package/dist/es2019/components/ShareForm.js +91 -2
- package/dist/es2019/components/ShareHeader.js +1 -0
- package/dist/es2019/components/analytics/analytics.js +1 -1
- package/dist/esm/components/LazyShareForm/LazyShareForm.js +4 -2
- package/dist/esm/components/ShareDialogContainer.js +4 -2
- package/dist/esm/components/ShareDialogWithTrigger.js +4 -2
- package/dist/esm/components/ShareForm.js +112 -5
- package/dist/esm/components/ShareHeader.js +1 -0
- package/dist/esm/components/analytics/analytics.js +1 -1
- package/dist/types/components/LazyShareForm/LazyShareForm.d.ts +1 -1
- package/dist/types/types/ShareDialogContainer.d.ts +1 -0
- package/dist/types/types/ShareDialogWithTrigger.d.ts +1 -1
- package/dist/types/types/ShareForm.d.ts +1 -0
- package/dist/types-ts4.5/components/LazyShareForm/LazyShareForm.d.ts +1 -1
- package/dist/types-ts4.5/types/ShareDialogContainer.d.ts +1 -0
- package/dist/types-ts4.5/types/ShareDialogWithTrigger.d.ts +1 -1
- package/dist/types-ts4.5/types/ShareForm.d.ts +1 -0
- package/package.json +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/share
|
|
2
2
|
|
|
3
|
+
## 4.24.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#103086](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/103086)
|
|
8
|
+
[`3d37cc0ea36c7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3d37cc0ea36c7) -
|
|
9
|
+
add ability to disable the submit button on the share tab and allow additional tabs to be rendered
|
|
10
|
+
when the slack integration is not provided
|
|
11
|
+
|
|
12
|
+
## 4.23.11
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 4.23.10
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -79,7 +79,8 @@ function LazyShareForm(props) {
|
|
|
79
79
|
showTitle = props.showTitle,
|
|
80
80
|
orgId = props.orgId,
|
|
81
81
|
isBrowseUsersDisabled = props.isBrowseUsersDisabled,
|
|
82
|
-
userPickerOptions = props.userPickerOptions
|
|
82
|
+
userPickerOptions = props.userPickerOptions,
|
|
83
|
+
isSubmitShareDisabled = props.isSubmitShareDisabled;
|
|
83
84
|
var footer = (0, _react2.jsx)("div", null, bottomMessage ? (0, _react2.jsx)("div", {
|
|
84
85
|
css: footerBottomMessageStyles
|
|
85
86
|
}, bottomMessage) : null, customFooter && selectedIntegration === null && (0, _react2.jsx)("div", {
|
|
@@ -138,7 +139,8 @@ function LazyShareForm(props) {
|
|
|
138
139
|
onTabChange: onTabChange,
|
|
139
140
|
onMenuItemChange: onMenuItemChange,
|
|
140
141
|
isBrowseUsersDisabled: isBrowseUsersDisabled,
|
|
141
|
-
userPickerOptions: userPickerOptions
|
|
142
|
+
userPickerOptions: userPickerOptions,
|
|
143
|
+
isSubmitShareDisabled: isSubmitShareDisabled
|
|
142
144
|
}) : (0, _react2.jsx)(_primitives.Text, {
|
|
143
145
|
as: "p"
|
|
144
146
|
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _i18n.messages.formNoPermissions))));
|
|
@@ -358,7 +358,8 @@ var ShareDialogContainerInternal = exports.ShareDialogContainerInternal = /*#__P
|
|
|
358
358
|
copyTooltipText = _this$props2.copyTooltipText,
|
|
359
359
|
onDialogClose = _this$props2.onDialogClose,
|
|
360
360
|
isBrowseUsersDisabled = _this$props2.isBrowseUsersDisabled,
|
|
361
|
-
userPickerOptions = _this$props2.userPickerOptions
|
|
361
|
+
userPickerOptions = _this$props2.userPickerOptions,
|
|
362
|
+
isSubmitShareDisabled = _this$props2.isSubmitShareDisabled;
|
|
362
363
|
var _this$state = this.state,
|
|
363
364
|
config = _this$state.config,
|
|
364
365
|
isFetchingConfig = _this$state.isFetchingConfig;
|
|
@@ -410,7 +411,8 @@ var ShareDialogContainerInternal = exports.ShareDialogContainerInternal = /*#__P
|
|
|
410
411
|
isBrowseUsersDisabled: isBrowseUsersDisabled,
|
|
411
412
|
userPickerOptions: userPickerOptions,
|
|
412
413
|
additionalTabs: additionalTabs,
|
|
413
|
-
builtInTabContentWidth: builtInTabContentWidth
|
|
414
|
+
builtInTabContentWidth: builtInTabContentWidth,
|
|
415
|
+
isSubmitShareDisabled: isSubmitShareDisabled
|
|
414
416
|
})));
|
|
415
417
|
}
|
|
416
418
|
}]);
|
|
@@ -557,7 +557,8 @@ var ShareDialogWithTriggerInternal = exports.ShareDialogWithTriggerInternal = /*
|
|
|
557
557
|
additionalTabs = _this$props7.additionalTabs,
|
|
558
558
|
builtInTabContentWidth = _this$props7.builtInTabContentWidth,
|
|
559
559
|
isBrowseUsersDisabled = _this$props7.isBrowseUsersDisabled,
|
|
560
|
-
userPickerOptions = _this$props7.userPickerOptions
|
|
560
|
+
userPickerOptions = _this$props7.userPickerOptions,
|
|
561
|
+
isSubmitShareDisabled = _this$props7.isSubmitShareDisabled;
|
|
561
562
|
var style = typeof tabIndex !== 'undefined' && tabIndex >= 0 ? {
|
|
562
563
|
outline: 'none'
|
|
563
564
|
} : undefined;
|
|
@@ -609,7 +610,8 @@ var ShareDialogWithTriggerInternal = exports.ShareDialogWithTriggerInternal = /*
|
|
|
609
610
|
shareIntegrations: shareIntegrations,
|
|
610
611
|
additionalTabs: additionalTabs,
|
|
611
612
|
builtInTabContentWidth: builtInTabContentWidth,
|
|
612
|
-
isMenuItemSelected: isMenuItemSelected
|
|
613
|
+
isMenuItemSelected: isMenuItemSelected,
|
|
614
|
+
isSubmitShareDisabled: isSubmitShareDisabled
|
|
613
615
|
// actions
|
|
614
616
|
,
|
|
615
617
|
onLinkCopy: _this2.handleCopyLink,
|
|
@@ -56,6 +56,7 @@ var centerAlignedIconWrapperStyles = (0, _react2.css)({
|
|
|
56
56
|
paddingInline: "var(--ds-space-150, 12px)",
|
|
57
57
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
58
58
|
'> div': {
|
|
59
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
59
60
|
lineHeight: 1
|
|
60
61
|
}
|
|
61
62
|
});
|
|
@@ -203,7 +204,8 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
203
204
|
submitButtonLabel = _this$props2.submitButtonLabel,
|
|
204
205
|
isDisabled = _this$props2.isDisabled,
|
|
205
206
|
isPublicLink = _this$props2.isPublicLink,
|
|
206
|
-
integrationMode = _this$props2.integrationMode
|
|
207
|
+
integrationMode = _this$props2.integrationMode,
|
|
208
|
+
isSubmitShareDisabled = _this$props2.isSubmitShareDisabled;
|
|
207
209
|
var isRetryableError = !!(shareError !== null && shareError !== void 0 && shareError.retryable);
|
|
208
210
|
var isNonRetryableError = shareError && !shareError.retryable;
|
|
209
211
|
var shouldShowWarning = isRetryableError && !isSharing;
|
|
@@ -213,7 +215,7 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
213
215
|
var formSendLabel = _i18n.messages.formShare;
|
|
214
216
|
var sendLabel = isPublicLink ? formPublicLabel : formSendLabel;
|
|
215
217
|
var buttonLabel = isRetryableError ? _i18n.messages.formRetry : sendLabel;
|
|
216
|
-
var buttonDisabled = isDisabled || isNonRetryableError;
|
|
218
|
+
var buttonDisabled = isDisabled || isNonRetryableError || isSubmitShareDisabled && (0, _platformFeatureFlags.fg)('plans_outgoing_mail_fix');
|
|
217
219
|
var ButtonLabelWrapper = buttonAppearance === 'warning' ? 'strong' : _react.default.Fragment;
|
|
218
220
|
return (0, _react2.jsx)("div", {
|
|
219
221
|
css: submitButtonWrapperStyles
|
|
@@ -285,6 +287,111 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
285
287
|
builtInTabContentWidth = _this$props7.builtInTabContentWidth,
|
|
286
288
|
handleCloseDialog = _this$props7.handleCloseDialog;
|
|
287
289
|
var selectedMenuItem = this.state.selectedMenuItem;
|
|
290
|
+
if ((0, _platformFeatureFlags.fg)('plans_outgoing_mail_fix')) {
|
|
291
|
+
var hasShareIntegrations = shareIntegrations && shareIntegrations.length;
|
|
292
|
+
var hasAdditionalTabs = additionalTabs && additionalTabs.length;
|
|
293
|
+
if (integrationMode === 'off' || !hasShareIntegrations && !hasAdditionalTabs) {
|
|
294
|
+
return this.renderShareForm();
|
|
295
|
+
}
|
|
296
|
+
if (selectedMenuItem === 'default') {
|
|
297
|
+
return this.renderShareForm();
|
|
298
|
+
}
|
|
299
|
+
if (hasShareIntegrations) {
|
|
300
|
+
var _firstIntegration = shareIntegrations[0];
|
|
301
|
+
if (selectedMenuItem === 'Slack') {
|
|
302
|
+
return (0, _react2.jsx)(_IntegrationForm.IntegrationForm, {
|
|
303
|
+
Content: _firstIntegration.Content,
|
|
304
|
+
onIntegrationClose: function onIntegrationClose() {
|
|
305
|
+
return handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog();
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
if (integrationMode === 'menu') {
|
|
310
|
+
return (0, _react2.jsx)(_primitives.Box, {
|
|
311
|
+
xcss: menuGroupContainerStyles
|
|
312
|
+
}, (0, _react2.jsx)(_menu.MenuGroup, null, (0, _react2.jsx)(_ShareMenuItem.ShareMenuItem, {
|
|
313
|
+
iconName: (0, _react2.jsx)(_firstIntegration.Icon, null),
|
|
314
|
+
labelId: _i18n.messages.slackMenuItemText,
|
|
315
|
+
onClickHandler: function onClickHandler() {
|
|
316
|
+
return _this2.changeMenuItem('Slack');
|
|
317
|
+
}
|
|
318
|
+
}), (0, _react2.jsx)(_ShareMenuItem.ShareMenuItem, {
|
|
319
|
+
iconName: (0, _react2.jsx)(_email.default, {
|
|
320
|
+
color: "currentColor",
|
|
321
|
+
label: "",
|
|
322
|
+
LEGACY_size: "medium",
|
|
323
|
+
spacing: "spacious"
|
|
324
|
+
}),
|
|
325
|
+
labelId: _i18n.messages.emailMenuItemText,
|
|
326
|
+
onClickHandler: function onClickHandler() {
|
|
327
|
+
return _this2.changeMenuItem('default');
|
|
328
|
+
}
|
|
329
|
+
})));
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
if (integrationMode === 'tabs') {
|
|
333
|
+
var DEFAULT_TAB_CONTENT_WIDTH = 304;
|
|
334
|
+
return (0, _react2.jsx)(_tabs.default, {
|
|
335
|
+
id: "ShareForm-Tabs-Integrations",
|
|
336
|
+
onChange: this.changeTab,
|
|
337
|
+
selected: this.state.selectedTab
|
|
338
|
+
}, (0, _react2.jsx)(_tabs.TabList, null, (0, _react2.jsx)(_tabs.Tab, {
|
|
339
|
+
key: "share-tab-default"
|
|
340
|
+
}, this.renderMainTabTitle()), shareIntegrations === null || shareIntegrations === void 0 ? void 0 : shareIntegrations.map(function (integration) {
|
|
341
|
+
return (0, _react2.jsx)(_tabs.Tab, {
|
|
342
|
+
key: "share-tab-".concat(integration.type)
|
|
343
|
+
}, (0, _react2.jsx)("div", {
|
|
344
|
+
css: integrationWrapperStyles
|
|
345
|
+
}, (0, _react2.jsx)("span", {
|
|
346
|
+
css: integrationIconWrapperStyles
|
|
347
|
+
}, (0, _react2.jsx)(integration.Icon, null)), integrationTabText(integration.type)));
|
|
348
|
+
}), (0, _platformFeatureFlags.fg)('smart_links_for_plans_platform') && (additionalTabs === null || additionalTabs === void 0 ? void 0 : additionalTabs.map(function (tab) {
|
|
349
|
+
return (0, _react2.jsx)(_tabs.Tab, {
|
|
350
|
+
key: "share-tab-".concat(tab.label)
|
|
351
|
+
}, tab.label);
|
|
352
|
+
}))), (0, _react2.jsx)(_tabs.TabPanel, {
|
|
353
|
+
key: "share-tabPanel-default"
|
|
354
|
+
}, (0, _react2.jsx)("div", {
|
|
355
|
+
css: formWrapperStyles
|
|
356
|
+
}, (0, _react2.jsx)("div", {
|
|
357
|
+
style: {
|
|
358
|
+
width: "".concat(builtInTabContentWidth || DEFAULT_TAB_CONTENT_WIDTH, "px")
|
|
359
|
+
}
|
|
360
|
+
}, this.renderShareForm()))), shareIntegrations === null || shareIntegrations === void 0 ? void 0 : shareIntegrations.map(function (integration) {
|
|
361
|
+
return (0, _react2.jsx)(_tabs.TabPanel, {
|
|
362
|
+
key: "share-tabPanel-integration"
|
|
363
|
+
}, (0, _react2.jsx)(_analyticsNext.AnalyticsContext, {
|
|
364
|
+
data: {
|
|
365
|
+
source: _analytics.INTEGRATION_MODAL_SOURCE
|
|
366
|
+
}
|
|
367
|
+
}, (0, _react2.jsx)("div", {
|
|
368
|
+
css: formWrapperStyles
|
|
369
|
+
}, (0, _react2.jsx)("div", {
|
|
370
|
+
style: {
|
|
371
|
+
width: "".concat(builtInTabContentWidth || DEFAULT_TAB_CONTENT_WIDTH, "px")
|
|
372
|
+
}
|
|
373
|
+
}, (0, _react2.jsx)(_IntegrationForm.IntegrationForm, {
|
|
374
|
+
Content: integration.Content,
|
|
375
|
+
onIntegrationClose: function onIntegrationClose() {
|
|
376
|
+
return handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog();
|
|
377
|
+
},
|
|
378
|
+
changeTab: _this2.changeTab
|
|
379
|
+
})))));
|
|
380
|
+
}), (0, _platformFeatureFlags.fg)('smart_links_for_plans_platform') && (additionalTabs === null || additionalTabs === void 0 ? void 0 : additionalTabs.map(function (tab) {
|
|
381
|
+
return (0, _react2.jsx)(_tabs.TabPanel, {
|
|
382
|
+
key: "share-tabPanel-".concat(tab.label)
|
|
383
|
+
}, (0, _react2.jsx)("div", {
|
|
384
|
+
css: formWrapperStyles
|
|
385
|
+
}, (0, _react2.jsx)(_IntegrationForm.IntegrationForm, {
|
|
386
|
+
Content: tab.Content,
|
|
387
|
+
onIntegrationClose: function onIntegrationClose() {
|
|
388
|
+
return handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog();
|
|
389
|
+
},
|
|
390
|
+
changeTab: _this2.changeTab
|
|
391
|
+
})));
|
|
392
|
+
})));
|
|
393
|
+
}
|
|
394
|
+
}
|
|
288
395
|
if (integrationMode === 'off' || !shareIntegrations || !shareIntegrations.length) {
|
|
289
396
|
return this.renderShareForm();
|
|
290
397
|
}
|
|
@@ -323,7 +430,7 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
323
430
|
})));
|
|
324
431
|
}
|
|
325
432
|
if (integrationMode === 'tabs') {
|
|
326
|
-
var
|
|
433
|
+
var _DEFAULT_TAB_CONTENT_WIDTH = 304;
|
|
327
434
|
return (0, _react2.jsx)(_tabs.default, {
|
|
328
435
|
id: "ShareForm-Tabs-Integrations",
|
|
329
436
|
onChange: this.changeTab,
|
|
@@ -346,7 +453,7 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
346
453
|
css: formWrapperStyles
|
|
347
454
|
}, (0, _react2.jsx)("div", {
|
|
348
455
|
style: {
|
|
349
|
-
width: "".concat(builtInTabContentWidth ||
|
|
456
|
+
width: "".concat(builtInTabContentWidth || _DEFAULT_TAB_CONTENT_WIDTH, "px")
|
|
350
457
|
}
|
|
351
458
|
}, this.renderShareForm()))), (0, _react2.jsx)(_tabs.TabPanel, {
|
|
352
459
|
key: "share-tabPanel-integration"
|
|
@@ -358,7 +465,7 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
358
465
|
css: formWrapperStyles
|
|
359
466
|
}, (0, _react2.jsx)("div", {
|
|
360
467
|
style: {
|
|
361
|
-
width: "".concat(builtInTabContentWidth ||
|
|
468
|
+
width: "".concat(builtInTabContentWidth || _DEFAULT_TAB_CONTENT_WIDTH, "px")
|
|
362
469
|
}
|
|
363
470
|
}, (0, _react2.jsx)(_IntegrationForm.IntegrationForm, {
|
|
364
471
|
Content: firstIntegration.Content,
|
|
@@ -17,6 +17,7 @@ var headerWrapperStyles = (0, _primitives.xcss)({
|
|
|
17
17
|
overflow: 'hidden',
|
|
18
18
|
textOverflow: 'ellipsis',
|
|
19
19
|
whiteSpace: 'nowrap',
|
|
20
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
20
21
|
lineHeight: 'space.400'
|
|
21
22
|
});
|
|
22
23
|
var ShareHeader = exports.ShareHeader = function ShareHeader(_ref) {
|
|
@@ -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: "4.
|
|
16
|
+
packageVersion: "4.24.0"
|
|
17
17
|
}, attributes);
|
|
18
18
|
};
|
|
19
19
|
var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
|
|
@@ -74,7 +74,8 @@ function LazyShareForm(props) {
|
|
|
74
74
|
showTitle,
|
|
75
75
|
orgId,
|
|
76
76
|
isBrowseUsersDisabled,
|
|
77
|
-
userPickerOptions
|
|
77
|
+
userPickerOptions,
|
|
78
|
+
isSubmitShareDisabled
|
|
78
79
|
} = props;
|
|
79
80
|
const footer = jsx("div", null, bottomMessage ? jsx("div", {
|
|
80
81
|
css: footerBottomMessageStyles
|
|
@@ -134,7 +135,8 @@ function LazyShareForm(props) {
|
|
|
134
135
|
onTabChange: onTabChange,
|
|
135
136
|
onMenuItemChange: onMenuItemChange,
|
|
136
137
|
isBrowseUsersDisabled: isBrowseUsersDisabled,
|
|
137
|
-
userPickerOptions: userPickerOptions
|
|
138
|
+
userPickerOptions: userPickerOptions,
|
|
139
|
+
isSubmitShareDisabled: isSubmitShareDisabled
|
|
138
140
|
}) : jsx(Text, {
|
|
139
141
|
as: "p"
|
|
140
142
|
}, jsx(FormattedMessage, messages.formNoPermissions))));
|
|
@@ -306,7 +306,8 @@ export class ShareDialogContainerInternal extends React.Component {
|
|
|
306
306
|
copyTooltipText,
|
|
307
307
|
onDialogClose,
|
|
308
308
|
isBrowseUsersDisabled,
|
|
309
|
-
userPickerOptions
|
|
309
|
+
userPickerOptions,
|
|
310
|
+
isSubmitShareDisabled
|
|
310
311
|
} = this.props;
|
|
311
312
|
const {
|
|
312
313
|
config,
|
|
@@ -360,7 +361,8 @@ export class ShareDialogContainerInternal extends React.Component {
|
|
|
360
361
|
isBrowseUsersDisabled: isBrowseUsersDisabled,
|
|
361
362
|
userPickerOptions: userPickerOptions,
|
|
362
363
|
additionalTabs: additionalTabs,
|
|
363
|
-
builtInTabContentWidth: builtInTabContentWidth
|
|
364
|
+
builtInTabContentWidth: builtInTabContentWidth,
|
|
365
|
+
isSubmitShareDisabled: isSubmitShareDisabled
|
|
364
366
|
})));
|
|
365
367
|
}
|
|
366
368
|
}
|
|
@@ -505,7 +505,8 @@ export class ShareDialogWithTriggerInternal extends React.PureComponent {
|
|
|
505
505
|
additionalTabs,
|
|
506
506
|
builtInTabContentWidth,
|
|
507
507
|
isBrowseUsersDisabled,
|
|
508
|
-
userPickerOptions
|
|
508
|
+
userPickerOptions,
|
|
509
|
+
isSubmitShareDisabled
|
|
509
510
|
} = this.props;
|
|
510
511
|
const style = typeof tabIndex !== 'undefined' && tabIndex >= 0 ? {
|
|
511
512
|
outline: 'none'
|
|
@@ -557,7 +558,8 @@ export class ShareDialogWithTriggerInternal extends React.PureComponent {
|
|
|
557
558
|
shareIntegrations: shareIntegrations,
|
|
558
559
|
additionalTabs: additionalTabs,
|
|
559
560
|
builtInTabContentWidth: builtInTabContentWidth,
|
|
560
|
-
isMenuItemSelected: isMenuItemSelected
|
|
561
|
+
isMenuItemSelected: isMenuItemSelected,
|
|
562
|
+
isSubmitShareDisabled: isSubmitShareDisabled
|
|
561
563
|
// actions
|
|
562
564
|
,
|
|
563
565
|
onLinkCopy: this.handleCopyLink,
|
|
@@ -40,6 +40,7 @@ const centerAlignedIconWrapperStyles = css({
|
|
|
40
40
|
paddingInline: "var(--ds-space-150, 12px)",
|
|
41
41
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
42
42
|
'> div': {
|
|
43
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
43
44
|
lineHeight: 1
|
|
44
45
|
}
|
|
45
46
|
});
|
|
@@ -184,7 +185,8 @@ class InternalForm extends React.PureComponent {
|
|
|
184
185
|
submitButtonLabel,
|
|
185
186
|
isDisabled,
|
|
186
187
|
isPublicLink,
|
|
187
|
-
integrationMode
|
|
188
|
+
integrationMode,
|
|
189
|
+
isSubmitShareDisabled
|
|
188
190
|
} = this.props;
|
|
189
191
|
const isRetryableError = !!(shareError !== null && shareError !== void 0 && shareError.retryable);
|
|
190
192
|
const isNonRetryableError = shareError && !shareError.retryable;
|
|
@@ -195,7 +197,7 @@ class InternalForm extends React.PureComponent {
|
|
|
195
197
|
const formSendLabel = messages.formShare;
|
|
196
198
|
const sendLabel = isPublicLink ? formPublicLabel : formSendLabel;
|
|
197
199
|
const buttonLabel = isRetryableError ? messages.formRetry : sendLabel;
|
|
198
|
-
const buttonDisabled = isDisabled || isNonRetryableError;
|
|
200
|
+
const buttonDisabled = isDisabled || isNonRetryableError || isSubmitShareDisabled && fg('plans_outgoing_mail_fix');
|
|
199
201
|
const ButtonLabelWrapper = buttonAppearance === 'warning' ? 'strong' : React.Fragment;
|
|
200
202
|
return jsx("div", {
|
|
201
203
|
css: submitButtonWrapperStyles
|
|
@@ -268,6 +270,93 @@ class InternalForm extends React.PureComponent {
|
|
|
268
270
|
const {
|
|
269
271
|
selectedMenuItem
|
|
270
272
|
} = this.state;
|
|
273
|
+
if (fg('plans_outgoing_mail_fix')) {
|
|
274
|
+
const hasShareIntegrations = shareIntegrations && shareIntegrations.length;
|
|
275
|
+
const hasAdditionalTabs = additionalTabs && additionalTabs.length;
|
|
276
|
+
if (integrationMode === 'off' || !hasShareIntegrations && !hasAdditionalTabs) {
|
|
277
|
+
return this.renderShareForm();
|
|
278
|
+
}
|
|
279
|
+
if (selectedMenuItem === 'default') {
|
|
280
|
+
return this.renderShareForm();
|
|
281
|
+
}
|
|
282
|
+
if (hasShareIntegrations) {
|
|
283
|
+
const firstIntegration = shareIntegrations[0];
|
|
284
|
+
if (selectedMenuItem === 'Slack') {
|
|
285
|
+
return jsx(IntegrationForm, {
|
|
286
|
+
Content: firstIntegration.Content,
|
|
287
|
+
onIntegrationClose: () => handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog()
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
if (integrationMode === 'menu') {
|
|
291
|
+
return jsx(Box, {
|
|
292
|
+
xcss: menuGroupContainerStyles
|
|
293
|
+
}, jsx(MenuGroup, null, jsx(ShareMenuItem, {
|
|
294
|
+
iconName: jsx(firstIntegration.Icon, null),
|
|
295
|
+
labelId: messages.slackMenuItemText,
|
|
296
|
+
onClickHandler: () => this.changeMenuItem('Slack')
|
|
297
|
+
}), jsx(ShareMenuItem, {
|
|
298
|
+
iconName: jsx(EmailIcon, {
|
|
299
|
+
color: "currentColor",
|
|
300
|
+
label: "",
|
|
301
|
+
LEGACY_size: "medium",
|
|
302
|
+
spacing: "spacious"
|
|
303
|
+
}),
|
|
304
|
+
labelId: messages.emailMenuItemText,
|
|
305
|
+
onClickHandler: () => this.changeMenuItem('default')
|
|
306
|
+
})));
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
if (integrationMode === 'tabs') {
|
|
310
|
+
const DEFAULT_TAB_CONTENT_WIDTH = 304;
|
|
311
|
+
return jsx(Tabs, {
|
|
312
|
+
id: "ShareForm-Tabs-Integrations",
|
|
313
|
+
onChange: this.changeTab,
|
|
314
|
+
selected: this.state.selectedTab
|
|
315
|
+
}, jsx(TabList, null, jsx(Tab, {
|
|
316
|
+
key: `share-tab-default`
|
|
317
|
+
}, this.renderMainTabTitle()), shareIntegrations === null || shareIntegrations === void 0 ? void 0 : shareIntegrations.map(integration => jsx(Tab, {
|
|
318
|
+
key: `share-tab-${integration.type}`
|
|
319
|
+
}, jsx("div", {
|
|
320
|
+
css: integrationWrapperStyles
|
|
321
|
+
}, jsx("span", {
|
|
322
|
+
css: integrationIconWrapperStyles
|
|
323
|
+
}, jsx(integration.Icon, null)), integrationTabText(integration.type)))), fg('smart_links_for_plans_platform') && (additionalTabs === null || additionalTabs === void 0 ? void 0 : additionalTabs.map(tab => jsx(Tab, {
|
|
324
|
+
key: `share-tab-${tab.label}`
|
|
325
|
+
}, tab.label)))), jsx(TabPanel, {
|
|
326
|
+
key: `share-tabPanel-default`
|
|
327
|
+
}, jsx("div", {
|
|
328
|
+
css: formWrapperStyles
|
|
329
|
+
}, jsx("div", {
|
|
330
|
+
style: {
|
|
331
|
+
width: `${builtInTabContentWidth || DEFAULT_TAB_CONTENT_WIDTH}px`
|
|
332
|
+
}
|
|
333
|
+
}, this.renderShareForm()))), shareIntegrations === null || shareIntegrations === void 0 ? void 0 : shareIntegrations.map(integration => jsx(TabPanel, {
|
|
334
|
+
key: `share-tabPanel-integration`
|
|
335
|
+
}, jsx(AnalyticsContext, {
|
|
336
|
+
data: {
|
|
337
|
+
source: INTEGRATION_MODAL_SOURCE
|
|
338
|
+
}
|
|
339
|
+
}, jsx("div", {
|
|
340
|
+
css: formWrapperStyles
|
|
341
|
+
}, jsx("div", {
|
|
342
|
+
style: {
|
|
343
|
+
width: `${builtInTabContentWidth || DEFAULT_TAB_CONTENT_WIDTH}px`
|
|
344
|
+
}
|
|
345
|
+
}, jsx(IntegrationForm, {
|
|
346
|
+
Content: integration.Content,
|
|
347
|
+
onIntegrationClose: () => handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog(),
|
|
348
|
+
changeTab: this.changeTab
|
|
349
|
+
})))))), fg('smart_links_for_plans_platform') && (additionalTabs === null || additionalTabs === void 0 ? void 0 : additionalTabs.map(tab => jsx(TabPanel, {
|
|
350
|
+
key: `share-tabPanel-${tab.label}`
|
|
351
|
+
}, jsx("div", {
|
|
352
|
+
css: formWrapperStyles
|
|
353
|
+
}, jsx(IntegrationForm, {
|
|
354
|
+
Content: tab.Content,
|
|
355
|
+
onIntegrationClose: () => handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog(),
|
|
356
|
+
changeTab: this.changeTab
|
|
357
|
+
}))))));
|
|
358
|
+
}
|
|
359
|
+
}
|
|
271
360
|
if (integrationMode === 'off' || !shareIntegrations || !shareIntegrations.length) {
|
|
272
361
|
return this.renderShareForm();
|
|
273
362
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isEmail, isExternalUser, isGroup, isTeam, isUser } from '@atlaskit/smart-user-picker';
|
|
2
2
|
const buildAttributes = (attributes = {}) => ({
|
|
3
3
|
packageName: "@atlaskit/share",
|
|
4
|
-
packageVersion: "4.
|
|
4
|
+
packageVersion: "4.24.0",
|
|
5
5
|
...attributes
|
|
6
6
|
});
|
|
7
7
|
const createEvent = (eventType, source, action, actionSubject, actionSubjectId, attributes = {}) => ({
|
|
@@ -70,7 +70,8 @@ function LazyShareForm(props) {
|
|
|
70
70
|
showTitle = props.showTitle,
|
|
71
71
|
orgId = props.orgId,
|
|
72
72
|
isBrowseUsersDisabled = props.isBrowseUsersDisabled,
|
|
73
|
-
userPickerOptions = props.userPickerOptions
|
|
73
|
+
userPickerOptions = props.userPickerOptions,
|
|
74
|
+
isSubmitShareDisabled = props.isSubmitShareDisabled;
|
|
74
75
|
var footer = jsx("div", null, bottomMessage ? jsx("div", {
|
|
75
76
|
css: footerBottomMessageStyles
|
|
76
77
|
}, bottomMessage) : null, customFooter && selectedIntegration === null && jsx("div", {
|
|
@@ -129,7 +130,8 @@ function LazyShareForm(props) {
|
|
|
129
130
|
onTabChange: onTabChange,
|
|
130
131
|
onMenuItemChange: onMenuItemChange,
|
|
131
132
|
isBrowseUsersDisabled: isBrowseUsersDisabled,
|
|
132
|
-
userPickerOptions: userPickerOptions
|
|
133
|
+
userPickerOptions: userPickerOptions,
|
|
134
|
+
isSubmitShareDisabled: isSubmitShareDisabled
|
|
133
135
|
}) : jsx(Text, {
|
|
134
136
|
as: "p"
|
|
135
137
|
}, jsx(FormattedMessage, messages.formNoPermissions))));
|
|
@@ -351,7 +351,8 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
|
|
|
351
351
|
copyTooltipText = _this$props2.copyTooltipText,
|
|
352
352
|
onDialogClose = _this$props2.onDialogClose,
|
|
353
353
|
isBrowseUsersDisabled = _this$props2.isBrowseUsersDisabled,
|
|
354
|
-
userPickerOptions = _this$props2.userPickerOptions
|
|
354
|
+
userPickerOptions = _this$props2.userPickerOptions,
|
|
355
|
+
isSubmitShareDisabled = _this$props2.isSubmitShareDisabled;
|
|
355
356
|
var _this$state = this.state,
|
|
356
357
|
config = _this$state.config,
|
|
357
358
|
isFetchingConfig = _this$state.isFetchingConfig;
|
|
@@ -403,7 +404,8 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
|
|
|
403
404
|
isBrowseUsersDisabled: isBrowseUsersDisabled,
|
|
404
405
|
userPickerOptions: userPickerOptions,
|
|
405
406
|
additionalTabs: additionalTabs,
|
|
406
|
-
builtInTabContentWidth: builtInTabContentWidth
|
|
407
|
+
builtInTabContentWidth: builtInTabContentWidth,
|
|
408
|
+
isSubmitShareDisabled: isSubmitShareDisabled
|
|
407
409
|
})));
|
|
408
410
|
}
|
|
409
411
|
}]);
|
|
@@ -556,7 +556,8 @@ export var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
556
556
|
additionalTabs = _this$props7.additionalTabs,
|
|
557
557
|
builtInTabContentWidth = _this$props7.builtInTabContentWidth,
|
|
558
558
|
isBrowseUsersDisabled = _this$props7.isBrowseUsersDisabled,
|
|
559
|
-
userPickerOptions = _this$props7.userPickerOptions
|
|
559
|
+
userPickerOptions = _this$props7.userPickerOptions,
|
|
560
|
+
isSubmitShareDisabled = _this$props7.isSubmitShareDisabled;
|
|
560
561
|
var style = typeof tabIndex !== 'undefined' && tabIndex >= 0 ? {
|
|
561
562
|
outline: 'none'
|
|
562
563
|
} : undefined;
|
|
@@ -608,7 +609,8 @@ export var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
608
609
|
shareIntegrations: shareIntegrations,
|
|
609
610
|
additionalTabs: additionalTabs,
|
|
610
611
|
builtInTabContentWidth: builtInTabContentWidth,
|
|
611
|
-
isMenuItemSelected: isMenuItemSelected
|
|
612
|
+
isMenuItemSelected: isMenuItemSelected,
|
|
613
|
+
isSubmitShareDisabled: isSubmitShareDisabled
|
|
612
614
|
// actions
|
|
613
615
|
,
|
|
614
616
|
onLinkCopy: _this2.handleCopyLink,
|
|
@@ -49,6 +49,7 @@ var centerAlignedIconWrapperStyles = css({
|
|
|
49
49
|
paddingInline: "var(--ds-space-150, 12px)",
|
|
50
50
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
51
51
|
'> div': {
|
|
52
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
52
53
|
lineHeight: 1
|
|
53
54
|
}
|
|
54
55
|
});
|
|
@@ -196,7 +197,8 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
196
197
|
submitButtonLabel = _this$props2.submitButtonLabel,
|
|
197
198
|
isDisabled = _this$props2.isDisabled,
|
|
198
199
|
isPublicLink = _this$props2.isPublicLink,
|
|
199
|
-
integrationMode = _this$props2.integrationMode
|
|
200
|
+
integrationMode = _this$props2.integrationMode,
|
|
201
|
+
isSubmitShareDisabled = _this$props2.isSubmitShareDisabled;
|
|
200
202
|
var isRetryableError = !!(shareError !== null && shareError !== void 0 && shareError.retryable);
|
|
201
203
|
var isNonRetryableError = shareError && !shareError.retryable;
|
|
202
204
|
var shouldShowWarning = isRetryableError && !isSharing;
|
|
@@ -206,7 +208,7 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
206
208
|
var formSendLabel = messages.formShare;
|
|
207
209
|
var sendLabel = isPublicLink ? formPublicLabel : formSendLabel;
|
|
208
210
|
var buttonLabel = isRetryableError ? messages.formRetry : sendLabel;
|
|
209
|
-
var buttonDisabled = isDisabled || isNonRetryableError;
|
|
211
|
+
var buttonDisabled = isDisabled || isNonRetryableError || isSubmitShareDisabled && fg('plans_outgoing_mail_fix');
|
|
210
212
|
var ButtonLabelWrapper = buttonAppearance === 'warning' ? 'strong' : React.Fragment;
|
|
211
213
|
return jsx("div", {
|
|
212
214
|
css: submitButtonWrapperStyles
|
|
@@ -278,6 +280,111 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
278
280
|
builtInTabContentWidth = _this$props7.builtInTabContentWidth,
|
|
279
281
|
handleCloseDialog = _this$props7.handleCloseDialog;
|
|
280
282
|
var selectedMenuItem = this.state.selectedMenuItem;
|
|
283
|
+
if (fg('plans_outgoing_mail_fix')) {
|
|
284
|
+
var hasShareIntegrations = shareIntegrations && shareIntegrations.length;
|
|
285
|
+
var hasAdditionalTabs = additionalTabs && additionalTabs.length;
|
|
286
|
+
if (integrationMode === 'off' || !hasShareIntegrations && !hasAdditionalTabs) {
|
|
287
|
+
return this.renderShareForm();
|
|
288
|
+
}
|
|
289
|
+
if (selectedMenuItem === 'default') {
|
|
290
|
+
return this.renderShareForm();
|
|
291
|
+
}
|
|
292
|
+
if (hasShareIntegrations) {
|
|
293
|
+
var _firstIntegration = shareIntegrations[0];
|
|
294
|
+
if (selectedMenuItem === 'Slack') {
|
|
295
|
+
return jsx(IntegrationForm, {
|
|
296
|
+
Content: _firstIntegration.Content,
|
|
297
|
+
onIntegrationClose: function onIntegrationClose() {
|
|
298
|
+
return handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog();
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
if (integrationMode === 'menu') {
|
|
303
|
+
return jsx(Box, {
|
|
304
|
+
xcss: menuGroupContainerStyles
|
|
305
|
+
}, jsx(MenuGroup, null, jsx(ShareMenuItem, {
|
|
306
|
+
iconName: jsx(_firstIntegration.Icon, null),
|
|
307
|
+
labelId: messages.slackMenuItemText,
|
|
308
|
+
onClickHandler: function onClickHandler() {
|
|
309
|
+
return _this2.changeMenuItem('Slack');
|
|
310
|
+
}
|
|
311
|
+
}), jsx(ShareMenuItem, {
|
|
312
|
+
iconName: jsx(EmailIcon, {
|
|
313
|
+
color: "currentColor",
|
|
314
|
+
label: "",
|
|
315
|
+
LEGACY_size: "medium",
|
|
316
|
+
spacing: "spacious"
|
|
317
|
+
}),
|
|
318
|
+
labelId: messages.emailMenuItemText,
|
|
319
|
+
onClickHandler: function onClickHandler() {
|
|
320
|
+
return _this2.changeMenuItem('default');
|
|
321
|
+
}
|
|
322
|
+
})));
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
if (integrationMode === 'tabs') {
|
|
326
|
+
var DEFAULT_TAB_CONTENT_WIDTH = 304;
|
|
327
|
+
return jsx(Tabs, {
|
|
328
|
+
id: "ShareForm-Tabs-Integrations",
|
|
329
|
+
onChange: this.changeTab,
|
|
330
|
+
selected: this.state.selectedTab
|
|
331
|
+
}, jsx(TabList, null, jsx(Tab, {
|
|
332
|
+
key: "share-tab-default"
|
|
333
|
+
}, this.renderMainTabTitle()), shareIntegrations === null || shareIntegrations === void 0 ? void 0 : shareIntegrations.map(function (integration) {
|
|
334
|
+
return jsx(Tab, {
|
|
335
|
+
key: "share-tab-".concat(integration.type)
|
|
336
|
+
}, jsx("div", {
|
|
337
|
+
css: integrationWrapperStyles
|
|
338
|
+
}, jsx("span", {
|
|
339
|
+
css: integrationIconWrapperStyles
|
|
340
|
+
}, jsx(integration.Icon, null)), integrationTabText(integration.type)));
|
|
341
|
+
}), fg('smart_links_for_plans_platform') && (additionalTabs === null || additionalTabs === void 0 ? void 0 : additionalTabs.map(function (tab) {
|
|
342
|
+
return jsx(Tab, {
|
|
343
|
+
key: "share-tab-".concat(tab.label)
|
|
344
|
+
}, tab.label);
|
|
345
|
+
}))), jsx(TabPanel, {
|
|
346
|
+
key: "share-tabPanel-default"
|
|
347
|
+
}, jsx("div", {
|
|
348
|
+
css: formWrapperStyles
|
|
349
|
+
}, jsx("div", {
|
|
350
|
+
style: {
|
|
351
|
+
width: "".concat(builtInTabContentWidth || DEFAULT_TAB_CONTENT_WIDTH, "px")
|
|
352
|
+
}
|
|
353
|
+
}, this.renderShareForm()))), shareIntegrations === null || shareIntegrations === void 0 ? void 0 : shareIntegrations.map(function (integration) {
|
|
354
|
+
return jsx(TabPanel, {
|
|
355
|
+
key: "share-tabPanel-integration"
|
|
356
|
+
}, jsx(AnalyticsContext, {
|
|
357
|
+
data: {
|
|
358
|
+
source: INTEGRATION_MODAL_SOURCE
|
|
359
|
+
}
|
|
360
|
+
}, jsx("div", {
|
|
361
|
+
css: formWrapperStyles
|
|
362
|
+
}, jsx("div", {
|
|
363
|
+
style: {
|
|
364
|
+
width: "".concat(builtInTabContentWidth || DEFAULT_TAB_CONTENT_WIDTH, "px")
|
|
365
|
+
}
|
|
366
|
+
}, jsx(IntegrationForm, {
|
|
367
|
+
Content: integration.Content,
|
|
368
|
+
onIntegrationClose: function onIntegrationClose() {
|
|
369
|
+
return handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog();
|
|
370
|
+
},
|
|
371
|
+
changeTab: _this2.changeTab
|
|
372
|
+
})))));
|
|
373
|
+
}), fg('smart_links_for_plans_platform') && (additionalTabs === null || additionalTabs === void 0 ? void 0 : additionalTabs.map(function (tab) {
|
|
374
|
+
return jsx(TabPanel, {
|
|
375
|
+
key: "share-tabPanel-".concat(tab.label)
|
|
376
|
+
}, jsx("div", {
|
|
377
|
+
css: formWrapperStyles
|
|
378
|
+
}, jsx(IntegrationForm, {
|
|
379
|
+
Content: tab.Content,
|
|
380
|
+
onIntegrationClose: function onIntegrationClose() {
|
|
381
|
+
return handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog();
|
|
382
|
+
},
|
|
383
|
+
changeTab: _this2.changeTab
|
|
384
|
+
})));
|
|
385
|
+
})));
|
|
386
|
+
}
|
|
387
|
+
}
|
|
281
388
|
if (integrationMode === 'off' || !shareIntegrations || !shareIntegrations.length) {
|
|
282
389
|
return this.renderShareForm();
|
|
283
390
|
}
|
|
@@ -316,7 +423,7 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
316
423
|
})));
|
|
317
424
|
}
|
|
318
425
|
if (integrationMode === 'tabs') {
|
|
319
|
-
var
|
|
426
|
+
var _DEFAULT_TAB_CONTENT_WIDTH = 304;
|
|
320
427
|
return jsx(Tabs, {
|
|
321
428
|
id: "ShareForm-Tabs-Integrations",
|
|
322
429
|
onChange: this.changeTab,
|
|
@@ -339,7 +446,7 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
339
446
|
css: formWrapperStyles
|
|
340
447
|
}, jsx("div", {
|
|
341
448
|
style: {
|
|
342
|
-
width: "".concat(builtInTabContentWidth ||
|
|
449
|
+
width: "".concat(builtInTabContentWidth || _DEFAULT_TAB_CONTENT_WIDTH, "px")
|
|
343
450
|
}
|
|
344
451
|
}, this.renderShareForm()))), jsx(TabPanel, {
|
|
345
452
|
key: "share-tabPanel-integration"
|
|
@@ -351,7 +458,7 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
351
458
|
css: formWrapperStyles
|
|
352
459
|
}, jsx("div", {
|
|
353
460
|
style: {
|
|
354
|
-
width: "".concat(builtInTabContentWidth ||
|
|
461
|
+
width: "".concat(builtInTabContentWidth || _DEFAULT_TAB_CONTENT_WIDTH, "px")
|
|
355
462
|
}
|
|
356
463
|
}, jsx(IntegrationForm, {
|
|
357
464
|
Content: firstIntegration.Content,
|
|
@@ -10,6 +10,7 @@ var headerWrapperStyles = xcss({
|
|
|
10
10
|
overflow: 'hidden',
|
|
11
11
|
textOverflow: 'ellipsis',
|
|
12
12
|
whiteSpace: 'nowrap',
|
|
13
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
13
14
|
lineHeight: 'space.400'
|
|
14
15
|
});
|
|
15
16
|
export var ShareHeader = function ShareHeader(_ref) {
|
|
@@ -6,7 +6,7 @@ var buildAttributes = function buildAttributes() {
|
|
|
6
6
|
var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
7
7
|
return _objectSpread({
|
|
8
8
|
packageName: "@atlaskit/share",
|
|
9
|
-
packageVersion: "4.
|
|
9
|
+
packageVersion: "4.24.0"
|
|
10
10
|
}, attributes);
|
|
11
11
|
};
|
|
12
12
|
var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
|
|
@@ -2,7 +2,7 @@ import { jsx } from '@emotion/react';
|
|
|
2
2
|
import type { LoadOptions } from '@atlaskit/smart-user-picker';
|
|
3
3
|
import type { MenuType, ShareData, ShareDialogWithTriggerProps, ShareDialogWithTriggerStates } from '../../types';
|
|
4
4
|
import { type IntegrationFormProps } from '../IntegrationForm';
|
|
5
|
-
export type LazyShareFormProps = Pick<ShareDialogWithTriggerProps, 'copyLink' | 'config' | 'isFetchingConfig' | 'loadUserOptions' | 'shareFormTitle' | 'shareFormHelperMessage' | 'bottomMessage' | 'submitButtonLabel' | 'product' | 'productAttributes' | 'customFooter' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'cloudId' | 'shareFieldsFooter' | 'onUserSelectionChange' | 'isPublicLink' | 'copyTooltipText' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'integrationMode' | 'onDialogClose' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isMenuItemSelected'> & Pick<ShareDialogWithTriggerStates, 'showIntegrationForm' | 'selectedIntegration' | 'isSharing' | 'shareError' | 'defaultValue'> & Pick<IntegrationFormProps, 'Content'> & {
|
|
5
|
+
export type LazyShareFormProps = Pick<ShareDialogWithTriggerProps, 'copyLink' | 'config' | 'isFetchingConfig' | 'loadUserOptions' | 'shareFormTitle' | 'shareFormHelperMessage' | 'bottomMessage' | 'submitButtonLabel' | 'product' | 'productAttributes' | 'customFooter' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'cloudId' | 'shareFieldsFooter' | 'onUserSelectionChange' | 'isPublicLink' | 'copyTooltipText' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'integrationMode' | 'onDialogClose' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isMenuItemSelected' | 'isSubmitShareDisabled'> & Pick<ShareDialogWithTriggerStates, 'showIntegrationForm' | 'selectedIntegration' | 'isSharing' | 'shareError' | 'defaultValue'> & Pick<IntegrationFormProps, 'Content'> & {
|
|
6
6
|
onLinkCopy: () => void;
|
|
7
7
|
onDismiss: (data: ShareData) => void;
|
|
8
8
|
onSubmit: (data: ShareData) => void;
|
|
@@ -19,7 +19,7 @@ export type DialogPlacement = Placement;
|
|
|
19
19
|
* with the demo page and clearly visible options on that page.
|
|
20
20
|
*/
|
|
21
21
|
export type DialogBoundariesElement = 'viewport' | 'window' | 'scrollParent';
|
|
22
|
-
export type ShareDialogWithTriggerProps = Pick<ShareDialogContainerProps, 'onTriggerButtonClick' | 'isAutoOpenDialog' | 'shouldCloseOnEscapePress' | 'dialogPlacement' | 'loadUserOptions' | 'onDialogOpen' | 'onDialogClose' | 'onUserSelectionChange' | 'renderCustomTriggerButton' | 'shareContentType' | 'shareContentSubType' | 'shareContentId' | 'shareFormTitle' | 'shareFormHelperMessage' | 'showFlags' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'triggerButtonAppearance' | 'triggerButtonIcon' | 'triggerButtonStyle' | 'triggerButtonTooltipPosition' | 'triggerButtonTooltipText' | 'cloudId' | 'bottomMessage' | 'product' | 'productAttributes' | 'customFooter' | 'isCopyDisabled' | 'isPublicLink' | 'integrationMode' | 'isMenuItemSelected' | 'shareFieldsFooter' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'shareAri' | 'tabIndex' | 'copyTooltipText' | 'dialogZIndex' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions'> & {
|
|
22
|
+
export type ShareDialogWithTriggerProps = Pick<ShareDialogContainerProps, 'onTriggerButtonClick' | 'isAutoOpenDialog' | 'shouldCloseOnEscapePress' | 'dialogPlacement' | 'loadUserOptions' | 'onDialogOpen' | 'onDialogClose' | 'onUserSelectionChange' | 'renderCustomTriggerButton' | 'shareContentType' | 'shareContentSubType' | 'shareContentId' | 'shareFormTitle' | 'shareFormHelperMessage' | 'showFlags' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'triggerButtonAppearance' | 'triggerButtonIcon' | 'triggerButtonStyle' | 'triggerButtonTooltipPosition' | 'triggerButtonTooltipText' | 'cloudId' | 'bottomMessage' | 'product' | 'productAttributes' | 'customFooter' | 'isCopyDisabled' | 'isPublicLink' | 'integrationMode' | 'isMenuItemSelected' | 'shareFieldsFooter' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'shareAri' | 'tabIndex' | 'copyTooltipText' | 'dialogZIndex' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isSubmitShareDisabled'> & {
|
|
23
23
|
config?: ConfigResponse;
|
|
24
24
|
isFetchingConfig?: boolean;
|
|
25
25
|
children?: RenderCustomTriggerButton;
|
|
@@ -2,7 +2,7 @@ import { jsx } from '@emotion/react';
|
|
|
2
2
|
import type { LoadOptions } from '@atlaskit/smart-user-picker';
|
|
3
3
|
import type { MenuType, ShareData, ShareDialogWithTriggerProps, ShareDialogWithTriggerStates } from '../../types';
|
|
4
4
|
import { type IntegrationFormProps } from '../IntegrationForm';
|
|
5
|
-
export type LazyShareFormProps = Pick<ShareDialogWithTriggerProps, 'copyLink' | 'config' | 'isFetchingConfig' | 'loadUserOptions' | 'shareFormTitle' | 'shareFormHelperMessage' | 'bottomMessage' | 'submitButtonLabel' | 'product' | 'productAttributes' | 'customFooter' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'cloudId' | 'shareFieldsFooter' | 'onUserSelectionChange' | 'isPublicLink' | 'copyTooltipText' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'integrationMode' | 'onDialogClose' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isMenuItemSelected'> & Pick<ShareDialogWithTriggerStates, 'showIntegrationForm' | 'selectedIntegration' | 'isSharing' | 'shareError' | 'defaultValue'> & Pick<IntegrationFormProps, 'Content'> & {
|
|
5
|
+
export type LazyShareFormProps = Pick<ShareDialogWithTriggerProps, 'copyLink' | 'config' | 'isFetchingConfig' | 'loadUserOptions' | 'shareFormTitle' | 'shareFormHelperMessage' | 'bottomMessage' | 'submitButtonLabel' | 'product' | 'productAttributes' | 'customFooter' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'cloudId' | 'shareFieldsFooter' | 'onUserSelectionChange' | 'isPublicLink' | 'copyTooltipText' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'integrationMode' | 'onDialogClose' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isMenuItemSelected' | 'isSubmitShareDisabled'> & Pick<ShareDialogWithTriggerStates, 'showIntegrationForm' | 'selectedIntegration' | 'isSharing' | 'shareError' | 'defaultValue'> & Pick<IntegrationFormProps, 'Content'> & {
|
|
6
6
|
onLinkCopy: () => void;
|
|
7
7
|
onDismiss: (data: ShareData) => void;
|
|
8
8
|
onSubmit: (data: ShareData) => void;
|
|
@@ -19,7 +19,7 @@ export type DialogPlacement = Placement;
|
|
|
19
19
|
* with the demo page and clearly visible options on that page.
|
|
20
20
|
*/
|
|
21
21
|
export type DialogBoundariesElement = 'viewport' | 'window' | 'scrollParent';
|
|
22
|
-
export type ShareDialogWithTriggerProps = Pick<ShareDialogContainerProps, 'onTriggerButtonClick' | 'isAutoOpenDialog' | 'shouldCloseOnEscapePress' | 'dialogPlacement' | 'loadUserOptions' | 'onDialogOpen' | 'onDialogClose' | 'onUserSelectionChange' | 'renderCustomTriggerButton' | 'shareContentType' | 'shareContentSubType' | 'shareContentId' | 'shareFormTitle' | 'shareFormHelperMessage' | 'showFlags' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'triggerButtonAppearance' | 'triggerButtonIcon' | 'triggerButtonStyle' | 'triggerButtonTooltipPosition' | 'triggerButtonTooltipText' | 'cloudId' | 'bottomMessage' | 'product' | 'productAttributes' | 'customFooter' | 'isCopyDisabled' | 'isPublicLink' | 'integrationMode' | 'isMenuItemSelected' | 'shareFieldsFooter' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'shareAri' | 'tabIndex' | 'copyTooltipText' | 'dialogZIndex' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions'> & {
|
|
22
|
+
export type ShareDialogWithTriggerProps = Pick<ShareDialogContainerProps, 'onTriggerButtonClick' | 'isAutoOpenDialog' | 'shouldCloseOnEscapePress' | 'dialogPlacement' | 'loadUserOptions' | 'onDialogOpen' | 'onDialogClose' | 'onUserSelectionChange' | 'renderCustomTriggerButton' | 'shareContentType' | 'shareContentSubType' | 'shareContentId' | 'shareFormTitle' | 'shareFormHelperMessage' | 'showFlags' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'triggerButtonAppearance' | 'triggerButtonIcon' | 'triggerButtonStyle' | 'triggerButtonTooltipPosition' | 'triggerButtonTooltipText' | 'cloudId' | 'bottomMessage' | 'product' | 'productAttributes' | 'customFooter' | 'isCopyDisabled' | 'isPublicLink' | 'integrationMode' | 'isMenuItemSelected' | 'shareFieldsFooter' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'shareAri' | 'tabIndex' | 'copyTooltipText' | 'dialogZIndex' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isSubmitShareDisabled'> & {
|
|
23
23
|
config?: ConfigResponse;
|
|
24
24
|
isFetchingConfig?: boolean;
|
|
25
25
|
children?: RenderCustomTriggerButton;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/share",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.24.0",
|
|
4
4
|
"description": "Fabric Share Element",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@atlaskit/analytics-next": "^10.2.0",
|
|
42
42
|
"@atlaskit/button": "^20.3.0",
|
|
43
|
-
"@atlaskit/dropdown-menu": "^12.
|
|
43
|
+
"@atlaskit/dropdown-menu": "^12.24.0",
|
|
44
44
|
"@atlaskit/form": "^11.0.0",
|
|
45
45
|
"@atlaskit/heading": "^4.0.0",
|
|
46
|
-
"@atlaskit/icon": "^23.
|
|
46
|
+
"@atlaskit/icon": "^23.4.0",
|
|
47
47
|
"@atlaskit/link": "^2.0.0",
|
|
48
48
|
"@atlaskit/menu": "^2.13.0",
|
|
49
49
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@atlaskit/tabs": "^17.0.0",
|
|
57
57
|
"@atlaskit/textarea": "^5.7.0",
|
|
58
58
|
"@atlaskit/theme": "^14.0.0",
|
|
59
|
-
"@atlaskit/tokens": "^
|
|
59
|
+
"@atlaskit/tokens": "^3.1.0",
|
|
60
60
|
"@atlaskit/tooltip": "^19.0.0",
|
|
61
61
|
"@atlaskit/ufo": "^0.3.0",
|
|
62
62
|
"@atlaskit/user-picker": "^10.29.0",
|
|
@@ -123,6 +123,9 @@
|
|
|
123
123
|
},
|
|
124
124
|
"smart_links_for_plans_platform": {
|
|
125
125
|
"type": "boolean"
|
|
126
|
+
},
|
|
127
|
+
"plans_outgoing_mail_fix": {
|
|
128
|
+
"type": "boolean"
|
|
126
129
|
}
|
|
127
130
|
}
|
|
128
131
|
}
|