@atlaskit/share 4.5.3 → 4.6.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/share
2
2
 
3
+ ## 4.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#43407](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/43407) [`90c45674b3a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/90c45674b3a) - @atlaskit/share can be passed contentId & passes contentId+contentSubType to existing analytics events
8
+
9
+ ## 4.5.4
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 4.5.3
4
16
 
5
17
  ### Patch Changes
@@ -36,7 +36,9 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
36
36
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
37
37
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
38
38
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
39
- var COPY_LINK_EVENT = (0, _analytics.copyLinkButtonClicked)(0);
39
+ var COPY_LINK_EVENT = (0, _analytics.copyLinkButtonClicked)({
40
+ start: 0
41
+ });
40
42
  var defaultConfig = exports.defaultConfig = {
41
43
  disableSharingToEmails: false
42
44
  };
@@ -326,6 +328,7 @@ var ShareDialogContainerInternal = exports.ShareDialogContainerInternal = /*#__P
326
328
  renderCustomTriggerButton = _this$props2.renderCustomTriggerButton,
327
329
  shareContentType = _this$props2.shareContentType,
328
330
  shareContentSubType = _this$props2.shareContentSubType,
331
+ shareContentId = _this$props2.shareContentId,
329
332
  shareFormTitle = _this$props2.shareFormTitle,
330
333
  shareFormHelperMessage = _this$props2.shareFormHelperMessage,
331
334
  shouldCloseOnEscapePress = _this$props2.shouldCloseOnEscapePress,
@@ -370,6 +373,7 @@ var ShareDialogContainerInternal = exports.ShareDialogContainerInternal = /*#__P
370
373
  renderCustomTriggerButton: renderCustomTriggerButton,
371
374
  shareContentType: shareContentType,
372
375
  shareContentSubType: shareContentSubType,
376
+ shareContentId: shareContentId,
373
377
  shareFormTitle: shareFormTitle,
374
378
  shareFormHelperMessage: shareFormHelperMessage,
375
379
  copyLinkOrigin: this.getCopyLinkOriginTracing(),
@@ -237,10 +237,11 @@ var ShareDialogWithTriggerInternal = exports.ShareDialogWithTriggerInternal = /*
237
237
  var _this$props4 = _this.props,
238
238
  onShareSubmit = _this$props4.onShareSubmit,
239
239
  shareContentType = _this$props4.shareContentType,
240
+ shareContentSubType = _this$props4.shareContentSubType,
241
+ shareContentId = _this$props4.shareContentId,
240
242
  formShareOrigin = _this$props4.formShareOrigin,
241
243
  showFlags = _this$props4.showFlags,
242
- isPublicLink = _this$props4.isPublicLink,
243
- shareContentSubType = _this$props4.shareContentSubType;
244
+ isPublicLink = _this$props4.isPublicLink;
244
245
  if (!onShareSubmit) {
245
246
  return;
246
247
  }
@@ -248,7 +249,15 @@ var ShareDialogWithTriggerInternal = exports.ShareDialogWithTriggerInternal = /*
248
249
  _this.setState({
249
250
  isSharing: true
250
251
  });
251
- _this.createAndFireEvent((0, _analytics.formShareSubmitted)(_this.start, data, shareContentType, formShareOrigin, isPublicLink, shareContentSubType));
252
+ _this.createAndFireEvent((0, _analytics.formShareSubmitted)({
253
+ start: _this.start,
254
+ data: data,
255
+ shareContentType: shareContentType,
256
+ shareOrigin: formShareOrigin,
257
+ isPublicLink: isPublicLink,
258
+ shareContentSubType: shareContentSubType,
259
+ shareContentId: shareContentId
260
+ }));
252
261
  onShareSubmit(data).then(function () {
253
262
  _this.closeAndResetDialog();
254
263
  _this.setState({
@@ -299,9 +308,19 @@ var ShareDialogWithTriggerInternal = exports.ShareDialogWithTriggerInternal = /*
299
308
  var _this$props5 = _this.props,
300
309
  copyLinkOrigin = _this$props5.copyLinkOrigin,
301
310
  shareContentType = _this$props5.shareContentType,
311
+ shareContentSubType = _this$props5.shareContentSubType,
312
+ shareContentId = _this$props5.shareContentId,
302
313
  isPublicLink = _this$props5.isPublicLink,
303
314
  shareAri = _this$props5.shareAri;
304
- _this.createAndFireEvent((0, _analytics.copyLinkButtonClicked)(_this.start, shareContentType, copyLinkOrigin, isPublicLink, shareAri));
315
+ _this.createAndFireEvent((0, _analytics.copyLinkButtonClicked)({
316
+ start: _this.start,
317
+ shareContentType: shareContentType,
318
+ shareOrigin: copyLinkOrigin,
319
+ isPublicLink: isPublicLink,
320
+ ari: shareAri,
321
+ shareContentSubType: shareContentSubType,
322
+ shareContentId: shareContentId
323
+ }));
305
324
  });
306
325
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleIntegrationClick", function (integration) {
307
326
  _this.setState({
@@ -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.5.3"
16
+ packageVersion: "4.6.0"
17
17
  }, attributes);
18
18
  };
19
19
  var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
@@ -88,22 +88,36 @@ var shortUrlGenerated = exports.shortUrlGenerated = function shortUrlGenerated(s
88
88
  tooSlow: tooSlow
89
89
  });
90
90
  };
91
- var copyLinkButtonClicked = exports.copyLinkButtonClicked = function copyLinkButtonClicked(start, shareContentType, shareOrigin) {
92
- var isPublicLink = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
93
- var ari = arguments.length > 4 ? arguments[4] : undefined;
91
+ var copyLinkButtonClicked = exports.copyLinkButtonClicked = function copyLinkButtonClicked(_ref2) {
92
+ var start = _ref2.start,
93
+ shareContentType = _ref2.shareContentType,
94
+ shareContentSubType = _ref2.shareContentSubType,
95
+ shareContentId = _ref2.shareContentId,
96
+ shareOrigin = _ref2.shareOrigin,
97
+ _ref2$isPublicLink = _ref2.isPublicLink,
98
+ isPublicLink = _ref2$isPublicLink === void 0 ? false : _ref2$isPublicLink,
99
+ ari = _ref2.ari;
94
100
  return createEvent('ui', ANALYTICS_SOURCE, 'clicked', 'button', 'copyShareLink', _objectSpread({
95
101
  source: ANALYTICS_SOURCE,
96
102
  duration: duration(start),
97
103
  shortUrl: undefined,
98
104
  // unknown at creation, will be filled later
99
105
  contentType: shareContentType,
106
+ contentSubType: shareContentSubType,
107
+ contentId: shareContentId,
100
108
  isPublicLink: isPublicLink,
101
109
  ari: ari
102
110
  }, getOriginTracingAttributes(shareOrigin)));
103
111
  };
104
- var formShareSubmitted = exports.formShareSubmitted = function formShareSubmitted(start, data, shareContentType, shareOrigin) {
105
- var isPublicLink = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
106
- var shareContentSubType = arguments.length > 5 ? arguments[5] : undefined;
112
+ var formShareSubmitted = exports.formShareSubmitted = function formShareSubmitted(_ref3) {
113
+ var start = _ref3.start,
114
+ data = _ref3.data,
115
+ shareContentType = _ref3.shareContentType,
116
+ shareContentSubType = _ref3.shareContentSubType,
117
+ shareContentId = _ref3.shareContentId,
118
+ shareOrigin = _ref3.shareOrigin,
119
+ _ref3$isPublicLink = _ref3.isPublicLink,
120
+ isPublicLink = _ref3$isPublicLink === void 0 ? false : _ref3$isPublicLink;
107
121
  var users = extractIdsByType(data, _smartUserPicker.isUser);
108
122
  var teams = extractIdsByType(data, _smartUserPicker.isTeam);
109
123
  var teamUserCounts = extractMemberCountsFromTeams(data, _smartUserPicker.isTeam);
@@ -111,6 +125,7 @@ var formShareSubmitted = exports.formShareSubmitted = function formShareSubmitte
111
125
  return createEvent('ui', ANALYTICS_SOURCE, 'clicked', 'button', 'submitShare', _objectSpread(_objectSpread({}, getOriginTracingAttributes(shareOrigin)), {}, {
112
126
  contentType: shareContentType,
113
127
  contentSubType: shareContentSubType,
128
+ contentId: shareContentId,
114
129
  duration: duration(start),
115
130
  emailCount: emails.length,
116
131
  teamCount: teams.length,
@@ -15,7 +15,9 @@ import ErrorBoundary from './ErrorBoundary';
15
15
  import MessagesIntlProvider from './MessagesIntlProvider';
16
16
  import { ShareDialogWithTrigger } from './ShareDialogWithTrigger';
17
17
  import { optionDataToUsers } from './utils';
18
- const COPY_LINK_EVENT = copyLinkButtonClicked(0);
18
+ const COPY_LINK_EVENT = copyLinkButtonClicked({
19
+ start: 0
20
+ });
19
21
  export const defaultConfig = {
20
22
  disableSharingToEmails: false
21
23
  };
@@ -272,6 +274,7 @@ export class ShareDialogContainerInternal extends React.Component {
272
274
  renderCustomTriggerButton,
273
275
  shareContentType,
274
276
  shareContentSubType,
277
+ shareContentId,
275
278
  shareFormTitle,
276
279
  shareFormHelperMessage,
277
280
  shouldCloseOnEscapePress,
@@ -318,6 +321,7 @@ export class ShareDialogContainerInternal extends React.Component {
318
321
  renderCustomTriggerButton: renderCustomTriggerButton,
319
322
  shareContentType: shareContentType,
320
323
  shareContentSubType: shareContentSubType,
324
+ shareContentId: shareContentId,
321
325
  shareFormTitle: shareFormTitle,
322
326
  shareFormHelperMessage: shareFormHelperMessage,
323
327
  copyLinkOrigin: this.getCopyLinkOriginTracing(),
@@ -230,10 +230,11 @@ export class ShareDialogWithTriggerInternal extends React.PureComponent {
230
230
  const {
231
231
  onShareSubmit,
232
232
  shareContentType,
233
+ shareContentSubType,
234
+ shareContentId,
233
235
  formShareOrigin,
234
236
  showFlags,
235
- isPublicLink,
236
- shareContentSubType
237
+ isPublicLink
237
238
  } = this.props;
238
239
  if (!onShareSubmit) {
239
240
  return;
@@ -242,7 +243,15 @@ export class ShareDialogWithTriggerInternal extends React.PureComponent {
242
243
  this.setState({
243
244
  isSharing: true
244
245
  });
245
- this.createAndFireEvent(formShareSubmitted(this.start, data, shareContentType, formShareOrigin, isPublicLink, shareContentSubType));
246
+ this.createAndFireEvent(formShareSubmitted({
247
+ start: this.start,
248
+ data,
249
+ shareContentType,
250
+ shareOrigin: formShareOrigin,
251
+ isPublicLink,
252
+ shareContentSubType,
253
+ shareContentId
254
+ }));
246
255
  onShareSubmit(data).then(() => {
247
256
  this.closeAndResetDialog();
248
257
  this.setState({
@@ -273,10 +282,20 @@ export class ShareDialogWithTriggerInternal extends React.PureComponent {
273
282
  const {
274
283
  copyLinkOrigin,
275
284
  shareContentType,
285
+ shareContentSubType,
286
+ shareContentId,
276
287
  isPublicLink,
277
288
  shareAri
278
289
  } = this.props;
279
- this.createAndFireEvent(copyLinkButtonClicked(this.start, shareContentType, copyLinkOrigin, isPublicLink, shareAri));
290
+ this.createAndFireEvent(copyLinkButtonClicked({
291
+ start: this.start,
292
+ shareContentType,
293
+ shareOrigin: copyLinkOrigin,
294
+ isPublicLink,
295
+ ari: shareAri,
296
+ shareContentSubType,
297
+ shareContentId
298
+ }));
280
299
  });
281
300
  _defineProperty(this, "handleIntegrationClick", integration => {
282
301
  this.setState({
@@ -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.5.3",
4
+ packageVersion: "4.6.0",
5
5
  ...attributes
6
6
  });
7
7
  const createEvent = (eventType, source, action, actionSubject, actionSubjectId, attributes = {}) => ({
@@ -51,17 +51,35 @@ export const shortUrlGenerated = (start, tooSlow) => createEvent('operational',
51
51
  duration: duration(start),
52
52
  tooSlow
53
53
  });
54
- export const copyLinkButtonClicked = (start, shareContentType, shareOrigin, isPublicLink = false, ari) => createEvent('ui', ANALYTICS_SOURCE, 'clicked', 'button', 'copyShareLink', {
54
+ export const copyLinkButtonClicked = ({
55
+ start,
56
+ shareContentType,
57
+ shareContentSubType,
58
+ shareContentId,
59
+ shareOrigin,
60
+ isPublicLink = false,
61
+ ari
62
+ }) => createEvent('ui', ANALYTICS_SOURCE, 'clicked', 'button', 'copyShareLink', {
55
63
  source: ANALYTICS_SOURCE,
56
64
  duration: duration(start),
57
65
  shortUrl: undefined,
58
66
  // unknown at creation, will be filled later
59
67
  contentType: shareContentType,
68
+ contentSubType: shareContentSubType,
69
+ contentId: shareContentId,
60
70
  isPublicLink,
61
71
  ari,
62
72
  ...getOriginTracingAttributes(shareOrigin)
63
73
  });
64
- export const formShareSubmitted = (start, data, shareContentType, shareOrigin, isPublicLink = false, shareContentSubType) => {
74
+ export const formShareSubmitted = ({
75
+ start,
76
+ data,
77
+ shareContentType,
78
+ shareContentSubType,
79
+ shareContentId,
80
+ shareOrigin,
81
+ isPublicLink = false
82
+ }) => {
65
83
  const users = extractIdsByType(data, isUser);
66
84
  const teams = extractIdsByType(data, isTeam);
67
85
  const teamUserCounts = extractMemberCountsFromTeams(data, isTeam);
@@ -70,6 +88,7 @@ export const formShareSubmitted = (start, data, shareContentType, shareOrigin, i
70
88
  ...getOriginTracingAttributes(shareOrigin),
71
89
  contentType: shareContentType,
72
90
  contentSubType: shareContentSubType,
91
+ contentId: shareContentId,
73
92
  duration: duration(start),
74
93
  emailCount: emails.length,
75
94
  teamCount: teams.length,
@@ -29,7 +29,9 @@ import ErrorBoundary from './ErrorBoundary';
29
29
  import MessagesIntlProvider from './MessagesIntlProvider';
30
30
  import { ShareDialogWithTrigger } from './ShareDialogWithTrigger';
31
31
  import { optionDataToUsers } from './utils';
32
- var COPY_LINK_EVENT = copyLinkButtonClicked(0);
32
+ var COPY_LINK_EVENT = copyLinkButtonClicked({
33
+ start: 0
34
+ });
33
35
  export var defaultConfig = {
34
36
  disableSharingToEmails: false
35
37
  };
@@ -319,6 +321,7 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
319
321
  renderCustomTriggerButton = _this$props2.renderCustomTriggerButton,
320
322
  shareContentType = _this$props2.shareContentType,
321
323
  shareContentSubType = _this$props2.shareContentSubType,
324
+ shareContentId = _this$props2.shareContentId,
322
325
  shareFormTitle = _this$props2.shareFormTitle,
323
326
  shareFormHelperMessage = _this$props2.shareFormHelperMessage,
324
327
  shouldCloseOnEscapePress = _this$props2.shouldCloseOnEscapePress,
@@ -363,6 +366,7 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
363
366
  renderCustomTriggerButton: renderCustomTriggerButton,
364
367
  shareContentType: shareContentType,
365
368
  shareContentSubType: shareContentSubType,
369
+ shareContentId: shareContentId,
366
370
  shareFormTitle: shareFormTitle,
367
371
  shareFormHelperMessage: shareFormHelperMessage,
368
372
  copyLinkOrigin: this.getCopyLinkOriginTracing(),
@@ -233,10 +233,11 @@ export var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureCo
233
233
  var _this$props4 = _this.props,
234
234
  onShareSubmit = _this$props4.onShareSubmit,
235
235
  shareContentType = _this$props4.shareContentType,
236
+ shareContentSubType = _this$props4.shareContentSubType,
237
+ shareContentId = _this$props4.shareContentId,
236
238
  formShareOrigin = _this$props4.formShareOrigin,
237
239
  showFlags = _this$props4.showFlags,
238
- isPublicLink = _this$props4.isPublicLink,
239
- shareContentSubType = _this$props4.shareContentSubType;
240
+ isPublicLink = _this$props4.isPublicLink;
240
241
  if (!onShareSubmit) {
241
242
  return;
242
243
  }
@@ -244,7 +245,15 @@ export var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureCo
244
245
  _this.setState({
245
246
  isSharing: true
246
247
  });
247
- _this.createAndFireEvent(formShareSubmitted(_this.start, data, shareContentType, formShareOrigin, isPublicLink, shareContentSubType));
248
+ _this.createAndFireEvent(formShareSubmitted({
249
+ start: _this.start,
250
+ data: data,
251
+ shareContentType: shareContentType,
252
+ shareOrigin: formShareOrigin,
253
+ isPublicLink: isPublicLink,
254
+ shareContentSubType: shareContentSubType,
255
+ shareContentId: shareContentId
256
+ }));
248
257
  onShareSubmit(data).then(function () {
249
258
  _this.closeAndResetDialog();
250
259
  _this.setState({
@@ -295,9 +304,19 @@ export var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureCo
295
304
  var _this$props5 = _this.props,
296
305
  copyLinkOrigin = _this$props5.copyLinkOrigin,
297
306
  shareContentType = _this$props5.shareContentType,
307
+ shareContentSubType = _this$props5.shareContentSubType,
308
+ shareContentId = _this$props5.shareContentId,
298
309
  isPublicLink = _this$props5.isPublicLink,
299
310
  shareAri = _this$props5.shareAri;
300
- _this.createAndFireEvent(copyLinkButtonClicked(_this.start, shareContentType, copyLinkOrigin, isPublicLink, shareAri));
311
+ _this.createAndFireEvent(copyLinkButtonClicked({
312
+ start: _this.start,
313
+ shareContentType: shareContentType,
314
+ shareOrigin: copyLinkOrigin,
315
+ isPublicLink: isPublicLink,
316
+ ari: shareAri,
317
+ shareContentSubType: shareContentSubType,
318
+ shareContentId: shareContentId
319
+ }));
301
320
  });
302
321
  _defineProperty(_assertThisInitialized(_this), "handleIntegrationClick", function (integration) {
303
322
  _this.setState({
@@ -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.5.3"
9
+ packageVersion: "4.6.0"
10
10
  }, attributes);
11
11
  };
12
12
  var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
@@ -81,22 +81,36 @@ export var shortUrlGenerated = function shortUrlGenerated(start, tooSlow) {
81
81
  tooSlow: tooSlow
82
82
  });
83
83
  };
84
- export var copyLinkButtonClicked = function copyLinkButtonClicked(start, shareContentType, shareOrigin) {
85
- var isPublicLink = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
86
- var ari = arguments.length > 4 ? arguments[4] : undefined;
84
+ export var copyLinkButtonClicked = function copyLinkButtonClicked(_ref2) {
85
+ var start = _ref2.start,
86
+ shareContentType = _ref2.shareContentType,
87
+ shareContentSubType = _ref2.shareContentSubType,
88
+ shareContentId = _ref2.shareContentId,
89
+ shareOrigin = _ref2.shareOrigin,
90
+ _ref2$isPublicLink = _ref2.isPublicLink,
91
+ isPublicLink = _ref2$isPublicLink === void 0 ? false : _ref2$isPublicLink,
92
+ ari = _ref2.ari;
87
93
  return createEvent('ui', ANALYTICS_SOURCE, 'clicked', 'button', 'copyShareLink', _objectSpread({
88
94
  source: ANALYTICS_SOURCE,
89
95
  duration: duration(start),
90
96
  shortUrl: undefined,
91
97
  // unknown at creation, will be filled later
92
98
  contentType: shareContentType,
99
+ contentSubType: shareContentSubType,
100
+ contentId: shareContentId,
93
101
  isPublicLink: isPublicLink,
94
102
  ari: ari
95
103
  }, getOriginTracingAttributes(shareOrigin)));
96
104
  };
97
- export var formShareSubmitted = function formShareSubmitted(start, data, shareContentType, shareOrigin) {
98
- var isPublicLink = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
99
- var shareContentSubType = arguments.length > 5 ? arguments[5] : undefined;
105
+ export var formShareSubmitted = function formShareSubmitted(_ref3) {
106
+ var start = _ref3.start,
107
+ data = _ref3.data,
108
+ shareContentType = _ref3.shareContentType,
109
+ shareContentSubType = _ref3.shareContentSubType,
110
+ shareContentId = _ref3.shareContentId,
111
+ shareOrigin = _ref3.shareOrigin,
112
+ _ref3$isPublicLink = _ref3.isPublicLink,
113
+ isPublicLink = _ref3$isPublicLink === void 0 ? false : _ref3$isPublicLink;
100
114
  var users = extractIdsByType(data, isUser);
101
115
  var teams = extractIdsByType(data, isTeam);
102
116
  var teamUserCounts = extractMemberCountsFromTeams(data, isTeam);
@@ -104,6 +118,7 @@ export var formShareSubmitted = function formShareSubmitted(start, data, shareCo
104
118
  return createEvent('ui', ANALYTICS_SOURCE, 'clicked', 'button', 'submitShare', _objectSpread(_objectSpread({}, getOriginTracingAttributes(shareOrigin)), {}, {
105
119
  contentType: shareContentType,
106
120
  contentSubType: shareContentSubType,
121
+ contentId: shareContentId,
107
122
  duration: duration(start),
108
123
  emailCount: emails.length,
109
124
  teamCount: teams.length,
@@ -50,7 +50,7 @@ export declare class ShareDialogContainerInternal extends React.Component<WithAn
50
50
  getFormShareLink: () => string;
51
51
  render(): JSX.Element;
52
52
  }
53
- export declare const ShareDialogContainer: React.ForwardRefExoticComponent<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "onTriggerButtonClick" | "isAutoOpenDialog" | "shouldCloseOnEscapePress" | "dialogPlacement" | "loadUserOptions" | "onDialogOpen" | "onDialogClose" | "onUserSelectionChange" | "renderCustomTriggerButton" | "shareContentType" | "shareContentSubType" | "shareFormTitle" | "shareFormHelperMessage" | "showFlags" | "loggedInAccountId" | "triggerButtonAppearance" | "triggerButtonIcon" | "triggerButtonStyle" | "triggerButtonTooltipPosition" | "triggerButtonTooltipText" | "cloudId" | "bottomMessage" | "customFooter" | "isCopyDisabled" | "isPublicLink" | "integrationMode" | "shareFieldsFooter" | "shareIntegrations" | "shareAri" | "tabIndex" | "copyTooltipText" | "dialogZIndex" | "orgId" | "isBrowseUsersDisabled" | "shareClient" | "urlShortenerClient" | "shortLinkData" | "formatCopyLink" | "originTracingFactory" | "productId" | "shareLink" | "shareTitle" | "useUrlShortener"> & Partial<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "enableSmartUserPicker" | "product" | "shareeAction">> & Partial<Pick<{
53
+ export declare const ShareDialogContainer: React.ForwardRefExoticComponent<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "onTriggerButtonClick" | "isAutoOpenDialog" | "shouldCloseOnEscapePress" | "dialogPlacement" | "loadUserOptions" | "onDialogOpen" | "onDialogClose" | "onUserSelectionChange" | "renderCustomTriggerButton" | "shareContentType" | "shareContentSubType" | "shareContentId" | "shareFormTitle" | "shareFormHelperMessage" | "showFlags" | "loggedInAccountId" | "triggerButtonAppearance" | "triggerButtonIcon" | "triggerButtonStyle" | "triggerButtonTooltipPosition" | "triggerButtonTooltipText" | "cloudId" | "bottomMessage" | "customFooter" | "isCopyDisabled" | "isPublicLink" | "integrationMode" | "shareFieldsFooter" | "shareIntegrations" | "shareAri" | "tabIndex" | "copyTooltipText" | "dialogZIndex" | "orgId" | "isBrowseUsersDisabled" | "shareClient" | "urlShortenerClient" | "shortLinkData" | "formatCopyLink" | "originTracingFactory" | "productId" | "shareLink" | "shareTitle" | "useUrlShortener"> & Partial<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "enableSmartUserPicker" | "product" | "shareeAction">> & Partial<Pick<{
54
54
  enableSmartUserPicker: boolean;
55
55
  shareeAction: "view" | "edit";
56
56
  product: string;
@@ -15,5 +15,21 @@ export declare const shareTabClicked: (subjectId: TabSubjectIdType, shareContent
15
15
  export declare const cancelShare: (start: number) => AnalyticsEventPayload;
16
16
  export declare const shortUrlRequested: () => AnalyticsEventPayload;
17
17
  export declare const shortUrlGenerated: (start: number, tooSlow: boolean) => AnalyticsEventPayload;
18
- export declare const copyLinkButtonClicked: (start: number, shareContentType?: string, shareOrigin?: OriginTracing, isPublicLink?: boolean, ari?: string) => AnalyticsEventPayload;
19
- export declare const formShareSubmitted: (start: number, data: DialogContentState, shareContentType?: string, shareOrigin?: OriginTracing, isPublicLink?: boolean, shareContentSubType?: string) => AnalyticsEventPayload;
18
+ export declare const copyLinkButtonClicked: ({ start, shareContentType, shareContentSubType, shareContentId, shareOrigin, isPublicLink, ari, }: {
19
+ start: number;
20
+ shareContentType?: string | undefined;
21
+ shareContentSubType?: string | undefined;
22
+ shareContentId?: string | undefined;
23
+ shareOrigin?: OriginTracing | undefined;
24
+ isPublicLink?: boolean | undefined;
25
+ ari?: string | undefined;
26
+ }) => AnalyticsEventPayload;
27
+ export declare const formShareSubmitted: ({ start, data, shareContentType, shareContentSubType, shareContentId, shareOrigin, isPublicLink, }: {
28
+ start: number;
29
+ data: DialogContentState;
30
+ shareContentType?: string | undefined;
31
+ shareContentSubType?: string | undefined;
32
+ shareContentId?: string | undefined;
33
+ shareOrigin?: OriginTracing | undefined;
34
+ isPublicLink?: boolean | undefined;
35
+ }) => AnalyticsEventPayload;
@@ -75,6 +75,8 @@ export type ShareDialogContainerProps = {
75
75
  /** Content SubType of the resource to be shared. Optional. */
76
76
  /** embed */
77
77
  shareContentSubType?: string;
78
+ /** Content ID of the resource to be shared. Optional. */
79
+ shareContentId?: string;
78
80
  /** Link of the resource to be shared (should NOT includes origin tracing).
79
81
  * Optional, the current page URL is used by default. */
80
82
  shareLink?: string;
@@ -19,7 +19,7 @@ export type DialogPlacement = Placement;
19
19
  * with the demo page and clearly visible options on that page.
20
20
  */
21
21
  export type DialogBoundariesElement = 'viewport' | 'window' | 'scrollParent';
22
- export type ShareDialogWithTriggerProps = Pick<ShareDialogContainerProps, 'onTriggerButtonClick' | 'isAutoOpenDialog' | 'shouldCloseOnEscapePress' | 'dialogPlacement' | 'loadUserOptions' | 'onDialogOpen' | 'onDialogClose' | 'onUserSelectionChange' | 'renderCustomTriggerButton' | 'shareContentType' | 'shareContentSubType' | 'shareFormTitle' | 'shareFormHelperMessage' | 'showFlags' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'triggerButtonAppearance' | 'triggerButtonIcon' | 'triggerButtonStyle' | 'triggerButtonTooltipPosition' | 'triggerButtonTooltipText' | 'cloudId' | 'bottomMessage' | 'product' | 'customFooter' | 'isCopyDisabled' | 'isPublicLink' | 'integrationMode' | 'shareFieldsFooter' | 'shareIntegrations' | 'shareAri' | 'tabIndex' | 'copyTooltipText' | 'dialogZIndex' | 'orgId' | 'isBrowseUsersDisabled'> & {
22
+ export type ShareDialogWithTriggerProps = Pick<ShareDialogContainerProps, 'onTriggerButtonClick' | 'isAutoOpenDialog' | 'shouldCloseOnEscapePress' | 'dialogPlacement' | 'loadUserOptions' | 'onDialogOpen' | 'onDialogClose' | 'onUserSelectionChange' | 'renderCustomTriggerButton' | 'shareContentType' | 'shareContentSubType' | 'shareContentId' | 'shareFormTitle' | 'shareFormHelperMessage' | 'showFlags' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'triggerButtonAppearance' | 'triggerButtonIcon' | 'triggerButtonStyle' | 'triggerButtonTooltipPosition' | 'triggerButtonTooltipText' | 'cloudId' | 'bottomMessage' | 'product' | 'customFooter' | 'isCopyDisabled' | 'isPublicLink' | 'integrationMode' | 'shareFieldsFooter' | 'shareIntegrations' | 'shareAri' | 'tabIndex' | 'copyTooltipText' | 'dialogZIndex' | 'orgId' | 'isBrowseUsersDisabled'> & {
23
23
  config?: ConfigResponse;
24
24
  isFetchingConfig?: boolean;
25
25
  children?: RenderCustomTriggerButton;
@@ -50,7 +50,7 @@ export declare class ShareDialogContainerInternal extends React.Component<WithAn
50
50
  getFormShareLink: () => string;
51
51
  render(): JSX.Element;
52
52
  }
53
- export declare const ShareDialogContainer: React.ForwardRefExoticComponent<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "onTriggerButtonClick" | "isAutoOpenDialog" | "shouldCloseOnEscapePress" | "dialogPlacement" | "loadUserOptions" | "onDialogOpen" | "onDialogClose" | "onUserSelectionChange" | "renderCustomTriggerButton" | "shareContentType" | "shareContentSubType" | "shareFormTitle" | "shareFormHelperMessage" | "showFlags" | "loggedInAccountId" | "triggerButtonAppearance" | "triggerButtonIcon" | "triggerButtonStyle" | "triggerButtonTooltipPosition" | "triggerButtonTooltipText" | "cloudId" | "bottomMessage" | "customFooter" | "isCopyDisabled" | "isPublicLink" | "integrationMode" | "shareFieldsFooter" | "shareIntegrations" | "shareAri" | "tabIndex" | "copyTooltipText" | "dialogZIndex" | "orgId" | "isBrowseUsersDisabled" | "shareClient" | "urlShortenerClient" | "shortLinkData" | "formatCopyLink" | "originTracingFactory" | "productId" | "shareLink" | "shareTitle" | "useUrlShortener"> & Partial<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "enableSmartUserPicker" | "product" | "shareeAction">> & Partial<Pick<{
53
+ export declare const ShareDialogContainer: React.ForwardRefExoticComponent<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "onTriggerButtonClick" | "isAutoOpenDialog" | "shouldCloseOnEscapePress" | "dialogPlacement" | "loadUserOptions" | "onDialogOpen" | "onDialogClose" | "onUserSelectionChange" | "renderCustomTriggerButton" | "shareContentType" | "shareContentSubType" | "shareContentId" | "shareFormTitle" | "shareFormHelperMessage" | "showFlags" | "loggedInAccountId" | "triggerButtonAppearance" | "triggerButtonIcon" | "triggerButtonStyle" | "triggerButtonTooltipPosition" | "triggerButtonTooltipText" | "cloudId" | "bottomMessage" | "customFooter" | "isCopyDisabled" | "isPublicLink" | "integrationMode" | "shareFieldsFooter" | "shareIntegrations" | "shareAri" | "tabIndex" | "copyTooltipText" | "dialogZIndex" | "orgId" | "isBrowseUsersDisabled" | "shareClient" | "urlShortenerClient" | "shortLinkData" | "formatCopyLink" | "originTracingFactory" | "productId" | "shareLink" | "shareTitle" | "useUrlShortener"> & Partial<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "enableSmartUserPicker" | "product" | "shareeAction">> & Partial<Pick<{
54
54
  enableSmartUserPicker: boolean;
55
55
  shareeAction: "view" | "edit";
56
56
  product: string;
@@ -15,5 +15,21 @@ export declare const shareTabClicked: (subjectId: TabSubjectIdType, shareContent
15
15
  export declare const cancelShare: (start: number) => AnalyticsEventPayload;
16
16
  export declare const shortUrlRequested: () => AnalyticsEventPayload;
17
17
  export declare const shortUrlGenerated: (start: number, tooSlow: boolean) => AnalyticsEventPayload;
18
- export declare const copyLinkButtonClicked: (start: number, shareContentType?: string, shareOrigin?: OriginTracing, isPublicLink?: boolean, ari?: string) => AnalyticsEventPayload;
19
- export declare const formShareSubmitted: (start: number, data: DialogContentState, shareContentType?: string, shareOrigin?: OriginTracing, isPublicLink?: boolean, shareContentSubType?: string) => AnalyticsEventPayload;
18
+ export declare const copyLinkButtonClicked: ({ start, shareContentType, shareContentSubType, shareContentId, shareOrigin, isPublicLink, ari, }: {
19
+ start: number;
20
+ shareContentType?: string | undefined;
21
+ shareContentSubType?: string | undefined;
22
+ shareContentId?: string | undefined;
23
+ shareOrigin?: OriginTracing | undefined;
24
+ isPublicLink?: boolean | undefined;
25
+ ari?: string | undefined;
26
+ }) => AnalyticsEventPayload;
27
+ export declare const formShareSubmitted: ({ start, data, shareContentType, shareContentSubType, shareContentId, shareOrigin, isPublicLink, }: {
28
+ start: number;
29
+ data: DialogContentState;
30
+ shareContentType?: string | undefined;
31
+ shareContentSubType?: string | undefined;
32
+ shareContentId?: string | undefined;
33
+ shareOrigin?: OriginTracing | undefined;
34
+ isPublicLink?: boolean | undefined;
35
+ }) => AnalyticsEventPayload;
@@ -75,6 +75,8 @@ export type ShareDialogContainerProps = {
75
75
  /** Content SubType of the resource to be shared. Optional. */
76
76
  /** embed */
77
77
  shareContentSubType?: string;
78
+ /** Content ID of the resource to be shared. Optional. */
79
+ shareContentId?: string;
78
80
  /** Link of the resource to be shared (should NOT includes origin tracing).
79
81
  * Optional, the current page URL is used by default. */
80
82
  shareLink?: string;
@@ -19,7 +19,7 @@ export type DialogPlacement = Placement;
19
19
  * with the demo page and clearly visible options on that page.
20
20
  */
21
21
  export type DialogBoundariesElement = 'viewport' | 'window' | 'scrollParent';
22
- export type ShareDialogWithTriggerProps = Pick<ShareDialogContainerProps, 'onTriggerButtonClick' | 'isAutoOpenDialog' | 'shouldCloseOnEscapePress' | 'dialogPlacement' | 'loadUserOptions' | 'onDialogOpen' | 'onDialogClose' | 'onUserSelectionChange' | 'renderCustomTriggerButton' | 'shareContentType' | 'shareContentSubType' | 'shareFormTitle' | 'shareFormHelperMessage' | 'showFlags' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'triggerButtonAppearance' | 'triggerButtonIcon' | 'triggerButtonStyle' | 'triggerButtonTooltipPosition' | 'triggerButtonTooltipText' | 'cloudId' | 'bottomMessage' | 'product' | 'customFooter' | 'isCopyDisabled' | 'isPublicLink' | 'integrationMode' | 'shareFieldsFooter' | 'shareIntegrations' | 'shareAri' | 'tabIndex' | 'copyTooltipText' | 'dialogZIndex' | 'orgId' | 'isBrowseUsersDisabled'> & {
22
+ export type ShareDialogWithTriggerProps = Pick<ShareDialogContainerProps, 'onTriggerButtonClick' | 'isAutoOpenDialog' | 'shouldCloseOnEscapePress' | 'dialogPlacement' | 'loadUserOptions' | 'onDialogOpen' | 'onDialogClose' | 'onUserSelectionChange' | 'renderCustomTriggerButton' | 'shareContentType' | 'shareContentSubType' | 'shareContentId' | 'shareFormTitle' | 'shareFormHelperMessage' | 'showFlags' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'triggerButtonAppearance' | 'triggerButtonIcon' | 'triggerButtonStyle' | 'triggerButtonTooltipPosition' | 'triggerButtonTooltipText' | 'cloudId' | 'bottomMessage' | 'product' | 'customFooter' | 'isCopyDisabled' | 'isPublicLink' | 'integrationMode' | 'shareFieldsFooter' | 'shareIntegrations' | 'shareAri' | 'tabIndex' | 'copyTooltipText' | 'dialogZIndex' | 'orgId' | 'isBrowseUsersDisabled'> & {
23
23
  config?: ConfigResponse;
24
24
  isFetchingConfig?: boolean;
25
25
  children?: RenderCustomTriggerButton;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/share",
3
- "version": "4.5.3",
3
+ "version": "4.6.0",
4
4
  "description": "Fabric Share Element",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -47,9 +47,9 @@
47
47
  "@atlaskit/popup": "^1.11.0",
48
48
  "@atlaskit/portal": "^4.4.0",
49
49
  "@atlaskit/smart-user-picker": "^6.3.0",
50
- "@atlaskit/spinner": "^15.6.0",
51
- "@atlaskit/tabs": "^13.4.0",
52
- "@atlaskit/textarea": "^4.7.0",
50
+ "@atlaskit/spinner": "^16.0.0",
51
+ "@atlaskit/tabs": "^14.0.0",
52
+ "@atlaskit/textarea": "^5.0.0",
53
53
  "@atlaskit/theme": "^12.6.0",
54
54
  "@atlaskit/tokens": "^1.28.0",
55
55
  "@atlaskit/tooltip": "^18.0.0",
package/report.api.md CHANGED
@@ -254,6 +254,7 @@ export const ShareDialogContainer: React_2.ForwardRefExoticComponent<
254
254
  | 'renderCustomTriggerButton'
255
255
  | 'shareAri'
256
256
  | 'shareClient'
257
+ | 'shareContentId'
257
258
  | 'shareContentSubType'
258
259
  | 'shareContentType'
259
260
  | 'shareFieldsFooter'
@@ -317,6 +318,7 @@ export type ShareDialogContainerProps = {
317
318
  shareAri: string;
318
319
  shareContentType: string;
319
320
  shareContentSubType?: string;
321
+ shareContentId?: string;
320
322
  shareLink?: string;
321
323
  shareTitle: string;
322
324
  shareFormTitle?: React.ReactNode;
@@ -189,7 +189,7 @@ export type ShareContentState = {
189
189
  };
190
190
 
191
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" | "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<{
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
193
  enableSmartUserPicker: boolean;
194
194
  shareeAction: "edit" | "view";
195
195
  product: string;
@@ -216,6 +216,7 @@ export type ShareDialogContainerProps = {
216
216
  shareAri: string;
217
217
  shareContentType: string;
218
218
  shareContentSubType?: string;
219
+ shareContentId?: string;
219
220
  shareLink?: string;
220
221
  shareTitle: string;
221
222
  shareFormTitle?: React.ReactNode;