@atlaskit/smart-card 43.0.1 → 43.0.2
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,12 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 43.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`3cc3605ad3cca`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3cc3605ad3cca) -
|
|
8
|
+
Replace feature flag with experiment gate for plain hyperlink auth flow
|
|
9
|
+
|
|
3
10
|
## 43.0.1
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -11,6 +11,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _reactErrorBoundary = require("react-error-boundary");
|
|
13
13
|
var _reactIntlNext = require("react-intl-next");
|
|
14
|
+
var _featureGateJsClient = _interopRequireDefault(require("@atlaskit/feature-gate-js-client"));
|
|
14
15
|
var _linkExtractors = require("@atlaskit/link-extractors");
|
|
15
16
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
17
|
var _helpers = require("../../../state/helpers");
|
|
@@ -42,6 +43,7 @@ var HyperlinkWithSmartLinkResolverInner = function HyperlinkWithSmartLinkResolve
|
|
|
42
43
|
var services = (0, _helpers.getServices)(state === null || state === void 0 ? void 0 : state.details);
|
|
43
44
|
var thirdPartyARI = (0, _helpers.getThirdPartyARI)(state === null || state === void 0 ? void 0 : state.details);
|
|
44
45
|
var firstPartyIdentifier = (0, _helpers.getFirstPartyIdentifier)();
|
|
46
|
+
var isConnectButtonExperimentEnabled = _featureGateJsClient.default.getExperimentValue('platform_linking_bluelink_connect_CONFLUENCE', 'isEnabled', false) || _featureGateJsClient.default.getExperimentValue('platform_linking_bluelink_connect_JIRA', 'isEnabled', false);
|
|
45
47
|
var fire3PClickEvent = (0, _platformFeatureFlags.fg)('platform_smartlink_3pclick_analytics') ?
|
|
46
48
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
47
49
|
(0, _useSmartLinkEvents.useFire3PWorkflowsClickEvent)(firstPartyIdentifier, thirdPartyARI) : undefined;
|
|
@@ -54,12 +56,12 @@ var HyperlinkWithSmartLinkResolverInner = function HyperlinkWithSmartLinkResolve
|
|
|
54
56
|
}
|
|
55
57
|
onClickCallback === null || onClickCallback === void 0 || onClickCallback(e);
|
|
56
58
|
}, [onClickCallback, fire3PClickEvent, state === null || state === void 0 ? void 0 : state.status]);
|
|
57
|
-
var onAuthorize =
|
|
59
|
+
var onAuthorize = isConnectButtonExperimentEnabled ?
|
|
58
60
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
59
61
|
(0, _react.useCallback)(function () {
|
|
60
62
|
return actions.authorize('hyperlink');
|
|
61
63
|
}, [actions]) : undefined;
|
|
62
|
-
if (
|
|
64
|
+
if (isConnectButtonExperimentEnabled) {
|
|
63
65
|
switch (state === null || state === void 0 ? void 0 : state.status) {
|
|
64
66
|
case 'unauthorized':
|
|
65
67
|
var provider = (0, _linkExtractors.extractSmartLinkProvider)(state === null || state === void 0 ? void 0 : state.details);
|
|
@@ -2,6 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React, { useCallback } from 'react';
|
|
3
3
|
import { withErrorBoundary as withReactErrorBoundary } from 'react-error-boundary';
|
|
4
4
|
import { injectIntl } from 'react-intl-next';
|
|
5
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
5
6
|
import { extractSmartLinkProvider } from '@atlaskit/link-extractors';
|
|
6
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
8
|
import { getFirstPartyIdentifier, getServices, getThirdPartyARI } from '../../../state/helpers';
|
|
@@ -29,6 +30,7 @@ const HyperlinkWithSmartLinkResolverInner = ({
|
|
|
29
30
|
const services = getServices(state === null || state === void 0 ? void 0 : state.details);
|
|
30
31
|
const thirdPartyARI = getThirdPartyARI(state === null || state === void 0 ? void 0 : state.details);
|
|
31
32
|
const firstPartyIdentifier = getFirstPartyIdentifier();
|
|
33
|
+
const isConnectButtonExperimentEnabled = FeatureGates.getExperimentValue('platform_linking_bluelink_connect_CONFLUENCE', 'isEnabled', false) || FeatureGates.getExperimentValue('platform_linking_bluelink_connect_JIRA', 'isEnabled', false);
|
|
32
34
|
const fire3PClickEvent = fg('platform_smartlink_3pclick_analytics') ?
|
|
33
35
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
34
36
|
useFire3PWorkflowsClickEvent(firstPartyIdentifier, thirdPartyARI) : undefined;
|
|
@@ -41,10 +43,10 @@ const HyperlinkWithSmartLinkResolverInner = ({
|
|
|
41
43
|
}
|
|
42
44
|
onClickCallback === null || onClickCallback === void 0 ? void 0 : onClickCallback(e);
|
|
43
45
|
}, [onClickCallback, fire3PClickEvent, state === null || state === void 0 ? void 0 : state.status]);
|
|
44
|
-
const onAuthorize =
|
|
46
|
+
const onAuthorize = isConnectButtonExperimentEnabled ?
|
|
45
47
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
46
48
|
useCallback(() => actions.authorize('hyperlink'), [actions]) : undefined;
|
|
47
|
-
if (
|
|
49
|
+
if (isConnectButtonExperimentEnabled) {
|
|
48
50
|
switch (state === null || state === void 0 ? void 0 : state.status) {
|
|
49
51
|
case 'unauthorized':
|
|
50
52
|
const provider = extractSmartLinkProvider(state === null || state === void 0 ? void 0 : state.details);
|
|
@@ -4,6 +4,7 @@ var _excluded = ["onClick"];
|
|
|
4
4
|
import React, { useCallback } from 'react';
|
|
5
5
|
import { withErrorBoundary as withReactErrorBoundary } from 'react-error-boundary';
|
|
6
6
|
import { injectIntl } from 'react-intl-next';
|
|
7
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
7
8
|
import { extractSmartLinkProvider } from '@atlaskit/link-extractors';
|
|
8
9
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
10
|
import { getFirstPartyIdentifier, getServices, getThirdPartyARI } from '../../../state/helpers';
|
|
@@ -33,6 +34,7 @@ var HyperlinkWithSmartLinkResolverInner = function HyperlinkWithSmartLinkResolve
|
|
|
33
34
|
var services = getServices(state === null || state === void 0 ? void 0 : state.details);
|
|
34
35
|
var thirdPartyARI = getThirdPartyARI(state === null || state === void 0 ? void 0 : state.details);
|
|
35
36
|
var firstPartyIdentifier = getFirstPartyIdentifier();
|
|
37
|
+
var isConnectButtonExperimentEnabled = FeatureGates.getExperimentValue('platform_linking_bluelink_connect_CONFLUENCE', 'isEnabled', false) || FeatureGates.getExperimentValue('platform_linking_bluelink_connect_JIRA', 'isEnabled', false);
|
|
36
38
|
var fire3PClickEvent = fg('platform_smartlink_3pclick_analytics') ?
|
|
37
39
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
38
40
|
useFire3PWorkflowsClickEvent(firstPartyIdentifier, thirdPartyARI) : undefined;
|
|
@@ -45,12 +47,12 @@ var HyperlinkWithSmartLinkResolverInner = function HyperlinkWithSmartLinkResolve
|
|
|
45
47
|
}
|
|
46
48
|
onClickCallback === null || onClickCallback === void 0 || onClickCallback(e);
|
|
47
49
|
}, [onClickCallback, fire3PClickEvent, state === null || state === void 0 ? void 0 : state.status]);
|
|
48
|
-
var onAuthorize =
|
|
50
|
+
var onAuthorize = isConnectButtonExperimentEnabled ?
|
|
49
51
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
50
52
|
useCallback(function () {
|
|
51
53
|
return actions.authorize('hyperlink');
|
|
52
54
|
}, [actions]) : undefined;
|
|
53
|
-
if (
|
|
55
|
+
if (isConnectButtonExperimentEnabled) {
|
|
54
56
|
switch (state === null || state === void 0 ? void 0 : state.status) {
|
|
55
57
|
case 'unauthorized':
|
|
56
58
|
var provider = extractSmartLinkProvider(state === null || state === void 0 ? void 0 : state.details);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "43.0.
|
|
3
|
+
"version": "43.0.2",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"@atlaskit/form": "^14.2.0",
|
|
42
42
|
"@atlaskit/frontend-utilities": "^3.2.0",
|
|
43
43
|
"@atlaskit/heading": "^5.2.0",
|
|
44
|
-
"@atlaskit/icon": "^28.
|
|
44
|
+
"@atlaskit/icon": "^28.5.0",
|
|
45
45
|
"@atlaskit/icon-file-type": "^7.0.0",
|
|
46
|
-
"@atlaskit/icon-lab": "^5.
|
|
46
|
+
"@atlaskit/icon-lab": "^5.10.0",
|
|
47
47
|
"@atlaskit/icon-object": "^7.2.0",
|
|
48
48
|
"@atlaskit/icon-priority": "^6.3.0",
|
|
49
49
|
"@atlaskit/image": "^3.0.0",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@atlaskit/textarea": "^8.0.0",
|
|
71
71
|
"@atlaskit/textfield": "^8.0.0",
|
|
72
72
|
"@atlaskit/theme": "^21.0.0",
|
|
73
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
73
|
+
"@atlaskit/tmp-editor-statsig": "^13.5.0",
|
|
74
74
|
"@atlaskit/tokens": "^6.4.0",
|
|
75
75
|
"@atlaskit/tooltip": "^20.5.0",
|
|
76
76
|
"@atlaskit/ufo": "^0.4.0",
|
|
@@ -220,9 +220,6 @@
|
|
|
220
220
|
"platform_deprecate_lp_cc_embed": {
|
|
221
221
|
"type": "boolean"
|
|
222
222
|
},
|
|
223
|
-
"platform_linking_plain_hyperlink_connect_button": {
|
|
224
|
-
"type": "boolean"
|
|
225
|
-
},
|
|
226
223
|
"navx-1483-a11y-close-button-in-modal-updates": {
|
|
227
224
|
"type": "boolean"
|
|
228
225
|
},
|