@atlaskit/editor-card-provider 7.1.31 → 7.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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/editor-card-provider
2
2
 
3
+ ## 7.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`0fb498dde1977`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0fb498dde1977) -
8
+ Add support for defaulting Loom playlist Smart Links to the embed appearance behind the
9
+ `loom-playlist-smartlink-embed-default` feature gate.
10
+
11
+ ## 7.1.32
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 7.1.31
4
18
 
5
19
  ### Patch Changes
@@ -59,6 +59,8 @@ var YOUTUBE_VIDEO_REGEX = /^https:\/\/(.*?\.)?(youtube\..*?\/(watch\?|v\/|shorts
59
59
  var LOOM_VIDEO_URL_REGEX = /*#__PURE__*/_wrapRegExp(/^https:\/\/(.*?\.)?(loom\..*?\/(share|embed))\/([a-zA-Z0-9-]*-)?([a-f0-9]{32})/, {
60
60
  videoId: 5
61
61
  });
62
+ // prettier-ignore
63
+ var LOOM_PLAYLIST_URL_REGEX = /^https:\/\/(.*?\.)?loom\..*?\/(?:playlists\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}(?:\/view)?|embed\/playlists\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:\?|$)/i;
62
64
  var LOOM_SCREENSHOT_URL_REGEX = /*#__PURE__*/_wrapRegExp(/^https:\/\/(.*?\.)?loom\..*?\/i\/([a-f0-9]{32})/, {
63
65
  id: 2
64
66
  });
@@ -122,6 +124,9 @@ var isYoutubeVideo = function isYoutubeVideo(url) {
122
124
  var isLoomVideoUrl = function isLoomVideoUrl(url) {
123
125
  return url.match(LOOM_VIDEO_URL_REGEX);
124
126
  };
127
+ var isLoomPlaylistUrl = function isLoomPlaylistUrl(url) {
128
+ return url.match(LOOM_PLAYLIST_URL_REGEX);
129
+ };
125
130
  var isLoomScreenshotUrl = function isLoomScreenshotUrl(url) {
126
131
  return url.match(LOOM_SCREENSHOT_URL_REGEX);
127
132
  };
@@ -639,7 +644,7 @@ var EditorCardProvider = exports.EditorCardProvider = /*#__PURE__*/function (_No
639
644
  if ((0, _fg.fg)('tc_smart_link_embed_view')) {
640
645
  isConfluenceTeamCalendarsEvaluated = isConfluenceTeamCalendars(url);
641
646
  }
642
- if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isJiraList(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url) || isConfluenceDatabase(url) || (0, _urlCheckers.isConfluenceSlideUrl)(url) || isYoutubeVideo(url) || isLoomVideoUrl(url) || isLoomScreenshotUrl(url) && (0, _fg.fg)('loom-support-screenshot-sl-resolution') || isJiraDashboard(url) || isJiraBacklog(url) || isJiraBoard(url) || isRovoAgentProfilePage(url) || isJiraVersion(url) || isJiraPlanEvaluated || isJiraFormEvaluated || isJiraSummaryEvaluated || isCustomer360LandingPage(url) || isConfluenceTeamCalendarsEvaluated || isJiraIssueNavigator(url) || isAvpVisualizationView(url) && (0, _fg.fg)('avp_unfurl_shared_charts_embed_by_default_2')) {
647
+ if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isJiraList(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url) || isConfluenceDatabase(url) || (0, _urlCheckers.isConfluenceSlideUrl)(url) || isYoutubeVideo(url) || isLoomVideoUrl(url) || isLoomPlaylistUrl(url) && (0, _fg.fg)('loom-playlist-smartlink-embed-default') || isLoomScreenshotUrl(url) && (0, _fg.fg)('loom-support-screenshot-sl-resolution') || isJiraDashboard(url) || isJiraBacklog(url) || isJiraBoard(url) || isRovoAgentProfilePage(url) || isJiraVersion(url) || isJiraPlanEvaluated || isJiraFormEvaluated || isJiraSummaryEvaluated || isCustomer360LandingPage(url) || isConfluenceTeamCalendarsEvaluated || isJiraIssueNavigator(url) || isAvpVisualizationView(url) && (0, _fg.fg)('avp_unfurl_shared_charts_embed_by_default_2')) {
643
648
  return 'embed';
644
649
  }
645
650
  }
@@ -30,6 +30,8 @@ const CONFLUENCE_DATABASE_REGEX = /\/wiki\/spaces\/~?[\d\w]+\/database\/\d+(\?.*
30
30
  const YOUTUBE_VIDEO_REGEX = /^https:\/\/(.*?\.)?(youtube\..*?\/(watch\?|v\/|shorts\/)|youtu\.be)/;
31
31
  // prettier-ignore
32
32
  const LOOM_VIDEO_URL_REGEX = /^https:\/\/(.*?\.)?(loom\..*?\/(share|embed))\/([a-zA-Z0-9-]*-)?(?<videoId>[a-f0-9]{32})/;
33
+ // prettier-ignore
34
+ const LOOM_PLAYLIST_URL_REGEX = /^https:\/\/(.*?\.)?loom\..*?\/(?:playlists\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}(?:\/view)?|embed\/playlists\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:\?|$)/i;
33
35
  const LOOM_SCREENSHOT_URL_REGEX = /^https:\/\/(.*?\.)?loom\..*?\/i\/(?<id>[a-f0-9]{32})/;
34
36
  const JIRA_DASHBOARD_REGEX = /^https:\/\/.*?\/jira\/dashboards\/[0-9]+.*/;
35
37
  const JIRA_BACKLOG_REGEX = /https:\/\/.*?\/jira\/software\/(c\/)?projects\/[^\/]+?\/boards\/\d\/backlog\??.*/;
@@ -63,6 +65,9 @@ const isYoutubeVideo = url => url.match(YOUTUBE_VIDEO_REGEX);
63
65
  const isLoomVideoUrl = url => {
64
66
  return url.match(LOOM_VIDEO_URL_REGEX);
65
67
  };
68
+ const isLoomPlaylistUrl = url => {
69
+ return url.match(LOOM_PLAYLIST_URL_REGEX);
70
+ };
66
71
  const isLoomScreenshotUrl = url => {
67
72
  return url.match(LOOM_SCREENSHOT_URL_REGEX);
68
73
  };
@@ -345,7 +350,7 @@ export class EditorCardProvider extends NodeDataProvider {
345
350
  if (fg('tc_smart_link_embed_view')) {
346
351
  isConfluenceTeamCalendarsEvaluated = isConfluenceTeamCalendars(url);
347
352
  }
348
- if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isJiraList(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url) || isConfluenceDatabase(url) || isConfluenceSlideUrl(url) || isYoutubeVideo(url) || isLoomVideoUrl(url) || isLoomScreenshotUrl(url) && fg('loom-support-screenshot-sl-resolution') || isJiraDashboard(url) || isJiraBacklog(url) || isJiraBoard(url) || isRovoAgentProfilePage(url) || isJiraVersion(url) || isJiraPlanEvaluated || isJiraFormEvaluated || isJiraSummaryEvaluated || isCustomer360LandingPage(url) || isConfluenceTeamCalendarsEvaluated || isJiraIssueNavigator(url) || isAvpVisualizationView(url) && fg('avp_unfurl_shared_charts_embed_by_default_2')) {
353
+ if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isJiraList(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url) || isConfluenceDatabase(url) || isConfluenceSlideUrl(url) || isYoutubeVideo(url) || isLoomVideoUrl(url) || isLoomPlaylistUrl(url) && fg('loom-playlist-smartlink-embed-default') || isLoomScreenshotUrl(url) && fg('loom-support-screenshot-sl-resolution') || isJiraDashboard(url) || isJiraBacklog(url) || isJiraBoard(url) || isRovoAgentProfilePage(url) || isJiraVersion(url) || isJiraPlanEvaluated || isJiraFormEvaluated || isJiraSummaryEvaluated || isCustomer360LandingPage(url) || isConfluenceTeamCalendarsEvaluated || isJiraIssueNavigator(url) || isAvpVisualizationView(url) && fg('avp_unfurl_shared_charts_embed_by_default_2')) {
349
354
  return 'embed';
350
355
  }
351
356
  }
@@ -51,6 +51,8 @@ var YOUTUBE_VIDEO_REGEX = /^https:\/\/(.*?\.)?(youtube\..*?\/(watch\?|v\/|shorts
51
51
  var LOOM_VIDEO_URL_REGEX = /*#__PURE__*/_wrapRegExp(/^https:\/\/(.*?\.)?(loom\..*?\/(share|embed))\/([a-zA-Z0-9-]*-)?([a-f0-9]{32})/, {
52
52
  videoId: 5
53
53
  });
54
+ // prettier-ignore
55
+ var LOOM_PLAYLIST_URL_REGEX = /^https:\/\/(.*?\.)?loom\..*?\/(?:playlists\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}(?:\/view)?|embed\/playlists\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:\?|$)/i;
54
56
  var LOOM_SCREENSHOT_URL_REGEX = /*#__PURE__*/_wrapRegExp(/^https:\/\/(.*?\.)?loom\..*?\/i\/([a-f0-9]{32})/, {
55
57
  id: 2
56
58
  });
@@ -114,6 +116,9 @@ var isYoutubeVideo = function isYoutubeVideo(url) {
114
116
  var isLoomVideoUrl = function isLoomVideoUrl(url) {
115
117
  return url.match(LOOM_VIDEO_URL_REGEX);
116
118
  };
119
+ var isLoomPlaylistUrl = function isLoomPlaylistUrl(url) {
120
+ return url.match(LOOM_PLAYLIST_URL_REGEX);
121
+ };
117
122
  var isLoomScreenshotUrl = function isLoomScreenshotUrl(url) {
118
123
  return url.match(LOOM_SCREENSHOT_URL_REGEX);
119
124
  };
@@ -631,7 +636,7 @@ export var EditorCardProvider = /*#__PURE__*/function (_NodeDataProvider) {
631
636
  if (fg('tc_smart_link_embed_view')) {
632
637
  isConfluenceTeamCalendarsEvaluated = isConfluenceTeamCalendars(url);
633
638
  }
634
- if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isJiraList(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url) || isConfluenceDatabase(url) || isConfluenceSlideUrl(url) || isYoutubeVideo(url) || isLoomVideoUrl(url) || isLoomScreenshotUrl(url) && fg('loom-support-screenshot-sl-resolution') || isJiraDashboard(url) || isJiraBacklog(url) || isJiraBoard(url) || isRovoAgentProfilePage(url) || isJiraVersion(url) || isJiraPlanEvaluated || isJiraFormEvaluated || isJiraSummaryEvaluated || isCustomer360LandingPage(url) || isConfluenceTeamCalendarsEvaluated || isJiraIssueNavigator(url) || isAvpVisualizationView(url) && fg('avp_unfurl_shared_charts_embed_by_default_2')) {
639
+ if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isJiraList(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url) || isConfluenceDatabase(url) || isConfluenceSlideUrl(url) || isYoutubeVideo(url) || isLoomVideoUrl(url) || isLoomPlaylistUrl(url) && fg('loom-playlist-smartlink-embed-default') || isLoomScreenshotUrl(url) && fg('loom-support-screenshot-sl-resolution') || isJiraDashboard(url) || isJiraBacklog(url) || isJiraBoard(url) || isRovoAgentProfilePage(url) || isJiraVersion(url) || isJiraPlanEvaluated || isJiraFormEvaluated || isJiraSummaryEvaluated || isCustomer360LandingPage(url) || isConfluenceTeamCalendarsEvaluated || isJiraIssueNavigator(url) || isAvpVisualizationView(url) && fg('avp_unfurl_shared_charts_embed_by_default_2')) {
635
640
  return 'embed';
636
641
  }
637
642
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-card-provider",
3
- "version": "7.1.31",
3
+ "version": "7.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",
@@ -32,7 +32,7 @@
32
32
  "@atlaskit/linking-types": "^15.1.0",
33
33
  "@atlaskit/node-data-provider": "^17.0.0",
34
34
  "@atlaskit/platform-feature-flags": "^2.1.0",
35
- "@atlaskit/tmp-editor-statsig": "^161.0.0",
35
+ "@atlaskit/tmp-editor-statsig": "^162.0.0",
36
36
  "@babel/runtime": "^7.0.0",
37
37
  "dataloader": "^2.1.0"
38
38
  },
@@ -60,6 +60,9 @@
60
60
  "loom-support-screenshot-sl-resolution": {
61
61
  "type": "boolean"
62
62
  },
63
+ "loom-playlist-smartlink-embed-default": {
64
+ "type": "boolean"
65
+ },
63
66
  "platform_native_embeds_enable_shortlink_resolution": {
64
67
  "type": "boolean"
65
68
  }