@atlaskit/smart-card 23.13.3 → 23.14.1

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,21 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 23.14.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`4ee60bafc6d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4ee60bafc6d) - ED-16603: Remove tooltips from VR tests and make them opt in. To opt-in, add `allowedSideEffects` when loading the page.
8
+
9
+ ## 23.14.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`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
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+
3
19
  ## 23.13.3
4
20
 
5
21
  ### Patch Changes
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "23.13.3",
3
+ "version": "23.14.1",
4
4
  "sideEffects": false
5
5
  }
@@ -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 showAuthTooltipValue = (0, _linkProvider.useFeatureFlag)('showAuthTooltip');
83
- var showAuthTooltip = !!showAuthTooltipValue && showAuthTooltipValue === 'experiment';
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
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "23.13.3",
3
+ "version": "23.14.1",
4
4
  "sideEffects": false
5
5
  }
@@ -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 showAuthTooltipValue = useFeatureFlag('showAuthTooltip');
53
- const showAuthTooltip = !!showAuthTooltipValue && showAuthTooltipValue === 'experiment';
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
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "23.13.3",
3
+ "version": "23.14.1",
4
4
  "sideEffects": false
5
5
  }
@@ -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 showAuthTooltipValue = useFeatureFlag('showAuthTooltip');
55
- var showAuthTooltip = !!showAuthTooltipValue && showAuthTooltipValue === 'experiment';
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 };
@@ -32,6 +32,7 @@ export interface CardProps extends WithAnalyticsEventsProps {
32
32
  ui?: FlexibleUiOptions;
33
33
  children?: React.ReactNode;
34
34
  showHoverPreview?: boolean;
35
+ showAuthTooltip?: boolean;
35
36
  analyticsEvents?: AnalyticsFacade;
36
37
  placeholder?: string;
37
38
  }
@@ -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;
@@ -24,6 +24,7 @@ export declare type CardWithUrlContentProps = {
24
24
  ui?: FlexibleUiOptions;
25
25
  children?: React.ReactNode;
26
26
  showHoverPreview?: boolean;
27
+ showAuthTooltip?: boolean;
27
28
  analyticsEvents?: AnalyticsFacade;
28
29
  placeholder?: string;
29
30
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "23.13.3",
3
+ "version": "23.14.1",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -33,10 +33,10 @@
33
33
  "@atlaskit/icon-object": "^6.2.0",
34
34
  "@atlaskit/icon-priority": "^6.3.0",
35
35
  "@atlaskit/in-product-testing": "^0.1.0",
36
- "@atlaskit/linking-common": "^1.20.0",
36
+ "@atlaskit/linking-common": "^1.21.0",
37
37
  "@atlaskit/logo": "^13.10.0",
38
38
  "@atlaskit/lozenge": "^11.3.0",
39
- "@atlaskit/media-common": "^2.18.0",
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;
@@ -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;