@atlaskit/editor-card-provider 3.1.7 → 3.1.9
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 +12 -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 +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-card-provider
|
|
2
2
|
|
|
3
|
+
## 3.1.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#40406](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/40406) [`542d0dd0b1d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/542d0dd0b1d) - [ux] Changed default smart card view for Confluence Databases route from inline to embed.
|
|
8
|
+
|
|
9
|
+
## 3.1.8
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`1fedffbd64b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1fedffbd64b) - Update json-ld-types dependencies to be compatible with version
|
|
14
|
+
|
|
3
15
|
## 3.1.7
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/cjs/provider.js
CHANGED
|
@@ -51,6 +51,9 @@ var isConfluenceWhiteboard = function isConfluenceWhiteboard(url) {
|
|
|
51
51
|
resourceId: 1
|
|
52
52
|
}));
|
|
53
53
|
};
|
|
54
|
+
var isConfluenceDatabase = function isConfluenceDatabase(url) {
|
|
55
|
+
return url.match(/\/wiki\/spaces\/~?[\d\w]+\/database\/\d+$/);
|
|
56
|
+
};
|
|
54
57
|
var EditorCardProvider = /*#__PURE__*/function () {
|
|
55
58
|
function EditorCardProvider(envKey, baseUrlOverride) {
|
|
56
59
|
var _this = this;
|
|
@@ -320,7 +323,7 @@ var EditorCardProvider = /*#__PURE__*/function () {
|
|
|
320
323
|
}, {
|
|
321
324
|
key: "getHardCodedAppearance",
|
|
322
325
|
value: function getHardCodedAppearance(url) {
|
|
323
|
-
if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url)) {
|
|
326
|
+
if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url) || isConfluenceDatabase(url)) {
|
|
324
327
|
return 'embed';
|
|
325
328
|
}
|
|
326
329
|
}
|
package/dist/es2019/provider.js
CHANGED
|
@@ -18,6 +18,7 @@ const isJwmView = url => url.match(/^https:\/\/.*?\/jira\/core\/projects\/[^\/]+
|
|
|
18
18
|
const isGiphyMedia = url => url.match(/^https:\/\/(.*?\.)?giphy\.com\/(gifs|media|clips)\//);
|
|
19
19
|
const isProformaView = url => url.match(/^https:\/\/[^/]+\/jira\/(core|software(\/c)?|servicedesk)\/projects\/\w+\/forms\/form\/direct\/\d+\/\d+.*$/);
|
|
20
20
|
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})(\?\/)?/);
|
|
21
|
+
const isConfluenceDatabase = url => url.match(/\/wiki\/spaces\/~?[\d\w]+\/database\/\d+$/);
|
|
21
22
|
export class EditorCardProvider {
|
|
22
23
|
constructor(envKey, baseUrlOverride) {
|
|
23
24
|
this.baseUrl = baseUrlOverride || getBaseUrl(envKey);
|
|
@@ -109,7 +110,7 @@ export class EditorCardProvider {
|
|
|
109
110
|
return (_this$providersData2 = this.providersData) === null || _this$providersData2 === void 0 ? void 0 : _this$providersData2.patterns.find(pattern => url.match(pattern.source));
|
|
110
111
|
}
|
|
111
112
|
getHardCodedAppearance(url) {
|
|
112
|
-
if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url)) {
|
|
113
|
+
if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url) || isConfluenceDatabase(url)) {
|
|
113
114
|
return 'embed';
|
|
114
115
|
}
|
|
115
116
|
}
|
package/dist/esm/provider.js
CHANGED
|
@@ -43,6 +43,9 @@ var isConfluenceWhiteboard = function isConfluenceWhiteboard(url) {
|
|
|
43
43
|
resourceId: 1
|
|
44
44
|
}));
|
|
45
45
|
};
|
|
46
|
+
var isConfluenceDatabase = function isConfluenceDatabase(url) {
|
|
47
|
+
return url.match(/\/wiki\/spaces\/~?[\d\w]+\/database\/\d+$/);
|
|
48
|
+
};
|
|
46
49
|
export var EditorCardProvider = /*#__PURE__*/function () {
|
|
47
50
|
function EditorCardProvider(envKey, baseUrlOverride) {
|
|
48
51
|
var _this = this;
|
|
@@ -312,7 +315,7 @@ export var EditorCardProvider = /*#__PURE__*/function () {
|
|
|
312
315
|
}, {
|
|
313
316
|
key: "getHardCodedAppearance",
|
|
314
317
|
value: function getHardCodedAppearance(url) {
|
|
315
|
-
if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url)) {
|
|
318
|
+
if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url) || isConfluenceDatabase(url)) {
|
|
316
319
|
return 'embed';
|
|
317
320
|
}
|
|
318
321
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-card-provider",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.9",
|
|
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",
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@atlaskit/link-client-extension": "^1.7.0",
|
|
38
38
|
"@atlaskit/link-extractors": "^1.1.0",
|
|
39
|
-
"@atlaskit/linking-common": "^4.
|
|
39
|
+
"@atlaskit/linking-common": "^4.10.0",
|
|
40
40
|
"@babel/runtime": "^7.0.0",
|
|
41
41
|
"dataloader": "^2.0.0",
|
|
42
|
-
"json-ld-types": "3.9.1",
|
|
42
|
+
"json-ld-types": "^3.9.1",
|
|
43
43
|
"setimmediate": "^1.0.5"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|