@atlaskit/editor-card-provider 3.1.15 → 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,18 @@
|
|
|
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
|
+
|
|
10
|
+
## 3.1.16
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [#68764](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68764) [`59b851a5d621`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/59b851a5d621) - [ux] Render Polaris (Jira Product Discovery) published view as an embed by default
|
|
15
|
+
|
|
3
16
|
## 3.1.15
|
|
4
17
|
|
|
5
18
|
### 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
|
@@ -34,7 +34,7 @@ var isJiraRoadmapOrTimeline = function isJiraRoadmapOrTimeline(url) {
|
|
|
34
34
|
return url.match(/^https:\/\/.*?\/jira\/software\/(c\/)?projects\/[^\/]+?\/boards\/.*?\/(timeline|roadmap)\/?/);
|
|
35
35
|
};
|
|
36
36
|
var isPolarisView = function isPolarisView(url) {
|
|
37
|
-
return url.match(/^https:\/\/.*?\/jira\/polaris\/projects\/[^\/]+?\/ideas\/view\/\d+$|^https:\/\/.*?\/secure\/JiraProductDiscoveryAnonymous\.jspa\?hash=\w+|^https:\/\/.*?\/jira\/polaris\/share\/\w
|
|
37
|
+
return 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-]+)?$/);
|
|
38
38
|
};
|
|
39
39
|
var isJwmView = function isJwmView(url) {
|
|
40
40
|
return url.match(/^https:\/\/.*?\/jira\/core\/projects\/[^\/]+?\/(timeline|calendar|list|board|summary|(form\/[^\/]+?))\/?/);
|
|
@@ -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
|
@@ -14,12 +14,12 @@ const BATCH_WAIT_TIME = 50;
|
|
|
14
14
|
// Check if it is matching a Jira Roadmaps or Jira Timeline url
|
|
15
15
|
// NOT to be confused with JSM timeline
|
|
16
16
|
const isJiraRoadmapOrTimeline = url => url.match(/^https:\/\/.*?\/jira\/software\/(c\/)?projects\/[^\/]+?\/boards\/.*?\/(timeline|roadmap)\/?/);
|
|
17
|
-
const isPolarisView = url => url.match(/^https:\/\/.*?\/jira\/polaris\/projects\/[^\/]+?\/ideas\/view\/\d+$|^https:\/\/.*?\/secure\/JiraProductDiscoveryAnonymous\.jspa\?hash=\w+|^https:\/\/.*?\/jira\/polaris\/share\/\w
|
|
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
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
|
@@ -26,7 +26,7 @@ var isJiraRoadmapOrTimeline = function isJiraRoadmapOrTimeline(url) {
|
|
|
26
26
|
return url.match(/^https:\/\/.*?\/jira\/software\/(c\/)?projects\/[^\/]+?\/boards\/.*?\/(timeline|roadmap)\/?/);
|
|
27
27
|
};
|
|
28
28
|
var isPolarisView = function isPolarisView(url) {
|
|
29
|
-
return url.match(/^https:\/\/.*?\/jira\/polaris\/projects\/[^\/]+?\/ideas\/view\/\d+$|^https:\/\/.*?\/secure\/JiraProductDiscoveryAnonymous\.jspa\?hash=\w+|^https:\/\/.*?\/jira\/polaris\/share\/\w
|
|
29
|
+
return 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-]+)?$/);
|
|
30
30
|
};
|
|
31
31
|
var isJwmView = function isJwmView(url) {
|
|
32
32
|
return url.match(/^https:\/\/.*?\/jira\/core\/projects\/[^\/]+?\/(timeline|calendar|list|board|summary|(form\/[^\/]+?))\/?/);
|
|
@@ -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": {
|