@atlaskit/editor-card-provider 3.1.17 → 3.2.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/provider.js +4 -1
- package/dist/es2019/provider.js +2 -1
- package/dist/esm/provider.js +4 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-card-provider
|
|
2
2
|
|
|
3
|
+
## 3.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#74458](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/74458) [`c40e977de5da`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c40e977de5da) - [ux] List view links will be converted into smart link embed by default
|
|
8
|
+
|
|
3
9
|
## 3.1.17
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/cjs/provider.js
CHANGED
|
@@ -39,6 +39,9 @@ var isPolarisView = function isPolarisView(url) {
|
|
|
39
39
|
var isJwmView = function isJwmView(url) {
|
|
40
40
|
return url.match(/^https:\/\/.*?\/jira\/core\/projects\/[^\/]+?\/(timeline|calendar|list|board|summary|(form\/[^\/]+?))\/?/);
|
|
41
41
|
};
|
|
42
|
+
var isJiraList = function isJiraList(url) {
|
|
43
|
+
return url.match(/^https:\/\/.*?\/jira\/software\/(c\/)?projects\/[^\/]+?\/boards\/.*?\/(list)\/?/);
|
|
44
|
+
};
|
|
42
45
|
var isGiphyMedia = function isGiphyMedia(url) {
|
|
43
46
|
return url.match(/^https:\/\/(.*?\.)?giphy\.com\/(gifs|media|clips)\//);
|
|
44
47
|
};
|
|
@@ -327,7 +330,7 @@ var EditorCardProvider = exports.EditorCardProvider = /*#__PURE__*/function () {
|
|
|
327
330
|
}, {
|
|
328
331
|
key: "getHardCodedAppearance",
|
|
329
332
|
value: function getHardCodedAppearance(url) {
|
|
330
|
-
if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url) || isConfluenceDatabase(url) || (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.embed-youtube-by-default') && isYoutubeVideo(url)) {
|
|
333
|
+
if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isJiraList(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url) || isConfluenceDatabase(url) || (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.embed-youtube-by-default') && isYoutubeVideo(url)) {
|
|
331
334
|
return 'embed';
|
|
332
335
|
}
|
|
333
336
|
}
|
package/dist/es2019/provider.js
CHANGED
|
@@ -16,6 +16,7 @@ const BATCH_WAIT_TIME = 50;
|
|
|
16
16
|
const isJiraRoadmapOrTimeline = url => url.match(/^https:\/\/.*?\/jira\/software\/(c\/)?projects\/[^\/]+?\/boards\/.*?\/(timeline|roadmap)\/?/);
|
|
17
17
|
const isPolarisView = url => url.match(/^https:\/\/.*?\/jira\/polaris\/projects\/[^\/]+?\/ideas\/view\/\d+$|^https:\/\/.*?\/secure\/JiraProductDiscoveryAnonymous\.jspa\?hash=\w+|^https:\/\/.*?\/jira\/polaris\/share\/\w+|^https:\/\/.*?\/jira\/discovery\/share\/views\/[\w-]+(\?selectedIssue=[\w-]+&issueViewLayout=sidebar&issueViewSection=[\w-]+)?$/);
|
|
18
18
|
const isJwmView = url => url.match(/^https:\/\/.*?\/jira\/core\/projects\/[^\/]+?\/(timeline|calendar|list|board|summary|(form\/[^\/]+?))\/?/);
|
|
19
|
+
const isJiraList = url => url.match(/^https:\/\/.*?\/jira\/software\/(c\/)?projects\/[^\/]+?\/boards\/.*?\/(list)\/?/);
|
|
19
20
|
const isGiphyMedia = url => url.match(/^https:\/\/(.*?\.)?giphy\.com\/(gifs|media|clips)\//);
|
|
20
21
|
const isProformaView = url => url.match(/^https:\/\/[^/]+\/jira\/(core|software(\/c)?|servicedesk)\/projects\/\w+\/forms\/form\/direct\/\d+\/\d+.*$/);
|
|
21
22
|
const isConfluenceWhiteboard = url => url.match(/\/wiki\/spaces\/?.*\/whiteboard\/(?<resourceId>\d+)(\?\/)?/) || url.match(/\/wiki\/spaces\/?.*\/whiteboard\/(?<resourceId>[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12})(\?\/)?/);
|
|
@@ -112,7 +113,7 @@ export class EditorCardProvider {
|
|
|
112
113
|
return (_this$providersData2 = this.providersData) === null || _this$providersData2 === void 0 ? void 0 : _this$providersData2.patterns.find(pattern => url.match(pattern.source));
|
|
113
114
|
}
|
|
114
115
|
getHardCodedAppearance(url) {
|
|
115
|
-
if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url) || isConfluenceDatabase(url) || getBooleanFF('platform.linking-platform.embed-youtube-by-default') && isYoutubeVideo(url)) {
|
|
116
|
+
if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isJiraList(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url) || isConfluenceDatabase(url) || getBooleanFF('platform.linking-platform.embed-youtube-by-default') && isYoutubeVideo(url)) {
|
|
116
117
|
return 'embed';
|
|
117
118
|
}
|
|
118
119
|
}
|
package/dist/esm/provider.js
CHANGED
|
@@ -31,6 +31,9 @@ var isPolarisView = function isPolarisView(url) {
|
|
|
31
31
|
var isJwmView = function isJwmView(url) {
|
|
32
32
|
return url.match(/^https:\/\/.*?\/jira\/core\/projects\/[^\/]+?\/(timeline|calendar|list|board|summary|(form\/[^\/]+?))\/?/);
|
|
33
33
|
};
|
|
34
|
+
var isJiraList = function isJiraList(url) {
|
|
35
|
+
return url.match(/^https:\/\/.*?\/jira\/software\/(c\/)?projects\/[^\/]+?\/boards\/.*?\/(list)\/?/);
|
|
36
|
+
};
|
|
34
37
|
var isGiphyMedia = function isGiphyMedia(url) {
|
|
35
38
|
return url.match(/^https:\/\/(.*?\.)?giphy\.com\/(gifs|media|clips)\//);
|
|
36
39
|
};
|
|
@@ -319,7 +322,7 @@ export var EditorCardProvider = /*#__PURE__*/function () {
|
|
|
319
322
|
}, {
|
|
320
323
|
key: "getHardCodedAppearance",
|
|
321
324
|
value: function getHardCodedAppearance(url) {
|
|
322
|
-
if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url) || isConfluenceDatabase(url) || getBooleanFF('platform.linking-platform.embed-youtube-by-default') && isYoutubeVideo(url)) {
|
|
325
|
+
if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isJiraList(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url) || isConfluenceDatabase(url) || getBooleanFF('platform.linking-platform.embed-youtube-by-default') && isYoutubeVideo(url)) {
|
|
323
326
|
return 'embed';
|
|
324
327
|
}
|
|
325
328
|
}
|
package/package.json
CHANGED