@atlaskit/smart-card 27.2.3 → 27.3.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 +11 -0
- package/dist/cjs/state/hooks/use-ai-summary/ai-summary-service/index.js +10 -13
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/elements/badge/index.js +4 -2
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/RelatedLinksModal/components/related-link-item/index.js +2 -1
- package/dist/es2019/state/hooks/use-ai-summary/ai-summary-service/index.js +2 -6
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/elements/badge/index.js +2 -1
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/RelatedLinksModal/components/related-link-item/index.js +2 -1
- package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/index.js +11 -14
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/FlexibleCard/components/elements/badge/index.js +4 -2
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/RelatedLinksModal/components/related-link-item/index.js +2 -1
- package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +2 -1
- package/dist/types/view/FlexibleCard/components/elements/badge/index.d.ts +2 -3
- package/dist/types/view/FlexibleCard/components/elements/badge/types.d.ts +6 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/types.d.ts +2 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/badge/index.d.ts +2 -3
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/badge/types.d.ts +6 -1
- package/package.json +1 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 27.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#105107](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/105107)
|
|
8
|
+
[`7f17454f0c3e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/7f17454f0c3e) -
|
|
9
|
+
Remove FF for AI Summaries base url
|
|
10
|
+
- [#104259](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/104259)
|
|
11
|
+
[`25205c2df930`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/25205c2df930) -
|
|
12
|
+
Added option to hide badge icon for Provider element
|
|
13
|
+
|
|
3
14
|
## 27.2.3
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -15,7 +15,6 @@ var _types = require("./types");
|
|
|
15
15
|
var _utils = require("./utils");
|
|
16
16
|
var _readStream = require("./readStream");
|
|
17
17
|
var _linkingCommon = require("@atlaskit/linking-common");
|
|
18
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
19
18
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
20
19
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
21
20
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
@@ -42,7 +41,7 @@ var AISummaryService = exports.AISummaryService = /*#__PURE__*/function () {
|
|
|
42
41
|
return (0, _utils.addPath)('/gateway/api/', path);
|
|
43
42
|
});
|
|
44
43
|
(0, _defineProperty2.default)(this, "fetchStream", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
45
|
-
var payload, options,
|
|
44
|
+
var payload, options, response;
|
|
46
45
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
47
46
|
while (1) switch (_context.prev = _context.next) {
|
|
48
47
|
case 0:
|
|
@@ -55,26 +54,24 @@ var AISummaryService = exports.AISummaryService = /*#__PURE__*/function () {
|
|
|
55
54
|
summary_output_mimetype: 'text/markdown'
|
|
56
55
|
}
|
|
57
56
|
};
|
|
58
|
-
options =
|
|
57
|
+
options = {
|
|
59
58
|
method: 'POST',
|
|
60
59
|
headers: _this.config.headers,
|
|
61
|
-
body: JSON.stringify(payload)
|
|
62
|
-
}, (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.ai-summary-service-base-url') && {
|
|
60
|
+
body: JSON.stringify(payload),
|
|
63
61
|
credentials: 'include'
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
case 5:
|
|
62
|
+
};
|
|
63
|
+
_context.next = 4;
|
|
64
|
+
return fetch(_this.config.requestUrl, options);
|
|
65
|
+
case 4:
|
|
69
66
|
response = _context.sent;
|
|
70
67
|
if (!(!response.ok || response.status >= 400)) {
|
|
71
|
-
_context.next =
|
|
68
|
+
_context.next = 9;
|
|
72
69
|
break;
|
|
73
70
|
}
|
|
74
71
|
throw new Error("Status: ".concat(response.status, "\n URL: ").concat(_this.url, "\n StatusText ").concat(response.statusText));
|
|
75
|
-
case
|
|
72
|
+
case 9:
|
|
76
73
|
return _context.abrupt("return", (0, _readStream.readStream)(response));
|
|
77
|
-
case
|
|
74
|
+
case 10:
|
|
78
75
|
case "end":
|
|
79
76
|
return _context.stop();
|
|
80
77
|
}
|
|
@@ -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: "27.
|
|
25
|
+
packageVersion: "27.3.0"
|
|
26
26
|
};
|
|
27
27
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
28
28
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -74,7 +74,9 @@ var renderImageIcon = function renderImageIcon(url, testId) {
|
|
|
74
74
|
* @see Provider
|
|
75
75
|
*/
|
|
76
76
|
var Badge = function Badge(_ref) {
|
|
77
|
-
var
|
|
77
|
+
var _ref$hideIcon = _ref.hideIcon,
|
|
78
|
+
hideIcon = _ref$hideIcon === void 0 ? false : _ref$hideIcon,
|
|
79
|
+
icon = _ref.icon,
|
|
78
80
|
label = _ref.label,
|
|
79
81
|
name = _ref.name,
|
|
80
82
|
overrideCss = _ref.overrideCss,
|
|
@@ -92,7 +94,7 @@ var Badge = function Badge(_ref) {
|
|
|
92
94
|
"data-smart-element": name,
|
|
93
95
|
"data-smart-element-badge": true,
|
|
94
96
|
"data-testid": testId
|
|
95
|
-
}, (0, _react2.jsx)("span", {
|
|
97
|
+
}, !hideIcon && (0, _react2.jsx)("span", {
|
|
96
98
|
css: iconStyles
|
|
97
99
|
}, badgeIcon), (0, _react2.jsx)("span", {
|
|
98
100
|
css: labelStyles,
|
|
@@ -17,7 +17,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId"],
|
|
|
17
17
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
18
18
|
var PACKAGE_DATA = {
|
|
19
19
|
packageName: "@atlaskit/smart-card",
|
|
20
|
-
packageVersion: "27.
|
|
20
|
+
packageVersion: "27.3.0",
|
|
21
21
|
componentName: 'linkUrl'
|
|
22
22
|
};
|
|
23
23
|
var Link = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -27,7 +27,8 @@ var RelatedLinkItem = function RelatedLinkItem(_ref) {
|
|
|
27
27
|
var url = _ref.url,
|
|
28
28
|
testId = _ref.testId;
|
|
29
29
|
var subtitle = [{
|
|
30
|
-
name: _index.ElementName.Provider
|
|
30
|
+
name: _index.ElementName.Provider,
|
|
31
|
+
hideIcon: true
|
|
31
32
|
}];
|
|
32
33
|
var ui = {
|
|
33
34
|
hideElevation: true,
|
|
@@ -4,7 +4,6 @@ import { errorMessages } from './types';
|
|
|
4
4
|
import { addPath, getXProductHeaderValue } from './utils';
|
|
5
5
|
import { readStream } from './readStream';
|
|
6
6
|
import { getBaseUrl } from '@atlaskit/linking-common';
|
|
7
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
export class AISummaryService {
|
|
9
8
|
constructor(props) {
|
|
10
9
|
var _getXProductHeaderVal;
|
|
@@ -35,12 +34,9 @@ export class AISummaryService {
|
|
|
35
34
|
method: 'POST',
|
|
36
35
|
headers: this.config.headers,
|
|
37
36
|
body: JSON.stringify(payload),
|
|
38
|
-
|
|
39
|
-
credentials: 'include'
|
|
40
|
-
})
|
|
37
|
+
credentials: 'include'
|
|
41
38
|
};
|
|
42
|
-
const
|
|
43
|
-
const response = await fetch(requestURL, options);
|
|
39
|
+
const response = await fetch(this.config.requestUrl, options);
|
|
44
40
|
if (!response.ok || response.status >= 400) {
|
|
45
41
|
throw new Error(`Status: ${response.status}\n URL: ${this.url}\n StatusText ${response.statusText}`);
|
|
46
42
|
} else {
|
|
@@ -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: "27.
|
|
7
|
+
packageVersion: "27.3.0"
|
|
8
8
|
};
|
|
9
9
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -87,6 +87,7 @@ const renderImageIcon = (url, testId) => {
|
|
|
87
87
|
* @see Provider
|
|
88
88
|
*/
|
|
89
89
|
const Badge = ({
|
|
90
|
+
hideIcon = false,
|
|
90
91
|
icon,
|
|
91
92
|
label,
|
|
92
93
|
name,
|
|
@@ -105,7 +106,7 @@ const Badge = ({
|
|
|
105
106
|
"data-smart-element": name,
|
|
106
107
|
"data-smart-element-badge": true,
|
|
107
108
|
"data-testid": testId
|
|
108
|
-
}, jsx("span", {
|
|
109
|
+
}, !hideIcon && jsx("span", {
|
|
109
110
|
css: iconStyles
|
|
110
111
|
}, badgeIcon), jsx("span", {
|
|
111
112
|
css: labelStyles,
|
|
@@ -7,7 +7,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
|
|
|
7
7
|
import LinkWarningModal from './LinkWarningModal';
|
|
8
8
|
const PACKAGE_DATA = {
|
|
9
9
|
packageName: "@atlaskit/smart-card",
|
|
10
|
-
packageVersion: "27.
|
|
10
|
+
packageVersion: "27.3.0",
|
|
11
11
|
componentName: 'linkUrl'
|
|
12
12
|
};
|
|
13
13
|
const Link = withLinkClickedEvent('a');
|
|
@@ -5,9 +5,9 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
5
5
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
6
6
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
7
7
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
8
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
9
8
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10
9
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
11
11
|
function _asyncIterator(r) { var n, t, o, e = 2; for ("undefined" != typeof Symbol && (t = Symbol.asyncIterator, o = Symbol.iterator); e--;) { if (t && null != (n = r[t])) return n.call(r); if (o && null != (n = r[o])) return new AsyncFromSyncIterator(n.call(r)); t = "@@asyncIterator", o = "@@iterator"; } throw new TypeError("Object is not async iterable"); }
|
|
12
12
|
function AsyncFromSyncIterator(r) { function AsyncFromSyncIteratorContinuation(r) { if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); var n = r.done; return Promise.resolve(r.value).then(function (r) { return { value: r, done: n }; }); } return AsyncFromSyncIterator = function AsyncFromSyncIterator(r) { this.s = r, this.n = r.next; }, AsyncFromSyncIterator.prototype = { s: null, n: null, next: function next() { return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); }, return: function _return(r) { var n = this.s.return; return void 0 === n ? Promise.resolve({ value: r, done: !0 }) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); }, throw: function _throw(r) { var n = this.s.return; return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); } }, new AsyncFromSyncIterator(r); }
|
|
13
13
|
import uuid from 'uuid';
|
|
@@ -15,7 +15,6 @@ import { errorMessages } from './types';
|
|
|
15
15
|
import { addPath, getXProductHeaderValue } from './utils';
|
|
16
16
|
import { readStream } from './readStream';
|
|
17
17
|
import { getBaseUrl } from '@atlaskit/linking-common';
|
|
18
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
19
18
|
export var AISummaryService = /*#__PURE__*/function () {
|
|
20
19
|
function AISummaryService(props) {
|
|
21
20
|
var _this = this,
|
|
@@ -35,7 +34,7 @@ export var AISummaryService = /*#__PURE__*/function () {
|
|
|
35
34
|
return addPath('/gateway/api/', path);
|
|
36
35
|
});
|
|
37
36
|
_defineProperty(this, "fetchStream", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
38
|
-
var payload, options,
|
|
37
|
+
var payload, options, response;
|
|
39
38
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
40
39
|
while (1) switch (_context.prev = _context.next) {
|
|
41
40
|
case 0:
|
|
@@ -48,26 +47,24 @@ export var AISummaryService = /*#__PURE__*/function () {
|
|
|
48
47
|
summary_output_mimetype: 'text/markdown'
|
|
49
48
|
}
|
|
50
49
|
};
|
|
51
|
-
options =
|
|
50
|
+
options = {
|
|
52
51
|
method: 'POST',
|
|
53
52
|
headers: _this.config.headers,
|
|
54
|
-
body: JSON.stringify(payload)
|
|
55
|
-
}, getBooleanFF('platform.linking-platform.smart-card.ai-summary-service-base-url') && {
|
|
53
|
+
body: JSON.stringify(payload),
|
|
56
54
|
credentials: 'include'
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
case 5:
|
|
55
|
+
};
|
|
56
|
+
_context.next = 4;
|
|
57
|
+
return fetch(_this.config.requestUrl, options);
|
|
58
|
+
case 4:
|
|
62
59
|
response = _context.sent;
|
|
63
60
|
if (!(!response.ok || response.status >= 400)) {
|
|
64
|
-
_context.next =
|
|
61
|
+
_context.next = 9;
|
|
65
62
|
break;
|
|
66
63
|
}
|
|
67
64
|
throw new Error("Status: ".concat(response.status, "\n URL: ").concat(_this.url, "\n StatusText ").concat(response.statusText));
|
|
68
|
-
case
|
|
65
|
+
case 9:
|
|
69
66
|
return _context.abrupt("return", readStream(response));
|
|
70
|
-
case
|
|
67
|
+
case 10:
|
|
71
68
|
case "end":
|
|
72
69
|
return _context.stop();
|
|
73
70
|
}
|
|
@@ -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: "27.
|
|
18
|
+
packageVersion: "27.3.0"
|
|
19
19
|
};
|
|
20
20
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
21
21
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -67,7 +67,9 @@ var renderImageIcon = function renderImageIcon(url, testId) {
|
|
|
67
67
|
* @see Provider
|
|
68
68
|
*/
|
|
69
69
|
var Badge = function Badge(_ref) {
|
|
70
|
-
var
|
|
70
|
+
var _ref$hideIcon = _ref.hideIcon,
|
|
71
|
+
hideIcon = _ref$hideIcon === void 0 ? false : _ref$hideIcon,
|
|
72
|
+
icon = _ref.icon,
|
|
71
73
|
label = _ref.label,
|
|
72
74
|
name = _ref.name,
|
|
73
75
|
overrideCss = _ref.overrideCss,
|
|
@@ -85,7 +87,7 @@ var Badge = function Badge(_ref) {
|
|
|
85
87
|
"data-smart-element": name,
|
|
86
88
|
"data-smart-element-badge": true,
|
|
87
89
|
"data-testid": testId
|
|
88
|
-
}, jsx("span", {
|
|
90
|
+
}, !hideIcon && jsx("span", {
|
|
89
91
|
css: iconStyles
|
|
90
92
|
}, badgeIcon), jsx("span", {
|
|
91
93
|
css: labelStyles,
|
|
@@ -10,7 +10,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
|
|
|
10
10
|
import LinkWarningModal from './LinkWarningModal';
|
|
11
11
|
var PACKAGE_DATA = {
|
|
12
12
|
packageName: "@atlaskit/smart-card",
|
|
13
|
-
packageVersion: "27.
|
|
13
|
+
packageVersion: "27.3.0",
|
|
14
14
|
componentName: 'linkUrl'
|
|
15
15
|
};
|
|
16
16
|
var Link = withLinkClickedEvent('a');
|
|
@@ -357,11 +357,12 @@ export type ProgrammingLanguage = {
|
|
|
357
357
|
name: ElementName.ProgrammingLanguage;
|
|
358
358
|
};
|
|
359
359
|
/**
|
|
360
|
-
* Represents the props available for
|
|
360
|
+
* Represents the props available for a Provider element.
|
|
361
361
|
* @see Provider
|
|
362
362
|
*/
|
|
363
363
|
export type Provider = {
|
|
364
364
|
name: ElementName.Provider;
|
|
365
|
+
hideIcon?: boolean;
|
|
365
366
|
};
|
|
366
367
|
/**
|
|
367
368
|
* Represents the props available for an ReactCount element.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import React from 'react';
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
3
2
|
import { type BadgeProps } from './types';
|
|
4
3
|
/**
|
|
5
4
|
* A base element that displays some text with an associated icon.
|
|
@@ -14,5 +13,5 @@ import { type BadgeProps } from './types';
|
|
|
14
13
|
* @see ProgrammingLanguage
|
|
15
14
|
* @see Provider
|
|
16
15
|
*/
|
|
17
|
-
declare const Badge:
|
|
16
|
+
declare const Badge: ({ hideIcon, icon, label, name, overrideCss, testId, url, }: BadgeProps) => jsx.JSX.Element | null;
|
|
18
17
|
export default Badge;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { type ElementProps } from '../types';
|
|
2
2
|
import { type IconType } from '../../../../../constants';
|
|
3
3
|
export type BadgeProps = ElementProps & {
|
|
4
|
+
/**
|
|
5
|
+
* Determines whether the badge icon should be hidden. When set to true,
|
|
6
|
+
* the badge will be displayed without the icon, showing only the label text.
|
|
7
|
+
*/
|
|
8
|
+
hideIcon?: boolean;
|
|
4
9
|
/**
|
|
5
10
|
* The Atlaskit Icon to display next to the label. If this is not supplied,
|
|
6
11
|
* then the badge icon will fallback to the URL provided.
|
|
@@ -11,7 +16,7 @@ export type BadgeProps = ElementProps & {
|
|
|
11
16
|
*/
|
|
12
17
|
url?: string;
|
|
13
18
|
/**
|
|
14
|
-
* The text to display for the badge
|
|
19
|
+
* The text to display for the badge.
|
|
15
20
|
*/
|
|
16
21
|
label?: string;
|
|
17
22
|
};
|
|
@@ -357,11 +357,12 @@ export type ProgrammingLanguage = {
|
|
|
357
357
|
name: ElementName.ProgrammingLanguage;
|
|
358
358
|
};
|
|
359
359
|
/**
|
|
360
|
-
* Represents the props available for
|
|
360
|
+
* Represents the props available for a Provider element.
|
|
361
361
|
* @see Provider
|
|
362
362
|
*/
|
|
363
363
|
export type Provider = {
|
|
364
364
|
name: ElementName.Provider;
|
|
365
|
+
hideIcon?: boolean;
|
|
365
366
|
};
|
|
366
367
|
/**
|
|
367
368
|
* Represents the props available for an ReactCount element.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import React from 'react';
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
3
2
|
import { type BadgeProps } from './types';
|
|
4
3
|
/**
|
|
5
4
|
* A base element that displays some text with an associated icon.
|
|
@@ -14,5 +13,5 @@ import { type BadgeProps } from './types';
|
|
|
14
13
|
* @see ProgrammingLanguage
|
|
15
14
|
* @see Provider
|
|
16
15
|
*/
|
|
17
|
-
declare const Badge:
|
|
16
|
+
declare const Badge: ({ hideIcon, icon, label, name, overrideCss, testId, url, }: BadgeProps) => jsx.JSX.Element | null;
|
|
18
17
|
export default Badge;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { type ElementProps } from '../types';
|
|
2
2
|
import { type IconType } from '../../../../../constants';
|
|
3
3
|
export type BadgeProps = ElementProps & {
|
|
4
|
+
/**
|
|
5
|
+
* Determines whether the badge icon should be hidden. When set to true,
|
|
6
|
+
* the badge will be displayed without the icon, showing only the label text.
|
|
7
|
+
*/
|
|
8
|
+
hideIcon?: boolean;
|
|
4
9
|
/**
|
|
5
10
|
* The Atlaskit Icon to display next to the label. If this is not supplied,
|
|
6
11
|
* then the badge icon will fallback to the URL provided.
|
|
@@ -11,7 +16,7 @@ export type BadgeProps = ElementProps & {
|
|
|
11
16
|
*/
|
|
12
17
|
url?: string;
|
|
13
18
|
/**
|
|
14
|
-
* The text to display for the badge
|
|
19
|
+
* The text to display for the badge.
|
|
15
20
|
*/
|
|
16
21
|
label?: string;
|
|
17
22
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "27.
|
|
3
|
+
"version": "27.3.0",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -164,9 +164,6 @@
|
|
|
164
164
|
"platform.linking-platform.smart-card.hover-card-ai-summaries-release-stable": {
|
|
165
165
|
"type": "boolean"
|
|
166
166
|
},
|
|
167
|
-
"platform.linking-platform.smart-card.ai-summary-service-base-url": {
|
|
168
|
-
"type": "boolean"
|
|
169
|
-
},
|
|
170
167
|
"platform.linking-platform.smart-card.enable-embed-card-header-tooltip_g9saw": {
|
|
171
168
|
"type": "boolean"
|
|
172
169
|
},
|