@atlaskit/editor-card-provider 3.7.1 → 3.8.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,12 @@
1
1
  # @atlaskit/editor-card-provider
2
2
 
3
+ ## 3.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`4f0da3d4d6c4e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4f0da3d4d6c4e) -
8
+ EDM-10533 Cleanup platform.linking-platform.embed-youtube-by-default FF
9
+
3
10
  ## 3.7.1
4
11
 
5
12
  ### Patch Changes
@@ -19,7 +19,6 @@ var _linkExtractors = require("@atlaskit/link-extractors");
19
19
  var _transformer = require("./transformer");
20
20
  var _linkProvider = require("@atlaskit/link-provider");
21
21
  var api = _interopRequireWildcard(require("./api"));
22
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
23
22
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
24
23
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
25
24
  function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(e, r) { return new BabelRegExp(e, void 0, r); }; var e = RegExp.prototype, r = new WeakMap(); function BabelRegExp(e, t, p) { var o = new RegExp(e, t); return r.set(o, p || r.get(e)), (0, _setPrototypeOf2.default)(o, BabelRegExp.prototype); } function buildGroups(e, t) { var p = r.get(t); return Object.keys(p).reduce(function (r, t) { var o = p[t]; if ("number" == typeof o) r[t] = e[o];else { for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; r[t] = e[o[i]]; } return r; }, Object.create(null)); } return (0, _inherits2.default)(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { var t = e.exec.call(this, r); if (t) { t.groups = buildGroups(t, this); var p = t.indices; p && (p.groups = buildGroups(p, this)); } return t; }, BabelRegExp.prototype[Symbol.replace] = function (t, p) { if ("string" == typeof p) { var o = r.get(this); return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)>/g, function (e, r) { var t = o[r]; return "$" + (Array.isArray(t) ? t.join("$") : t); })); } if ("function" == typeof p) { var i = this; return e[Symbol.replace].call(this, t, function () { var e = arguments; return "object" != _typeof(e[e.length - 1]) && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); }); } return e[Symbol.replace].call(this, t, p); }, _wrapRegExp.apply(this, arguments); }
@@ -347,7 +346,7 @@ var EditorCardProvider = exports.EditorCardProvider = /*#__PURE__*/function () {
347
346
  }, {
348
347
  key: "getHardCodedAppearance",
349
348
  value: function getHardCodedAppearance(url) {
350
- if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isJiraList(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url) || isConfluenceDatabase(url) || (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.embed-youtube-by-default') && isYoutubeVideo(url) || isLoomUrl(url) || isJiraDashboard(url)) {
349
+ if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isJiraList(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url) || isConfluenceDatabase(url) || isYoutubeVideo(url) || isLoomUrl(url) || isJiraDashboard(url)) {
351
350
  return 'embed';
352
351
  }
353
352
  }
@@ -5,7 +5,6 @@ import { Transformer } from './transformer';
5
5
  import { getBaseUrl, getResolverUrl } from '@atlaskit/linking-common';
6
6
  import { CardClient } from '@atlaskit/link-provider';
7
7
  import * as api from './api';
8
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
9
8
  const BATCH_WAIT_TIME = 50;
10
9
 
11
10
  // Check if it is matching a Jira Roadmaps or Jira Timeline url
@@ -129,7 +128,7 @@ export class EditorCardProvider {
129
128
  * @returns 'embed' for the card appearance to embed by default
130
129
  */
131
130
  getHardCodedAppearance(url) {
132
- if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isJiraList(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url) || isConfluenceDatabase(url) || getBooleanFF('platform.linking-platform.embed-youtube-by-default') && isYoutubeVideo(url) || isLoomUrl(url) || isJiraDashboard(url)) {
131
+ if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isJiraList(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url) || isConfluenceDatabase(url) || isYoutubeVideo(url) || isLoomUrl(url) || isJiraDashboard(url)) {
133
132
  return 'embed';
134
133
  }
135
134
  }
@@ -14,7 +14,6 @@ import { Transformer } from './transformer';
14
14
  import { getBaseUrl, getResolverUrl } from '@atlaskit/linking-common';
15
15
  import { CardClient } from '@atlaskit/link-provider';
16
16
  import * as api from './api';
17
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
18
17
  var BATCH_WAIT_TIME = 50;
19
18
 
20
19
  // Check if it is matching a Jira Roadmaps or Jira Timeline url
@@ -339,7 +338,7 @@ export var EditorCardProvider = /*#__PURE__*/function () {
339
338
  }, {
340
339
  key: "getHardCodedAppearance",
341
340
  value: function getHardCodedAppearance(url) {
342
- if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isJiraList(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url) || isConfluenceDatabase(url) || getBooleanFF('platform.linking-platform.embed-youtube-by-default') && isYoutubeVideo(url) || isLoomUrl(url) || isJiraDashboard(url)) {
341
+ if (isJiraRoadmapOrTimeline(url) || isPolarisView(url) || isJwmView(url) || isJiraList(url) || isGiphyMedia(url) || isProformaView(url) || isConfluenceWhiteboard(url) || isConfluenceDatabase(url) || isYoutubeVideo(url) || isLoomUrl(url) || isJiraDashboard(url)) {
343
342
  return 'embed';
344
343
  }
345
344
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-card-provider",
3
- "version": "3.7.1",
3
+ "version": "3.8.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",
@@ -39,7 +39,6 @@
39
39
  "@atlaskit/link-client-extension": "^2.2.0",
40
40
  "@atlaskit/link-extractors": "^1.9.0",
41
41
  "@atlaskit/linking-common": "^5.11.0",
42
- "@atlaskit/platform-feature-flags": "^0.3.0",
43
42
  "@babel/runtime": "^7.0.0",
44
43
  "dataloader": "^2.1.0",
45
44
  "json-ld-types": "^4.1.0"
@@ -49,12 +48,6 @@
49
48
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0"
50
49
  },
51
50
  "devDependencies": {
52
- "@atlassian/feature-flags-test-utils": "^0.2.0",
53
51
  "typescript": "~5.4.2"
54
- },
55
- "platform-feature-flags": {
56
- "platform.linking-platform.embed-youtube-by-default": {
57
- "type": "boolean"
58
- }
59
52
  }
60
53
  }