@atlaskit/share 6.16.3 → 6.16.5
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 +14 -0
- package/afm-cc/tsconfig.json +2 -2
- package/afm-townsquare/tsconfig.json +99 -0
- package/clients/package.json +1 -1
- package/copy-link-button/package.json +1 -1
- package/dist/cjs/components/ShareDialogContainer.js +18 -5
- package/dist/cjs/components/analytics/analytics.js +12 -2
- package/dist/es2019/components/ShareDialogContainer.js +14 -1
- package/dist/es2019/components/analytics/analytics.js +9 -1
- package/dist/esm/components/ShareDialogContainer.js +19 -6
- package/dist/esm/components/analytics/analytics.js +11 -1
- package/dist/types/clients/AtlassianUrlShortenerClient.d.ts +2 -2
- package/dist/types/clients/ShareServiceClient.d.ts +1 -1
- package/dist/types/components/CopyLinkButton.d.ts +6 -6
- package/dist/types/components/CopyLinkButtonNext.d.ts +6 -6
- package/dist/types/components/ErrorBoundary.d.ts +1 -1
- package/dist/types/components/IntegrationButton.d.ts +1 -1
- package/dist/types/components/IntegrationButtonNext.d.ts +1 -1
- package/dist/types/components/IntegrationForm.d.ts +1 -1
- package/dist/types/components/LazyShareForm/LazyShareForm.d.ts +4 -4
- package/dist/types/components/LazyShareForm/LazyShareFormNext.d.ts +4 -4
- package/dist/types/components/ShareButton.d.ts +3 -3
- package/dist/types/components/ShareDialogContainer.d.ts +28 -28
- package/dist/types/components/ShareForm.d.ts +1 -1
- package/dist/types/components/ShareFormNext.d.ts +1 -1
- package/dist/types/components/ShareFormWrapper/ShareFormWrapper.d.ts +2 -2
- package/dist/types/components/ShareFormWrapper/compiled.d.ts +5 -5
- package/dist/types/components/ShareFormWrapper/styled.d.ts +5 -5
- package/dist/types/components/SplitButton.d.ts +6 -6
- package/dist/types/components/UserPickerField.d.ts +12 -12
- package/dist/types/components/analytics/analytics.d.ts +29 -21
- package/dist/types/types/Flag.d.ts +2 -2
- package/dist/types/types/OriginTracing.d.ts +1 -1
- package/dist/types/types/ShareContentState.d.ts +4 -4
- package/dist/types/types/ShareDialogContainer.d.ts +80 -81
- package/dist/types/types/ShareDialogWithTrigger.d.ts +12 -13
- package/dist/types/types/ShareEntities.d.ts +5 -6
- package/dist/types/types/ShareForm.d.ts +15 -16
- package/dist/types/types/User.d.ts +2 -2
- package/dist/types/types/UserPickerOptions.d.ts +12 -13
- package/dist/types/types/form.d.ts +0 -1
- package/dist/types-ts4.5/clients/AtlassianUrlShortenerClient.d.ts +2 -2
- package/dist/types-ts4.5/clients/ShareServiceClient.d.ts +1 -1
- package/dist/types-ts4.5/components/CopyLinkButton.d.ts +6 -6
- package/dist/types-ts4.5/components/CopyLinkButtonNext.d.ts +6 -6
- package/dist/types-ts4.5/components/ErrorBoundary.d.ts +1 -1
- package/dist/types-ts4.5/components/IntegrationButton.d.ts +1 -1
- package/dist/types-ts4.5/components/IntegrationButtonNext.d.ts +1 -1
- package/dist/types-ts4.5/components/IntegrationForm.d.ts +1 -1
- package/dist/types-ts4.5/components/LazyShareForm/LazyShareForm.d.ts +4 -4
- package/dist/types-ts4.5/components/LazyShareForm/LazyShareFormNext.d.ts +4 -4
- package/dist/types-ts4.5/components/ShareButton.d.ts +3 -3
- package/dist/types-ts4.5/components/ShareDialogContainer.d.ts +28 -28
- package/dist/types-ts4.5/components/ShareForm.d.ts +1 -1
- package/dist/types-ts4.5/components/ShareFormNext.d.ts +1 -1
- package/dist/types-ts4.5/components/ShareFormWrapper/ShareFormWrapper.d.ts +2 -2
- package/dist/types-ts4.5/components/ShareFormWrapper/compiled.d.ts +5 -5
- package/dist/types-ts4.5/components/ShareFormWrapper/styled.d.ts +5 -5
- package/dist/types-ts4.5/components/SplitButton.d.ts +6 -6
- package/dist/types-ts4.5/components/UserPickerField.d.ts +12 -12
- package/dist/types-ts4.5/components/analytics/analytics.d.ts +29 -21
- package/dist/types-ts4.5/types/Flag.d.ts +2 -2
- package/dist/types-ts4.5/types/OriginTracing.d.ts +1 -1
- package/dist/types-ts4.5/types/ShareContentState.d.ts +4 -4
- package/dist/types-ts4.5/types/ShareDialogContainer.d.ts +80 -81
- package/dist/types-ts4.5/types/ShareDialogWithTrigger.d.ts +12 -13
- package/dist/types-ts4.5/types/ShareEntities.d.ts +5 -6
- package/dist/types-ts4.5/types/ShareForm.d.ts +15 -16
- package/dist/types-ts4.5/types/User.d.ts +2 -2
- package/dist/types-ts4.5/types/UserPickerOptions.d.ts +12 -13
- package/dist/types-ts4.5/types/form.d.ts +0 -1
- package/package.json +11 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/share
|
|
2
2
|
|
|
3
|
+
## 6.16.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`0fdcb6f2f96fd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0fdcb6f2f96fd) -
|
|
8
|
+
Sorted type and interface props to improve Atlaskit docs
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 6.16.4
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 6.16.3
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../../../tsconfig.entry-points.townsquare.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"declaration": true,
|
|
5
|
+
"target": "es5",
|
|
6
|
+
"outDir": "../../../../../townsquare/tsDist/@atlaskit__share/app",
|
|
7
|
+
"rootDir": "../",
|
|
8
|
+
"composite": true
|
|
9
|
+
},
|
|
10
|
+
"include": [
|
|
11
|
+
"../src/**/*.ts",
|
|
12
|
+
"../src/**/*.tsx"
|
|
13
|
+
],
|
|
14
|
+
"exclude": [
|
|
15
|
+
"../src/**/__tests__/*",
|
|
16
|
+
"../src/**/*.test.*",
|
|
17
|
+
"../src/**/test.*",
|
|
18
|
+
"../src/**/examples.*",
|
|
19
|
+
"../src/**/examples/*",
|
|
20
|
+
"../src/**/examples/**/*",
|
|
21
|
+
"../src/**/*.stories.*",
|
|
22
|
+
"../src/**/stories/*",
|
|
23
|
+
"../src/**/stories/**/*"
|
|
24
|
+
],
|
|
25
|
+
"references": [
|
|
26
|
+
{
|
|
27
|
+
"path": "../../../analytics/analytics-next/afm-townsquare/tsconfig.json"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"path": "../../../design-system/button/afm-townsquare/tsconfig.json"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"path": "../../../design-system/css/afm-townsquare/tsconfig.json"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"path": "../../../design-system/dropdown-menu/afm-townsquare/tsconfig.json"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"path": "../../../design-system/form/afm-townsquare/tsconfig.json"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"path": "../../../design-system/heading/afm-townsquare/tsconfig.json"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"path": "../../../design-system/icon/afm-townsquare/tsconfig.json"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"path": "../../../design-system/link/afm-townsquare/tsconfig.json"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"path": "../../../design-system/menu/afm-townsquare/tsconfig.json"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"path": "../../../platform/feature-flags/afm-townsquare/tsconfig.json"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"path": "../../../design-system/popper/afm-townsquare/tsconfig.json"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"path": "../../../design-system/popup/afm-townsquare/tsconfig.json"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"path": "../../../design-system/portal/afm-townsquare/tsconfig.json"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"path": "../../../design-system/primitives/afm-townsquare/tsconfig.json"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"path": "../../../smart-experiences/smart-user-picker/afm-townsquare/tsconfig.json"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"path": "../../../design-system/spinner/afm-townsquare/tsconfig.json"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"path": "../../../design-system/tabs/afm-townsquare/tsconfig.json"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"path": "../../../design-system/textarea/afm-townsquare/tsconfig.json"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"path": "../../../design-system/theme/afm-townsquare/tsconfig.json"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"path": "../../../design-system/tokens/afm-townsquare/tsconfig.json"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"path": "../../../design-system/tooltip/afm-townsquare/tsconfig.json"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"path": "../../../data/ufo-external/afm-townsquare/tsconfig.json"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"path": "../../user-picker/afm-townsquare/tsconfig.json"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"path": "../../util-service-support/afm-townsquare/tsconfig.json"
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
}
|
package/clients/package.json
CHANGED
|
@@ -72,6 +72,7 @@ var ShareDialogContainerInternal = exports.ShareDialogContainerInternal = /*#__P
|
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
74
|
(0, _defineProperty2.default)(_this, "fetchConfig", function () {
|
|
75
|
+
var startTime = Date.now();
|
|
75
76
|
_this.setState({
|
|
76
77
|
isFetchingConfig: true
|
|
77
78
|
}, /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
@@ -92,10 +93,16 @@ var ShareDialogContainerInternal = exports.ShareDialogContainerInternal = /*#__P
|
|
|
92
93
|
});
|
|
93
94
|
}
|
|
94
95
|
_ufoExperiences.renderShareDialogExp.success();
|
|
95
|
-
|
|
96
|
+
if ((0, _platformFeatureFlags.fg)('jira-warepil-track-sharing-to-email-disabled')) {
|
|
97
|
+
_this.createAndFireEvent((0, _analytics.shareConfigurationLoaded)({
|
|
98
|
+
disableSharingToEmails: config.disableSharingToEmails,
|
|
99
|
+
durationMs: Date.now() - startTime
|
|
100
|
+
}));
|
|
101
|
+
}
|
|
102
|
+
_context.next = 17;
|
|
96
103
|
break;
|
|
97
|
-
case
|
|
98
|
-
_context.prev =
|
|
104
|
+
case 10:
|
|
105
|
+
_context.prev = 10;
|
|
99
106
|
_context.t0 = _context["catch"](0);
|
|
100
107
|
if (_this._isMounted) {
|
|
101
108
|
_this.setState({
|
|
@@ -110,11 +117,17 @@ var ShareDialogContainerInternal = exports.ShareDialogContainerInternal = /*#__P
|
|
|
110
117
|
});
|
|
111
118
|
}
|
|
112
119
|
(0, _ufoExperienceHelper.isValidFailedExperience)(_ufoExperiences.renderShareDialogExp, errObj);
|
|
113
|
-
|
|
120
|
+
if ((0, _platformFeatureFlags.fg)('jira-warepil-track-sharing-to-email-disabled')) {
|
|
121
|
+
_this.createAndFireEvent((0, _analytics.shareConfigurationLoadFailed)({
|
|
122
|
+
statusCode: _context.t0.code || _context.t0.status || _context.t0.statusCode,
|
|
123
|
+
durationMs: Date.now() - startTime
|
|
124
|
+
}));
|
|
125
|
+
}
|
|
126
|
+
case 17:
|
|
114
127
|
case "end":
|
|
115
128
|
return _context.stop();
|
|
116
129
|
}
|
|
117
|
-
}, _callee, null, [[0,
|
|
130
|
+
}, _callee, null, [[0, 10]]);
|
|
118
131
|
})));
|
|
119
132
|
});
|
|
120
133
|
(0, _defineProperty2.default)(_this, "handleSubmitShare", function (_ref2) {
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.shortUrlRequested = exports.shortUrlGenerated = exports.shareTriggerButtonClicked = exports.shareTabClicked = exports.shareSplitButtonEvent = exports.shareMenuItemClicked = exports.shareIntegrationButtonEvent = exports.screenEvent = exports.jiraPageSharedEvent = exports.formShareSubmitted = exports.errorEncountered = exports.copyLinkButtonClicked = exports.cancelShare = exports.INTEGRATION_MODAL_SOURCE = exports.CHANNEL_ID = exports.ANALYTICS_SOURCE = void 0;
|
|
7
|
+
exports.shortUrlRequested = exports.shortUrlGenerated = exports.shareTriggerButtonClicked = exports.shareTabClicked = exports.shareSplitButtonEvent = exports.shareMenuItemClicked = exports.shareIntegrationButtonEvent = exports.shareConfigurationLoaded = exports.shareConfigurationLoadFailed = exports.screenEvent = exports.jiraPageSharedEvent = exports.formShareSubmitted = exports.errorEncountered = exports.copyLinkButtonClicked = exports.cancelShare = exports.INTEGRATION_MODAL_SOURCE = exports.CHANNEL_ID = exports.ANALYTICS_SOURCE = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _smartUserPicker = require("@atlaskit/smart-user-picker");
|
|
10
10
|
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; }
|
|
@@ -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: "6.16.
|
|
16
|
+
packageVersion: "6.16.4"
|
|
17
17
|
}, attributes);
|
|
18
18
|
};
|
|
19
19
|
var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
|
|
@@ -93,6 +93,16 @@ var shortUrlGenerated = exports.shortUrlGenerated = function shortUrlGenerated(s
|
|
|
93
93
|
tooSlow: tooSlow
|
|
94
94
|
});
|
|
95
95
|
};
|
|
96
|
+
var shareConfigurationLoaded = exports.shareConfigurationLoaded = function shareConfigurationLoaded(attributes) {
|
|
97
|
+
return createEvent('track', ANALYTICS_SOURCE, 'loaded', 'shareConfiguration', undefined, _objectSpread({
|
|
98
|
+
source: ANALYTICS_SOURCE
|
|
99
|
+
}, attributes));
|
|
100
|
+
};
|
|
101
|
+
var shareConfigurationLoadFailed = exports.shareConfigurationLoadFailed = function shareConfigurationLoadFailed(attributes) {
|
|
102
|
+
return createEvent('track', ANALYTICS_SOURCE, 'error', 'shareConfiguration', undefined, _objectSpread({
|
|
103
|
+
source: ANALYTICS_SOURCE
|
|
104
|
+
}, attributes));
|
|
105
|
+
};
|
|
96
106
|
var copyLinkButtonClicked = exports.copyLinkButtonClicked = function copyLinkButtonClicked(_ref2) {
|
|
97
107
|
var start = _ref2.start,
|
|
98
108
|
shareContentType = _ref2.shareContentType,
|
|
@@ -9,7 +9,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
9
9
|
import { AtlassianUrlShortenerClient } from '../clients/AtlassianUrlShortenerClient';
|
|
10
10
|
import { ShareServiceClient } from '../clients/ShareServiceClient';
|
|
11
11
|
import { messages } from '../i18n';
|
|
12
|
-
import { CHANNEL_ID, copyLinkButtonClicked, errorEncountered, shortUrlGenerated, shortUrlRequested } from './analytics/analytics';
|
|
12
|
+
import { CHANNEL_ID, copyLinkButtonClicked, errorEncountered, shareConfigurationLoaded, shareConfigurationLoadFailed, shortUrlGenerated, shortUrlRequested } from './analytics/analytics';
|
|
13
13
|
import { isValidFailedExperience } from './analytics/ufoExperienceHelper';
|
|
14
14
|
import { renderShareDialogExp } from './analytics/ufoExperiences';
|
|
15
15
|
import ErrorBoundary from './ErrorBoundary';
|
|
@@ -48,6 +48,7 @@ export class ShareDialogContainerInternal extends React.Component {
|
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
_defineProperty(this, "fetchConfig", () => {
|
|
51
|
+
const startTime = Date.now();
|
|
51
52
|
this.setState({
|
|
52
53
|
isFetchingConfig: true
|
|
53
54
|
}, async () => {
|
|
@@ -61,6 +62,12 @@ export class ShareDialogContainerInternal extends React.Component {
|
|
|
61
62
|
});
|
|
62
63
|
}
|
|
63
64
|
renderShareDialogExp.success();
|
|
65
|
+
if (fg('jira-warepil-track-sharing-to-email-disabled')) {
|
|
66
|
+
this.createAndFireEvent(shareConfigurationLoaded({
|
|
67
|
+
disableSharingToEmails: config.disableSharingToEmails,
|
|
68
|
+
durationMs: Date.now() - startTime
|
|
69
|
+
}));
|
|
70
|
+
}
|
|
64
71
|
} catch (error) {
|
|
65
72
|
if (this._isMounted) {
|
|
66
73
|
this.setState({
|
|
@@ -78,6 +85,12 @@ export class ShareDialogContainerInternal extends React.Component {
|
|
|
78
85
|
};
|
|
79
86
|
}
|
|
80
87
|
isValidFailedExperience(renderShareDialogExp, errObj);
|
|
88
|
+
if (fg('jira-warepil-track-sharing-to-email-disabled')) {
|
|
89
|
+
this.createAndFireEvent(shareConfigurationLoadFailed({
|
|
90
|
+
statusCode: error.code || error.status || error.statusCode,
|
|
91
|
+
durationMs: Date.now() - startTime
|
|
92
|
+
}));
|
|
93
|
+
}
|
|
81
94
|
}
|
|
82
95
|
});
|
|
83
96
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isEmail, isExternalUser, isGroup, isTeam, isUser } from '@atlaskit/smart-user-picker';
|
|
2
2
|
const buildAttributes = (attributes = {}) => ({
|
|
3
3
|
packageName: "@atlaskit/share",
|
|
4
|
-
packageVersion: "6.16.
|
|
4
|
+
packageVersion: "6.16.4",
|
|
5
5
|
...attributes
|
|
6
6
|
});
|
|
7
7
|
const createEvent = (eventType, source, action, actionSubject, actionSubjectId, attributes = {}) => ({
|
|
@@ -54,6 +54,14 @@ export const shortUrlGenerated = (start, tooSlow) => createEvent('operational',
|
|
|
54
54
|
duration: duration(start),
|
|
55
55
|
tooSlow
|
|
56
56
|
});
|
|
57
|
+
export const shareConfigurationLoaded = attributes => createEvent('track', ANALYTICS_SOURCE, 'loaded', 'shareConfiguration', undefined, {
|
|
58
|
+
source: ANALYTICS_SOURCE,
|
|
59
|
+
...attributes
|
|
60
|
+
});
|
|
61
|
+
export const shareConfigurationLoadFailed = attributes => createEvent('track', ANALYTICS_SOURCE, 'error', 'shareConfiguration', undefined, {
|
|
62
|
+
source: ANALYTICS_SOURCE,
|
|
63
|
+
...attributes
|
|
64
|
+
});
|
|
57
65
|
export const copyLinkButtonClicked = ({
|
|
58
66
|
start,
|
|
59
67
|
shareContentType,
|
|
@@ -24,7 +24,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
24
24
|
import { AtlassianUrlShortenerClient } from '../clients/AtlassianUrlShortenerClient';
|
|
25
25
|
import { ShareServiceClient } from '../clients/ShareServiceClient';
|
|
26
26
|
import { messages } from '../i18n';
|
|
27
|
-
import { CHANNEL_ID, copyLinkButtonClicked, errorEncountered, shortUrlGenerated, shortUrlRequested } from './analytics/analytics';
|
|
27
|
+
import { CHANNEL_ID, copyLinkButtonClicked, errorEncountered, shareConfigurationLoaded, shareConfigurationLoadFailed, shortUrlGenerated, shortUrlRequested } from './analytics/analytics';
|
|
28
28
|
import { isValidFailedExperience } from './analytics/ufoExperienceHelper';
|
|
29
29
|
import { renderShareDialogExp } from './analytics/ufoExperiences';
|
|
30
30
|
import ErrorBoundary from './ErrorBoundary';
|
|
@@ -65,6 +65,7 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
|
|
|
65
65
|
}
|
|
66
66
|
});
|
|
67
67
|
_defineProperty(_this, "fetchConfig", function () {
|
|
68
|
+
var startTime = Date.now();
|
|
68
69
|
_this.setState({
|
|
69
70
|
isFetchingConfig: true
|
|
70
71
|
}, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
@@ -85,10 +86,16 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
|
|
|
85
86
|
});
|
|
86
87
|
}
|
|
87
88
|
renderShareDialogExp.success();
|
|
88
|
-
|
|
89
|
+
if (fg('jira-warepil-track-sharing-to-email-disabled')) {
|
|
90
|
+
_this.createAndFireEvent(shareConfigurationLoaded({
|
|
91
|
+
disableSharingToEmails: config.disableSharingToEmails,
|
|
92
|
+
durationMs: Date.now() - startTime
|
|
93
|
+
}));
|
|
94
|
+
}
|
|
95
|
+
_context.next = 17;
|
|
89
96
|
break;
|
|
90
|
-
case
|
|
91
|
-
_context.prev =
|
|
97
|
+
case 10:
|
|
98
|
+
_context.prev = 10;
|
|
92
99
|
_context.t0 = _context["catch"](0);
|
|
93
100
|
if (_this._isMounted) {
|
|
94
101
|
_this.setState({
|
|
@@ -103,11 +110,17 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
|
|
|
103
110
|
});
|
|
104
111
|
}
|
|
105
112
|
isValidFailedExperience(renderShareDialogExp, errObj);
|
|
106
|
-
|
|
113
|
+
if (fg('jira-warepil-track-sharing-to-email-disabled')) {
|
|
114
|
+
_this.createAndFireEvent(shareConfigurationLoadFailed({
|
|
115
|
+
statusCode: _context.t0.code || _context.t0.status || _context.t0.statusCode,
|
|
116
|
+
durationMs: Date.now() - startTime
|
|
117
|
+
}));
|
|
118
|
+
}
|
|
119
|
+
case 17:
|
|
107
120
|
case "end":
|
|
108
121
|
return _context.stop();
|
|
109
122
|
}
|
|
110
|
-
}, _callee, null, [[0,
|
|
123
|
+
}, _callee, null, [[0, 10]]);
|
|
111
124
|
})));
|
|
112
125
|
});
|
|
113
126
|
_defineProperty(_this, "handleSubmitShare", function (_ref2) {
|
|
@@ -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: "6.16.
|
|
9
|
+
packageVersion: "6.16.4"
|
|
10
10
|
}, attributes);
|
|
11
11
|
};
|
|
12
12
|
var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
|
|
@@ -86,6 +86,16 @@ export var shortUrlGenerated = function shortUrlGenerated(start, tooSlow) {
|
|
|
86
86
|
tooSlow: tooSlow
|
|
87
87
|
});
|
|
88
88
|
};
|
|
89
|
+
export var shareConfigurationLoaded = function shareConfigurationLoaded(attributes) {
|
|
90
|
+
return createEvent('track', ANALYTICS_SOURCE, 'loaded', 'shareConfiguration', undefined, _objectSpread({
|
|
91
|
+
source: ANALYTICS_SOURCE
|
|
92
|
+
}, attributes));
|
|
93
|
+
};
|
|
94
|
+
export var shareConfigurationLoadFailed = function shareConfigurationLoadFailed(attributes) {
|
|
95
|
+
return createEvent('track', ANALYTICS_SOURCE, 'error', 'shareConfiguration', undefined, _objectSpread({
|
|
96
|
+
source: ANALYTICS_SOURCE
|
|
97
|
+
}, attributes));
|
|
98
|
+
};
|
|
89
99
|
export var copyLinkButtonClicked = function copyLinkButtonClicked(_ref2) {
|
|
90
100
|
var start = _ref2.start,
|
|
91
101
|
shareContentType = _ref2.shareContentType,
|
|
@@ -5,8 +5,8 @@ export type ShareResponse = {
|
|
|
5
5
|
shareRequestId: string;
|
|
6
6
|
};
|
|
7
7
|
export interface ShareClient {
|
|
8
|
-
share: ShareRequest;
|
|
9
8
|
getConfig(cloudId: string): Promise<ConfigResponse>;
|
|
9
|
+
share: ShareRequest;
|
|
10
10
|
}
|
|
11
11
|
export type ConfigResponse = {
|
|
12
12
|
disableSharingToEmails?: boolean;
|
|
@@ -8,20 +8,20 @@ import { type TriggerProps } from '@atlaskit/popup';
|
|
|
8
8
|
export declare const AUTO_DISMISS_MS: number;
|
|
9
9
|
export declare const messageContainerStyle: import("@emotion/react").SerializedStyles;
|
|
10
10
|
type InputProps = {
|
|
11
|
-
text: string;
|
|
12
11
|
label: string;
|
|
12
|
+
text: string;
|
|
13
13
|
};
|
|
14
14
|
export declare const HiddenInput: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
15
15
|
export type Props = {
|
|
16
|
-
onLinkCopy?: (link: string) => void;
|
|
17
|
-
link: string;
|
|
18
|
-
isDisabled?: boolean;
|
|
19
|
-
copyTooltipText?: string;
|
|
20
16
|
children?: string | ReactElement;
|
|
21
|
-
copyLinkButtonText: string;
|
|
22
17
|
copiedToClipboardText: string;
|
|
18
|
+
copyLinkButtonText: string;
|
|
19
|
+
copyTooltipText?: string;
|
|
23
20
|
iconBefore?: ReactElement;
|
|
21
|
+
isDisabled?: boolean;
|
|
24
22
|
isExtendedShareDialogEnabled?: boolean;
|
|
23
|
+
link: string;
|
|
24
|
+
onLinkCopy?: (link: string) => void;
|
|
25
25
|
};
|
|
26
26
|
export type State = {
|
|
27
27
|
shouldShowCopiedMessage: boolean;
|
|
@@ -2,20 +2,20 @@ import React, { type ReactElement } from 'react';
|
|
|
2
2
|
import { type TriggerProps } from '@atlaskit/popup';
|
|
3
3
|
export declare const AUTO_DISMISS_MS: number;
|
|
4
4
|
type InputProps = {
|
|
5
|
-
text: string;
|
|
6
5
|
label: string;
|
|
6
|
+
text: string;
|
|
7
7
|
};
|
|
8
8
|
export declare const HiddenInput: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
9
9
|
export type Props = {
|
|
10
|
-
onLinkCopy?: (link: string) => void;
|
|
11
|
-
link: string;
|
|
12
|
-
isDisabled?: boolean;
|
|
13
|
-
copyTooltipText?: string;
|
|
14
10
|
children?: string | ReactElement;
|
|
15
|
-
copyLinkButtonText: string;
|
|
16
11
|
copiedToClipboardText: string;
|
|
12
|
+
copyLinkButtonText: string;
|
|
13
|
+
copyTooltipText?: string;
|
|
17
14
|
iconBefore?: ReactElement;
|
|
15
|
+
isDisabled?: boolean;
|
|
18
16
|
isExtendedShareDialogEnabled?: boolean;
|
|
17
|
+
link: string;
|
|
18
|
+
onLinkCopy?: (link: string) => void;
|
|
19
19
|
};
|
|
20
20
|
export type State = {
|
|
21
21
|
shouldShowCopiedMessage: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
3
3
|
declare const _default: React.ForwardRefExoticComponent<Omit<{
|
|
4
|
-
children?: React.ReactNode;
|
|
4
|
+
children?: React.ReactNode | undefined;
|
|
5
5
|
}, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
|
|
6
6
|
export default _default;
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { type CustomThemeButtonProps } from '@atlaskit/button/types';
|
|
7
7
|
type Props = CustomThemeButtonProps & {
|
|
8
|
-
text: React.ReactNode;
|
|
9
8
|
IntegrationIcon: React.ComponentType;
|
|
9
|
+
text: React.ReactNode;
|
|
10
10
|
textColor?: string;
|
|
11
11
|
};
|
|
12
12
|
declare const IntegrationButton: React.FC<Props>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type ButtonProps } from '@atlaskit/button/new';
|
|
3
3
|
type Props = {
|
|
4
|
-
text: React.ReactNode;
|
|
5
4
|
IntegrationIcon: React.ComponentType;
|
|
5
|
+
text: React.ReactNode;
|
|
6
6
|
} & Pick<ButtonProps, 'onClick'>;
|
|
7
7
|
declare const IntegrationButton: {
|
|
8
8
|
(props: Props): React.JSX.Element;
|
|
@@ -7,8 +7,8 @@ import { jsx } from '@emotion/react';
|
|
|
7
7
|
import { type ContentProps } from '../types';
|
|
8
8
|
export declare const formWrapperStyle: import("@emotion/react").SerializedStyles;
|
|
9
9
|
export type IntegrationFormProps = {
|
|
10
|
+
changeTab?: (index: number) => void;
|
|
10
11
|
Content: React.ComponentType<ContentProps> | null;
|
|
11
12
|
onIntegrationClose?: () => void;
|
|
12
|
-
changeTab?: (index: number) => void;
|
|
13
13
|
};
|
|
14
14
|
export declare const IntegrationForm: ({ Content, onIntegrationClose, changeTab, }: IntegrationFormProps) => jsx.JSX.Element;
|
|
@@ -3,15 +3,15 @@ import type { LoadOptions } from '@atlaskit/smart-user-picker';
|
|
|
3
3
|
import type { MenuType, ShareData, ShareDialogWithTriggerProps, ShareDialogWithTriggerStates } from '../../types';
|
|
4
4
|
import { type IntegrationFormProps } from '../IntegrationForm';
|
|
5
5
|
export type LazyShareFormProps = Pick<ShareDialogWithTriggerProps, 'copyLink' | 'config' | 'isFetchingConfig' | 'loadUserOptions' | 'shareFormTitle' | 'shareFormHelperMessage' | 'bottomMessage' | 'submitButtonLabel' | 'product' | 'productAttributes' | 'customHeader' | 'customFooter' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'cloudId' | 'shareFieldsFooter' | 'onUserSelectionChange' | 'isPublicLink' | 'copyTooltipText' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'integrationMode' | 'onDialogClose' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isMenuItemSelected' | 'isSubmitShareDisabled' | 'additionalUserFields' | 'isExtendedShareDialogEnabled' | 'CustomSubmitButton'> & Pick<ShareDialogWithTriggerStates, 'showIntegrationForm' | 'selectedIntegration' | 'isSharing' | 'shareError' | 'defaultValue'> & Pick<IntegrationFormProps, 'Content'> & {
|
|
6
|
-
|
|
6
|
+
loadOptions?: LoadOptions;
|
|
7
7
|
onDismiss: (data: ShareData) => void;
|
|
8
|
+
onLinkCopy: () => void;
|
|
9
|
+
onMenuItemChange: (menuType: MenuType) => void;
|
|
8
10
|
onSubmit: (data: ShareData) => void;
|
|
9
11
|
onTabChange: (index: number) => void;
|
|
10
|
-
onMenuItemChange: (menuType: MenuType) => void;
|
|
11
|
-
loadOptions?: LoadOptions;
|
|
12
12
|
selectPortalRef: any;
|
|
13
|
-
showTitle: boolean;
|
|
14
13
|
setIsLoading: (isLoading: boolean) => void;
|
|
14
|
+
showTitle: boolean;
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
17
17
|
* A Share form content which is lazy-loaded.
|
|
@@ -3,15 +3,15 @@ import type { LoadOptions } from '@atlaskit/smart-user-picker';
|
|
|
3
3
|
import type { MenuType, ShareData, ShareDialogWithTriggerProps, ShareDialogWithTriggerStates } from '../../types';
|
|
4
4
|
import { type IntegrationFormProps } from '../IntegrationForm';
|
|
5
5
|
export type LazyShareFormProps = Pick<ShareDialogWithTriggerProps, 'copyLink' | 'config' | 'isFetchingConfig' | 'loadUserOptions' | 'shareFormTitle' | 'shareFormHelperMessage' | 'bottomMessage' | 'submitButtonLabel' | 'product' | 'productAttributes' | 'customHeader' | 'customFooter' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'cloudId' | 'shareFieldsFooter' | 'onUserSelectionChange' | 'isPublicLink' | 'copyTooltipText' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'integrationMode' | 'onDialogClose' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isMenuItemSelected' | 'isSubmitShareDisabled' | 'additionalUserFields' | 'isExtendedShareDialogEnabled' | 'CustomSubmitButton'> & Pick<ShareDialogWithTriggerStates, 'showIntegrationForm' | 'selectedIntegration' | 'isSharing' | 'shareError' | 'defaultValue'> & Pick<IntegrationFormProps, 'Content'> & {
|
|
6
|
-
|
|
6
|
+
loadOptions?: LoadOptions;
|
|
7
7
|
onDismiss: (data: ShareData) => void;
|
|
8
|
+
onLinkCopy: () => void;
|
|
9
|
+
onMenuItemChange: (menuType: MenuType) => void;
|
|
8
10
|
onSubmit: (data: ShareData) => void;
|
|
9
11
|
onTabChange: (index: number) => void;
|
|
10
|
-
onMenuItemChange: (menuType: MenuType) => void;
|
|
11
|
-
loadOptions?: LoadOptions;
|
|
12
12
|
selectPortalRef: any;
|
|
13
|
-
showTitle: boolean;
|
|
14
13
|
setIsLoading: (isLoading: boolean) => void;
|
|
14
|
+
showTitle: boolean;
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
17
17
|
* A Share form content which is lazy-loaded.
|
|
@@ -2,14 +2,14 @@ import React from 'react';
|
|
|
2
2
|
import { type Appearance } from '@atlaskit/button/types';
|
|
3
3
|
export type Props = {
|
|
4
4
|
appearance?: Appearance;
|
|
5
|
+
'aria-haspopup'?: boolean;
|
|
6
|
+
autoFocus?: boolean;
|
|
5
7
|
iconBefore?: React.ReactChild;
|
|
8
|
+
isDisabled?: boolean;
|
|
6
9
|
isLoading?: boolean;
|
|
7
10
|
isSelected?: boolean;
|
|
8
|
-
isDisabled?: boolean;
|
|
9
11
|
onClick: (e: React.MouseEvent<HTMLElement>) => void;
|
|
10
12
|
text?: React.ReactNode;
|
|
11
|
-
autoFocus?: boolean;
|
|
12
|
-
'aria-haspopup'?: boolean;
|
|
13
13
|
};
|
|
14
14
|
export declare const ShareButton: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLElement>>;
|
|
15
15
|
export default ShareButton;
|