@atlaskit/share 6.18.4 → 6.18.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 +6 -0
- package/dist/cjs/components/ShareDialogContainer.js +5 -18
- package/dist/cjs/components/analytics/analytics.js +2 -12
- package/dist/es2019/components/ShareDialogContainer.js +1 -14
- package/dist/es2019/components/analytics/analytics.js +1 -9
- package/dist/esm/components/ShareDialogContainer.js +6 -19
- package/dist/esm/components/analytics/analytics.js +1 -11
- package/dist/types/components/analytics/analytics.d.ts +0 -8
- package/dist/types-ts4.5/components/analytics/analytics.d.ts +0 -8
- package/package.json +3 -6
package/CHANGELOG.md
CHANGED
|
@@ -72,7 +72,6 @@ var ShareDialogContainerInternal = exports.ShareDialogContainerInternal = /*#__P
|
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
74
|
(0, _defineProperty2.default)(_this, "fetchConfig", function () {
|
|
75
|
-
var startTime = Date.now();
|
|
76
75
|
_this.setState({
|
|
77
76
|
isFetchingConfig: true
|
|
78
77
|
}, /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
@@ -93,16 +92,10 @@ var ShareDialogContainerInternal = exports.ShareDialogContainerInternal = /*#__P
|
|
|
93
92
|
});
|
|
94
93
|
}
|
|
95
94
|
_ufoExperiences.renderShareDialogExp.success();
|
|
96
|
-
|
|
97
|
-
_this.createAndFireEvent((0, _analytics.shareConfigurationLoaded)({
|
|
98
|
-
disableSharingToEmails: config.disableSharingToEmails,
|
|
99
|
-
durationMs: Date.now() - startTime
|
|
100
|
-
}));
|
|
101
|
-
}
|
|
102
|
-
_context.next = 17;
|
|
95
|
+
_context.next = 15;
|
|
103
96
|
break;
|
|
104
|
-
case
|
|
105
|
-
_context.prev =
|
|
97
|
+
case 9:
|
|
98
|
+
_context.prev = 9;
|
|
106
99
|
_context.t0 = _context["catch"](0);
|
|
107
100
|
if (_this._isMounted) {
|
|
108
101
|
_this.setState({
|
|
@@ -117,17 +110,11 @@ var ShareDialogContainerInternal = exports.ShareDialogContainerInternal = /*#__P
|
|
|
117
110
|
});
|
|
118
111
|
}
|
|
119
112
|
(0, _ufoExperienceHelper.isValidFailedExperience)(_ufoExperiences.renderShareDialogExp, errObj);
|
|
120
|
-
|
|
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:
|
|
113
|
+
case 15:
|
|
127
114
|
case "end":
|
|
128
115
|
return _context.stop();
|
|
129
116
|
}
|
|
130
|
-
}, _callee, null, [[0,
|
|
117
|
+
}, _callee, null, [[0, 9]]);
|
|
131
118
|
})));
|
|
132
119
|
});
|
|
133
120
|
(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.
|
|
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;
|
|
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: "
|
|
16
|
+
packageVersion: "6.18.4"
|
|
17
17
|
}, attributes);
|
|
18
18
|
};
|
|
19
19
|
var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
|
|
@@ -93,16 +93,6 @@ 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
|
-
};
|
|
106
96
|
var copyLinkButtonClicked = exports.copyLinkButtonClicked = function copyLinkButtonClicked(_ref2) {
|
|
107
97
|
var start = _ref2.start,
|
|
108
98
|
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,
|
|
12
|
+
import { CHANNEL_ID, copyLinkButtonClicked, errorEncountered, 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,7 +48,6 @@ export class ShareDialogContainerInternal extends React.Component {
|
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
_defineProperty(this, "fetchConfig", () => {
|
|
51
|
-
const startTime = Date.now();
|
|
52
51
|
this.setState({
|
|
53
52
|
isFetchingConfig: true
|
|
54
53
|
}, async () => {
|
|
@@ -62,12 +61,6 @@ export class ShareDialogContainerInternal extends React.Component {
|
|
|
62
61
|
});
|
|
63
62
|
}
|
|
64
63
|
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
|
-
}
|
|
71
64
|
} catch (error) {
|
|
72
65
|
if (this._isMounted) {
|
|
73
66
|
this.setState({
|
|
@@ -85,12 +78,6 @@ export class ShareDialogContainerInternal extends React.Component {
|
|
|
85
78
|
};
|
|
86
79
|
}
|
|
87
80
|
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
|
-
}
|
|
94
81
|
}
|
|
95
82
|
});
|
|
96
83
|
});
|
|
@@ -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: "
|
|
4
|
+
packageVersion: "6.18.4",
|
|
5
5
|
...attributes
|
|
6
6
|
});
|
|
7
7
|
const createEvent = (eventType, source, action, actionSubject, actionSubjectId, attributes = {}) => ({
|
|
@@ -54,14 +54,6 @@ 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
|
-
});
|
|
65
57
|
export const copyLinkButtonClicked = ({
|
|
66
58
|
start,
|
|
67
59
|
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,
|
|
27
|
+
import { CHANNEL_ID, copyLinkButtonClicked, errorEncountered, 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,7 +65,6 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
|
|
|
65
65
|
}
|
|
66
66
|
});
|
|
67
67
|
_defineProperty(_this, "fetchConfig", function () {
|
|
68
|
-
var startTime = Date.now();
|
|
69
68
|
_this.setState({
|
|
70
69
|
isFetchingConfig: true
|
|
71
70
|
}, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
@@ -86,16 +85,10 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
|
|
|
86
85
|
});
|
|
87
86
|
}
|
|
88
87
|
renderShareDialogExp.success();
|
|
89
|
-
|
|
90
|
-
_this.createAndFireEvent(shareConfigurationLoaded({
|
|
91
|
-
disableSharingToEmails: config.disableSharingToEmails,
|
|
92
|
-
durationMs: Date.now() - startTime
|
|
93
|
-
}));
|
|
94
|
-
}
|
|
95
|
-
_context.next = 17;
|
|
88
|
+
_context.next = 15;
|
|
96
89
|
break;
|
|
97
|
-
case
|
|
98
|
-
_context.prev =
|
|
90
|
+
case 9:
|
|
91
|
+
_context.prev = 9;
|
|
99
92
|
_context.t0 = _context["catch"](0);
|
|
100
93
|
if (_this._isMounted) {
|
|
101
94
|
_this.setState({
|
|
@@ -110,17 +103,11 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
|
|
|
110
103
|
});
|
|
111
104
|
}
|
|
112
105
|
isValidFailedExperience(renderShareDialogExp, errObj);
|
|
113
|
-
|
|
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:
|
|
106
|
+
case 15:
|
|
120
107
|
case "end":
|
|
121
108
|
return _context.stop();
|
|
122
109
|
}
|
|
123
|
-
}, _callee, null, [[0,
|
|
110
|
+
}, _callee, null, [[0, 9]]);
|
|
124
111
|
})));
|
|
125
112
|
});
|
|
126
113
|
_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: "
|
|
9
|
+
packageVersion: "6.18.4"
|
|
10
10
|
}, attributes);
|
|
11
11
|
};
|
|
12
12
|
var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
|
|
@@ -86,16 +86,6 @@ 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
|
-
};
|
|
99
89
|
export var copyLinkButtonClicked = function copyLinkButtonClicked(_ref2) {
|
|
100
90
|
var start = _ref2.start,
|
|
101
91
|
shareContentType = _ref2.shareContentType,
|
|
@@ -17,14 +17,6 @@ export declare const shareMenuItemClicked: (subjectId: MenuItemSubjectIdType, sh
|
|
|
17
17
|
export declare const cancelShare: (start: number) => AnalyticsEventPayload;
|
|
18
18
|
export declare const shortUrlRequested: () => AnalyticsEventPayload;
|
|
19
19
|
export declare const shortUrlGenerated: (start: number, tooSlow: boolean) => AnalyticsEventPayload;
|
|
20
|
-
export declare const shareConfigurationLoaded: (attributes: {
|
|
21
|
-
disableSharingToEmails: boolean | undefined;
|
|
22
|
-
durationMs: number;
|
|
23
|
-
}) => AnalyticsEventPayload;
|
|
24
|
-
export declare const shareConfigurationLoadFailed: (attributes: {
|
|
25
|
-
durationMs: number;
|
|
26
|
-
statusCode: string | number | undefined;
|
|
27
|
-
}) => AnalyticsEventPayload;
|
|
28
20
|
export declare const copyLinkButtonClicked: ({ start, shareContentType, shareContentSubType, shareContentId, shareOrigin, isPublicLink, ari, }: {
|
|
29
21
|
ari?: string;
|
|
30
22
|
isPublicLink?: boolean;
|
|
@@ -17,14 +17,6 @@ export declare const shareMenuItemClicked: (subjectId: MenuItemSubjectIdType, sh
|
|
|
17
17
|
export declare const cancelShare: (start: number) => AnalyticsEventPayload;
|
|
18
18
|
export declare const shortUrlRequested: () => AnalyticsEventPayload;
|
|
19
19
|
export declare const shortUrlGenerated: (start: number, tooSlow: boolean) => AnalyticsEventPayload;
|
|
20
|
-
export declare const shareConfigurationLoaded: (attributes: {
|
|
21
|
-
disableSharingToEmails: boolean | undefined;
|
|
22
|
-
durationMs: number;
|
|
23
|
-
}) => AnalyticsEventPayload;
|
|
24
|
-
export declare const shareConfigurationLoadFailed: (attributes: {
|
|
25
|
-
durationMs: number;
|
|
26
|
-
statusCode: string | number | undefined;
|
|
27
|
-
}) => AnalyticsEventPayload;
|
|
28
20
|
export declare const copyLinkButtonClicked: ({ start, shareContentType, shareContentSubType, shareContentId, shareOrigin, isPublicLink, ari, }: {
|
|
29
21
|
ari?: string;
|
|
30
22
|
isPublicLink?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/share",
|
|
3
|
-
"version": "6.18.
|
|
3
|
+
"version": "6.18.5",
|
|
4
4
|
"description": "Fabric Share Element",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@atlaskit/popup": "^4.13.0",
|
|
53
53
|
"@atlaskit/portal": "^5.2.0",
|
|
54
54
|
"@atlaskit/primitives": "^18.0.0",
|
|
55
|
-
"@atlaskit/smart-user-picker": "^
|
|
55
|
+
"@atlaskit/smart-user-picker": "^9.0.0",
|
|
56
56
|
"@atlaskit/spinner": "^19.0.0",
|
|
57
57
|
"@atlaskit/tabs": "^18.3.0",
|
|
58
58
|
"@atlaskit/textarea": "^8.2.0",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@atlaskit/tokens": "^11.0.0",
|
|
61
61
|
"@atlaskit/tooltip": "^20.14.0",
|
|
62
62
|
"@atlaskit/ufo": "^0.4.0",
|
|
63
|
-
"@atlaskit/user-picker": "^11.
|
|
63
|
+
"@atlaskit/user-picker": "^11.22.0",
|
|
64
64
|
"@atlaskit/util-service-support": "^6.3.0",
|
|
65
65
|
"@babel/runtime": "^7.0.0",
|
|
66
66
|
"@emotion/react": "^11.7.1",
|
|
@@ -134,9 +134,6 @@
|
|
|
134
134
|
"page_shared_event_from_share_dialogue": {
|
|
135
135
|
"type": "boolean"
|
|
136
136
|
},
|
|
137
|
-
"jira-warepil-track-sharing-to-email-disabled": {
|
|
138
|
-
"type": "boolean"
|
|
139
|
-
},
|
|
140
137
|
"jfind-copy-link-modal-invite-tooltip": {
|
|
141
138
|
"type": "boolean"
|
|
142
139
|
},
|