@atlaskit/share 3.1.5 → 3.2.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 +19 -0
- package/dist/cjs/components/ErrorBoundary.js +1 -1
- package/dist/cjs/components/LazyShareForm/LazyShareForm.js +1 -1
- package/dist/cjs/components/ShareDialogContainer.js +32 -9
- package/dist/cjs/components/ShareDialogWithTrigger.js +27 -2
- package/dist/cjs/components/ShareForm.js +1 -1
- package/dist/cjs/components/SplitButton.js +1 -1
- package/dist/cjs/components/{analytics.js → analytics/analytics.js} +1 -1
- package/dist/cjs/components/analytics/ufoExperiences.js +25 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/ErrorBoundary.js +1 -1
- package/dist/es2019/components/LazyShareForm/LazyShareForm.js +1 -1
- package/dist/es2019/components/ShareDialogContainer.js +20 -1
- package/dist/es2019/components/ShareDialogWithTrigger.js +21 -2
- package/dist/es2019/components/ShareForm.js +1 -1
- package/dist/es2019/components/SplitButton.js +1 -1
- package/dist/es2019/components/{analytics.js → analytics/analytics.js} +1 -1
- package/dist/es2019/components/analytics/ufoExperiences.js +15 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/ErrorBoundary.js +1 -1
- package/dist/esm/components/LazyShareForm/LazyShareForm.js +1 -1
- package/dist/esm/components/ShareDialogContainer.js +27 -9
- package/dist/esm/components/ShareDialogWithTrigger.js +25 -2
- package/dist/esm/components/ShareForm.js +1 -1
- package/dist/esm/components/SplitButton.js +1 -1
- package/dist/esm/components/{analytics.js → analytics/analytics.js} +1 -1
- package/dist/esm/components/analytics/ufoExperiences.js +15 -0
- package/dist/esm/version.json +1 -1
- package/dist/types/components/CopyLinkButton.d.ts +1 -1
- package/dist/types/components/ErrorBoundary.d.ts +1 -1
- package/dist/types/components/IntegrationForm.d.ts +1 -1
- package/dist/types/components/LazyShareForm/styled.d.ts +3 -3
- package/dist/types/components/ShareDialogContainer.d.ts +1 -1
- package/dist/types/components/ShareForm.d.ts +2 -2
- package/dist/types/components/ShareFormWrapper/styled.d.ts +2 -2
- package/dist/types/components/ShareHeader.d.ts +1 -1
- package/dist/types/components/{analytics.d.ts → analytics/analytics.d.ts} +13 -12
- package/dist/types/components/analytics/ufoExperiences.d.ts +3 -0
- package/dist/types/components/utils.d.ts +1 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/share
|
|
2
2
|
|
|
3
|
+
## 3.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`bbadcbc3c29`](https://bitbucket.org/atlassian/atlassian-frontend/commits/bbadcbc3c29) - Add analytics through @atlassian/ufo
|
|
8
|
+
|
|
9
|
+
## 3.1.7
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`a424e62b264`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a424e62b264) - Changes to support Node 16 Typescript definitions from `@types/node`.
|
|
14
|
+
|
|
15
|
+
## 3.1.6
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [`cb2392f6d33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cb2392f6d33) - Upgrade to TypeScript 4.2.4
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 3.1.5
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -25,7 +25,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
25
25
|
|
|
26
26
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
27
27
|
|
|
28
|
-
var _analytics = require("./analytics");
|
|
28
|
+
var _analytics = require("./analytics/analytics");
|
|
29
29
|
|
|
30
30
|
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); }; }
|
|
31
31
|
|
|
@@ -11,7 +11,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
13
13
|
|
|
14
|
-
var _analytics = require("../analytics");
|
|
14
|
+
var _analytics = require("../analytics/analytics");
|
|
15
15
|
|
|
16
16
|
var _IntegrationForm = require("../IntegrationForm");
|
|
17
17
|
|
|
@@ -9,6 +9,8 @@ exports.defaultConfig = exports.ShareDialogContainerInternal = exports.ShareDial
|
|
|
9
9
|
|
|
10
10
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
11
11
|
|
|
12
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
+
|
|
12
14
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
13
15
|
|
|
14
16
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
@@ -43,7 +45,9 @@ var _ShareServiceClient = require("../clients/ShareServiceClient");
|
|
|
43
45
|
|
|
44
46
|
var _i18n = require("../i18n");
|
|
45
47
|
|
|
46
|
-
var _analytics = require("./analytics");
|
|
48
|
+
var _analytics = require("./analytics/analytics");
|
|
49
|
+
|
|
50
|
+
var _ufoExperiences = require("./analytics/ufoExperiences");
|
|
47
51
|
|
|
48
52
|
var _ErrorBoundary = _interopRequireDefault(require("./ErrorBoundary"));
|
|
49
53
|
|
|
@@ -105,16 +109,19 @@ var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Component) {
|
|
|
105
109
|
_this.setState({
|
|
106
110
|
isFetchingConfig: true
|
|
107
111
|
}, /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
108
|
-
var config;
|
|
112
|
+
var config, errObj;
|
|
109
113
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
110
114
|
while (1) {
|
|
111
115
|
switch (_context.prev = _context.next) {
|
|
112
116
|
case 0:
|
|
113
117
|
_context.prev = 0;
|
|
114
|
-
|
|
118
|
+
|
|
119
|
+
_ufoExperiences.renderShareDialogExp.start();
|
|
120
|
+
|
|
121
|
+
_context.next = 4;
|
|
115
122
|
return _this.shareClient.getConfig(_this.props.cloudId);
|
|
116
123
|
|
|
117
|
-
case
|
|
124
|
+
case 4:
|
|
118
125
|
config = _context.sent;
|
|
119
126
|
|
|
120
127
|
if (_this._isMounted) {
|
|
@@ -124,11 +131,13 @@ var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Component) {
|
|
|
124
131
|
});
|
|
125
132
|
}
|
|
126
133
|
|
|
127
|
-
|
|
134
|
+
_ufoExperiences.renderShareDialogExp.success();
|
|
135
|
+
|
|
136
|
+
_context.next = 15;
|
|
128
137
|
break;
|
|
129
138
|
|
|
130
|
-
case
|
|
131
|
-
_context.prev =
|
|
139
|
+
case 9:
|
|
140
|
+
_context.prev = 9;
|
|
132
141
|
_context.t0 = _context["catch"](0);
|
|
133
142
|
|
|
134
143
|
if (_this._isMounted) {
|
|
@@ -138,12 +147,26 @@ var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Component) {
|
|
|
138
147
|
});
|
|
139
148
|
}
|
|
140
149
|
|
|
141
|
-
|
|
150
|
+
errObj = (0, _extends2.default)({}, _context.t0);
|
|
151
|
+
|
|
152
|
+
if (_context.t0 instanceof Error) {
|
|
153
|
+
errObj = _objectSpread(_objectSpread({}, errObj), {}, {
|
|
154
|
+
className: _context.t0.constructor.name
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
_ufoExperiences.renderShareDialogExp.failure({
|
|
159
|
+
metadata: {
|
|
160
|
+
error: errObj
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
case 15:
|
|
142
165
|
case "end":
|
|
143
166
|
return _context.stop();
|
|
144
167
|
}
|
|
145
168
|
}
|
|
146
|
-
}, _callee, null, [[0,
|
|
169
|
+
}, _callee, null, [[0, 9]]);
|
|
147
170
|
})));
|
|
148
171
|
});
|
|
149
172
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleSubmitShare", function (_ref2) {
|
|
@@ -47,7 +47,9 @@ var _i18n = require("../i18n");
|
|
|
47
47
|
|
|
48
48
|
var _types = require("../types");
|
|
49
49
|
|
|
50
|
-
var _analytics = require("./analytics");
|
|
50
|
+
var _analytics = require("./analytics/analytics");
|
|
51
|
+
|
|
52
|
+
var _ufoExperiences = require("./analytics/ufoExperiences");
|
|
51
53
|
|
|
52
54
|
var _lazy = _interopRequireDefault(require("./LazyShareForm/lazy"));
|
|
53
55
|
|
|
@@ -197,6 +199,11 @@ var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureComponent
|
|
|
197
199
|
|
|
198
200
|
|
|
199
201
|
if (shouldCloseOnEscapePress) {
|
|
202
|
+
// This experience should be aborted in a scenario when a user closes the dialog before the shareClient.getConfig() call is finished
|
|
203
|
+
// It is a race condition between the `SUCCEEDED` case and the `ABORTED` case of this experience
|
|
204
|
+
// UFO experiences can only have one FINAL state so it doesn't matter if we call .abort() after the experience has succeeded and vice versa
|
|
205
|
+
_ufoExperiences.renderShareDialogExp.abort();
|
|
206
|
+
|
|
200
207
|
_this.createAndFireEvent((0, _analytics.cancelShare)(_this.start));
|
|
201
208
|
|
|
202
209
|
_this.closeAndResetDialog();
|
|
@@ -250,7 +257,12 @@ var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureComponent
|
|
|
250
257
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleCloseDialog", function () {
|
|
251
258
|
if (_this.props.onDialogClose) {
|
|
252
259
|
_this.props.onDialogClose();
|
|
253
|
-
}
|
|
260
|
+
} // This experience should be aborted in a scenario when a user closes the dialog before the shareClient.getConfig() call is finished
|
|
261
|
+
// It is a race condition between the `SUCCEEDED` case and the `ABORTED` case of this experience
|
|
262
|
+
// UFO experiences can only have one FINAL state so it doesn't matter if we call .abort() after the experience has succeeded and vice versa
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
_ufoExperiences.renderShareDialogExp.abort();
|
|
254
266
|
|
|
255
267
|
_this.setState({
|
|
256
268
|
isDialogOpen: false,
|
|
@@ -271,6 +283,8 @@ var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureComponent
|
|
|
271
283
|
return;
|
|
272
284
|
}
|
|
273
285
|
|
|
286
|
+
_ufoExperiences.shareSubmitExp.start();
|
|
287
|
+
|
|
274
288
|
_this.setState({
|
|
275
289
|
isSharing: true
|
|
276
290
|
});
|
|
@@ -285,6 +299,8 @@ var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureComponent
|
|
|
285
299
|
});
|
|
286
300
|
|
|
287
301
|
showFlags(_this.getFlags());
|
|
302
|
+
|
|
303
|
+
_ufoExperiences.shareSubmitExp.success();
|
|
288
304
|
}).catch(function (err) {
|
|
289
305
|
_this.setState({
|
|
290
306
|
isSharing: false,
|
|
@@ -292,6 +308,15 @@ var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureComponent
|
|
|
292
308
|
message: err.message
|
|
293
309
|
}
|
|
294
310
|
});
|
|
311
|
+
|
|
312
|
+
_ufoExperiences.shareSubmitExp.failure({
|
|
313
|
+
metadata: {
|
|
314
|
+
error: {
|
|
315
|
+
message: err.message,
|
|
316
|
+
name: err.name
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
});
|
|
295
320
|
});
|
|
296
321
|
});
|
|
297
322
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleFormDismiss", function (data) {
|
|
@@ -35,7 +35,7 @@ var _tokens = require("@atlaskit/tokens");
|
|
|
35
35
|
|
|
36
36
|
var _i18n = require("../i18n");
|
|
37
37
|
|
|
38
|
-
var _analytics = require("./analytics");
|
|
38
|
+
var _analytics = require("./analytics/analytics");
|
|
39
39
|
|
|
40
40
|
var _IntegrationButton = _interopRequireDefault(require("./IntegrationButton"));
|
|
41
41
|
|
|
@@ -11,7 +11,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
11
11
|
|
|
12
12
|
var _smartUserPicker = require("@atlaskit/smart-user-picker");
|
|
13
13
|
|
|
14
|
-
var _version = require("
|
|
14
|
+
var _version = require("../../version.json");
|
|
15
15
|
|
|
16
16
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
17
17
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.shareSubmitExp = exports.renderShareDialogExp = void 0;
|
|
7
|
+
|
|
8
|
+
var _ufo = require("@atlaskit/ufo");
|
|
9
|
+
|
|
10
|
+
var renderShareDialogExp = new _ufo.UFOExperience('render-share-dialog', {
|
|
11
|
+
type: _ufo.ExperienceTypes.Experience,
|
|
12
|
+
performanceType: _ufo.ExperiencePerformanceTypes.InlineResult,
|
|
13
|
+
platform: {
|
|
14
|
+
component: 'people'
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
exports.renderShareDialogExp = renderShareDialogExp;
|
|
18
|
+
var shareSubmitExp = new _ufo.UFOExperience('share-submit-action', {
|
|
19
|
+
type: _ufo.ExperienceTypes.Experience,
|
|
20
|
+
performanceType: _ufo.ExperiencePerformanceTypes.InlineResult,
|
|
21
|
+
platform: {
|
|
22
|
+
component: 'people'
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
exports.shareSubmitExp = shareSubmitExp;
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
4
|
-
import { CHANNEL_ID, errorEncountered } from './analytics';
|
|
4
|
+
import { CHANNEL_ID, errorEncountered } from './analytics/analytics';
|
|
5
5
|
|
|
6
6
|
// ErrorBoundary does not support in functional component
|
|
7
7
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
3
|
-
import { INTEGRATION_MODAL_SOURCE } from '../analytics';
|
|
3
|
+
import { INTEGRATION_MODAL_SOURCE } from '../analytics/analytics';
|
|
4
4
|
import { IntegrationForm } from '../IntegrationForm';
|
|
5
5
|
import { ShareForm } from '../ShareForm';
|
|
6
6
|
import { ShareFormWrapper } from '../ShareFormWrapper';
|
|
@@ -8,7 +8,8 @@ import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
|
8
8
|
import { AtlassianUrlShortenerClient } from '../clients/AtlassianUrlShortenerClient';
|
|
9
9
|
import { ShareServiceClient } from '../clients/ShareServiceClient';
|
|
10
10
|
import { messages } from '../i18n';
|
|
11
|
-
import { CHANNEL_ID, copyLinkButtonClicked, errorEncountered, shortUrlGenerated, shortUrlRequested } from './analytics';
|
|
11
|
+
import { CHANNEL_ID, copyLinkButtonClicked, errorEncountered, shortUrlGenerated, shortUrlRequested } from './analytics/analytics';
|
|
12
|
+
import { renderShareDialogExp } from './analytics/ufoExperiences';
|
|
12
13
|
import ErrorBoundary from './ErrorBoundary';
|
|
13
14
|
import MessagesIntlProvider from './MessagesIntlProvider';
|
|
14
15
|
import { ShareDialogWithTrigger } from './ShareDialogWithTrigger';
|
|
@@ -54,6 +55,7 @@ export class ShareDialogContainerInternal extends React.Component {
|
|
|
54
55
|
isFetchingConfig: true
|
|
55
56
|
}, async () => {
|
|
56
57
|
try {
|
|
58
|
+
renderShareDialogExp.start();
|
|
57
59
|
const config = await this.shareClient.getConfig(this.props.cloudId);
|
|
58
60
|
|
|
59
61
|
if (this._isMounted) {
|
|
@@ -62,6 +64,8 @@ export class ShareDialogContainerInternal extends React.Component {
|
|
|
62
64
|
isFetchingConfig: false
|
|
63
65
|
});
|
|
64
66
|
}
|
|
67
|
+
|
|
68
|
+
renderShareDialogExp.success();
|
|
65
69
|
} catch (error) {
|
|
66
70
|
if (this._isMounted) {
|
|
67
71
|
this.setState({
|
|
@@ -69,6 +73,21 @@ export class ShareDialogContainerInternal extends React.Component {
|
|
|
69
73
|
isFetchingConfig: false
|
|
70
74
|
});
|
|
71
75
|
}
|
|
76
|
+
|
|
77
|
+
let { ...errObj
|
|
78
|
+
} = error;
|
|
79
|
+
|
|
80
|
+
if (error instanceof Error) {
|
|
81
|
+
errObj = { ...errObj,
|
|
82
|
+
className: error.constructor.name
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
renderShareDialogExp.failure({
|
|
87
|
+
metadata: {
|
|
88
|
+
error: errObj
|
|
89
|
+
}
|
|
90
|
+
});
|
|
72
91
|
}
|
|
73
92
|
});
|
|
74
93
|
});
|
|
@@ -12,8 +12,9 @@ import Aktooltip from '@atlaskit/tooltip';
|
|
|
12
12
|
import { messages } from '../i18n';
|
|
13
13
|
import { OBJECT_SHARED } from '../types';
|
|
14
14
|
import { cancelShare, CHANNEL_ID, copyLinkButtonClicked, formShareSubmitted, screenEvent, shareSplitButtonEvent, shareTabClicked, shareTriggerButtonClicked // type TabSubjectIdType,
|
|
15
|
-
} from './analytics'; // eslint-disable-next-line no-duplicate-imports
|
|
15
|
+
} from './analytics/analytics'; // eslint-disable-next-line no-duplicate-imports
|
|
16
16
|
|
|
17
|
+
import { renderShareDialogExp, shareSubmitExp } from './analytics/ufoExperiences';
|
|
17
18
|
import LazyShareFormLazy from './LazyShareForm/lazy';
|
|
18
19
|
import ShareButton from './ShareButton';
|
|
19
20
|
import SplitButton from './SplitButton';
|
|
@@ -153,6 +154,10 @@ export class ShareDialogWithTriggerInternal extends React.PureComponent {
|
|
|
153
154
|
|
|
154
155
|
|
|
155
156
|
if (shouldCloseOnEscapePress) {
|
|
157
|
+
// This experience should be aborted in a scenario when a user closes the dialog before the shareClient.getConfig() call is finished
|
|
158
|
+
// It is a race condition between the `SUCCEEDED` case and the `ABORTED` case of this experience
|
|
159
|
+
// UFO experiences can only have one FINAL state so it doesn't matter if we call .abort() after the experience has succeeded and vice versa
|
|
160
|
+
renderShareDialogExp.abort();
|
|
156
161
|
this.createAndFireEvent(cancelShare(this.start));
|
|
157
162
|
this.closeAndResetDialog();
|
|
158
163
|
}
|
|
@@ -208,8 +213,12 @@ export class ShareDialogWithTriggerInternal extends React.PureComponent {
|
|
|
208
213
|
_defineProperty(this, "handleCloseDialog", () => {
|
|
209
214
|
if (this.props.onDialogClose) {
|
|
210
215
|
this.props.onDialogClose();
|
|
211
|
-
}
|
|
216
|
+
} // This experience should be aborted in a scenario when a user closes the dialog before the shareClient.getConfig() call is finished
|
|
217
|
+
// It is a race condition between the `SUCCEEDED` case and the `ABORTED` case of this experience
|
|
218
|
+
// UFO experiences can only have one FINAL state so it doesn't matter if we call .abort() after the experience has succeeded and vice versa
|
|
219
|
+
|
|
212
220
|
|
|
221
|
+
renderShareDialogExp.abort();
|
|
213
222
|
this.setState({
|
|
214
223
|
isDialogOpen: false,
|
|
215
224
|
showIntegrationForm: false,
|
|
@@ -231,6 +240,7 @@ export class ShareDialogWithTriggerInternal extends React.PureComponent {
|
|
|
231
240
|
return;
|
|
232
241
|
}
|
|
233
242
|
|
|
243
|
+
shareSubmitExp.start();
|
|
234
244
|
this.setState({
|
|
235
245
|
isSharing: true
|
|
236
246
|
});
|
|
@@ -241,6 +251,7 @@ export class ShareDialogWithTriggerInternal extends React.PureComponent {
|
|
|
241
251
|
isSharing: false
|
|
242
252
|
});
|
|
243
253
|
showFlags(this.getFlags());
|
|
254
|
+
shareSubmitExp.success();
|
|
244
255
|
}).catch(err => {
|
|
245
256
|
this.setState({
|
|
246
257
|
isSharing: false,
|
|
@@ -248,6 +259,14 @@ export class ShareDialogWithTriggerInternal extends React.PureComponent {
|
|
|
248
259
|
message: err.message
|
|
249
260
|
}
|
|
250
261
|
});
|
|
262
|
+
shareSubmitExp.failure({
|
|
263
|
+
metadata: {
|
|
264
|
+
error: {
|
|
265
|
+
message: err.message,
|
|
266
|
+
name: err.name
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
});
|
|
251
270
|
});
|
|
252
271
|
});
|
|
253
272
|
|
|
@@ -14,7 +14,7 @@ import { token } from '@atlaskit/tokens';
|
|
|
14
14
|
import Tooltip from '@atlaskit/tooltip';
|
|
15
15
|
import { messages } from '../i18n';
|
|
16
16
|
import { TabType } from '../types';
|
|
17
|
-
import { ANALYTICS_SOURCE, INTEGRATION_MODAL_SOURCE } from './analytics';
|
|
17
|
+
import { ANALYTICS_SOURCE, INTEGRATION_MODAL_SOURCE } from './analytics/analytics';
|
|
18
18
|
import { CommentField } from './CommentField';
|
|
19
19
|
import CopyLinkButton from './CopyLinkButton';
|
|
20
20
|
import { IntegrationForm } from './IntegrationForm';
|
|
@@ -9,7 +9,7 @@ import { N800 } from '@atlaskit/theme/colors';
|
|
|
9
9
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
10
10
|
import { token } from '@atlaskit/tokens';
|
|
11
11
|
import { messages } from '../i18n';
|
|
12
|
-
import { shareIntegrationButtonEvent } from './analytics';
|
|
12
|
+
import { shareIntegrationButtonEvent } from './analytics/analytics';
|
|
13
13
|
import IntegrationButton from './IntegrationButton';
|
|
14
14
|
const SplitButtonWrapper = styled.div`
|
|
15
15
|
display: flex;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isEmail, isTeam, isUser } from '@atlaskit/smart-user-picker';
|
|
2
|
-
import { name as packageName, version as packageVersion } from '
|
|
2
|
+
import { name as packageName, version as packageVersion } from '../../version.json';
|
|
3
3
|
|
|
4
4
|
const buildAttributes = (attributes = {}) => ({
|
|
5
5
|
packageName,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ExperiencePerformanceTypes, ExperienceTypes, UFOExperience } from '@atlaskit/ufo';
|
|
2
|
+
export const renderShareDialogExp = new UFOExperience('render-share-dialog', {
|
|
3
|
+
type: ExperienceTypes.Experience,
|
|
4
|
+
performanceType: ExperiencePerformanceTypes.InlineResult,
|
|
5
|
+
platform: {
|
|
6
|
+
component: 'people'
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
export const shareSubmitExp = new UFOExperience('share-submit-action', {
|
|
10
|
+
type: ExperienceTypes.Experience,
|
|
11
|
+
performanceType: ExperiencePerformanceTypes.InlineResult,
|
|
12
|
+
platform: {
|
|
13
|
+
component: 'people'
|
|
14
|
+
}
|
|
15
|
+
});
|
package/dist/es2019/version.json
CHANGED
|
@@ -12,7 +12,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
12
12
|
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
15
|
-
import { CHANNEL_ID, errorEncountered } from './analytics';
|
|
15
|
+
import { CHANNEL_ID, errorEncountered } from './analytics/analytics';
|
|
16
16
|
|
|
17
17
|
// ErrorBoundary does not support in functional component
|
|
18
18
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
3
|
-
import { INTEGRATION_MODAL_SOURCE } from '../analytics';
|
|
3
|
+
import { INTEGRATION_MODAL_SOURCE } from '../analytics/analytics';
|
|
4
4
|
import { IntegrationForm } from '../IntegrationForm';
|
|
5
5
|
import { ShareForm } from '../ShareForm';
|
|
6
6
|
import { ShareFormWrapper } from '../ShareFormWrapper';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
4
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
5
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
@@ -25,7 +26,8 @@ import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
|
25
26
|
import { AtlassianUrlShortenerClient } from '../clients/AtlassianUrlShortenerClient';
|
|
26
27
|
import { ShareServiceClient } from '../clients/ShareServiceClient';
|
|
27
28
|
import { messages } from '../i18n';
|
|
28
|
-
import { CHANNEL_ID, copyLinkButtonClicked, errorEncountered, shortUrlGenerated, shortUrlRequested } from './analytics';
|
|
29
|
+
import { CHANNEL_ID, copyLinkButtonClicked, errorEncountered, shortUrlGenerated, shortUrlRequested } from './analytics/analytics';
|
|
30
|
+
import { renderShareDialogExp } from './analytics/ufoExperiences';
|
|
29
31
|
import ErrorBoundary from './ErrorBoundary';
|
|
30
32
|
import MessagesIntlProvider from './MessagesIntlProvider';
|
|
31
33
|
import { ShareDialogWithTrigger } from './ShareDialogWithTrigger';
|
|
@@ -78,16 +80,17 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
|
|
|
78
80
|
_this.setState({
|
|
79
81
|
isFetchingConfig: true
|
|
80
82
|
}, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
81
|
-
var config;
|
|
83
|
+
var config, errObj;
|
|
82
84
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
83
85
|
while (1) {
|
|
84
86
|
switch (_context.prev = _context.next) {
|
|
85
87
|
case 0:
|
|
86
88
|
_context.prev = 0;
|
|
87
|
-
|
|
89
|
+
renderShareDialogExp.start();
|
|
90
|
+
_context.next = 4;
|
|
88
91
|
return _this.shareClient.getConfig(_this.props.cloudId);
|
|
89
92
|
|
|
90
|
-
case
|
|
93
|
+
case 4:
|
|
91
94
|
config = _context.sent;
|
|
92
95
|
|
|
93
96
|
if (_this._isMounted) {
|
|
@@ -97,11 +100,12 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
|
|
|
97
100
|
});
|
|
98
101
|
}
|
|
99
102
|
|
|
100
|
-
|
|
103
|
+
renderShareDialogExp.success();
|
|
104
|
+
_context.next = 15;
|
|
101
105
|
break;
|
|
102
106
|
|
|
103
|
-
case
|
|
104
|
-
_context.prev =
|
|
107
|
+
case 9:
|
|
108
|
+
_context.prev = 9;
|
|
105
109
|
_context.t0 = _context["catch"](0);
|
|
106
110
|
|
|
107
111
|
if (_this._isMounted) {
|
|
@@ -111,12 +115,26 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
|
|
|
111
115
|
});
|
|
112
116
|
}
|
|
113
117
|
|
|
114
|
-
|
|
118
|
+
errObj = _extends({}, _context.t0);
|
|
119
|
+
|
|
120
|
+
if (_context.t0 instanceof Error) {
|
|
121
|
+
errObj = _objectSpread(_objectSpread({}, errObj), {}, {
|
|
122
|
+
className: _context.t0.constructor.name
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
renderShareDialogExp.failure({
|
|
127
|
+
metadata: {
|
|
128
|
+
error: errObj
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
case 15:
|
|
115
133
|
case "end":
|
|
116
134
|
return _context.stop();
|
|
117
135
|
}
|
|
118
136
|
}
|
|
119
|
-
}, _callee, null, [[0,
|
|
137
|
+
}, _callee, null, [[0, 9]]);
|
|
120
138
|
})));
|
|
121
139
|
});
|
|
122
140
|
|
|
@@ -30,8 +30,9 @@ import Aktooltip from '@atlaskit/tooltip';
|
|
|
30
30
|
import { messages } from '../i18n';
|
|
31
31
|
import { OBJECT_SHARED } from '../types';
|
|
32
32
|
import { cancelShare, CHANNEL_ID, copyLinkButtonClicked, formShareSubmitted, screenEvent, shareSplitButtonEvent, shareTabClicked, shareTriggerButtonClicked // type TabSubjectIdType,
|
|
33
|
-
} from './analytics'; // eslint-disable-next-line no-duplicate-imports
|
|
33
|
+
} from './analytics/analytics'; // eslint-disable-next-line no-duplicate-imports
|
|
34
34
|
|
|
35
|
+
import { renderShareDialogExp, shareSubmitExp } from './analytics/ufoExperiences';
|
|
35
36
|
import LazyShareFormLazy from './LazyShareForm/lazy';
|
|
36
37
|
import ShareButton from './ShareButton';
|
|
37
38
|
import SplitButton from './SplitButton';
|
|
@@ -172,6 +173,11 @@ export var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
172
173
|
|
|
173
174
|
|
|
174
175
|
if (shouldCloseOnEscapePress) {
|
|
176
|
+
// This experience should be aborted in a scenario when a user closes the dialog before the shareClient.getConfig() call is finished
|
|
177
|
+
// It is a race condition between the `SUCCEEDED` case and the `ABORTED` case of this experience
|
|
178
|
+
// UFO experiences can only have one FINAL state so it doesn't matter if we call .abort() after the experience has succeeded and vice versa
|
|
179
|
+
renderShareDialogExp.abort();
|
|
180
|
+
|
|
175
181
|
_this.createAndFireEvent(cancelShare(_this.start));
|
|
176
182
|
|
|
177
183
|
_this.closeAndResetDialog();
|
|
@@ -228,7 +234,12 @@ export var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
228
234
|
_defineProperty(_assertThisInitialized(_this), "handleCloseDialog", function () {
|
|
229
235
|
if (_this.props.onDialogClose) {
|
|
230
236
|
_this.props.onDialogClose();
|
|
231
|
-
}
|
|
237
|
+
} // This experience should be aborted in a scenario when a user closes the dialog before the shareClient.getConfig() call is finished
|
|
238
|
+
// It is a race condition between the `SUCCEEDED` case and the `ABORTED` case of this experience
|
|
239
|
+
// UFO experiences can only have one FINAL state so it doesn't matter if we call .abort() after the experience has succeeded and vice versa
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
renderShareDialogExp.abort();
|
|
232
243
|
|
|
233
244
|
_this.setState({
|
|
234
245
|
isDialogOpen: false,
|
|
@@ -250,6 +261,8 @@ export var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
250
261
|
return;
|
|
251
262
|
}
|
|
252
263
|
|
|
264
|
+
shareSubmitExp.start();
|
|
265
|
+
|
|
253
266
|
_this.setState({
|
|
254
267
|
isSharing: true
|
|
255
268
|
});
|
|
@@ -264,6 +277,7 @@ export var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
264
277
|
});
|
|
265
278
|
|
|
266
279
|
showFlags(_this.getFlags());
|
|
280
|
+
shareSubmitExp.success();
|
|
267
281
|
}).catch(function (err) {
|
|
268
282
|
_this.setState({
|
|
269
283
|
isSharing: false,
|
|
@@ -271,6 +285,15 @@ export var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
271
285
|
message: err.message
|
|
272
286
|
}
|
|
273
287
|
});
|
|
288
|
+
|
|
289
|
+
shareSubmitExp.failure({
|
|
290
|
+
metadata: {
|
|
291
|
+
error: {
|
|
292
|
+
message: err.message,
|
|
293
|
+
name: err.name
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
});
|
|
274
297
|
});
|
|
275
298
|
});
|
|
276
299
|
|
|
@@ -32,7 +32,7 @@ import { token } from '@atlaskit/tokens';
|
|
|
32
32
|
import Tooltip from '@atlaskit/tooltip';
|
|
33
33
|
import { messages } from '../i18n';
|
|
34
34
|
import { TabType } from '../types';
|
|
35
|
-
import { ANALYTICS_SOURCE, INTEGRATION_MODAL_SOURCE } from './analytics';
|
|
35
|
+
import { ANALYTICS_SOURCE, INTEGRATION_MODAL_SOURCE } from './analytics/analytics';
|
|
36
36
|
import { CommentField } from './CommentField';
|
|
37
37
|
import CopyLinkButton from './CopyLinkButton';
|
|
38
38
|
import { IntegrationForm } from './IntegrationForm';
|
|
@@ -15,7 +15,7 @@ import { N800 } from '@atlaskit/theme/colors';
|
|
|
15
15
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
16
16
|
import { token } from '@atlaskit/tokens';
|
|
17
17
|
import { messages } from '../i18n';
|
|
18
|
-
import { shareIntegrationButtonEvent } from './analytics';
|
|
18
|
+
import { shareIntegrationButtonEvent } from './analytics/analytics';
|
|
19
19
|
import IntegrationButton from './IntegrationButton';
|
|
20
20
|
var SplitButtonWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n button {\n border-radius: ", "px 0 0 ", "px;\n }\n button:hover {\n border-radius: ", "px 0 0 ", "px;\n }\n"])), borderRadius(), borderRadius(), borderRadius(), borderRadius());
|
|
21
21
|
var DropdownMenuWrapper = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-left: 1px;\n button {\n border-radius: 0 ", "px ", "px 0;\n }\n button:hover {\n border-radius: 0 ", "px ", "px 0;\n }\n"])), borderRadius(), borderRadius(), borderRadius(), borderRadius());
|
|
@@ -5,7 +5,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
5
5
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
6
|
|
|
7
7
|
import { isEmail, isTeam, isUser } from '@atlaskit/smart-user-picker';
|
|
8
|
-
import { name as packageName, version as packageVersion } from '
|
|
8
|
+
import { name as packageName, version as packageVersion } from '../../version.json';
|
|
9
9
|
|
|
10
10
|
var buildAttributes = function buildAttributes() {
|
|
11
11
|
var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ExperiencePerformanceTypes, ExperienceTypes, UFOExperience } from '@atlaskit/ufo';
|
|
2
|
+
export var renderShareDialogExp = new UFOExperience('render-share-dialog', {
|
|
3
|
+
type: ExperienceTypes.Experience,
|
|
4
|
+
performanceType: ExperiencePerformanceTypes.InlineResult,
|
|
5
|
+
platform: {
|
|
6
|
+
component: 'people'
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
export var shareSubmitExp = new UFOExperience('share-submit-action', {
|
|
10
|
+
type: ExperienceTypes.Experience,
|
|
11
|
+
performanceType: ExperiencePerformanceTypes.InlineResult,
|
|
12
|
+
platform: {
|
|
13
|
+
component: 'people'
|
|
14
|
+
}
|
|
15
|
+
});
|
package/dist/esm/version.json
CHANGED
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { WrappedComponentProps } from 'react-intl-next';
|
|
3
3
|
import { TriggerProps } from '@atlaskit/popup';
|
|
4
4
|
export declare const AUTO_DISMISS_MS: number;
|
|
5
|
-
export declare const MessageContainer: import("styled-components").StyledComponentClass<React.
|
|
5
|
+
export declare const MessageContainer: import("styled-components").StyledComponentClass<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement>, any, React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement>>;
|
|
6
6
|
declare type InputProps = {
|
|
7
7
|
text: string;
|
|
8
8
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
3
|
-
declare const _default: React.ForwardRefExoticComponent<
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<WithAnalyticsEventsProps, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
|
|
4
4
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IntegrationContentProps } from '../types';
|
|
3
|
-
export declare const FormWrapper: import("styled-components").StyledComponentClass<React.
|
|
3
|
+
export declare const FormWrapper: import("styled-components").StyledComponentClass<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement>, any, React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement>>;
|
|
4
4
|
export declare type IntegrationFormProps = {
|
|
5
5
|
Content: React.ComponentType<IntegrationContentProps> | null;
|
|
6
6
|
onIntegrationClose?: () => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const BottomMessageWrapper: import("styled-components").StyledComponentClass<import("react").
|
|
3
|
-
export declare const CustomFooterWrapper: import("styled-components").StyledComponentClass<import("react").
|
|
4
|
-
export declare const SpinnerWrapper: import("styled-components").StyledComponentClass<import("react").
|
|
2
|
+
export declare const BottomMessageWrapper: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>>;
|
|
3
|
+
export declare const CustomFooterWrapper: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>>;
|
|
4
|
+
export declare const SpinnerWrapper: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>>;
|
|
@@ -52,7 +52,7 @@ export declare class ShareDialogContainerInternal extends React.Component<WithAn
|
|
|
52
52
|
getFormShareLink: () => string;
|
|
53
53
|
render(): JSX.Element;
|
|
54
54
|
}
|
|
55
|
-
export declare const ShareDialogContainer: React.ForwardRefExoticComponent<Pick<
|
|
55
|
+
export declare const ShareDialogContainer: React.ForwardRefExoticComponent<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "onTriggerButtonClick" | "isAutoOpenDialog" | "shouldCloseOnEscapePress" | "dialogPlacement" | "loadUserOptions" | "onDialogOpen" | "onDialogClose" | "onUserSelectionChange" | "renderCustomTriggerButton" | "shareContentType" | "shareFormTitle" | "shareFormHelperMessage" | "showFlags" | "loggedInAccountId" | "triggerButtonAppearance" | "triggerButtonIcon" | "triggerButtonStyle" | "triggerButtonTooltipPosition" | "triggerButtonTooltipText" | "cloudId" | "bottomMessage" | "customFooter" | "isCopyDisabled" | "isPublicLink" | "integrationMode" | "shareFieldsFooter" | "shareIntegrations" | "shareAri" | "tabIndex" | "copyTooltipText" | "dialogZIndex" | "shareClient" | "urlShortenerClient" | "shortLinkData" | "formatCopyLink" | "originTracingFactory" | "productId" | "shareLink" | "shareTitle" | "useUrlShortener"> & Partial<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "enableSmartUserPicker" | "product" | "shareeAction">> & Partial<Pick<{
|
|
56
56
|
enableSmartUserPicker: boolean;
|
|
57
57
|
shareeAction: "view" | "edit";
|
|
58
58
|
product: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { WrappedComponentProps } from 'react-intl-next';
|
|
3
3
|
import { FormChildrenArgs, ShareData, ShareFormProps, TabType } from '../types';
|
|
4
|
-
export declare const FormWrapper: import("styled-components").StyledComponentClass<React.
|
|
5
|
-
export declare const FormFooter: import("styled-components").StyledComponentClass<React.
|
|
4
|
+
export declare const FormWrapper: import("styled-components").StyledComponentClass<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement>, any, React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement>>;
|
|
5
|
+
export declare const FormFooter: import("styled-components").StyledComponentClass<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement>, any, React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement>>;
|
|
6
6
|
export declare type State = {
|
|
7
7
|
selectedTab: TabType;
|
|
8
8
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const InlineDialogFormWrapper: import("styled-components").StyledComponentClass<import("react").
|
|
2
|
+
export declare const InlineDialogFormWrapper: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>>;
|
|
3
3
|
/**
|
|
4
4
|
* Apply the same styling, as previous @atlaskit/inline-dialog had,
|
|
5
5
|
* compared to the @atlaskit/popup we are now using.
|
|
6
6
|
*
|
|
7
7
|
* packages/design-system/inline-dialog/src/InlineDialog/styled.ts:20:3
|
|
8
8
|
*/
|
|
9
|
-
export declare const InlineDialogContentWrapper: import("styled-components").StyledComponentClass<import("react").
|
|
9
|
+
export declare const InlineDialogContentWrapper: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>>;
|
|
@@ -2,5 +2,5 @@ import React from 'react';
|
|
|
2
2
|
export declare type Props = {
|
|
3
3
|
title?: React.ReactNode;
|
|
4
4
|
};
|
|
5
|
-
export declare const FormHeaderTitle: import("styled-components").StyledComponentClass<
|
|
5
|
+
export declare const FormHeaderTitle: import("styled-components").StyledComponentClass<React.ClassAttributes<HTMLHeadingElement> & React.HTMLAttributes<HTMLHeadingElement> & (import("@atlaskit/theme").ThemeProps | undefined), any, React.ClassAttributes<HTMLHeadingElement> & React.HTMLAttributes<HTMLHeadingElement> & (import("@atlaskit/theme").ThemeProps | undefined)>;
|
|
6
6
|
export declare const ShareHeader: React.StatelessComponent<Props>;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AnalyticsEventPayload } from '@atlaskit/analytics-next';
|
|
2
|
+
import { DialogContentState, OriginTracing } from '../../types';
|
|
2
3
|
export declare const CHANNEL_ID = "fabric-elements";
|
|
3
4
|
export declare const ANALYTICS_SOURCE = "shareModal";
|
|
4
5
|
export declare const INTEGRATION_MODAL_SOURCE = "integrationShareDialog";
|
|
5
6
|
export declare const screenEvent: ({ isPublicLink }: {
|
|
6
7
|
isPublicLink?: boolean | undefined;
|
|
7
|
-
}) =>
|
|
8
|
-
export declare const shareSplitButtonEvent: () =>
|
|
9
|
-
export declare const shareIntegrationButtonEvent: (type?: string) =>
|
|
10
|
-
export declare const errorEncountered: (actionSubjectId: string | undefined, attributes?: any) =>
|
|
11
|
-
export declare const shareTriggerButtonClicked: () =>
|
|
8
|
+
}) => AnalyticsEventPayload;
|
|
9
|
+
export declare const shareSplitButtonEvent: () => AnalyticsEventPayload;
|
|
10
|
+
export declare const shareIntegrationButtonEvent: (type?: string) => AnalyticsEventPayload;
|
|
11
|
+
export declare const errorEncountered: (actionSubjectId: string | undefined, attributes?: any) => AnalyticsEventPayload;
|
|
12
|
+
export declare const shareTriggerButtonClicked: () => AnalyticsEventPayload;
|
|
12
13
|
export declare type TabSubjectIdType = 'shareTab' | 'shareToSlackTab';
|
|
13
|
-
export declare const shareTabClicked: (subjectId: TabSubjectIdType) =>
|
|
14
|
-
export declare const cancelShare: (start: number) =>
|
|
15
|
-
export declare const shortUrlRequested: () =>
|
|
16
|
-
export declare const shortUrlGenerated: (start: number, tooSlow: boolean) =>
|
|
17
|
-
export declare const copyLinkButtonClicked: (start: number, shareContentType?: string | undefined, shareOrigin?: OriginTracing | undefined, isPublicLink?: boolean, ari?: string | undefined) =>
|
|
18
|
-
export declare const formShareSubmitted: (start: number, data: DialogContentState, shareContentType?: string | undefined, shareOrigin?: OriginTracing | undefined, isPublicLink?: boolean) =>
|
|
14
|
+
export declare const shareTabClicked: (subjectId: TabSubjectIdType) => AnalyticsEventPayload;
|
|
15
|
+
export declare const cancelShare: (start: number) => AnalyticsEventPayload;
|
|
16
|
+
export declare const shortUrlRequested: () => AnalyticsEventPayload;
|
|
17
|
+
export declare const shortUrlGenerated: (start: number, tooSlow: boolean) => AnalyticsEventPayload;
|
|
18
|
+
export declare const copyLinkButtonClicked: (start: number, shareContentType?: string | undefined, shareOrigin?: OriginTracing | undefined, isPublicLink?: boolean, ari?: string | undefined) => AnalyticsEventPayload;
|
|
19
|
+
export declare const formShareSubmitted: (start: number, data: DialogContentState, shareContentType?: string | undefined, shareOrigin?: OriginTracing | undefined, isPublicLink?: boolean) => AnalyticsEventPayload;
|
|
@@ -14,7 +14,7 @@ export declare const generateSelectZIndex: (dialogZIndex?: number | undefined) =
|
|
|
14
14
|
* Helper to get around TS error of property `current` not being
|
|
15
15
|
* part of React's `ref` object.
|
|
16
16
|
*/
|
|
17
|
-
export declare const getMenuPortalTargetCurrentHTML: (ref?:
|
|
17
|
+
export declare const getMenuPortalTargetCurrentHTML: (ref?: import("react").Ref<HTMLDivElement> | undefined) => HTMLDivElement | null;
|
|
18
18
|
export declare const optionDataToUsers: (optionDataArray: OptionData[]) => User[];
|
|
19
19
|
export declare const allowEmails: (config?: ConfigResponse | undefined) => boolean;
|
|
20
20
|
export declare const resolveShareFooter: (integrationMode: IntegrationMode | undefined, tabIndex: number, customFooter: React.ReactNode) => React.ReactNode | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/share",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "Fabric Share Element",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@atlaskit/analytics-next": "^8.2.0",
|
|
34
|
-
"@atlaskit/button": "^16.
|
|
34
|
+
"@atlaskit/button": "^16.3.0",
|
|
35
35
|
"@atlaskit/dropdown-menu": "^11.1.0",
|
|
36
36
|
"@atlaskit/form": "^8.5.0",
|
|
37
37
|
"@atlaskit/icon": "^21.10.0",
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"@atlaskit/theme": "^12.1.0",
|
|
45
45
|
"@atlaskit/tokens": "^0.9.0",
|
|
46
46
|
"@atlaskit/tooltip": "^17.5.0",
|
|
47
|
+
"@atlaskit/ufo": "^0.1.0",
|
|
47
48
|
"@atlaskit/user-picker": "^9.0.0",
|
|
48
49
|
"@atlaskit/util-service-support": "^6.1.0",
|
|
49
50
|
"@babel/runtime": "^7.0.0",
|
|
@@ -69,9 +70,8 @@
|
|
|
69
70
|
"enzyme": "^3.10.0",
|
|
70
71
|
"enzyme-adapter-react-16": "^1.15.1",
|
|
71
72
|
"enzyme-react-intl": "^2.0.6",
|
|
72
|
-
"jest-fetch-mock": "^3.0.3",
|
|
73
73
|
"react": "^16.8.0",
|
|
74
|
-
"typescript": "
|
|
74
|
+
"typescript": "4.2.4"
|
|
75
75
|
},
|
|
76
76
|
"keywords": [
|
|
77
77
|
"ui",
|
|
@@ -79,10 +79,6 @@
|
|
|
79
79
|
"fabric",
|
|
80
80
|
"teams"
|
|
81
81
|
],
|
|
82
|
-
"af:exports": {
|
|
83
|
-
".": "./src/index.ts",
|
|
84
|
-
"./clients": "./src/clients/index.ts"
|
|
85
|
-
},
|
|
86
82
|
"techstack": {
|
|
87
83
|
"@atlassian/frontend": {
|
|
88
84
|
"package-boundaries": [
|
|
@@ -105,5 +101,9 @@
|
|
|
105
101
|
"theming": "tokens"
|
|
106
102
|
}
|
|
107
103
|
},
|
|
104
|
+
"af:exports": {
|
|
105
|
+
".": "./src/index.ts",
|
|
106
|
+
"./clients": "./src/clients/index.ts"
|
|
107
|
+
},
|
|
108
108
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
109
109
|
}
|