@atlaskit/share 3.2.3 → 3.2.6
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 +18 -0
- package/dist/cjs/components/ShareDialogContainer.js +3 -5
- package/dist/cjs/components/ShareDialogWithTrigger.js +3 -8
- package/dist/cjs/components/analytics/analytics.js +1 -1
- package/dist/cjs/components/analytics/ufoExperienceHelper.js +28 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/ShareDialogContainer.js +2 -5
- package/dist/es2019/components/ShareDialogWithTrigger.js +2 -8
- package/dist/es2019/components/analytics/analytics.js +1 -1
- package/dist/es2019/components/analytics/ufoExperienceHelper.js +19 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/clients/AtlassianUrlShortenerClient.js +1 -1
- package/dist/esm/components/ShareDialogContainer.js +3 -6
- package/dist/esm/components/ShareDialogWithTrigger.js +2 -8
- package/dist/esm/components/analytics/analytics.js +1 -1
- package/dist/esm/components/analytics/ufoExperienceHelper.js +19 -0
- package/dist/esm/version.json +1 -1
- package/dist/types/components/analytics/ufoExperienceHelper.d.ts +2 -0
- package/package.json +4 -4
- package/report.api.md +313 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/share
|
|
2
2
|
|
|
3
|
+
## 3.2.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`c58555a28e7`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c58555a28e7) - Make the share component a functional component to work with storybook
|
|
8
|
+
|
|
9
|
+
## 3.2.5
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`0a61837e1ff`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0a61837e1ff) - Bump patch version of smart-user-picker to support right context key for org ID
|
|
14
|
+
|
|
15
|
+
## 3.2.4
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [`facf0749321`](https://bitbucket.org/atlassian/atlassian-frontend/commits/facf0749321) - improve FE analytics by ignoring 401, 403 and 429 status code
|
|
20
|
+
|
|
3
21
|
## 3.2.3
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -47,6 +47,8 @@ var _i18n = require("../i18n");
|
|
|
47
47
|
|
|
48
48
|
var _analytics = require("./analytics/analytics");
|
|
49
49
|
|
|
50
|
+
var _ufoExperienceHelper = require("./analytics/ufoExperienceHelper");
|
|
51
|
+
|
|
50
52
|
var _ufoExperiences = require("./analytics/ufoExperiences");
|
|
51
53
|
|
|
52
54
|
var _ErrorBoundary = _interopRequireDefault(require("./ErrorBoundary"));
|
|
@@ -155,11 +157,7 @@ var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Component) {
|
|
|
155
157
|
});
|
|
156
158
|
}
|
|
157
159
|
|
|
158
|
-
_ufoExperiences.renderShareDialogExp
|
|
159
|
-
metadata: {
|
|
160
|
-
error: errObj
|
|
161
|
-
}
|
|
162
|
-
});
|
|
160
|
+
(0, _ufoExperienceHelper.isValidFailedExperience)(_ufoExperiences.renderShareDialogExp, errObj);
|
|
163
161
|
|
|
164
162
|
case 15:
|
|
165
163
|
case "end":
|
|
@@ -49,6 +49,8 @@ var _types = require("../types");
|
|
|
49
49
|
|
|
50
50
|
var _analytics = require("./analytics/analytics");
|
|
51
51
|
|
|
52
|
+
var _ufoExperienceHelper = require("./analytics/ufoExperienceHelper");
|
|
53
|
+
|
|
52
54
|
var _ufoExperiences = require("./analytics/ufoExperiences");
|
|
53
55
|
|
|
54
56
|
var _lazy = _interopRequireDefault(require("./LazyShareForm/lazy"));
|
|
@@ -309,14 +311,7 @@ var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureComponent
|
|
|
309
311
|
}
|
|
310
312
|
});
|
|
311
313
|
|
|
312
|
-
_ufoExperiences.shareSubmitExp
|
|
313
|
-
metadata: {
|
|
314
|
-
error: {
|
|
315
|
-
message: err.message,
|
|
316
|
-
name: err.name
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
});
|
|
314
|
+
(0, _ufoExperienceHelper.isValidFailedExperience)(_ufoExperiences.shareSubmitExp, err);
|
|
320
315
|
});
|
|
321
316
|
});
|
|
322
317
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleFormDismiss", function (data) {
|
|
@@ -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.2.
|
|
22
|
+
packageVersion: "3.2.6"
|
|
23
23
|
}, attributes);
|
|
24
24
|
};
|
|
25
25
|
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.isValidFailedExperience = void 0;
|
|
7
|
+
var ignoredErrorStatusCode = [401, 403, 429];
|
|
8
|
+
|
|
9
|
+
var isValidFailedExperience = function isValidFailedExperience(experience, error) {
|
|
10
|
+
var errorStatusCode = error.code || error.status || error.statusCode;
|
|
11
|
+
|
|
12
|
+
if (ignoredErrorStatusCode.includes(parseInt(errorStatusCode))) {
|
|
13
|
+
experience.abort({
|
|
14
|
+
metadata: {
|
|
15
|
+
error: error
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
experience.failure({
|
|
22
|
+
metadata: {
|
|
23
|
+
error: error
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
exports.isValidFailedExperience = isValidFailedExperience;
|
package/dist/cjs/version.json
CHANGED
|
@@ -9,6 +9,7 @@ import { AtlassianUrlShortenerClient } from '../clients/AtlassianUrlShortenerCli
|
|
|
9
9
|
import { ShareServiceClient } from '../clients/ShareServiceClient';
|
|
10
10
|
import { messages } from '../i18n';
|
|
11
11
|
import { CHANNEL_ID, copyLinkButtonClicked, errorEncountered, shortUrlGenerated, shortUrlRequested } from './analytics/analytics';
|
|
12
|
+
import { isValidFailedExperience } from './analytics/ufoExperienceHelper';
|
|
12
13
|
import { renderShareDialogExp } from './analytics/ufoExperiences';
|
|
13
14
|
import ErrorBoundary from './ErrorBoundary';
|
|
14
15
|
import MessagesIntlProvider from './MessagesIntlProvider';
|
|
@@ -83,11 +84,7 @@ export class ShareDialogContainerInternal extends React.Component {
|
|
|
83
84
|
};
|
|
84
85
|
}
|
|
85
86
|
|
|
86
|
-
renderShareDialogExp
|
|
87
|
-
metadata: {
|
|
88
|
-
error: errObj
|
|
89
|
-
}
|
|
90
|
-
});
|
|
87
|
+
isValidFailedExperience(renderShareDialogExp, errObj);
|
|
91
88
|
}
|
|
92
89
|
});
|
|
93
90
|
});
|
|
@@ -14,6 +14,7 @@ import { OBJECT_SHARED } from '../types';
|
|
|
14
14
|
import { cancelShare, CHANNEL_ID, copyLinkButtonClicked, formShareSubmitted, screenEvent, shareSplitButtonEvent, shareTabClicked, shareTriggerButtonClicked // type TabSubjectIdType,
|
|
15
15
|
} from './analytics/analytics'; // eslint-disable-next-line no-duplicate-imports
|
|
16
16
|
|
|
17
|
+
import { isValidFailedExperience } from './analytics/ufoExperienceHelper';
|
|
17
18
|
import { renderShareDialogExp, shareSubmitExp } from './analytics/ufoExperiences';
|
|
18
19
|
import LazyShareFormLazy from './LazyShareForm/lazy';
|
|
19
20
|
import ShareButton from './ShareButton';
|
|
@@ -259,14 +260,7 @@ export class ShareDialogWithTriggerInternal extends React.PureComponent {
|
|
|
259
260
|
message: err.message
|
|
260
261
|
}
|
|
261
262
|
});
|
|
262
|
-
shareSubmitExp
|
|
263
|
-
metadata: {
|
|
264
|
-
error: {
|
|
265
|
-
message: err.message,
|
|
266
|
-
name: err.name
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
});
|
|
263
|
+
isValidFailedExperience(shareSubmitExp, err);
|
|
270
264
|
});
|
|
271
265
|
});
|
|
272
266
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const ignoredErrorStatusCode = [401, 403, 429];
|
|
2
|
+
export const isValidFailedExperience = (experience, error) => {
|
|
3
|
+
const errorStatusCode = error.code || error.status || error.statusCode;
|
|
4
|
+
|
|
5
|
+
if (ignoredErrorStatusCode.includes(parseInt(errorStatusCode))) {
|
|
6
|
+
experience.abort({
|
|
7
|
+
metadata: {
|
|
8
|
+
error
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
experience.failure({
|
|
15
|
+
metadata: {
|
|
16
|
+
error
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
};
|
package/dist/es2019/version.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
5
|
export var AtlassianUrlShortenerClient = /*#__PURE__*/function () {
|
|
6
6
|
function AtlassianUrlShortenerClient() {
|
|
7
7
|
_classCallCheck(this, AtlassianUrlShortenerClient);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
4
3
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
@@ -8,6 +7,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
8
7
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
9
8
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
10
9
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
10
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
11
11
|
|
|
12
12
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
13
13
|
|
|
@@ -27,6 +27,7 @@ import { AtlassianUrlShortenerClient } from '../clients/AtlassianUrlShortenerCli
|
|
|
27
27
|
import { ShareServiceClient } from '../clients/ShareServiceClient';
|
|
28
28
|
import { messages } from '../i18n';
|
|
29
29
|
import { CHANNEL_ID, copyLinkButtonClicked, errorEncountered, shortUrlGenerated, shortUrlRequested } from './analytics/analytics';
|
|
30
|
+
import { isValidFailedExperience } from './analytics/ufoExperienceHelper';
|
|
30
31
|
import { renderShareDialogExp } from './analytics/ufoExperiences';
|
|
31
32
|
import ErrorBoundary from './ErrorBoundary';
|
|
32
33
|
import MessagesIntlProvider from './MessagesIntlProvider';
|
|
@@ -123,11 +124,7 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
|
|
|
123
124
|
});
|
|
124
125
|
}
|
|
125
126
|
|
|
126
|
-
renderShareDialogExp
|
|
127
|
-
metadata: {
|
|
128
|
-
error: errObj
|
|
129
|
-
}
|
|
130
|
-
});
|
|
127
|
+
isValidFailedExperience(renderShareDialogExp, errObj);
|
|
131
128
|
|
|
132
129
|
case 15:
|
|
133
130
|
case "end":
|
|
@@ -32,6 +32,7 @@ import { OBJECT_SHARED } from '../types';
|
|
|
32
32
|
import { cancelShare, CHANNEL_ID, copyLinkButtonClicked, formShareSubmitted, screenEvent, shareSplitButtonEvent, shareTabClicked, shareTriggerButtonClicked // type TabSubjectIdType,
|
|
33
33
|
} from './analytics/analytics'; // eslint-disable-next-line no-duplicate-imports
|
|
34
34
|
|
|
35
|
+
import { isValidFailedExperience } from './analytics/ufoExperienceHelper';
|
|
35
36
|
import { renderShareDialogExp, shareSubmitExp } from './analytics/ufoExperiences';
|
|
36
37
|
import LazyShareFormLazy from './LazyShareForm/lazy';
|
|
37
38
|
import ShareButton from './ShareButton';
|
|
@@ -286,14 +287,7 @@ export var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
286
287
|
}
|
|
287
288
|
});
|
|
288
289
|
|
|
289
|
-
shareSubmitExp
|
|
290
|
-
metadata: {
|
|
291
|
-
error: {
|
|
292
|
-
message: err.message,
|
|
293
|
-
name: err.name
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
});
|
|
290
|
+
isValidFailedExperience(shareSubmitExp, err);
|
|
297
291
|
});
|
|
298
292
|
});
|
|
299
293
|
|
|
@@ -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.2.
|
|
13
|
+
packageVersion: "3.2.6"
|
|
14
14
|
}, attributes);
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
var ignoredErrorStatusCode = [401, 403, 429];
|
|
2
|
+
export var isValidFailedExperience = function isValidFailedExperience(experience, error) {
|
|
3
|
+
var errorStatusCode = error.code || error.status || error.statusCode;
|
|
4
|
+
|
|
5
|
+
if (ignoredErrorStatusCode.includes(parseInt(errorStatusCode))) {
|
|
6
|
+
experience.abort({
|
|
7
|
+
metadata: {
|
|
8
|
+
error: error
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
experience.failure({
|
|
15
|
+
metadata: {
|
|
16
|
+
error: error
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
};
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/share",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.6",
|
|
4
4
|
"description": "Fabric Share Element",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@atlaskit/icon": "^21.10.0",
|
|
38
38
|
"@atlaskit/popup": "^1.3.0",
|
|
39
39
|
"@atlaskit/portal": "^4.0.0",
|
|
40
|
-
"@atlaskit/smart-user-picker": "^5.1.
|
|
40
|
+
"@atlaskit/smart-user-picker": "^5.1.2",
|
|
41
41
|
"@atlaskit/spinner": "^15.1.4",
|
|
42
42
|
"@atlaskit/tabs": "^13.2.3",
|
|
43
43
|
"@atlaskit/textarea": "^4.3.0",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@atlaskit/tokens": "^0.10.0",
|
|
46
46
|
"@atlaskit/tooltip": "^17.5.0",
|
|
47
47
|
"@atlaskit/ufo": "^0.1.0",
|
|
48
|
-
"@atlaskit/user-picker": "^9.
|
|
48
|
+
"@atlaskit/user-picker": "^9.2.0",
|
|
49
49
|
"@atlaskit/util-service-support": "^6.1.0",
|
|
50
50
|
"@babel/runtime": "^7.0.0",
|
|
51
51
|
"fast-deep-equal": "^3.1.1",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@atlaskit/docs": "^9.0.0",
|
|
63
63
|
"@atlaskit/editor-test-helpers": "^17.0.0",
|
|
64
|
-
"@atlaskit/flag": "^14.
|
|
64
|
+
"@atlaskit/flag": "^14.6.0",
|
|
65
65
|
"@atlaskit/section-message": "^6.0.0",
|
|
66
66
|
"@atlaskit/select": "^15.3.0",
|
|
67
67
|
"@atlaskit/toggle": "^12.4.0",
|
package/report.api.md
ADDED
|
@@ -0,0 +1,313 @@
|
|
|
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
|
+
/// <reference types="react" />
|
|
7
|
+
|
|
8
|
+
import type { Appearance } from '@atlaskit/button/types';
|
|
9
|
+
import type { IconProps } from '@atlaskit/icon';
|
|
10
|
+
import type { LoadOptions } from '@atlaskit/smart-user-picker';
|
|
11
|
+
import { OptionData } from '@atlaskit/smart-user-picker';
|
|
12
|
+
import type { Placement } from '@atlaskit/popper';
|
|
13
|
+
import { default as React_2 } from 'react';
|
|
14
|
+
import type { TriggerProps } from '@atlaskit/popup';
|
|
15
|
+
import type { Value } from '@atlaskit/smart-user-picker';
|
|
16
|
+
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
17
|
+
|
|
18
|
+
// @public (undocumented)
|
|
19
|
+
export const ADMIN_NOTIFIED = 'admin-notified';
|
|
20
|
+
|
|
21
|
+
// @public (undocumented)
|
|
22
|
+
type Comment_2 = {
|
|
23
|
+
format: 'plain_text' | 'adf';
|
|
24
|
+
value: string;
|
|
25
|
+
};
|
|
26
|
+
export { Comment_2 as Comment };
|
|
27
|
+
|
|
28
|
+
// @public (undocumented)
|
|
29
|
+
export type ConfigResponse = {
|
|
30
|
+
disableSharingToEmails?: boolean;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
// @public (undocumented)
|
|
34
|
+
export type Content = {
|
|
35
|
+
ari: string;
|
|
36
|
+
link: string;
|
|
37
|
+
title: string;
|
|
38
|
+
type: string;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
// @public (undocumented)
|
|
42
|
+
export type DialogContentState = {
|
|
43
|
+
users: OptionData[];
|
|
44
|
+
comment: Comment_2;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
// @public (undocumented)
|
|
48
|
+
export type DialogPlacement = Placement;
|
|
49
|
+
|
|
50
|
+
// @public (undocumented)
|
|
51
|
+
export type Flag = {
|
|
52
|
+
appearance: 'success';
|
|
53
|
+
title: MessageDescriptor;
|
|
54
|
+
type: FlagType;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
// @public (undocumented)
|
|
58
|
+
export type FlagType = 'object-shared' | 'admin-notified';
|
|
59
|
+
|
|
60
|
+
// @public (undocumented)
|
|
61
|
+
export type FormChildrenArgs<T> = {
|
|
62
|
+
formProps: React.DetailedHTMLProps<
|
|
63
|
+
React.FormHTMLAttributes<HTMLFormElement>,
|
|
64
|
+
HTMLFormElement
|
|
65
|
+
>;
|
|
66
|
+
getValues: () => T;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
// @public (undocumented)
|
|
70
|
+
export type KeysOfType<T, TProp> = {
|
|
71
|
+
[P in keyof T]: T[P] extends TProp ? P : never;
|
|
72
|
+
}[keyof T];
|
|
73
|
+
|
|
74
|
+
// @public (undocumented)
|
|
75
|
+
export type MessageDescriptor = {
|
|
76
|
+
id: string;
|
|
77
|
+
description: string;
|
|
78
|
+
defaultMessage: string;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
// @public (undocumented)
|
|
82
|
+
export type MetaData = {
|
|
83
|
+
productId: string;
|
|
84
|
+
atlOriginId: string;
|
|
85
|
+
shareeAction?: 'view' | 'edit';
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
// @public (undocumented)
|
|
89
|
+
export const OBJECT_SHARED = 'object-shared';
|
|
90
|
+
|
|
91
|
+
// @public (undocumented)
|
|
92
|
+
export type OriginAnalyticAttributes = {
|
|
93
|
+
hasGeneratedId: boolean;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
// @public (undocumented)
|
|
97
|
+
export type OriginTracing = {
|
|
98
|
+
id: string;
|
|
99
|
+
addToUrl: (link: string) => string;
|
|
100
|
+
toAnalyticsAttributes: (
|
|
101
|
+
attrs: OriginAnalyticAttributes,
|
|
102
|
+
) => OriginTracingWithIdGenerated | OriginTracingForSubSequentEvents;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
// @public (undocumented)
|
|
106
|
+
export type OriginTracingFactory = () => OriginTracing;
|
|
107
|
+
|
|
108
|
+
// @public (undocumented)
|
|
109
|
+
export type OriginTracingForSubSequentEvents = {
|
|
110
|
+
originId: string;
|
|
111
|
+
originProduct: string;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
// @public (undocumented)
|
|
115
|
+
export type OriginTracingWithIdGenerated = {
|
|
116
|
+
originIdGenerated: string;
|
|
117
|
+
originProduct: string;
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
// @public
|
|
121
|
+
export type ProductId =
|
|
122
|
+
| 'bitbucket'
|
|
123
|
+
| 'confluence'
|
|
124
|
+
| 'jira-addon'
|
|
125
|
+
| 'jira-core'
|
|
126
|
+
| 'jira-platform'
|
|
127
|
+
| 'jira-polaris'
|
|
128
|
+
| 'jira-portfolio'
|
|
129
|
+
| 'jira-servicedesk'
|
|
130
|
+
| 'jira-software'
|
|
131
|
+
| 'jira-unknown'
|
|
132
|
+
| 'trello';
|
|
133
|
+
|
|
134
|
+
// @public (undocumented)
|
|
135
|
+
export type ProductName = 'jira' | 'confluence';
|
|
136
|
+
|
|
137
|
+
// @public (undocumented)
|
|
138
|
+
export type RenderCustomTriggerButton = (
|
|
139
|
+
args: {
|
|
140
|
+
error?: ShareError;
|
|
141
|
+
isDisabled?: boolean;
|
|
142
|
+
isSelected?: boolean;
|
|
143
|
+
onClick: () => void;
|
|
144
|
+
},
|
|
145
|
+
triggerProps: TriggerProps,
|
|
146
|
+
) => React.ReactNode;
|
|
147
|
+
|
|
148
|
+
// @public (undocumented)
|
|
149
|
+
export type ShareButtonStyle = 'icon-only' | 'icon-with-text' | 'text-only';
|
|
150
|
+
|
|
151
|
+
// @public (undocumented)
|
|
152
|
+
export type ShareContentState = {
|
|
153
|
+
users: User[];
|
|
154
|
+
comment?: Comment_2;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
// @public (undocumented)
|
|
158
|
+
export const ShareDialogContainer: React_2.ForwardRefExoticComponent<
|
|
159
|
+
Pick<
|
|
160
|
+
Omit<
|
|
161
|
+
WithAnalyticsEventsProps & ShareDialogContainerProps,
|
|
162
|
+
keyof WithAnalyticsEventsProps
|
|
163
|
+
>,
|
|
164
|
+
| 'onTriggerButtonClick'
|
|
165
|
+
| 'isAutoOpenDialog'
|
|
166
|
+
| 'shouldCloseOnEscapePress'
|
|
167
|
+
| 'dialogPlacement'
|
|
168
|
+
| 'loadUserOptions'
|
|
169
|
+
| 'onDialogOpen'
|
|
170
|
+
| 'onDialogClose'
|
|
171
|
+
| 'onUserSelectionChange'
|
|
172
|
+
| 'renderCustomTriggerButton'
|
|
173
|
+
| 'shareContentType'
|
|
174
|
+
| 'shareFormTitle'
|
|
175
|
+
| 'shareFormHelperMessage'
|
|
176
|
+
| 'showFlags'
|
|
177
|
+
| 'loggedInAccountId'
|
|
178
|
+
| 'triggerButtonAppearance'
|
|
179
|
+
| 'triggerButtonIcon'
|
|
180
|
+
| 'triggerButtonStyle'
|
|
181
|
+
| 'triggerButtonTooltipPosition'
|
|
182
|
+
| 'triggerButtonTooltipText'
|
|
183
|
+
| 'cloudId'
|
|
184
|
+
| 'bottomMessage'
|
|
185
|
+
| 'customFooter'
|
|
186
|
+
| 'isCopyDisabled'
|
|
187
|
+
| 'isPublicLink'
|
|
188
|
+
| 'integrationMode'
|
|
189
|
+
| 'shareFieldsFooter'
|
|
190
|
+
| 'shareIntegrations'
|
|
191
|
+
| 'shareAri'
|
|
192
|
+
| 'tabIndex'
|
|
193
|
+
| 'copyTooltipText'
|
|
194
|
+
| 'dialogZIndex'
|
|
195
|
+
| 'orgId'
|
|
196
|
+
| 'shareClient'
|
|
197
|
+
| 'urlShortenerClient'
|
|
198
|
+
| 'shortLinkData'
|
|
199
|
+
| 'formatCopyLink'
|
|
200
|
+
| 'originTracingFactory'
|
|
201
|
+
| 'productId'
|
|
202
|
+
| 'shareLink'
|
|
203
|
+
| 'shareTitle'
|
|
204
|
+
| 'useUrlShortener'
|
|
205
|
+
> &
|
|
206
|
+
Partial<
|
|
207
|
+
Pick<
|
|
208
|
+
Omit<
|
|
209
|
+
WithAnalyticsEventsProps & ShareDialogContainerProps,
|
|
210
|
+
keyof WithAnalyticsEventsProps
|
|
211
|
+
>,
|
|
212
|
+
'enableSmartUserPicker' | 'product' | 'shareeAction'
|
|
213
|
+
>
|
|
214
|
+
> &
|
|
215
|
+
Partial<
|
|
216
|
+
Pick<
|
|
217
|
+
{
|
|
218
|
+
enableSmartUserPicker: boolean;
|
|
219
|
+
shareeAction: 'view' | 'edit';
|
|
220
|
+
product: string;
|
|
221
|
+
},
|
|
222
|
+
never
|
|
223
|
+
>
|
|
224
|
+
> &
|
|
225
|
+
React_2.RefAttributes<any>
|
|
226
|
+
>;
|
|
227
|
+
|
|
228
|
+
// @public (undocumented)
|
|
229
|
+
export type ShareDialogContainerProps = {
|
|
230
|
+
onTriggerButtonClick?: () => void;
|
|
231
|
+
onDialogOpen?: () => void;
|
|
232
|
+
onDialogClose?: () => void;
|
|
233
|
+
isAutoOpenDialog?: boolean;
|
|
234
|
+
shareClient?: ShareClient;
|
|
235
|
+
urlShortenerClient?: UrlShortenerClient;
|
|
236
|
+
shortLinkData?: ShortenRequest;
|
|
237
|
+
cloudId: string;
|
|
238
|
+
orgId?: string;
|
|
239
|
+
dialogPlacement?: DialogPlacement;
|
|
240
|
+
dialogZIndex?: number;
|
|
241
|
+
formatCopyLink?: (origin: OriginTracing, link: string) => string;
|
|
242
|
+
loadUserOptions?: LoadOptions;
|
|
243
|
+
originTracingFactory: OriginTracingFactory;
|
|
244
|
+
productId: ProductId;
|
|
245
|
+
renderCustomTriggerButton?: RenderCustomTriggerButton;
|
|
246
|
+
shareAri: string;
|
|
247
|
+
shareContentType: string;
|
|
248
|
+
shareLink?: string;
|
|
249
|
+
shareTitle: string;
|
|
250
|
+
shareFormTitle?: React.ReactNode;
|
|
251
|
+
shareFormHelperMessage?: string;
|
|
252
|
+
shouldCloseOnEscapePress?: boolean;
|
|
253
|
+
showFlags: (flags: Array<Flag>) => void;
|
|
254
|
+
enableSmartUserPicker?: boolean;
|
|
255
|
+
loggedInAccountId?: string;
|
|
256
|
+
triggerButtonAppearance?: Appearance;
|
|
257
|
+
triggerButtonIcon?: React.ComponentType<IconProps>;
|
|
258
|
+
triggerButtonStyle?: ShareButtonStyle;
|
|
259
|
+
triggerButtonTooltipPosition?: TooltipPosition;
|
|
260
|
+
triggerButtonTooltipText?: React.ReactNode;
|
|
261
|
+
bottomMessage?: React.ReactNode;
|
|
262
|
+
useUrlShortener?: boolean;
|
|
263
|
+
shareeAction?: 'view' | 'edit';
|
|
264
|
+
product?: ProductName;
|
|
265
|
+
customFooter?: React.ReactNode;
|
|
266
|
+
onUserSelectionChange?: (value: Value) => void;
|
|
267
|
+
shareFieldsFooter?: React.ReactNode;
|
|
268
|
+
isCopyDisabled?: boolean;
|
|
269
|
+
isPublicLink?: boolean;
|
|
270
|
+
integrationMode?: IntegrationMode;
|
|
271
|
+
shareIntegrations?: Array<Integration>;
|
|
272
|
+
tabIndex?: number;
|
|
273
|
+
copyTooltipText?: string;
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
// @public (undocumented)
|
|
277
|
+
export type ShareError = {
|
|
278
|
+
message: string;
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
// @public (undocumented)
|
|
282
|
+
export type ShareRequest = (
|
|
283
|
+
content: Content,
|
|
284
|
+
recipients: User[],
|
|
285
|
+
metadata: MetaData,
|
|
286
|
+
comment?: Comment_2,
|
|
287
|
+
) => Promise<ShareResponse>;
|
|
288
|
+
|
|
289
|
+
// @public (undocumented)
|
|
290
|
+
export type ShareResponse = {
|
|
291
|
+
shareRequestId: string;
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
// @public (undocumented)
|
|
295
|
+
export type TooltipPosition = 'top' | 'right' | 'bottom' | 'left' | 'mouse';
|
|
296
|
+
|
|
297
|
+
// @public (undocumented)
|
|
298
|
+
export type User = UserWithId | UserWithEmail;
|
|
299
|
+
|
|
300
|
+
// @public (undocumented)
|
|
301
|
+
export type UserWithEmail = {
|
|
302
|
+
type: 'user';
|
|
303
|
+
email: string;
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
// @public (undocumented)
|
|
307
|
+
export type UserWithId = {
|
|
308
|
+
type: 'user' | 'group' | 'team';
|
|
309
|
+
id: string;
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
// (No @packageDocumentation comment for this package)
|
|
313
|
+
```
|