@atlaskit/smart-card 25.5.3 → 25.5.4
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 +6 -0
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/view/CardWithUrl/component.js +3 -0
- package/dist/cjs/view/CardWithUrl/loader.js +2 -0
- package/dist/cjs/view/FlexibleCard/index.js +9 -1
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/CardWithUrl/component.js +3 -0
- package/dist/es2019/view/CardWithUrl/loader.js +2 -0
- package/dist/es2019/view/FlexibleCard/index.js +7 -1
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/CardWithUrl/component.js +3 -0
- package/dist/esm/view/CardWithUrl/loader.js +2 -0
- package/dist/esm/view/FlexibleCard/index.js +9 -1
- package/dist/types/view/CardWithUrl/component.d.ts +1 -1
- package/dist/types/view/CardWithUrl/types.d.ts +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 25.5.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`19622f395b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/19622f395b0) - Connect `showServerActions` prop to flexible smart links, surfacing the lozenge dropdown action behind feature flag.
|
|
8
|
+
|
|
3
9
|
## 25.5.3
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/cjs/version.json
CHANGED
|
@@ -36,6 +36,7 @@ function CardWithUrlContent(_ref) {
|
|
|
36
36
|
onError = _ref.onError,
|
|
37
37
|
testId = _ref.testId,
|
|
38
38
|
showActions = _ref.showActions,
|
|
39
|
+
showServerActionsProp = _ref.showServerActions,
|
|
39
40
|
inheritDimensions = _ref.inheritDimensions,
|
|
40
41
|
embedIframeRef = _ref.embedIframeRef,
|
|
41
42
|
embedIframeUrlType = _ref.embedIframeUrlType,
|
|
@@ -69,6 +70,7 @@ function CardWithUrlContent(_ref) {
|
|
|
69
70
|
var showAuthTooltipFeatureFlagValue = (0, _linkProvider.useFeatureFlag)('showAuthTooltip');
|
|
70
71
|
var showAuthTooltip = showAuthTooltipFeatureFlagValue !== undefined ? showAuthTooltipFeatureFlagValue === 'experiment' : showAuthTooltipProp;
|
|
71
72
|
var enableFlexibleBlockCardFlag = Boolean((0, _linkProvider.useFeatureFlag)('enableFlexibleBlockCard'));
|
|
73
|
+
var showServerActions = showServerActionsProp && platform !== 'mobile';
|
|
72
74
|
|
|
73
75
|
// Setup UI handlers.
|
|
74
76
|
var handleClickWrapper = (0, _react.useCallback)(function (event) {
|
|
@@ -188,6 +190,7 @@ function CardWithUrlContent(_ref) {
|
|
|
188
190
|
renderers: renderers,
|
|
189
191
|
ui: ui,
|
|
190
192
|
showHoverPreview: showHoverPreview,
|
|
193
|
+
showServerActions: showServerActions,
|
|
191
194
|
url: url,
|
|
192
195
|
testId: testId,
|
|
193
196
|
onResolve: onResolve,
|
|
@@ -48,6 +48,7 @@ function CardWithURLRenderer(props) {
|
|
|
48
48
|
onError = props.onError,
|
|
49
49
|
testId = props.testId,
|
|
50
50
|
showActions = props.showActions,
|
|
51
|
+
showServerActions = props.showServerActions,
|
|
51
52
|
inheritDimensions = props.inheritDimensions,
|
|
52
53
|
platform = props.platform,
|
|
53
54
|
embedIframeRef = props.embedIframeRef,
|
|
@@ -119,6 +120,7 @@ function CardWithURLRenderer(props) {
|
|
|
119
120
|
onError: onError,
|
|
120
121
|
testId: testId,
|
|
121
122
|
showActions: showActions,
|
|
123
|
+
showServerActions: showServerActions,
|
|
122
124
|
inheritDimensions: inheritDimensions,
|
|
123
125
|
platform: platform,
|
|
124
126
|
embedIframeRef: embedIframeRef,
|
|
@@ -8,6 +8,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _linkProvider = require("@atlaskit/link-provider");
|
|
11
12
|
var _constants = require("../../constants");
|
|
12
13
|
var _container = _interopRequireDefault(require("./components/container"));
|
|
13
14
|
var _flexibleUiContext = require("../../state/flexible-ui-context");
|
|
@@ -38,16 +39,23 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
38
39
|
var cardType = cardState.status,
|
|
39
40
|
details = cardState.details;
|
|
40
41
|
var status = cardType;
|
|
42
|
+
var useLozengeAction = (0, _linkProvider.useFeatureFlag)('useLozengeAction');
|
|
43
|
+
var featureFlags = (0, _react.useMemo)(function () {
|
|
44
|
+
return {
|
|
45
|
+
useLozengeAction: useLozengeAction
|
|
46
|
+
};
|
|
47
|
+
}, [useLozengeAction]);
|
|
41
48
|
var context = (0, _react.useMemo)(function () {
|
|
42
49
|
return (0, _utils.getContextByStatus)({
|
|
43
50
|
response: details,
|
|
51
|
+
featureFlags: featureFlags,
|
|
44
52
|
id: id,
|
|
45
53
|
renderers: renderers,
|
|
46
54
|
showServerActions: showServerActions,
|
|
47
55
|
status: status,
|
|
48
56
|
url: url
|
|
49
57
|
});
|
|
50
|
-
}, [details, id, renderers, showServerActions, status, url]);
|
|
58
|
+
}, [details, featureFlags, id, renderers, showServerActions, status, url]);
|
|
51
59
|
var retry = (0, _utils.getRetryOptions)(url, status, details, onAuthorize);
|
|
52
60
|
var _ref2 = context || {},
|
|
53
61
|
title = _ref2.title;
|
package/dist/es2019/version.json
CHANGED
|
@@ -26,6 +26,7 @@ export function CardWithUrlContent({
|
|
|
26
26
|
onError,
|
|
27
27
|
testId,
|
|
28
28
|
showActions,
|
|
29
|
+
showServerActions: showServerActionsProp,
|
|
29
30
|
inheritDimensions,
|
|
30
31
|
embedIframeRef,
|
|
31
32
|
embedIframeUrlType,
|
|
@@ -60,6 +61,7 @@ export function CardWithUrlContent({
|
|
|
60
61
|
const showAuthTooltipFeatureFlagValue = useFeatureFlag('showAuthTooltip');
|
|
61
62
|
const showAuthTooltip = showAuthTooltipFeatureFlagValue !== undefined ? showAuthTooltipFeatureFlagValue === 'experiment' : showAuthTooltipProp;
|
|
62
63
|
const enableFlexibleBlockCardFlag = Boolean(useFeatureFlag('enableFlexibleBlockCard'));
|
|
64
|
+
const showServerActions = showServerActionsProp && platform !== 'mobile';
|
|
63
65
|
|
|
64
66
|
// Setup UI handlers.
|
|
65
67
|
const handleClickWrapper = useCallback(event => {
|
|
@@ -175,6 +177,7 @@ export function CardWithUrlContent({
|
|
|
175
177
|
renderers: renderers,
|
|
176
178
|
ui: ui,
|
|
177
179
|
showHoverPreview: showHoverPreview,
|
|
180
|
+
showServerActions: showServerActions,
|
|
178
181
|
url: url,
|
|
179
182
|
testId: testId,
|
|
180
183
|
onResolve: onResolve,
|
|
@@ -28,6 +28,7 @@ export function CardWithURLRenderer(props) {
|
|
|
28
28
|
onError,
|
|
29
29
|
testId,
|
|
30
30
|
showActions,
|
|
31
|
+
showServerActions,
|
|
31
32
|
inheritDimensions,
|
|
32
33
|
platform,
|
|
33
34
|
embedIframeRef,
|
|
@@ -102,6 +103,7 @@ export function CardWithURLRenderer(props) {
|
|
|
102
103
|
onError,
|
|
103
104
|
testId,
|
|
104
105
|
showActions,
|
|
106
|
+
showServerActions,
|
|
105
107
|
inheritDimensions,
|
|
106
108
|
platform,
|
|
107
109
|
embedIframeRef,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useEffect, useMemo } from 'react';
|
|
3
|
+
import { useFeatureFlag } from '@atlaskit/link-provider';
|
|
3
4
|
import { SmartLinkStatus } from '../../constants';
|
|
4
5
|
import Container from './components/container';
|
|
5
6
|
import { FlexibleUiAnalyticsContext, FlexibleUiContext } from '../../state/flexible-ui-context';
|
|
@@ -32,14 +33,19 @@ const FlexibleCard = ({
|
|
|
32
33
|
details
|
|
33
34
|
} = cardState;
|
|
34
35
|
const status = cardType;
|
|
36
|
+
const useLozengeAction = useFeatureFlag('useLozengeAction');
|
|
37
|
+
const featureFlags = useMemo(() => ({
|
|
38
|
+
useLozengeAction
|
|
39
|
+
}), [useLozengeAction]);
|
|
35
40
|
const context = useMemo(() => getContextByStatus({
|
|
36
41
|
response: details,
|
|
42
|
+
featureFlags,
|
|
37
43
|
id,
|
|
38
44
|
renderers,
|
|
39
45
|
showServerActions,
|
|
40
46
|
status,
|
|
41
47
|
url
|
|
42
|
-
}), [details, id, renderers, showServerActions, status, url]);
|
|
48
|
+
}), [details, featureFlags, id, renderers, showServerActions, status, url]);
|
|
43
49
|
const retry = getRetryOptions(url, status, details, onAuthorize);
|
|
44
50
|
const {
|
|
45
51
|
title
|
package/dist/esm/version.json
CHANGED
|
@@ -26,6 +26,7 @@ export function CardWithUrlContent(_ref) {
|
|
|
26
26
|
onError = _ref.onError,
|
|
27
27
|
testId = _ref.testId,
|
|
28
28
|
showActions = _ref.showActions,
|
|
29
|
+
showServerActionsProp = _ref.showServerActions,
|
|
29
30
|
inheritDimensions = _ref.inheritDimensions,
|
|
30
31
|
embedIframeRef = _ref.embedIframeRef,
|
|
31
32
|
embedIframeUrlType = _ref.embedIframeUrlType,
|
|
@@ -59,6 +60,7 @@ export function CardWithUrlContent(_ref) {
|
|
|
59
60
|
var showAuthTooltipFeatureFlagValue = useFeatureFlag('showAuthTooltip');
|
|
60
61
|
var showAuthTooltip = showAuthTooltipFeatureFlagValue !== undefined ? showAuthTooltipFeatureFlagValue === 'experiment' : showAuthTooltipProp;
|
|
61
62
|
var enableFlexibleBlockCardFlag = Boolean(useFeatureFlag('enableFlexibleBlockCard'));
|
|
63
|
+
var showServerActions = showServerActionsProp && platform !== 'mobile';
|
|
62
64
|
|
|
63
65
|
// Setup UI handlers.
|
|
64
66
|
var handleClickWrapper = useCallback(function (event) {
|
|
@@ -178,6 +180,7 @@ export function CardWithUrlContent(_ref) {
|
|
|
178
180
|
renderers: renderers,
|
|
179
181
|
ui: ui,
|
|
180
182
|
showHoverPreview: showHoverPreview,
|
|
183
|
+
showServerActions: showServerActions,
|
|
181
184
|
url: url,
|
|
182
185
|
testId: testId,
|
|
183
186
|
onResolve: onResolve,
|
|
@@ -36,6 +36,7 @@ export function CardWithURLRenderer(props) {
|
|
|
36
36
|
onError = props.onError,
|
|
37
37
|
testId = props.testId,
|
|
38
38
|
showActions = props.showActions,
|
|
39
|
+
showServerActions = props.showServerActions,
|
|
39
40
|
inheritDimensions = props.inheritDimensions,
|
|
40
41
|
platform = props.platform,
|
|
41
42
|
embedIframeRef = props.embedIframeRef,
|
|
@@ -107,6 +108,7 @@ export function CardWithURLRenderer(props) {
|
|
|
107
108
|
onError: onError,
|
|
108
109
|
testId: testId,
|
|
109
110
|
showActions: showActions,
|
|
111
|
+
showServerActions: showServerActions,
|
|
110
112
|
inheritDimensions: inheritDimensions,
|
|
111
113
|
platform: platform,
|
|
112
114
|
embedIframeRef: embedIframeRef,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useEffect, useMemo } from 'react';
|
|
3
|
+
import { useFeatureFlag } from '@atlaskit/link-provider';
|
|
3
4
|
import { SmartLinkStatus } from '../../constants';
|
|
4
5
|
import Container from './components/container';
|
|
5
6
|
import { FlexibleUiAnalyticsContext, FlexibleUiContext } from '../../state/flexible-ui-context';
|
|
@@ -29,16 +30,23 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
29
30
|
var cardType = cardState.status,
|
|
30
31
|
details = cardState.details;
|
|
31
32
|
var status = cardType;
|
|
33
|
+
var useLozengeAction = useFeatureFlag('useLozengeAction');
|
|
34
|
+
var featureFlags = useMemo(function () {
|
|
35
|
+
return {
|
|
36
|
+
useLozengeAction: useLozengeAction
|
|
37
|
+
};
|
|
38
|
+
}, [useLozengeAction]);
|
|
32
39
|
var context = useMemo(function () {
|
|
33
40
|
return getContextByStatus({
|
|
34
41
|
response: details,
|
|
42
|
+
featureFlags: featureFlags,
|
|
35
43
|
id: id,
|
|
36
44
|
renderers: renderers,
|
|
37
45
|
showServerActions: showServerActions,
|
|
38
46
|
status: status,
|
|
39
47
|
url: url
|
|
40
48
|
});
|
|
41
|
-
}, [details, id, renderers, showServerActions, status, url]);
|
|
49
|
+
}, [details, featureFlags, id, renderers, showServerActions, status, url]);
|
|
42
50
|
var retry = getRetryOptions(url, status, details, onAuthorize);
|
|
43
51
|
var _ref2 = context || {},
|
|
44
52
|
title = _ref2.title;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CardWithUrlContentProps } from './types';
|
|
3
|
-
export declare function CardWithUrlContent({ id, url, isSelected, isFrameVisible, frameStyle, platform, onClick, appearance, dispatchAnalytics, onResolve, onError, testId, showActions, inheritDimensions, embedIframeRef, embedIframeUrlType, inlinePreloaderStyle, ui, children, showHoverPreview, showAuthTooltip: showAuthTooltipProp, analyticsEvents, }: CardWithUrlContentProps): JSX.Element;
|
|
3
|
+
export declare function CardWithUrlContent({ id, url, isSelected, isFrameVisible, frameStyle, platform, onClick, appearance, dispatchAnalytics, onResolve, onError, testId, showActions, showServerActions: showServerActionsProp, inheritDimensions, embedIframeRef, embedIframeUrlType, inlinePreloaderStyle, ui, children, showHoverPreview, showAuthTooltip: showAuthTooltipProp, analyticsEvents, }: CardWithUrlContentProps): JSX.Element;
|
|
@@ -20,6 +20,7 @@ export declare type CardWithUrlContentProps = {
|
|
|
20
20
|
onResolve?: OnResolveCallback;
|
|
21
21
|
onError?: OnErrorCallback;
|
|
22
22
|
showActions?: boolean;
|
|
23
|
+
showServerActions?: boolean;
|
|
23
24
|
inheritDimensions?: boolean;
|
|
24
25
|
embedIframeRef?: React.Ref<HTMLIFrameElement>;
|
|
25
26
|
embedIframeUrlType?: EmbedIframeUrlType;
|