@atlaskit/share 4.6.1 → 4.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/share
2
2
 
3
+ ## 4.7.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#60029](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/60029) [`b9826ea49c47`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b9826ea49c47) - Update dependencies that were impacted by HOT-106483 to latest.
8
+
9
+ ## 4.7.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#59712](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/59712) [`229363c1c1b3`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/229363c1c1b3) - Add required attribute to the user-picker components and add its consumption in the share component.
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+
3
19
  ## 4.6.1
4
20
 
5
21
  ### Patch Changes
@@ -0,0 +1,76 @@
1
+ {
2
+ "extends": "../../../../tsconfig.entry-points.confluence.json",
3
+ "compilerOptions": {
4
+ "declaration": true,
5
+ "target": "es5",
6
+ "composite": true,
7
+ "outDir": "../dist",
8
+ "rootDir": "../",
9
+ "baseUrl": "../"
10
+ },
11
+ "include": [
12
+ "../src/**/*.ts",
13
+ "../src/**/*.tsx"
14
+ ],
15
+ "exclude": [
16
+ "../src/**/__tests__/*",
17
+ "../src/**/*.test.*",
18
+ "../src/**/test.*"
19
+ ],
20
+ "references": [
21
+ {
22
+ "path": "../../../analytics/analytics-next/afm-cc/tsconfig.json"
23
+ },
24
+ {
25
+ "path": "../../../design-system/button/afm-cc/tsconfig.json"
26
+ },
27
+ {
28
+ "path": "../../../design-system/dropdown-menu/afm-cc/tsconfig.json"
29
+ },
30
+ {
31
+ "path": "../../../design-system/form/afm-cc/tsconfig.json"
32
+ },
33
+ {
34
+ "path": "../../../design-system/icon/afm-cc/tsconfig.json"
35
+ },
36
+ {
37
+ "path": "../../../design-system/popper/afm-cc/tsconfig.json"
38
+ },
39
+ {
40
+ "path": "../../../design-system/popup/afm-cc/tsconfig.json"
41
+ },
42
+ {
43
+ "path": "../../../design-system/portal/afm-cc/tsconfig.json"
44
+ },
45
+ {
46
+ "path": "../../../smart-experiences/smart-user-picker/afm-cc/tsconfig.json"
47
+ },
48
+ {
49
+ "path": "../../../design-system/spinner/afm-cc/tsconfig.json"
50
+ },
51
+ {
52
+ "path": "../../../design-system/tabs/afm-cc/tsconfig.json"
53
+ },
54
+ {
55
+ "path": "../../../design-system/textarea/afm-cc/tsconfig.json"
56
+ },
57
+ {
58
+ "path": "../../../design-system/theme/afm-cc/tsconfig.json"
59
+ },
60
+ {
61
+ "path": "../../../design-system/tokens/afm-cc/tsconfig.json"
62
+ },
63
+ {
64
+ "path": "../../../design-system/tooltip/afm-cc/tsconfig.json"
65
+ },
66
+ {
67
+ "path": "../../../data/ufo-external/afm-cc/tsconfig.json"
68
+ },
69
+ {
70
+ "path": "../../user-picker/afm-cc/tsconfig.json"
71
+ },
72
+ {
73
+ "path": "../../util-service-support/afm-cc/tsconfig.json"
74
+ }
75
+ ]
76
+ }
@@ -216,7 +216,7 @@ var UserPickerFieldComponent = exports.UserPickerFieldComponent = /*#__PURE__*/f
216
216
  var wasValidationOrShareError = !!fieldValidationError || !!shareError;
217
217
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(UserPickerComponent, (0, _extends2.default)({}, fieldProps, commonPickerProps, smartUserPickerProps, {
218
218
  "aria-labelledby": USER_PICKER_ARIA_LABEL,
219
- "aria-required": true,
219
+ required: true,
220
220
  addMoreMessage: addMoreMessage,
221
221
  placeholder: /*#__PURE__*/_react.default.createElement("span", {
222
222
  id: USER_PICKER_FIELD_PLACEHOLDER
@@ -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.6.1"
16
+ packageVersion: "4.7.1"
17
17
  }, attributes);
18
18
  };
19
19
  var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
@@ -184,7 +184,7 @@ export class UserPickerFieldComponent extends React.Component {
184
184
  const wasValidationOrShareError = !!fieldValidationError || !!shareError;
185
185
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(UserPickerComponent, _extends({}, fieldProps, commonPickerProps, smartUserPickerProps, {
186
186
  "aria-labelledby": USER_PICKER_ARIA_LABEL,
187
- "aria-required": true,
187
+ required: true,
188
188
  addMoreMessage: addMoreMessage,
189
189
  placeholder: /*#__PURE__*/React.createElement("span", {
190
190
  id: USER_PICKER_FIELD_PLACEHOLDER
@@ -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.6.1",
4
+ packageVersion: "4.7.1",
5
5
  ...attributes
6
6
  });
7
7
  const createEvent = (eventType, source, action, actionSubject, actionSubjectId, attributes = {}) => ({
@@ -206,7 +206,7 @@ export var UserPickerFieldComponent = /*#__PURE__*/function (_React$Component) {
206
206
  var wasValidationOrShareError = !!fieldValidationError || !!shareError;
207
207
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(UserPickerComponent, _extends({}, fieldProps, commonPickerProps, smartUserPickerProps, {
208
208
  "aria-labelledby": USER_PICKER_ARIA_LABEL,
209
- "aria-required": true,
209
+ required: true,
210
210
  addMoreMessage: addMoreMessage,
211
211
  placeholder: /*#__PURE__*/React.createElement("span", {
212
212
  id: USER_PICKER_FIELD_PLACEHOLDER
@@ -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.6.1"
9
+ packageVersion: "4.7.1"
10
10
  }, attributes);
11
11
  };
12
12
  var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/share",
3
- "version": "4.6.1",
3
+ "version": "4.7.1",
4
4
  "description": "Fabric Share Element",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -39,22 +39,22 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@atlaskit/analytics-next": "^9.1.0",
42
- "@atlaskit/button": "^16.16.0",
42
+ "@atlaskit/button": "^16.18.0",
43
43
  "@atlaskit/dropdown-menu": "^12.1.0",
44
- "@atlaskit/form": "^9.0.0",
44
+ "@atlaskit/form": "^9.0.3",
45
45
  "@atlaskit/icon": "^22.0.0",
46
46
  "@atlaskit/popper": "^5.5.4",
47
47
  "@atlaskit/popup": "^1.11.0",
48
48
  "@atlaskit/portal": "^4.4.0",
49
- "@atlaskit/smart-user-picker": "^6.3.0",
49
+ "@atlaskit/smart-user-picker": "^6.4.0",
50
50
  "@atlaskit/spinner": "^16.0.0",
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.28.0",
54
+ "@atlaskit/tokens": "^1.29.0",
55
55
  "@atlaskit/tooltip": "^18.0.0",
56
56
  "@atlaskit/ufo": "^0.2.0",
57
- "@atlaskit/user-picker": "^10.12.0",
57
+ "@atlaskit/user-picker": "^10.13.0",
58
58
  "@atlaskit/util-service-support": "^6.2.0",
59
59
  "@babel/runtime": "^7.0.0",
60
60
  "@emotion/react": "^11.7.1",
@@ -1,324 +0,0 @@
1
- ## API Report File for "@atlaskit/share"
2
-
3
- > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
-
5
- ```ts
6
-
7
- /// <reference types="react" />
8
-
9
- import type { Appearance } from '@atlaskit/button/types';
10
- import type { IconProps } from '@atlaskit/icon';
11
- import { jsx } from '@emotion/react';
12
- import type { LoadOptions } from '@atlaskit/smart-user-picker';
13
- import { OptionData } from '@atlaskit/smart-user-picker';
14
- import type { Placement } from '@atlaskit/popper';
15
- import { default as React_2 } from 'react';
16
- import { ReactElement } from 'react';
17
- import { TriggerProps } from '@atlaskit/popup';
18
- import type { Value } from '@atlaskit/smart-user-picker';
19
- import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
20
-
21
- // @public (undocumented)
22
- export const ADMIN_NOTIFIED = "admin-notified";
23
-
24
- // @public (undocumented)
25
- type Comment_2 = {
26
- format: 'adf' | 'plain_text';
27
- value: string;
28
- };
29
- export { Comment_2 as Comment }
30
-
31
- // @public (undocumented)
32
- export type ConfigResponse = {
33
- disableSharingToEmails?: boolean;
34
- };
35
-
36
- // @public (undocumented)
37
- export type Content = {
38
- ari: string;
39
- link: string;
40
- title: string;
41
- type: string;
42
- };
43
-
44
- // @public (undocumented)
45
- export class CopyLinkButton extends React_2.Component<Props, State> {
46
- // (undocumented)
47
- componentWillUnmount(): void;
48
- // (undocumented)
49
- render(): jsx.JSX.Element;
50
- // (undocumented)
51
- renderTriggerButton: (triggerProps: TriggerProps) => jsx.JSX.Element;
52
- // (undocumented)
53
- state: {
54
- shouldShowCopiedMessage: boolean;
55
- };
56
- }
57
-
58
- // @public (undocumented)
59
- export type DialogContentState = {
60
- users: OptionData[];
61
- comment: Comment_2;
62
- };
63
-
64
- // @public (undocumented)
65
- export type DialogPlacement = Placement;
66
-
67
- // @public (undocumented)
68
- export type Flag = {
69
- appearance: 'success';
70
- title: MessageDescriptor;
71
- type: FlagType;
72
- };
73
-
74
- // @public (undocumented)
75
- export type FlagType = 'admin-notified' | 'object-shared';
76
-
77
- // @public (undocumented)
78
- export type FormChildrenArgs<T> = {
79
- formProps: React.DetailedHTMLProps<React.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>;
80
- getValues: () => T;
81
- };
82
-
83
- // @public (undocumented)
84
- type Integration = {
85
- type: string;
86
- Icon: React.ComponentType;
87
- Content: React.ComponentType<IntegrationContentProps>;
88
- };
89
-
90
- // @public (undocumented)
91
- type IntegrationContentProps = {
92
- onClose: () => void;
93
- changeTab?: (index: TabType) => void;
94
- };
95
-
96
- // @public (undocumented)
97
- type IntegrationMode = 'off' | 'split' | 'tabs';
98
-
99
- // @public (undocumented)
100
- export type KeysOfType<T, TProp> = {
101
- [P in keyof T]: T[P] extends TProp ? P : never;
102
- }[keyof T];
103
-
104
- // @public (undocumented)
105
- export type MessageDescriptor = {
106
- id: string;
107
- description: string;
108
- defaultMessage: string;
109
- };
110
-
111
- // @public (undocumented)
112
- export type MetaData = {
113
- productId: string;
114
- atlOriginId: string;
115
- shareeAction?: 'edit' | 'view';
116
- };
117
-
118
- // @public (undocumented)
119
- export const OBJECT_SHARED = "object-shared";
120
-
121
- // @public (undocumented)
122
- export type OriginAnalyticAttributes = {
123
- hasGeneratedId: boolean;
124
- };
125
-
126
- // @public (undocumented)
127
- export type OriginTracing = {
128
- id: string;
129
- addToUrl: (link: string) => string;
130
- toAnalyticsAttributes: (attrs: OriginAnalyticAttributes) => OriginTracingForSubSequentEvents | OriginTracingWithIdGenerated;
131
- };
132
-
133
- // @public (undocumented)
134
- export type OriginTracingFactory = () => OriginTracing;
135
-
136
- // @public (undocumented)
137
- export type OriginTracingForSubSequentEvents = {
138
- originId: string;
139
- originProduct: string;
140
- };
141
-
142
- // @public (undocumented)
143
- export type OriginTracingWithIdGenerated = {
144
- originIdGenerated: string;
145
- originProduct: string;
146
- };
147
-
148
- // @public
149
- export type ProductId = 'bitbucket' | 'confluence' | 'jira-addon' | 'jira-core' | 'jira-platform' | 'jira-polaris' | 'jira-portfolio' | 'jira-servicedesk' | 'jira-software' | 'jira-unknown' | 'trello';
150
-
151
- // @public (undocumented)
152
- export type ProductName = 'confluence' | 'jira';
153
-
154
- // @public (undocumented)
155
- type Props = {
156
- onLinkCopy?: (link: string) => void;
157
- link: string;
158
- isDisabled?: boolean;
159
- copyTooltipText?: string;
160
- children?: ReactElement | string;
161
- copyLinkButtonText: string;
162
- copiedToClipboardText: string;
163
- iconBefore?: ReactElement;
164
- };
165
-
166
- // @public (undocumented)
167
- export type RenderCustomTriggerButton = (args: {
168
- error?: ShareError;
169
- isDisabled?: boolean;
170
- isSelected?: boolean;
171
- onClick: () => void;
172
- }, triggerProps: TriggerProps) => React.ReactNode;
173
-
174
- // @public (undocumented)
175
- export type ShareButtonStyle = 'icon-only' | 'icon-with-text' | 'text-only';
176
-
177
- // @public (undocumented)
178
- interface ShareClient {
179
- // (undocumented)
180
- getConfig(cloudId: string): Promise<ConfigResponse>;
181
- // (undocumented)
182
- share(content: Content, recipients: User[], metadata: MetaData, comment?: Comment_2): Promise<ShareResponse>;
183
- }
184
-
185
- // @public (undocumented)
186
- export type ShareContentState = {
187
- users: User[];
188
- comment?: Comment_2;
189
- };
190
-
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" | "isBrowseUsersDisabled" | "isCopyDisabled" | "isPublicLink" | "loadUserOptions" | "loggedInAccountId" | "onDialogClose" | "onDialogOpen" | "onTriggerButtonClick" | "onUserSelectionChange" | "orgId" | "originTracingFactory" | "productId" | "renderCustomTriggerButton" | "shareAri" | "shareClient" | "shareContentId" | "shareContentSubType" | "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
- enableSmartUserPicker: boolean;
194
- shareeAction: "edit" | "view";
195
- product: string;
196
- }, never>> & React_2.RefAttributes<any>>;
197
-
198
- // @public (undocumented)
199
- export type ShareDialogContainerProps = {
200
- onTriggerButtonClick?: () => void;
201
- onDialogOpen?: () => void;
202
- onDialogClose?: () => void;
203
- isAutoOpenDialog?: boolean;
204
- shareClient?: ShareClient;
205
- urlShortenerClient?: UrlShortenerClient;
206
- shortLinkData?: ShortenRequest;
207
- cloudId: string;
208
- orgId?: string;
209
- dialogPlacement?: DialogPlacement;
210
- dialogZIndex?: number;
211
- formatCopyLink?: (origin: OriginTracing, link: string) => string;
212
- loadUserOptions?: LoadOptions;
213
- originTracingFactory: OriginTracingFactory;
214
- productId: ProductId;
215
- renderCustomTriggerButton?: RenderCustomTriggerButton;
216
- shareAri: string;
217
- shareContentType: string;
218
- shareContentSubType?: string;
219
- shareContentId?: string;
220
- shareLink?: string;
221
- shareTitle: string;
222
- shareFormTitle?: React.ReactNode;
223
- shareFormHelperMessage?: string;
224
- shouldCloseOnEscapePress?: boolean;
225
- showFlags: (flags: Array<Flag>) => void;
226
- enableSmartUserPicker?: boolean;
227
- loggedInAccountId?: string;
228
- triggerButtonAppearance?: Appearance;
229
- triggerButtonIcon?: React.ComponentType<IconProps>;
230
- triggerButtonStyle?: ShareButtonStyle;
231
- triggerButtonTooltipPosition?: TooltipPosition;
232
- triggerButtonTooltipText?: React.ReactNode;
233
- bottomMessage?: React.ReactNode;
234
- useUrlShortener?: boolean;
235
- shareeAction?: 'edit' | 'view';
236
- product?: ProductName;
237
- customFooter?: React.ReactNode;
238
- onUserSelectionChange?: (value: Value) => void;
239
- shareFieldsFooter?: React.ReactNode;
240
- isCopyDisabled?: boolean;
241
- isPublicLink?: boolean;
242
- integrationMode?: IntegrationMode;
243
- shareIntegrations?: Array<Integration>;
244
- tabIndex?: number;
245
- copyTooltipText?: string;
246
- isBrowseUsersDisabled?: boolean;
247
- };
248
-
249
- // @public (undocumented)
250
- export type ShareError = {
251
- message: string;
252
- errorCode?: string;
253
- helpUrl?: string;
254
- retryable: boolean;
255
- };
256
-
257
- // @public (undocumented)
258
- export type ShareRequest = (content: Content, recipients: User[], metadata: MetaData, comment?: Comment_2) => Promise<ShareResponse>;
259
-
260
- // @public (undocumented)
261
- export type ShareResponse = {
262
- shareRequestId: string;
263
- };
264
-
265
- // @public (undocumented)
266
- interface ShortenRequest {
267
- // (undocumented)
268
- cloudId?: string;
269
- // (undocumented)
270
- originId?: string;
271
- // (undocumented)
272
- params: Record<string, string>;
273
- // (undocumented)
274
- product: string;
275
- // (undocumented)
276
- type: string;
277
- }
278
-
279
- // @public (undocumented)
280
- interface ShortenResponse {
281
- // (undocumented)
282
- shortUrl: string;
283
- }
284
-
285
- // @public (undocumented)
286
- type State = {
287
- shouldShowCopiedMessage: boolean;
288
- };
289
-
290
- // @public (undocumented)
291
- enum TabType {
292
- // (undocumented)
293
- default = 0,
294
- // (undocumented)
295
- Slack = 1
296
- }
297
-
298
- // @public (undocumented)
299
- export type TooltipPosition = 'bottom' | 'left' | 'mouse' | 'right' | 'top';
300
-
301
- // @public (undocumented)
302
- interface UrlShortenerClient {
303
- // (undocumented)
304
- shorten(data: ShortenRequest): Promise<ShortenResponse>;
305
- }
306
-
307
- // @public (undocumented)
308
- export type User = UserWithEmail | UserWithId;
309
-
310
- // @public (undocumented)
311
- export type UserWithEmail = {
312
- type: 'user';
313
- email: string;
314
- };
315
-
316
- // @public (undocumented)
317
- export type UserWithId = {
318
- type: 'custom' | 'group' | 'team' | 'user';
319
- id: string;
320
- };
321
-
322
- // (No @packageDocumentation comment for this package)
323
-
324
- ```