@atlaskit/smart-card 38.16.2 → 38.17.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 +12 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/snippet-block/index.js +5 -2
- 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/snippet-block/index.js +3 -1
- 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/snippet-block/index.js +5 -2
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/snippet-block/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/snippet-block/types.d.ts +4 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/snippet-block/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/snippet-block/types.d.ts +4 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 38.17.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#176618](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/176618)
|
|
8
|
+
[`3dc0f901305b0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3dc0f901305b0) -
|
|
9
|
+
[ux] added a showFooter prop to hide/show the default AI footer in snippet block
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 38.16.2
|
|
4
16
|
|
|
5
17
|
### 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.16.
|
|
14
|
+
packageVersion: "38.16.2"
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -15,7 +15,7 @@ var _renderers = require("../../../../../state/renderers");
|
|
|
15
15
|
var _elements = require("../../elements");
|
|
16
16
|
var _utils = require("../../utils");
|
|
17
17
|
var _block = _interopRequireDefault(require("../block"));
|
|
18
|
-
var _excluded = ["maxLines", "status", "testId", "text", "isHidden"];
|
|
18
|
+
var _excluded = ["maxLines", "status", "testId", "text", "isHidden", "showFooter"];
|
|
19
19
|
var DEFAULT_MAX_LINES = 3;
|
|
20
20
|
var MAXIMUM_MAX_LINES = 6;
|
|
21
21
|
var MINIMUM_MAX_LINES = 1;
|
|
@@ -37,6 +37,8 @@ var SnippetBlock = function SnippetBlock(_ref) {
|
|
|
37
37
|
text = _ref.text,
|
|
38
38
|
_ref$isHidden = _ref.isHidden,
|
|
39
39
|
isHidden = _ref$isHidden === void 0 ? false : _ref$isHidden,
|
|
40
|
+
_ref$showFooter = _ref.showFooter,
|
|
41
|
+
showFooter = _ref$showFooter === void 0 ? true : _ref$showFooter,
|
|
40
42
|
blockProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
41
43
|
var context = (0, _platformFeatureFlags.fg)('cc-ai-linking-platform-snippet-renderer') ?
|
|
42
44
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
@@ -84,7 +86,8 @@ var SnippetBlock = function SnippetBlock(_ref) {
|
|
|
84
86
|
contentType: (_context$meta$resourc = context === null || context === void 0 || (_context$meta2 = context.meta) === null || _context$meta2 === void 0 ? void 0 : _context$meta2.resourceType) !== null && _context$meta$resourc !== void 0 ? _context$meta$resourc : '',
|
|
85
87
|
cloudId: (_context$meta$tenantI = context === null || context === void 0 || (_context$meta3 = context.meta) === null || _context$meta3 === void 0 ? void 0 : _context$meta3.tenantId) !== null && _context$meta$tenantI !== void 0 ? _context$meta$tenantI : '',
|
|
86
88
|
maxLines: snippetMaxLines,
|
|
87
|
-
isHidden: isHidden
|
|
89
|
+
isHidden: isHidden,
|
|
90
|
+
showFooter: showFooter
|
|
88
91
|
}) : snippet);
|
|
89
92
|
};
|
|
90
93
|
var _default = exports.default = SnippetBlock;
|
|
@@ -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.16.
|
|
23
|
+
packageVersion: "38.16.2",
|
|
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.16.
|
|
5
|
+
packageVersion: "38.16.2"
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -23,6 +23,7 @@ const SnippetBlock = ({
|
|
|
23
23
|
testId = 'smart-block-snippet',
|
|
24
24
|
text,
|
|
25
25
|
isHidden = false,
|
|
26
|
+
showFooter = true,
|
|
26
27
|
...blockProps
|
|
27
28
|
}) => {
|
|
28
29
|
var _useFlexibleUiOptionC, _blockProps$size2, _cardContext$ui2, _ref, _context$meta$objectI, _context$meta, _context$meta$resourc, _context$meta2, _context$meta$tenantI, _context$meta3;
|
|
@@ -72,7 +73,8 @@ const SnippetBlock = ({
|
|
|
72
73
|
contentType: (_context$meta$resourc = context === null || context === void 0 ? void 0 : (_context$meta2 = context.meta) === null || _context$meta2 === void 0 ? void 0 : _context$meta2.resourceType) !== null && _context$meta$resourc !== void 0 ? _context$meta$resourc : '',
|
|
73
74
|
cloudId: (_context$meta$tenantI = context === null || context === void 0 ? void 0 : (_context$meta3 = context.meta) === null || _context$meta3 === void 0 ? void 0 : _context$meta3.tenantId) !== null && _context$meta$tenantI !== void 0 ? _context$meta$tenantI : '',
|
|
74
75
|
maxLines: snippetMaxLines,
|
|
75
|
-
isHidden: isHidden
|
|
76
|
+
isHidden: isHidden,
|
|
77
|
+
showFooter: showFooter
|
|
76
78
|
}) : snippet);
|
|
77
79
|
};
|
|
78
80
|
export default SnippetBlock;
|
|
@@ -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.16.
|
|
13
|
+
packageVersion: "38.16.2",
|
|
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.16.
|
|
7
|
+
packageVersion: "38.16.2"
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["maxLines", "status", "testId", "text", "isHidden"];
|
|
3
|
+
var _excluded = ["maxLines", "status", "testId", "text", "isHidden", "showFooter"];
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
6
|
import { SmartLinkStatus } from '../../../../../constants';
|
|
@@ -30,6 +30,8 @@ var SnippetBlock = function SnippetBlock(_ref) {
|
|
|
30
30
|
text = _ref.text,
|
|
31
31
|
_ref$isHidden = _ref.isHidden,
|
|
32
32
|
isHidden = _ref$isHidden === void 0 ? false : _ref$isHidden,
|
|
33
|
+
_ref$showFooter = _ref.showFooter,
|
|
34
|
+
showFooter = _ref$showFooter === void 0 ? true : _ref$showFooter,
|
|
33
35
|
blockProps = _objectWithoutProperties(_ref, _excluded);
|
|
34
36
|
var context = fg('cc-ai-linking-platform-snippet-renderer') ?
|
|
35
37
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
@@ -77,7 +79,8 @@ var SnippetBlock = function SnippetBlock(_ref) {
|
|
|
77
79
|
contentType: (_context$meta$resourc = context === null || context === void 0 || (_context$meta2 = context.meta) === null || _context$meta2 === void 0 ? void 0 : _context$meta2.resourceType) !== null && _context$meta$resourc !== void 0 ? _context$meta$resourc : '',
|
|
78
80
|
cloudId: (_context$meta$tenantI = context === null || context === void 0 || (_context$meta3 = context.meta) === null || _context$meta3 === void 0 ? void 0 : _context$meta3.tenantId) !== null && _context$meta$tenantI !== void 0 ? _context$meta$tenantI : '',
|
|
79
81
|
maxLines: snippetMaxLines,
|
|
80
|
-
isHidden: isHidden
|
|
82
|
+
isHidden: isHidden,
|
|
83
|
+
showFooter: showFooter
|
|
81
84
|
}) : snippet);
|
|
82
85
|
};
|
|
83
86
|
export default SnippetBlock;
|
|
@@ -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.16.
|
|
16
|
+
packageVersion: "38.16.2",
|
|
17
17
|
componentName: 'linkUrl'
|
|
18
18
|
};
|
|
19
19
|
var Anchor = withLinkClickedEvent('a');
|
|
@@ -6,5 +6,5 @@ import { type SnippetBlockProps } from './types';
|
|
|
6
6
|
* @param {SnippetBlockProps} SnippetBlockProps
|
|
7
7
|
* @see Block
|
|
8
8
|
*/
|
|
9
|
-
declare const SnippetBlock: ({ maxLines, status, testId, text, isHidden, ...blockProps }: SnippetBlockProps) => React.JSX.Element | null;
|
|
9
|
+
declare const SnippetBlock: ({ maxLines, status, testId, text, isHidden, showFooter, ...blockProps }: SnippetBlockProps) => React.JSX.Element | null;
|
|
10
10
|
export default SnippetBlock;
|
|
@@ -13,4 +13,8 @@ export type SnippetBlockProps = {
|
|
|
13
13
|
* The snippet block is rendered hidden at times, this just informs the component and the snippet renderer
|
|
14
14
|
*/
|
|
15
15
|
isHidden?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Whether to show the footer of the snippet block.
|
|
18
|
+
*/
|
|
19
|
+
showFooter?: boolean;
|
|
16
20
|
} & BlockProps;
|
|
@@ -6,5 +6,5 @@ import { type SnippetBlockProps } from './types';
|
|
|
6
6
|
* @param {SnippetBlockProps} SnippetBlockProps
|
|
7
7
|
* @see Block
|
|
8
8
|
*/
|
|
9
|
-
declare const SnippetBlock: ({ maxLines, status, testId, text, isHidden, ...blockProps }: SnippetBlockProps) => React.JSX.Element | null;
|
|
9
|
+
declare const SnippetBlock: ({ maxLines, status, testId, text, isHidden, showFooter, ...blockProps }: SnippetBlockProps) => React.JSX.Element | null;
|
|
10
10
|
export default SnippetBlock;
|
|
@@ -13,4 +13,8 @@ export type SnippetBlockProps = {
|
|
|
13
13
|
* The snippet block is rendered hidden at times, this just informs the component and the snippet renderer
|
|
14
14
|
*/
|
|
15
15
|
isHidden?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Whether to show the footer of the snippet block.
|
|
18
|
+
*/
|
|
19
|
+
showFooter?: boolean;
|
|
16
20
|
} & BlockProps;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "38.
|
|
3
|
+
"version": "38.17.0",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"uuid": "^3.1.0"
|
|
87
87
|
},
|
|
88
88
|
"peerDependencies": {
|
|
89
|
-
"@atlaskit/link-provider": "^3.
|
|
89
|
+
"@atlaskit/link-provider": "^3.4.0",
|
|
90
90
|
"react": "^18.2.0",
|
|
91
91
|
"react-dom": "^18.2.0",
|
|
92
92
|
"react-intl-next": "npm:react-intl@^5.18.1"
|