@atlaskit/share 4.10.0 → 4.12.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 CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/share
2
2
 
3
+ ## 4.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#68081](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68081) [`196b8c2c77d5`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/196b8c2c77d5) - [ux] PTC-8597 Add visual instruction for required field
8
+ - [#67525](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/67525) [`835694a1696a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/835694a1696a) - Add third party sources to user invited and access requested event attributes
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+
14
+ ## 4.11.0
15
+
16
+ ### Minor Changes
17
+
18
+ - [#67391](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/67391) [`b569a250dbf5`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b569a250dbf5) - Allow WorkspaceARI prop to be passed to component
19
+
3
20
  ## 4.10.0
4
21
 
5
22
  ### Minor Changes
@@ -127,12 +127,14 @@ var ShareDialogContainerInternal = exports.ShareDialogContainerInternal = /*#__P
127
127
  shareAri = _this$props.shareAri,
128
128
  shareContentType = _this$props.shareContentType,
129
129
  shareTitle = _this$props.shareTitle,
130
- shareeAction = _this$props.shareeAction;
130
+ shareeAction = _this$props.shareeAction,
131
+ workspaceAri = _this$props.workspaceAri;
131
132
  var content = {
132
133
  ari: shareAri,
133
134
  link: shareLink,
134
135
  title: shareTitle,
135
- type: shareContentType
136
+ type: shareContentType,
137
+ workspaceAri: workspaceAri
136
138
  };
137
139
  var metaData = {
138
140
  productId: productId,
@@ -20,10 +20,11 @@ var _react2 = require("@emotion/react");
20
20
  var _reactIntlNext = require("react-intl-next");
21
21
  var _analyticsNext = require("@atlaskit/analytics-next");
22
22
  var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
23
- var _form = _interopRequireDefault(require("@atlaskit/form"));
23
+ var _form = _interopRequireWildcard(require("@atlaskit/form"));
24
24
  var _error = _interopRequireDefault(require("@atlaskit/icon/glyph/error"));
25
25
  var _tabs = _interopRequireWildcard(require("@atlaskit/tabs"));
26
26
  var _colors = require("@atlaskit/theme/colors");
27
+ var _constants = require("@atlaskit/theme/constants");
27
28
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
28
29
  var _i18n = require("../i18n");
29
30
  var _types = require("../types");
@@ -33,7 +34,7 @@ var _CopyLinkButton = _interopRequireDefault(require("./CopyLinkButton"));
33
34
  var _IntegrationForm = require("./IntegrationForm");
34
35
  var _ShareHeader = require("./ShareHeader");
35
36
  var _UserPickerField = require("./UserPickerField");
36
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
37
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
37
38
  /** @jsx jsx */
38
39
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
39
40
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -48,6 +49,7 @@ var formFooterStyles = exports.formFooterStyles = (0, _react2.css)(_templateObje
48
49
  var formFieldStyles = (0, _react2.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n margin-bottom: ", ";\n"])), "var(--ds-space-150, 12px)");
49
50
  var integrationWrapperStyles = (0, _react2.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n"])));
50
51
  var integrationIconWrapperStyles = (0, _react2.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n margin-bottom: ", ";\n margin-right: 5px;\n"])), "var(--ds-space-negative-075, -6px)");
52
+ var requiredFieldInfoStyles = (0, _react2.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n margin-bottom: ", ";\n color: ", ";\n font-size: ", "px;\n"])), "var(--ds-space-200, 16px)", "var(--ds-text-subtle, ".concat(_colors.N300, ")"), (0, _constants.fontSizeSmall)());
51
53
  var integrationTabText = function integrationTabText(integrationName) {
52
54
  return (0, _react2.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _i18n.messages.shareInIntegrationButtonText, {
53
55
  values: {
@@ -104,6 +106,8 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
104
106
  }, (0, _react2.jsx)("form", formProps, showTitle && (0, _react2.jsx)(_ShareHeader.ShareHeader, {
105
107
  title: title
106
108
  }), (0, _react2.jsx)("div", {
109
+ css: requiredFieldInfoStyles
110
+ }, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _i18n.messages.requiredFieldSummary), (0, _react2.jsx)(_form.RequiredAsterisk, null)), (0, _react2.jsx)("div", {
107
111
  css: formFieldStyles
108
112
  }, (0, _react2.jsx)(_UserPickerField.UserPickerField, {
109
113
  onInputChange: onUserInputChange,
@@ -13,7 +13,7 @@ var buildAttributes = function buildAttributes() {
13
13
  var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
14
14
  return _objectSpread({
15
15
  packageName: "@atlaskit/share",
16
- packageVersion: "4.10.0"
16
+ packageVersion: "4.12.0"
17
17
  }, attributes);
18
18
  };
19
19
  var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
package/dist/cjs/i18n.js CHANGED
@@ -192,6 +192,11 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
192
192
  defaultMessage: 'Recipients will see the name of the issue and your message',
193
193
  description: 'Message indicating the recipients of the email share will be able to see the Jira issue title and the included message'
194
194
  },
195
+ requiredFieldSummary: {
196
+ id: 'fabric.elements.share.form.required-field.summary',
197
+ defaultMessage: 'Required fields are marked with an asterisk',
198
+ description: 'Summary info of required fields asterisk.'
199
+ },
195
200
  shareFailureIconLabel: {
196
201
  id: 'fabric.elements.share.failure.icon.label',
197
202
  defaultMessage: 'Error icon',
@@ -91,13 +91,15 @@ export class ShareDialogContainerInternal extends React.Component {
91
91
  shareAri,
92
92
  shareContentType,
93
93
  shareTitle,
94
- shareeAction
94
+ shareeAction,
95
+ workspaceAri
95
96
  } = this.props;
96
97
  const content = {
97
98
  ari: shareAri,
98
99
  link: shareLink,
99
100
  title: shareTitle,
100
- type: shareContentType
101
+ type: shareContentType,
102
+ workspaceAri
101
103
  };
102
104
  const metaData = {
103
105
  productId,
@@ -6,10 +6,11 @@ import { css, jsx } from '@emotion/react';
6
6
  import { FormattedMessage, injectIntl } from 'react-intl-next';
7
7
  import { AnalyticsContext } from '@atlaskit/analytics-next';
8
8
  import Button from '@atlaskit/button/custom-theme-button';
9
- import Form from '@atlaskit/form';
9
+ import Form, { RequiredAsterisk } from '@atlaskit/form';
10
10
  import ErrorIcon from '@atlaskit/icon/glyph/error';
11
11
  import Tabs, { Tab, TabList, TabPanel } from '@atlaskit/tabs';
12
- import { R400 } from '@atlaskit/theme/colors';
12
+ import { N300, R400 } from '@atlaskit/theme/colors';
13
+ import { fontSizeSmall } from '@atlaskit/theme/constants';
13
14
  import Tooltip from '@atlaskit/tooltip';
14
15
  import { messages } from '../i18n';
15
16
  import { TabType } from '../types';
@@ -56,6 +57,11 @@ const integrationIconWrapperStyles = css`
56
57
  margin-bottom: ${"var(--ds-space-negative-075, -6px)"};
57
58
  margin-right: 5px;
58
59
  `;
60
+ const requiredFieldInfoStyles = css`
61
+ margin-bottom: ${"var(--ds-space-200, 16px)"};
62
+ color: ${`var(--ds-text-subtle, ${N300})`};
63
+ font-size: ${fontSizeSmall()}px;
64
+ `;
59
65
  const integrationTabText = integrationName => jsx(FormattedMessage, _extends({}, messages.shareInIntegrationButtonText, {
60
66
  values: {
61
67
  integrationName
@@ -105,6 +111,8 @@ class InternalForm extends React.PureComponent {
105
111
  }, jsx("form", formProps, showTitle && jsx(ShareHeader, {
106
112
  title: title
107
113
  }), jsx("div", {
114
+ css: requiredFieldInfoStyles
115
+ }, jsx(FormattedMessage, messages.requiredFieldSummary), jsx(RequiredAsterisk, null)), jsx("div", {
108
116
  css: formFieldStyles
109
117
  }, jsx(UserPickerField, {
110
118
  onInputChange: onUserInputChange,
@@ -1,7 +1,7 @@
1
1
  import { isEmail, isTeam, isUser } from '@atlaskit/smart-user-picker';
2
2
  const buildAttributes = (attributes = {}) => ({
3
3
  packageName: "@atlaskit/share",
4
- packageVersion: "4.10.0",
4
+ packageVersion: "4.12.0",
5
5
  ...attributes
6
6
  });
7
7
  const createEvent = (eventType, source, action, actionSubject, actionSubjectId, attributes = {}) => ({
@@ -186,6 +186,11 @@ export const messages = defineMessages({
186
186
  defaultMessage: 'Recipients will see the name of the issue and your message',
187
187
  description: 'Message indicating the recipients of the email share will be able to see the Jira issue title and the included message'
188
188
  },
189
+ requiredFieldSummary: {
190
+ id: 'fabric.elements.share.form.required-field.summary',
191
+ defaultMessage: 'Required fields are marked with an asterisk',
192
+ description: 'Summary info of required fields asterisk.'
193
+ },
189
194
  shareFailureIconLabel: {
190
195
  id: 'fabric.elements.share.failure.icon.label',
191
196
  defaultMessage: 'Error icon',
@@ -120,12 +120,14 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
120
120
  shareAri = _this$props.shareAri,
121
121
  shareContentType = _this$props.shareContentType,
122
122
  shareTitle = _this$props.shareTitle,
123
- shareeAction = _this$props.shareeAction;
123
+ shareeAction = _this$props.shareeAction,
124
+ workspaceAri = _this$props.workspaceAri;
124
125
  var content = {
125
126
  ari: shareAri,
126
127
  link: shareLink,
127
128
  title: shareTitle,
128
- type: shareContentType
129
+ type: shareContentType,
130
+ workspaceAri: workspaceAri
129
131
  };
130
132
  var metaData = {
131
133
  productId: productId,
@@ -7,7 +7,7 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
7
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
8
  import _extends from "@babel/runtime/helpers/extends";
9
9
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
10
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
10
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
11
11
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
12
12
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
13
13
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
@@ -18,10 +18,11 @@ import { css, jsx } from '@emotion/react';
18
18
  import { FormattedMessage, injectIntl } from 'react-intl-next';
19
19
  import { AnalyticsContext } from '@atlaskit/analytics-next';
20
20
  import Button from '@atlaskit/button/custom-theme-button';
21
- import Form from '@atlaskit/form';
21
+ import Form, { RequiredAsterisk } from '@atlaskit/form';
22
22
  import ErrorIcon from '@atlaskit/icon/glyph/error';
23
23
  import Tabs, { Tab, TabList, TabPanel } from '@atlaskit/tabs';
24
- import { R400 } from '@atlaskit/theme/colors';
24
+ import { N300, R400 } from '@atlaskit/theme/colors';
25
+ import { fontSizeSmall } from '@atlaskit/theme/constants';
25
26
  import Tooltip from '@atlaskit/tooltip';
26
27
  import { messages } from '../i18n';
27
28
  import { TabType } from '../types';
@@ -38,6 +39,7 @@ export var formFooterStyles = css(_templateObject4 || (_templateObject4 = _tagge
38
39
  var formFieldStyles = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n"])), "var(--ds-space-150, 12px)");
39
40
  var integrationWrapperStyles = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n"])));
40
41
  var integrationIconWrapperStyles = css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n margin-right: 5px;\n"])), "var(--ds-space-negative-075, -6px)");
42
+ var requiredFieldInfoStyles = css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n color: ", ";\n font-size: ", "px;\n"])), "var(--ds-space-200, 16px)", "var(--ds-text-subtle, ".concat(N300, ")"), fontSizeSmall());
41
43
  var integrationTabText = function integrationTabText(integrationName) {
42
44
  return jsx(FormattedMessage, _extends({}, messages.shareInIntegrationButtonText, {
43
45
  values: {
@@ -94,6 +96,8 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
94
96
  }, jsx("form", formProps, showTitle && jsx(ShareHeader, {
95
97
  title: title
96
98
  }), jsx("div", {
99
+ css: requiredFieldInfoStyles
100
+ }, jsx(FormattedMessage, messages.requiredFieldSummary), jsx(RequiredAsterisk, null)), jsx("div", {
97
101
  css: formFieldStyles
98
102
  }, jsx(UserPickerField, {
99
103
  onInputChange: onUserInputChange,
@@ -6,7 +6,7 @@ var buildAttributes = function buildAttributes() {
6
6
  var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7
7
  return _objectSpread({
8
8
  packageName: "@atlaskit/share",
9
- packageVersion: "4.10.0"
9
+ packageVersion: "4.12.0"
10
10
  }, attributes);
11
11
  };
12
12
  var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
package/dist/esm/i18n.js CHANGED
@@ -186,6 +186,11 @@ export var messages = defineMessages({
186
186
  defaultMessage: 'Recipients will see the name of the issue and your message',
187
187
  description: 'Message indicating the recipients of the email share will be able to see the Jira issue title and the included message'
188
188
  },
189
+ requiredFieldSummary: {
190
+ id: 'fabric.elements.share.form.required-field.summary',
191
+ defaultMessage: 'Required fields are marked with an asterisk',
192
+ description: 'Summary info of required fields asterisk.'
193
+ },
189
194
  shareFailureIconLabel: {
190
195
  id: 'fabric.elements.share.failure.icon.label',
191
196
  defaultMessage: 'Error icon',
@@ -1,13 +1,13 @@
1
1
  import { ServiceConfig } from '@atlaskit/util-service-support';
2
2
  import { Comment, Content, MetaData, User } from '../types';
3
- export interface ShareClient {
4
- share(content: Content, recipients: User[], metadata: MetaData, comment?: Comment): Promise<ShareResponse>;
5
- getConfig(cloudId: string): Promise<ConfigResponse>;
6
- }
7
3
  export type ShareRequest = (content: Content, recipients: User[], metadata: MetaData, comment?: Comment) => Promise<ShareResponse>;
8
4
  export type ShareResponse = {
9
5
  shareRequestId: string;
10
6
  };
7
+ export interface ShareClient {
8
+ share: ShareRequest;
9
+ getConfig(cloudId: string): Promise<ConfigResponse>;
10
+ }
11
11
  export type ConfigResponse = {
12
12
  disableSharingToEmails?: boolean;
13
13
  };
@@ -50,7 +50,7 @@ export declare class ShareDialogContainerInternal extends React.Component<WithAn
50
50
  getFormShareLink: () => string;
51
51
  render(): JSX.Element;
52
52
  }
53
- export declare const ShareDialogContainer: React.ForwardRefExoticComponent<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "onTriggerButtonClick" | "isAutoOpenDialog" | "shouldCloseOnEscapePress" | "dialogPlacement" | "loadUserOptions" | "onDialogOpen" | "onDialogClose" | "onUserSelectionChange" | "renderCustomTriggerButton" | "shareContentType" | "shareContentSubType" | "shareContentId" | "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<{
53
+ export declare const ShareDialogContainer: React.ForwardRefExoticComponent<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "onTriggerButtonClick" | "isAutoOpenDialog" | "shouldCloseOnEscapePress" | "dialogPlacement" | "loadUserOptions" | "onDialogOpen" | "onDialogClose" | "onUserSelectionChange" | "renderCustomTriggerButton" | "shareContentType" | "shareContentSubType" | "shareContentId" | "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" | "workspaceAri"> & Partial<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "enableSmartUserPicker" | "product" | "shareeAction">> & Partial<Pick<{
54
54
  enableSmartUserPicker: boolean;
55
55
  shareeAction: "view" | "edit";
56
56
  product: string;
@@ -179,6 +179,11 @@ export declare const messages: {
179
179
  defaultMessage: string;
180
180
  description: string;
181
181
  };
182
+ requiredFieldSummary: {
183
+ id: string;
184
+ defaultMessage: string;
185
+ description: string;
186
+ };
182
187
  shareFailureIconLabel: {
183
188
  id: string;
184
189
  defaultMessage: string;
@@ -149,4 +149,5 @@ export type ShareDialogContainerProps = {
149
149
  tabIndex?: number;
150
150
  copyTooltipText?: string;
151
151
  isBrowseUsersDisabled?: boolean;
152
+ workspaceAri?: string;
152
153
  };
@@ -4,6 +4,7 @@ export type Content = {
4
4
  link: string;
5
5
  title: string;
6
6
  type: string;
7
+ workspaceAri?: string;
7
8
  };
8
9
  export type Comment = {
9
10
  format: 'plain_text' | 'adf';
@@ -1,9 +1,9 @@
1
1
  export type UserWithId = {
2
- type: 'user' | 'group' | 'team' | 'custom';
2
+ type: 'user' | 'group' | 'team' | 'custom' | 'external_user';
3
3
  id: string;
4
4
  };
5
5
  export type UserWithEmail = {
6
- type: 'user';
6
+ type: 'user' | 'external_user';
7
7
  email: string;
8
8
  };
9
9
  export type User = UserWithId | UserWithEmail;
@@ -1,13 +1,13 @@
1
1
  import { ServiceConfig } from '@atlaskit/util-service-support';
2
2
  import { Comment, Content, MetaData, User } from '../types';
3
- export interface ShareClient {
4
- share(content: Content, recipients: User[], metadata: MetaData, comment?: Comment): Promise<ShareResponse>;
5
- getConfig(cloudId: string): Promise<ConfigResponse>;
6
- }
7
3
  export type ShareRequest = (content: Content, recipients: User[], metadata: MetaData, comment?: Comment) => Promise<ShareResponse>;
8
4
  export type ShareResponse = {
9
5
  shareRequestId: string;
10
6
  };
7
+ export interface ShareClient {
8
+ share: ShareRequest;
9
+ getConfig(cloudId: string): Promise<ConfigResponse>;
10
+ }
11
11
  export type ConfigResponse = {
12
12
  disableSharingToEmails?: boolean;
13
13
  };
@@ -50,7 +50,7 @@ export declare class ShareDialogContainerInternal extends React.Component<WithAn
50
50
  getFormShareLink: () => string;
51
51
  render(): JSX.Element;
52
52
  }
53
- export declare const ShareDialogContainer: React.ForwardRefExoticComponent<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "onTriggerButtonClick" | "isAutoOpenDialog" | "shouldCloseOnEscapePress" | "dialogPlacement" | "loadUserOptions" | "onDialogOpen" | "onDialogClose" | "onUserSelectionChange" | "renderCustomTriggerButton" | "shareContentType" | "shareContentSubType" | "shareContentId" | "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<{
53
+ export declare const ShareDialogContainer: React.ForwardRefExoticComponent<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "onTriggerButtonClick" | "isAutoOpenDialog" | "shouldCloseOnEscapePress" | "dialogPlacement" | "loadUserOptions" | "onDialogOpen" | "onDialogClose" | "onUserSelectionChange" | "renderCustomTriggerButton" | "shareContentType" | "shareContentSubType" | "shareContentId" | "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" | "workspaceAri"> & Partial<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "enableSmartUserPicker" | "product" | "shareeAction">> & Partial<Pick<{
54
54
  enableSmartUserPicker: boolean;
55
55
  shareeAction: "view" | "edit";
56
56
  product: string;
@@ -179,6 +179,11 @@ export declare const messages: {
179
179
  defaultMessage: string;
180
180
  description: string;
181
181
  };
182
+ requiredFieldSummary: {
183
+ id: string;
184
+ defaultMessage: string;
185
+ description: string;
186
+ };
182
187
  shareFailureIconLabel: {
183
188
  id: string;
184
189
  defaultMessage: string;
@@ -149,4 +149,5 @@ export type ShareDialogContainerProps = {
149
149
  tabIndex?: number;
150
150
  copyTooltipText?: string;
151
151
  isBrowseUsersDisabled?: boolean;
152
+ workspaceAri?: string;
152
153
  };
@@ -4,6 +4,7 @@ export type Content = {
4
4
  link: string;
5
5
  title: string;
6
6
  type: string;
7
+ workspaceAri?: string;
7
8
  };
8
9
  export type Comment = {
9
10
  format: 'plain_text' | 'adf';
@@ -1,9 +1,9 @@
1
1
  export type UserWithId = {
2
- type: 'user' | 'group' | 'team' | 'custom';
2
+ type: 'user' | 'group' | 'team' | 'custom' | 'external_user';
3
3
  id: string;
4
4
  };
5
5
  export type UserWithEmail = {
6
- type: 'user';
6
+ type: 'user' | 'external_user';
7
7
  email: string;
8
8
  };
9
9
  export type User = UserWithId | UserWithEmail;
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@atlaskit/share",
3
- "version": "4.10.0",
3
+ "version": "4.12.0",
4
4
  "description": "Fabric Share Element",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
7
7
  },
8
- "repository": "https://bitbucket.org/atlassian/atlassian-frontend",
8
+ "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
9
9
  "author": "Atlassian Pty Ltd",
10
10
  "license": "Apache-2.0",
11
11
  "main": "dist/cjs/index.js",
@@ -51,10 +51,10 @@
51
51
  "@atlaskit/tabs": "^14.0.0",
52
52
  "@atlaskit/textarea": "^5.0.0",
53
53
  "@atlaskit/theme": "^12.6.0",
54
- "@atlaskit/tokens": "^1.33.0",
54
+ "@atlaskit/tokens": "^1.34.0",
55
55
  "@atlaskit/tooltip": "^18.1.0",
56
56
  "@atlaskit/ufo": "^0.2.0",
57
- "@atlaskit/user-picker": "^10.13.0",
57
+ "@atlaskit/user-picker": "^10.14.0",
58
58
  "@atlaskit/util-service-support": "^6.2.0",
59
59
  "@babel/runtime": "^7.0.0",
60
60
  "@emotion/react": "^11.7.1",