@atlaskit/editor-common 112.8.4 → 112.9.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,16 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 112.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`9f5fba61d4c9d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9f5fba61d4c9d) -
8
+ do not show external badge for images hosted on bitbucket.org
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+
3
14
  ## 112.8.4
4
15
 
5
16
  ### Patch Changes
@@ -9,6 +9,7 @@ var _react = _interopRequireDefault(require("react"));
9
9
  var _reactIntlNext = require("react-intl-next");
10
10
  var _statusInformation = _interopRequireDefault(require("@atlaskit/icon/core/status-information"));
11
11
  var _primitives = require("@atlaskit/primitives");
12
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
12
13
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
13
14
  var _media = require("../media");
14
15
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
@@ -21,6 +22,7 @@ var baseStyles = (0, _primitives.xcss)({
21
22
  cursor: 'pointer'
22
23
  });
23
24
  var NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com', 'loom.com', 'dam-cdn.atl.orangelogic.com'];
25
+ var NO_EXTERNAL_BADGE_HOSTS_NEW = ['atlassian.com', 'loom.com', 'dam-cdn.atl.orangelogic.com', 'bitbucket.org'];
24
26
  var isUnbadgedUrl = exports.isUnbadgedUrl = function isUnbadgedUrl(url) {
25
27
  if (!url) {
26
28
  return false;
@@ -38,6 +40,11 @@ var isUnbadgedUrl = exports.isUnbadgedUrl = function isUnbadgedUrl(url) {
38
40
  if (protocol === 'data:') {
39
41
  return pathname === null || pathname === void 0 ? void 0 : pathname.startsWith('image/');
40
42
  }
43
+ if ((0, _expValEquals.expValEquals)('platform_editor_media_external_badge_bbc_fix', 'isEnable', true)) {
44
+ return Boolean(hostname && NO_EXTERNAL_BADGE_HOSTS_NEW.some(function (host) {
45
+ return hostname === host || hostname.endsWith(".".concat(host));
46
+ }));
47
+ }
41
48
  return Boolean(hostname && NO_EXTERNAL_BADGE_HOSTS.some(function (host) {
42
49
  return hostname === host || hostname.endsWith(".".concat(host));
43
50
  }));
@@ -19,7 +19,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
19
19
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
20
20
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
21
21
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
22
- var packageVersion = "112.8.3";
22
+ var packageVersion = "112.8.4";
23
23
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
24
24
  // Remove URL as it has UGC
25
25
  // Ignored via go/ees007
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
24
24
  * @jsx jsx
25
25
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
26
26
  var packageName = "@atlaskit/editor-common";
27
- var packageVersion = "112.8.3";
27
+ var packageVersion = "112.8.4";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -3,6 +3,7 @@ import { useIntl } from 'react-intl-next';
3
3
  import InfoIcon from '@atlaskit/icon/core/status-information';
4
4
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
5
5
  import { Box, xcss } from '@atlaskit/primitives';
6
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
7
  import Tooltip from '@atlaskit/tooltip';
7
8
  import { externalMediaMessages } from '../media';
8
9
  const baseStyles = xcss({
@@ -13,6 +14,7 @@ const baseStyles = xcss({
13
14
  cursor: 'pointer'
14
15
  });
15
16
  const NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com', 'loom.com', 'dam-cdn.atl.orangelogic.com'];
17
+ const NO_EXTERNAL_BADGE_HOSTS_NEW = ['atlassian.com', 'loom.com', 'dam-cdn.atl.orangelogic.com', 'bitbucket.org'];
16
18
  export const isUnbadgedUrl = url => {
17
19
  if (!url) {
18
20
  return false;
@@ -32,6 +34,9 @@ export const isUnbadgedUrl = url => {
32
34
  if (protocol === 'data:') {
33
35
  return pathname === null || pathname === void 0 ? void 0 : pathname.startsWith('image/');
34
36
  }
37
+ if (expValEquals('platform_editor_media_external_badge_bbc_fix', 'isEnable', true)) {
38
+ return Boolean(hostname && NO_EXTERNAL_BADGE_HOSTS_NEW.some(host => hostname === host || hostname.endsWith(`.${host}`)));
39
+ }
35
40
  return Boolean(hostname && NO_EXTERNAL_BADGE_HOSTS.some(host => hostname === host || hostname.endsWith(`.${host}`)));
36
41
  };
37
42
  export const ExternalImageBadge = ({
@@ -4,7 +4,7 @@ import { isFedRamp } from './environment';
4
4
  import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
5
5
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
6
6
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
7
- const packageVersion = "112.8.3";
7
+ const packageVersion = "112.8.4";
8
8
  const sanitiseSentryEvents = (data, _hint) => {
9
9
  // Remove URL as it has UGC
10
10
  // Ignored via go/ees007
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import { fg } from '@atlaskit/platform-feature-flags';
15
15
  import Layer from '../Layer';
16
16
  const packageName = "@atlaskit/editor-common";
17
- const packageVersion = "112.8.3";
17
+ const packageVersion = "112.8.4";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -3,6 +3,7 @@ import { useIntl } from 'react-intl-next';
3
3
  import InfoIcon from '@atlaskit/icon/core/status-information';
4
4
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
5
5
  import { Box, xcss } from '@atlaskit/primitives';
6
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
7
  import Tooltip from '@atlaskit/tooltip';
7
8
  import { externalMediaMessages } from '../media';
8
9
  var baseStyles = xcss({
@@ -13,6 +14,7 @@ var baseStyles = xcss({
13
14
  cursor: 'pointer'
14
15
  });
15
16
  var NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com', 'loom.com', 'dam-cdn.atl.orangelogic.com'];
17
+ var NO_EXTERNAL_BADGE_HOSTS_NEW = ['atlassian.com', 'loom.com', 'dam-cdn.atl.orangelogic.com', 'bitbucket.org'];
16
18
  export var isUnbadgedUrl = function isUnbadgedUrl(url) {
17
19
  if (!url) {
18
20
  return false;
@@ -30,6 +32,11 @@ export var isUnbadgedUrl = function isUnbadgedUrl(url) {
30
32
  if (protocol === 'data:') {
31
33
  return pathname === null || pathname === void 0 ? void 0 : pathname.startsWith('image/');
32
34
  }
35
+ if (expValEquals('platform_editor_media_external_badge_bbc_fix', 'isEnable', true)) {
36
+ return Boolean(hostname && NO_EXTERNAL_BADGE_HOSTS_NEW.some(function (host) {
37
+ return hostname === host || hostname.endsWith(".".concat(host));
38
+ }));
39
+ }
33
40
  return Boolean(hostname && NO_EXTERNAL_BADGE_HOSTS.some(function (host) {
34
41
  return hostname === host || hostname.endsWith(".".concat(host));
35
42
  }));
@@ -10,7 +10,7 @@ import { isFedRamp } from './environment';
10
10
  import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
11
11
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
12
12
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
13
- var packageVersion = "112.8.3";
13
+ var packageVersion = "112.8.4";
14
14
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
15
15
  // Remove URL as it has UGC
16
16
  // Ignored via go/ees007
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import { fg } from '@atlaskit/platform-feature-flags';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "112.8.3";
24
+ var packageVersion = "112.8.4";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "112.8.4",
3
+ "version": "112.9.0",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -35,14 +35,14 @@
35
35
  "@atlaskit/afm-i18n-platform-editor-editor-common": "2.18.0",
36
36
  "@atlaskit/analytics-listeners": "^10.0.0",
37
37
  "@atlaskit/analytics-namespaced-context": "^7.2.0",
38
- "@atlaskit/analytics-next": "^11.1.0",
38
+ "@atlaskit/analytics-next": "^11.2.0",
39
39
  "@atlaskit/atlassian-context": "^0.6.0",
40
40
  "@atlaskit/browser-apis": "^0.0.1",
41
41
  "@atlaskit/button": "^23.10.0",
42
42
  "@atlaskit/codemod-utils": "^4.2.0",
43
43
  "@atlaskit/css": "^0.19.0",
44
44
  "@atlaskit/custom-steps": "^0.16.0",
45
- "@atlaskit/dropdown-menu": "^16.7.0",
45
+ "@atlaskit/dropdown-menu": "^16.8.0",
46
46
  "@atlaskit/editor-json-transformer": "^8.31.0",
47
47
  "@atlaskit/editor-palette": "^2.1.0",
48
48
  "@atlaskit/editor-prosemirror": "^7.3.0",
@@ -81,7 +81,7 @@
81
81
  "@atlaskit/status": "^3.1.0",
82
82
  "@atlaskit/task-decision": "^19.3.0",
83
83
  "@atlaskit/textfield": "^8.2.0",
84
- "@atlaskit/tmp-editor-statsig": "^45.0.0",
84
+ "@atlaskit/tmp-editor-statsig": "^45.1.0",
85
85
  "@atlaskit/tokens": "^11.2.0",
86
86
  "@atlaskit/tooltip": "^21.0.0",
87
87
  "@atlaskit/width-detector": "^5.0.0",