@atlaskit/editor-card-provider 4.1.0 → 4.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 +9 -0
- package/dist/cjs/provider.js +11 -1
- package/dist/es2019/provider.js +6 -1
- package/dist/esm/provider.js +11 -1
- package/package.json +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-card-provider
|
|
2
2
|
|
|
3
|
+
## 4.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#128967](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/128967)
|
|
8
|
+
[`bfcf1112d0f99`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bfcf1112d0f99) -
|
|
9
|
+
Set Confluence Team Calendars link to embed view by default and it is behind
|
|
10
|
+
tc_smart_link_embed_view FG
|
|
11
|
+
|
|
3
12
|
## 4.1.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
package/dist/cjs/provider.js
CHANGED
|
@@ -95,6 +95,12 @@ var isRovoAgentProfilePage = function isRovoAgentProfilePage(url) {
|
|
|
95
95
|
var isCustomer360LandingPage = function isCustomer360LandingPage(url) {
|
|
96
96
|
return url.match(/^https:\/\/customer\.atlassian\.com\/.*$/);
|
|
97
97
|
};
|
|
98
|
+
var isConfluenceTeamCalendars = function isConfluenceTeamCalendars(url) {
|
|
99
|
+
return url.match( /*#__PURE__*/_wrapRegExp(/\/wiki\/spaces\/([^\/]+)\/calendars\/([a-zA-Z0-9-]+)/, {
|
|
100
|
+
resourceContext: 1,
|
|
101
|
+
resourceId: 2
|
|
102
|
+
}));
|
|
103
|
+
};
|
|
98
104
|
var EditorCardProvider = exports.EditorCardProvider = /*#__PURE__*/function () {
|
|
99
105
|
function EditorCardProvider(envKey, baseUrlOverride, product) {
|
|
100
106
|
var _this = this;
|
|
@@ -396,7 +402,11 @@ var EditorCardProvider = exports.EditorCardProvider = /*#__PURE__*/function () {
|
|
|
396
402
|
if (this.getExperimentValue('jsw-summary-page-embed-smart-link-experiment', 'isEnabled', false)) {
|
|
397
403
|
isJiraSummaryEvaluated = isJiraSummary(url);
|
|
398
404
|
}
|
|
399
|
-
|
|
405
|
+
var isConfluenceTeamCalendarsEvaluated;
|
|
406
|
+
if ((0, _platformFeatureFlags.fg)('tc_smart_link_embed_view')) {
|
|
407
|
+
isConfluenceTeamCalendarsEvaluated = isConfluenceTeamCalendars(url);
|
|
408
|
+
}
|
|
409
|
+
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) || isRovoAgentProfilePage(url) || isJiraVersion(url) || isJiraPlanEvaluated || isJiraFormEvaluated || isJiraSummaryEvaluated || isCustomer360LandingPage(url) || isConfluenceTeamCalendarsEvaluated) {
|
|
400
410
|
return 'embed';
|
|
401
411
|
}
|
|
402
412
|
}
|
package/dist/es2019/provider.js
CHANGED
|
@@ -49,6 +49,7 @@ const isRovoAgentProfilePage = url => {
|
|
|
49
49
|
return url.match(/^https:\/\/.*?\/people\/agent\/.+$/);
|
|
50
50
|
};
|
|
51
51
|
const isCustomer360LandingPage = url => url.match(/^https:\/\/customer\.atlassian\.com\/.*$/);
|
|
52
|
+
const isConfluenceTeamCalendars = url => url.match(/\/wiki\/spaces\/(?<resourceContext>[^\/]+)\/calendars\/(?<resourceId>[a-zA-Z0-9-]+)/);
|
|
52
53
|
export class EditorCardProvider {
|
|
53
54
|
constructor(envKey, baseUrlOverride, product) {
|
|
54
55
|
_defineProperty(this, "getExperimentValue", (experimentName, parameterName, defaultValue) => {
|
|
@@ -173,7 +174,11 @@ export class EditorCardProvider {
|
|
|
173
174
|
if (this.getExperimentValue('jsw-summary-page-embed-smart-link-experiment', 'isEnabled', false)) {
|
|
174
175
|
isJiraSummaryEvaluated = isJiraSummary(url);
|
|
175
176
|
}
|
|
176
|
-
|
|
177
|
+
let isConfluenceTeamCalendarsEvaluated;
|
|
178
|
+
if (fg('tc_smart_link_embed_view')) {
|
|
179
|
+
isConfluenceTeamCalendarsEvaluated = isConfluenceTeamCalendars(url);
|
|
180
|
+
}
|
|
181
|
+
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) || isRovoAgentProfilePage(url) || isJiraVersion(url) || isJiraPlanEvaluated || isJiraFormEvaluated || isJiraSummaryEvaluated || isCustomer360LandingPage(url) || isConfluenceTeamCalendarsEvaluated) {
|
|
177
182
|
return 'embed';
|
|
178
183
|
}
|
|
179
184
|
}
|
package/dist/esm/provider.js
CHANGED
|
@@ -87,6 +87,12 @@ var isRovoAgentProfilePage = function isRovoAgentProfilePage(url) {
|
|
|
87
87
|
var isCustomer360LandingPage = function isCustomer360LandingPage(url) {
|
|
88
88
|
return url.match(/^https:\/\/customer\.atlassian\.com\/.*$/);
|
|
89
89
|
};
|
|
90
|
+
var isConfluenceTeamCalendars = function isConfluenceTeamCalendars(url) {
|
|
91
|
+
return url.match( /*#__PURE__*/_wrapRegExp(/\/wiki\/spaces\/([^\/]+)\/calendars\/([a-zA-Z0-9-]+)/, {
|
|
92
|
+
resourceContext: 1,
|
|
93
|
+
resourceId: 2
|
|
94
|
+
}));
|
|
95
|
+
};
|
|
90
96
|
export var EditorCardProvider = /*#__PURE__*/function () {
|
|
91
97
|
function EditorCardProvider(envKey, baseUrlOverride, product) {
|
|
92
98
|
var _this = this;
|
|
@@ -388,7 +394,11 @@ export var EditorCardProvider = /*#__PURE__*/function () {
|
|
|
388
394
|
if (this.getExperimentValue('jsw-summary-page-embed-smart-link-experiment', 'isEnabled', false)) {
|
|
389
395
|
isJiraSummaryEvaluated = isJiraSummary(url);
|
|
390
396
|
}
|
|
391
|
-
|
|
397
|
+
var isConfluenceTeamCalendarsEvaluated;
|
|
398
|
+
if (fg('tc_smart_link_embed_view')) {
|
|
399
|
+
isConfluenceTeamCalendarsEvaluated = isConfluenceTeamCalendars(url);
|
|
400
|
+
}
|
|
401
|
+
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) || isRovoAgentProfilePage(url) || isJiraVersion(url) || isJiraPlanEvaluated || isJiraFormEvaluated || isJiraSummaryEvaluated || isCustomer360LandingPage(url) || isConfluenceTeamCalendarsEvaluated) {
|
|
392
402
|
return 'embed';
|
|
393
403
|
}
|
|
394
404
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-card-provider",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
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": "2.
|
|
36
|
+
"@atlaskit/eslint-plugin-platform": "^2.5.0",
|
|
37
37
|
"@atlaskit/feature-gate-js-client": "^4.26.0",
|
|
38
38
|
"@atlaskit/link-client-extension": "^4.0.0",
|
|
39
39
|
"@atlaskit/link-extractors": "^2.0.0",
|
|
@@ -56,6 +56,9 @@
|
|
|
56
56
|
},
|
|
57
57
|
"smartlink_jira_software_form": {
|
|
58
58
|
"type": "boolean"
|
|
59
|
+
},
|
|
60
|
+
"tc_smart_link_embed_view": {
|
|
61
|
+
"type": "boolean"
|
|
59
62
|
}
|
|
60
63
|
}
|
|
61
64
|
}
|