@atlaskit/smart-card 38.20.1 → 38.20.2
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/extractors/flexible/extract-preview.js +2 -1
- package/dist/cjs/state/hooks/use-ai-summary/ai-summary-service/index.js +1 -1
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/extractors/flexible/extract-preview.js +2 -1
- package/dist/es2019/state/hooks/use-ai-summary/ai-summary-service/index.js +1 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/extractors/flexible/extract-preview.js +2 -1
- package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/index.js +1 -1
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 38.20.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#180778](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/180778)
|
|
8
|
+
[`9945b995de310`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9945b995de310) -
|
|
9
|
+
EDM-12645 updating convo ai endpoint
|
|
10
|
+
- [#180787](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/180787)
|
|
11
|
+
[`af0a44332ac36`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/af0a44332ac36) -
|
|
12
|
+
[ux] NO-ISSUE Fixing thumbnail image for entity types to show nothing if no thumbnail exists
|
|
13
|
+
|
|
3
14
|
## 38.20.1
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.extractSmartLinkPreviewImage = exports.default = void 0;
|
|
7
7
|
var _linkExtractors = require("@atlaskit/link-extractors");
|
|
8
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
8
9
|
var _constants = require("../../constants");
|
|
9
10
|
var extractPreview = function extractPreview(data) {
|
|
10
11
|
if (!data) {
|
|
@@ -28,7 +29,7 @@ var extractSmartLinkPreviewImage = exports.extractSmartLinkPreviewImage = functi
|
|
|
28
29
|
var _entity$thumbnail;
|
|
29
30
|
var entity = (0, _linkExtractors.extractEntity)(response);
|
|
30
31
|
var url = entity === null || entity === void 0 || (_entity$thumbnail = entity.thumbnail) === null || _entity$thumbnail === void 0 ? void 0 : _entity$thumbnail.externalUrl;
|
|
31
|
-
if (!url) {
|
|
32
|
+
if (!url && !(0, _platformFeatureFlags.fg)('smart_links_noun_support')) {
|
|
32
33
|
var provider = (0, _linkExtractors.extractEntityProvider)(response);
|
|
33
34
|
url = provider === null || provider === void 0 ? void 0 : provider.image;
|
|
34
35
|
}
|
|
@@ -23,7 +23,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
23
23
|
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) { (0, _defineProperty2.default)(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; }
|
|
24
24
|
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"); }
|
|
25
25
|
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); }
|
|
26
|
-
var CONVO_AI_ENDPOINT = 'ai/v2/ai-feature/smartlinksummary/stream';
|
|
26
|
+
var CONVO_AI_ENDPOINT = 'assist/api/ai/v2/ai-feature/smartlinksummary/stream';
|
|
27
27
|
var AISummaryService = exports.AISummaryService = /*#__PURE__*/function () {
|
|
28
28
|
function AISummaryService(props) {
|
|
29
29
|
var _this = this,
|
|
@@ -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.20.
|
|
14
|
+
packageVersion: "38.20.1"
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -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.20.
|
|
23
|
+
packageVersion: "38.20.1",
|
|
24
24
|
componentName: 'linkUrl'
|
|
25
25
|
};
|
|
26
26
|
var Anchor = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { extractEntity, extractEntityProvider, extractImage, isEntityPresent } from '@atlaskit/link-extractors';
|
|
2
|
+
import { fg } from "@atlaskit/platform-feature-flags";
|
|
2
3
|
import { MediaType } from '../../constants';
|
|
3
4
|
const extractPreview = data => {
|
|
4
5
|
if (!data) {
|
|
@@ -23,7 +24,7 @@ export const extractSmartLinkPreviewImage = response => {
|
|
|
23
24
|
var _entity$thumbnail;
|
|
24
25
|
const entity = extractEntity(response);
|
|
25
26
|
let url = entity === null || entity === void 0 ? void 0 : (_entity$thumbnail = entity.thumbnail) === null || _entity$thumbnail === void 0 ? void 0 : _entity$thumbnail.externalUrl;
|
|
26
|
-
if (!url) {
|
|
27
|
+
if (!url && !fg('smart_links_noun_support')) {
|
|
27
28
|
const provider = extractEntityProvider(response);
|
|
28
29
|
url = provider === null || provider === void 0 ? void 0 : provider.image;
|
|
29
30
|
}
|
|
@@ -5,7 +5,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
5
5
|
import { readStream } from './readStream';
|
|
6
6
|
import { ChunkProcessingError } from './types';
|
|
7
7
|
import { addPath, getXProductHeaderValue } from './utils';
|
|
8
|
-
const CONVO_AI_ENDPOINT = 'ai/v2/ai-feature/smartlinksummary/stream';
|
|
8
|
+
const CONVO_AI_ENDPOINT = 'assist/api/ai/v2/ai-feature/smartlinksummary/stream';
|
|
9
9
|
export class AISummaryService {
|
|
10
10
|
constructor(props) {
|
|
11
11
|
var _getXProductHeaderVal;
|
|
@@ -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.20.
|
|
5
|
+
packageVersion: "38.20.1"
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -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.20.
|
|
13
|
+
packageVersion: "38.20.1",
|
|
14
14
|
componentName: 'linkUrl'
|
|
15
15
|
};
|
|
16
16
|
const Anchor = withLinkClickedEvent('a');
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { extractEntity, extractEntityProvider, extractImage, isEntityPresent } from '@atlaskit/link-extractors';
|
|
2
|
+
import { fg } from "@atlaskit/platform-feature-flags";
|
|
2
3
|
import { MediaType } from '../../constants';
|
|
3
4
|
var extractPreview = function extractPreview(data) {
|
|
4
5
|
if (!data) {
|
|
@@ -23,7 +24,7 @@ export var extractSmartLinkPreviewImage = function extractSmartLinkPreviewImage(
|
|
|
23
24
|
var _entity$thumbnail;
|
|
24
25
|
var entity = extractEntity(response);
|
|
25
26
|
var url = entity === null || entity === void 0 || (_entity$thumbnail = entity.thumbnail) === null || _entity$thumbnail === void 0 ? void 0 : _entity$thumbnail.externalUrl;
|
|
26
|
-
if (!url) {
|
|
27
|
+
if (!url && !fg('smart_links_noun_support')) {
|
|
27
28
|
var provider = extractEntityProvider(response);
|
|
28
29
|
url = provider === null || provider === void 0 ? void 0 : provider.image;
|
|
29
30
|
}
|
|
@@ -16,7 +16,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
16
16
|
import { readStream } from './readStream';
|
|
17
17
|
import { ChunkProcessingError } from './types';
|
|
18
18
|
import { addPath, getXProductHeaderValue } from './utils';
|
|
19
|
-
var CONVO_AI_ENDPOINT = 'ai/v2/ai-feature/smartlinksummary/stream';
|
|
19
|
+
var CONVO_AI_ENDPOINT = 'assist/api/ai/v2/ai-feature/smartlinksummary/stream';
|
|
20
20
|
export var AISummaryService = /*#__PURE__*/function () {
|
|
21
21
|
function AISummaryService(props) {
|
|
22
22
|
var _this = this,
|
|
@@ -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.20.
|
|
7
|
+
packageVersion: "38.20.1"
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -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.20.
|
|
16
|
+
packageVersion: "38.20.1",
|
|
17
17
|
componentName: 'linkUrl'
|
|
18
18
|
};
|
|
19
19
|
var Anchor = withLinkClickedEvent('a');
|