@atlaskit/share 3.5.9 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/cjs/components/CopyLinkButton.js +1 -3
- package/dist/cjs/components/IntegrationButton.js +1 -3
- package/dist/cjs/components/LazyShareForm/LazyShareForm.js +15 -4
- package/dist/cjs/components/ShareDialogContainer.js +4 -2
- package/dist/cjs/components/ShareDialogWithTrigger.js +4 -2
- package/dist/cjs/components/ShareForm.js +4 -4
- package/dist/cjs/components/SplitButton.js +1 -3
- package/dist/cjs/components/UserPickerField.js +18 -8
- package/dist/cjs/components/analytics/analytics.js +1 -1
- package/dist/cjs/i18n.js +15 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/CopyLinkButton.js +1 -2
- package/dist/es2019/components/IntegrationButton.js +1 -2
- package/dist/es2019/components/LazyShareForm/LazyShareForm.js +12 -4
- package/dist/es2019/components/ShareDialogContainer.js +4 -2
- package/dist/es2019/components/ShareDialogWithTrigger.js +4 -2
- package/dist/es2019/components/ShareForm.js +4 -3
- package/dist/es2019/components/SplitButton.js +1 -2
- package/dist/es2019/components/UserPickerField.js +18 -9
- package/dist/es2019/components/analytics/analytics.js +1 -1
- package/dist/es2019/i18n.js +15 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/CopyLinkButton.js +1 -2
- package/dist/esm/components/IntegrationButton.js +1 -2
- package/dist/esm/components/LazyShareForm/LazyShareForm.js +12 -4
- package/dist/esm/components/ShareDialogContainer.js +4 -2
- package/dist/esm/components/ShareDialogWithTrigger.js +4 -2
- package/dist/esm/components/ShareForm.js +4 -3
- package/dist/esm/components/SplitButton.js +1 -2
- package/dist/esm/components/UserPickerField.js +18 -8
- package/dist/esm/components/analytics/analytics.js +1 -1
- package/dist/esm/i18n.js +15 -0
- package/dist/esm/version.json +1 -1
- package/dist/types/components/LazyShareForm/LazyShareForm.d.ts +1 -1
- package/dist/types/components/ShareDialogContainer.d.ts +1 -1
- package/dist/types/components/UserPickerField.d.ts +1 -0
- package/dist/types/i18n.d.ts +15 -0
- package/dist/types/types/ShareDialogContainer.d.ts +1 -0
- package/dist/types/types/ShareDialogWithTrigger.d.ts +1 -1
- package/dist/types/types/ShareForm.d.ts +1 -1
- package/package.json +3 -3
- package/report.api.md +2 -0
- package/tmp/api-report-tmp.d.ts +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/share
|
|
2
2
|
|
|
3
|
+
## 3.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`9bd59066a1c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9bd59066a1c) - [ux] Added prop isBrowseUsersDisabled to handle users without permission to search for users and groups
|
|
8
|
+
|
|
9
|
+
## 3.5.10
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`6455cf006b3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6455cf006b3) - Builds for this package now pass through a tokens babel plugin, removing runtime invocations of the tokens() function and improving performance.
|
|
14
|
+
|
|
3
15
|
## 3.5.9
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -39,8 +39,6 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
39
39
|
|
|
40
40
|
var _constants = require("@atlaskit/theme/constants");
|
|
41
41
|
|
|
42
|
-
var _tokens = require("@atlaskit/tokens");
|
|
43
|
-
|
|
44
42
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
45
43
|
|
|
46
44
|
var _styled = require("./ShareFormWrapper/styled");
|
|
@@ -182,7 +180,7 @@ var CopyLinkButton = /*#__PURE__*/function (_React$Component) {
|
|
|
182
180
|
"data-testid": "message-container"
|
|
183
181
|
}, (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_checkCircle.default, {
|
|
184
182
|
label: "",
|
|
185
|
-
primaryColor: (
|
|
183
|
+
primaryColor: "var(--ds-icon-success, ".concat(_colors.G300, ")")
|
|
186
184
|
}), (0, _react2.jsx)("div", {
|
|
187
185
|
css: messageTextStyle
|
|
188
186
|
}, copiedToClipboardText))));
|
|
@@ -19,8 +19,6 @@ var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom
|
|
|
19
19
|
|
|
20
20
|
var _colors = require("@atlaskit/theme/colors");
|
|
21
21
|
|
|
22
|
-
var _tokens = require("@atlaskit/tokens");
|
|
23
|
-
|
|
24
22
|
var _excluded = ["text", "textColor", "IntegrationIcon"];
|
|
25
23
|
|
|
26
24
|
var _templateObject, _templateObject2;
|
|
@@ -36,7 +34,7 @@ var IntegrationButton = function IntegrationButton(props) {
|
|
|
36
34
|
return (0, _react2.jsx)(_customThemeButton.default, restProps, (0, _react2.jsx)("span", {
|
|
37
35
|
css: integrationButtonCopyWrapperStyle,
|
|
38
36
|
style: {
|
|
39
|
-
color: textColor || (
|
|
37
|
+
color: textColor || "var(--ds-text, ".concat(_colors.N500, ")")
|
|
40
38
|
}
|
|
41
39
|
}, (0, _react2.jsx)("span", {
|
|
42
40
|
css: integrationIconWrapperStyle
|
|
@@ -11,10 +11,14 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _react2 = require("@emotion/react");
|
|
13
13
|
|
|
14
|
+
var _reactIntlNext = require("react-intl-next");
|
|
15
|
+
|
|
14
16
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
15
17
|
|
|
16
18
|
var _constants = require("@atlaskit/theme/constants");
|
|
17
19
|
|
|
20
|
+
var _i18n = require("../../i18n");
|
|
21
|
+
|
|
18
22
|
var _analytics = require("../analytics/analytics");
|
|
19
23
|
|
|
20
24
|
var _IntegrationForm = require("../IntegrationForm");
|
|
@@ -23,8 +27,12 @@ var _ShareForm = require("../ShareForm");
|
|
|
23
27
|
|
|
24
28
|
var _ShareFormWrapper = require("../ShareFormWrapper");
|
|
25
29
|
|
|
30
|
+
var _utils = require("../utils");
|
|
31
|
+
|
|
26
32
|
/** @jsx jsx */
|
|
27
33
|
|
|
34
|
+
/** @jsxFrag */
|
|
35
|
+
|
|
28
36
|
/**
|
|
29
37
|
* A Share form content which is lazy-loaded.
|
|
30
38
|
* Make sure this component is not exported inside main entry points `src/index.ts`
|
|
@@ -62,7 +70,8 @@ function LazyShareForm(props) {
|
|
|
62
70
|
shareError = props.shareError,
|
|
63
71
|
defaultValue = props.defaultValue,
|
|
64
72
|
showTitle = props.showTitle,
|
|
65
|
-
orgId = props.orgId
|
|
73
|
+
orgId = props.orgId,
|
|
74
|
+
isBrowseUsersDisabled = props.isBrowseUsersDisabled;
|
|
66
75
|
var footer = (0, _react2.jsx)("div", null, bottomMessage ? (0, _react2.jsx)("div", {
|
|
67
76
|
css: {
|
|
68
77
|
width: "".concat((0, _constants.gridSize)() * 44, "px")
|
|
@@ -77,6 +86,7 @@ function LazyShareForm(props) {
|
|
|
77
86
|
setIsLoading(false);
|
|
78
87
|
});
|
|
79
88
|
|
|
89
|
+
var allowEmail = (0, _utils.allowEmails)(config);
|
|
80
90
|
return (0, _react2.jsx)(_ShareFormWrapper.ShareFormWrapper, {
|
|
81
91
|
footer: footer // form title will be determined by `title` and `showTitle` prop passed to `ShareForm`,
|
|
82
92
|
// so we don't need to show title via ShareFormWrapper
|
|
@@ -89,7 +99,7 @@ function LazyShareForm(props) {
|
|
|
89
99
|
}, (0, _react2.jsx)(_IntegrationForm.IntegrationForm, {
|
|
90
100
|
Content: selectedIntegration.Content,
|
|
91
101
|
onIntegrationClose: onDialogClose
|
|
92
|
-
})) : (0, _react2.jsx)(_ShareForm.ShareForm, {
|
|
102
|
+
})) : (0, _react2.jsx)(_react.default.Fragment, null, allowEmail || !isBrowseUsersDisabled ? (0, _react2.jsx)(_ShareForm.ShareForm, {
|
|
93
103
|
copyLink: copyLink,
|
|
94
104
|
loadOptions: loadOptions,
|
|
95
105
|
title: shareFormTitle,
|
|
@@ -117,8 +127,9 @@ function LazyShareForm(props) {
|
|
|
117
127
|
onLinkCopy: onLinkCopy,
|
|
118
128
|
onUserSelectionChange: onUserSelectionChange,
|
|
119
129
|
handleCloseDialog: onDialogClose,
|
|
120
|
-
onTabChange: onTabChange
|
|
121
|
-
|
|
130
|
+
onTabChange: onTabChange,
|
|
131
|
+
isBrowseUsersDisabled: isBrowseUsersDisabled
|
|
132
|
+
}) : (0, _react2.jsx)("p", null, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _i18n.messages.formNoPermissions))));
|
|
122
133
|
}
|
|
123
134
|
|
|
124
135
|
var _default = LazyShareForm;
|
|
@@ -449,7 +449,8 @@ var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Component) {
|
|
|
449
449
|
shareAri = _this$props2.shareAri,
|
|
450
450
|
tabIndex = _this$props2.tabIndex,
|
|
451
451
|
copyTooltipText = _this$props2.copyTooltipText,
|
|
452
|
-
onDialogClose = _this$props2.onDialogClose
|
|
452
|
+
onDialogClose = _this$props2.onDialogClose,
|
|
453
|
+
isBrowseUsersDisabled = _this$props2.isBrowseUsersDisabled;
|
|
453
454
|
var _this$state = this.state,
|
|
454
455
|
config = _this$state.config,
|
|
455
456
|
isFetchingConfig = _this$state.isFetchingConfig;
|
|
@@ -494,7 +495,8 @@ var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Component) {
|
|
|
494
495
|
shareAri: shareAri,
|
|
495
496
|
tabIndex: tabIndex,
|
|
496
497
|
copyTooltipText: copyTooltipText,
|
|
497
|
-
onDialogClose: onDialogClose
|
|
498
|
+
onDialogClose: onDialogClose,
|
|
499
|
+
isBrowseUsersDisabled: isBrowseUsersDisabled
|
|
498
500
|
})));
|
|
499
501
|
}
|
|
500
502
|
}]);
|
|
@@ -488,7 +488,8 @@ var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureComponent
|
|
|
488
488
|
tabIndex = _this$props7.tabIndex,
|
|
489
489
|
copyTooltipText = _this$props7.copyTooltipText,
|
|
490
490
|
integrationMode = _this$props7.integrationMode,
|
|
491
|
-
shareIntegrations = _this$props7.shareIntegrations
|
|
491
|
+
shareIntegrations = _this$props7.shareIntegrations,
|
|
492
|
+
isBrowseUsersDisabled = _this$props7.isBrowseUsersDisabled;
|
|
492
493
|
var style = typeof tabIndex !== 'undefined' && tabIndex >= 0 ? {
|
|
493
494
|
outline: 'none'
|
|
494
495
|
} : undefined;
|
|
@@ -539,7 +540,8 @@ var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureComponent
|
|
|
539
540
|
onDialogClose: _this2.handleCloseDialog,
|
|
540
541
|
onTabChange: _this2.onTabChange //ref
|
|
541
542
|
,
|
|
542
|
-
selectPortalRef: _this2.selectPortalRef
|
|
543
|
+
selectPortalRef: _this2.selectPortalRef,
|
|
544
|
+
isBrowseUsersDisabled: isBrowseUsersDisabled
|
|
543
545
|
}));
|
|
544
546
|
},
|
|
545
547
|
isOpen: isDialogOpen,
|
|
@@ -47,8 +47,6 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
47
47
|
|
|
48
48
|
var _constants = require("@atlaskit/theme/constants");
|
|
49
49
|
|
|
50
|
-
var _tokens = require("@atlaskit/tokens");
|
|
51
|
-
|
|
52
50
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
53
51
|
|
|
54
52
|
var _i18n = require("../i18n");
|
|
@@ -143,6 +141,7 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
143
141
|
copyTooltipText = _this$props.copyTooltipText,
|
|
144
142
|
helperMessage = _this$props.helperMessage,
|
|
145
143
|
orgId = _this$props.orgId,
|
|
144
|
+
isBrowseUsersDisabled = _this$props.isBrowseUsersDisabled,
|
|
146
145
|
formatMessage = _this$props.intl.formatMessage;
|
|
147
146
|
return (0, _react2.jsx)(_analyticsNext.AnalyticsContext, {
|
|
148
147
|
data: {
|
|
@@ -166,7 +165,8 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
166
165
|
selectPortalRef: selectPortalRef,
|
|
167
166
|
isPublicLink: isPublicLink,
|
|
168
167
|
helperMessage: helperMessage,
|
|
169
|
-
orgId: orgId
|
|
168
|
+
orgId: orgId,
|
|
169
|
+
isBrowseUsersDisabled: isBrowseUsersDisabled
|
|
170
170
|
})), (0, _react2.jsx)("div", {
|
|
171
171
|
css: formFieldStyles
|
|
172
172
|
}, (0, _react2.jsx)(_CommentField.CommentField, {
|
|
@@ -209,7 +209,7 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
209
209
|
position: "top"
|
|
210
210
|
}, (0, _react2.jsx)(_error.default, {
|
|
211
211
|
label: formatMessage(_i18n.messages.shareFailureIconLabel),
|
|
212
|
-
primaryColor: (
|
|
212
|
+
primaryColor: "var(--ds-icon-danger, ".concat(_colors.R400, ")")
|
|
213
213
|
}))), (0, _react2.jsx)(_customThemeButton.default, {
|
|
214
214
|
appearance: buttonAppearance,
|
|
215
215
|
type: "submit",
|
|
@@ -31,8 +31,6 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
31
31
|
|
|
32
32
|
var _constants = require("@atlaskit/theme/constants");
|
|
33
33
|
|
|
34
|
-
var _tokens = require("@atlaskit/tokens");
|
|
35
|
-
|
|
36
34
|
var _i18n = require("../i18n");
|
|
37
35
|
|
|
38
36
|
var _analytics = require("./analytics/analytics");
|
|
@@ -106,7 +104,7 @@ var SplitButtonDropdown = function SplitButtonDropdown(props) {
|
|
|
106
104
|
}, (0, _react2.jsx)("span", {
|
|
107
105
|
css: dropDownIntegrationButtonWrapperStyles
|
|
108
106
|
}, (0, _react2.jsx)(_IntegrationButton.default, {
|
|
109
|
-
textColor: (
|
|
107
|
+
textColor: "var(--ds-text, ".concat(_colors.N800, ")"),
|
|
110
108
|
appearance: "subtle",
|
|
111
109
|
onClick: function onClick() {
|
|
112
110
|
return onIntegrationButtonClick(integration);
|
|
@@ -79,6 +79,7 @@ var getNoOptionsMessage = function getNoOptionsMessage(isPublicLink, allowEmail)
|
|
|
79
79
|
var getPlaceHolderMessageDescriptor = function getPlaceHolderMessageDescriptor() {
|
|
80
80
|
var product = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'confluence';
|
|
81
81
|
var allowEmail = arguments.length > 1 ? arguments[1] : undefined;
|
|
82
|
+
var isBrowseUsersDisabled = arguments.length > 2 ? arguments[2] : undefined;
|
|
82
83
|
|
|
83
84
|
if (!allowEmail) {
|
|
84
85
|
var _placeholderMessage = {
|
|
@@ -88,6 +89,10 @@ var getPlaceHolderMessageDescriptor = function getPlaceHolderMessageDescriptor()
|
|
|
88
89
|
return _placeholderMessage[product];
|
|
89
90
|
}
|
|
90
91
|
|
|
92
|
+
if (isBrowseUsersDisabled) {
|
|
93
|
+
return _i18n.messages.userPickerGenericEmailOnlyPlaceholder;
|
|
94
|
+
}
|
|
95
|
+
|
|
91
96
|
var placeholderMessage = {
|
|
92
97
|
jira: _i18n.messages.userPickerGenericPlaceholderJira,
|
|
93
98
|
confluence: _i18n.messages.userPickerGenericPlaceholder
|
|
@@ -104,9 +109,13 @@ var requiredMessagesWithoutEmail = {
|
|
|
104
109
|
jira: _i18n.messages.userPickerRequiredExistingUserOnlyMessageJira
|
|
105
110
|
};
|
|
106
111
|
|
|
107
|
-
var getRequiredMessage = function getRequiredMessage(product, allowEmail) {
|
|
108
|
-
|
|
109
|
-
|
|
112
|
+
var getRequiredMessage = function getRequiredMessage(product, allowEmail, isBrowseUsersDisabled) {
|
|
113
|
+
if (isBrowseUsersDisabled) {
|
|
114
|
+
return _i18n.messages.userPickerRequiredMessageEmailOnly;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
var emailMessages = allowEmail ? requiredMessagesWithEmail : requiredMessagesWithoutEmail;
|
|
118
|
+
return emailMessages[product];
|
|
110
119
|
}; // eslint-disable-next-line @repo/internal/react/no-class-components
|
|
111
120
|
|
|
112
121
|
|
|
@@ -179,8 +188,9 @@ var UserPickerFieldComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
179
188
|
cloudId = _this$props2.cloudId,
|
|
180
189
|
selectPortalRef = _this$props2.selectPortalRef,
|
|
181
190
|
isPublicLink = _this$props2.isPublicLink,
|
|
182
|
-
orgId = _this$props2.orgId
|
|
183
|
-
|
|
191
|
+
orgId = _this$props2.orgId,
|
|
192
|
+
isBrowseUsersDisabled = _this$props2.isBrowseUsersDisabled;
|
|
193
|
+
var smartUserPickerProps = enableSmartUserPicker && !isBrowseUsersDisabled ? {
|
|
184
194
|
productKey: product,
|
|
185
195
|
principalId: loggedInAccountId,
|
|
186
196
|
siteId: cloudId || '',
|
|
@@ -190,13 +200,13 @@ var UserPickerFieldComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
190
200
|
orgId: orgId
|
|
191
201
|
} : {};
|
|
192
202
|
var allowEmail = (0, _utils.allowEmails)(config);
|
|
193
|
-
var requiredMessage = getRequiredMessage(product, allowEmail);
|
|
203
|
+
var requiredMessage = getRequiredMessage(product, allowEmail, isBrowseUsersDisabled);
|
|
194
204
|
var commonPickerProps = {
|
|
195
205
|
fieldId: 'share',
|
|
196
206
|
loadOptions: this.loadOptions,
|
|
197
207
|
isMulti: true,
|
|
198
208
|
width: '100%',
|
|
199
|
-
placeholder: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, getPlaceHolderMessageDescriptor(product, allowEmail)),
|
|
209
|
+
placeholder: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, getPlaceHolderMessageDescriptor(product, allowEmail, isBrowseUsersDisabled)),
|
|
200
210
|
allowEmail: allowEmail,
|
|
201
211
|
noOptionsMessage: getNoOptionsMessage(isPublicLink, allowEmail),
|
|
202
212
|
isLoading: isLoading,
|
|
@@ -204,7 +214,7 @@ var UserPickerFieldComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
204
214
|
maxPickerHeight: _styles.MAX_PICKER_HEIGHT,
|
|
205
215
|
textFieldBackgroundColor: true
|
|
206
216
|
};
|
|
207
|
-
var UserPickerComponent = enableSmartUserPicker ? _smartUserPicker.default : _userPicker.default;
|
|
217
|
+
var UserPickerComponent = enableSmartUserPicker && !isBrowseUsersDisabled ? _smartUserPicker.default : _userPicker.default;
|
|
208
218
|
var menuPortalTarget = (0, _utils.getMenuPortalTargetCurrentHTML)(selectPortalRef);
|
|
209
219
|
return /*#__PURE__*/_react.default.createElement(_form.Field, {
|
|
210
220
|
name: "users",
|
|
@@ -19,7 +19,7 @@ var buildAttributes = function buildAttributes() {
|
|
|
19
19
|
var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
20
20
|
return _objectSpread({
|
|
21
21
|
packageName: "@atlaskit/share",
|
|
22
|
-
packageVersion: "3.
|
|
22
|
+
packageVersion: "3.6.0"
|
|
23
23
|
}, attributes);
|
|
24
24
|
};
|
|
25
25
|
|
package/dist/cjs/i18n.js
CHANGED
|
@@ -38,6 +38,11 @@ var messages = (0, _reactIntlNext.defineMessages)({
|
|
|
38
38
|
defaultMessage: 'Retry',
|
|
39
39
|
description: 'Label for Share from retry button.'
|
|
40
40
|
},
|
|
41
|
+
formNoPermissions: {
|
|
42
|
+
id: 'fabric.elements.share.form.no-permissions',
|
|
43
|
+
defaultMessage: 'You do not have the ability to share.',
|
|
44
|
+
description: 'Copy to show when a user can not share.'
|
|
45
|
+
},
|
|
41
46
|
commentPlaceholder: {
|
|
42
47
|
id: 'fabric.elements.share.form.comment.placeholder',
|
|
43
48
|
defaultMessage: 'Add a message',
|
|
@@ -63,6 +68,11 @@ var messages = (0, _reactIntlNext.defineMessages)({
|
|
|
63
68
|
defaultMessage: 'Enter name or team',
|
|
64
69
|
description: 'Existing user only placeholder for the user picker field in Share form.'
|
|
65
70
|
},
|
|
71
|
+
userPickerGenericEmailOnlyPlaceholder: {
|
|
72
|
+
id: 'fabric.elements.share.form.user-picker.placeholder.emailOnly',
|
|
73
|
+
defaultMessage: 'Enter email',
|
|
74
|
+
description: 'Email only placeholder for the user picker field in Share form.'
|
|
75
|
+
},
|
|
66
76
|
userPickerAddMoreMessage: {
|
|
67
77
|
id: 'fabric.elements.share.form.user-picker.add-more',
|
|
68
78
|
defaultMessage: 'Enter more',
|
|
@@ -78,6 +88,11 @@ var messages = (0, _reactIntlNext.defineMessages)({
|
|
|
78
88
|
defaultMessage: 'Select at least one user, team or email.',
|
|
79
89
|
description: 'Required error message for the user picker field in Share form. ' + 'This message is used only for Jira product because Jira does not have Group concept.'
|
|
80
90
|
},
|
|
91
|
+
userPickerRequiredMessageEmailOnly: {
|
|
92
|
+
id: 'fabric.elements.share.form.user-picker.validation.required.email-only',
|
|
93
|
+
defaultMessage: 'Select at least one email.',
|
|
94
|
+
description: 'Required error message for the user picker field when email only enabled in Share form. ' + 'This message is used for both jira and confluence.'
|
|
95
|
+
},
|
|
81
96
|
userPickerRequiredExistingUserOnlyMessage: {
|
|
82
97
|
id: 'fabric.elements.share.form.user-picker.validation.required.existingUserOnly',
|
|
83
98
|
defaultMessage: 'Select at least one user, group or team.',
|
package/dist/cjs/version.json
CHANGED
|
@@ -9,7 +9,6 @@ import LinkFilledIcon from '@atlaskit/icon/glyph/link-filled';
|
|
|
9
9
|
import Popup from '@atlaskit/popup';
|
|
10
10
|
import { G300 } from '@atlaskit/theme/colors';
|
|
11
11
|
import { layers } from '@atlaskit/theme/constants';
|
|
12
|
-
import { token } from '@atlaskit/tokens';
|
|
13
12
|
import Tooltip from '@atlaskit/tooltip';
|
|
14
13
|
import { InlineDialogContentWrapper } from './ShareFormWrapper/styled';
|
|
15
14
|
import Button from './styles';
|
|
@@ -127,7 +126,7 @@ export class CopyLinkButton extends React.Component {
|
|
|
127
126
|
"data-testid": "message-container"
|
|
128
127
|
}, jsx(React.Fragment, null, jsx(CheckCircleIcon, {
|
|
129
128
|
label: "",
|
|
130
|
-
primaryColor:
|
|
129
|
+
primaryColor: `var(--ds-icon-success, ${G300})`
|
|
131
130
|
}), jsx("div", {
|
|
132
131
|
css: messageTextStyle
|
|
133
132
|
}, copiedToClipboardText)))),
|
|
@@ -3,7 +3,6 @@ import React from 'react';
|
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
5
5
|
import { N500 } from '@atlaskit/theme/colors';
|
|
6
|
-
import { token } from '@atlaskit/tokens';
|
|
7
6
|
const integrationButtonCopyWrapperStyle = css`
|
|
8
7
|
display: flex;
|
|
9
8
|
justify-content: left;
|
|
@@ -22,7 +21,7 @@ const IntegrationButton = props => {
|
|
|
22
21
|
return jsx(Button, restProps, jsx("span", {
|
|
23
22
|
css: integrationButtonCopyWrapperStyle,
|
|
24
23
|
style: {
|
|
25
|
-
color: textColor ||
|
|
24
|
+
color: textColor || `var(--ds-text, ${N500})`
|
|
26
25
|
}
|
|
27
26
|
}, jsx("span", {
|
|
28
27
|
css: integrationIconWrapperStyle
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
+
|
|
3
|
+
/** @jsxFrag */
|
|
2
4
|
import React from 'react';
|
|
3
5
|
import { jsx } from '@emotion/react';
|
|
6
|
+
import { FormattedMessage } from 'react-intl-next';
|
|
4
7
|
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
5
8
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
9
|
+
import { messages } from '../../i18n';
|
|
6
10
|
import { INTEGRATION_MODAL_SOURCE } from '../analytics/analytics';
|
|
7
11
|
import { IntegrationForm } from '../IntegrationForm';
|
|
8
12
|
import { ShareForm } from '../ShareForm';
|
|
9
13
|
import { ShareFormWrapper } from '../ShareFormWrapper';
|
|
14
|
+
import { allowEmails } from '../utils';
|
|
10
15
|
|
|
11
16
|
/**
|
|
12
17
|
* A Share form content which is lazy-loaded.
|
|
@@ -49,7 +54,8 @@ function LazyShareForm(props) {
|
|
|
49
54
|
shareError,
|
|
50
55
|
defaultValue,
|
|
51
56
|
showTitle,
|
|
52
|
-
orgId
|
|
57
|
+
orgId,
|
|
58
|
+
isBrowseUsersDisabled
|
|
53
59
|
} = props;
|
|
54
60
|
const footer = jsx("div", null, bottomMessage ? jsx("div", {
|
|
55
61
|
css: {
|
|
@@ -63,6 +69,7 @@ function LazyShareForm(props) {
|
|
|
63
69
|
React.useEffect(() => {
|
|
64
70
|
setIsLoading(false);
|
|
65
71
|
});
|
|
72
|
+
const allowEmail = allowEmails(config);
|
|
66
73
|
return jsx(ShareFormWrapper, {
|
|
67
74
|
footer: footer // form title will be determined by `title` and `showTitle` prop passed to `ShareForm`,
|
|
68
75
|
// so we don't need to show title via ShareFormWrapper
|
|
@@ -75,7 +82,7 @@ function LazyShareForm(props) {
|
|
|
75
82
|
}, jsx(IntegrationForm, {
|
|
76
83
|
Content: selectedIntegration.Content,
|
|
77
84
|
onIntegrationClose: onDialogClose
|
|
78
|
-
})) : jsx(ShareForm, {
|
|
85
|
+
})) : jsx(React.Fragment, null, allowEmail || !isBrowseUsersDisabled ? jsx(ShareForm, {
|
|
79
86
|
copyLink: copyLink,
|
|
80
87
|
loadOptions: loadOptions,
|
|
81
88
|
title: shareFormTitle,
|
|
@@ -103,8 +110,9 @@ function LazyShareForm(props) {
|
|
|
103
110
|
onLinkCopy: onLinkCopy,
|
|
104
111
|
onUserSelectionChange: onUserSelectionChange,
|
|
105
112
|
handleCloseDialog: onDialogClose,
|
|
106
|
-
onTabChange: onTabChange
|
|
107
|
-
|
|
113
|
+
onTabChange: onTabChange,
|
|
114
|
+
isBrowseUsersDisabled: isBrowseUsersDisabled
|
|
115
|
+
}) : jsx("p", null, jsx(FormattedMessage, messages.formNoPermissions))));
|
|
108
116
|
}
|
|
109
117
|
|
|
110
118
|
export default LazyShareForm;
|
|
@@ -355,7 +355,8 @@ export class ShareDialogContainerInternal extends React.Component {
|
|
|
355
355
|
shareAri,
|
|
356
356
|
tabIndex,
|
|
357
357
|
copyTooltipText,
|
|
358
|
-
onDialogClose
|
|
358
|
+
onDialogClose,
|
|
359
|
+
isBrowseUsersDisabled
|
|
359
360
|
} = this.props;
|
|
360
361
|
const {
|
|
361
362
|
config,
|
|
@@ -402,7 +403,8 @@ export class ShareDialogContainerInternal extends React.Component {
|
|
|
402
403
|
shareAri: shareAri,
|
|
403
404
|
tabIndex: tabIndex,
|
|
404
405
|
copyTooltipText: copyTooltipText,
|
|
405
|
-
onDialogClose: onDialogClose
|
|
406
|
+
onDialogClose: onDialogClose,
|
|
407
|
+
isBrowseUsersDisabled: isBrowseUsersDisabled
|
|
406
408
|
})));
|
|
407
409
|
}
|
|
408
410
|
|
|
@@ -441,7 +441,8 @@ export class ShareDialogWithTriggerInternal extends React.PureComponent {
|
|
|
441
441
|
tabIndex,
|
|
442
442
|
copyTooltipText,
|
|
443
443
|
integrationMode,
|
|
444
|
-
shareIntegrations
|
|
444
|
+
shareIntegrations,
|
|
445
|
+
isBrowseUsersDisabled
|
|
445
446
|
} = this.props;
|
|
446
447
|
const style = typeof tabIndex !== 'undefined' && tabIndex >= 0 ? {
|
|
447
448
|
outline: 'none'
|
|
@@ -492,7 +493,8 @@ export class ShareDialogWithTriggerInternal extends React.PureComponent {
|
|
|
492
493
|
onDialogClose: this.handleCloseDialog,
|
|
493
494
|
onTabChange: this.onTabChange //ref
|
|
494
495
|
,
|
|
495
|
-
selectPortalRef: this.selectPortalRef
|
|
496
|
+
selectPortalRef: this.selectPortalRef,
|
|
497
|
+
isBrowseUsersDisabled: isBrowseUsersDisabled
|
|
496
498
|
})),
|
|
497
499
|
isOpen: isDialogOpen,
|
|
498
500
|
onClose: this.handleCloseDialog,
|
|
@@ -12,7 +12,6 @@ import ErrorIcon from '@atlaskit/icon/glyph/error';
|
|
|
12
12
|
import Tabs, { Tab, TabList, TabPanel } from '@atlaskit/tabs';
|
|
13
13
|
import { R400 } from '@atlaskit/theme/colors';
|
|
14
14
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
15
|
-
import { token } from '@atlaskit/tokens';
|
|
16
15
|
import Tooltip from '@atlaskit/tooltip';
|
|
17
16
|
import { messages } from '../i18n';
|
|
18
17
|
import { TabType } from '../types';
|
|
@@ -99,6 +98,7 @@ class InternalForm extends React.PureComponent {
|
|
|
99
98
|
copyTooltipText,
|
|
100
99
|
helperMessage,
|
|
101
100
|
orgId,
|
|
101
|
+
isBrowseUsersDisabled,
|
|
102
102
|
intl: {
|
|
103
103
|
formatMessage
|
|
104
104
|
}
|
|
@@ -125,7 +125,8 @@ class InternalForm extends React.PureComponent {
|
|
|
125
125
|
selectPortalRef: selectPortalRef,
|
|
126
126
|
isPublicLink: isPublicLink,
|
|
127
127
|
helperMessage: helperMessage,
|
|
128
|
-
orgId: orgId
|
|
128
|
+
orgId: orgId,
|
|
129
|
+
isBrowseUsersDisabled: isBrowseUsersDisabled
|
|
129
130
|
})), jsx("div", {
|
|
130
131
|
css: formFieldStyles
|
|
131
132
|
}, jsx(CommentField, {
|
|
@@ -172,7 +173,7 @@ class InternalForm extends React.PureComponent {
|
|
|
172
173
|
position: "top"
|
|
173
174
|
}, jsx(ErrorIcon, {
|
|
174
175
|
label: formatMessage(messages.shareFailureIconLabel),
|
|
175
|
-
primaryColor:
|
|
176
|
+
primaryColor: `var(--ds-icon-danger, ${R400})`
|
|
176
177
|
}))), jsx(Button, {
|
|
177
178
|
appearance: buttonAppearance,
|
|
178
179
|
type: "submit",
|
|
@@ -9,7 +9,6 @@ import DropdownMenu, { DropdownItem, DropdownItemGroup } from '@atlaskit/dropdow
|
|
|
9
9
|
import ChevronDownIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
10
10
|
import { N800 } from '@atlaskit/theme/colors';
|
|
11
11
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
12
|
-
import { token } from '@atlaskit/tokens';
|
|
13
12
|
import { messages } from '../i18n';
|
|
14
13
|
import { shareIntegrationButtonEvent } from './analytics/analytics';
|
|
15
14
|
import IntegrationButton from './IntegrationButton';
|
|
@@ -90,7 +89,7 @@ const SplitButtonDropdown = props => {
|
|
|
90
89
|
}, jsx("span", {
|
|
91
90
|
css: dropDownIntegrationButtonWrapperStyles
|
|
92
91
|
}, jsx(IntegrationButton, {
|
|
93
|
-
textColor:
|
|
92
|
+
textColor: `var(--ds-text, ${N800})`,
|
|
94
93
|
appearance: "subtle",
|
|
95
94
|
onClick: () => onIntegrationButtonClick(integration),
|
|
96
95
|
shouldFitContainer: true,
|
|
@@ -31,7 +31,7 @@ const getNoOptionsMessage = (isPublicLink, allowEmail) => ({
|
|
|
31
31
|
}
|
|
32
32
|
})) : null;
|
|
33
33
|
|
|
34
|
-
const getPlaceHolderMessageDescriptor = (product = 'confluence', allowEmail) => {
|
|
34
|
+
const getPlaceHolderMessageDescriptor = (product = 'confluence', allowEmail, isBrowseUsersDisabled) => {
|
|
35
35
|
if (!allowEmail) {
|
|
36
36
|
const placeholderMessage = {
|
|
37
37
|
jira: messages.userPickerExistingUserOnlyPlaceholder,
|
|
@@ -40,6 +40,10 @@ const getPlaceHolderMessageDescriptor = (product = 'confluence', allowEmail) =>
|
|
|
40
40
|
return placeholderMessage[product];
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
if (isBrowseUsersDisabled) {
|
|
44
|
+
return messages.userPickerGenericEmailOnlyPlaceholder;
|
|
45
|
+
}
|
|
46
|
+
|
|
43
47
|
const placeholderMessage = {
|
|
44
48
|
jira: messages.userPickerGenericPlaceholderJira,
|
|
45
49
|
confluence: messages.userPickerGenericPlaceholder
|
|
@@ -56,9 +60,13 @@ const requiredMessagesWithoutEmail = {
|
|
|
56
60
|
jira: messages.userPickerRequiredExistingUserOnlyMessageJira
|
|
57
61
|
};
|
|
58
62
|
|
|
59
|
-
const getRequiredMessage = (product, allowEmail) => {
|
|
60
|
-
|
|
61
|
-
|
|
63
|
+
const getRequiredMessage = (product, allowEmail, isBrowseUsersDisabled) => {
|
|
64
|
+
if (isBrowseUsersDisabled) {
|
|
65
|
+
return messages.userPickerRequiredMessageEmailOnly;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const emailMessages = allowEmail ? requiredMessagesWithEmail : requiredMessagesWithoutEmail;
|
|
69
|
+
return emailMessages[product];
|
|
62
70
|
}; // eslint-disable-next-line @repo/internal/react/no-class-components
|
|
63
71
|
|
|
64
72
|
|
|
@@ -122,9 +130,10 @@ export class UserPickerFieldComponent extends React.Component {
|
|
|
122
130
|
cloudId,
|
|
123
131
|
selectPortalRef,
|
|
124
132
|
isPublicLink,
|
|
125
|
-
orgId
|
|
133
|
+
orgId,
|
|
134
|
+
isBrowseUsersDisabled
|
|
126
135
|
} = this.props;
|
|
127
|
-
const smartUserPickerProps = enableSmartUserPicker ? {
|
|
136
|
+
const smartUserPickerProps = enableSmartUserPicker && !isBrowseUsersDisabled ? {
|
|
128
137
|
productKey: product,
|
|
129
138
|
principalId: loggedInAccountId,
|
|
130
139
|
siteId: cloudId || '',
|
|
@@ -134,13 +143,13 @@ export class UserPickerFieldComponent extends React.Component {
|
|
|
134
143
|
orgId
|
|
135
144
|
} : {};
|
|
136
145
|
const allowEmail = allowEmails(config);
|
|
137
|
-
const requiredMessage = getRequiredMessage(product, allowEmail);
|
|
146
|
+
const requiredMessage = getRequiredMessage(product, allowEmail, isBrowseUsersDisabled);
|
|
138
147
|
const commonPickerProps = {
|
|
139
148
|
fieldId: 'share',
|
|
140
149
|
loadOptions: this.loadOptions,
|
|
141
150
|
isMulti: true,
|
|
142
151
|
width: '100%',
|
|
143
|
-
placeholder: /*#__PURE__*/React.createElement(FormattedMessage, getPlaceHolderMessageDescriptor(product, allowEmail)),
|
|
152
|
+
placeholder: /*#__PURE__*/React.createElement(FormattedMessage, getPlaceHolderMessageDescriptor(product, allowEmail, isBrowseUsersDisabled)),
|
|
144
153
|
allowEmail,
|
|
145
154
|
noOptionsMessage: getNoOptionsMessage(isPublicLink, allowEmail),
|
|
146
155
|
isLoading,
|
|
@@ -148,7 +157,7 @@ export class UserPickerFieldComponent extends React.Component {
|
|
|
148
157
|
maxPickerHeight: MAX_PICKER_HEIGHT,
|
|
149
158
|
textFieldBackgroundColor: true
|
|
150
159
|
};
|
|
151
|
-
const UserPickerComponent = enableSmartUserPicker ? SmartUserPicker : UserPicker;
|
|
160
|
+
const UserPickerComponent = enableSmartUserPicker && !isBrowseUsersDisabled ? SmartUserPicker : UserPicker;
|
|
152
161
|
const menuPortalTarget = getMenuPortalTargetCurrentHTML(selectPortalRef);
|
|
153
162
|
return /*#__PURE__*/React.createElement(Field, {
|
|
154
163
|
name: "users",
|
package/dist/es2019/i18n.js
CHANGED
|
@@ -30,6 +30,11 @@ export const messages = defineMessages({
|
|
|
30
30
|
defaultMessage: 'Retry',
|
|
31
31
|
description: 'Label for Share from retry button.'
|
|
32
32
|
},
|
|
33
|
+
formNoPermissions: {
|
|
34
|
+
id: 'fabric.elements.share.form.no-permissions',
|
|
35
|
+
defaultMessage: 'You do not have the ability to share.',
|
|
36
|
+
description: 'Copy to show when a user can not share.'
|
|
37
|
+
},
|
|
33
38
|
commentPlaceholder: {
|
|
34
39
|
id: 'fabric.elements.share.form.comment.placeholder',
|
|
35
40
|
defaultMessage: 'Add a message',
|
|
@@ -55,6 +60,11 @@ export const messages = defineMessages({
|
|
|
55
60
|
defaultMessage: 'Enter name or team',
|
|
56
61
|
description: 'Existing user only placeholder for the user picker field in Share form.'
|
|
57
62
|
},
|
|
63
|
+
userPickerGenericEmailOnlyPlaceholder: {
|
|
64
|
+
id: 'fabric.elements.share.form.user-picker.placeholder.emailOnly',
|
|
65
|
+
defaultMessage: 'Enter email',
|
|
66
|
+
description: 'Email only placeholder for the user picker field in Share form.'
|
|
67
|
+
},
|
|
58
68
|
userPickerAddMoreMessage: {
|
|
59
69
|
id: 'fabric.elements.share.form.user-picker.add-more',
|
|
60
70
|
defaultMessage: 'Enter more',
|
|
@@ -70,6 +80,11 @@ export const messages = defineMessages({
|
|
|
70
80
|
defaultMessage: 'Select at least one user, team or email.',
|
|
71
81
|
description: 'Required error message for the user picker field in Share form. ' + 'This message is used only for Jira product because Jira does not have Group concept.'
|
|
72
82
|
},
|
|
83
|
+
userPickerRequiredMessageEmailOnly: {
|
|
84
|
+
id: 'fabric.elements.share.form.user-picker.validation.required.email-only',
|
|
85
|
+
defaultMessage: 'Select at least one email.',
|
|
86
|
+
description: 'Required error message for the user picker field when email only enabled in Share form. ' + 'This message is used for both jira and confluence.'
|
|
87
|
+
},
|
|
73
88
|
userPickerRequiredExistingUserOnlyMessage: {
|
|
74
89
|
id: 'fabric.elements.share.form.user-picker.validation.required.existingUserOnly',
|
|
75
90
|
defaultMessage: 'Select at least one user, group or team.',
|
package/dist/es2019/version.json
CHANGED
|
@@ -22,7 +22,6 @@ import LinkFilledIcon from '@atlaskit/icon/glyph/link-filled';
|
|
|
22
22
|
import Popup from '@atlaskit/popup';
|
|
23
23
|
import { G300 } from '@atlaskit/theme/colors';
|
|
24
24
|
import { layers } from '@atlaskit/theme/constants';
|
|
25
|
-
import { token } from '@atlaskit/tokens';
|
|
26
25
|
import Tooltip from '@atlaskit/tooltip';
|
|
27
26
|
import { InlineDialogContentWrapper } from './ShareFormWrapper/styled';
|
|
28
27
|
import Button from './styles';
|
|
@@ -155,7 +154,7 @@ export var CopyLinkButton = /*#__PURE__*/function (_React$Component) {
|
|
|
155
154
|
"data-testid": "message-container"
|
|
156
155
|
}, jsx(React.Fragment, null, jsx(CheckCircleIcon, {
|
|
157
156
|
label: "",
|
|
158
|
-
primaryColor:
|
|
157
|
+
primaryColor: "var(--ds-icon-success, ".concat(G300, ")")
|
|
159
158
|
}), jsx("div", {
|
|
160
159
|
css: messageTextStyle
|
|
161
160
|
}, copiedToClipboardText))));
|
|
@@ -9,7 +9,6 @@ import React from 'react';
|
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
10
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
11
11
|
import { N500 } from '@atlaskit/theme/colors';
|
|
12
|
-
import { token } from '@atlaskit/tokens';
|
|
13
12
|
var integrationButtonCopyWrapperStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: left;\n"])));
|
|
14
13
|
var integrationIconWrapperStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin: 1px 8px 0 0;\n"])));
|
|
15
14
|
|
|
@@ -22,7 +21,7 @@ var IntegrationButton = function IntegrationButton(props) {
|
|
|
22
21
|
return jsx(Button, restProps, jsx("span", {
|
|
23
22
|
css: integrationButtonCopyWrapperStyle,
|
|
24
23
|
style: {
|
|
25
|
-
color: textColor ||
|
|
24
|
+
color: textColor || "var(--ds-text, ".concat(N500, ")")
|
|
26
25
|
}
|
|
27
26
|
}, jsx("span", {
|
|
28
27
|
css: integrationIconWrapperStyle
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
+
|
|
3
|
+
/** @jsxFrag */
|
|
2
4
|
import React from 'react';
|
|
3
5
|
import { jsx } from '@emotion/react';
|
|
6
|
+
import { FormattedMessage } from 'react-intl-next';
|
|
4
7
|
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
5
8
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
9
|
+
import { messages } from '../../i18n';
|
|
6
10
|
import { INTEGRATION_MODAL_SOURCE } from '../analytics/analytics';
|
|
7
11
|
import { IntegrationForm } from '../IntegrationForm';
|
|
8
12
|
import { ShareForm } from '../ShareForm';
|
|
9
13
|
import { ShareFormWrapper } from '../ShareFormWrapper';
|
|
14
|
+
import { allowEmails } from '../utils';
|
|
10
15
|
|
|
11
16
|
/**
|
|
12
17
|
* A Share form content which is lazy-loaded.
|
|
@@ -45,7 +50,8 @@ function LazyShareForm(props) {
|
|
|
45
50
|
shareError = props.shareError,
|
|
46
51
|
defaultValue = props.defaultValue,
|
|
47
52
|
showTitle = props.showTitle,
|
|
48
|
-
orgId = props.orgId
|
|
53
|
+
orgId = props.orgId,
|
|
54
|
+
isBrowseUsersDisabled = props.isBrowseUsersDisabled;
|
|
49
55
|
var footer = jsx("div", null, bottomMessage ? jsx("div", {
|
|
50
56
|
css: {
|
|
51
57
|
width: "".concat(gridSize() * 44, "px")
|
|
@@ -58,6 +64,7 @@ function LazyShareForm(props) {
|
|
|
58
64
|
React.useEffect(function () {
|
|
59
65
|
setIsLoading(false);
|
|
60
66
|
});
|
|
67
|
+
var allowEmail = allowEmails(config);
|
|
61
68
|
return jsx(ShareFormWrapper, {
|
|
62
69
|
footer: footer // form title will be determined by `title` and `showTitle` prop passed to `ShareForm`,
|
|
63
70
|
// so we don't need to show title via ShareFormWrapper
|
|
@@ -70,7 +77,7 @@ function LazyShareForm(props) {
|
|
|
70
77
|
}, jsx(IntegrationForm, {
|
|
71
78
|
Content: selectedIntegration.Content,
|
|
72
79
|
onIntegrationClose: onDialogClose
|
|
73
|
-
})) : jsx(ShareForm, {
|
|
80
|
+
})) : jsx(React.Fragment, null, allowEmail || !isBrowseUsersDisabled ? jsx(ShareForm, {
|
|
74
81
|
copyLink: copyLink,
|
|
75
82
|
loadOptions: loadOptions,
|
|
76
83
|
title: shareFormTitle,
|
|
@@ -98,8 +105,9 @@ function LazyShareForm(props) {
|
|
|
98
105
|
onLinkCopy: onLinkCopy,
|
|
99
106
|
onUserSelectionChange: onUserSelectionChange,
|
|
100
107
|
handleCloseDialog: onDialogClose,
|
|
101
|
-
onTabChange: onTabChange
|
|
102
|
-
|
|
108
|
+
onTabChange: onTabChange,
|
|
109
|
+
isBrowseUsersDisabled: isBrowseUsersDisabled
|
|
110
|
+
}) : jsx("p", null, jsx(FormattedMessage, messages.formNoPermissions))));
|
|
103
111
|
}
|
|
104
112
|
|
|
105
113
|
export default LazyShareForm;
|
|
@@ -424,7 +424,8 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
|
|
|
424
424
|
shareAri = _this$props2.shareAri,
|
|
425
425
|
tabIndex = _this$props2.tabIndex,
|
|
426
426
|
copyTooltipText = _this$props2.copyTooltipText,
|
|
427
|
-
onDialogClose = _this$props2.onDialogClose
|
|
427
|
+
onDialogClose = _this$props2.onDialogClose,
|
|
428
|
+
isBrowseUsersDisabled = _this$props2.isBrowseUsersDisabled;
|
|
428
429
|
var _this$state = this.state,
|
|
429
430
|
config = _this$state.config,
|
|
430
431
|
isFetchingConfig = _this$state.isFetchingConfig;
|
|
@@ -469,7 +470,8 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
|
|
|
469
470
|
shareAri: shareAri,
|
|
470
471
|
tabIndex: tabIndex,
|
|
471
472
|
copyTooltipText: copyTooltipText,
|
|
472
|
-
onDialogClose: onDialogClose
|
|
473
|
+
onDialogClose: onDialogClose,
|
|
474
|
+
isBrowseUsersDisabled: isBrowseUsersDisabled
|
|
473
475
|
})));
|
|
474
476
|
}
|
|
475
477
|
}]);
|
|
@@ -475,7 +475,8 @@ export var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
475
475
|
tabIndex = _this$props7.tabIndex,
|
|
476
476
|
copyTooltipText = _this$props7.copyTooltipText,
|
|
477
477
|
integrationMode = _this$props7.integrationMode,
|
|
478
|
-
shareIntegrations = _this$props7.shareIntegrations
|
|
478
|
+
shareIntegrations = _this$props7.shareIntegrations,
|
|
479
|
+
isBrowseUsersDisabled = _this$props7.isBrowseUsersDisabled;
|
|
479
480
|
var style = typeof tabIndex !== 'undefined' && tabIndex >= 0 ? {
|
|
480
481
|
outline: 'none'
|
|
481
482
|
} : undefined;
|
|
@@ -526,7 +527,8 @@ export var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
526
527
|
onDialogClose: _this2.handleCloseDialog,
|
|
527
528
|
onTabChange: _this2.onTabChange //ref
|
|
528
529
|
,
|
|
529
|
-
selectPortalRef: _this2.selectPortalRef
|
|
530
|
+
selectPortalRef: _this2.selectPortalRef,
|
|
531
|
+
isBrowseUsersDisabled: isBrowseUsersDisabled
|
|
530
532
|
}));
|
|
531
533
|
},
|
|
532
534
|
isOpen: isDialogOpen,
|
|
@@ -29,7 +29,6 @@ import ErrorIcon from '@atlaskit/icon/glyph/error';
|
|
|
29
29
|
import Tabs, { Tab, TabList, TabPanel } from '@atlaskit/tabs';
|
|
30
30
|
import { R400 } from '@atlaskit/theme/colors';
|
|
31
31
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
32
|
-
import { token } from '@atlaskit/tokens';
|
|
33
32
|
import Tooltip from '@atlaskit/tooltip';
|
|
34
33
|
import { messages } from '../i18n';
|
|
35
34
|
import { TabType } from '../types';
|
|
@@ -101,6 +100,7 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
101
100
|
copyTooltipText = _this$props.copyTooltipText,
|
|
102
101
|
helperMessage = _this$props.helperMessage,
|
|
103
102
|
orgId = _this$props.orgId,
|
|
103
|
+
isBrowseUsersDisabled = _this$props.isBrowseUsersDisabled,
|
|
104
104
|
formatMessage = _this$props.intl.formatMessage;
|
|
105
105
|
return jsx(AnalyticsContext, {
|
|
106
106
|
data: {
|
|
@@ -124,7 +124,8 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
124
124
|
selectPortalRef: selectPortalRef,
|
|
125
125
|
isPublicLink: isPublicLink,
|
|
126
126
|
helperMessage: helperMessage,
|
|
127
|
-
orgId: orgId
|
|
127
|
+
orgId: orgId,
|
|
128
|
+
isBrowseUsersDisabled: isBrowseUsersDisabled
|
|
128
129
|
})), jsx("div", {
|
|
129
130
|
css: formFieldStyles
|
|
130
131
|
}, jsx(CommentField, {
|
|
@@ -168,7 +169,7 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
168
169
|
position: "top"
|
|
169
170
|
}, jsx(ErrorIcon, {
|
|
170
171
|
label: formatMessage(messages.shareFailureIconLabel),
|
|
171
|
-
primaryColor:
|
|
172
|
+
primaryColor: "var(--ds-icon-danger, ".concat(R400, ")")
|
|
172
173
|
}))), jsx(Button, {
|
|
173
174
|
appearance: buttonAppearance,
|
|
174
175
|
type: "submit",
|
|
@@ -14,7 +14,6 @@ import DropdownMenu, { DropdownItem, DropdownItemGroup } from '@atlaskit/dropdow
|
|
|
14
14
|
import ChevronDownIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
15
15
|
import { N800 } from '@atlaskit/theme/colors';
|
|
16
16
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
17
|
-
import { token } from '@atlaskit/tokens';
|
|
18
17
|
import { messages } from '../i18n';
|
|
19
18
|
import { shareIntegrationButtonEvent } from './analytics/analytics';
|
|
20
19
|
import IntegrationButton from './IntegrationButton';
|
|
@@ -78,7 +77,7 @@ var SplitButtonDropdown = function SplitButtonDropdown(props) {
|
|
|
78
77
|
}, jsx("span", {
|
|
79
78
|
css: dropDownIntegrationButtonWrapperStyles
|
|
80
79
|
}, jsx(IntegrationButton, {
|
|
81
|
-
textColor:
|
|
80
|
+
textColor: "var(--ds-text, ".concat(N800, ")"),
|
|
82
81
|
appearance: "subtle",
|
|
83
82
|
onClick: function onClick() {
|
|
84
83
|
return onIntegrationButtonClick(integration);
|
|
@@ -48,6 +48,7 @@ var getNoOptionsMessage = function getNoOptionsMessage(isPublicLink, allowEmail)
|
|
|
48
48
|
var getPlaceHolderMessageDescriptor = function getPlaceHolderMessageDescriptor() {
|
|
49
49
|
var product = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'confluence';
|
|
50
50
|
var allowEmail = arguments.length > 1 ? arguments[1] : undefined;
|
|
51
|
+
var isBrowseUsersDisabled = arguments.length > 2 ? arguments[2] : undefined;
|
|
51
52
|
|
|
52
53
|
if (!allowEmail) {
|
|
53
54
|
var _placeholderMessage = {
|
|
@@ -57,6 +58,10 @@ var getPlaceHolderMessageDescriptor = function getPlaceHolderMessageDescriptor()
|
|
|
57
58
|
return _placeholderMessage[product];
|
|
58
59
|
}
|
|
59
60
|
|
|
61
|
+
if (isBrowseUsersDisabled) {
|
|
62
|
+
return messages.userPickerGenericEmailOnlyPlaceholder;
|
|
63
|
+
}
|
|
64
|
+
|
|
60
65
|
var placeholderMessage = {
|
|
61
66
|
jira: messages.userPickerGenericPlaceholderJira,
|
|
62
67
|
confluence: messages.userPickerGenericPlaceholder
|
|
@@ -73,9 +78,13 @@ var requiredMessagesWithoutEmail = {
|
|
|
73
78
|
jira: messages.userPickerRequiredExistingUserOnlyMessageJira
|
|
74
79
|
};
|
|
75
80
|
|
|
76
|
-
var getRequiredMessage = function getRequiredMessage(product, allowEmail) {
|
|
77
|
-
|
|
78
|
-
|
|
81
|
+
var getRequiredMessage = function getRequiredMessage(product, allowEmail, isBrowseUsersDisabled) {
|
|
82
|
+
if (isBrowseUsersDisabled) {
|
|
83
|
+
return messages.userPickerRequiredMessageEmailOnly;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
var emailMessages = allowEmail ? requiredMessagesWithEmail : requiredMessagesWithoutEmail;
|
|
87
|
+
return emailMessages[product];
|
|
79
88
|
}; // eslint-disable-next-line @repo/internal/react/no-class-components
|
|
80
89
|
|
|
81
90
|
|
|
@@ -152,8 +161,9 @@ export var UserPickerFieldComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
152
161
|
cloudId = _this$props2.cloudId,
|
|
153
162
|
selectPortalRef = _this$props2.selectPortalRef,
|
|
154
163
|
isPublicLink = _this$props2.isPublicLink,
|
|
155
|
-
orgId = _this$props2.orgId
|
|
156
|
-
|
|
164
|
+
orgId = _this$props2.orgId,
|
|
165
|
+
isBrowseUsersDisabled = _this$props2.isBrowseUsersDisabled;
|
|
166
|
+
var smartUserPickerProps = enableSmartUserPicker && !isBrowseUsersDisabled ? {
|
|
157
167
|
productKey: product,
|
|
158
168
|
principalId: loggedInAccountId,
|
|
159
169
|
siteId: cloudId || '',
|
|
@@ -163,13 +173,13 @@ export var UserPickerFieldComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
163
173
|
orgId: orgId
|
|
164
174
|
} : {};
|
|
165
175
|
var allowEmail = allowEmails(config);
|
|
166
|
-
var requiredMessage = getRequiredMessage(product, allowEmail);
|
|
176
|
+
var requiredMessage = getRequiredMessage(product, allowEmail, isBrowseUsersDisabled);
|
|
167
177
|
var commonPickerProps = {
|
|
168
178
|
fieldId: 'share',
|
|
169
179
|
loadOptions: this.loadOptions,
|
|
170
180
|
isMulti: true,
|
|
171
181
|
width: '100%',
|
|
172
|
-
placeholder: /*#__PURE__*/React.createElement(FormattedMessage, getPlaceHolderMessageDescriptor(product, allowEmail)),
|
|
182
|
+
placeholder: /*#__PURE__*/React.createElement(FormattedMessage, getPlaceHolderMessageDescriptor(product, allowEmail, isBrowseUsersDisabled)),
|
|
173
183
|
allowEmail: allowEmail,
|
|
174
184
|
noOptionsMessage: getNoOptionsMessage(isPublicLink, allowEmail),
|
|
175
185
|
isLoading: isLoading,
|
|
@@ -177,7 +187,7 @@ export var UserPickerFieldComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
177
187
|
maxPickerHeight: MAX_PICKER_HEIGHT,
|
|
178
188
|
textFieldBackgroundColor: true
|
|
179
189
|
};
|
|
180
|
-
var UserPickerComponent = enableSmartUserPicker ? SmartUserPicker : UserPicker;
|
|
190
|
+
var UserPickerComponent = enableSmartUserPicker && !isBrowseUsersDisabled ? SmartUserPicker : UserPicker;
|
|
181
191
|
var menuPortalTarget = getMenuPortalTargetCurrentHTML(selectPortalRef);
|
|
182
192
|
return /*#__PURE__*/React.createElement(Field, {
|
|
183
193
|
name: "users",
|
|
@@ -10,7 +10,7 @@ var buildAttributes = function buildAttributes() {
|
|
|
10
10
|
var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
11
11
|
return _objectSpread({
|
|
12
12
|
packageName: "@atlaskit/share",
|
|
13
|
-
packageVersion: "3.
|
|
13
|
+
packageVersion: "3.6.0"
|
|
14
14
|
}, attributes);
|
|
15
15
|
};
|
|
16
16
|
|
package/dist/esm/i18n.js
CHANGED
|
@@ -30,6 +30,11 @@ export var messages = defineMessages({
|
|
|
30
30
|
defaultMessage: 'Retry',
|
|
31
31
|
description: 'Label for Share from retry button.'
|
|
32
32
|
},
|
|
33
|
+
formNoPermissions: {
|
|
34
|
+
id: 'fabric.elements.share.form.no-permissions',
|
|
35
|
+
defaultMessage: 'You do not have the ability to share.',
|
|
36
|
+
description: 'Copy to show when a user can not share.'
|
|
37
|
+
},
|
|
33
38
|
commentPlaceholder: {
|
|
34
39
|
id: 'fabric.elements.share.form.comment.placeholder',
|
|
35
40
|
defaultMessage: 'Add a message',
|
|
@@ -55,6 +60,11 @@ export var messages = defineMessages({
|
|
|
55
60
|
defaultMessage: 'Enter name or team',
|
|
56
61
|
description: 'Existing user only placeholder for the user picker field in Share form.'
|
|
57
62
|
},
|
|
63
|
+
userPickerGenericEmailOnlyPlaceholder: {
|
|
64
|
+
id: 'fabric.elements.share.form.user-picker.placeholder.emailOnly',
|
|
65
|
+
defaultMessage: 'Enter email',
|
|
66
|
+
description: 'Email only placeholder for the user picker field in Share form.'
|
|
67
|
+
},
|
|
58
68
|
userPickerAddMoreMessage: {
|
|
59
69
|
id: 'fabric.elements.share.form.user-picker.add-more',
|
|
60
70
|
defaultMessage: 'Enter more',
|
|
@@ -70,6 +80,11 @@ export var messages = defineMessages({
|
|
|
70
80
|
defaultMessage: 'Select at least one user, team or email.',
|
|
71
81
|
description: 'Required error message for the user picker field in Share form. ' + 'This message is used only for Jira product because Jira does not have Group concept.'
|
|
72
82
|
},
|
|
83
|
+
userPickerRequiredMessageEmailOnly: {
|
|
84
|
+
id: 'fabric.elements.share.form.user-picker.validation.required.email-only',
|
|
85
|
+
defaultMessage: 'Select at least one email.',
|
|
86
|
+
description: 'Required error message for the user picker field when email only enabled in Share form. ' + 'This message is used for both jira and confluence.'
|
|
87
|
+
},
|
|
73
88
|
userPickerRequiredExistingUserOnlyMessage: {
|
|
74
89
|
id: 'fabric.elements.share.form.user-picker.validation.required.existingUserOnly',
|
|
75
90
|
defaultMessage: 'Select at least one user, group or team.',
|
package/dist/esm/version.json
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx } from '@emotion/react';
|
|
|
2
2
|
import type { LoadOptions } from '@atlaskit/smart-user-picker';
|
|
3
3
|
import type { ShareData, ShareDialogWithTriggerProps, ShareDialogWithTriggerStates } from '../../types';
|
|
4
4
|
import { IntegrationFormProps } from '../IntegrationForm';
|
|
5
|
-
export declare type LazyShareFormProps = Pick<ShareDialogWithTriggerProps, 'copyLink' | 'config' | 'isFetchingConfig' | 'loadUserOptions' | 'shareFormTitle' | 'shareFormHelperMessage' | 'bottomMessage' | 'submitButtonLabel' | 'product' | 'customFooter' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'cloudId' | 'shareFieldsFooter' | 'onUserSelectionChange' | 'isPublicLink' | 'copyTooltipText' | 'shareIntegrations' | 'integrationMode' | 'onDialogClose' | 'orgId'> & Pick<ShareDialogWithTriggerStates, 'showIntegrationForm' | 'selectedIntegration' | 'isSharing' | 'shareError' | 'defaultValue'> & Pick<IntegrationFormProps, 'Content'> & {
|
|
5
|
+
export declare type LazyShareFormProps = Pick<ShareDialogWithTriggerProps, 'copyLink' | 'config' | 'isFetchingConfig' | 'loadUserOptions' | 'shareFormTitle' | 'shareFormHelperMessage' | 'bottomMessage' | 'submitButtonLabel' | 'product' | 'customFooter' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'cloudId' | 'shareFieldsFooter' | 'onUserSelectionChange' | 'isPublicLink' | 'copyTooltipText' | 'shareIntegrations' | 'integrationMode' | 'onDialogClose' | 'orgId' | 'isBrowseUsersDisabled'> & Pick<ShareDialogWithTriggerStates, 'showIntegrationForm' | 'selectedIntegration' | 'isSharing' | 'shareError' | 'defaultValue'> & Pick<IntegrationFormProps, 'Content'> & {
|
|
6
6
|
onLinkCopy: () => void;
|
|
7
7
|
onDismiss: (data: ShareData) => void;
|
|
8
8
|
onSubmit: (data: ShareData) => void;
|
|
@@ -52,7 +52,7 @@ export declare class ShareDialogContainerInternal extends React.Component<WithAn
|
|
|
52
52
|
getFormShareLink: () => string;
|
|
53
53
|
render(): JSX.Element;
|
|
54
54
|
}
|
|
55
|
-
export declare const ShareDialogContainer: React.ForwardRefExoticComponent<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "onTriggerButtonClick" | "isAutoOpenDialog" | "shouldCloseOnEscapePress" | "dialogPlacement" | "loadUserOptions" | "onDialogOpen" | "onDialogClose" | "onUserSelectionChange" | "renderCustomTriggerButton" | "shareContentType" | "shareFormTitle" | "shareFormHelperMessage" | "showFlags" | "loggedInAccountId" | "triggerButtonAppearance" | "triggerButtonIcon" | "triggerButtonStyle" | "triggerButtonTooltipPosition" | "triggerButtonTooltipText" | "cloudId" | "bottomMessage" | "customFooter" | "isCopyDisabled" | "isPublicLink" | "integrationMode" | "shareFieldsFooter" | "shareIntegrations" | "shareAri" | "tabIndex" | "copyTooltipText" | "dialogZIndex" | "orgId" | "shareClient" | "urlShortenerClient" | "shortLinkData" | "formatCopyLink" | "originTracingFactory" | "productId" | "shareLink" | "shareTitle" | "useUrlShortener"> & Partial<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "enableSmartUserPicker" | "product" | "shareeAction">> & Partial<Pick<{
|
|
55
|
+
export declare const ShareDialogContainer: React.ForwardRefExoticComponent<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "onTriggerButtonClick" | "isAutoOpenDialog" | "shouldCloseOnEscapePress" | "dialogPlacement" | "loadUserOptions" | "onDialogOpen" | "onDialogClose" | "onUserSelectionChange" | "renderCustomTriggerButton" | "shareContentType" | "shareFormTitle" | "shareFormHelperMessage" | "showFlags" | "loggedInAccountId" | "triggerButtonAppearance" | "triggerButtonIcon" | "triggerButtonStyle" | "triggerButtonTooltipPosition" | "triggerButtonTooltipText" | "cloudId" | "bottomMessage" | "customFooter" | "isCopyDisabled" | "isPublicLink" | "integrationMode" | "shareFieldsFooter" | "shareIntegrations" | "shareAri" | "tabIndex" | "copyTooltipText" | "dialogZIndex" | "orgId" | "isBrowseUsersDisabled" | "shareClient" | "urlShortenerClient" | "shortLinkData" | "formatCopyLink" | "originTracingFactory" | "productId" | "shareLink" | "shareTitle" | "useUrlShortener"> & Partial<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "enableSmartUserPicker" | "product" | "shareeAction">> & Partial<Pick<{
|
|
56
56
|
enableSmartUserPicker: boolean;
|
|
57
57
|
shareeAction: "view" | "edit";
|
|
58
58
|
product: string;
|
|
@@ -18,6 +18,7 @@ export declare type Props = {
|
|
|
18
18
|
isPublicLink?: boolean;
|
|
19
19
|
helperMessage?: string;
|
|
20
20
|
orgId?: string;
|
|
21
|
+
isBrowseUsersDisabled?: boolean;
|
|
21
22
|
};
|
|
22
23
|
export declare class UserPickerFieldComponent extends React.Component<WrappedComponentProps & Props> {
|
|
23
24
|
private loadOptions;
|
package/dist/types/i18n.d.ts
CHANGED
|
@@ -29,6 +29,11 @@ export declare const messages: {
|
|
|
29
29
|
defaultMessage: string;
|
|
30
30
|
description: string;
|
|
31
31
|
};
|
|
32
|
+
formNoPermissions: {
|
|
33
|
+
id: string;
|
|
34
|
+
defaultMessage: string;
|
|
35
|
+
description: string;
|
|
36
|
+
};
|
|
32
37
|
commentPlaceholder: {
|
|
33
38
|
id: string;
|
|
34
39
|
defaultMessage: string;
|
|
@@ -54,6 +59,11 @@ export declare const messages: {
|
|
|
54
59
|
defaultMessage: string;
|
|
55
60
|
description: string;
|
|
56
61
|
};
|
|
62
|
+
userPickerGenericEmailOnlyPlaceholder: {
|
|
63
|
+
id: string;
|
|
64
|
+
defaultMessage: string;
|
|
65
|
+
description: string;
|
|
66
|
+
};
|
|
57
67
|
userPickerAddMoreMessage: {
|
|
58
68
|
id: string;
|
|
59
69
|
defaultMessage: string;
|
|
@@ -69,6 +79,11 @@ export declare const messages: {
|
|
|
69
79
|
defaultMessage: string;
|
|
70
80
|
description: string;
|
|
71
81
|
};
|
|
82
|
+
userPickerRequiredMessageEmailOnly: {
|
|
83
|
+
id: string;
|
|
84
|
+
defaultMessage: string;
|
|
85
|
+
description: string;
|
|
86
|
+
};
|
|
72
87
|
userPickerRequiredExistingUserOnlyMessage: {
|
|
73
88
|
id: string;
|
|
74
89
|
defaultMessage: string;
|
|
@@ -19,7 +19,7 @@ export declare type DialogPlacement = Placement;
|
|
|
19
19
|
* with the demo page and clearly visible options on that page.
|
|
20
20
|
*/
|
|
21
21
|
export declare type DialogBoundariesElement = 'viewport' | 'window' | 'scrollParent';
|
|
22
|
-
export declare type ShareDialogWithTriggerProps = Pick<ShareDialogContainerProps, 'onTriggerButtonClick' | 'isAutoOpenDialog' | 'shouldCloseOnEscapePress' | 'dialogPlacement' | 'loadUserOptions' | 'onDialogOpen' | 'onDialogClose' | 'onUserSelectionChange' | 'renderCustomTriggerButton' | 'shareContentType' | 'shareFormTitle' | 'shareFormHelperMessage' | 'showFlags' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'triggerButtonAppearance' | 'triggerButtonIcon' | 'triggerButtonStyle' | 'triggerButtonTooltipPosition' | 'triggerButtonTooltipText' | 'cloudId' | 'bottomMessage' | 'product' | 'customFooter' | 'isCopyDisabled' | 'isPublicLink' | 'integrationMode' | 'shareFieldsFooter' | 'shareIntegrations' | 'shareAri' | 'tabIndex' | 'copyTooltipText' | 'dialogZIndex' | 'orgId'> & {
|
|
22
|
+
export declare type ShareDialogWithTriggerProps = Pick<ShareDialogContainerProps, 'onTriggerButtonClick' | 'isAutoOpenDialog' | 'shouldCloseOnEscapePress' | 'dialogPlacement' | 'loadUserOptions' | 'onDialogOpen' | 'onDialogClose' | 'onUserSelectionChange' | 'renderCustomTriggerButton' | 'shareContentType' | 'shareFormTitle' | 'shareFormHelperMessage' | 'showFlags' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'triggerButtonAppearance' | 'triggerButtonIcon' | 'triggerButtonStyle' | 'triggerButtonTooltipPosition' | 'triggerButtonTooltipText' | 'cloudId' | 'bottomMessage' | 'product' | 'customFooter' | 'isCopyDisabled' | 'isPublicLink' | 'integrationMode' | 'shareFieldsFooter' | 'shareIntegrations' | 'shareAri' | 'tabIndex' | 'copyTooltipText' | 'dialogZIndex' | 'orgId' | 'isBrowseUsersDisabled'> & {
|
|
23
23
|
config?: ConfigResponse;
|
|
24
24
|
isFetchingConfig?: boolean;
|
|
25
25
|
children?: RenderCustomTriggerButton;
|
|
@@ -4,7 +4,7 @@ import type { ConfigResponse } from '../clients/ShareServiceClient';
|
|
|
4
4
|
import type { ProductName } from './Products';
|
|
5
5
|
import type { ShareData, ShareError } from './ShareContentState';
|
|
6
6
|
import type { ShareDialogContainerProps } from './ShareDialogContainer';
|
|
7
|
-
export declare type ShareFormProps = Pick<ShareDialogContainerProps, 'integrationMode' | 'shareIntegrations' | 'copyTooltipText' | 'isPublicLink' | 'onUserSelectionChange' | 'cloudId' | 'loggedInAccountId' | 'enableSmartUserPicker' | 'orgId'> & {
|
|
7
|
+
export declare type ShareFormProps = Pick<ShareDialogContainerProps, 'integrationMode' | 'shareIntegrations' | 'copyTooltipText' | 'isPublicLink' | 'onUserSelectionChange' | 'cloudId' | 'loggedInAccountId' | 'enableSmartUserPicker' | 'orgId' | 'isBrowseUsersDisabled'> & {
|
|
8
8
|
config?: ConfigResponse;
|
|
9
9
|
isFetchingConfig?: boolean;
|
|
10
10
|
copyLink: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/share",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.0",
|
|
4
4
|
"description": "Fabric Share Element",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -61,10 +61,10 @@
|
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@atlaskit/docs": "^9.0.0",
|
|
64
|
-
"@atlaskit/editor-test-helpers": "^
|
|
64
|
+
"@atlaskit/editor-test-helpers": "^18.0.0",
|
|
65
65
|
"@atlaskit/flag": "^15.0.0",
|
|
66
66
|
"@atlaskit/section-message": "^6.3.0",
|
|
67
|
-
"@atlaskit/select": "^16.
|
|
67
|
+
"@atlaskit/select": "^16.1.0",
|
|
68
68
|
"@atlaskit/toggle": "^12.5.0",
|
|
69
69
|
"@atlaskit/util-data-test": "^17.6.0",
|
|
70
70
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
package/report.api.md
CHANGED
|
@@ -239,6 +239,7 @@ export const ShareDialogContainer: React_2.ForwardRefExoticComponent<
|
|
|
239
239
|
| 'formatCopyLink'
|
|
240
240
|
| 'integrationMode'
|
|
241
241
|
| 'isAutoOpenDialog'
|
|
242
|
+
| 'isBrowseUsersDisabled'
|
|
242
243
|
| 'isCopyDisabled'
|
|
243
244
|
| 'isPublicLink'
|
|
244
245
|
| 'loadUserOptions'
|
|
@@ -340,6 +341,7 @@ export type ShareDialogContainerProps = {
|
|
|
340
341
|
shareIntegrations?: Array<Integration>;
|
|
341
342
|
tabIndex?: number;
|
|
342
343
|
copyTooltipText?: string;
|
|
344
|
+
isBrowseUsersDisabled?: boolean;
|
|
343
345
|
};
|
|
344
346
|
|
|
345
347
|
// @public (undocumented)
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -189,7 +189,7 @@ export type ShareContentState = {
|
|
|
189
189
|
};
|
|
190
190
|
|
|
191
191
|
// @public (undocumented)
|
|
192
|
-
export const ShareDialogContainer: React_2.ForwardRefExoticComponent<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "bottomMessage" | "cloudId" | "copyTooltipText" | "customFooter" | "dialogPlacement" | "dialogZIndex" | "formatCopyLink" | "integrationMode" | "isAutoOpenDialog" | "isCopyDisabled" | "isPublicLink" | "loadUserOptions" | "loggedInAccountId" | "onDialogClose" | "onDialogOpen" | "onTriggerButtonClick" | "onUserSelectionChange" | "orgId" | "originTracingFactory" | "productId" | "renderCustomTriggerButton" | "shareAri" | "shareClient" | "shareContentType" | "shareFieldsFooter" | "shareFormHelperMessage" | "shareFormTitle" | "shareIntegrations" | "shareLink" | "shareTitle" | "shortLinkData" | "shouldCloseOnEscapePress" | "showFlags" | "tabIndex" | "triggerButtonAppearance" | "triggerButtonIcon" | "triggerButtonStyle" | "triggerButtonTooltipPosition" | "triggerButtonTooltipText" | "urlShortenerClient" | "useUrlShortener"> & Partial<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "enableSmartUserPicker" | "product" | "shareeAction">> & Partial<Pick<{
|
|
192
|
+
export const ShareDialogContainer: React_2.ForwardRefExoticComponent<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "bottomMessage" | "cloudId" | "copyTooltipText" | "customFooter" | "dialogPlacement" | "dialogZIndex" | "formatCopyLink" | "integrationMode" | "isAutoOpenDialog" | "isBrowseUsersDisabled" | "isCopyDisabled" | "isPublicLink" | "loadUserOptions" | "loggedInAccountId" | "onDialogClose" | "onDialogOpen" | "onTriggerButtonClick" | "onUserSelectionChange" | "orgId" | "originTracingFactory" | "productId" | "renderCustomTriggerButton" | "shareAri" | "shareClient" | "shareContentType" | "shareFieldsFooter" | "shareFormHelperMessage" | "shareFormTitle" | "shareIntegrations" | "shareLink" | "shareTitle" | "shortLinkData" | "shouldCloseOnEscapePress" | "showFlags" | "tabIndex" | "triggerButtonAppearance" | "triggerButtonIcon" | "triggerButtonStyle" | "triggerButtonTooltipPosition" | "triggerButtonTooltipText" | "urlShortenerClient" | "useUrlShortener"> & Partial<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "enableSmartUserPicker" | "product" | "shareeAction">> & Partial<Pick<{
|
|
193
193
|
enableSmartUserPicker: boolean;
|
|
194
194
|
shareeAction: "edit" | "view";
|
|
195
195
|
product: string;
|
|
@@ -241,6 +241,7 @@ export type ShareDialogContainerProps = {
|
|
|
241
241
|
shareIntegrations?: Array<Integration>;
|
|
242
242
|
tabIndex?: number;
|
|
243
243
|
copyTooltipText?: string;
|
|
244
|
+
isBrowseUsersDisabled?: boolean;
|
|
244
245
|
};
|
|
245
246
|
|
|
246
247
|
// @public (undocumented)
|