@atlaskit/share 3.0.4 → 3.0.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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/share
2
2
 
3
+ ## 3.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`7fe36d0765b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7fe36d0765b) - Analytics context changes for share to integrations
8
+
3
9
  ## 3.0.4
4
10
 
5
11
  ### Patch Changes
@@ -60,19 +60,19 @@ function LazyShareForm(props) {
60
60
 
61
61
  var footer = /*#__PURE__*/_react.default.createElement("div", null, bottomMessage ? /*#__PURE__*/_react.default.createElement(_styled.BottomMessageWrapper, null, bottomMessage) : null, customFooter && /*#__PURE__*/_react.default.createElement(_styled.CustomFooterWrapper, null, customFooter));
62
62
 
63
- return /*#__PURE__*/_react.default.createElement(_analyticsNext.AnalyticsContext, {
64
- data: {
65
- source: _analytics.ANALYTICS_SOURCE
66
- }
67
- }, /*#__PURE__*/_react.default.createElement(_ShareFormWrapper.ShareFormWrapper, {
63
+ return /*#__PURE__*/_react.default.createElement(_ShareFormWrapper.ShareFormWrapper, {
68
64
  footer: footer // form title will be determined by `title` and `showTitle` prop passed to `ShareForm`,
69
65
  // so we don't need to show title via ShareFormWrapper
70
66
  ,
71
67
  shouldShowTitle: false
72
- }, showIntegrationForm && selectedIntegration !== null ? /*#__PURE__*/_react.default.createElement(_IntegrationForm.IntegrationForm, {
68
+ }, showIntegrationForm && selectedIntegration !== null ? /*#__PURE__*/_react.default.createElement(_analyticsNext.AnalyticsContext, {
69
+ data: {
70
+ source: _analytics.INTEGRATION_MODAL_SOURCE
71
+ }
72
+ }, /*#__PURE__*/_react.default.createElement(_IntegrationForm.IntegrationForm, {
73
73
  Content: selectedIntegration.Content,
74
74
  onIntegrationClose: onDialogClose
75
- }) : /*#__PURE__*/_react.default.createElement(_ShareForm.ShareForm, {
75
+ })) : /*#__PURE__*/_react.default.createElement(_ShareForm.ShareForm, {
76
76
  copyLink: copyLink,
77
77
  loadOptions: loadOptions,
78
78
  title: shareFormTitle,
@@ -100,7 +100,7 @@ function LazyShareForm(props) {
100
100
  onUserSelectionChange: onUserSelectionChange,
101
101
  handleCloseDialog: onDialogClose,
102
102
  onTabChange: onTabChange
103
- })));
103
+ }));
104
104
  }
105
105
 
106
106
  var _default = LazyShareForm;
@@ -33,6 +33,8 @@ var _reactIntlNext = require("react-intl-next");
33
33
 
34
34
  var _styledComponents = _interopRequireDefault(require("styled-components"));
35
35
 
36
+ var _analyticsNext = require("@atlaskit/analytics-next");
37
+
36
38
  var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
37
39
 
38
40
  var _form = _interopRequireDefault(require("@atlaskit/form"));
@@ -51,6 +53,8 @@ var _i18n = require("../i18n");
51
53
 
52
54
  var _types = require("../types");
53
55
 
56
+ var _analytics = require("./analytics");
57
+
54
58
  var _CommentField = require("./CommentField");
55
59
 
56
60
  var _CopyLinkButton = _interopRequireDefault(require("./CopyLinkButton"));
@@ -79,9 +83,7 @@ var SubmitButtonWrapper = _styledComponents.default.div(_templateObject || (_tem
79
83
 
80
84
  var CenterAlignedIconWrapper = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-self: center;\n padding: 0 10px;\n\n > div {\n line-height: 1;\n }\n"])));
81
85
 
82
- var FormWrapper = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n margin-top: ", "px;\n width: 100%;\n\n /* jira has a class override font settings on h1 in gh-custom-field-pickers.css */\n #ghx-modes-tools #ghx-share & h1:first-child {\n margin-top: 0;\n }\n"])), function (props) {
83
- return props.isMainShare ? (0, _constants.gridSize)() : (0, _constants.gridSize)() * 2;
84
- });
86
+ var FormWrapper = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n margin-top: ", "px;\n width: 100%;\n\n /* jira has a class override font settings on h1 in gh-custom-field-pickers.css */\n #ghx-modes-tools #ghx-share & h1:first-child {\n margin-top: 0;\n }\n"])), (0, _constants.gridSize)());
85
87
 
86
88
  exports.FormWrapper = FormWrapper;
87
89
 
@@ -93,7 +95,7 @@ var FormField = _styledComponents.default.div(_templateObject5 || (_templateObje
93
95
 
94
96
  var IntegrationWrapper = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n"])));
95
97
 
96
- var IntegrationIconWrapper = _styledComponents.default.span(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n margin-bottom: -2px;\n margin-right: 5px;\n"])));
98
+ var IntegrationIconWrapper = _styledComponents.default.span(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n margin-bottom: -6px;\n margin-right: 5px;\n"])));
97
99
 
98
100
  var integrationTabText = function integrationTabText(integrationName) {
99
101
  return /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _i18n.messages.shareInIntegrationButtonText, {
@@ -146,7 +148,11 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
146
148
  isPublicLink = _this$props.isPublicLink,
147
149
  copyTooltipText = _this$props.copyTooltipText,
148
150
  helperMessage = _this$props.helperMessage;
149
- return /*#__PURE__*/_react.default.createElement("form", formProps, showTitle && /*#__PURE__*/_react.default.createElement(_ShareHeader.ShareHeader, {
151
+ return /*#__PURE__*/_react.default.createElement(_analyticsNext.AnalyticsContext, {
152
+ data: {
153
+ source: _analytics.ANALYTICS_SOURCE
154
+ }
155
+ }, /*#__PURE__*/_react.default.createElement("form", formProps, showTitle && /*#__PURE__*/_react.default.createElement(_ShareHeader.ShareHeader, {
150
156
  title: title
151
157
  }), /*#__PURE__*/_react.default.createElement(FormField, null, /*#__PURE__*/_react.default.createElement(_UserPickerField.UserPickerField, {
152
158
  onInputChange: onUserInputChange,
@@ -170,7 +176,7 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
170
176
  link: copyLink,
171
177
  isPublicLink: isPublicLink,
172
178
  copyTooltipText: copyTooltipText
173
- }), _this.renderSubmitButton()));
179
+ }), _this.renderSubmitButton())));
174
180
  });
175
181
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderSubmitButton", function () {
176
182
  var _this$props2 = _this.props,
@@ -266,13 +272,13 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
266
272
  key: "share-tab-".concat(firstIntegration.type)
267
273
  }, /*#__PURE__*/_react.default.createElement(IntegrationWrapper, null, /*#__PURE__*/_react.default.createElement(IntegrationIconWrapper, null, /*#__PURE__*/_react.default.createElement(firstIntegration.Icon, null)), integrationTabText(firstIntegration.type)))), /*#__PURE__*/_react.default.createElement(_tabs.TabPanel, {
268
274
  key: "share-tabPanel-default"
269
- }, /*#__PURE__*/_react.default.createElement(FormWrapper, {
270
- isMainShare: true
271
- }, this.renderShareForm())), /*#__PURE__*/_react.default.createElement(_tabs.TabPanel, {
275
+ }, /*#__PURE__*/_react.default.createElement(FormWrapper, null, this.renderShareForm())), /*#__PURE__*/_react.default.createElement(_tabs.TabPanel, {
272
276
  key: "share-tabPanel-integration"
273
- }, /*#__PURE__*/_react.default.createElement(FormWrapper, {
274
- isMainShare: false
275
- }, /*#__PURE__*/_react.default.createElement(_IntegrationForm.IntegrationForm, {
277
+ }, /*#__PURE__*/_react.default.createElement(_analyticsNext.AnalyticsContext, {
278
+ data: {
279
+ source: _analytics.INTEGRATION_MODAL_SOURCE
280
+ }
281
+ }, /*#__PURE__*/_react.default.createElement(FormWrapper, null, /*#__PURE__*/_react.default.createElement(_IntegrationForm.IntegrationForm, {
276
282
  Content: firstIntegration.Content,
277
283
  onIntegrationClose: function onIntegrationClose() {
278
284
  return handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog();
@@ -280,7 +286,7 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
280
286
  changeTab: function changeTab(index) {
281
287
  _this2.changeTab(index);
282
288
  }
283
- }))));
289
+ })))));
284
290
  }
285
291
 
286
292
  return this.renderShareForm();
@@ -50,7 +50,7 @@ var CHANNEL_ID = 'fabric-elements';
50
50
  exports.CHANNEL_ID = CHANNEL_ID;
51
51
  var ANALYTICS_SOURCE = 'shareModal';
52
52
  exports.ANALYTICS_SOURCE = ANALYTICS_SOURCE;
53
- var INTEGRATION_MODAL_SOURCE = 'integrationShareModal';
53
+ var INTEGRATION_MODAL_SOURCE = 'integrationShareDialog';
54
54
  exports.INTEGRATION_MODAL_SOURCE = INTEGRATION_MODAL_SOURCE;
55
55
 
56
56
  var screenEvent = function screenEvent(_ref) {
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/share",
3
- "version": "3.0.4"
3
+ "version": "3.0.5"
4
4
  }
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { AnalyticsContext } from '@atlaskit/analytics-next';
3
- import { ANALYTICS_SOURCE } from '../analytics';
3
+ import { INTEGRATION_MODAL_SOURCE } from '../analytics';
4
4
  import { IntegrationForm } from '../IntegrationForm';
5
5
  import { ShareForm } from '../ShareForm';
6
6
  import { ShareFormWrapper } from '../ShareFormWrapper';
@@ -48,19 +48,19 @@ function LazyShareForm(props) {
48
48
  showTitle
49
49
  } = props;
50
50
  const footer = /*#__PURE__*/React.createElement("div", null, bottomMessage ? /*#__PURE__*/React.createElement(BottomMessageWrapper, null, bottomMessage) : null, customFooter && /*#__PURE__*/React.createElement(CustomFooterWrapper, null, customFooter));
51
- return /*#__PURE__*/React.createElement(AnalyticsContext, {
52
- data: {
53
- source: ANALYTICS_SOURCE
54
- }
55
- }, /*#__PURE__*/React.createElement(ShareFormWrapper, {
51
+ return /*#__PURE__*/React.createElement(ShareFormWrapper, {
56
52
  footer: footer // form title will be determined by `title` and `showTitle` prop passed to `ShareForm`,
57
53
  // so we don't need to show title via ShareFormWrapper
58
54
  ,
59
55
  shouldShowTitle: false
60
- }, showIntegrationForm && selectedIntegration !== null ? /*#__PURE__*/React.createElement(IntegrationForm, {
56
+ }, showIntegrationForm && selectedIntegration !== null ? /*#__PURE__*/React.createElement(AnalyticsContext, {
57
+ data: {
58
+ source: INTEGRATION_MODAL_SOURCE
59
+ }
60
+ }, /*#__PURE__*/React.createElement(IntegrationForm, {
61
61
  Content: selectedIntegration.Content,
62
62
  onIntegrationClose: onDialogClose
63
- }) : /*#__PURE__*/React.createElement(ShareForm, {
63
+ })) : /*#__PURE__*/React.createElement(ShareForm, {
64
64
  copyLink: copyLink,
65
65
  loadOptions: loadOptions,
66
66
  title: shareFormTitle,
@@ -88,7 +88,7 @@ function LazyShareForm(props) {
88
88
  onUserSelectionChange: onUserSelectionChange,
89
89
  handleCloseDialog: onDialogClose,
90
90
  onTabChange: onTabChange
91
- })));
91
+ }));
92
92
  }
93
93
 
94
94
  export default LazyShareForm;
@@ -3,6 +3,7 @@ import _extends from "@babel/runtime/helpers/extends";
3
3
  import React from 'react';
4
4
  import { FormattedMessage, injectIntl } from 'react-intl-next';
5
5
  import styled from 'styled-components';
6
+ import { AnalyticsContext } from '@atlaskit/analytics-next';
6
7
  import Button from '@atlaskit/button/custom-theme-button';
7
8
  import Form from '@atlaskit/form';
8
9
  import ErrorIcon from '@atlaskit/icon/glyph/error';
@@ -12,6 +13,7 @@ import { gridSize } from '@atlaskit/theme/constants';
12
13
  import Tooltip from '@atlaskit/tooltip';
13
14
  import { messages } from '../i18n';
14
15
  import { TabType } from '../types';
16
+ import { ANALYTICS_SOURCE, INTEGRATION_MODAL_SOURCE } from './analytics';
15
17
  import { CommentField } from './CommentField';
16
18
  import CopyLinkButton from './CopyLinkButton';
17
19
  import { IntegrationForm } from './IntegrationForm';
@@ -31,7 +33,7 @@ const CenterAlignedIconWrapper = styled.div`
31
33
  }
32
34
  `;
33
35
  export const FormWrapper = styled.div`
34
- margin-top: ${props => props.isMainShare ? gridSize() : gridSize() * 2}px;
36
+ margin-top: ${gridSize()}px;
35
37
  width: 100%;
36
38
 
37
39
  /* jira has a class override font settings on h1 in gh-custom-field-pickers.css */
@@ -52,7 +54,7 @@ const IntegrationWrapper = styled.div`
52
54
  align-items: center;
53
55
  `;
54
56
  const IntegrationIconWrapper = styled.span`
55
- margin-bottom: -2px;
57
+ margin-bottom: -6px;
56
58
  margin-right: 5px;
57
59
  `;
58
60
 
@@ -95,7 +97,11 @@ class InternalForm extends React.PureComponent {
95
97
  copyTooltipText,
96
98
  helperMessage
97
99
  } = this.props;
98
- return /*#__PURE__*/React.createElement("form", formProps, showTitle && /*#__PURE__*/React.createElement(ShareHeader, {
100
+ return /*#__PURE__*/React.createElement(AnalyticsContext, {
101
+ data: {
102
+ source: ANALYTICS_SOURCE
103
+ }
104
+ }, /*#__PURE__*/React.createElement("form", formProps, showTitle && /*#__PURE__*/React.createElement(ShareHeader, {
99
105
  title: title
100
106
  }), /*#__PURE__*/React.createElement(FormField, null, /*#__PURE__*/React.createElement(UserPickerField, {
101
107
  onInputChange: onUserInputChange,
@@ -119,7 +125,7 @@ class InternalForm extends React.PureComponent {
119
125
  link: copyLink,
120
126
  isPublicLink: isPublicLink,
121
127
  copyTooltipText: copyTooltipText
122
- }), this.renderSubmitButton()));
128
+ }), this.renderSubmitButton())));
123
129
  });
124
130
 
125
131
  _defineProperty(this, "renderSubmitButton", () => {
@@ -218,19 +224,19 @@ class InternalForm extends React.PureComponent {
218
224
  key: `share-tab-${firstIntegration.type}`
219
225
  }, /*#__PURE__*/React.createElement(IntegrationWrapper, null, /*#__PURE__*/React.createElement(IntegrationIconWrapper, null, /*#__PURE__*/React.createElement(firstIntegration.Icon, null)), integrationTabText(firstIntegration.type)))), /*#__PURE__*/React.createElement(TabPanel, {
220
226
  key: `share-tabPanel-default`
221
- }, /*#__PURE__*/React.createElement(FormWrapper, {
222
- isMainShare: true
223
- }, this.renderShareForm())), /*#__PURE__*/React.createElement(TabPanel, {
227
+ }, /*#__PURE__*/React.createElement(FormWrapper, null, this.renderShareForm())), /*#__PURE__*/React.createElement(TabPanel, {
224
228
  key: `share-tabPanel-integration`
225
- }, /*#__PURE__*/React.createElement(FormWrapper, {
226
- isMainShare: false
227
- }, /*#__PURE__*/React.createElement(IntegrationForm, {
229
+ }, /*#__PURE__*/React.createElement(AnalyticsContext, {
230
+ data: {
231
+ source: INTEGRATION_MODAL_SOURCE
232
+ }
233
+ }, /*#__PURE__*/React.createElement(FormWrapper, null, /*#__PURE__*/React.createElement(IntegrationForm, {
228
234
  Content: firstIntegration.Content,
229
235
  onIntegrationClose: () => handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog(),
230
236
  changeTab: index => {
231
237
  this.changeTab(index);
232
238
  }
233
- }))));
239
+ })))));
234
240
  }
235
241
 
236
242
  return this.renderShareForm();
@@ -24,7 +24,7 @@ const createScreenEvent = (name, attributes = {}) => ({
24
24
 
25
25
  export const CHANNEL_ID = 'fabric-elements';
26
26
  export const ANALYTICS_SOURCE = 'shareModal';
27
- export const INTEGRATION_MODAL_SOURCE = 'integrationShareModal';
27
+ export const INTEGRATION_MODAL_SOURCE = 'integrationShareDialog';
28
28
  export const screenEvent = ({
29
29
  isPublicLink = false
30
30
  }) => createScreenEvent(ANALYTICS_SOURCE, {
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/share",
3
- "version": "3.0.4"
3
+ "version": "3.0.5"
4
4
  }
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { AnalyticsContext } from '@atlaskit/analytics-next';
3
- import { ANALYTICS_SOURCE } from '../analytics';
3
+ import { INTEGRATION_MODAL_SOURCE } from '../analytics';
4
4
  import { IntegrationForm } from '../IntegrationForm';
5
5
  import { ShareForm } from '../ShareForm';
6
6
  import { ShareFormWrapper } from '../ShareFormWrapper';
@@ -43,19 +43,19 @@ function LazyShareForm(props) {
43
43
  defaultValue = props.defaultValue,
44
44
  showTitle = props.showTitle;
45
45
  var footer = /*#__PURE__*/React.createElement("div", null, bottomMessage ? /*#__PURE__*/React.createElement(BottomMessageWrapper, null, bottomMessage) : null, customFooter && /*#__PURE__*/React.createElement(CustomFooterWrapper, null, customFooter));
46
- return /*#__PURE__*/React.createElement(AnalyticsContext, {
47
- data: {
48
- source: ANALYTICS_SOURCE
49
- }
50
- }, /*#__PURE__*/React.createElement(ShareFormWrapper, {
46
+ return /*#__PURE__*/React.createElement(ShareFormWrapper, {
51
47
  footer: footer // form title will be determined by `title` and `showTitle` prop passed to `ShareForm`,
52
48
  // so we don't need to show title via ShareFormWrapper
53
49
  ,
54
50
  shouldShowTitle: false
55
- }, showIntegrationForm && selectedIntegration !== null ? /*#__PURE__*/React.createElement(IntegrationForm, {
51
+ }, showIntegrationForm && selectedIntegration !== null ? /*#__PURE__*/React.createElement(AnalyticsContext, {
52
+ data: {
53
+ source: INTEGRATION_MODAL_SOURCE
54
+ }
55
+ }, /*#__PURE__*/React.createElement(IntegrationForm, {
56
56
  Content: selectedIntegration.Content,
57
57
  onIntegrationClose: onDialogClose
58
- }) : /*#__PURE__*/React.createElement(ShareForm, {
58
+ })) : /*#__PURE__*/React.createElement(ShareForm, {
59
59
  copyLink: copyLink,
60
60
  loadOptions: loadOptions,
61
61
  title: shareFormTitle,
@@ -83,7 +83,7 @@ function LazyShareForm(props) {
83
83
  onUserSelectionChange: onUserSelectionChange,
84
84
  handleCloseDialog: onDialogClose,
85
85
  onTabChange: onTabChange
86
- })));
86
+ }));
87
87
  }
88
88
 
89
89
  export default LazyShareForm;
@@ -21,6 +21,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
21
21
  import React from 'react';
22
22
  import { FormattedMessage, injectIntl } from 'react-intl-next';
23
23
  import styled from 'styled-components';
24
+ import { AnalyticsContext } from '@atlaskit/analytics-next';
24
25
  import Button from '@atlaskit/button/custom-theme-button';
25
26
  import Form from '@atlaskit/form';
26
27
  import ErrorIcon from '@atlaskit/icon/glyph/error';
@@ -30,6 +31,7 @@ import { gridSize } from '@atlaskit/theme/constants';
30
31
  import Tooltip from '@atlaskit/tooltip';
31
32
  import { messages } from '../i18n';
32
33
  import { TabType } from '../types';
34
+ import { ANALYTICS_SOURCE, INTEGRATION_MODAL_SOURCE } from './analytics';
33
35
  import { CommentField } from './CommentField';
34
36
  import CopyLinkButton from './CopyLinkButton';
35
37
  import { IntegrationForm } from './IntegrationForm';
@@ -37,13 +39,11 @@ import { ShareHeader } from './ShareHeader';
37
39
  import { UserPickerField } from './UserPickerField';
38
40
  var SubmitButtonWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n margin-left: auto;\n"])));
39
41
  var CenterAlignedIconWrapper = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n align-self: center;\n padding: 0 10px;\n\n > div {\n line-height: 1;\n }\n"])));
40
- export var FormWrapper = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-top: ", "px;\n width: 100%;\n\n /* jira has a class override font settings on h1 in gh-custom-field-pickers.css */\n #ghx-modes-tools #ghx-share & h1:first-child {\n margin-top: 0;\n }\n"])), function (props) {
41
- return props.isMainShare ? gridSize() : gridSize() * 2;
42
- });
42
+ export var FormWrapper = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-top: ", "px;\n width: 100%;\n\n /* jira has a class override font settings on h1 in gh-custom-field-pickers.css */\n #ghx-modes-tools #ghx-share & h1:first-child {\n margin-top: 0;\n }\n"])), gridSize());
43
43
  export var FormFooter = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin-bottom: ", "px;\n display: flex;\n justify-content: flex-start;\n"])), gridSize);
44
44
  var FormField = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin-bottom: 12px;\n"])));
45
45
  var IntegrationWrapper = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n"])));
46
- var IntegrationIconWrapper = styled.span(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin-bottom: -2px;\n margin-right: 5px;\n"])));
46
+ var IntegrationIconWrapper = styled.span(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin-bottom: -6px;\n margin-right: 5px;\n"])));
47
47
 
48
48
  var integrationTabText = function integrationTabText(integrationName) {
49
49
  return /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages.shareInIntegrationButtonText, {
@@ -98,7 +98,11 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
98
98
  isPublicLink = _this$props.isPublicLink,
99
99
  copyTooltipText = _this$props.copyTooltipText,
100
100
  helperMessage = _this$props.helperMessage;
101
- return /*#__PURE__*/React.createElement("form", formProps, showTitle && /*#__PURE__*/React.createElement(ShareHeader, {
101
+ return /*#__PURE__*/React.createElement(AnalyticsContext, {
102
+ data: {
103
+ source: ANALYTICS_SOURCE
104
+ }
105
+ }, /*#__PURE__*/React.createElement("form", formProps, showTitle && /*#__PURE__*/React.createElement(ShareHeader, {
102
106
  title: title
103
107
  }), /*#__PURE__*/React.createElement(FormField, null, /*#__PURE__*/React.createElement(UserPickerField, {
104
108
  onInputChange: onUserInputChange,
@@ -122,7 +126,7 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
122
126
  link: copyLink,
123
127
  isPublicLink: isPublicLink,
124
128
  copyTooltipText: copyTooltipText
125
- }), _this.renderSubmitButton()));
129
+ }), _this.renderSubmitButton())));
126
130
  });
127
131
 
128
132
  _defineProperty(_assertThisInitialized(_this), "renderSubmitButton", function () {
@@ -222,13 +226,13 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
222
226
  key: "share-tab-".concat(firstIntegration.type)
223
227
  }, /*#__PURE__*/React.createElement(IntegrationWrapper, null, /*#__PURE__*/React.createElement(IntegrationIconWrapper, null, /*#__PURE__*/React.createElement(firstIntegration.Icon, null)), integrationTabText(firstIntegration.type)))), /*#__PURE__*/React.createElement(TabPanel, {
224
228
  key: "share-tabPanel-default"
225
- }, /*#__PURE__*/React.createElement(FormWrapper, {
226
- isMainShare: true
227
- }, this.renderShareForm())), /*#__PURE__*/React.createElement(TabPanel, {
229
+ }, /*#__PURE__*/React.createElement(FormWrapper, null, this.renderShareForm())), /*#__PURE__*/React.createElement(TabPanel, {
228
230
  key: "share-tabPanel-integration"
229
- }, /*#__PURE__*/React.createElement(FormWrapper, {
230
- isMainShare: false
231
- }, /*#__PURE__*/React.createElement(IntegrationForm, {
231
+ }, /*#__PURE__*/React.createElement(AnalyticsContext, {
232
+ data: {
233
+ source: INTEGRATION_MODAL_SOURCE
234
+ }
235
+ }, /*#__PURE__*/React.createElement(FormWrapper, null, /*#__PURE__*/React.createElement(IntegrationForm, {
232
236
  Content: firstIntegration.Content,
233
237
  onIntegrationClose: function onIntegrationClose() {
234
238
  return handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog();
@@ -236,7 +240,7 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
236
240
  changeTab: function changeTab(index) {
237
241
  _this2.changeTab(index);
238
242
  }
239
- }))));
243
+ })))));
240
244
  }
241
245
 
242
246
  return this.renderShareForm();
@@ -38,7 +38,7 @@ var createScreenEvent = function createScreenEvent(name) {
38
38
 
39
39
  export var CHANNEL_ID = 'fabric-elements';
40
40
  export var ANALYTICS_SOURCE = 'shareModal';
41
- export var INTEGRATION_MODAL_SOURCE = 'integrationShareModal';
41
+ export var INTEGRATION_MODAL_SOURCE = 'integrationShareDialog';
42
42
  export var screenEvent = function screenEvent(_ref) {
43
43
  var _ref$isPublicLink = _ref.isPublicLink,
44
44
  isPublicLink = _ref$isPublicLink === void 0 ? false : _ref$isPublicLink;
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/share",
3
- "version": "3.0.4"
3
+ "version": "3.0.5"
4
4
  }
@@ -1,14 +1,10 @@
1
1
  import React from 'react';
2
2
  import { WrappedComponentProps } from 'react-intl-next';
3
3
  import { FormChildrenArgs, ShareData, ShareFormProps, TabType } from '../types';
4
- interface FormWrapperType {
5
- isMainShare?: boolean;
6
- }
7
- export declare const FormWrapper: import("styled-components").StyledComponentClass<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & FormWrapperType, any, React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & FormWrapperType>;
4
+ export declare const FormWrapper: import("styled-components").StyledComponentClass<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, any, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
8
5
  export declare const FormFooter: import("styled-components").StyledComponentClass<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, any, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
9
6
  export declare type State = {
10
7
  selectedTab: TabType;
11
8
  };
12
9
  export declare type InternalFormProps = FormChildrenArgs<ShareData> & ShareFormProps & WrappedComponentProps;
13
10
  export declare const ShareForm: React.FC<ShareFormProps>;
14
- export {};
@@ -1,7 +1,7 @@
1
1
  import { DialogContentState, OriginTracing } from '../types';
2
2
  export declare const CHANNEL_ID = "fabric-elements";
3
3
  export declare const ANALYTICS_SOURCE = "shareModal";
4
- export declare const INTEGRATION_MODAL_SOURCE = "integrationShareModal";
4
+ export declare const INTEGRATION_MODAL_SOURCE = "integrationShareDialog";
5
5
  export declare const screenEvent: ({ isPublicLink }: {
6
6
  isPublicLink?: boolean | undefined;
7
7
  }) => Record<string, any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/share",
3
- "version": "3.0.4",
3
+ "version": "3.0.5",
4
4
  "description": "Fabric Share Element",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"