@atlaskit/smart-card 44.9.10 → 44.9.11
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 +12 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/inline-card/inline-card-with-all-card-examples-in-text--default--jfp-magma-platform-lozenge-jump-fix-false.png +0 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/inline-card/inline-card-with-all-card-examples-in-text--default--jfp-magma-platform-lozenge-jump-fix-true.png +0 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/link-url-connect-button/linkurl-default-state--default.png +0 -0
- package/dist/cjs/state/hooks/use-intersection-observer/index.js +2 -1
- package/dist/cjs/state/hooks/use-smart-link-seen-event/index.js +66 -0
- package/dist/cjs/utils/analytics/SmartLinkAnalyticsContext.js +31 -8
- package/dist/cjs/view/CardWithUrl/card-intersection-observer/index.js +25 -20
- package/dist/cjs/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +24 -4
- package/dist/cjs/view/CardWithUrl/component.js +0 -30
- package/dist/cjs/view/InlineCard/Frame/index.js +3 -2
- package/dist/cjs/view/LinkUrl/HyperlinkResolver/index.js +0 -41
- package/dist/es2019/__tests__/vr-tests/__snapshots__/inline-card/inline-card-with-all-card-examples-in-text--default--jfp-magma-platform-lozenge-jump-fix-false.png +0 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/inline-card/inline-card-with-all-card-examples-in-text--default--jfp-magma-platform-lozenge-jump-fix-true.png +0 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/link-url-connect-button/linkurl-default-state--default.png +0 -0
- package/dist/es2019/state/hooks/use-intersection-observer/index.js +2 -1
- package/dist/es2019/state/hooks/use-smart-link-seen-event/index.js +60 -0
- package/dist/es2019/utils/analytics/SmartLinkAnalyticsContext.js +28 -6
- package/dist/es2019/view/CardWithUrl/card-intersection-observer/index.js +28 -11
- package/dist/es2019/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +25 -4
- package/dist/es2019/view/CardWithUrl/component.js +1 -31
- package/dist/es2019/view/InlineCard/Frame/index.js +3 -2
- package/dist/es2019/view/LinkUrl/HyperlinkResolver/index.js +1 -40
- package/dist/esm/__tests__/vr-tests/__snapshots__/inline-card/inline-card-with-all-card-examples-in-text--default--jfp-magma-platform-lozenge-jump-fix-false.png +0 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/inline-card/inline-card-with-all-card-examples-in-text--default--jfp-magma-platform-lozenge-jump-fix-true.png +0 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/link-url-connect-button/linkurl-default-state--default.png +0 -0
- package/dist/esm/state/hooks/use-intersection-observer/index.js +2 -1
- package/dist/esm/state/hooks/use-smart-link-seen-event/index.js +60 -0
- package/dist/esm/utils/analytics/SmartLinkAnalyticsContext.js +31 -8
- package/dist/esm/view/CardWithUrl/card-intersection-observer/index.js +26 -21
- package/dist/esm/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +24 -4
- package/dist/esm/view/CardWithUrl/component.js +1 -31
- package/dist/esm/view/InlineCard/Frame/index.js +3 -2
- package/dist/esm/view/LinkUrl/HyperlinkResolver/index.js +1 -42
- package/dist/types/state/hooks/use-smart-link-seen-event/index.d.ts +14 -0
- package/dist/types/utils/analytics/SmartLinkAnalyticsContext.d.ts +10 -0
- package/dist/types/view/CardWithUrl/card-intersection-observer/index.d.ts +3 -5
- package/dist/types/view/CardWithUrl/types.d.ts +0 -1
- package/dist/types-ts4.5/state/hooks/use-smart-link-seen-event/index.d.ts +14 -0
- package/dist/types-ts4.5/utils/analytics/SmartLinkAnalyticsContext.d.ts +10 -0
- package/dist/types-ts4.5/view/CardWithUrl/card-intersection-observer/index.d.ts +3 -5
- package/dist/types-ts4.5/view/CardWithUrl/types.d.ts +0 -1
- package/package.json +4 -1
- package/dist/cjs/__tests__/vr-tests/__snapshots__/link-url-connect-button/linkurl-default-state-without-connect-button-functionality--default.png +0 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/link-url-connect-button/linkurl-resolved-state-with-feature-flag-enabled-should-show-no-connect-button---default--platform-editor-resolve-hyperlinks-killswitch-false.png +0 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/link-url-connect-button/linkurl-resolved-state-with-feature-flag-enabled-should-show-no-connect-button---default--platform-editor-resolve-hyperlinks-killswitch-true.png +0 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/link-url-connect-button/linkurl-unauthorized-state-with-connect-button-direct-render---always-visible---default.png +0 -0
- package/dist/cjs/view/LinkUrl/HyperlinkResolver/unauthorize-view.js +0 -30
- package/dist/es2019/__tests__/vr-tests/__snapshots__/link-url-connect-button/linkurl-default-state-without-connect-button-functionality--default.png +0 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/link-url-connect-button/linkurl-resolved-state-with-feature-flag-enabled-should-show-no-connect-button---default--platform-editor-resolve-hyperlinks-killswitch-false.png +0 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/link-url-connect-button/linkurl-resolved-state-with-feature-flag-enabled-should-show-no-connect-button---default--platform-editor-resolve-hyperlinks-killswitch-true.png +0 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/link-url-connect-button/linkurl-unauthorized-state-with-connect-button-direct-render---always-visible---default.png +0 -0
- package/dist/es2019/view/LinkUrl/HyperlinkResolver/unauthorize-view.js +0 -22
- package/dist/esm/__tests__/vr-tests/__snapshots__/link-url-connect-button/linkurl-default-state-without-connect-button-functionality--default.png +0 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/link-url-connect-button/linkurl-resolved-state-with-feature-flag-enabled-should-show-no-connect-button---default--platform-editor-resolve-hyperlinks-killswitch-false.png +0 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/link-url-connect-button/linkurl-resolved-state-with-feature-flag-enabled-should-show-no-connect-button---default--platform-editor-resolve-hyperlinks-killswitch-true.png +0 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/link-url-connect-button/linkurl-unauthorized-state-with-connect-button-direct-render---always-visible---default.png +0 -0
- package/dist/esm/view/LinkUrl/HyperlinkResolver/unauthorize-view.js +0 -23
- package/dist/types/view/LinkUrl/HyperlinkResolver/unauthorize-view.d.ts +0 -10
- package/dist/types-ts4.5/view/LinkUrl/HyperlinkResolver/unauthorize-view.d.ts +0 -10
|
@@ -4,17 +4,14 @@ 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';
|
|
7
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
8
|
-
import { extractSmartLinkProvider } from '@atlaskit/link-extractors';
|
|
9
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
|
-
import { getFirstPartyIdentifier,
|
|
8
|
+
import { getFirstPartyIdentifier, getThirdPartyARI } from '../../../state/helpers';
|
|
11
9
|
import useResolveHyperlink from '../../../state/hooks/use-resolve-hyperlink';
|
|
12
10
|
import useResolveHyperlinkValidator from '../../../state/hooks/use-resolve-hyperlink/useResolveHyperlinkValidator';
|
|
13
11
|
import { SmartLinkAnalyticsContext } from '../../../utils/analytics/SmartLinkAnalyticsContext';
|
|
14
12
|
import withIntlProvider from '../../common/intl-provider';
|
|
15
13
|
import { useFire3PWorkflowsClickEvent } from '../../SmartLinkEvents/useSmartLinkEvents';
|
|
16
14
|
import Hyperlink from '../Hyperlink';
|
|
17
|
-
import HyperlinkUnauthorizedView from './unauthorize-view';
|
|
18
15
|
var HyperlinkFallbackComponent = function HyperlinkFallbackComponent() {
|
|
19
16
|
return null;
|
|
20
17
|
};
|
|
@@ -33,9 +30,7 @@ var HyperlinkWithSmartLinkResolverInner = function HyperlinkWithSmartLinkResolve
|
|
|
33
30
|
var _useResolveHyperlink = useResolveHyperlink({
|
|
34
31
|
href: props.href || ''
|
|
35
32
|
}),
|
|
36
|
-
actions = _useResolveHyperlink.actions,
|
|
37
33
|
state = _useResolveHyperlink.state;
|
|
38
|
-
var services = getServices(state === null || state === void 0 ? void 0 : state.details);
|
|
39
34
|
var thirdPartyARI = getThirdPartyARI(state === null || state === void 0 ? void 0 : state.details);
|
|
40
35
|
var firstPartyIdentifier = getFirstPartyIdentifier();
|
|
41
36
|
var fire3PClickEvent = fg('platform_smartlink_3pclick_analytics') ?
|
|
@@ -50,42 +45,6 @@ var HyperlinkWithSmartLinkResolverInner = function HyperlinkWithSmartLinkResolve
|
|
|
50
45
|
}
|
|
51
46
|
onClickCallback === null || onClickCallback === void 0 || onClickCallback(e);
|
|
52
47
|
}, [onClickCallback, fire3PClickEvent, state === null || state === void 0 ? void 0 : state.status]);
|
|
53
|
-
var onAuthorize = useCallback(function () {
|
|
54
|
-
return actions.authorize('url');
|
|
55
|
-
}, [actions]);
|
|
56
|
-
var shouldRenderConnectBtn = function shouldRenderConnectBtn() {
|
|
57
|
-
if (!props.children || !Array.isArray(props.children) || props.children.length === 0) {
|
|
58
|
-
return false;
|
|
59
|
-
}
|
|
60
|
-
var firstChild = props.children[0];
|
|
61
|
-
try {
|
|
62
|
-
var _firstChild$props;
|
|
63
|
-
// Check if first child has a string matching href
|
|
64
|
-
if (typeof firstChild === 'string') {
|
|
65
|
-
return props.href === firstChild;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// Check if first child has another child object containing matching href. This aligns with the behavior of the TextWrapper component used by editor to render link nodes
|
|
69
|
-
if (firstChild !== null && firstChild !== void 0 && (_firstChild$props = firstChild.props) !== null && _firstChild$props !== void 0 && _firstChild$props.children && typeof firstChild.props.children === 'string') {
|
|
70
|
-
return props.href === firstChild.props.children;
|
|
71
|
-
}
|
|
72
|
-
} catch (_) {
|
|
73
|
-
return false;
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
if ((state === null || state === void 0 ? void 0 : state.status) === 'unauthorized' && shouldRenderConnectBtn() && (
|
|
77
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils -- Statsig migration pending for Bluelink connect experiments
|
|
78
|
-
FeatureGates.getExperimentValue('platform_linking_bluelink_connect_confluence', 'isEnabled', false) ||
|
|
79
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils -- Statsig migration pending for Bluelink connect experiments
|
|
80
|
-
FeatureGates.getExperimentValue('platform_linking_bluelink_connect_jira', 'isEnabled', false))) {
|
|
81
|
-
var provider = extractSmartLinkProvider(state === null || state === void 0 ? void 0 : state.details);
|
|
82
|
-
return /*#__PURE__*/React.createElement(HyperlinkUnauthorizedView, _extends({}, props, {
|
|
83
|
-
onAuthorize: services !== null && services !== void 0 && services.length ? onAuthorize : undefined,
|
|
84
|
-
onClick: onClick,
|
|
85
|
-
showConnectBtn: (services === null || services === void 0 ? void 0 : services.length) > 0,
|
|
86
|
-
provider: provider
|
|
87
|
-
}));
|
|
88
|
-
}
|
|
89
48
|
return /*#__PURE__*/React.createElement(Hyperlink, _extends({}, props, {
|
|
90
49
|
onClick: onClick
|
|
91
50
|
}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type CardType } from '@atlaskit/linking-common';
|
|
2
|
+
import type { CardProps } from '../../../view/Card';
|
|
3
|
+
type UseSmartLinkSeenEventProps = Pick<CardProps, 'appearance' | 'children' | 'id' | 'ui' | 'url'>;
|
|
4
|
+
type UseSmartLinkSeenEventReturn = {
|
|
5
|
+
onIntersecting: () => void;
|
|
6
|
+
onStatusSettled: (status: CardType) => void;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Fires `ui.smartLink.seen` once when a smart link with status `unauthorized`
|
|
10
|
+
* enters the viewport. Uses refs internally so it never causes re-renders,
|
|
11
|
+
* which is important for SSR.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useSmartLinkSeenEvent({ appearance, children, id, ui, url, }: UseSmartLinkSeenEventProps): UseSmartLinkSeenEventReturn;
|
|
14
|
+
export {};
|
|
@@ -15,9 +15,19 @@ type SmartLinkAnalyticsContextType = {
|
|
|
15
15
|
};
|
|
16
16
|
source?: string;
|
|
17
17
|
};
|
|
18
|
+
type GetByUrlFn = (url: string, props: Omit<SmartLinkAnalyticsContextProps, 'children' | 'url'>) => SmartLinkAnalyticsContextType;
|
|
19
|
+
type UseSmartLinkAnalyticsUtilsReturn = {
|
|
20
|
+
getByUrl: GetByUrlFn;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Provides an analytics context data to supply attributes to events based on a URL
|
|
24
|
+
* and the link state in the store
|
|
25
|
+
*/
|
|
26
|
+
export declare const useSmartLinkAnalyticsUtils: () => UseSmartLinkAnalyticsUtilsReturn;
|
|
18
27
|
/**
|
|
19
28
|
* Provides an analytics context data to supply attributes to events based on a URL
|
|
20
29
|
* and the link state in the store
|
|
30
|
+
* @deprecated Use useSmartLinkAnalyticsUtils instead
|
|
21
31
|
*/
|
|
22
32
|
export declare const useSmartLinkAnalyticsContext: ({ display, id, source, url, }: Exclude<SmartLinkAnalyticsContextProps, "children">) => SmartLinkAnalyticsContextType | undefined;
|
|
23
33
|
/**
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { CardProps } from '../../Card';
|
|
3
|
-
type WithCardIntersectionObserverProps =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
declare const _default: <T extends WithCardIntersectionObserverProps>(Component: React.ComponentType<T>) => ((props: T) => React.JSX.Element);
|
|
7
|
-
export default _default;
|
|
3
|
+
type WithCardIntersectionObserverProps = Pick<CardProps, 'appearance' | 'children' | 'onError' | 'id' | 'ui' | 'url'>;
|
|
4
|
+
declare const withCardIntersectionObserver: <T extends WithCardIntersectionObserverProps>(Component: React.ComponentType<T>) => ((props: T) => React.JSX.Element);
|
|
5
|
+
export default withCardIntersectionObserver;
|
|
@@ -24,7 +24,6 @@ export type CardWithUrlContentProps = {
|
|
|
24
24
|
inheritDimensions?: boolean;
|
|
25
25
|
inlinePreloaderStyle?: InlinePreloaderStyle;
|
|
26
26
|
isHovered?: boolean;
|
|
27
|
-
isIntersected?: boolean;
|
|
28
27
|
isSelected?: boolean;
|
|
29
28
|
onClick?: EventHandler<MouseEvent | KeyboardEvent>;
|
|
30
29
|
onError?: OnErrorCallback;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type CardType } from '@atlaskit/linking-common';
|
|
2
|
+
import type { CardProps } from '../../../view/Card';
|
|
3
|
+
type UseSmartLinkSeenEventProps = Pick<CardProps, 'appearance' | 'children' | 'id' | 'ui' | 'url'>;
|
|
4
|
+
type UseSmartLinkSeenEventReturn = {
|
|
5
|
+
onIntersecting: () => void;
|
|
6
|
+
onStatusSettled: (status: CardType) => void;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Fires `ui.smartLink.seen` once when a smart link with status `unauthorized`
|
|
10
|
+
* enters the viewport. Uses refs internally so it never causes re-renders,
|
|
11
|
+
* which is important for SSR.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useSmartLinkSeenEvent({ appearance, children, id, ui, url, }: UseSmartLinkSeenEventProps): UseSmartLinkSeenEventReturn;
|
|
14
|
+
export {};
|
|
@@ -15,9 +15,19 @@ type SmartLinkAnalyticsContextType = {
|
|
|
15
15
|
};
|
|
16
16
|
source?: string;
|
|
17
17
|
};
|
|
18
|
+
type GetByUrlFn = (url: string, props: Omit<SmartLinkAnalyticsContextProps, 'children' | 'url'>) => SmartLinkAnalyticsContextType;
|
|
19
|
+
type UseSmartLinkAnalyticsUtilsReturn = {
|
|
20
|
+
getByUrl: GetByUrlFn;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Provides an analytics context data to supply attributes to events based on a URL
|
|
24
|
+
* and the link state in the store
|
|
25
|
+
*/
|
|
26
|
+
export declare const useSmartLinkAnalyticsUtils: () => UseSmartLinkAnalyticsUtilsReturn;
|
|
18
27
|
/**
|
|
19
28
|
* Provides an analytics context data to supply attributes to events based on a URL
|
|
20
29
|
* and the link state in the store
|
|
30
|
+
* @deprecated Use useSmartLinkAnalyticsUtils instead
|
|
21
31
|
*/
|
|
22
32
|
export declare const useSmartLinkAnalyticsContext: ({ display, id, source, url, }: Exclude<SmartLinkAnalyticsContextProps, "children">) => SmartLinkAnalyticsContextType | undefined;
|
|
23
33
|
/**
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { CardProps } from '../../Card';
|
|
3
|
-
type WithCardIntersectionObserverProps =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
declare const _default: <T extends WithCardIntersectionObserverProps>(Component: React.ComponentType<T>) => ((props: T) => React.JSX.Element);
|
|
7
|
-
export default _default;
|
|
3
|
+
type WithCardIntersectionObserverProps = Pick<CardProps, 'appearance' | 'children' | 'onError' | 'id' | 'ui' | 'url'>;
|
|
4
|
+
declare const withCardIntersectionObserver: <T extends WithCardIntersectionObserverProps>(Component: React.ComponentType<T>) => ((props: T) => React.JSX.Element);
|
|
5
|
+
export default withCardIntersectionObserver;
|
|
@@ -24,7 +24,6 @@ export type CardWithUrlContentProps = {
|
|
|
24
24
|
inheritDimensions?: boolean;
|
|
25
25
|
inlinePreloaderStyle?: InlinePreloaderStyle;
|
|
26
26
|
isHovered?: boolean;
|
|
27
|
-
isIntersected?: boolean;
|
|
28
27
|
isSelected?: boolean;
|
|
29
28
|
onClick?: EventHandler<MouseEvent | KeyboardEvent>;
|
|
30
29
|
onError?: OnErrorCallback;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "44.9.
|
|
3
|
+
"version": "44.9.11",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -278,6 +278,9 @@
|
|
|
278
278
|
},
|
|
279
279
|
"platform_navx_block_card_footer_spacing": {
|
|
280
280
|
"type": "boolean"
|
|
281
|
+
},
|
|
282
|
+
"navx-3611-inline-card-a11y-role-fix": {
|
|
283
|
+
"type": "boolean"
|
|
281
284
|
}
|
|
282
285
|
},
|
|
283
286
|
"compassUnitTestMetricSourceId": "ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:metric-source/c5751cc6-3513-4070-9deb-af31e86aed34/f74ef1bc-7240-4aac-9dc8-9dc43b502089"
|
|
Binary file
|
|
Binary file
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
var _reactIntl = require("react-intl");
|
|
12
|
-
var _messages = require("../../../messages");
|
|
13
|
-
var _actionButton = require("../../InlineCard/common/action-button");
|
|
14
|
-
var _Hyperlink = _interopRequireDefault(require("../Hyperlink"));
|
|
15
|
-
var _excluded = ["onAuthorize", "provider", "showConnectBtn"];
|
|
16
|
-
var HyperlinkUnauthorizedView = function HyperlinkUnauthorizedView(_ref) {
|
|
17
|
-
var onAuthorize = _ref.onAuthorize,
|
|
18
|
-
provider = _ref.provider,
|
|
19
|
-
showConnectBtn = _ref.showConnectBtn,
|
|
20
|
-
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
21
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Hyperlink.default, props), showConnectBtn && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, ' ', /*#__PURE__*/_react.default.createElement(_actionButton.ActionButton, {
|
|
22
|
-
onClick: onAuthorize,
|
|
23
|
-
testId: "button-connect-account"
|
|
24
|
-
}, /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, (0, _extends2.default)({}, _messages.messages.connect_link_account_card_name, {
|
|
25
|
-
values: {
|
|
26
|
-
context: provider === null || provider === void 0 ? void 0 : provider.text
|
|
27
|
-
}
|
|
28
|
-
})))));
|
|
29
|
-
};
|
|
30
|
-
var _default = exports.default = HyperlinkUnauthorizedView;
|
|
Binary file
|
|
Binary file
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { FormattedMessage } from 'react-intl';
|
|
4
|
-
import { messages } from '../../../messages';
|
|
5
|
-
import { ActionButton } from '../../InlineCard/common/action-button';
|
|
6
|
-
import Hyperlink from '../Hyperlink';
|
|
7
|
-
const HyperlinkUnauthorizedView = ({
|
|
8
|
-
onAuthorize,
|
|
9
|
-
provider,
|
|
10
|
-
showConnectBtn,
|
|
11
|
-
...props
|
|
12
|
-
}) => {
|
|
13
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Hyperlink, props), showConnectBtn && /*#__PURE__*/React.createElement(React.Fragment, null, ' ', /*#__PURE__*/React.createElement(ActionButton, {
|
|
14
|
-
onClick: onAuthorize,
|
|
15
|
-
testId: "button-connect-account"
|
|
16
|
-
}, /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages.connect_link_account_card_name, {
|
|
17
|
-
values: {
|
|
18
|
-
context: provider === null || provider === void 0 ? void 0 : provider.text
|
|
19
|
-
}
|
|
20
|
-
})))));
|
|
21
|
-
};
|
|
22
|
-
export default HyperlinkUnauthorizedView;
|
|
Binary file
|
|
Binary file
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["onAuthorize", "provider", "showConnectBtn"];
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import { FormattedMessage } from 'react-intl';
|
|
6
|
-
import { messages } from '../../../messages';
|
|
7
|
-
import { ActionButton } from '../../InlineCard/common/action-button';
|
|
8
|
-
import Hyperlink from '../Hyperlink';
|
|
9
|
-
var HyperlinkUnauthorizedView = function HyperlinkUnauthorizedView(_ref) {
|
|
10
|
-
var onAuthorize = _ref.onAuthorize,
|
|
11
|
-
provider = _ref.provider,
|
|
12
|
-
showConnectBtn = _ref.showConnectBtn,
|
|
13
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
14
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Hyperlink, props), showConnectBtn && /*#__PURE__*/React.createElement(React.Fragment, null, ' ', /*#__PURE__*/React.createElement(ActionButton, {
|
|
15
|
-
onClick: onAuthorize,
|
|
16
|
-
testId: "button-connect-account"
|
|
17
|
-
}, /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages.connect_link_account_card_name, {
|
|
18
|
-
values: {
|
|
19
|
-
context: provider === null || provider === void 0 ? void 0 : provider.text
|
|
20
|
-
}
|
|
21
|
-
})))));
|
|
22
|
-
};
|
|
23
|
-
export default HyperlinkUnauthorizedView;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { LinkProvider } from '@atlaskit/link-extractors';
|
|
3
|
-
import type { LinkUrlProps } from '../types';
|
|
4
|
-
type HyperlinkUnauthorizedViewProps = LinkUrlProps & {
|
|
5
|
-
onAuthorize?: () => void;
|
|
6
|
-
provider?: LinkProvider;
|
|
7
|
-
showConnectBtn?: boolean;
|
|
8
|
-
};
|
|
9
|
-
declare const HyperlinkUnauthorizedView: ({ onAuthorize, provider, showConnectBtn, ...props }: HyperlinkUnauthorizedViewProps) => React.JSX.Element;
|
|
10
|
-
export default HyperlinkUnauthorizedView;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { LinkProvider } from '@atlaskit/link-extractors';
|
|
3
|
-
import type { LinkUrlProps } from '../types';
|
|
4
|
-
type HyperlinkUnauthorizedViewProps = LinkUrlProps & {
|
|
5
|
-
onAuthorize?: () => void;
|
|
6
|
-
provider?: LinkProvider;
|
|
7
|
-
showConnectBtn?: boolean;
|
|
8
|
-
};
|
|
9
|
-
declare const HyperlinkUnauthorizedView: ({ onAuthorize, provider, showConnectBtn, ...props }: HyperlinkUnauthorizedViewProps) => React.JSX.Element;
|
|
10
|
-
export default HyperlinkUnauthorizedView;
|