@atlaskit/smart-card 26.37.2 → 26.38.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 +6 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/snippet-block/index.js +4 -2
- package/dist/cjs/view/FlexibleCard/components/elements/text/index.js +3 -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/FlexibleCard/components/elements/text/index.js +3 -2
- 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 +4 -2
- package/dist/esm/view/FlexibleCard/components/elements/text/index.js +3 -2
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/snippet-block/types.d.ts +4 -0
- package/dist/types/view/FlexibleCard/components/elements/text/types.d.ts +4 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/snippet-block/types.d.ts +4 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/text/types.d.ts +4 -0
- package/package.json +1 -1
- package/report.api.md +1 -0
- package/tmp/api-report-tmp.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 26.38.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#42098](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42098) [`0c93d2f2e70`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0c93d2f2e70) - [ux] Add text prop to override content in SnippetBlock
|
|
8
|
+
|
|
3
9
|
## 26.37.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -22,7 +22,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
22
22
|
var context = exports.context = {
|
|
23
23
|
componentName: 'smart-cards',
|
|
24
24
|
packageName: "@atlaskit/smart-card",
|
|
25
|
-
packageVersion: "26.
|
|
25
|
+
packageVersion: "26.38.0"
|
|
26
26
|
};
|
|
27
27
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
28
28
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -12,7 +12,7 @@ var _block = _interopRequireDefault(require("../block"));
|
|
|
12
12
|
var _constants = require("../../../../../constants");
|
|
13
13
|
var _elements = require("../../elements");
|
|
14
14
|
var _utils = require("../../utils");
|
|
15
|
-
var _excluded = ["maxLines", "status", "testId"];
|
|
15
|
+
var _excluded = ["maxLines", "status", "testId", "text"];
|
|
16
16
|
var DEFAULT_MAX_LINES = 3;
|
|
17
17
|
var MAXIMUM_MAX_LINES = 3;
|
|
18
18
|
var MINIMUM_MAX_LINES = 1;
|
|
@@ -30,6 +30,7 @@ var SnippetBlock = function SnippetBlock(_ref) {
|
|
|
30
30
|
status = _ref$status === void 0 ? _constants.SmartLinkStatus.Fallback : _ref$status,
|
|
31
31
|
_ref$testId = _ref.testId,
|
|
32
32
|
testId = _ref$testId === void 0 ? 'smart-block-snippet' : _ref$testId,
|
|
33
|
+
text = _ref.text,
|
|
33
34
|
blockProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
34
35
|
if (status !== _constants.SmartLinkStatus.Resolved) {
|
|
35
36
|
return null;
|
|
@@ -38,7 +39,8 @@ var SnippetBlock = function SnippetBlock(_ref) {
|
|
|
38
39
|
return /*#__PURE__*/_react.default.createElement(_block.default, (0, _extends2.default)({}, blockProps, {
|
|
39
40
|
testId: "".concat(testId, "-resolved-view")
|
|
40
41
|
}), /*#__PURE__*/_react.default.createElement(_elements.Snippet, {
|
|
41
|
-
maxLines: snippetMaxLines
|
|
42
|
+
maxLines: snippetMaxLines,
|
|
43
|
+
text: text
|
|
42
44
|
}));
|
|
43
45
|
};
|
|
44
46
|
var _default = exports.default = SnippetBlock;
|
|
@@ -30,7 +30,8 @@ var Text = function Text(_ref) {
|
|
|
30
30
|
name = _ref.name,
|
|
31
31
|
overrideCss = _ref.overrideCss,
|
|
32
32
|
_ref$testId = _ref.testId,
|
|
33
|
-
testId = _ref$testId === void 0 ? 'smart-element-text' : _ref$testId
|
|
33
|
+
testId = _ref$testId === void 0 ? 'smart-element-text' : _ref$testId,
|
|
34
|
+
text = _ref.text;
|
|
34
35
|
if (!message && !content) {
|
|
35
36
|
return null;
|
|
36
37
|
}
|
|
@@ -40,6 +41,6 @@ var Text = function Text(_ref) {
|
|
|
40
41
|
"data-smart-element": name,
|
|
41
42
|
"data-smart-element-text": true,
|
|
42
43
|
"data-testid": testId
|
|
43
|
-
}, (0, _utils.getFormattedMessage)(message) || content);
|
|
44
|
+
}, text ? text : (0, _utils.getFormattedMessage)(message) || content);
|
|
44
45
|
};
|
|
45
46
|
var _default = exports.default = Text;
|
|
@@ -18,7 +18,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId"],
|
|
|
18
18
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
19
19
|
var PACKAGE_DATA = {
|
|
20
20
|
packageName: "@atlaskit/smart-card",
|
|
21
|
-
packageVersion: "26.
|
|
21
|
+
packageVersion: "26.38.0",
|
|
22
22
|
componentName: 'linkUrl'
|
|
23
23
|
};
|
|
24
24
|
var Link = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -4,7 +4,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export const context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card",
|
|
7
|
-
packageVersion: "26.
|
|
7
|
+
packageVersion: "26.38.0"
|
|
8
8
|
};
|
|
9
9
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -18,6 +18,7 @@ const SnippetBlock = ({
|
|
|
18
18
|
maxLines = DEFAULT_MAX_LINES,
|
|
19
19
|
status = SmartLinkStatus.Fallback,
|
|
20
20
|
testId = 'smart-block-snippet',
|
|
21
|
+
text,
|
|
21
22
|
...blockProps
|
|
22
23
|
}) => {
|
|
23
24
|
if (status !== SmartLinkStatus.Resolved) {
|
|
@@ -27,7 +28,8 @@ const SnippetBlock = ({
|
|
|
27
28
|
return /*#__PURE__*/React.createElement(Block, _extends({}, blockProps, {
|
|
28
29
|
testId: `${testId}-resolved-view`
|
|
29
30
|
}), /*#__PURE__*/React.createElement(Snippet, {
|
|
30
|
-
maxLines: snippetMaxLines
|
|
31
|
+
maxLines: snippetMaxLines,
|
|
32
|
+
text: text
|
|
31
33
|
}));
|
|
32
34
|
};
|
|
33
35
|
export default SnippetBlock;
|
|
@@ -23,7 +23,8 @@ const Text = ({
|
|
|
23
23
|
message,
|
|
24
24
|
name,
|
|
25
25
|
overrideCss,
|
|
26
|
-
testId = 'smart-element-text'
|
|
26
|
+
testId = 'smart-element-text',
|
|
27
|
+
text
|
|
27
28
|
}) => {
|
|
28
29
|
if (!message && !content) {
|
|
29
30
|
return null;
|
|
@@ -34,6 +35,6 @@ const Text = ({
|
|
|
34
35
|
"data-smart-element": name,
|
|
35
36
|
"data-smart-element-text": true,
|
|
36
37
|
"data-testid": testId
|
|
37
|
-
}, getFormattedMessage(message) || content);
|
|
38
|
+
}, text ? text : getFormattedMessage(message) || content);
|
|
38
39
|
};
|
|
39
40
|
export default Text;
|
|
@@ -8,7 +8,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
8
8
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
9
9
|
const PACKAGE_DATA = {
|
|
10
10
|
packageName: "@atlaskit/smart-card",
|
|
11
|
-
packageVersion: "26.
|
|
11
|
+
packageVersion: "26.38.0",
|
|
12
12
|
componentName: 'linkUrl'
|
|
13
13
|
};
|
|
14
14
|
const Link = withLinkClickedEvent('a');
|
|
@@ -15,7 +15,7 @@ export var ANALYTICS_CHANNEL = 'media';
|
|
|
15
15
|
export var context = {
|
|
16
16
|
componentName: 'smart-cards',
|
|
17
17
|
packageName: "@atlaskit/smart-card",
|
|
18
|
-
packageVersion: "26.
|
|
18
|
+
packageVersion: "26.38.0"
|
|
19
19
|
};
|
|
20
20
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
21
21
|
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"];
|
|
3
|
+
var _excluded = ["maxLines", "status", "testId", "text"];
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import Block from '../block';
|
|
6
6
|
import { SmartLinkStatus } from '../../../../../constants';
|
|
@@ -23,6 +23,7 @@ var SnippetBlock = function SnippetBlock(_ref) {
|
|
|
23
23
|
status = _ref$status === void 0 ? SmartLinkStatus.Fallback : _ref$status,
|
|
24
24
|
_ref$testId = _ref.testId,
|
|
25
25
|
testId = _ref$testId === void 0 ? 'smart-block-snippet' : _ref$testId,
|
|
26
|
+
text = _ref.text,
|
|
26
27
|
blockProps = _objectWithoutProperties(_ref, _excluded);
|
|
27
28
|
if (status !== SmartLinkStatus.Resolved) {
|
|
28
29
|
return null;
|
|
@@ -31,7 +32,8 @@ var SnippetBlock = function SnippetBlock(_ref) {
|
|
|
31
32
|
return /*#__PURE__*/React.createElement(Block, _extends({}, blockProps, {
|
|
32
33
|
testId: "".concat(testId, "-resolved-view")
|
|
33
34
|
}), /*#__PURE__*/React.createElement(Snippet, {
|
|
34
|
-
maxLines: snippetMaxLines
|
|
35
|
+
maxLines: snippetMaxLines,
|
|
36
|
+
text: text
|
|
35
37
|
}));
|
|
36
38
|
};
|
|
37
39
|
export default SnippetBlock;
|
|
@@ -23,7 +23,8 @@ var Text = function Text(_ref) {
|
|
|
23
23
|
name = _ref.name,
|
|
24
24
|
overrideCss = _ref.overrideCss,
|
|
25
25
|
_ref$testId = _ref.testId,
|
|
26
|
-
testId = _ref$testId === void 0 ? 'smart-element-text' : _ref$testId
|
|
26
|
+
testId = _ref$testId === void 0 ? 'smart-element-text' : _ref$testId,
|
|
27
|
+
text = _ref.text;
|
|
27
28
|
if (!message && !content) {
|
|
28
29
|
return null;
|
|
29
30
|
}
|
|
@@ -33,6 +34,6 @@ var Text = function Text(_ref) {
|
|
|
33
34
|
"data-smart-element": name,
|
|
34
35
|
"data-smart-element-text": true,
|
|
35
36
|
"data-testid": testId
|
|
36
|
-
}, getFormattedMessage(message) || content);
|
|
37
|
+
}, text ? text : getFormattedMessage(message) || content);
|
|
37
38
|
};
|
|
38
39
|
export default Text;
|
|
@@ -11,7 +11,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
11
11
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
12
12
|
var PACKAGE_DATA = {
|
|
13
13
|
packageName: "@atlaskit/smart-card",
|
|
14
|
-
packageVersion: "26.
|
|
14
|
+
packageVersion: "26.38.0",
|
|
15
15
|
componentName: 'linkUrl'
|
|
16
16
|
};
|
|
17
17
|
var Link = withLinkClickedEvent('a');
|
package/package.json
CHANGED
package/report.api.md
CHANGED