@atlaskit/smart-card 43.0.0 → 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 +16 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/InlineCard/UnauthorisedView/index.js +1 -0
- package/dist/cjs/view/InlineCard/common/action-button/index.compiled.css +9 -0
- package/dist/cjs/view/InlineCard/common/action-button/index.js +11 -2
- package/dist/cjs/view/LinkUrl/HyperlinkResolver/index.js +4 -2
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/InlineCard/UnauthorisedView/index.js +1 -0
- package/dist/es2019/view/InlineCard/common/action-button/index.compiled.css +9 -0
- package/dist/es2019/view/InlineCard/common/action-button/index.js +9 -1
- package/dist/es2019/view/LinkUrl/HyperlinkResolver/index.js +4 -2
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/InlineCard/UnauthorisedView/index.js +1 -0
- package/dist/esm/view/InlineCard/common/action-button/index.compiled.css +9 -0
- package/dist/esm/view/InlineCard/common/action-button/index.js +11 -2
- package/dist/esm/view/LinkUrl/HyperlinkResolver/index.js +4 -2
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/view/InlineCard/common/action-button/index.d.ts +11 -1
- package/dist/types-ts4.5/view/InlineCard/common/action-button/index.d.ts +11 -1
- package/package.json +5 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
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
|
+
|
|
10
|
+
## 43.0.1
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [`27d1948b0874f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/27d1948b0874f) -
|
|
15
|
+
[ux] @atlaskit/smart-card: Added experiment variation coloring for the inline smartlink connect
|
|
16
|
+
button. @atlaskit/tmp-editor-statsig: Added experiment gate to test config and overrides setup
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 43.0.0
|
|
4
20
|
|
|
5
21
|
### Major Changes
|
|
@@ -11,7 +11,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
11
11
|
var context = exports.context = {
|
|
12
12
|
componentName: 'smart-cards',
|
|
13
13
|
packageName: "@atlaskit/smart-card",
|
|
14
|
-
packageVersion: "
|
|
14
|
+
packageVersion: "0.0.0-development"
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -54,6 +54,7 @@ var InlineCardUnauthorizedView = exports.InlineCardUnauthorizedView = function I
|
|
|
54
54
|
var renderActionButton = _react.default.useCallback(function () {
|
|
55
55
|
return /*#__PURE__*/_react.default.createElement(_actionButton.ActionButton, {
|
|
56
56
|
onClick: handleConnectAccount,
|
|
57
|
+
viewType: 'unauthorised',
|
|
57
58
|
testId: "button-connect-account"
|
|
58
59
|
}, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _messages.messages.connect_link_account_card_name, {
|
|
59
60
|
values: {
|
|
@@ -3,18 +3,27 @@
|
|
|
3
3
|
._1e0c1bgi{display:contents}
|
|
4
4
|
._1e0c1nu9{display:inline}
|
|
5
5
|
._1nmz9jpi{word-break:break-all}
|
|
6
|
+
._1o0zlb4i{border-bottom-right-radius:var(--ds-radius-xsmall,2px)}
|
|
6
7
|
._1y1m1u8q{background-clip:padding-box}
|
|
7
8
|
._80om13gf{cursor:not-allowed}
|
|
8
9
|
._80omtlke{cursor:pointer}
|
|
10
|
+
._bfhk1fvw{background-color:var(--ds-background-selected-bold,#0c66e4)}
|
|
11
|
+
._bfhk1t1b{background-color:var(--ds-background-accent-gray-bolder,#626f86)}
|
|
9
12
|
._bfhkm7j4{background-color:var(--ds-background-neutral,#091e420f)}
|
|
10
13
|
._bfhksyzs{background-color:var(--ds-background-disabled,#091e4208)}
|
|
11
14
|
._ca0qv77o{padding-top:var(--ds-space-025,2px)}
|
|
12
15
|
._k48p1wq8{font-weight:var(--ds-font-weight-medium,500)}
|
|
13
16
|
._n3tdv77o{padding-bottom:var(--ds-space-025,2px)}
|
|
14
17
|
._o5721btx{white-space:break-spaces}
|
|
18
|
+
._qrwqlb4i{border-top-right-radius:var(--ds-radius-xsmall,2px)}
|
|
19
|
+
._syaz15cr{color:var(--ds-text-inverse,#fff)}
|
|
15
20
|
._syaz1fxt{color:var(--ds-text,#172b4d)}
|
|
16
21
|
._syaz1lh4{color:var(--ds-text-disabled,#091e424f)}
|
|
17
22
|
._u5f312x7{padding-right:var(--ds-space-075,6px)}
|
|
18
23
|
._y3gn18uv{text-align:initial}
|
|
19
24
|
._irr315ej:hover{background-color:var(--ds-background-neutral-hovered,#091e4224)}
|
|
25
|
+
._irr318hz:hover{background-color:var(--ds-background-selected-bold-hovered,#05c)}
|
|
26
|
+
._irr3e4nv:hover{background-color:var(--ds-background-accent-gray-bolder-hovered,#44546f)}
|
|
27
|
+
._1di682ra:active{background-color:var(--ds-background-accent-gray-bolder-pressed,#2c3e5d)}
|
|
28
|
+
._1di6gr1v:active{background-color:var(--ds-background-selected-bold-pressed,#09326c)}
|
|
20
29
|
._1di6ip91:active{background-color:var(--ds-background-neutral-pressed,#091e424f)}
|
|
@@ -14,7 +14,8 @@ var _runtime = require("@compiled/react/runtime");
|
|
|
14
14
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
15
15
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
16
16
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
17
|
-
var
|
|
17
|
+
var _expVal = require("@atlaskit/tmp-editor-statsig/expVal");
|
|
18
|
+
var _excluded = ["children", "isDisabled", "viewType"];
|
|
18
19
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
19
20
|
var styles = {
|
|
20
21
|
button: "_1e0c1bgi",
|
|
@@ -22,13 +23,21 @@ var styles = {
|
|
|
22
23
|
enabled: "_syaz1fxt _80omtlke _bfhkm7j4 _irr315ej _1di6ip91",
|
|
23
24
|
disabled: "_syaz1lh4 _80om13gf _bfhksyzs"
|
|
24
25
|
};
|
|
26
|
+
var experimentEnabledStyles = {
|
|
27
|
+
control: "_syaz1fxt _80omtlke _bfhkm7j4 _irr315ej _1di6ip91",
|
|
28
|
+
test1: "_syaz15cr _80omtlke _bfhk1fvw _qrwqlb4i _1o0zlb4i _irr318hz _1di6gr1v",
|
|
29
|
+
test2: "_syaz15cr _80omtlke _bfhk1t1b _qrwqlb4i _1o0zlb4i _irr3e4nv _1di682ra"
|
|
30
|
+
};
|
|
25
31
|
/**
|
|
26
32
|
* Action button has to be a span for the overflow to work correctly
|
|
27
33
|
*/
|
|
28
34
|
var ActionButton = exports.ActionButton = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
29
35
|
var children = _ref.children,
|
|
30
36
|
isDisabled = _ref.isDisabled,
|
|
37
|
+
_ref$viewType = _ref.viewType,
|
|
38
|
+
viewType = _ref$viewType === void 0 ? 'default' : _ref$viewType,
|
|
31
39
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
40
|
+
var experimentValue = viewType === 'unauthorised' ? (0, _expVal.expVal)('platform_inline_smartcard_connect_button_exp', 'cohort', 'control') : 'control';
|
|
32
41
|
return /*#__PURE__*/React.createElement(_compiled.Pressable, (0, _extends2.default)({}, props, {
|
|
33
42
|
isDisabled: isDisabled,
|
|
34
43
|
ref: ref
|
|
@@ -41,6 +50,6 @@ var ActionButton = exports.ActionButton = /*#__PURE__*/(0, _react.forwardRef)(fu
|
|
|
41
50
|
xcss: styles.button
|
|
42
51
|
}), /*#__PURE__*/React.createElement("span", {
|
|
43
52
|
tabIndex: isDisabled ? undefined : 0,
|
|
44
|
-
className: (0, _runtime.ax)([styles.innerContainer, isDisabled ? styles.disabled : styles.enabled])
|
|
53
|
+
className: (0, _runtime.ax)([styles.innerContainer, isDisabled ? styles.disabled : experimentValue !== 'control' ? experimentEnabledStyles[experimentValue] : styles.enabled])
|
|
45
54
|
}, children));
|
|
46
55
|
});
|
|
@@ -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);
|
|
@@ -22,7 +22,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
|
|
|
22
22
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
23
23
|
var PACKAGE_DATA = {
|
|
24
24
|
packageName: "@atlaskit/smart-card",
|
|
25
|
-
packageVersion: "
|
|
25
|
+
packageVersion: "0.0.0-development",
|
|
26
26
|
componentName: 'linkUrl'
|
|
27
27
|
};
|
|
28
28
|
var Anchor = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -2,7 +2,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
2
2
|
export const context = {
|
|
3
3
|
componentName: 'smart-cards',
|
|
4
4
|
packageName: "@atlaskit/smart-card",
|
|
5
|
-
packageVersion: "
|
|
5
|
+
packageVersion: "0.0.0-development"
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -47,6 +47,7 @@ export const InlineCardUnauthorizedView = ({
|
|
|
47
47
|
const renderActionButton = React.useCallback(() => {
|
|
48
48
|
return /*#__PURE__*/React.createElement(ActionButton, {
|
|
49
49
|
onClick: handleConnectAccount,
|
|
50
|
+
viewType: 'unauthorised',
|
|
50
51
|
testId: "button-connect-account"
|
|
51
52
|
}, /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages.connect_link_account_card_name, {
|
|
52
53
|
values: {
|
|
@@ -3,18 +3,27 @@
|
|
|
3
3
|
._1e0c1bgi{display:contents}
|
|
4
4
|
._1e0c1nu9{display:inline}
|
|
5
5
|
._1nmz9jpi{word-break:break-all}
|
|
6
|
+
._1o0zlb4i{border-bottom-right-radius:var(--ds-radius-xsmall,2px)}
|
|
6
7
|
._1y1m1u8q{background-clip:padding-box}
|
|
7
8
|
._80om13gf{cursor:not-allowed}
|
|
8
9
|
._80omtlke{cursor:pointer}
|
|
10
|
+
._bfhk1fvw{background-color:var(--ds-background-selected-bold,#0c66e4)}
|
|
11
|
+
._bfhk1t1b{background-color:var(--ds-background-accent-gray-bolder,#626f86)}
|
|
9
12
|
._bfhkm7j4{background-color:var(--ds-background-neutral,#091e420f)}
|
|
10
13
|
._bfhksyzs{background-color:var(--ds-background-disabled,#091e4208)}
|
|
11
14
|
._ca0qv77o{padding-top:var(--ds-space-025,2px)}
|
|
12
15
|
._k48p1wq8{font-weight:var(--ds-font-weight-medium,500)}
|
|
13
16
|
._n3tdv77o{padding-bottom:var(--ds-space-025,2px)}
|
|
14
17
|
._o5721btx{white-space:break-spaces}
|
|
18
|
+
._qrwqlb4i{border-top-right-radius:var(--ds-radius-xsmall,2px)}
|
|
19
|
+
._syaz15cr{color:var(--ds-text-inverse,#fff)}
|
|
15
20
|
._syaz1fxt{color:var(--ds-text,#172b4d)}
|
|
16
21
|
._syaz1lh4{color:var(--ds-text-disabled,#091e424f)}
|
|
17
22
|
._u5f312x7{padding-right:var(--ds-space-075,6px)}
|
|
18
23
|
._y3gn18uv{text-align:initial}
|
|
19
24
|
._irr315ej:hover{background-color:var(--ds-background-neutral-hovered,#091e4224)}
|
|
25
|
+
._irr318hz:hover{background-color:var(--ds-background-selected-bold-hovered,#05c)}
|
|
26
|
+
._irr3e4nv:hover{background-color:var(--ds-background-accent-gray-bolder-hovered,#44546f)}
|
|
27
|
+
._1di682ra:active{background-color:var(--ds-background-accent-gray-bolder-pressed,#2c3e5d)}
|
|
28
|
+
._1di6gr1v:active{background-color:var(--ds-background-selected-bold-pressed,#09326c)}
|
|
20
29
|
._1di6ip91:active{background-color:var(--ds-background-neutral-pressed,#091e424f)}
|
|
@@ -5,20 +5,28 @@ import * as React from 'react';
|
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { forwardRef } from 'react';
|
|
7
7
|
import { Pressable } from '@atlaskit/primitives/compiled';
|
|
8
|
+
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
8
9
|
const styles = {
|
|
9
10
|
button: "_1e0c1bgi",
|
|
10
11
|
innerContainer: "_1e0c1nu9 _1y1m1u8q _16d9qvcn _k48p1wq8 _19bv12x7 _ca0qv77o _n3tdv77o _u5f312x7 _y3gn18uv _o5721btx _1nmz9jpi",
|
|
11
12
|
enabled: "_syaz1fxt _80omtlke _bfhkm7j4 _irr315ej _1di6ip91",
|
|
12
13
|
disabled: "_syaz1lh4 _80om13gf _bfhksyzs"
|
|
13
14
|
};
|
|
15
|
+
const experimentEnabledStyles = {
|
|
16
|
+
control: "_syaz1fxt _80omtlke _bfhkm7j4 _irr315ej _1di6ip91",
|
|
17
|
+
test1: "_syaz15cr _80omtlke _bfhk1fvw _qrwqlb4i _1o0zlb4i _irr318hz _1di6gr1v",
|
|
18
|
+
test2: "_syaz15cr _80omtlke _bfhk1t1b _qrwqlb4i _1o0zlb4i _irr3e4nv _1di682ra"
|
|
19
|
+
};
|
|
14
20
|
/**
|
|
15
21
|
* Action button has to be a span for the overflow to work correctly
|
|
16
22
|
*/
|
|
17
23
|
export const ActionButton = /*#__PURE__*/forwardRef(({
|
|
18
24
|
children,
|
|
19
25
|
isDisabled,
|
|
26
|
+
viewType = 'default',
|
|
20
27
|
...props
|
|
21
28
|
}, ref) => {
|
|
29
|
+
const experimentValue = viewType === 'unauthorised' ? expVal('platform_inline_smartcard_connect_button_exp', 'cohort', 'control') : 'control';
|
|
22
30
|
return /*#__PURE__*/React.createElement(Pressable, _extends({}, props, {
|
|
23
31
|
isDisabled: isDisabled,
|
|
24
32
|
ref: ref
|
|
@@ -31,6 +39,6 @@ export const ActionButton = /*#__PURE__*/forwardRef(({
|
|
|
31
39
|
xcss: styles.button
|
|
32
40
|
}), /*#__PURE__*/React.createElement("span", {
|
|
33
41
|
tabIndex: isDisabled ? undefined : 0,
|
|
34
|
-
className: ax([styles.innerContainer, isDisabled ? styles.disabled : styles.enabled])
|
|
42
|
+
className: ax([styles.innerContainer, isDisabled ? styles.disabled : experimentValue !== 'control' ? experimentEnabledStyles[experimentValue] : styles.enabled])
|
|
35
43
|
}, children));
|
|
36
44
|
});
|
|
@@ -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);
|
|
@@ -12,7 +12,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
12
12
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
13
13
|
const PACKAGE_DATA = {
|
|
14
14
|
packageName: "@atlaskit/smart-card",
|
|
15
|
-
packageVersion: "
|
|
15
|
+
packageVersion: "0.0.0-development",
|
|
16
16
|
componentName: 'linkUrl'
|
|
17
17
|
};
|
|
18
18
|
const Anchor = withLinkClickedEvent('a');
|
|
@@ -4,7 +4,7 @@ export var ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export var context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card",
|
|
7
|
-
packageVersion: "
|
|
7
|
+
packageVersion: "0.0.0-development"
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -47,6 +47,7 @@ export var InlineCardUnauthorizedView = function InlineCardUnauthorizedView(_ref
|
|
|
47
47
|
var renderActionButton = React.useCallback(function () {
|
|
48
48
|
return /*#__PURE__*/React.createElement(ActionButton, {
|
|
49
49
|
onClick: handleConnectAccount,
|
|
50
|
+
viewType: 'unauthorised',
|
|
50
51
|
testId: "button-connect-account"
|
|
51
52
|
}, /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages.connect_link_account_card_name, {
|
|
52
53
|
values: {
|
|
@@ -3,18 +3,27 @@
|
|
|
3
3
|
._1e0c1bgi{display:contents}
|
|
4
4
|
._1e0c1nu9{display:inline}
|
|
5
5
|
._1nmz9jpi{word-break:break-all}
|
|
6
|
+
._1o0zlb4i{border-bottom-right-radius:var(--ds-radius-xsmall,2px)}
|
|
6
7
|
._1y1m1u8q{background-clip:padding-box}
|
|
7
8
|
._80om13gf{cursor:not-allowed}
|
|
8
9
|
._80omtlke{cursor:pointer}
|
|
10
|
+
._bfhk1fvw{background-color:var(--ds-background-selected-bold,#0c66e4)}
|
|
11
|
+
._bfhk1t1b{background-color:var(--ds-background-accent-gray-bolder,#626f86)}
|
|
9
12
|
._bfhkm7j4{background-color:var(--ds-background-neutral,#091e420f)}
|
|
10
13
|
._bfhksyzs{background-color:var(--ds-background-disabled,#091e4208)}
|
|
11
14
|
._ca0qv77o{padding-top:var(--ds-space-025,2px)}
|
|
12
15
|
._k48p1wq8{font-weight:var(--ds-font-weight-medium,500)}
|
|
13
16
|
._n3tdv77o{padding-bottom:var(--ds-space-025,2px)}
|
|
14
17
|
._o5721btx{white-space:break-spaces}
|
|
18
|
+
._qrwqlb4i{border-top-right-radius:var(--ds-radius-xsmall,2px)}
|
|
19
|
+
._syaz15cr{color:var(--ds-text-inverse,#fff)}
|
|
15
20
|
._syaz1fxt{color:var(--ds-text,#172b4d)}
|
|
16
21
|
._syaz1lh4{color:var(--ds-text-disabled,#091e424f)}
|
|
17
22
|
._u5f312x7{padding-right:var(--ds-space-075,6px)}
|
|
18
23
|
._y3gn18uv{text-align:initial}
|
|
19
24
|
._irr315ej:hover{background-color:var(--ds-background-neutral-hovered,#091e4224)}
|
|
25
|
+
._irr318hz:hover{background-color:var(--ds-background-selected-bold-hovered,#05c)}
|
|
26
|
+
._irr3e4nv:hover{background-color:var(--ds-background-accent-gray-bolder-hovered,#44546f)}
|
|
27
|
+
._1di682ra:active{background-color:var(--ds-background-accent-gray-bolder-pressed,#2c3e5d)}
|
|
28
|
+
._1di6gr1v:active{background-color:var(--ds-background-selected-bold-pressed,#09326c)}
|
|
20
29
|
._1di6ip91:active{background-color:var(--ds-background-neutral-pressed,#091e424f)}
|
|
@@ -1,25 +1,34 @@
|
|
|
1
1
|
/* index.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["children", "isDisabled"];
|
|
4
|
+
var _excluded = ["children", "isDisabled", "viewType"];
|
|
5
5
|
import "./index.compiled.css";
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { ax, ix } from "@compiled/react/runtime";
|
|
8
8
|
import { forwardRef } from 'react';
|
|
9
9
|
import { Pressable } from '@atlaskit/primitives/compiled';
|
|
10
|
+
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
10
11
|
var styles = {
|
|
11
12
|
button: "_1e0c1bgi",
|
|
12
13
|
innerContainer: "_1e0c1nu9 _1y1m1u8q _16d9qvcn _k48p1wq8 _19bv12x7 _ca0qv77o _n3tdv77o _u5f312x7 _y3gn18uv _o5721btx _1nmz9jpi",
|
|
13
14
|
enabled: "_syaz1fxt _80omtlke _bfhkm7j4 _irr315ej _1di6ip91",
|
|
14
15
|
disabled: "_syaz1lh4 _80om13gf _bfhksyzs"
|
|
15
16
|
};
|
|
17
|
+
var experimentEnabledStyles = {
|
|
18
|
+
control: "_syaz1fxt _80omtlke _bfhkm7j4 _irr315ej _1di6ip91",
|
|
19
|
+
test1: "_syaz15cr _80omtlke _bfhk1fvw _qrwqlb4i _1o0zlb4i _irr318hz _1di6gr1v",
|
|
20
|
+
test2: "_syaz15cr _80omtlke _bfhk1t1b _qrwqlb4i _1o0zlb4i _irr3e4nv _1di682ra"
|
|
21
|
+
};
|
|
16
22
|
/**
|
|
17
23
|
* Action button has to be a span for the overflow to work correctly
|
|
18
24
|
*/
|
|
19
25
|
export var ActionButton = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
20
26
|
var children = _ref.children,
|
|
21
27
|
isDisabled = _ref.isDisabled,
|
|
28
|
+
_ref$viewType = _ref.viewType,
|
|
29
|
+
viewType = _ref$viewType === void 0 ? 'default' : _ref$viewType,
|
|
22
30
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
31
|
+
var experimentValue = viewType === 'unauthorised' ? expVal('platform_inline_smartcard_connect_button_exp', 'cohort', 'control') : 'control';
|
|
23
32
|
return /*#__PURE__*/React.createElement(Pressable, _extends({}, props, {
|
|
24
33
|
isDisabled: isDisabled,
|
|
25
34
|
ref: ref
|
|
@@ -32,6 +41,6 @@ export var ActionButton = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
32
41
|
xcss: styles.button
|
|
33
42
|
}), /*#__PURE__*/React.createElement("span", {
|
|
34
43
|
tabIndex: isDisabled ? undefined : 0,
|
|
35
|
-
className: ax([styles.innerContainer, isDisabled ? styles.disabled : styles.enabled])
|
|
44
|
+
className: ax([styles.innerContainer, isDisabled ? styles.disabled : experimentValue !== 'control' ? experimentEnabledStyles[experimentValue] : styles.enabled])
|
|
36
45
|
}, children));
|
|
37
46
|
});
|
|
@@ -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);
|
|
@@ -15,7 +15,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
15
15
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
16
16
|
var PACKAGE_DATA = {
|
|
17
17
|
packageName: "@atlaskit/smart-card",
|
|
18
|
-
packageVersion: "
|
|
18
|
+
packageVersion: "0.0.0-development",
|
|
19
19
|
componentName: 'linkUrl'
|
|
20
20
|
};
|
|
21
21
|
var Anchor = withLinkClickedEvent('a');
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import { type ComponentPropsWithRef } from 'react';
|
|
6
|
+
import { Pressable } from '@atlaskit/primitives/compiled';
|
|
7
|
+
type ActionButtonProps = ComponentPropsWithRef<typeof Pressable> & {
|
|
8
|
+
viewType?: 'default' | 'unauthorised';
|
|
9
|
+
};
|
|
1
10
|
/**
|
|
2
11
|
* Action button has to be a span for the overflow to work correctly
|
|
3
12
|
*/
|
|
4
|
-
export declare const ActionButton: import("react").ForwardRefExoticComponent<Omit<
|
|
13
|
+
export declare const ActionButton: import("react").ForwardRefExoticComponent<Omit<ActionButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
export {};
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import { type ComponentPropsWithRef } from 'react';
|
|
6
|
+
import { Pressable } from '@atlaskit/primitives/compiled';
|
|
7
|
+
type ActionButtonProps = ComponentPropsWithRef<typeof Pressable> & {
|
|
8
|
+
viewType?: 'default' | 'unauthorised';
|
|
9
|
+
};
|
|
1
10
|
/**
|
|
2
11
|
* Action button has to be a span for the overflow to work correctly
|
|
3
12
|
*/
|
|
4
|
-
export declare const ActionButton: import("react").ForwardRefExoticComponent<Omit<
|
|
13
|
+
export declare const ActionButton: import("react").ForwardRefExoticComponent<Omit<ActionButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
export {};
|
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",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@atlaskit/link-test-helpers": "^8.4.0",
|
|
57
57
|
"@atlaskit/linking-common": "^9.7.0",
|
|
58
58
|
"@atlaskit/linking-types": "^14.0.0",
|
|
59
|
-
"@atlaskit/logo": "^19.
|
|
59
|
+
"@atlaskit/logo": "^19.9.0",
|
|
60
60
|
"@atlaskit/lozenge": "^13.0.0",
|
|
61
61
|
"@atlaskit/menu": "^8.4.0",
|
|
62
62
|
"@atlaskit/modal-dialog": "^14.4.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
|
},
|