@atlaskit/smart-card 23.13.3 → 23.14.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 +10 -0
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/view/CardWithUrl/component.js +3 -2
- package/dist/cjs/view/CardWithUrl/loader.js +2 -0
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/CardWithUrl/component.js +3 -2
- package/dist/es2019/view/CardWithUrl/loader.js +2 -0
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/CardWithUrl/component.js +3 -2
- package/dist/esm/view/CardWithUrl/loader.js +2 -0
- package/dist/types/view/Card/index.d.ts +1 -1
- package/dist/types/view/Card/types.d.ts +1 -0
- package/dist/types/view/CardWithUrl/component.d.ts +1 -1
- package/dist/types/view/CardWithUrl/types.d.ts +1 -0
- package/package.json +2 -2
- package/report.api.md +3 -0
- package/tmp/api-report-tmp.d.ts +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 23.14.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`eb2e7a0e762`](https://bitbucket.org/atlassian/atlassian-frontend/commits/eb2e7a0e762) - Add new "showAuthTooltip" prop to SmartCard which shows Auth Tooltip on unauthorised inline Smart Links. This allows us to remove product feature flags in the future
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 23.13.3
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/dist/cjs/version.json
CHANGED
|
@@ -58,6 +58,7 @@ function CardWithUrlContent(_ref) {
|
|
|
58
58
|
ui = _ref.ui,
|
|
59
59
|
children = _ref.children,
|
|
60
60
|
showHoverPreview = _ref.showHoverPreview,
|
|
61
|
+
showAuthTooltipProp = _ref.showAuthTooltip,
|
|
61
62
|
analyticsEvents = _ref.analyticsEvents;
|
|
62
63
|
|
|
63
64
|
// Get state, actions for this card.
|
|
@@ -79,8 +80,8 @@ function CardWithUrlContent(_ref) {
|
|
|
79
80
|
var isFlexibleUi = (0, _react.useMemo)(function () {
|
|
80
81
|
return (0, _flexible.isFlexibleUiCard)(children);
|
|
81
82
|
}, [children]);
|
|
82
|
-
var
|
|
83
|
-
var showAuthTooltip =
|
|
83
|
+
var showAuthTooltipFeatureFlagValue = (0, _linkProvider.useFeatureFlag)('showAuthTooltip');
|
|
84
|
+
var showAuthTooltip = showAuthTooltipFeatureFlagValue !== undefined ? showAuthTooltipFeatureFlagValue === 'experiment' : showAuthTooltipProp;
|
|
84
85
|
var enableFlexibleBlockCardFlag = Boolean((0, _linkProvider.useFeatureFlag)('enableFlexibleBlockCard')); // Setup UI handlers.
|
|
85
86
|
|
|
86
87
|
var handleClick = (0, _react.useCallback)(function (event) {
|
|
@@ -71,6 +71,7 @@ function CardWithURLRenderer(props) {
|
|
|
71
71
|
children = props.children,
|
|
72
72
|
ui = props.ui,
|
|
73
73
|
showHoverPreview = props.showHoverPreview,
|
|
74
|
+
showAuthTooltip = props.showAuthTooltip,
|
|
74
75
|
analyticsEvents = props.analyticsEvents,
|
|
75
76
|
placeholder = props.placeholder; // Wrapper around analytics.
|
|
76
77
|
|
|
@@ -139,6 +140,7 @@ function CardWithURLRenderer(props) {
|
|
|
139
140
|
inlinePreloaderStyle: inlinePreloaderStyle,
|
|
140
141
|
ui: ui,
|
|
141
142
|
showHoverPreview: showHoverPreview,
|
|
143
|
+
showAuthTooltip: showAuthTooltip,
|
|
142
144
|
analyticsEvents: analyticsEvents,
|
|
143
145
|
placeholder: placeholder
|
|
144
146
|
};
|
package/dist/es2019/version.json
CHANGED
|
@@ -30,6 +30,7 @@ export function CardWithUrlContent({
|
|
|
30
30
|
ui,
|
|
31
31
|
children,
|
|
32
32
|
showHoverPreview,
|
|
33
|
+
showAuthTooltip: showAuthTooltipProp,
|
|
33
34
|
analyticsEvents
|
|
34
35
|
}) {
|
|
35
36
|
// Get state, actions for this card.
|
|
@@ -49,8 +50,8 @@ export function CardWithUrlContent({
|
|
|
49
50
|
const subproduct = getSubproduct(state.details);
|
|
50
51
|
const services = getServices(state.details);
|
|
51
52
|
let isFlexibleUi = useMemo(() => isFlexibleUiCard(children), [children]);
|
|
52
|
-
const
|
|
53
|
-
const showAuthTooltip =
|
|
53
|
+
const showAuthTooltipFeatureFlagValue = useFeatureFlag('showAuthTooltip');
|
|
54
|
+
const showAuthTooltip = showAuthTooltipFeatureFlagValue !== undefined ? showAuthTooltipFeatureFlagValue === 'experiment' : showAuthTooltipProp;
|
|
54
55
|
const enableFlexibleBlockCardFlag = Boolean(useFeatureFlag('enableFlexibleBlockCard')); // Setup UI handlers.
|
|
55
56
|
|
|
56
57
|
const handleClick = useCallback(event => {
|
|
@@ -37,6 +37,7 @@ export function CardWithURLRenderer(props) {
|
|
|
37
37
|
children,
|
|
38
38
|
ui,
|
|
39
39
|
showHoverPreview,
|
|
40
|
+
showAuthTooltip,
|
|
40
41
|
analyticsEvents,
|
|
41
42
|
placeholder
|
|
42
43
|
} = props; // Wrapper around analytics.
|
|
@@ -108,6 +109,7 @@ export function CardWithURLRenderer(props) {
|
|
|
108
109
|
inlinePreloaderStyle,
|
|
109
110
|
ui,
|
|
110
111
|
showHoverPreview,
|
|
112
|
+
showAuthTooltip,
|
|
111
113
|
analyticsEvents,
|
|
112
114
|
placeholder
|
|
113
115
|
};
|
package/dist/esm/version.json
CHANGED
|
@@ -30,6 +30,7 @@ export function CardWithUrlContent(_ref) {
|
|
|
30
30
|
ui = _ref.ui,
|
|
31
31
|
children = _ref.children,
|
|
32
32
|
showHoverPreview = _ref.showHoverPreview,
|
|
33
|
+
showAuthTooltipProp = _ref.showAuthTooltip,
|
|
33
34
|
analyticsEvents = _ref.analyticsEvents;
|
|
34
35
|
|
|
35
36
|
// Get state, actions for this card.
|
|
@@ -51,8 +52,8 @@ export function CardWithUrlContent(_ref) {
|
|
|
51
52
|
var isFlexibleUi = useMemo(function () {
|
|
52
53
|
return isFlexibleUiCard(children);
|
|
53
54
|
}, [children]);
|
|
54
|
-
var
|
|
55
|
-
var showAuthTooltip =
|
|
55
|
+
var showAuthTooltipFeatureFlagValue = useFeatureFlag('showAuthTooltip');
|
|
56
|
+
var showAuthTooltip = showAuthTooltipFeatureFlagValue !== undefined ? showAuthTooltipFeatureFlagValue === 'experiment' : showAuthTooltipProp;
|
|
56
57
|
var enableFlexibleBlockCardFlag = Boolean(useFeatureFlag('enableFlexibleBlockCard')); // Setup UI handlers.
|
|
57
58
|
|
|
58
59
|
var handleClick = useCallback(function (event) {
|
|
@@ -46,6 +46,7 @@ export function CardWithURLRenderer(props) {
|
|
|
46
46
|
children = props.children,
|
|
47
47
|
ui = props.ui,
|
|
48
48
|
showHoverPreview = props.showHoverPreview,
|
|
49
|
+
showAuthTooltip = props.showAuthTooltip,
|
|
49
50
|
analyticsEvents = props.analyticsEvents,
|
|
50
51
|
placeholder = props.placeholder; // Wrapper around analytics.
|
|
51
52
|
|
|
@@ -114,6 +115,7 @@ export function CardWithURLRenderer(props) {
|
|
|
114
115
|
inlinePreloaderStyle: inlinePreloaderStyle,
|
|
115
116
|
ui: ui,
|
|
116
117
|
showHoverPreview: showHoverPreview,
|
|
118
|
+
showAuthTooltip: showAuthTooltip,
|
|
117
119
|
analyticsEvents: analyticsEvents,
|
|
118
120
|
placeholder: placeholder
|
|
119
121
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CardAppearance, CardPlatform, CardProps } from './types';
|
|
3
3
|
import { WrappedComponentProps } from 'react-intl-next';
|
|
4
|
-
export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<React.PropsWithChildren<import("react-intl-next").WithIntlProps<CardProps & WrappedComponentProps<"intl">>>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "children" | "data" | "key" | "id" | "placeholder" | "onError" | "onClick" | "appearance" | "testId" | "analyticsContext" | "isSelected" | "inheritDimensions" | "ui" | "showActions" | "showHoverPreview" | "onResolve" | "platform" | "isFrameVisible" | "embedIframeRef" | "inlinePreloaderStyle" | "importer" | "container" | "analyticsEvents" | "forwardedRef"> & React.RefAttributes<any>>;
|
|
4
|
+
export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<React.PropsWithChildren<import("react-intl-next").WithIntlProps<CardProps & WrappedComponentProps<"intl">>>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "children" | "data" | "key" | "id" | "placeholder" | "onError" | "onClick" | "appearance" | "testId" | "analyticsContext" | "isSelected" | "inheritDimensions" | "ui" | "showActions" | "showHoverPreview" | "onResolve" | "platform" | "showAuthTooltip" | "isFrameVisible" | "embedIframeRef" | "inlinePreloaderStyle" | "importer" | "container" | "analyticsEvents" | "forwardedRef"> & React.RefAttributes<any>>;
|
|
5
5
|
export type { CardAppearance, CardProps, CardPlatform };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CardWithUrlContentProps } from './types';
|
|
3
|
-
export declare function CardWithUrlContent({ id, url, isSelected, isFrameVisible, platform, onClick, appearance, dispatchAnalytics, onResolve, onError, testId, showActions, inheritDimensions, embedIframeRef, inlinePreloaderStyle, ui, children, showHoverPreview, analyticsEvents, }: CardWithUrlContentProps): JSX.Element;
|
|
3
|
+
export declare function CardWithUrlContent({ id, url, isSelected, isFrameVisible, platform, onClick, appearance, dispatchAnalytics, onResolve, onError, testId, showActions, inheritDimensions, embedIframeRef, inlinePreloaderStyle, ui, children, showHoverPreview, showAuthTooltip: showAuthTooltipProp, analyticsEvents, }: CardWithUrlContentProps): JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.14.0",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@atlaskit/linking-common": "^1.20.0",
|
|
37
37
|
"@atlaskit/logo": "^13.10.0",
|
|
38
38
|
"@atlaskit/lozenge": "^11.3.0",
|
|
39
|
-
"@atlaskit/media-common": "^2.
|
|
39
|
+
"@atlaskit/media-common": "^2.19.0",
|
|
40
40
|
"@atlaskit/modal-dialog": "^12.4.0",
|
|
41
41
|
"@atlaskit/outbound-auth-flow-client": "^3.3.0",
|
|
42
42
|
"@atlaskit/popup": "^1.5.0",
|
package/report.api.md
CHANGED
|
@@ -254,6 +254,7 @@ export const Card: React_2.ForwardRefExoticComponent<
|
|
|
254
254
|
| 'placeholder'
|
|
255
255
|
| 'platform'
|
|
256
256
|
| 'showActions'
|
|
257
|
+
| 'showAuthTooltip'
|
|
257
258
|
| 'showHoverPreview'
|
|
258
259
|
| 'testId'
|
|
259
260
|
| 'ui'
|
|
@@ -316,6 +317,8 @@ export interface CardProps extends WithAnalyticsEventsProps {
|
|
|
316
317
|
// (undocumented)
|
|
317
318
|
showActions?: boolean;
|
|
318
319
|
// (undocumented)
|
|
320
|
+
showAuthTooltip?: boolean;
|
|
321
|
+
// (undocumented)
|
|
319
322
|
showHoverPreview?: boolean;
|
|
320
323
|
// (undocumented)
|
|
321
324
|
testId?: string;
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -178,7 +178,7 @@ type BlockProps = {
|
|
|
178
178
|
};
|
|
179
179
|
|
|
180
180
|
// @public (undocumented)
|
|
181
|
-
export const Card: React_2.ForwardRefExoticComponent<Pick<Omit<React_2.PropsWithChildren<WithIntlProps<CardProps & WrappedComponentProps<"intl">>>, keyof WithAnalyticsEventsProps> & React_2.RefAttributes<any> & WithContextProps, "analyticsContext" | "analyticsEvents" | "appearance" | "children" | "container" | "data" | "embedIframeRef" | "forwardedRef" | "id" | "importer" | "inheritDimensions" | "inlinePreloaderStyle" | "isFrameVisible" | "isSelected" | "key" | "onClick" | "onError" | "onResolve" | "placeholder" | "platform" | "showActions" | "showHoverPreview" | "testId" | "ui" | "url"> & React_2.RefAttributes<any>>;
|
|
181
|
+
export const Card: React_2.ForwardRefExoticComponent<Pick<Omit<React_2.PropsWithChildren<WithIntlProps<CardProps & WrappedComponentProps<"intl">>>, keyof WithAnalyticsEventsProps> & React_2.RefAttributes<any> & WithContextProps, "analyticsContext" | "analyticsEvents" | "appearance" | "children" | "container" | "data" | "embedIframeRef" | "forwardedRef" | "id" | "importer" | "inheritDimensions" | "inlinePreloaderStyle" | "isFrameVisible" | "isSelected" | "key" | "onClick" | "onError" | "onResolve" | "placeholder" | "platform" | "showActions" | "showAuthTooltip" | "showHoverPreview" | "testId" | "ui" | "url"> & React_2.RefAttributes<any>>;
|
|
182
182
|
|
|
183
183
|
export { CardAdf }
|
|
184
184
|
|
|
@@ -230,6 +230,8 @@ export interface CardProps extends WithAnalyticsEventsProps {
|
|
|
230
230
|
// (undocumented)
|
|
231
231
|
showActions?: boolean;
|
|
232
232
|
// (undocumented)
|
|
233
|
+
showAuthTooltip?: boolean;
|
|
234
|
+
// (undocumented)
|
|
233
235
|
showHoverPreview?: boolean;
|
|
234
236
|
// (undocumented)
|
|
235
237
|
testId?: string;
|