@atlaskit/editor-card-provider 3.9.0 → 3.10.1
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 +14 -0
- package/dist/cjs/provider.js +7 -1
- package/dist/es2019/provider.js +7 -1
- package/dist/esm/provider.js +7 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-card-provider
|
|
2
2
|
|
|
3
|
+
## 3.10.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 3.10.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#144036](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/144036)
|
|
14
|
+
[`0509cf0b76664`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0509cf0b76664) -
|
|
15
|
+
[ux] Update editor card provider to return embed card for backlog and board links
|
|
16
|
+
|
|
3
17
|
## 3.9.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
package/dist/cjs/provider.js
CHANGED
|
@@ -65,6 +65,12 @@ var isLoomUrl = function isLoomUrl(url) {
|
|
|
65
65
|
var isJiraDashboard = function isJiraDashboard(url) {
|
|
66
66
|
return url.match(/^https:\/\/.*?\/jira\/dashboards\/[0-9]+.*/);
|
|
67
67
|
};
|
|
68
|
+
var isJiraBacklog = function isJiraBacklog(url) {
|
|
69
|
+
return url.match(/https:\/\/.*?\/jira\/software\/(c\/)?projects\/[^\/]+?\/boards\/\d\/backlog\??.*/);
|
|
70
|
+
};
|
|
71
|
+
var isJiraBoard = function isJiraBoard(url) {
|
|
72
|
+
return url.match(/https:\/\/.*?\/jira\/software\/(c\/)?projects\/[^\/]+?\/boards\/\d\??.*/);
|
|
73
|
+
};
|
|
68
74
|
var EditorCardProvider = exports.EditorCardProvider = /*#__PURE__*/function () {
|
|
69
75
|
function EditorCardProvider(envKey, baseUrlOverride, product) {
|
|
70
76
|
var _this = this;
|
|
@@ -346,7 +352,7 @@ var EditorCardProvider = exports.EditorCardProvider = /*#__PURE__*/function () {
|
|
|
346
352
|
}, {
|
|
347
353
|
key: "getHardCodedAppearance",
|
|
348
354
|
value: function getHardCodedAppearance(url) {
|
|
349
|
-
if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isJiraList(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url) || isConfluenceDatabase(url) || isYoutubeVideo(url) || isLoomUrl(url) || isJiraDashboard(url)) {
|
|
355
|
+
if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isJiraList(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url) || isConfluenceDatabase(url) || isYoutubeVideo(url) || isLoomUrl(url) || isJiraDashboard(url) || isJiraBacklog(url) || isJiraBoard(url)) {
|
|
350
356
|
return 'embed';
|
|
351
357
|
}
|
|
352
358
|
}
|
package/dist/es2019/provider.js
CHANGED
|
@@ -24,6 +24,12 @@ const isLoomUrl = url => {
|
|
|
24
24
|
const isJiraDashboard = url => {
|
|
25
25
|
return url.match(/^https:\/\/.*?\/jira\/dashboards\/[0-9]+.*/);
|
|
26
26
|
};
|
|
27
|
+
const isJiraBacklog = url => {
|
|
28
|
+
return url.match(/https:\/\/.*?\/jira\/software\/(c\/)?projects\/[^\/]+?\/boards\/\d\/backlog\??.*/);
|
|
29
|
+
};
|
|
30
|
+
const isJiraBoard = url => {
|
|
31
|
+
return url.match(/https:\/\/.*?\/jira\/software\/(c\/)?projects\/[^\/]+?\/boards\/\d\??.*/);
|
|
32
|
+
};
|
|
27
33
|
export class EditorCardProvider {
|
|
28
34
|
constructor(envKey, baseUrlOverride, product) {
|
|
29
35
|
this.baseUrl = baseUrlOverride || getBaseUrl(envKey);
|
|
@@ -128,7 +134,7 @@ export class EditorCardProvider {
|
|
|
128
134
|
* @returns 'embed' for the card appearance to embed by default
|
|
129
135
|
*/
|
|
130
136
|
getHardCodedAppearance(url) {
|
|
131
|
-
if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isJiraList(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url) || isConfluenceDatabase(url) || isYoutubeVideo(url) || isLoomUrl(url) || isJiraDashboard(url)) {
|
|
137
|
+
if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isJiraList(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url) || isConfluenceDatabase(url) || isYoutubeVideo(url) || isLoomUrl(url) || isJiraDashboard(url) || isJiraBacklog(url) || isJiraBoard(url)) {
|
|
132
138
|
return 'embed';
|
|
133
139
|
}
|
|
134
140
|
}
|
package/dist/esm/provider.js
CHANGED
|
@@ -57,6 +57,12 @@ var isLoomUrl = function isLoomUrl(url) {
|
|
|
57
57
|
var isJiraDashboard = function isJiraDashboard(url) {
|
|
58
58
|
return url.match(/^https:\/\/.*?\/jira\/dashboards\/[0-9]+.*/);
|
|
59
59
|
};
|
|
60
|
+
var isJiraBacklog = function isJiraBacklog(url) {
|
|
61
|
+
return url.match(/https:\/\/.*?\/jira\/software\/(c\/)?projects\/[^\/]+?\/boards\/\d\/backlog\??.*/);
|
|
62
|
+
};
|
|
63
|
+
var isJiraBoard = function isJiraBoard(url) {
|
|
64
|
+
return url.match(/https:\/\/.*?\/jira\/software\/(c\/)?projects\/[^\/]+?\/boards\/\d\??.*/);
|
|
65
|
+
};
|
|
60
66
|
export var EditorCardProvider = /*#__PURE__*/function () {
|
|
61
67
|
function EditorCardProvider(envKey, baseUrlOverride, product) {
|
|
62
68
|
var _this = this;
|
|
@@ -338,7 +344,7 @@ export var EditorCardProvider = /*#__PURE__*/function () {
|
|
|
338
344
|
}, {
|
|
339
345
|
key: "getHardCodedAppearance",
|
|
340
346
|
value: function getHardCodedAppearance(url) {
|
|
341
|
-
if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isJiraList(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url) || isConfluenceDatabase(url) || isYoutubeVideo(url) || isLoomUrl(url) || isJiraDashboard(url)) {
|
|
347
|
+
if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isJiraList(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url) || isConfluenceDatabase(url) || isYoutubeVideo(url) || isLoomUrl(url) || isJiraDashboard(url) || isJiraBacklog(url) || isJiraBoard(url)) {
|
|
342
348
|
return 'embed';
|
|
343
349
|
}
|
|
344
350
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-card-provider",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.10.1",
|
|
4
4
|
"description": "Contains the EditorCardProvider, for determining smart card behaviour in the editor.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
".": "./src/index.ts"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@atlaskit/eslint-plugin-platform": "0.
|
|
36
|
+
"@atlaskit/eslint-plugin-platform": "0.8.0",
|
|
37
37
|
"@atlaskit/link-client-extension": "^2.4.0",
|
|
38
38
|
"@atlaskit/link-extractors": "^1.9.0",
|
|
39
39
|
"@atlaskit/linking-common": "^5.11.0",
|