@atlaskit/share 0.29.0 → 0.31.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 +25 -0
- package/dist/cjs/clients/ShareServiceClient.js +0 -23
- package/dist/cjs/components/CopyLinkButton.js +24 -13
- package/dist/cjs/components/ShareDialogContainer.js +10 -44
- package/dist/cjs/components/ShareDialogWithTrigger.js +28 -41
- package/dist/cjs/components/ShareForm.js +6 -12
- package/dist/cjs/components/ShareHeader.js +1 -3
- package/dist/cjs/components/UserPickerField.js +18 -52
- package/dist/cjs/components/analytics.js +4 -4
- package/dist/cjs/components/styles.js +2 -4
- package/dist/cjs/components/utils.js +4 -136
- package/dist/cjs/i18n/en_ZZ.js +45 -0
- package/dist/cjs/i18n/index.js +58 -50
- package/dist/cjs/i18n.js +2 -22
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/clients/ShareServiceClient.js +0 -22
- package/dist/es2019/components/CopyLinkButton.js +25 -11
- package/dist/es2019/components/ShareDialogContainer.js +8 -43
- package/dist/es2019/components/ShareDialogWithTrigger.js +27 -39
- package/dist/es2019/components/ShareForm.js +6 -11
- package/dist/es2019/components/ShareHeader.js +3 -4
- package/dist/es2019/components/UserPickerField.js +18 -51
- package/dist/es2019/components/analytics.js +3 -3
- package/dist/es2019/components/styles.js +2 -3
- package/dist/es2019/components/utils.js +2 -95
- package/dist/es2019/i18n/en_ZZ.js +37 -0
- package/dist/es2019/i18n/index.js +10 -9
- package/dist/es2019/i18n.js +2 -22
- package/dist/es2019/version.json +1 -1
- package/dist/esm/clients/ShareServiceClient.js +0 -23
- package/dist/esm/components/CopyLinkButton.js +24 -13
- package/dist/esm/components/ShareDialogContainer.js +9 -43
- package/dist/esm/components/ShareDialogWithTrigger.js +30 -43
- package/dist/esm/components/ShareForm.js +6 -11
- package/dist/esm/components/ShareHeader.js +1 -2
- package/dist/esm/components/UserPickerField.js +19 -53
- package/dist/esm/components/analytics.js +4 -4
- package/dist/esm/components/styles.js +2 -3
- package/dist/esm/components/utils.js +3 -125
- package/dist/esm/i18n/en_ZZ.js +37 -0
- package/dist/esm/i18n/index.js +10 -9
- package/dist/esm/i18n.js +2 -22
- package/dist/esm/version.json +1 -1
- package/dist/types/clients/ShareServiceClient.d.ts +1 -13
- package/dist/types/components/CopyLinkButton.d.ts +3 -0
- package/dist/types/components/ShareDialogContainer.d.ts +6 -14
- package/dist/types/components/ShareDialogWithTrigger.d.ts +4 -5
- package/dist/types/components/ShareForm.d.ts +3 -5
- package/dist/types/components/UserPickerField.d.ts +1 -5
- package/dist/types/components/analytics.d.ts +2 -2
- package/dist/types/components/styles.d.ts +1 -1
- package/dist/types/components/utils.d.ts +2 -23
- package/dist/types/i18n/en_ZZ.d.ts +37 -0
- package/dist/types/i18n/index.d.ts +10 -9
- package/dist/types/i18n.d.ts +2 -22
- package/dist/types/index.d.ts +1 -1
- package/dist/types/types/index.d.ts +1 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @atlaskit/share
|
|
2
2
|
|
|
3
|
+
## 0.31.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`b85e7ce12cd`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b85e7ce12cd) - Internal upgrade of memoize-one to 6.0.0
|
|
8
|
+
|
|
9
|
+
## 0.31.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`ac8d6861881`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ac8d6861881) - [ux] expose copyTooltipText and onDialogClose props to share component
|
|
14
|
+
|
|
15
|
+
## 0.30.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- [`bc36730eba5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/bc36730eba5) - remove disableInviteCapabilities prop for Share components
|
|
20
|
+
|
|
21
|
+
## 0.29.1
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- [`cf853e39278`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cf853e39278) - Internal changes to remove `@atlaskit/theme/math` usage.
|
|
26
|
+
- Updated dependencies
|
|
27
|
+
|
|
3
28
|
## 0.29.0
|
|
4
29
|
|
|
5
30
|
### Minor Changes
|
|
@@ -19,7 +19,6 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
19
19
|
|
|
20
20
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
21
21
|
|
|
22
|
-
// show direct invite info message if email options
|
|
23
22
|
var DEFAULT_SHARE_PATH = 'share';
|
|
24
23
|
exports.DEFAULT_SHARE_PATH = DEFAULT_SHARE_PATH;
|
|
25
24
|
var SHARE_CONFIG_PATH = 'share/config';
|
|
@@ -59,28 +58,6 @@ var ShareServiceClient = /*#__PURE__*/function () {
|
|
|
59
58
|
};
|
|
60
59
|
return _utilServiceSupport.utils.requestService(this.serviceConfig, options);
|
|
61
60
|
}
|
|
62
|
-
}, {
|
|
63
|
-
key: "getConfig",
|
|
64
|
-
value: function getConfig(product, cloudId) {
|
|
65
|
-
if (this.serviceConfig.disableInviteCapabilities) {
|
|
66
|
-
return Promise.resolve({
|
|
67
|
-
mode: 'ANYONE',
|
|
68
|
-
allowComment: true
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
var options = {
|
|
73
|
-
path: SHARE_CONFIG_PATH,
|
|
74
|
-
queryParams: {
|
|
75
|
-
product: product,
|
|
76
|
-
cloudId: cloudId
|
|
77
|
-
},
|
|
78
|
-
requestInit: {
|
|
79
|
-
method: 'get'
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
return _utilServiceSupport.utils.requestService(this.serviceConfig, options);
|
|
83
|
-
}
|
|
84
61
|
}]);
|
|
85
62
|
return ShareServiceClient;
|
|
86
63
|
}();
|
|
@@ -37,6 +37,8 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
37
37
|
|
|
38
38
|
var _constants = require("@atlaskit/theme/constants");
|
|
39
39
|
|
|
40
|
+
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
41
|
+
|
|
40
42
|
var _react = _interopRequireDefault(require("react"));
|
|
41
43
|
|
|
42
44
|
var _reactIntl = require("react-intl");
|
|
@@ -137,6 +139,21 @@ var CopyLinkButton = /*#__PURE__*/function (_React$Component) {
|
|
|
137
139
|
shouldShowCopiedMessage: false
|
|
138
140
|
});
|
|
139
141
|
});
|
|
142
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderTriggerButton", function (triggerProps) {
|
|
143
|
+
var _this$props = _this.props,
|
|
144
|
+
formatMessage = _this$props.intl.formatMessage,
|
|
145
|
+
isDisabled = _this$props.isDisabled,
|
|
146
|
+
isPublicLink = _this$props.isPublicLink;
|
|
147
|
+
return /*#__PURE__*/_react.default.createElement(_styles.default, (0, _extends2.default)({
|
|
148
|
+
isDisabled: isDisabled,
|
|
149
|
+
appearance: "subtle-link",
|
|
150
|
+
iconBefore: /*#__PURE__*/_react.default.createElement(_linkFilled.default, {
|
|
151
|
+
label: formatMessage(_i18n.messages.copyLinkButtonIconLabel),
|
|
152
|
+
size: "medium"
|
|
153
|
+
}),
|
|
154
|
+
onClick: _this.handleClick
|
|
155
|
+
}, triggerProps), /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, isPublicLink ? _i18n.messages.copyPublicLinkButtonText : _i18n.messages.copyLinkButtonText));
|
|
156
|
+
});
|
|
140
157
|
return _this;
|
|
141
158
|
}
|
|
142
159
|
|
|
@@ -151,10 +168,9 @@ var CopyLinkButton = /*#__PURE__*/function (_React$Component) {
|
|
|
151
168
|
var _this2 = this;
|
|
152
169
|
|
|
153
170
|
var shouldShowCopiedMessage = this.state.shouldShowCopiedMessage;
|
|
154
|
-
var _this$
|
|
155
|
-
formatMessage = _this$
|
|
156
|
-
|
|
157
|
-
isPublicLink = _this$props.isPublicLink;
|
|
171
|
+
var _this$props2 = this.props,
|
|
172
|
+
formatMessage = _this$props2.intl.formatMessage,
|
|
173
|
+
copyTooltipText = _this$props2.copyTooltipText;
|
|
158
174
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(HiddenInput, {
|
|
159
175
|
ref: this.inputRef,
|
|
160
176
|
text: this.props.link
|
|
@@ -170,15 +186,10 @@ var CopyLinkButton = /*#__PURE__*/function (_React$Component) {
|
|
|
170
186
|
onClose: this.handleDismissCopiedMessage,
|
|
171
187
|
placement: "top-start",
|
|
172
188
|
trigger: function trigger(triggerProps) {
|
|
173
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
label: formatMessage(_i18n.messages.copyLinkButtonIconLabel),
|
|
178
|
-
size: "medium"
|
|
179
|
-
}),
|
|
180
|
-
onClick: _this2.handleClick
|
|
181
|
-
}, triggerProps), /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, isPublicLink ? _i18n.messages.copyPublicLinkButtonText : _i18n.messages.copyLinkButtonText));
|
|
189
|
+
return copyTooltipText ? /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
190
|
+
content: copyTooltipText,
|
|
191
|
+
position: "bottom-start"
|
|
192
|
+
}, _this2.renderTriggerButton(triggerProps)) : _this2.renderTriggerButton(triggerProps);
|
|
182
193
|
}
|
|
183
194
|
}));
|
|
184
195
|
}
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.ShareDialogContainer = exports.ShareDialogContainerInternal =
|
|
8
|
+
exports.ShareDialogContainer = exports.ShareDialogContainerInternal = void 0;
|
|
9
9
|
|
|
10
10
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
11
11
|
|
|
@@ -62,11 +62,6 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
62
62
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
63
63
|
|
|
64
64
|
var COPY_LINK_EVENT = (0, _analytics.copyLinkButtonClicked)(0);
|
|
65
|
-
var defaultConfig = {
|
|
66
|
-
mode: 'EXISTING_USERS_ONLY',
|
|
67
|
-
allowComment: false
|
|
68
|
-
};
|
|
69
|
-
exports.defaultConfig = defaultConfig;
|
|
70
65
|
var memoizedFormatCopyLink = (0, _memoizeOne.default)(function (origin, link) {
|
|
71
66
|
return origin.addToUrl(link);
|
|
72
67
|
});
|
|
@@ -101,27 +96,6 @@ var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Component) {
|
|
|
101
96
|
createAnalyticsEvent(payload).fire(_analytics.CHANNEL_ID);
|
|
102
97
|
}
|
|
103
98
|
});
|
|
104
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "fetchConfig", function () {
|
|
105
|
-
_this.setState({
|
|
106
|
-
isFetchingConfig: true
|
|
107
|
-
}, function () {
|
|
108
|
-
_this.shareClient.getConfig(_this.props.productId, _this.props.cloudId).then(function (config) {
|
|
109
|
-
if (_this._isMounted) {
|
|
110
|
-
_this.setState({
|
|
111
|
-
config: config,
|
|
112
|
-
isFetchingConfig: false
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
}).catch(function () {
|
|
116
|
-
if (_this._isMounted) {
|
|
117
|
-
_this.setState({
|
|
118
|
-
config: defaultConfig,
|
|
119
|
-
isFetchingConfig: false
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
});
|
|
124
|
-
});
|
|
125
99
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleSubmitShare", function (_ref) {
|
|
126
100
|
var users = _ref.users,
|
|
127
101
|
comment = _ref.comment;
|
|
@@ -171,12 +145,9 @@ var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Component) {
|
|
|
171
145
|
currentPageUrl: getCurrentPageUrl()
|
|
172
146
|
}, function () {
|
|
173
147
|
_this.updateShortCopyLink();
|
|
174
|
-
});
|
|
175
|
-
|
|
148
|
+
});
|
|
176
149
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
case 3:
|
|
150
|
+
case 2:
|
|
180
151
|
case "end":
|
|
181
152
|
return _context.stop();
|
|
182
153
|
}
|
|
@@ -227,14 +198,10 @@ var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Component) {
|
|
|
227
198
|
return _this.getRawLink();
|
|
228
199
|
});
|
|
229
200
|
(0, _tinyInvariant.default)(!props.client, 'elements/share: Breaking change, please update your props!');
|
|
230
|
-
_this.shareClient = props.shareClient || new _ShareServiceClient.ShareServiceClient(
|
|
231
|
-
disableInviteCapabilities: !!props.disableInviteCapabilities
|
|
232
|
-
});
|
|
201
|
+
_this.shareClient = props.shareClient || new _ShareServiceClient.ShareServiceClient();
|
|
233
202
|
_this.urlShortenerClient = props.urlShortenerClient || new _AtlassianUrlShortenerClient.AtlassianUrlShortenerClient();
|
|
234
203
|
_this.state = {
|
|
235
204
|
shareActionCount: 0,
|
|
236
|
-
config: defaultConfig,
|
|
237
|
-
isFetchingConfig: false,
|
|
238
205
|
currentPageUrl: getCurrentPageUrl(),
|
|
239
206
|
shortenedCopyLink: null
|
|
240
207
|
};
|
|
@@ -385,7 +352,6 @@ var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Component) {
|
|
|
385
352
|
shouldCloseOnEscapePress = _this$props2.shouldCloseOnEscapePress,
|
|
386
353
|
showFlags = _this$props2.showFlags,
|
|
387
354
|
enableSmartUserPicker = _this$props2.enableSmartUserPicker,
|
|
388
|
-
disableInviteCapabilities = _this$props2.disableInviteCapabilities,
|
|
389
355
|
loggedInAccountId = _this$props2.loggedInAccountId,
|
|
390
356
|
triggerButtonAppearance = _this$props2.triggerButtonAppearance,
|
|
391
357
|
triggerButtonIcon = _this$props2.triggerButtonIcon,
|
|
@@ -403,16 +369,15 @@ var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Component) {
|
|
|
403
369
|
isPublicLink = _this$props2.isPublicLink,
|
|
404
370
|
shareIntegrations = _this$props2.shareIntegrations,
|
|
405
371
|
shareAri = _this$props2.shareAri,
|
|
406
|
-
tabIndex = _this$props2.tabIndex
|
|
407
|
-
|
|
372
|
+
tabIndex = _this$props2.tabIndex,
|
|
373
|
+
copyTooltipText = _this$props2.copyTooltipText,
|
|
374
|
+
onDialogClose = _this$props2.onDialogClose;
|
|
408
375
|
return /*#__PURE__*/_react.default.createElement(_ErrorBoundary.default, null, /*#__PURE__*/_react.default.createElement(_MessagesIntlProvider.default, null, /*#__PURE__*/_react.default.createElement(_ShareDialogWithTrigger.ShareDialogWithTrigger, {
|
|
409
376
|
onTriggerButtonClick: onTriggerButtonClick,
|
|
410
377
|
isAutoOpenDialog: isAutoOpenDialog,
|
|
411
|
-
config: this.state.config,
|
|
412
378
|
copyLink: this.getCopyLink(),
|
|
413
379
|
analyticsDecorator: this.decorateAnalytics,
|
|
414
380
|
dialogPlacement: dialogPlacement,
|
|
415
|
-
isFetchingConfig: isFetchingConfig,
|
|
416
381
|
loadUserOptions: loadUserOptions,
|
|
417
382
|
onDialogOpen: this.handleDialogOpen,
|
|
418
383
|
onShareSubmit: this.handleSubmitShare,
|
|
@@ -425,7 +390,6 @@ var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Component) {
|
|
|
425
390
|
shouldCloseOnEscapePress: shouldCloseOnEscapePress,
|
|
426
391
|
showFlags: showFlags,
|
|
427
392
|
enableSmartUserPicker: enableSmartUserPicker,
|
|
428
|
-
disableInviteCapabilities: disableInviteCapabilities,
|
|
429
393
|
loggedInAccountId: loggedInAccountId,
|
|
430
394
|
cloudId: cloudId,
|
|
431
395
|
triggerButtonAppearance: triggerButtonAppearance,
|
|
@@ -443,7 +407,9 @@ var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Component) {
|
|
|
443
407
|
isPublicLink: isPublicLink,
|
|
444
408
|
shareIntegrations: shareIntegrations,
|
|
445
409
|
shareAri: shareAri,
|
|
446
|
-
tabIndex: tabIndex
|
|
410
|
+
tabIndex: tabIndex,
|
|
411
|
+
copyTooltipText: copyTooltipText,
|
|
412
|
+
onDialogClose: onDialogClose
|
|
447
413
|
})));
|
|
448
414
|
}
|
|
449
415
|
}]);
|
|
@@ -125,16 +125,22 @@ var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureComponent
|
|
|
125
125
|
selectedIntegration: null
|
|
126
126
|
});
|
|
127
127
|
|
|
128
|
-
var
|
|
128
|
+
var _this$props = _this.props,
|
|
129
|
+
onUserSelectionChange = _this$props.onUserSelectionChange,
|
|
130
|
+
onDialogClose = _this$props.onDialogClose;
|
|
129
131
|
|
|
130
132
|
if (onUserSelectionChange) {
|
|
131
133
|
onUserSelectionChange(defaultShareContentState.users);
|
|
132
134
|
}
|
|
135
|
+
|
|
136
|
+
if (onDialogClose) {
|
|
137
|
+
onDialogClose();
|
|
138
|
+
}
|
|
133
139
|
});
|
|
134
140
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "createAndFireEvent", function (payload) {
|
|
135
|
-
var _this$
|
|
136
|
-
createAnalyticsEvent = _this$
|
|
137
|
-
analyticsDecorator = _this$
|
|
141
|
+
var _this$props2 = _this.props,
|
|
142
|
+
createAnalyticsEvent = _this$props2.createAnalyticsEvent,
|
|
143
|
+
analyticsDecorator = _this$props2.analyticsDecorator;
|
|
138
144
|
|
|
139
145
|
if (analyticsDecorator) {
|
|
140
146
|
payload = analyticsDecorator(payload);
|
|
@@ -144,26 +150,14 @@ var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureComponent
|
|
|
144
150
|
createAnalyticsEvent(payload).fire(_analytics.CHANNEL_ID);
|
|
145
151
|
}
|
|
146
152
|
});
|
|
147
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getFlags", function (
|
|
148
|
-
var
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
var flags = [];
|
|
154
|
-
var shouldShowAdminNotifiedFlag = (0, _utils.showAdminNotifiedFlag)(config, data.users, isPublicLink, disableInviteCapabilities);
|
|
155
|
-
|
|
156
|
-
if (shouldShowAdminNotifiedFlag) {
|
|
157
|
-
flags.push({
|
|
158
|
-
appearance: 'success',
|
|
159
|
-
title: _objectSpread(_objectSpread({}, _i18n.messages.adminNotifiedMessage), {}, {
|
|
160
|
-
defaultMessage: formatMessage(_i18n.messages.adminNotifiedMessage)
|
|
161
|
-
}),
|
|
162
|
-
type: _types.ADMIN_NOTIFIED
|
|
163
|
-
});
|
|
164
|
-
}
|
|
153
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getFlags", function () {
|
|
154
|
+
var formatMessage = _this.props.intl.formatMessage; // The reason for providing message property is that in jira,
|
|
155
|
+
// the Flag system takes only Message Descriptor as payload
|
|
156
|
+
// and formatMessage is called for every flag
|
|
157
|
+
// if the translation data is not provided, a translated default message
|
|
158
|
+
// will be displayed
|
|
165
159
|
|
|
166
|
-
|
|
160
|
+
return [{
|
|
167
161
|
appearance: 'success',
|
|
168
162
|
title: _objectSpread(_objectSpread({}, _i18n.messages.shareSuccessMessage), {}, {
|
|
169
163
|
defaultMessage: formatMessage(_i18n.messages.shareSuccessMessage, {
|
|
@@ -171,13 +165,7 @@ var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureComponent
|
|
|
171
165
|
})
|
|
172
166
|
}),
|
|
173
167
|
type: _types.OBJECT_SHARED
|
|
174
|
-
}
|
|
175
|
-
// the Flag system takes only Message Descriptor as payload
|
|
176
|
-
// and formatMessage is called for every flag
|
|
177
|
-
// if the translation data is not provided, a translated default message
|
|
178
|
-
// will be displayed
|
|
179
|
-
|
|
180
|
-
return flags;
|
|
168
|
+
}];
|
|
181
169
|
});
|
|
182
170
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleKeyDown", function (event) {
|
|
183
171
|
var isDialogOpen = _this.state.isDialogOpen;
|
|
@@ -255,6 +243,10 @@ var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureComponent
|
|
|
255
243
|
}
|
|
256
244
|
});
|
|
257
245
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleCloseDialog", function () {
|
|
246
|
+
if (_this.props.onDialogClose) {
|
|
247
|
+
_this.props.onDialogClose();
|
|
248
|
+
}
|
|
249
|
+
|
|
258
250
|
_this.setState({
|
|
259
251
|
isDialogOpen: false,
|
|
260
252
|
showIntegrationForm: false,
|
|
@@ -267,7 +259,6 @@ var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureComponent
|
|
|
267
259
|
shareContentType = _this$props4.shareContentType,
|
|
268
260
|
formShareOrigin = _this$props4.formShareOrigin,
|
|
269
261
|
showFlags = _this$props4.showFlags,
|
|
270
|
-
config = _this$props4.config,
|
|
271
262
|
isPublicLink = _this$props4.isPublicLink;
|
|
272
263
|
|
|
273
264
|
if (!onShareSubmit) {
|
|
@@ -278,7 +269,7 @@ var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureComponent
|
|
|
278
269
|
isSharing: true
|
|
279
270
|
});
|
|
280
271
|
|
|
281
|
-
_this.createAndFireEvent((0, _analytics.formShareSubmitted)(_this.start, data, shareContentType, formShareOrigin,
|
|
272
|
+
_this.createAndFireEvent((0, _analytics.formShareSubmitted)(_this.start, data, shareContentType, formShareOrigin, isPublicLink));
|
|
282
273
|
|
|
283
274
|
onShareSubmit(data).then(function () {
|
|
284
275
|
_this.closeAndResetDialog();
|
|
@@ -287,7 +278,7 @@ var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureComponent
|
|
|
287
278
|
isSharing: false
|
|
288
279
|
});
|
|
289
280
|
|
|
290
|
-
showFlags(_this.getFlags(
|
|
281
|
+
showFlags(_this.getFlags());
|
|
291
282
|
}).catch(function (err) {
|
|
292
283
|
_this.setState({
|
|
293
284
|
isSharing: false,
|
|
@@ -434,24 +425,22 @@ var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureComponent
|
|
|
434
425
|
var _this$props7 = this.props,
|
|
435
426
|
copyLink = _this$props7.copyLink,
|
|
436
427
|
dialogPlacement = _this$props7.dialogPlacement,
|
|
437
|
-
isFetchingConfig = _this$props7.isFetchingConfig,
|
|
438
428
|
loadUserOptions = _this$props7.loadUserOptions,
|
|
439
429
|
shareFormTitle = _this$props7.shareFormTitle,
|
|
440
430
|
contentPermissions = _this$props7.contentPermissions,
|
|
441
|
-
config = _this$props7.config,
|
|
442
431
|
bottomMessage = _this$props7.bottomMessage,
|
|
443
432
|
submitButtonLabel = _this$props7.submitButtonLabel,
|
|
444
433
|
product = _this$props7.product,
|
|
445
434
|
customFooter = _this$props7.customFooter,
|
|
446
435
|
enableSmartUserPicker = _this$props7.enableSmartUserPicker,
|
|
447
|
-
disableInviteCapabilities = _this$props7.disableInviteCapabilities,
|
|
448
436
|
loggedInAccountId = _this$props7.loggedInAccountId,
|
|
449
437
|
cloudId = _this$props7.cloudId,
|
|
450
438
|
shareFieldsFooter = _this$props7.shareFieldsFooter,
|
|
451
439
|
onUserSelectionChange = _this$props7.onUserSelectionChange,
|
|
452
440
|
dialogZIndex = _this$props7.dialogZIndex,
|
|
453
441
|
isPublicLink = _this$props7.isPublicLink,
|
|
454
|
-
tabIndex = _this$props7.tabIndex
|
|
442
|
+
tabIndex = _this$props7.tabIndex,
|
|
443
|
+
copyTooltipText = _this$props7.copyTooltipText;
|
|
455
444
|
var style = typeof tabIndex !== 'undefined' && tabIndex >= 0 ? {
|
|
456
445
|
outline: 'none'
|
|
457
446
|
} : undefined; // for performance purposes, we may want to have a loadable content i.e. ShareForm
|
|
@@ -481,19 +470,17 @@ var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureComponent
|
|
|
481
470
|
shareError: shareError,
|
|
482
471
|
onDismiss: _this2.handleFormDismiss,
|
|
483
472
|
defaultValue: defaultValue,
|
|
484
|
-
config: config,
|
|
485
473
|
onLinkCopy: _this2.handleCopyLink,
|
|
486
|
-
isFetchingConfig: isFetchingConfig,
|
|
487
474
|
submitButtonLabel: submitButtonLabel,
|
|
488
475
|
product: product,
|
|
489
476
|
enableSmartUserPicker: enableSmartUserPicker,
|
|
490
|
-
disableInviteCapabilities: disableInviteCapabilities,
|
|
491
477
|
loggedInAccountId: loggedInAccountId,
|
|
492
478
|
cloudId: cloudId,
|
|
493
479
|
onUserSelectionChange: onUserSelectionChange,
|
|
494
480
|
fieldsFooter: shareFieldsFooter,
|
|
495
481
|
selectPortalRef: _this2.selectPortalRef,
|
|
496
|
-
isPublicLink: isPublicLink
|
|
482
|
+
isPublicLink: isPublicLink,
|
|
483
|
+
copyTooltipText: copyTooltipText
|
|
497
484
|
})), bottomMessage ? /*#__PURE__*/_react.default.createElement(BottomMessageWrapper, null, bottomMessage) : null, customFooter && /*#__PURE__*/_react.default.createElement(CustomFooterWrapper, null, customFooter)));
|
|
498
485
|
},
|
|
499
486
|
isOpen: isDialogOpen,
|
|
@@ -35,8 +35,6 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
35
35
|
|
|
36
36
|
var _constants = require("@atlaskit/theme/constants");
|
|
37
37
|
|
|
38
|
-
var _math = require("@atlaskit/theme/math");
|
|
39
|
-
|
|
40
38
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
41
39
|
|
|
42
40
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -69,7 +67,7 @@ var FormWrapper = _styledComponents.default.div(_templateObject3 || (_templateOb
|
|
|
69
67
|
|
|
70
68
|
exports.FormWrapper = FormWrapper;
|
|
71
69
|
|
|
72
|
-
var FormFooter = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n margin-bottom: ", "px;\n display: flex;\n justify-content: flex-start;\n"])),
|
|
70
|
+
var FormFooter = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n margin-bottom: ", "px;\n display: flex;\n justify-content: flex-start;\n"])), _constants.gridSize);
|
|
73
71
|
|
|
74
72
|
exports.FormFooter = FormFooter;
|
|
75
73
|
|
|
@@ -141,19 +139,17 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
141
139
|
onLinkCopy = _this$props3.onLinkCopy,
|
|
142
140
|
copyLink = _this$props3.copyLink,
|
|
143
141
|
defaultValue = _this$props3.defaultValue,
|
|
144
|
-
config = _this$props3.config,
|
|
145
|
-
isFetchingConfig = _this$props3.isFetchingConfig,
|
|
146
142
|
product = _this$props3.product,
|
|
147
143
|
onUserInputChange = _this$props3.onUserInputChange,
|
|
148
144
|
enableSmartUserPicker = _this$props3.enableSmartUserPicker,
|
|
149
|
-
disableInviteCapabilities = _this$props3.disableInviteCapabilities,
|
|
150
145
|
loggedInAccountId = _this$props3.loggedInAccountId,
|
|
151
146
|
cloudId = _this$props3.cloudId,
|
|
152
147
|
onUserSelectionChange = _this$props3.onUserSelectionChange,
|
|
153
148
|
fieldsFooter = _this$props3.fieldsFooter,
|
|
154
149
|
selectPortalRef = _this$props3.selectPortalRef,
|
|
155
150
|
isDisabled = _this$props3.isDisabled,
|
|
156
|
-
isPublicLink = _this$props3.isPublicLink
|
|
151
|
+
isPublicLink = _this$props3.isPublicLink,
|
|
152
|
+
copyTooltipText = _this$props3.copyTooltipText;
|
|
157
153
|
return /*#__PURE__*/_react.default.createElement(FormWrapper, null, /*#__PURE__*/_react.default.createElement("form", formProps, /*#__PURE__*/_react.default.createElement(_ShareHeader.ShareHeader, {
|
|
158
154
|
title: title,
|
|
159
155
|
contentPermissions: contentPermissions
|
|
@@ -162,22 +158,20 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
162
158
|
onChange: onUserSelectionChange,
|
|
163
159
|
loadOptions: loadOptions,
|
|
164
160
|
defaultValue: defaultValue && defaultValue.users,
|
|
165
|
-
config: config,
|
|
166
|
-
isLoading: isFetchingConfig,
|
|
167
161
|
product: product,
|
|
168
162
|
enableSmartUserPicker: enableSmartUserPicker,
|
|
169
|
-
disableInviteCapabilities: disableInviteCapabilities,
|
|
170
163
|
loggedInAccountId: loggedInAccountId,
|
|
171
164
|
cloudId: cloudId,
|
|
172
165
|
selectPortalRef: selectPortalRef,
|
|
173
166
|
isPublicLink: isPublicLink
|
|
174
|
-
})),
|
|
167
|
+
})), /*#__PURE__*/_react.default.createElement(FormField, null, /*#__PURE__*/_react.default.createElement(_CommentField.CommentField, {
|
|
175
168
|
defaultValue: defaultValue && defaultValue.comment
|
|
176
169
|
})), fieldsFooter, /*#__PURE__*/_react.default.createElement(FormFooter, null, /*#__PURE__*/_react.default.createElement(_CopyLinkButton.default, {
|
|
177
170
|
isDisabled: isDisabled,
|
|
178
171
|
onLinkCopy: onLinkCopy,
|
|
179
172
|
link: copyLink,
|
|
180
|
-
isPublicLink: isPublicLink
|
|
173
|
+
isPublicLink: isPublicLink,
|
|
174
|
+
copyTooltipText: copyTooltipText
|
|
181
175
|
}), this.renderSubmitButton())));
|
|
182
176
|
}
|
|
183
177
|
}]);
|
|
@@ -17,8 +17,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
17
17
|
|
|
18
18
|
var _constants = require("@atlaskit/theme/constants");
|
|
19
19
|
|
|
20
|
-
var _math = require("@atlaskit/theme/math");
|
|
21
|
-
|
|
22
20
|
var _typography = require("@atlaskit/theme/typography");
|
|
23
21
|
|
|
24
22
|
var _i18n = require("../i18n");
|
|
@@ -27,7 +25,7 @@ var _templateObject, _templateObject2;
|
|
|
27
25
|
|
|
28
26
|
var HeaderWrapper = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n"])));
|
|
29
27
|
|
|
30
|
-
var FormHeaderTitle = _styledComponents.default.h1(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n line-height: ", "px;\n margin-right: ", "px;\n margin-top: ", "px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n > span {\n font-size: initial;\n }\n"])), _typography.h500, (0,
|
|
28
|
+
var FormHeaderTitle = _styledComponents.default.h1(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n line-height: ", "px;\n margin-right: ", "px;\n margin-top: ", "px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n > span {\n font-size: initial;\n }\n"])), _typography.h500, (0, _constants.gridSize)() * 4, (0, _constants.gridSize)() * 4, (0, _constants.gridSize)() * 4);
|
|
31
29
|
|
|
32
30
|
exports.FormHeaderTitle = FormHeaderTitle;
|
|
33
31
|
|
|
@@ -55,46 +55,32 @@ var validate = function validate(value) {
|
|
|
55
55
|
return value && value instanceof Array && value.length > 0 ? undefined : REQUIRED;
|
|
56
56
|
};
|
|
57
57
|
|
|
58
|
-
var getNoOptionsMessageDescriptor = function getNoOptionsMessageDescriptor(
|
|
58
|
+
var getNoOptionsMessageDescriptor = function getNoOptionsMessageDescriptor(emailValidity, isPublicLink) {
|
|
59
59
|
if (isPublicLink) {
|
|
60
60
|
return _i18n.messages.userPickerExistingUserOnlyNoOptionsMessage;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
case 'EXISTING_USERS_ONLY':
|
|
65
|
-
return _i18n.messages.userPickerExistingUserOnlyNoOptionsMessage;
|
|
66
|
-
|
|
67
|
-
case 'ONLY_DOMAIN_BASED_INVITE':
|
|
68
|
-
if (emailValidity !== 'INVALID') {
|
|
69
|
-
return _i18n.messages.userPickerDomainBasedUserOnlyNoOptionsMessage;
|
|
70
|
-
} else {
|
|
71
|
-
return _i18n.messages.userPickerGenericNoOptionsMessage;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
default:
|
|
75
|
-
return _i18n.messages.userPickerGenericNoOptionsMessage;
|
|
76
|
-
}
|
|
63
|
+
return _i18n.messages.userPickerGenericNoOptionsMessage;
|
|
77
64
|
};
|
|
78
65
|
|
|
79
|
-
var getNoOptionsMessage = function getNoOptionsMessage(
|
|
66
|
+
var getNoOptionsMessage = function getNoOptionsMessage(isPublicLink) {
|
|
80
67
|
return function (_ref) {
|
|
81
68
|
var inputValue = _ref.inputValue;
|
|
82
|
-
return inputValue && inputValue.trim().length > 0 ? /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, (0, _extends2.default)({}, getNoOptionsMessageDescriptor(
|
|
69
|
+
return inputValue && inputValue.trim().length > 0 ? /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, (0, _extends2.default)({}, getNoOptionsMessageDescriptor((0, _userPicker.isValidEmail)(inputValue), isPublicLink), {
|
|
83
70
|
values: {
|
|
84
|
-
inputValue: inputValue
|
|
85
|
-
domains: /*#__PURE__*/_react.default.createElement("strong", null, (config && config.allowedDomains || []).join(', '))
|
|
71
|
+
inputValue: inputValue
|
|
86
72
|
}
|
|
87
73
|
})) : null;
|
|
88
74
|
};
|
|
89
75
|
};
|
|
90
76
|
|
|
91
|
-
var getPlaceHolderMessageDescriptor = function getPlaceHolderMessageDescriptor(
|
|
92
|
-
var product = arguments.length >
|
|
77
|
+
var getPlaceHolderMessageDescriptor = function getPlaceHolderMessageDescriptor() {
|
|
78
|
+
var product = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'confluence';
|
|
93
79
|
var placeholderMessage = {
|
|
94
80
|
jira: _i18n.messages.userPickerGenericPlaceholderJira,
|
|
95
81
|
confluence: _i18n.messages.userPickerGenericPlaceholder
|
|
96
82
|
};
|
|
97
|
-
return
|
|
83
|
+
return placeholderMessage[product];
|
|
98
84
|
};
|
|
99
85
|
|
|
100
86
|
var UserPickerField = /*#__PURE__*/function (_React$Component) {
|
|
@@ -121,33 +107,16 @@ var UserPickerField = /*#__PURE__*/function (_React$Component) {
|
|
|
121
107
|
return [];
|
|
122
108
|
}
|
|
123
109
|
});
|
|
124
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getInviteWarningMessage", function (
|
|
110
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getInviteWarningMessage", function () {
|
|
125
111
|
var _this$props = _this.props,
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
_this$props$isPublicL = _this$props.isPublicLink,
|
|
129
|
-
isPublicLink = _this$props$isPublicL === void 0 ? false : _this$props$isPublicL,
|
|
130
|
-
disableInviteCapabilities = _this$props.disableInviteCapabilities,
|
|
131
|
-
product = _this$props.product;
|
|
132
|
-
var inviteWarningType = (0, _utils.getInviteWarningType)(config, selectedUsers, isPublicLink, disableInviteCapabilities);
|
|
133
|
-
|
|
134
|
-
if (inviteWarningType === 'ADMIN') {
|
|
135
|
-
return infoMessagePendingInvite || /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, _i18n.messages.infoMessagePendingInvite);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
if (inviteWarningType === 'DIRECT') {
|
|
139
|
-
return infoMessageDirectInvite || /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, _i18n.messages.infoMessageDirectInvite);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
if (inviteWarningType === 'NO-INVITE') {
|
|
143
|
-
if (product === 'jira') {
|
|
144
|
-
return /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, _i18n.messages.infoMessageNoInviteJira);
|
|
145
|
-
}
|
|
112
|
+
product = _this$props.product,
|
|
113
|
+
isPublicLink = _this$props.isPublicLink;
|
|
146
114
|
|
|
147
|
-
|
|
115
|
+
if (isPublicLink) {
|
|
116
|
+
return null;
|
|
148
117
|
}
|
|
149
118
|
|
|
150
|
-
return
|
|
119
|
+
return product === 'jira' ? /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, _i18n.messages.infoMessageDefaultJira) : /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, _i18n.messages.infoMessageDefaultConfluence);
|
|
151
120
|
});
|
|
152
121
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleUserPickerTransform", function (event, current) {
|
|
153
122
|
var onChange = _this.props.onChange;
|
|
@@ -169,7 +138,6 @@ var UserPickerField = /*#__PURE__*/function (_React$Component) {
|
|
|
169
138
|
var _this$props2 = this.props,
|
|
170
139
|
defaultValue = _this$props2.defaultValue,
|
|
171
140
|
enableSmartUserPicker = _this$props2.enableSmartUserPicker,
|
|
172
|
-
config = _this$props2.config,
|
|
173
141
|
isLoading = _this$props2.isLoading,
|
|
174
142
|
product = _this$props2.product,
|
|
175
143
|
onInputChange = _this$props2.onInputChange,
|
|
@@ -177,7 +145,6 @@ var UserPickerField = /*#__PURE__*/function (_React$Component) {
|
|
|
177
145
|
cloudId = _this$props2.cloudId,
|
|
178
146
|
selectPortalRef = _this$props2.selectPortalRef,
|
|
179
147
|
isPublicLink = _this$props2.isPublicLink;
|
|
180
|
-
var configMode = config && config.mode || '';
|
|
181
148
|
var requireMessage = {
|
|
182
149
|
jira: _i18n.messages.userPickerRequiredMessageJira,
|
|
183
150
|
confluence: _i18n.messages.userPickerRequiredMessage
|
|
@@ -195,10 +162,9 @@ var UserPickerField = /*#__PURE__*/function (_React$Component) {
|
|
|
195
162
|
loadOptions: this.loadOptions,
|
|
196
163
|
isMulti: true,
|
|
197
164
|
width: '100%',
|
|
198
|
-
placeholder: /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, getPlaceHolderMessageDescriptor(
|
|
199
|
-
allowEmail:
|
|
200
|
-
|
|
201
|
-
noOptionsMessage: getNoOptionsMessage(config, isPublicLink),
|
|
165
|
+
placeholder: /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, getPlaceHolderMessageDescriptor(product)),
|
|
166
|
+
allowEmail: true,
|
|
167
|
+
noOptionsMessage: getNoOptionsMessage(isPublicLink),
|
|
202
168
|
isLoading: isLoading,
|
|
203
169
|
onInputChange: onInputChange,
|
|
204
170
|
maxPickerHeight: _styles.MAX_PICKER_HEIGHT,
|
|
@@ -216,7 +182,7 @@ var UserPickerField = /*#__PURE__*/function (_React$Component) {
|
|
|
216
182
|
error = _ref2.error,
|
|
217
183
|
valid = _ref2.meta.valid;
|
|
218
184
|
|
|
219
|
-
var inviteWarningMessage = _this2.getInviteWarningMessage(
|
|
185
|
+
var inviteWarningMessage = _this2.getInviteWarningMessage();
|
|
220
186
|
|
|
221
187
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, _i18n.messages.userPickerAddMoreMessage, function (addMore) {
|
|
222
188
|
return /*#__PURE__*/_react.default.createElement(UserPickerComponent, (0, _extends2.default)({}, fieldProps, commonPickerProps, smartUserPickerProps, {
|
|
@@ -137,8 +137,8 @@ var copyLinkButtonClicked = function copyLinkButtonClicked(start, shareContentTy
|
|
|
137
137
|
|
|
138
138
|
exports.copyLinkButtonClicked = copyLinkButtonClicked;
|
|
139
139
|
|
|
140
|
-
var formShareSubmitted = function formShareSubmitted(start, data, shareContentType, shareOrigin
|
|
141
|
-
var isPublicLink = arguments.length >
|
|
140
|
+
var formShareSubmitted = function formShareSubmitted(start, data, shareContentType, shareOrigin) {
|
|
141
|
+
var isPublicLink = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
142
142
|
var users = extractIdsByType(data, _userPicker.isUser);
|
|
143
143
|
var teams = extractIdsByType(data, _userPicker.isTeam);
|
|
144
144
|
var teamUserCounts = extractMemberCountsFromTeams(data, _userPicker.isTeam);
|
|
@@ -152,8 +152,8 @@ var formShareSubmitted = function formShareSubmitted(start, data, shareContentTy
|
|
|
152
152
|
users: users,
|
|
153
153
|
teams: teams,
|
|
154
154
|
teamUserCounts: teamUserCounts,
|
|
155
|
-
messageLength:
|
|
156
|
-
isMessageEnabled:
|
|
155
|
+
messageLength: data.comment && data.comment.format === 'plain_text' ? data.comment.value.length : 0,
|
|
156
|
+
isMessageEnabled: true,
|
|
157
157
|
isPublicLink: isPublicLink
|
|
158
158
|
}));
|
|
159
159
|
};
|