@atlaskit/share 6.5.0 → 6.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/cjs/components/LazyShareForm/LazyShareForm.js +2 -1
- package/dist/cjs/components/LazyShareForm/LazyShareFormNext.js +2 -1
- package/dist/cjs/components/LazyShareForm/lazy.js +6 -3
- package/dist/cjs/components/LazyShareForm/lazyNext.js +6 -3
- package/dist/cjs/components/ShareDialogContainer.js +54 -46
- package/dist/cjs/components/ShareForm.js +4 -3
- package/dist/cjs/components/ShareFormWrapper/ShareFormWrapper.js +5 -2
- package/dist/cjs/components/ShareFormWrapper/compiled.compiled.css +1 -0
- package/dist/cjs/components/ShareFormWrapper/compiled.js +4 -2
- package/dist/cjs/components/ShareFormWrapper/styled.js +7 -4
- package/dist/cjs/components/analytics/analytics.js +1 -1
- package/dist/es2019/components/LazyShareForm/LazyShareForm.js +2 -1
- package/dist/es2019/components/LazyShareForm/LazyShareFormNext.js +2 -1
- package/dist/es2019/components/LazyShareForm/lazy.js +6 -3
- package/dist/es2019/components/LazyShareForm/lazyNext.js +6 -3
- package/dist/es2019/components/ShareDialogContainer.js +8 -1
- package/dist/es2019/components/ShareForm.js +4 -3
- package/dist/es2019/components/ShareFormWrapper/ShareFormWrapper.js +4 -2
- package/dist/es2019/components/ShareFormWrapper/compiled.compiled.css +1 -0
- package/dist/es2019/components/ShareFormWrapper/compiled.js +4 -2
- package/dist/es2019/components/ShareFormWrapper/styled.js +7 -4
- package/dist/es2019/components/analytics/analytics.js +1 -1
- package/dist/esm/components/LazyShareForm/LazyShareForm.js +2 -1
- package/dist/esm/components/LazyShareForm/LazyShareFormNext.js +2 -1
- package/dist/esm/components/LazyShareForm/lazy.js +6 -3
- package/dist/esm/components/LazyShareForm/lazyNext.js +6 -3
- package/dist/esm/components/ShareDialogContainer.js +54 -46
- package/dist/esm/components/ShareForm.js +4 -3
- package/dist/esm/components/ShareFormWrapper/ShareFormWrapper.js +5 -2
- package/dist/esm/components/ShareFormWrapper/compiled.compiled.css +1 -0
- package/dist/esm/components/ShareFormWrapper/compiled.js +4 -2
- package/dist/esm/components/ShareFormWrapper/styled.js +7 -4
- package/dist/esm/components/analytics/analytics.js +1 -1
- package/dist/types/components/ShareDialogContainer.d.ts +2 -1
- package/dist/types/components/ShareFormWrapper/ShareFormWrapper.d.ts +2 -2
- package/dist/types/components/ShareFormWrapper/compiled.d.ts +2 -1
- package/dist/types/components/ShareFormWrapper/styled.d.ts +2 -1
- package/dist/types/types/ShareContentState.d.ts +1 -0
- package/dist/types/types/ShareDialogContainer.d.ts +2 -0
- package/dist/types-ts4.5/components/ShareDialogContainer.d.ts +2 -1
- package/dist/types-ts4.5/components/ShareFormWrapper/ShareFormWrapper.d.ts +2 -2
- package/dist/types-ts4.5/components/ShareFormWrapper/compiled.d.ts +2 -1
- package/dist/types-ts4.5/components/ShareFormWrapper/styled.d.ts +2 -1
- package/dist/types-ts4.5/types/ShareContentState.d.ts +1 -0
- package/dist/types-ts4.5/types/ShareDialogContainer.d.ts +2 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/share
|
|
2
2
|
|
|
3
|
+
## 6.6.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 6.6.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#155111](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/155111)
|
|
14
|
+
[`e186c31dcd9a3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e186c31dcd9a3) -
|
|
15
|
+
[ux] Added a new `onSubmit` prop to handle custom form field values, also increased the width of
|
|
16
|
+
the container to 500px when the extended dialog is enabled
|
|
17
|
+
|
|
3
18
|
## 6.5.0
|
|
4
19
|
|
|
5
20
|
### Minor Changes
|
|
@@ -108,7 +108,8 @@ function LazyShareForm(props) {
|
|
|
108
108
|
,
|
|
109
109
|
integrationMode: integrationMode,
|
|
110
110
|
isMenuItemSelected: isMenuItemSelected,
|
|
111
|
-
shouldShowTitle: false
|
|
111
|
+
shouldShowTitle: false,
|
|
112
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
112
113
|
}, showIntegrationForm && selectedIntegration !== null ? (0, _react2.jsx)(_analyticsNext.AnalyticsContext, {
|
|
113
114
|
data: {
|
|
114
115
|
source: _analytics.INTEGRATION_MODAL_SOURCE
|
|
@@ -95,7 +95,8 @@ function LazyShareForm(props) {
|
|
|
95
95
|
,
|
|
96
96
|
integrationMode: integrationMode,
|
|
97
97
|
isMenuItemSelected: isMenuItemSelected,
|
|
98
|
-
shouldShowTitle: false
|
|
98
|
+
shouldShowTitle: false,
|
|
99
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
99
100
|
}, showIntegrationForm && selectedIntegration !== null ? /*#__PURE__*/_react.default.createElement(_analyticsNext.AnalyticsContext, {
|
|
100
101
|
data: {
|
|
101
102
|
source: _analytics.INTEGRATION_MODAL_SOURCE
|
|
@@ -35,7 +35,8 @@ var LoadingDialog = function LoadingDialog(_ref) {
|
|
|
35
35
|
showTitle = _ref.showTitle,
|
|
36
36
|
setIsLoading = _ref.setIsLoading,
|
|
37
37
|
integrationMode = _ref.integrationMode,
|
|
38
|
-
isMenuItemSelected = _ref.isMenuItemSelected
|
|
38
|
+
isMenuItemSelected = _ref.isMenuItemSelected,
|
|
39
|
+
isExtendedShareDialogEnabled = _ref.isExtendedShareDialogEnabled;
|
|
39
40
|
_react.default.useEffect(function () {
|
|
40
41
|
setIsLoading(true);
|
|
41
42
|
});
|
|
@@ -45,7 +46,8 @@ var LoadingDialog = function LoadingDialog(_ref) {
|
|
|
45
46
|
isMenuItemSelected: isMenuItemSelected
|
|
46
47
|
// if `showTitle` is passed, we use it. Otherwise, we will show title for loading dialog.
|
|
47
48
|
,
|
|
48
|
-
shouldShowTitle: typeof showTitle === 'boolean' ? showTitle : true
|
|
49
|
+
shouldShowTitle: typeof showTitle === 'boolean' ? showTitle : true,
|
|
50
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
49
51
|
}, (0, _react2.jsx)("div", {
|
|
50
52
|
css: spinnerWrapperStyles
|
|
51
53
|
}, (0, _react2.jsx)(_spinner.default, null)));
|
|
@@ -57,7 +59,8 @@ var _default = exports.default = function _default(props) {
|
|
|
57
59
|
showTitle: props.showTitle,
|
|
58
60
|
setIsLoading: props.setIsLoading,
|
|
59
61
|
integrationMode: props.integrationMode,
|
|
60
|
-
isMenuItemSelected: props.isMenuItemSelected
|
|
62
|
+
isMenuItemSelected: props.isMenuItemSelected,
|
|
63
|
+
isExtendedShareDialogEnabled: props.isExtendedShareDialogEnabled
|
|
61
64
|
})
|
|
62
65
|
}, (0, _react2.jsx)(LazyShareFormLazy, props));
|
|
63
66
|
};
|
|
@@ -30,7 +30,8 @@ var LoadingDialog = function LoadingDialog(_ref) {
|
|
|
30
30
|
showTitle = _ref.showTitle,
|
|
31
31
|
setIsLoading = _ref.setIsLoading,
|
|
32
32
|
integrationMode = _ref.integrationMode,
|
|
33
|
-
isMenuItemSelected = _ref.isMenuItemSelected
|
|
33
|
+
isMenuItemSelected = _ref.isMenuItemSelected,
|
|
34
|
+
isExtendedShareDialogEnabled = _ref.isExtendedShareDialogEnabled;
|
|
34
35
|
_react.default.useEffect(function () {
|
|
35
36
|
setIsLoading(true);
|
|
36
37
|
});
|
|
@@ -40,7 +41,8 @@ var LoadingDialog = function LoadingDialog(_ref) {
|
|
|
40
41
|
isMenuItemSelected: isMenuItemSelected
|
|
41
42
|
// if `showTitle` is passed, we use it. Otherwise, we will show title for loading dialog.
|
|
42
43
|
,
|
|
43
|
-
shouldShowTitle: typeof showTitle === 'boolean' ? showTitle : true
|
|
44
|
+
shouldShowTitle: typeof showTitle === 'boolean' ? showTitle : true,
|
|
45
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
44
46
|
}, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
45
47
|
xcss: (0, _css.cx)(styles.spinnerWrapperStyles)
|
|
46
48
|
}, /*#__PURE__*/_react.default.createElement(_spinner.default, null)));
|
|
@@ -52,7 +54,8 @@ var _default = exports.default = function _default(props) {
|
|
|
52
54
|
showTitle: props.showTitle,
|
|
53
55
|
setIsLoading: props.setIsLoading,
|
|
54
56
|
integrationMode: props.integrationMode,
|
|
55
|
-
isMenuItemSelected: props.isMenuItemSelected
|
|
57
|
+
isMenuItemSelected: props.isMenuItemSelected,
|
|
58
|
+
isExtendedShareDialogEnabled: props.isExtendedShareDialogEnabled
|
|
56
59
|
})
|
|
57
60
|
}, /*#__PURE__*/_react.default.createElement(LazyShareFormLazy, props));
|
|
58
61
|
};
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.defaultConfig = exports.ShareDialogContainerInternal = exports.ShareDialogContainer = void 0;
|
|
8
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
8
9
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
10
|
var _objectDestructuringEmpty2 = _interopRequireDefault(require("@babel/runtime/helpers/objectDestructuringEmpty"));
|
|
10
11
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
@@ -32,6 +33,7 @@ var _ErrorBoundary = _interopRequireDefault(require("./ErrorBoundary"));
|
|
|
32
33
|
var _MessagesIntlProvider = _interopRequireDefault(require("./MessagesIntlProvider"));
|
|
33
34
|
var _ShareDialogWithTrigger = require("./ShareDialogWithTrigger");
|
|
34
35
|
var _utils = require("./utils");
|
|
36
|
+
var _excluded = ["users", "comment"];
|
|
35
37
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
36
38
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
37
39
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
@@ -116,8 +118,10 @@ var ShareDialogContainerInternal = exports.ShareDialogContainerInternal = /*#__P
|
|
|
116
118
|
})));
|
|
117
119
|
});
|
|
118
120
|
(0, _defineProperty2.default)(_this, "handleSubmitShare", function (_ref2) {
|
|
121
|
+
var _this$props$onSubmit, _this$props2;
|
|
119
122
|
var users = _ref2.users,
|
|
120
|
-
comment = _ref2.comment
|
|
123
|
+
comment = _ref2.comment,
|
|
124
|
+
rest = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
|
|
121
125
|
var shareLink = _this.getFormShareLink();
|
|
122
126
|
var _this$props = _this.props,
|
|
123
127
|
productId = _this$props.productId,
|
|
@@ -138,6 +142,10 @@ var ShareDialogContainerInternal = exports.ShareDialogContainerInternal = /*#__P
|
|
|
138
142
|
atlOriginId: _this.getFormShareOriginTracing().id,
|
|
139
143
|
shareeAction: shareeAction
|
|
140
144
|
};
|
|
145
|
+
(_this$props$onSubmit = (_this$props2 = _this.props).onSubmit) === null || _this$props$onSubmit === void 0 || _this$props$onSubmit.call(_this$props2, _objectSpread({
|
|
146
|
+
users: users,
|
|
147
|
+
comment: comment
|
|
148
|
+
}, rest));
|
|
141
149
|
return _this.shareClient.share(content, (0, _utils.optionDataToUsers)(users), metaData, comment).then(function () {
|
|
142
150
|
if (!_this._isMounted) {
|
|
143
151
|
return;
|
|
@@ -319,51 +327,51 @@ var ShareDialogContainerInternal = exports.ShareDialogContainerInternal = /*#__P
|
|
|
319
327
|
}, {
|
|
320
328
|
key: "render",
|
|
321
329
|
value: function render() {
|
|
322
|
-
var _this$
|
|
323
|
-
cloudId = _this$
|
|
324
|
-
orgId = _this$
|
|
325
|
-
isAutoOpenDialog = _this$
|
|
326
|
-
dialogPlacement = _this$
|
|
327
|
-
loadUserOptions = _this$
|
|
328
|
-
renderCustomTriggerButton = _this$
|
|
329
|
-
shareContentType = _this$
|
|
330
|
-
shareContentSubType = _this$
|
|
331
|
-
shareContentId = _this$
|
|
332
|
-
shareFormTitle = _this$
|
|
333
|
-
shareFormHelperMessage = _this$
|
|
334
|
-
shouldCloseOnEscapePress = _this$
|
|
335
|
-
showFlags = _this$
|
|
336
|
-
enableSmartUserPicker = _this$
|
|
337
|
-
loggedInAccountId = _this$
|
|
338
|
-
triggerButtonAppearance = _this$
|
|
339
|
-
triggerButtonIcon = _this$
|
|
340
|
-
triggerButtonStyle = _this$
|
|
341
|
-
triggerButtonTooltipText = _this$
|
|
342
|
-
triggerButtonTooltipPosition = _this$
|
|
343
|
-
bottomMessage = _this$
|
|
344
|
-
shareeAction = _this$
|
|
345
|
-
product = _this$
|
|
346
|
-
productAttributes = _this$
|
|
347
|
-
customHeader = _this$
|
|
348
|
-
customFooter = _this$
|
|
349
|
-
onTriggerButtonClick = _this$
|
|
350
|
-
onUserSelectionChange = _this$
|
|
351
|
-
shareFieldsFooter = _this$
|
|
352
|
-
isCopyDisabled = _this$
|
|
353
|
-
isPublicLink = _this$
|
|
354
|
-
integrationMode = _this$
|
|
355
|
-
shareIntegrations = _this$
|
|
356
|
-
additionalTabs = _this$
|
|
357
|
-
builtInTabContentWidth = _this$
|
|
358
|
-
shareAri = _this$
|
|
359
|
-
tabIndex = _this$
|
|
360
|
-
copyTooltipText = _this$
|
|
361
|
-
onDialogClose = _this$
|
|
362
|
-
isBrowseUsersDisabled = _this$
|
|
363
|
-
userPickerOptions = _this$
|
|
364
|
-
isSubmitShareDisabled = _this$
|
|
365
|
-
additionalUserFields = _this$
|
|
366
|
-
isExtendedShareDialogEnabled = _this$
|
|
330
|
+
var _this$props3 = this.props,
|
|
331
|
+
cloudId = _this$props3.cloudId,
|
|
332
|
+
orgId = _this$props3.orgId,
|
|
333
|
+
isAutoOpenDialog = _this$props3.isAutoOpenDialog,
|
|
334
|
+
dialogPlacement = _this$props3.dialogPlacement,
|
|
335
|
+
loadUserOptions = _this$props3.loadUserOptions,
|
|
336
|
+
renderCustomTriggerButton = _this$props3.renderCustomTriggerButton,
|
|
337
|
+
shareContentType = _this$props3.shareContentType,
|
|
338
|
+
shareContentSubType = _this$props3.shareContentSubType,
|
|
339
|
+
shareContentId = _this$props3.shareContentId,
|
|
340
|
+
shareFormTitle = _this$props3.shareFormTitle,
|
|
341
|
+
shareFormHelperMessage = _this$props3.shareFormHelperMessage,
|
|
342
|
+
shouldCloseOnEscapePress = _this$props3.shouldCloseOnEscapePress,
|
|
343
|
+
showFlags = _this$props3.showFlags,
|
|
344
|
+
enableSmartUserPicker = _this$props3.enableSmartUserPicker,
|
|
345
|
+
loggedInAccountId = _this$props3.loggedInAccountId,
|
|
346
|
+
triggerButtonAppearance = _this$props3.triggerButtonAppearance,
|
|
347
|
+
triggerButtonIcon = _this$props3.triggerButtonIcon,
|
|
348
|
+
triggerButtonStyle = _this$props3.triggerButtonStyle,
|
|
349
|
+
triggerButtonTooltipText = _this$props3.triggerButtonTooltipText,
|
|
350
|
+
triggerButtonTooltipPosition = _this$props3.triggerButtonTooltipPosition,
|
|
351
|
+
bottomMessage = _this$props3.bottomMessage,
|
|
352
|
+
shareeAction = _this$props3.shareeAction,
|
|
353
|
+
product = _this$props3.product,
|
|
354
|
+
productAttributes = _this$props3.productAttributes,
|
|
355
|
+
customHeader = _this$props3.customHeader,
|
|
356
|
+
customFooter = _this$props3.customFooter,
|
|
357
|
+
onTriggerButtonClick = _this$props3.onTriggerButtonClick,
|
|
358
|
+
onUserSelectionChange = _this$props3.onUserSelectionChange,
|
|
359
|
+
shareFieldsFooter = _this$props3.shareFieldsFooter,
|
|
360
|
+
isCopyDisabled = _this$props3.isCopyDisabled,
|
|
361
|
+
isPublicLink = _this$props3.isPublicLink,
|
|
362
|
+
integrationMode = _this$props3.integrationMode,
|
|
363
|
+
shareIntegrations = _this$props3.shareIntegrations,
|
|
364
|
+
additionalTabs = _this$props3.additionalTabs,
|
|
365
|
+
builtInTabContentWidth = _this$props3.builtInTabContentWidth,
|
|
366
|
+
shareAri = _this$props3.shareAri,
|
|
367
|
+
tabIndex = _this$props3.tabIndex,
|
|
368
|
+
copyTooltipText = _this$props3.copyTooltipText,
|
|
369
|
+
onDialogClose = _this$props3.onDialogClose,
|
|
370
|
+
isBrowseUsersDisabled = _this$props3.isBrowseUsersDisabled,
|
|
371
|
+
userPickerOptions = _this$props3.userPickerOptions,
|
|
372
|
+
isSubmitShareDisabled = _this$props3.isSubmitShareDisabled,
|
|
373
|
+
additionalUserFields = _this$props3.additionalUserFields,
|
|
374
|
+
isExtendedShareDialogEnabled = _this$props3.isExtendedShareDialogEnabled;
|
|
367
375
|
var _this$state = this.state,
|
|
368
376
|
config = _this$state.config,
|
|
369
377
|
isFetchingConfig = _this$state.isFetchingConfig;
|
|
@@ -315,7 +315,8 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
315
315
|
shareIntegrations = _this$props7.shareIntegrations,
|
|
316
316
|
additionalTabs = _this$props7.additionalTabs,
|
|
317
317
|
builtInTabContentWidth = _this$props7.builtInTabContentWidth,
|
|
318
|
-
handleCloseDialog = _this$props7.handleCloseDialog
|
|
318
|
+
handleCloseDialog = _this$props7.handleCloseDialog,
|
|
319
|
+
isExtendedShareDialogEnabled = _this$props7.isExtendedShareDialogEnabled;
|
|
319
320
|
var selectedMenuItem = this.state.selectedMenuItem;
|
|
320
321
|
if ((0, _platformFeatureFlags.fg)('plans_outgoing_mail_fix')) {
|
|
321
322
|
var hasShareIntegrations = shareIntegrations && shareIntegrations.length;
|
|
@@ -360,7 +361,7 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
360
361
|
}
|
|
361
362
|
}
|
|
362
363
|
if (integrationMode === 'tabs') {
|
|
363
|
-
var DEFAULT_TAB_CONTENT_WIDTH = 304;
|
|
364
|
+
var DEFAULT_TAB_CONTENT_WIDTH = isExtendedShareDialogEnabled ? 452 : 304;
|
|
364
365
|
return (0, _react2.jsx)(_tabs.default, {
|
|
365
366
|
id: "ShareForm-Tabs-Integrations",
|
|
366
367
|
onChange: this.changeTab,
|
|
@@ -460,7 +461,7 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
460
461
|
})));
|
|
461
462
|
}
|
|
462
463
|
if (integrationMode === 'tabs') {
|
|
463
|
-
var _DEFAULT_TAB_CONTENT_WIDTH = 304;
|
|
464
|
+
var _DEFAULT_TAB_CONTENT_WIDTH = isExtendedShareDialogEnabled ? 452 : 304;
|
|
464
465
|
return (0, _react2.jsx)(_tabs.default, {
|
|
465
466
|
id: "ShareForm-Tabs-Integrations",
|
|
466
467
|
onChange: this.changeTab,
|
|
@@ -24,7 +24,9 @@ var ShareFormWrapper = function ShareFormWrapper(_ref) {
|
|
|
24
24
|
_ref$integrationMode = _ref.integrationMode,
|
|
25
25
|
integrationMode = _ref$integrationMode === void 0 ? 'off' : _ref$integrationMode,
|
|
26
26
|
_ref$isMenuItemSelect = _ref.isMenuItemSelected,
|
|
27
|
-
isMenuItemSelected = _ref$isMenuItemSelect === void 0 ? false : _ref$isMenuItemSelect
|
|
27
|
+
isMenuItemSelected = _ref$isMenuItemSelect === void 0 ? false : _ref$isMenuItemSelect,
|
|
28
|
+
_ref$isExtendedShareD = _ref.isExtendedShareDialogEnabled,
|
|
29
|
+
isExtendedShareDialogEnabled = _ref$isExtendedShareD === void 0 ? false : _ref$isExtendedShareD;
|
|
28
30
|
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
29
31
|
formatMessage = _useIntl.formatMessage;
|
|
30
32
|
var ContentWrapper = (0, _platformFeatureFlags.fg)('share-compiled-migration') ? _compiled.InlineDialogContentWrapper : _styled.InlineDialogContentWrapper;
|
|
@@ -33,7 +35,8 @@ var ShareFormWrapper = function ShareFormWrapper(_ref) {
|
|
|
33
35
|
label: formatMessage(_i18n.messages.formTitle)
|
|
34
36
|
}, (0, _platformFeatureFlags.fg)('platform_share_custom_header_prop') && header, /*#__PURE__*/_react.default.createElement(FormWrapper, {
|
|
35
37
|
integrationMode: integrationMode,
|
|
36
|
-
isMenuItemSelected: isMenuItemSelected
|
|
38
|
+
isMenuItemSelected: isMenuItemSelected,
|
|
39
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
37
40
|
}, shouldShowTitle && /*#__PURE__*/_react.default.createElement(_ShareHeader.ShareHeader, {
|
|
38
41
|
title: shareFormTitle
|
|
39
42
|
}), children), footer);
|
|
@@ -16,12 +16,14 @@ var styles = {
|
|
|
16
16
|
menuNotSelectedAndMenuIntegration: "_1bsbpk3t",
|
|
17
17
|
tabsIntegration: "_1bsb1wug",
|
|
18
18
|
default: "_1bsb1j89",
|
|
19
|
+
extendedDefault: "_1bsb1op3",
|
|
19
20
|
inlineDialogContentWrapper: "_ca0qpxbi _u5f31ejb _n3tdpxbi _19bv1ejb"
|
|
20
21
|
};
|
|
21
22
|
var InlineDialogFormWrapper = exports.InlineDialogFormWrapper = function InlineDialogFormWrapper(_ref) {
|
|
22
23
|
var children = _ref.children,
|
|
23
24
|
integrationMode = _ref.integrationMode,
|
|
24
|
-
isMenuItemSelected = _ref.isMenuItemSelected
|
|
25
|
+
isMenuItemSelected = _ref.isMenuItemSelected,
|
|
26
|
+
isExtendedShareDialogEnabled = _ref.isExtendedShareDialogEnabled;
|
|
25
27
|
if (!isMenuItemSelected && integrationMode === 'menu') {
|
|
26
28
|
return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
27
29
|
xcss: (0, _css.cx)(styles.menuNotSelectedAndMenuIntegration)
|
|
@@ -35,7 +37,7 @@ var InlineDialogFormWrapper = exports.InlineDialogFormWrapper = function InlineD
|
|
|
35
37
|
}
|
|
36
38
|
}
|
|
37
39
|
return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
38
|
-
xcss: (0, _css.cx)(styles.default)
|
|
40
|
+
xcss: (0, _css.cx)(isExtendedShareDialogEnabled ? styles.extendedDefault : styles.default)
|
|
39
41
|
}, children);
|
|
40
42
|
};
|
|
41
43
|
var InlineDialogContentWrapper = exports.InlineDialogContentWrapper = function InlineDialogContentWrapper(_ref2) {
|
|
@@ -21,8 +21,9 @@ var _ShareMenuItem = require("../ShareMenuItem");
|
|
|
21
21
|
*/
|
|
22
22
|
var calculateFormWrapperWidth = function calculateFormWrapperWidth(_ref) {
|
|
23
23
|
var integrationMode = _ref.integrationMode,
|
|
24
|
-
isMenuItemSelected = _ref.isMenuItemSelected
|
|
25
|
-
|
|
24
|
+
isMenuItemSelected = _ref.isMenuItemSelected,
|
|
25
|
+
isExtendedShareDialogEnabled = _ref.isExtendedShareDialogEnabled;
|
|
26
|
+
var formWidth = "".concat(isExtendedShareDialogEnabled ? 452 : 8 * 44, "px");
|
|
26
27
|
if (!isMenuItemSelected && integrationMode === 'menu') {
|
|
27
28
|
return _ShareMenuItem.menuWrapperWidth;
|
|
28
29
|
}
|
|
@@ -36,11 +37,13 @@ var calculateFormWrapperWidth = function calculateFormWrapperWidth(_ref) {
|
|
|
36
37
|
var InlineDialogFormWrapper = exports.InlineDialogFormWrapper = function InlineDialogFormWrapper(_ref2) {
|
|
37
38
|
var children = _ref2.children,
|
|
38
39
|
integrationMode = _ref2.integrationMode,
|
|
39
|
-
isMenuItemSelected = _ref2.isMenuItemSelected
|
|
40
|
+
isMenuItemSelected = _ref2.isMenuItemSelected,
|
|
41
|
+
isExtendedShareDialogEnabled = _ref2.isExtendedShareDialogEnabled;
|
|
40
42
|
var styles = {
|
|
41
43
|
width: calculateFormWrapperWidth({
|
|
42
44
|
integrationMode: integrationMode,
|
|
43
|
-
isMenuItemSelected: isMenuItemSelected
|
|
45
|
+
isMenuItemSelected: isMenuItemSelected,
|
|
46
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
44
47
|
})
|
|
45
48
|
};
|
|
46
49
|
return (0, _react.jsx)("div", {
|
|
@@ -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.
|
|
16
|
+
packageVersion: "6.6.1"
|
|
17
17
|
}, attributes);
|
|
18
18
|
};
|
|
19
19
|
var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
|
|
@@ -104,7 +104,8 @@ function LazyShareForm(props) {
|
|
|
104
104
|
,
|
|
105
105
|
integrationMode: integrationMode,
|
|
106
106
|
isMenuItemSelected: isMenuItemSelected,
|
|
107
|
-
shouldShowTitle: false
|
|
107
|
+
shouldShowTitle: false,
|
|
108
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
108
109
|
}, showIntegrationForm && selectedIntegration !== null ? jsx(AnalyticsContext, {
|
|
109
110
|
data: {
|
|
110
111
|
source: INTEGRATION_MODAL_SOURCE
|
|
@@ -93,7 +93,8 @@ function LazyShareForm(props) {
|
|
|
93
93
|
,
|
|
94
94
|
integrationMode: integrationMode,
|
|
95
95
|
isMenuItemSelected: isMenuItemSelected,
|
|
96
|
-
shouldShowTitle: false
|
|
96
|
+
shouldShowTitle: false,
|
|
97
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
97
98
|
}, showIntegrationForm && selectedIntegration !== null ? /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
98
99
|
data: {
|
|
99
100
|
source: INTEGRATION_MODAL_SOURCE
|
|
@@ -24,7 +24,8 @@ const LoadingDialog = ({
|
|
|
24
24
|
showTitle,
|
|
25
25
|
setIsLoading,
|
|
26
26
|
integrationMode,
|
|
27
|
-
isMenuItemSelected
|
|
27
|
+
isMenuItemSelected,
|
|
28
|
+
isExtendedShareDialogEnabled
|
|
28
29
|
}) => {
|
|
29
30
|
React.useEffect(() => {
|
|
30
31
|
setIsLoading(true);
|
|
@@ -35,7 +36,8 @@ const LoadingDialog = ({
|
|
|
35
36
|
isMenuItemSelected: isMenuItemSelected
|
|
36
37
|
// if `showTitle` is passed, we use it. Otherwise, we will show title for loading dialog.
|
|
37
38
|
,
|
|
38
|
-
shouldShowTitle: typeof showTitle === 'boolean' ? showTitle : true
|
|
39
|
+
shouldShowTitle: typeof showTitle === 'boolean' ? showTitle : true,
|
|
40
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
39
41
|
}, jsx("div", {
|
|
40
42
|
css: spinnerWrapperStyles
|
|
41
43
|
}, jsx(Spinner, null)));
|
|
@@ -46,6 +48,7 @@ export default (props => fg('share-compiled-migration') ? jsx(ComponentNext, pro
|
|
|
46
48
|
showTitle: props.showTitle,
|
|
47
49
|
setIsLoading: props.setIsLoading,
|
|
48
50
|
integrationMode: props.integrationMode,
|
|
49
|
-
isMenuItemSelected: props.isMenuItemSelected
|
|
51
|
+
isMenuItemSelected: props.isMenuItemSelected,
|
|
52
|
+
isExtendedShareDialogEnabled: props.isExtendedShareDialogEnabled
|
|
50
53
|
})
|
|
51
54
|
}, jsx(LazyShareFormLazy, props)));
|
|
@@ -16,7 +16,8 @@ const LoadingDialog = ({
|
|
|
16
16
|
showTitle,
|
|
17
17
|
setIsLoading,
|
|
18
18
|
integrationMode,
|
|
19
|
-
isMenuItemSelected
|
|
19
|
+
isMenuItemSelected,
|
|
20
|
+
isExtendedShareDialogEnabled
|
|
20
21
|
}) => {
|
|
21
22
|
React.useEffect(() => {
|
|
22
23
|
setIsLoading(true);
|
|
@@ -27,7 +28,8 @@ const LoadingDialog = ({
|
|
|
27
28
|
isMenuItemSelected: isMenuItemSelected
|
|
28
29
|
// if `showTitle` is passed, we use it. Otherwise, we will show title for loading dialog.
|
|
29
30
|
,
|
|
30
|
-
shouldShowTitle: typeof showTitle === 'boolean' ? showTitle : true
|
|
31
|
+
shouldShowTitle: typeof showTitle === 'boolean' ? showTitle : true,
|
|
32
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
31
33
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
32
34
|
xcss: cx(styles.spinnerWrapperStyles)
|
|
33
35
|
}, /*#__PURE__*/React.createElement(Spinner, null)));
|
|
@@ -38,6 +40,7 @@ export default (props => /*#__PURE__*/React.createElement(Suspense, {
|
|
|
38
40
|
showTitle: props.showTitle,
|
|
39
41
|
setIsLoading: props.setIsLoading,
|
|
40
42
|
integrationMode: props.integrationMode,
|
|
41
|
-
isMenuItemSelected: props.isMenuItemSelected
|
|
43
|
+
isMenuItemSelected: props.isMenuItemSelected,
|
|
44
|
+
isExtendedShareDialogEnabled: props.isExtendedShareDialogEnabled
|
|
42
45
|
})
|
|
43
46
|
}, /*#__PURE__*/React.createElement(LazyShareFormLazy, props)));
|
|
@@ -83,8 +83,10 @@ export class ShareDialogContainerInternal extends React.Component {
|
|
|
83
83
|
});
|
|
84
84
|
_defineProperty(this, "handleSubmitShare", ({
|
|
85
85
|
users,
|
|
86
|
-
comment
|
|
86
|
+
comment,
|
|
87
|
+
...rest
|
|
87
88
|
}) => {
|
|
89
|
+
var _this$props$onSubmit, _this$props;
|
|
88
90
|
const shareLink = this.getFormShareLink();
|
|
89
91
|
const {
|
|
90
92
|
productId,
|
|
@@ -106,6 +108,11 @@ export class ShareDialogContainerInternal extends React.Component {
|
|
|
106
108
|
atlOriginId: this.getFormShareOriginTracing().id,
|
|
107
109
|
shareeAction
|
|
108
110
|
};
|
|
111
|
+
(_this$props$onSubmit = (_this$props = this.props).onSubmit) === null || _this$props$onSubmit === void 0 ? void 0 : _this$props$onSubmit.call(_this$props, {
|
|
112
|
+
users,
|
|
113
|
+
comment,
|
|
114
|
+
...rest
|
|
115
|
+
});
|
|
109
116
|
return this.shareClient.share(content, optionDataToUsers(users), metaData, comment).then(() => {
|
|
110
117
|
if (!this._isMounted) {
|
|
111
118
|
return;
|
|
@@ -295,7 +295,8 @@ class InternalForm extends React.PureComponent {
|
|
|
295
295
|
shareIntegrations,
|
|
296
296
|
additionalTabs,
|
|
297
297
|
builtInTabContentWidth,
|
|
298
|
-
handleCloseDialog
|
|
298
|
+
handleCloseDialog,
|
|
299
|
+
isExtendedShareDialogEnabled
|
|
299
300
|
} = this.props;
|
|
300
301
|
const {
|
|
301
302
|
selectedMenuItem
|
|
@@ -337,7 +338,7 @@ class InternalForm extends React.PureComponent {
|
|
|
337
338
|
}
|
|
338
339
|
}
|
|
339
340
|
if (integrationMode === 'tabs') {
|
|
340
|
-
const DEFAULT_TAB_CONTENT_WIDTH = 304;
|
|
341
|
+
const DEFAULT_TAB_CONTENT_WIDTH = isExtendedShareDialogEnabled ? 452 : 304;
|
|
341
342
|
return jsx(Tabs, {
|
|
342
343
|
id: "ShareForm-Tabs-Integrations",
|
|
343
344
|
onChange: this.changeTab,
|
|
@@ -419,7 +420,7 @@ class InternalForm extends React.PureComponent {
|
|
|
419
420
|
})));
|
|
420
421
|
}
|
|
421
422
|
if (integrationMode === 'tabs') {
|
|
422
|
-
const DEFAULT_TAB_CONTENT_WIDTH = 304;
|
|
423
|
+
const DEFAULT_TAB_CONTENT_WIDTH = isExtendedShareDialogEnabled ? 452 : 304;
|
|
423
424
|
return jsx(Tabs, {
|
|
424
425
|
id: "ShareForm-Tabs-Integrations",
|
|
425
426
|
onChange: this.changeTab,
|
|
@@ -12,7 +12,8 @@ const ShareFormWrapper = ({
|
|
|
12
12
|
header = null,
|
|
13
13
|
footer = null,
|
|
14
14
|
integrationMode = 'off',
|
|
15
|
-
isMenuItemSelected = false
|
|
15
|
+
isMenuItemSelected = false,
|
|
16
|
+
isExtendedShareDialogEnabled = false
|
|
16
17
|
}) => {
|
|
17
18
|
const {
|
|
18
19
|
formatMessage
|
|
@@ -23,7 +24,8 @@ const ShareFormWrapper = ({
|
|
|
23
24
|
label: formatMessage(messages.formTitle)
|
|
24
25
|
}, fg('platform_share_custom_header_prop') && header, /*#__PURE__*/React.createElement(FormWrapper, {
|
|
25
26
|
integrationMode: integrationMode,
|
|
26
|
-
isMenuItemSelected: isMenuItemSelected
|
|
27
|
+
isMenuItemSelected: isMenuItemSelected,
|
|
28
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
27
29
|
}, shouldShowTitle && /*#__PURE__*/React.createElement(ShareHeader, {
|
|
28
30
|
title: shareFormTitle
|
|
29
31
|
}), children), footer);
|
|
@@ -9,12 +9,14 @@ const styles = {
|
|
|
9
9
|
menuNotSelectedAndMenuIntegration: "_1bsbpk3t",
|
|
10
10
|
tabsIntegration: "_1bsb1wug",
|
|
11
11
|
default: "_1bsb1j89",
|
|
12
|
+
extendedDefault: "_1bsb1op3",
|
|
12
13
|
inlineDialogContentWrapper: "_ca0qpxbi _u5f31ejb _n3tdpxbi _19bv1ejb"
|
|
13
14
|
};
|
|
14
15
|
export const InlineDialogFormWrapper = ({
|
|
15
16
|
children,
|
|
16
17
|
integrationMode,
|
|
17
|
-
isMenuItemSelected
|
|
18
|
+
isMenuItemSelected,
|
|
19
|
+
isExtendedShareDialogEnabled
|
|
18
20
|
}) => {
|
|
19
21
|
if (!isMenuItemSelected && integrationMode === 'menu') {
|
|
20
22
|
return /*#__PURE__*/React.createElement(Box, {
|
|
@@ -29,7 +31,7 @@ export const InlineDialogFormWrapper = ({
|
|
|
29
31
|
}
|
|
30
32
|
}
|
|
31
33
|
return /*#__PURE__*/React.createElement(Box, {
|
|
32
|
-
xcss: cx(styles.default)
|
|
34
|
+
xcss: cx(isExtendedShareDialogEnabled ? styles.extendedDefault : styles.default)
|
|
33
35
|
}, children);
|
|
34
36
|
};
|
|
35
37
|
export const InlineDialogContentWrapper = ({
|
|
@@ -15,9 +15,10 @@ import { menuWrapperWidth } from '../ShareMenuItem';
|
|
|
15
15
|
*/
|
|
16
16
|
const calculateFormWrapperWidth = ({
|
|
17
17
|
integrationMode,
|
|
18
|
-
isMenuItemSelected
|
|
18
|
+
isMenuItemSelected,
|
|
19
|
+
isExtendedShareDialogEnabled
|
|
19
20
|
}) => {
|
|
20
|
-
const formWidth = `${8 * 44}px`;
|
|
21
|
+
const formWidth = `${isExtendedShareDialogEnabled ? 452 : 8 * 44}px`;
|
|
21
22
|
if (!isMenuItemSelected && integrationMode === 'menu') {
|
|
22
23
|
return menuWrapperWidth;
|
|
23
24
|
}
|
|
@@ -31,12 +32,14 @@ const calculateFormWrapperWidth = ({
|
|
|
31
32
|
export const InlineDialogFormWrapper = ({
|
|
32
33
|
children,
|
|
33
34
|
integrationMode,
|
|
34
|
-
isMenuItemSelected
|
|
35
|
+
isMenuItemSelected,
|
|
36
|
+
isExtendedShareDialogEnabled
|
|
35
37
|
}) => {
|
|
36
38
|
const styles = {
|
|
37
39
|
width: calculateFormWrapperWidth({
|
|
38
40
|
integrationMode,
|
|
39
|
-
isMenuItemSelected
|
|
41
|
+
isMenuItemSelected,
|
|
42
|
+
isExtendedShareDialogEnabled
|
|
40
43
|
})
|
|
41
44
|
};
|
|
42
45
|
return jsx("div", {
|
|
@@ -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: "6.
|
|
4
|
+
packageVersion: "6.6.1",
|
|
5
5
|
...attributes
|
|
6
6
|
});
|
|
7
7
|
const createEvent = (eventType, source, action, actionSubject, actionSubjectId, attributes = {}) => ({
|
|
@@ -99,7 +99,8 @@ function LazyShareForm(props) {
|
|
|
99
99
|
,
|
|
100
100
|
integrationMode: integrationMode,
|
|
101
101
|
isMenuItemSelected: isMenuItemSelected,
|
|
102
|
-
shouldShowTitle: false
|
|
102
|
+
shouldShowTitle: false,
|
|
103
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
103
104
|
}, showIntegrationForm && selectedIntegration !== null ? jsx(AnalyticsContext, {
|
|
104
105
|
data: {
|
|
105
106
|
source: INTEGRATION_MODAL_SOURCE
|
|
@@ -88,7 +88,8 @@ function LazyShareForm(props) {
|
|
|
88
88
|
,
|
|
89
89
|
integrationMode: integrationMode,
|
|
90
90
|
isMenuItemSelected: isMenuItemSelected,
|
|
91
|
-
shouldShowTitle: false
|
|
91
|
+
shouldShowTitle: false,
|
|
92
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
92
93
|
}, showIntegrationForm && selectedIntegration !== null ? /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
93
94
|
data: {
|
|
94
95
|
source: INTEGRATION_MODAL_SOURCE
|
|
@@ -26,7 +26,8 @@ var LoadingDialog = function LoadingDialog(_ref) {
|
|
|
26
26
|
showTitle = _ref.showTitle,
|
|
27
27
|
setIsLoading = _ref.setIsLoading,
|
|
28
28
|
integrationMode = _ref.integrationMode,
|
|
29
|
-
isMenuItemSelected = _ref.isMenuItemSelected
|
|
29
|
+
isMenuItemSelected = _ref.isMenuItemSelected,
|
|
30
|
+
isExtendedShareDialogEnabled = _ref.isExtendedShareDialogEnabled;
|
|
30
31
|
React.useEffect(function () {
|
|
31
32
|
setIsLoading(true);
|
|
32
33
|
});
|
|
@@ -36,7 +37,8 @@ var LoadingDialog = function LoadingDialog(_ref) {
|
|
|
36
37
|
isMenuItemSelected: isMenuItemSelected
|
|
37
38
|
// if `showTitle` is passed, we use it. Otherwise, we will show title for loading dialog.
|
|
38
39
|
,
|
|
39
|
-
shouldShowTitle: typeof showTitle === 'boolean' ? showTitle : true
|
|
40
|
+
shouldShowTitle: typeof showTitle === 'boolean' ? showTitle : true,
|
|
41
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
40
42
|
}, jsx("div", {
|
|
41
43
|
css: spinnerWrapperStyles
|
|
42
44
|
}, jsx(Spinner, null)));
|
|
@@ -48,7 +50,8 @@ export default (function (props) {
|
|
|
48
50
|
showTitle: props.showTitle,
|
|
49
51
|
setIsLoading: props.setIsLoading,
|
|
50
52
|
integrationMode: props.integrationMode,
|
|
51
|
-
isMenuItemSelected: props.isMenuItemSelected
|
|
53
|
+
isMenuItemSelected: props.isMenuItemSelected,
|
|
54
|
+
isExtendedShareDialogEnabled: props.isExtendedShareDialogEnabled
|
|
52
55
|
})
|
|
53
56
|
}, jsx(LazyShareFormLazy, props));
|
|
54
57
|
});
|
|
@@ -18,7 +18,8 @@ var LoadingDialog = function LoadingDialog(_ref) {
|
|
|
18
18
|
showTitle = _ref.showTitle,
|
|
19
19
|
setIsLoading = _ref.setIsLoading,
|
|
20
20
|
integrationMode = _ref.integrationMode,
|
|
21
|
-
isMenuItemSelected = _ref.isMenuItemSelected
|
|
21
|
+
isMenuItemSelected = _ref.isMenuItemSelected,
|
|
22
|
+
isExtendedShareDialogEnabled = _ref.isExtendedShareDialogEnabled;
|
|
22
23
|
React.useEffect(function () {
|
|
23
24
|
setIsLoading(true);
|
|
24
25
|
});
|
|
@@ -28,7 +29,8 @@ var LoadingDialog = function LoadingDialog(_ref) {
|
|
|
28
29
|
isMenuItemSelected: isMenuItemSelected
|
|
29
30
|
// if `showTitle` is passed, we use it. Otherwise, we will show title for loading dialog.
|
|
30
31
|
,
|
|
31
|
-
shouldShowTitle: typeof showTitle === 'boolean' ? showTitle : true
|
|
32
|
+
shouldShowTitle: typeof showTitle === 'boolean' ? showTitle : true,
|
|
33
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
32
34
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
33
35
|
xcss: cx(styles.spinnerWrapperStyles)
|
|
34
36
|
}, /*#__PURE__*/React.createElement(Spinner, null)));
|
|
@@ -40,7 +42,8 @@ export default (function (props) {
|
|
|
40
42
|
showTitle: props.showTitle,
|
|
41
43
|
setIsLoading: props.setIsLoading,
|
|
42
44
|
integrationMode: props.integrationMode,
|
|
43
|
-
isMenuItemSelected: props.isMenuItemSelected
|
|
45
|
+
isMenuItemSelected: props.isMenuItemSelected,
|
|
46
|
+
isExtendedShareDialogEnabled: props.isExtendedShareDialogEnabled
|
|
44
47
|
})
|
|
45
48
|
}, /*#__PURE__*/React.createElement(LazyShareFormLazy, props));
|
|
46
49
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
1
2
|
import _objectDestructuringEmpty from "@babel/runtime/helpers/objectDestructuringEmpty";
|
|
2
3
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
4
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
@@ -7,6 +8,7 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
7
8
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
9
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
9
10
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
11
|
+
var _excluded = ["users", "comment"];
|
|
10
12
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
11
13
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
14
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -109,8 +111,10 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
|
|
|
109
111
|
})));
|
|
110
112
|
});
|
|
111
113
|
_defineProperty(_this, "handleSubmitShare", function (_ref2) {
|
|
114
|
+
var _this$props$onSubmit, _this$props2;
|
|
112
115
|
var users = _ref2.users,
|
|
113
|
-
comment = _ref2.comment
|
|
116
|
+
comment = _ref2.comment,
|
|
117
|
+
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
114
118
|
var shareLink = _this.getFormShareLink();
|
|
115
119
|
var _this$props = _this.props,
|
|
116
120
|
productId = _this$props.productId,
|
|
@@ -131,6 +135,10 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
|
|
|
131
135
|
atlOriginId: _this.getFormShareOriginTracing().id,
|
|
132
136
|
shareeAction: shareeAction
|
|
133
137
|
};
|
|
138
|
+
(_this$props$onSubmit = (_this$props2 = _this.props).onSubmit) === null || _this$props$onSubmit === void 0 || _this$props$onSubmit.call(_this$props2, _objectSpread({
|
|
139
|
+
users: users,
|
|
140
|
+
comment: comment
|
|
141
|
+
}, rest));
|
|
134
142
|
return _this.shareClient.share(content, optionDataToUsers(users), metaData, comment).then(function () {
|
|
135
143
|
if (!_this._isMounted) {
|
|
136
144
|
return;
|
|
@@ -312,51 +320,51 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
|
|
|
312
320
|
}, {
|
|
313
321
|
key: "render",
|
|
314
322
|
value: function render() {
|
|
315
|
-
var _this$
|
|
316
|
-
cloudId = _this$
|
|
317
|
-
orgId = _this$
|
|
318
|
-
isAutoOpenDialog = _this$
|
|
319
|
-
dialogPlacement = _this$
|
|
320
|
-
loadUserOptions = _this$
|
|
321
|
-
renderCustomTriggerButton = _this$
|
|
322
|
-
shareContentType = _this$
|
|
323
|
-
shareContentSubType = _this$
|
|
324
|
-
shareContentId = _this$
|
|
325
|
-
shareFormTitle = _this$
|
|
326
|
-
shareFormHelperMessage = _this$
|
|
327
|
-
shouldCloseOnEscapePress = _this$
|
|
328
|
-
showFlags = _this$
|
|
329
|
-
enableSmartUserPicker = _this$
|
|
330
|
-
loggedInAccountId = _this$
|
|
331
|
-
triggerButtonAppearance = _this$
|
|
332
|
-
triggerButtonIcon = _this$
|
|
333
|
-
triggerButtonStyle = _this$
|
|
334
|
-
triggerButtonTooltipText = _this$
|
|
335
|
-
triggerButtonTooltipPosition = _this$
|
|
336
|
-
bottomMessage = _this$
|
|
337
|
-
shareeAction = _this$
|
|
338
|
-
product = _this$
|
|
339
|
-
productAttributes = _this$
|
|
340
|
-
customHeader = _this$
|
|
341
|
-
customFooter = _this$
|
|
342
|
-
onTriggerButtonClick = _this$
|
|
343
|
-
onUserSelectionChange = _this$
|
|
344
|
-
shareFieldsFooter = _this$
|
|
345
|
-
isCopyDisabled = _this$
|
|
346
|
-
isPublicLink = _this$
|
|
347
|
-
integrationMode = _this$
|
|
348
|
-
shareIntegrations = _this$
|
|
349
|
-
additionalTabs = _this$
|
|
350
|
-
builtInTabContentWidth = _this$
|
|
351
|
-
shareAri = _this$
|
|
352
|
-
tabIndex = _this$
|
|
353
|
-
copyTooltipText = _this$
|
|
354
|
-
onDialogClose = _this$
|
|
355
|
-
isBrowseUsersDisabled = _this$
|
|
356
|
-
userPickerOptions = _this$
|
|
357
|
-
isSubmitShareDisabled = _this$
|
|
358
|
-
additionalUserFields = _this$
|
|
359
|
-
isExtendedShareDialogEnabled = _this$
|
|
323
|
+
var _this$props3 = this.props,
|
|
324
|
+
cloudId = _this$props3.cloudId,
|
|
325
|
+
orgId = _this$props3.orgId,
|
|
326
|
+
isAutoOpenDialog = _this$props3.isAutoOpenDialog,
|
|
327
|
+
dialogPlacement = _this$props3.dialogPlacement,
|
|
328
|
+
loadUserOptions = _this$props3.loadUserOptions,
|
|
329
|
+
renderCustomTriggerButton = _this$props3.renderCustomTriggerButton,
|
|
330
|
+
shareContentType = _this$props3.shareContentType,
|
|
331
|
+
shareContentSubType = _this$props3.shareContentSubType,
|
|
332
|
+
shareContentId = _this$props3.shareContentId,
|
|
333
|
+
shareFormTitle = _this$props3.shareFormTitle,
|
|
334
|
+
shareFormHelperMessage = _this$props3.shareFormHelperMessage,
|
|
335
|
+
shouldCloseOnEscapePress = _this$props3.shouldCloseOnEscapePress,
|
|
336
|
+
showFlags = _this$props3.showFlags,
|
|
337
|
+
enableSmartUserPicker = _this$props3.enableSmartUserPicker,
|
|
338
|
+
loggedInAccountId = _this$props3.loggedInAccountId,
|
|
339
|
+
triggerButtonAppearance = _this$props3.triggerButtonAppearance,
|
|
340
|
+
triggerButtonIcon = _this$props3.triggerButtonIcon,
|
|
341
|
+
triggerButtonStyle = _this$props3.triggerButtonStyle,
|
|
342
|
+
triggerButtonTooltipText = _this$props3.triggerButtonTooltipText,
|
|
343
|
+
triggerButtonTooltipPosition = _this$props3.triggerButtonTooltipPosition,
|
|
344
|
+
bottomMessage = _this$props3.bottomMessage,
|
|
345
|
+
shareeAction = _this$props3.shareeAction,
|
|
346
|
+
product = _this$props3.product,
|
|
347
|
+
productAttributes = _this$props3.productAttributes,
|
|
348
|
+
customHeader = _this$props3.customHeader,
|
|
349
|
+
customFooter = _this$props3.customFooter,
|
|
350
|
+
onTriggerButtonClick = _this$props3.onTriggerButtonClick,
|
|
351
|
+
onUserSelectionChange = _this$props3.onUserSelectionChange,
|
|
352
|
+
shareFieldsFooter = _this$props3.shareFieldsFooter,
|
|
353
|
+
isCopyDisabled = _this$props3.isCopyDisabled,
|
|
354
|
+
isPublicLink = _this$props3.isPublicLink,
|
|
355
|
+
integrationMode = _this$props3.integrationMode,
|
|
356
|
+
shareIntegrations = _this$props3.shareIntegrations,
|
|
357
|
+
additionalTabs = _this$props3.additionalTabs,
|
|
358
|
+
builtInTabContentWidth = _this$props3.builtInTabContentWidth,
|
|
359
|
+
shareAri = _this$props3.shareAri,
|
|
360
|
+
tabIndex = _this$props3.tabIndex,
|
|
361
|
+
copyTooltipText = _this$props3.copyTooltipText,
|
|
362
|
+
onDialogClose = _this$props3.onDialogClose,
|
|
363
|
+
isBrowseUsersDisabled = _this$props3.isBrowseUsersDisabled,
|
|
364
|
+
userPickerOptions = _this$props3.userPickerOptions,
|
|
365
|
+
isSubmitShareDisabled = _this$props3.isSubmitShareDisabled,
|
|
366
|
+
additionalUserFields = _this$props3.additionalUserFields,
|
|
367
|
+
isExtendedShareDialogEnabled = _this$props3.isExtendedShareDialogEnabled;
|
|
360
368
|
var _this$state = this.state,
|
|
361
369
|
config = _this$state.config,
|
|
362
370
|
isFetchingConfig = _this$state.isFetchingConfig;
|
|
@@ -308,7 +308,8 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
308
308
|
shareIntegrations = _this$props7.shareIntegrations,
|
|
309
309
|
additionalTabs = _this$props7.additionalTabs,
|
|
310
310
|
builtInTabContentWidth = _this$props7.builtInTabContentWidth,
|
|
311
|
-
handleCloseDialog = _this$props7.handleCloseDialog
|
|
311
|
+
handleCloseDialog = _this$props7.handleCloseDialog,
|
|
312
|
+
isExtendedShareDialogEnabled = _this$props7.isExtendedShareDialogEnabled;
|
|
312
313
|
var selectedMenuItem = this.state.selectedMenuItem;
|
|
313
314
|
if (fg('plans_outgoing_mail_fix')) {
|
|
314
315
|
var hasShareIntegrations = shareIntegrations && shareIntegrations.length;
|
|
@@ -353,7 +354,7 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
353
354
|
}
|
|
354
355
|
}
|
|
355
356
|
if (integrationMode === 'tabs') {
|
|
356
|
-
var DEFAULT_TAB_CONTENT_WIDTH = 304;
|
|
357
|
+
var DEFAULT_TAB_CONTENT_WIDTH = isExtendedShareDialogEnabled ? 452 : 304;
|
|
357
358
|
return jsx(Tabs, {
|
|
358
359
|
id: "ShareForm-Tabs-Integrations",
|
|
359
360
|
onChange: this.changeTab,
|
|
@@ -453,7 +454,7 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
453
454
|
})));
|
|
454
455
|
}
|
|
455
456
|
if (integrationMode === 'tabs') {
|
|
456
|
-
var _DEFAULT_TAB_CONTENT_WIDTH = 304;
|
|
457
|
+
var _DEFAULT_TAB_CONTENT_WIDTH = isExtendedShareDialogEnabled ? 452 : 304;
|
|
457
458
|
return jsx(Tabs, {
|
|
458
459
|
id: "ShareForm-Tabs-Integrations",
|
|
459
460
|
onChange: this.changeTab,
|
|
@@ -17,7 +17,9 @@ var ShareFormWrapper = function ShareFormWrapper(_ref) {
|
|
|
17
17
|
_ref$integrationMode = _ref.integrationMode,
|
|
18
18
|
integrationMode = _ref$integrationMode === void 0 ? 'off' : _ref$integrationMode,
|
|
19
19
|
_ref$isMenuItemSelect = _ref.isMenuItemSelected,
|
|
20
|
-
isMenuItemSelected = _ref$isMenuItemSelect === void 0 ? false : _ref$isMenuItemSelect
|
|
20
|
+
isMenuItemSelected = _ref$isMenuItemSelect === void 0 ? false : _ref$isMenuItemSelect,
|
|
21
|
+
_ref$isExtendedShareD = _ref.isExtendedShareDialogEnabled,
|
|
22
|
+
isExtendedShareDialogEnabled = _ref$isExtendedShareD === void 0 ? false : _ref$isExtendedShareD;
|
|
21
23
|
var _useIntl = useIntl(),
|
|
22
24
|
formatMessage = _useIntl.formatMessage;
|
|
23
25
|
var ContentWrapper = fg('share-compiled-migration') ? InlineDialogContentWrapperCompiled : InlineDialogContentWrapper;
|
|
@@ -26,7 +28,8 @@ var ShareFormWrapper = function ShareFormWrapper(_ref) {
|
|
|
26
28
|
label: formatMessage(messages.formTitle)
|
|
27
29
|
}, fg('platform_share_custom_header_prop') && header, /*#__PURE__*/React.createElement(FormWrapper, {
|
|
28
30
|
integrationMode: integrationMode,
|
|
29
|
-
isMenuItemSelected: isMenuItemSelected
|
|
31
|
+
isMenuItemSelected: isMenuItemSelected,
|
|
32
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
30
33
|
}, shouldShowTitle && /*#__PURE__*/React.createElement(ShareHeader, {
|
|
31
34
|
title: shareFormTitle
|
|
32
35
|
}), children), footer);
|
|
@@ -9,12 +9,14 @@ var styles = {
|
|
|
9
9
|
menuNotSelectedAndMenuIntegration: "_1bsbpk3t",
|
|
10
10
|
tabsIntegration: "_1bsb1wug",
|
|
11
11
|
default: "_1bsb1j89",
|
|
12
|
+
extendedDefault: "_1bsb1op3",
|
|
12
13
|
inlineDialogContentWrapper: "_ca0qpxbi _u5f31ejb _n3tdpxbi _19bv1ejb"
|
|
13
14
|
};
|
|
14
15
|
export var InlineDialogFormWrapper = function InlineDialogFormWrapper(_ref) {
|
|
15
16
|
var children = _ref.children,
|
|
16
17
|
integrationMode = _ref.integrationMode,
|
|
17
|
-
isMenuItemSelected = _ref.isMenuItemSelected
|
|
18
|
+
isMenuItemSelected = _ref.isMenuItemSelected,
|
|
19
|
+
isExtendedShareDialogEnabled = _ref.isExtendedShareDialogEnabled;
|
|
18
20
|
if (!isMenuItemSelected && integrationMode === 'menu') {
|
|
19
21
|
return /*#__PURE__*/React.createElement(Box, {
|
|
20
22
|
xcss: cx(styles.menuNotSelectedAndMenuIntegration)
|
|
@@ -28,7 +30,7 @@ export var InlineDialogFormWrapper = function InlineDialogFormWrapper(_ref) {
|
|
|
28
30
|
}
|
|
29
31
|
}
|
|
30
32
|
return /*#__PURE__*/React.createElement(Box, {
|
|
31
|
-
xcss: cx(styles.default)
|
|
33
|
+
xcss: cx(isExtendedShareDialogEnabled ? styles.extendedDefault : styles.default)
|
|
32
34
|
}, children);
|
|
33
35
|
};
|
|
34
36
|
export var InlineDialogContentWrapper = function InlineDialogContentWrapper(_ref2) {
|
|
@@ -15,8 +15,9 @@ import { menuWrapperWidth } from '../ShareMenuItem';
|
|
|
15
15
|
*/
|
|
16
16
|
var calculateFormWrapperWidth = function calculateFormWrapperWidth(_ref) {
|
|
17
17
|
var integrationMode = _ref.integrationMode,
|
|
18
|
-
isMenuItemSelected = _ref.isMenuItemSelected
|
|
19
|
-
|
|
18
|
+
isMenuItemSelected = _ref.isMenuItemSelected,
|
|
19
|
+
isExtendedShareDialogEnabled = _ref.isExtendedShareDialogEnabled;
|
|
20
|
+
var formWidth = "".concat(isExtendedShareDialogEnabled ? 452 : 8 * 44, "px");
|
|
20
21
|
if (!isMenuItemSelected && integrationMode === 'menu') {
|
|
21
22
|
return menuWrapperWidth;
|
|
22
23
|
}
|
|
@@ -30,11 +31,13 @@ var calculateFormWrapperWidth = function calculateFormWrapperWidth(_ref) {
|
|
|
30
31
|
export var InlineDialogFormWrapper = function InlineDialogFormWrapper(_ref2) {
|
|
31
32
|
var children = _ref2.children,
|
|
32
33
|
integrationMode = _ref2.integrationMode,
|
|
33
|
-
isMenuItemSelected = _ref2.isMenuItemSelected
|
|
34
|
+
isMenuItemSelected = _ref2.isMenuItemSelected,
|
|
35
|
+
isExtendedShareDialogEnabled = _ref2.isExtendedShareDialogEnabled;
|
|
34
36
|
var styles = {
|
|
35
37
|
width: calculateFormWrapperWidth({
|
|
36
38
|
integrationMode: integrationMode,
|
|
37
|
-
isMenuItemSelected: isMenuItemSelected
|
|
39
|
+
isMenuItemSelected: isMenuItemSelected,
|
|
40
|
+
isExtendedShareDialogEnabled: isExtendedShareDialogEnabled
|
|
38
41
|
})
|
|
39
42
|
};
|
|
40
43
|
return jsx("div", {
|
|
@@ -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: "6.
|
|
9
|
+
packageVersion: "6.6.1"
|
|
10
10
|
}, attributes);
|
|
11
11
|
};
|
|
12
12
|
var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
|
|
@@ -30,7 +30,7 @@ export declare class ShareDialogContainerInternal extends React.Component<ShareD
|
|
|
30
30
|
componentDidUpdate(prevProps: ShareDialogContainerProps): void;
|
|
31
31
|
private createAndFireEvent;
|
|
32
32
|
fetchConfig: () => void;
|
|
33
|
-
handleSubmitShare: ({ users, comment }: ShareData) => Promise<void>;
|
|
33
|
+
handleSubmitShare: ({ users, comment, ...rest }: ShareData) => Promise<void>;
|
|
34
34
|
handleDialogOpen: () => Promise<void>;
|
|
35
35
|
decorateAnalytics: (payload: AnalyticsEventPayload) => AnalyticsEventPayload;
|
|
36
36
|
getUniqueCopyLinkOriginTracing: import("memoize-one").MemoizedFn<(link: string, originTracingFactory: OriginTracingFactory) => OriginTracing>;
|
|
@@ -51,6 +51,7 @@ export declare const ShareDialogContainer: React.ForwardRefExoticComponent<Omit<
|
|
|
51
51
|
productAttributes?: import("packages/smart-experiences/smart-user-picker/dist/types/types").ProductAttributes | undefined;
|
|
52
52
|
orgId?: string | undefined;
|
|
53
53
|
tabIndex?: number | undefined;
|
|
54
|
+
onSubmit?: ((formValues: ShareData) => void | Promise<void>) | undefined;
|
|
54
55
|
onTriggerButtonClick?: (() => void) | undefined;
|
|
55
56
|
isAutoOpenDialog?: boolean | undefined;
|
|
56
57
|
shouldCloseOnEscapePress?: boolean | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { type ReactNode } from 'react';
|
|
2
2
|
import { type ShareDialogWithTriggerProps } from '../../types';
|
|
3
3
|
import { type IntegrationMode } from '../../types/ShareEntities';
|
|
4
|
-
export type ShareFormWrapperProps = Pick<ShareDialogWithTriggerProps, 'shareFormTitle'> & {
|
|
4
|
+
export type ShareFormWrapperProps = Pick<ShareDialogWithTriggerProps, 'shareFormTitle' | 'isExtendedShareDialogEnabled'> & {
|
|
5
5
|
shouldShowTitle?: boolean;
|
|
6
6
|
children?: ReactNode;
|
|
7
7
|
header?: ReactNode;
|
|
@@ -9,5 +9,5 @@ export type ShareFormWrapperProps = Pick<ShareDialogWithTriggerProps, 'shareForm
|
|
|
9
9
|
integrationMode?: IntegrationMode;
|
|
10
10
|
isMenuItemSelected?: boolean;
|
|
11
11
|
};
|
|
12
|
-
declare const ShareFormWrapper: ({ shareFormTitle, shouldShowTitle, children, header, footer, integrationMode, isMenuItemSelected, }: ShareFormWrapperProps) => React.JSX.Element;
|
|
12
|
+
declare const ShareFormWrapper: ({ shareFormTitle, shouldShowTitle, children, header, footer, integrationMode, isMenuItemSelected, isExtendedShareDialogEnabled, }: ShareFormWrapperProps) => React.JSX.Element;
|
|
13
13
|
export default ShareFormWrapper;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type IntegrationMode } from '../../types/ShareEntities';
|
|
3
|
-
export declare const InlineDialogFormWrapper: ({ children, integrationMode, isMenuItemSelected, }: React.PropsWithChildren<{
|
|
3
|
+
export declare const InlineDialogFormWrapper: ({ children, integrationMode, isMenuItemSelected, isExtendedShareDialogEnabled, }: React.PropsWithChildren<{
|
|
4
4
|
integrationMode?: IntegrationMode | undefined;
|
|
5
5
|
isMenuItemSelected?: boolean | undefined;
|
|
6
|
+
isExtendedShareDialogEnabled?: boolean | undefined;
|
|
6
7
|
}>) => React.JSX.Element;
|
|
7
8
|
export declare const InlineDialogContentWrapper: ({ children, label, }: {
|
|
8
9
|
children: React.ReactNode;
|
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
import { type PropsWithChildren } from 'react';
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
7
|
import { type IntegrationMode } from '../../types/ShareEntities';
|
|
8
|
-
export declare const InlineDialogFormWrapper: ({ children, integrationMode, isMenuItemSelected, }: PropsWithChildren<{
|
|
8
|
+
export declare const InlineDialogFormWrapper: ({ children, integrationMode, isMenuItemSelected, isExtendedShareDialogEnabled, }: PropsWithChildren<{
|
|
9
9
|
integrationMode?: IntegrationMode | undefined;
|
|
10
10
|
isMenuItemSelected?: boolean | undefined;
|
|
11
|
+
isExtendedShareDialogEnabled?: boolean | undefined;
|
|
11
12
|
}>) => jsx.JSX.Element;
|
|
12
13
|
/**
|
|
13
14
|
* Apply the same styling, as previous @atlaskit/inline-dialog had,
|
|
@@ -4,6 +4,7 @@ import type { NewCoreIconProps } from '@atlaskit/icon';
|
|
|
4
4
|
import type { LoadOptions, Props as SmartUserPickerProps, Value } from '@atlaskit/smart-user-picker';
|
|
5
5
|
import type { ShortenRequest, UrlShortenerClient } from '../clients/AtlassianUrlShortenerClient';
|
|
6
6
|
import type { ShareClient } from '../clients/ShareServiceClient';
|
|
7
|
+
import type { ShareData } from '../types';
|
|
7
8
|
import type { Flag } from './Flag';
|
|
8
9
|
import type { OriginTracing, OriginTracingFactory } from './OriginTracing';
|
|
9
10
|
import type { ProductId, ProductName } from './Products';
|
|
@@ -163,4 +164,5 @@ export type ShareDialogContainerProps = {
|
|
|
163
164
|
isSubmitShareDisabled?: boolean;
|
|
164
165
|
isExtendedShareDialogEnabled?: boolean;
|
|
165
166
|
additionalUserFields?: React.ReactNode;
|
|
167
|
+
onSubmit?: (formValues: ShareData) => void | Promise<void>;
|
|
166
168
|
};
|
|
@@ -30,7 +30,7 @@ export declare class ShareDialogContainerInternal extends React.Component<ShareD
|
|
|
30
30
|
componentDidUpdate(prevProps: ShareDialogContainerProps): void;
|
|
31
31
|
private createAndFireEvent;
|
|
32
32
|
fetchConfig: () => void;
|
|
33
|
-
handleSubmitShare: ({ users, comment }: ShareData) => Promise<void>;
|
|
33
|
+
handleSubmitShare: ({ users, comment, ...rest }: ShareData) => Promise<void>;
|
|
34
34
|
handleDialogOpen: () => Promise<void>;
|
|
35
35
|
decorateAnalytics: (payload: AnalyticsEventPayload) => AnalyticsEventPayload;
|
|
36
36
|
getUniqueCopyLinkOriginTracing: import("memoize-one").MemoizedFn<(link: string, originTracingFactory: OriginTracingFactory) => OriginTracing>;
|
|
@@ -51,6 +51,7 @@ export declare const ShareDialogContainer: React.ForwardRefExoticComponent<Omit<
|
|
|
51
51
|
productAttributes?: import("packages/smart-experiences/smart-user-picker/dist/types/types").ProductAttributes | undefined;
|
|
52
52
|
orgId?: string | undefined;
|
|
53
53
|
tabIndex?: number | undefined;
|
|
54
|
+
onSubmit?: ((formValues: ShareData) => void | Promise<void>) | undefined;
|
|
54
55
|
onTriggerButtonClick?: (() => void) | undefined;
|
|
55
56
|
isAutoOpenDialog?: boolean | undefined;
|
|
56
57
|
shouldCloseOnEscapePress?: boolean | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { type ReactNode } from 'react';
|
|
2
2
|
import { type ShareDialogWithTriggerProps } from '../../types';
|
|
3
3
|
import { type IntegrationMode } from '../../types/ShareEntities';
|
|
4
|
-
export type ShareFormWrapperProps = Pick<ShareDialogWithTriggerProps, 'shareFormTitle'> & {
|
|
4
|
+
export type ShareFormWrapperProps = Pick<ShareDialogWithTriggerProps, 'shareFormTitle' | 'isExtendedShareDialogEnabled'> & {
|
|
5
5
|
shouldShowTitle?: boolean;
|
|
6
6
|
children?: ReactNode;
|
|
7
7
|
header?: ReactNode;
|
|
@@ -9,5 +9,5 @@ export type ShareFormWrapperProps = Pick<ShareDialogWithTriggerProps, 'shareForm
|
|
|
9
9
|
integrationMode?: IntegrationMode;
|
|
10
10
|
isMenuItemSelected?: boolean;
|
|
11
11
|
};
|
|
12
|
-
declare const ShareFormWrapper: ({ shareFormTitle, shouldShowTitle, children, header, footer, integrationMode, isMenuItemSelected, }: ShareFormWrapperProps) => React.JSX.Element;
|
|
12
|
+
declare const ShareFormWrapper: ({ shareFormTitle, shouldShowTitle, children, header, footer, integrationMode, isMenuItemSelected, isExtendedShareDialogEnabled, }: ShareFormWrapperProps) => React.JSX.Element;
|
|
13
13
|
export default ShareFormWrapper;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type IntegrationMode } from '../../types/ShareEntities';
|
|
3
|
-
export declare const InlineDialogFormWrapper: ({ children, integrationMode, isMenuItemSelected, }: React.PropsWithChildren<{
|
|
3
|
+
export declare const InlineDialogFormWrapper: ({ children, integrationMode, isMenuItemSelected, isExtendedShareDialogEnabled, }: React.PropsWithChildren<{
|
|
4
4
|
integrationMode?: IntegrationMode | undefined;
|
|
5
5
|
isMenuItemSelected?: boolean | undefined;
|
|
6
|
+
isExtendedShareDialogEnabled?: boolean | undefined;
|
|
6
7
|
}>) => React.JSX.Element;
|
|
7
8
|
export declare const InlineDialogContentWrapper: ({ children, label, }: {
|
|
8
9
|
children: React.ReactNode;
|
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
import { type PropsWithChildren } from 'react';
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
7
|
import { type IntegrationMode } from '../../types/ShareEntities';
|
|
8
|
-
export declare const InlineDialogFormWrapper: ({ children, integrationMode, isMenuItemSelected, }: PropsWithChildren<{
|
|
8
|
+
export declare const InlineDialogFormWrapper: ({ children, integrationMode, isMenuItemSelected, isExtendedShareDialogEnabled, }: PropsWithChildren<{
|
|
9
9
|
integrationMode?: IntegrationMode | undefined;
|
|
10
10
|
isMenuItemSelected?: boolean | undefined;
|
|
11
|
+
isExtendedShareDialogEnabled?: boolean | undefined;
|
|
11
12
|
}>) => jsx.JSX.Element;
|
|
12
13
|
/**
|
|
13
14
|
* Apply the same styling, as previous @atlaskit/inline-dialog had,
|
|
@@ -4,6 +4,7 @@ import type { NewCoreIconProps } from '@atlaskit/icon';
|
|
|
4
4
|
import type { LoadOptions, Props as SmartUserPickerProps, Value } from '@atlaskit/smart-user-picker';
|
|
5
5
|
import type { ShortenRequest, UrlShortenerClient } from '../clients/AtlassianUrlShortenerClient';
|
|
6
6
|
import type { ShareClient } from '../clients/ShareServiceClient';
|
|
7
|
+
import type { ShareData } from '../types';
|
|
7
8
|
import type { Flag } from './Flag';
|
|
8
9
|
import type { OriginTracing, OriginTracingFactory } from './OriginTracing';
|
|
9
10
|
import type { ProductId, ProductName } from './Products';
|
|
@@ -163,4 +164,5 @@ export type ShareDialogContainerProps = {
|
|
|
163
164
|
isSubmitShareDisabled?: boolean;
|
|
164
165
|
isExtendedShareDialogEnabled?: boolean;
|
|
165
166
|
additionalUserFields?: React.ReactNode;
|
|
167
|
+
onSubmit?: (formValues: ShareData) => void | Promise<void>;
|
|
166
168
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/share",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.6.1",
|
|
4
4
|
"description": "Fabric Share Element",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@atlaskit/heading": "^5.2.0",
|
|
47
47
|
"@atlaskit/icon": "^26.1.0",
|
|
48
48
|
"@atlaskit/link": "^3.2.0",
|
|
49
|
-
"@atlaskit/menu": "^
|
|
49
|
+
"@atlaskit/menu": "^8.0.0",
|
|
50
50
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
51
51
|
"@atlaskit/popper": "^7.0.0",
|
|
52
52
|
"@atlaskit/popup": "^4.2.0",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@atlaskit/tokens": "^4.9.0",
|
|
61
61
|
"@atlaskit/tooltip": "^20.0.0",
|
|
62
62
|
"@atlaskit/ufo": "^0.4.0",
|
|
63
|
-
"@atlaskit/user-picker": "^11.
|
|
63
|
+
"@atlaskit/user-picker": "^11.1.0",
|
|
64
64
|
"@atlaskit/util-service-support": "^6.3.0",
|
|
65
65
|
"@babel/runtime": "^7.0.0",
|
|
66
66
|
"@emotion/react": "^11.7.1",
|