@atlaskit/smart-card 38.5.2 → 38.5.3
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 +8 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/block/index.js +11 -4
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/block/index.js +11 -4
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/block/index.js +11 -4
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/block/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/title-block/types.d.ts +4 -0
- package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +4 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/block/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/types.d.ts +4 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/types.d.ts +4 -0
- package/package.json +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 38.5.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#160142](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/160142)
|
|
8
|
+
[`70707418f5391`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/70707418f5391) -
|
|
9
|
+
CCP-6429 Fix VC offender - shortcut smartlink
|
|
10
|
+
|
|
3
11
|
## 38.5.2
|
|
4
12
|
|
|
5
13
|
### Patch 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: "38.5.
|
|
14
|
+
packageVersion: "38.5.3"
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* index.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
-
/* eslint-disable @atlaskit/ui-styling-standard/no-nested-selectors */
|
|
3
2
|
"use strict";
|
|
4
3
|
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
5
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
6
|
Object.defineProperty(exports, "__esModule", {
|
|
7
7
|
value: true
|
|
@@ -11,11 +11,13 @@ require("./index.compiled.css");
|
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var React = _react;
|
|
13
13
|
var _runtime = require("@compiled/react/runtime");
|
|
14
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
14
15
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
16
|
var _constants = require("../../../../../constants");
|
|
16
17
|
var _utils = require("../utils");
|
|
17
18
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
18
19
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
20
|
+
/* eslint-disable @atlaskit/ui-styling-standard/no-nested-selectors */
|
|
19
21
|
// TODO: Remove on fg cleanup: platform-linking-visual-refresh-v1
|
|
20
22
|
var BaseBlockStylesOld = null;
|
|
21
23
|
var baseBlockStyles = null;
|
|
@@ -58,11 +60,16 @@ var Block = function Block(_ref) {
|
|
|
58
60
|
blockRef = _ref.blockRef,
|
|
59
61
|
onRender = _ref.onRender,
|
|
60
62
|
onTransitionEnd = _ref.onTransitionEnd,
|
|
61
|
-
style = _ref.style
|
|
63
|
+
style = _ref.style,
|
|
64
|
+
placeholderId = _ref.placeholderId;
|
|
62
65
|
(0, _react.useEffect)(function () {
|
|
63
66
|
onRender && onRender();
|
|
64
67
|
}, [onRender]);
|
|
65
|
-
|
|
68
|
+
var ssrPlacholderProps = (0, _platformFeatureFlags.fg)('cc_shortcut_ssr_placeholder') ? {
|
|
69
|
+
'data-ssr-placeholder': placeholderId,
|
|
70
|
+
'data-ssr-placeholder-replace': placeholderId
|
|
71
|
+
} : {};
|
|
72
|
+
return /*#__PURE__*/React.createElement("div", (0, _extends2.default)({
|
|
66
73
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
67
74
|
className: (0, _runtime.ax)([!(0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') && "_1reo15vq _18m915vq _4cvr1h6o _vwz41j6v _1e0c1txw _1ul9idpf _1bah1y6m _fiawglyw _1ouwidpf _f6ju1ns9 _1uzp1mp2 _ytq1bjq5 _a7e8uxlv", (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') && "_1reo15vq _18m915vq _4cvr1h6o _1e0c1txw _1ul9idpf _1bah1y6m _fiawglyw _1uzp1mp2 _a6bxmuej _e4i5bjq5 _1gu21oju _5b7tuxlv _17ae1oju", "_12ji1snc _1qu2agmp _12y310yn _12ji1kw7 _syaz1kw7 _18ql1j28 _1ifmglyw _181uglyw _1rkwglyw _te17glyw _uiztglyw", directionStyles[direction], !(0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') && gapsStylesOld[size], (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') && gapStyles[size], className]),
|
|
68
75
|
"data-smart-block": true,
|
|
@@ -72,6 +79,6 @@ var Block = function Block(_ref) {
|
|
|
72
79
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
73
80
|
,
|
|
74
81
|
style: style
|
|
75
|
-
}, (0, _utils.renderChildren)(children, size));
|
|
82
|
+
}, ssrPlacholderProps), (0, _utils.renderChildren)(children, size));
|
|
76
83
|
};
|
|
77
84
|
var _default = exports.default = Block;
|
|
@@ -20,7 +20,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
|
|
|
20
20
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
21
21
|
var PACKAGE_DATA = {
|
|
22
22
|
packageName: "@atlaskit/smart-card",
|
|
23
|
-
packageVersion: "38.5.
|
|
23
|
+
packageVersion: "38.5.3",
|
|
24
24
|
componentName: 'linkUrl'
|
|
25
25
|
};
|
|
26
26
|
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: "38.5.
|
|
5
|
+
packageVersion: "38.5.3"
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/* index.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
-
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import "./index.compiled.css";
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
+
/* eslint-disable @atlaskit/ui-styling-standard/no-nested-selectors */
|
|
7
|
+
|
|
6
8
|
import { useEffect } from 'react';
|
|
7
9
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
10
|
import { SmartLinkDirection, SmartLinkSize } from '../../../../../constants';
|
|
@@ -47,12 +49,17 @@ const Block = ({
|
|
|
47
49
|
blockRef,
|
|
48
50
|
onRender,
|
|
49
51
|
onTransitionEnd,
|
|
50
|
-
style
|
|
52
|
+
style,
|
|
53
|
+
placeholderId
|
|
51
54
|
}) => {
|
|
52
55
|
useEffect(() => {
|
|
53
56
|
onRender && onRender();
|
|
54
57
|
}, [onRender]);
|
|
55
|
-
|
|
58
|
+
const ssrPlacholderProps = fg('cc_shortcut_ssr_placeholder') ? {
|
|
59
|
+
'data-ssr-placeholder': placeholderId,
|
|
60
|
+
'data-ssr-placeholder-replace': placeholderId
|
|
61
|
+
} : {};
|
|
62
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
56
63
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
57
64
|
className: ax([!fg('platform-linking-visual-refresh-v1') && "_1reo15vq _18m915vq _4cvr1h6o _vwz41j6v _1e0c1txw _1ul9idpf _1bah1y6m _fiawglyw _1ouwidpf _f6ju1ns9 _1uzp1mp2 _ytq1bjq5 _a7e8uxlv", fg('platform-linking-visual-refresh-v1') && "_1reo15vq _18m915vq _4cvr1h6o _1e0c1txw _1ul9idpf _1bah1y6m _fiawglyw _1uzp1mp2 _a6bxmuej _e4i5bjq5 _1gu21oju _5b7tuxlv _17ae1oju", "_12ji1snc _1qu2agmp _12y310yn _12ji1kw7 _syaz1kw7 _18ql1j28 _1ifmglyw _181uglyw _1rkwglyw _te17glyw _uiztglyw", directionStyles[direction], !fg('platform-linking-visual-refresh-v1') && gapsStylesOld[size], fg('platform-linking-visual-refresh-v1') && gapStyles[size], className]),
|
|
58
65
|
"data-smart-block": true,
|
|
@@ -62,6 +69,6 @@ const Block = ({
|
|
|
62
69
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
63
70
|
,
|
|
64
71
|
style: style
|
|
65
|
-
}, renderChildren(children, size));
|
|
72
|
+
}, ssrPlacholderProps), renderChildren(children, size));
|
|
66
73
|
};
|
|
67
74
|
export default Block;
|
|
@@ -10,7 +10,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
10
10
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
11
11
|
const PACKAGE_DATA = {
|
|
12
12
|
packageName: "@atlaskit/smart-card",
|
|
13
|
-
packageVersion: "38.5.
|
|
13
|
+
packageVersion: "38.5.3",
|
|
14
14
|
componentName: 'linkUrl'
|
|
15
15
|
};
|
|
16
16
|
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: "38.5.
|
|
7
|
+
packageVersion: "38.5.3"
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/* index.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
-
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import "./index.compiled.css";
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
+
/* eslint-disable @atlaskit/ui-styling-standard/no-nested-selectors */
|
|
7
|
+
|
|
6
8
|
import { useEffect } from 'react';
|
|
7
9
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
10
|
import { SmartLinkDirection, SmartLinkSize } from '../../../../../constants';
|
|
@@ -50,11 +52,16 @@ var Block = function Block(_ref) {
|
|
|
50
52
|
blockRef = _ref.blockRef,
|
|
51
53
|
onRender = _ref.onRender,
|
|
52
54
|
onTransitionEnd = _ref.onTransitionEnd,
|
|
53
|
-
style = _ref.style
|
|
55
|
+
style = _ref.style,
|
|
56
|
+
placeholderId = _ref.placeholderId;
|
|
54
57
|
useEffect(function () {
|
|
55
58
|
onRender && onRender();
|
|
56
59
|
}, [onRender]);
|
|
57
|
-
|
|
60
|
+
var ssrPlacholderProps = fg('cc_shortcut_ssr_placeholder') ? {
|
|
61
|
+
'data-ssr-placeholder': placeholderId,
|
|
62
|
+
'data-ssr-placeholder-replace': placeholderId
|
|
63
|
+
} : {};
|
|
64
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
58
65
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
59
66
|
className: ax([!fg('platform-linking-visual-refresh-v1') && "_1reo15vq _18m915vq _4cvr1h6o _vwz41j6v _1e0c1txw _1ul9idpf _1bah1y6m _fiawglyw _1ouwidpf _f6ju1ns9 _1uzp1mp2 _ytq1bjq5 _a7e8uxlv", fg('platform-linking-visual-refresh-v1') && "_1reo15vq _18m915vq _4cvr1h6o _1e0c1txw _1ul9idpf _1bah1y6m _fiawglyw _1uzp1mp2 _a6bxmuej _e4i5bjq5 _1gu21oju _5b7tuxlv _17ae1oju", "_12ji1snc _1qu2agmp _12y310yn _12ji1kw7 _syaz1kw7 _18ql1j28 _1ifmglyw _181uglyw _1rkwglyw _te17glyw _uiztglyw", directionStyles[direction], !fg('platform-linking-visual-refresh-v1') && gapsStylesOld[size], fg('platform-linking-visual-refresh-v1') && gapStyles[size], className]),
|
|
60
67
|
"data-smart-block": true,
|
|
@@ -64,6 +71,6 @@ var Block = function Block(_ref) {
|
|
|
64
71
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
65
72
|
,
|
|
66
73
|
style: style
|
|
67
|
-
}, renderChildren(children, size));
|
|
74
|
+
}, ssrPlacholderProps), renderChildren(children, size));
|
|
68
75
|
};
|
|
69
76
|
export default Block;
|
|
@@ -13,7 +13,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
13
13
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
14
14
|
var PACKAGE_DATA = {
|
|
15
15
|
packageName: "@atlaskit/smart-card",
|
|
16
|
-
packageVersion: "38.5.
|
|
16
|
+
packageVersion: "38.5.3",
|
|
17
17
|
componentName: 'linkUrl'
|
|
18
18
|
};
|
|
19
19
|
var Anchor = withLinkClickedEvent('a');
|
|
@@ -7,5 +7,5 @@ import { type BlockProps } from '../types';
|
|
|
7
7
|
* @param {ActionGroupProps} ActionGroupProps
|
|
8
8
|
* @see Action
|
|
9
9
|
*/
|
|
10
|
-
declare const Block: ({ children, direction, size, testId, className, blockRef, onRender, onTransitionEnd, style, }: BlockProps) => JSX.Element;
|
|
10
|
+
declare const Block: ({ children, direction, size, testId, className, blockRef, onRender, onTransitionEnd, style, placeholderId, }: BlockProps) => JSX.Element;
|
|
11
11
|
export default Block;
|
|
@@ -105,6 +105,10 @@ export type TitleBlockProps = {
|
|
|
105
105
|
* Ref passed into the link <a> element
|
|
106
106
|
*/
|
|
107
107
|
anchorRef?: React.Ref<HTMLAnchorElement>;
|
|
108
|
+
/**
|
|
109
|
+
* A unique identifier for the placeholder loading state, which is constant across all loading states of the same item.
|
|
110
|
+
*/
|
|
111
|
+
placeholderId?: string;
|
|
108
112
|
} & BlockProps;
|
|
109
113
|
export type TitleBlockViewProps = TitleBlockProps & {
|
|
110
114
|
actionGroup?: React.ReactNode;
|
|
@@ -52,6 +52,10 @@ export type BlockProps = {
|
|
|
52
52
|
* @internal
|
|
53
53
|
*/
|
|
54
54
|
onTransitionEnd?: () => void;
|
|
55
|
+
/**
|
|
56
|
+
* A unique identifier for the placeholder loading state, which is constant across all loading states of the same item.
|
|
57
|
+
*/
|
|
58
|
+
placeholderId?: string;
|
|
55
59
|
};
|
|
56
60
|
/**
|
|
57
61
|
* Used to represent a metadata element to be rendered.
|
|
@@ -7,5 +7,5 @@ import { type BlockProps } from '../types';
|
|
|
7
7
|
* @param {ActionGroupProps} ActionGroupProps
|
|
8
8
|
* @see Action
|
|
9
9
|
*/
|
|
10
|
-
declare const Block: ({ children, direction, size, testId, className, blockRef, onRender, onTransitionEnd, style, }: BlockProps) => JSX.Element;
|
|
10
|
+
declare const Block: ({ children, direction, size, testId, className, blockRef, onRender, onTransitionEnd, style, placeholderId, }: BlockProps) => JSX.Element;
|
|
11
11
|
export default Block;
|
|
@@ -105,6 +105,10 @@ export type TitleBlockProps = {
|
|
|
105
105
|
* Ref passed into the link <a> element
|
|
106
106
|
*/
|
|
107
107
|
anchorRef?: React.Ref<HTMLAnchorElement>;
|
|
108
|
+
/**
|
|
109
|
+
* A unique identifier for the placeholder loading state, which is constant across all loading states of the same item.
|
|
110
|
+
*/
|
|
111
|
+
placeholderId?: string;
|
|
108
112
|
} & BlockProps;
|
|
109
113
|
export type TitleBlockViewProps = TitleBlockProps & {
|
|
110
114
|
actionGroup?: React.ReactNode;
|
|
@@ -52,6 +52,10 @@ export type BlockProps = {
|
|
|
52
52
|
* @internal
|
|
53
53
|
*/
|
|
54
54
|
onTransitionEnd?: () => void;
|
|
55
|
+
/**
|
|
56
|
+
* A unique identifier for the placeholder loading state, which is constant across all loading states of the same item.
|
|
57
|
+
*/
|
|
58
|
+
placeholderId?: string;
|
|
55
59
|
};
|
|
56
60
|
/**
|
|
57
61
|
* Used to represent a metadata element to be rendered.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "38.5.
|
|
3
|
+
"version": "38.5.3",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -167,6 +167,9 @@
|
|
|
167
167
|
".": "./src/index.ts"
|
|
168
168
|
},
|
|
169
169
|
"platform-feature-flags": {
|
|
170
|
+
"cc_shortcut_ssr_placeholder": {
|
|
171
|
+
"type": "boolean"
|
|
172
|
+
},
|
|
170
173
|
"send-smart-link-rendered-ufo-event-half-time": {
|
|
171
174
|
"type": "boolean"
|
|
172
175
|
},
|