@atlaskit/share 4.2.3 → 4.3.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.
Files changed (51) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/clients/ShareServiceClient.js +24 -15
  3. package/dist/cjs/components/ShareDialogWithTrigger.js +84 -13
  4. package/dist/cjs/components/ShareForm.js +10 -5
  5. package/dist/cjs/components/UserPickerField.js +14 -7
  6. package/dist/cjs/components/analytics/analytics.js +1 -1
  7. package/dist/cjs/i18n/da.js +1 -1
  8. package/dist/cjs/i18n/en_ZZ.js +5 -1
  9. package/dist/cjs/i18n/es.js +1 -1
  10. package/dist/cjs/i18n/nl.js +1 -1
  11. package/dist/cjs/i18n/pt_BR.js +1 -1
  12. package/dist/cjs/i18n/tr.js +1 -1
  13. package/dist/cjs/i18n/uk.js +1 -1
  14. package/dist/cjs/version.json +1 -1
  15. package/dist/es2019/clients/ShareServiceClient.js +24 -15
  16. package/dist/es2019/components/ShareDialogWithTrigger.js +29 -6
  17. package/dist/es2019/components/ShareForm.js +10 -5
  18. package/dist/es2019/components/UserPickerField.js +14 -7
  19. package/dist/es2019/components/analytics/analytics.js +1 -1
  20. package/dist/es2019/i18n/da.js +1 -1
  21. package/dist/es2019/i18n/en_ZZ.js +5 -1
  22. package/dist/es2019/i18n/es.js +1 -1
  23. package/dist/es2019/i18n/nl.js +1 -1
  24. package/dist/es2019/i18n/pt_BR.js +1 -1
  25. package/dist/es2019/i18n/tr.js +1 -1
  26. package/dist/es2019/i18n/uk.js +1 -1
  27. package/dist/es2019/version.json +1 -1
  28. package/dist/esm/clients/ShareServiceClient.js +24 -15
  29. package/dist/esm/components/ShareDialogWithTrigger.js +84 -13
  30. package/dist/esm/components/ShareForm.js +10 -5
  31. package/dist/esm/components/UserPickerField.js +14 -7
  32. package/dist/esm/components/analytics/analytics.js +1 -1
  33. package/dist/esm/i18n/da.js +1 -1
  34. package/dist/esm/i18n/en_ZZ.js +5 -1
  35. package/dist/esm/i18n/es.js +1 -1
  36. package/dist/esm/i18n/nl.js +1 -1
  37. package/dist/esm/i18n/pt_BR.js +1 -1
  38. package/dist/esm/i18n/tr.js +1 -1
  39. package/dist/esm/i18n/uk.js +1 -1
  40. package/dist/esm/version.json +1 -1
  41. package/dist/types/components/ShareDialogWithTrigger.d.ts +3 -0
  42. package/dist/types/components/UserPickerField.d.ts +3 -2
  43. package/dist/types/i18n/en_ZZ.d.ts +3 -0
  44. package/dist/types/types/ShareContentState.d.ts +3 -0
  45. package/dist/types-ts4.5/components/ShareDialogWithTrigger.d.ts +3 -0
  46. package/dist/types-ts4.5/components/UserPickerField.d.ts +3 -2
  47. package/dist/types-ts4.5/i18n/en_ZZ.d.ts +3 -0
  48. package/dist/types-ts4.5/types/ShareContentState.d.ts +3 -0
  49. package/package.json +7 -5
  50. package/report.api.md +3 -0
  51. package/tmp/api-report-tmp.d.ts +3 -0
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/share",
3
- "version": "4.2.3"
3
+ "version": "4.3.0"
4
4
  }
@@ -4,6 +4,7 @@ import { jsx } from '@emotion/react';
4
4
  import { WrappedComponentProps } from 'react-intl-next';
5
5
  import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
6
6
  import { TriggerProps } from '@atlaskit/popup';
7
+ import { Value } from '@atlaskit/user-picker';
7
8
  import { Integration, ShareData, ShareDialogWithTriggerProps, ShareDialogWithTriggerStates } from '../types';
8
9
  export declare const defaultShareContentState: ShareData;
9
10
  type ShareDialogWithTriggerInternalProps = ShareDialogWithTriggerProps & WrappedComponentProps & WithAnalyticsEventsProps;
@@ -30,6 +31,7 @@ export declare class ShareDialogWithTriggerInternal extends React.PureComponent<
30
31
  private handleDialogOpen;
31
32
  private onTriggerClick;
32
33
  private handleCloseDialog;
34
+ private generateShareError;
33
35
  private handleShareSubmit;
34
36
  private handleFormDismiss;
35
37
  handleCopyLink: () => void;
@@ -37,6 +39,7 @@ export declare class ShareDialogWithTriggerInternal extends React.PureComponent<
37
39
  renderShareTriggerButton: (triggerProps: TriggerProps) => React.ReactNode;
38
40
  handleOpenSplitButton: () => void;
39
41
  handleCloseSplitButton: () => void;
42
+ handleOnUserSelectionChange: (value: Value) => void;
40
43
  render(): jsx.JSX.Element;
41
44
  }
42
45
  export declare const ShareDialogWithTrigger: React.ComponentType<ShareDialogWithTriggerProps>;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { WrappedComponentProps } from 'react-intl-next';
3
3
  import { LoadOptions, OptionData, Value } from '@atlaskit/smart-user-picker';
4
- import { ConfigResponse, ProductName } from '../types';
4
+ import { ConfigResponse, ProductName, ShareError } from '../types';
5
5
  export declare const REQUIRED = "REQUIRED";
6
6
  export type Props = {
7
7
  loadOptions?: LoadOptions;
@@ -19,10 +19,11 @@ export type Props = {
19
19
  helperMessage?: string;
20
20
  orgId?: string;
21
21
  isBrowseUsersDisabled?: boolean;
22
+ shareError?: ShareError;
22
23
  };
23
24
  export declare class UserPickerFieldComponent extends React.Component<WrappedComponentProps & Props> {
24
25
  private loadOptions;
25
- private getInviteWarningMessage;
26
+ private getHelperMessageOrDefault;
26
27
  private handleUserPickerTransform;
27
28
  render(): JSX.Element;
28
29
  }
@@ -13,6 +13,7 @@ declare const _default: {
13
13
  'fabric.elements.share.form.comment.placeholder': string;
14
14
  'fabric.elements.share.form.info.message.no.invite.confluence': string;
15
15
  'fabric.elements.share.form.info.message.no.invite.jira': string;
16
+ 'fabric.elements.share.form.no-permissions': string;
16
17
  'fabric.elements.share.form.public.send': string;
17
18
  'fabric.elements.share.form.public.share': string;
18
19
  'fabric.elements.share.form.retry': string;
@@ -22,11 +23,13 @@ declare const _default: {
22
23
  'fabric.elements.share.form.user-picker.add-more': string;
23
24
  'fabric.elements.share.form.user-picker.no-options.existingUserOnly': string;
24
25
  'fabric.elements.share.form.user-picker.no-options.generic': string;
26
+ 'fabric.elements.share.form.user-picker.placeholder.emailOnly': string;
25
27
  'fabric.elements.share.form.user-picker.placeholder.existingUserOnly': string;
26
28
  'fabric.elements.share.form.user-picker.placeholder.generic': string;
27
29
  'fabric.elements.share.form.user-picker.placeholder.jira': string;
28
30
  'fabric.elements.share.form.user-picker.placholder.generic.existingUserOnly': string;
29
31
  'fabric.elements.share.form.user-picker.validation.required': string;
32
+ 'fabric.elements.share.form.user-picker.validation.required.email-only': string;
30
33
  'fabric.elements.share.form.user-picker.validation.required.existingUserOnly': string;
31
34
  'fabric.elements.share.form.user-picker.validation.required.jira': string;
32
35
  'fabric.elements.share.form.user-picker.validation.required.jira.existingUserOnly': string;
@@ -7,6 +7,9 @@ export type ShareContentState = {
7
7
  };
8
8
  export type ShareError = {
9
9
  message: string;
10
+ errorCode?: string;
11
+ helpUrl?: string;
12
+ retryable: boolean;
10
13
  };
11
14
  export type ShareData = {
12
15
  users: OptionData[];
@@ -4,6 +4,7 @@ import { jsx } from '@emotion/react';
4
4
  import { WrappedComponentProps } from 'react-intl-next';
5
5
  import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
6
6
  import { TriggerProps } from '@atlaskit/popup';
7
+ import { Value } from '@atlaskit/user-picker';
7
8
  import { Integration, ShareData, ShareDialogWithTriggerProps, ShareDialogWithTriggerStates } from '../types';
8
9
  export declare const defaultShareContentState: ShareData;
9
10
  type ShareDialogWithTriggerInternalProps = ShareDialogWithTriggerProps & WrappedComponentProps & WithAnalyticsEventsProps;
@@ -30,6 +31,7 @@ export declare class ShareDialogWithTriggerInternal extends React.PureComponent<
30
31
  private handleDialogOpen;
31
32
  private onTriggerClick;
32
33
  private handleCloseDialog;
34
+ private generateShareError;
33
35
  private handleShareSubmit;
34
36
  private handleFormDismiss;
35
37
  handleCopyLink: () => void;
@@ -37,6 +39,7 @@ export declare class ShareDialogWithTriggerInternal extends React.PureComponent<
37
39
  renderShareTriggerButton: (triggerProps: TriggerProps) => React.ReactNode;
38
40
  handleOpenSplitButton: () => void;
39
41
  handleCloseSplitButton: () => void;
42
+ handleOnUserSelectionChange: (value: Value) => void;
40
43
  render(): jsx.JSX.Element;
41
44
  }
42
45
  export declare const ShareDialogWithTrigger: React.ComponentType<ShareDialogWithTriggerProps>;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { WrappedComponentProps } from 'react-intl-next';
3
3
  import { LoadOptions, OptionData, Value } from '@atlaskit/smart-user-picker';
4
- import { ConfigResponse, ProductName } from '../types';
4
+ import { ConfigResponse, ProductName, ShareError } from '../types';
5
5
  export declare const REQUIRED = "REQUIRED";
6
6
  export type Props = {
7
7
  loadOptions?: LoadOptions;
@@ -19,10 +19,11 @@ export type Props = {
19
19
  helperMessage?: string;
20
20
  orgId?: string;
21
21
  isBrowseUsersDisabled?: boolean;
22
+ shareError?: ShareError;
22
23
  };
23
24
  export declare class UserPickerFieldComponent extends React.Component<WrappedComponentProps & Props> {
24
25
  private loadOptions;
25
- private getInviteWarningMessage;
26
+ private getHelperMessageOrDefault;
26
27
  private handleUserPickerTransform;
27
28
  render(): JSX.Element;
28
29
  }
@@ -13,6 +13,7 @@ declare const _default: {
13
13
  'fabric.elements.share.form.comment.placeholder': string;
14
14
  'fabric.elements.share.form.info.message.no.invite.confluence': string;
15
15
  'fabric.elements.share.form.info.message.no.invite.jira': string;
16
+ 'fabric.elements.share.form.no-permissions': string;
16
17
  'fabric.elements.share.form.public.send': string;
17
18
  'fabric.elements.share.form.public.share': string;
18
19
  'fabric.elements.share.form.retry': string;
@@ -22,11 +23,13 @@ declare const _default: {
22
23
  'fabric.elements.share.form.user-picker.add-more': string;
23
24
  'fabric.elements.share.form.user-picker.no-options.existingUserOnly': string;
24
25
  'fabric.elements.share.form.user-picker.no-options.generic': string;
26
+ 'fabric.elements.share.form.user-picker.placeholder.emailOnly': string;
25
27
  'fabric.elements.share.form.user-picker.placeholder.existingUserOnly': string;
26
28
  'fabric.elements.share.form.user-picker.placeholder.generic': string;
27
29
  'fabric.elements.share.form.user-picker.placeholder.jira': string;
28
30
  'fabric.elements.share.form.user-picker.placholder.generic.existingUserOnly': string;
29
31
  'fabric.elements.share.form.user-picker.validation.required': string;
32
+ 'fabric.elements.share.form.user-picker.validation.required.email-only': string;
30
33
  'fabric.elements.share.form.user-picker.validation.required.existingUserOnly': string;
31
34
  'fabric.elements.share.form.user-picker.validation.required.jira': string;
32
35
  'fabric.elements.share.form.user-picker.validation.required.jira.existingUserOnly': string;
@@ -7,6 +7,9 @@ export type ShareContentState = {
7
7
  };
8
8
  export type ShareError = {
9
9
  message: string;
10
+ errorCode?: string;
11
+ helpUrl?: string;
12
+ retryable: boolean;
10
13
  };
11
14
  export type ShareData = {
12
15
  users: OptionData[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/share",
3
- "version": "4.2.3",
3
+ "version": "4.3.0",
4
4
  "description": "Fabric Share Element",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -50,10 +50,10 @@
50
50
  "@atlaskit/tabs": "^13.4.0",
51
51
  "@atlaskit/textarea": "^4.7.0",
52
52
  "@atlaskit/theme": "^12.5.0",
53
- "@atlaskit/tokens": "^1.4.0",
53
+ "@atlaskit/tokens": "^1.5.0",
54
54
  "@atlaskit/tooltip": "^17.8.0",
55
55
  "@atlaskit/ufo": "^0.2.0",
56
- "@atlaskit/user-picker": "^10.2.0",
56
+ "@atlaskit/user-picker": "^10.3.0",
57
57
  "@atlaskit/util-service-support": "^6.2.0",
58
58
  "@babel/runtime": "^7.0.0",
59
59
  "@emotion/react": "^11.7.1",
@@ -69,13 +69,15 @@
69
69
  },
70
70
  "devDependencies": {
71
71
  "@atlaskit/docs": "^9.1.0",
72
- "@atlaskit/editor-test-helpers": "^18.5.0",
72
+ "@atlaskit/editor-test-helpers": "^18.6.0",
73
73
  "@atlaskit/flag": "^15.2.0",
74
74
  "@atlaskit/section-message": "^6.4.0",
75
- "@atlaskit/select": "^16.4.0",
75
+ "@atlaskit/select": "^16.5.0",
76
76
  "@atlaskit/toggle": "^12.6.0",
77
77
  "@atlaskit/util-data-test": "^17.8.0",
78
78
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
79
+ "@testing-library/react": "^12.1.5",
80
+ "@testing-library/user-event": "^14.4.3",
79
81
  "enzyme": "^3.10.0",
80
82
  "enzyme-adapter-react-16": "^1.15.1",
81
83
  "enzyme-react-intl": "^2.0.6",
package/report.api.md CHANGED
@@ -347,6 +347,9 @@ export type ShareDialogContainerProps = {
347
347
  // @public (undocumented)
348
348
  export type ShareError = {
349
349
  message: string;
350
+ errorCode?: string;
351
+ helpUrl?: string;
352
+ retryable: boolean;
350
353
  };
351
354
 
352
355
  // @public (undocumented)
@@ -247,6 +247,9 @@ export type ShareDialogContainerProps = {
247
247
  // @public (undocumented)
248
248
  export type ShareError = {
249
249
  message: string;
250
+ errorCode?: string;
251
+ helpUrl?: string;
252
+ retryable: boolean;
250
253
  };
251
254
 
252
255
  // @public (undocumented)