@atlaskit/editor-card-provider 3.1.16 → 3.1.17
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
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/editor-card-provider
|
|
2
2
|
|
|
3
|
+
## 3.1.17
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#72315](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/72315) [`818ff8704f34`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/818ff8704f34) - Updated default smart card view for Confluence Databases to include default for savedViewId
|
|
8
|
+
- [#71047](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/71047) [`931a7edba41e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/931a7edba41e) - update window.location usage to be compatible with SSR
|
|
9
|
+
|
|
3
10
|
## 3.1.16
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
package/dist/cjs/environments.js
CHANGED
|
@@ -26,7 +26,7 @@ var getBaseUrl = exports.getBaseUrl = function getBaseUrl(envKey) {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
// Otherwise, use the current origin of the page.
|
|
29
|
-
return window.location.origin;
|
|
29
|
+
return typeof window.location !== 'undefined' ? window.location.origin : '';
|
|
30
30
|
};
|
|
31
31
|
var getResolverUrl = exports.getResolverUrl = function getResolverUrl(envKey, baseUrlOverride) {
|
|
32
32
|
// If an environment is provided, then use Stargate directly for requests.
|
package/dist/cjs/provider.js
CHANGED
|
@@ -53,7 +53,7 @@ var isConfluenceWhiteboard = function isConfluenceWhiteboard(url) {
|
|
|
53
53
|
}));
|
|
54
54
|
};
|
|
55
55
|
var isConfluenceDatabase = function isConfluenceDatabase(url) {
|
|
56
|
-
return url.match(/\/wiki\/spaces\/~?[\d\w]+\/database\/\d+(\?.*(savedViewId=([0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}|all-entries)|entryId=[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}|unsavedView=[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}).*)?$/);
|
|
56
|
+
return url.match(/\/wiki\/spaces\/~?[\d\w]+\/database\/\d+(\?.*(savedViewId=([0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}|all-entries|default)|entryId=[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}|unsavedView=[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}).*)?$/);
|
|
57
57
|
};
|
|
58
58
|
var isYoutubeVideo = function isYoutubeVideo(url) {
|
|
59
59
|
return url.match(/^https:\/\/(.*?\.)?(youtube\..*?\/(watch\?|v\/|shorts\/)|youtu\.be)/);
|
|
@@ -20,7 +20,7 @@ export const getBaseUrl = envKey => {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
// Otherwise, use the current origin of the page.
|
|
23
|
-
return window.location.origin;
|
|
23
|
+
return typeof window.location !== 'undefined' ? window.location.origin : '';
|
|
24
24
|
};
|
|
25
25
|
export const getResolverUrl = (envKey, baseUrlOverride) => {
|
|
26
26
|
// If an environment is provided, then use Stargate directly for requests.
|
package/dist/es2019/provider.js
CHANGED
|
@@ -19,7 +19,7 @@ const isJwmView = url => url.match(/^https:\/\/.*?\/jira\/core\/projects\/[^\/]+
|
|
|
19
19
|
const isGiphyMedia = url => url.match(/^https:\/\/(.*?\.)?giphy\.com\/(gifs|media|clips)\//);
|
|
20
20
|
const isProformaView = url => url.match(/^https:\/\/[^/]+\/jira\/(core|software(\/c)?|servicedesk)\/projects\/\w+\/forms\/form\/direct\/\d+\/\d+.*$/);
|
|
21
21
|
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})(\?\/)?/);
|
|
22
|
-
const isConfluenceDatabase = url => url.match(/\/wiki\/spaces\/~?[\d\w]+\/database\/\d+(\?.*(savedViewId=([0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}|all-entries)|entryId=[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}|unsavedView=[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}).*)?$/);
|
|
22
|
+
const isConfluenceDatabase = url => url.match(/\/wiki\/spaces\/~?[\d\w]+\/database\/\d+(\?.*(savedViewId=([0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}|all-entries|default)|entryId=[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}|unsavedView=[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}).*)?$/);
|
|
23
23
|
const isYoutubeVideo = url => url.match(/^https:\/\/(.*?\.)?(youtube\..*?\/(watch\?|v\/|shorts\/)|youtu\.be)/);
|
|
24
24
|
export class EditorCardProvider {
|
|
25
25
|
constructor(envKey, baseUrlOverride) {
|
package/dist/esm/environments.js
CHANGED
|
@@ -20,7 +20,7 @@ export var getBaseUrl = function getBaseUrl(envKey) {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
// Otherwise, use the current origin of the page.
|
|
23
|
-
return window.location.origin;
|
|
23
|
+
return typeof window.location !== 'undefined' ? window.location.origin : '';
|
|
24
24
|
};
|
|
25
25
|
export var getResolverUrl = function getResolverUrl(envKey, baseUrlOverride) {
|
|
26
26
|
// If an environment is provided, then use Stargate directly for requests.
|
package/dist/esm/provider.js
CHANGED
|
@@ -45,7 +45,7 @@ var isConfluenceWhiteboard = function isConfluenceWhiteboard(url) {
|
|
|
45
45
|
}));
|
|
46
46
|
};
|
|
47
47
|
var isConfluenceDatabase = function isConfluenceDatabase(url) {
|
|
48
|
-
return url.match(/\/wiki\/spaces\/~?[\d\w]+\/database\/\d+(\?.*(savedViewId=([0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}|all-entries)|entryId=[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}|unsavedView=[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}).*)?$/);
|
|
48
|
+
return url.match(/\/wiki\/spaces\/~?[\d\w]+\/database\/\d+(\?.*(savedViewId=([0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}|all-entries|default)|entryId=[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}|unsavedView=[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}).*)?$/);
|
|
49
49
|
};
|
|
50
50
|
var isYoutubeVideo = function isYoutubeVideo(url) {
|
|
51
51
|
return url.match(/^https:\/\/(.*?\.)?(youtube\..*?\/(watch\?|v\/|shorts\/)|youtu\.be)/);
|
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.17",
|
|
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",
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
"setimmediate": "^1.0.5"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
|
-
"@atlaskit/link-provider": "^1.
|
|
47
|
+
"@atlaskit/link-provider": "^1.7.0",
|
|
48
48
|
"react": "^16.8.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
|
|
52
|
-
"@atlassian/feature-flags-test-utils": "^0.
|
|
52
|
+
"@atlassian/feature-flags-test-utils": "^0.2.0",
|
|
53
53
|
"typescript": "~4.9.5"
|
|
54
54
|
},
|
|
55
55
|
"platform-feature-flags": {
|