@atlaskit/editor-common 74.51.5 → 74.51.6

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,11 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 74.51.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [`edeab2d50b2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/edeab2d50b2) - Fix analytics event for image resizing and relative snaps
8
+
3
9
  ## 74.51.5
4
10
 
5
11
  ### Patch Changes
@@ -38,22 +38,24 @@ var getGuidelineTypeFromKey = function getGuidelineTypeFromKey(keys, guidelines)
38
38
  return 'default';
39
39
  }
40
40
 
41
- // Find the first matched guideline (ignoring duplicates or groups)
42
- var matchedGuideline = guidelines.find(function (guideline) {
43
- return keys.some(function (key) {
44
- return guideline.key === key;
41
+ // Check for temporary guidelines
42
+ if (keys.some(function (key) {
43
+ return ['media_'].some(function (temoporaryGuideline) {
44
+ return key.indexOf(temoporaryGuideline) >= 0;
45
45
  });
46
- });
47
- if (!matchedGuideline) {
48
- return 'none';
46
+ })) {
47
+ return 'temporary';
49
48
  }
50
49
 
51
- // Check whether temporary or horizontal guides
52
- if (isVerticalPosition(matchedGuideline.position)) {
53
- return isRange(matchedGuideline.position.y) ? 'relative' : 'temporary';
54
- } else {
55
- return isRange(matchedGuideline.position.x) ? 'relative' : 'none'; // Can never have temporary horizontal guides
50
+ // Check for relative guidelines
51
+ if (keys.some(function (key) {
52
+ return ['relative_'].some(function (relativeGuideline) {
53
+ return key.indexOf(relativeGuideline) >= 0;
54
+ });
55
+ })) {
56
+ return 'relative';
56
57
  }
58
+ return 'none';
57
59
  };
58
60
 
59
61
  /**
@@ -16,7 +16,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
16
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
17
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
18
18
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
19
- var packageVersion = "74.51.5";
19
+ var packageVersion = "74.51.6";
20
20
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
21
21
  // Remove URL as it has UGC
22
22
  // TODO: Sanitise the URL instead of just removing it
@@ -24,7 +24,7 @@ var _templateObject, _templateObject2, _templateObject3;
24
24
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
25
25
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /** @jsx jsx */
26
26
  var packageName = "@atlaskit/editor-common";
27
- var packageVersion = "74.51.5";
27
+ var packageVersion = "74.51.6";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var DropList = /*#__PURE__*/function (_Component) {
@@ -17,18 +17,16 @@ export const getGuidelineTypeFromKey = (keys, guidelines) => {
17
17
  return 'default';
18
18
  }
19
19
 
20
- // Find the first matched guideline (ignoring duplicates or groups)
21
- const matchedGuideline = guidelines.find(guideline => keys.some(key => guideline.key === key));
22
- if (!matchedGuideline) {
23
- return 'none';
20
+ // Check for temporary guidelines
21
+ if (keys.some(key => ['media_'].some(temoporaryGuideline => key.indexOf(temoporaryGuideline) >= 0))) {
22
+ return 'temporary';
24
23
  }
25
24
 
26
- // Check whether temporary or horizontal guides
27
- if (isVerticalPosition(matchedGuideline.position)) {
28
- return isRange(matchedGuideline.position.y) ? 'relative' : 'temporary';
29
- } else {
30
- return isRange(matchedGuideline.position.x) ? 'relative' : 'none'; // Can never have temporary horizontal guides
25
+ // Check for relative guidelines
26
+ if (keys.some(key => ['relative_'].some(relativeGuideline => key.indexOf(relativeGuideline) >= 0))) {
27
+ return 'relative';
31
28
  }
29
+ return 'none';
32
30
  };
33
31
 
34
32
  /**
@@ -1,6 +1,6 @@
1
1
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
2
2
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
3
- const packageVersion = "74.51.5";
3
+ const packageVersion = "74.51.6";
4
4
  const sanitiseSentryEvents = (data, _hint) => {
5
5
  // Remove URL as it has UGC
6
6
  // TODO: Sanitise the URL instead of just removing it
@@ -8,7 +8,7 @@ import { themed } from '@atlaskit/theme/components';
8
8
  import { borderRadius } from '@atlaskit/theme/constants';
9
9
  import Layer from '../Layer';
10
10
  const packageName = "@atlaskit/editor-common";
11
- const packageVersion = "74.51.5";
11
+ const packageVersion = "74.51.6";
12
12
  const halfFocusRing = 1;
13
13
  const dropOffset = '0, 8';
14
14
  class DropList extends Component {
@@ -28,22 +28,24 @@ export var getGuidelineTypeFromKey = function getGuidelineTypeFromKey(keys, guid
28
28
  return 'default';
29
29
  }
30
30
 
31
- // Find the first matched guideline (ignoring duplicates or groups)
32
- var matchedGuideline = guidelines.find(function (guideline) {
33
- return keys.some(function (key) {
34
- return guideline.key === key;
31
+ // Check for temporary guidelines
32
+ if (keys.some(function (key) {
33
+ return ['media_'].some(function (temoporaryGuideline) {
34
+ return key.indexOf(temoporaryGuideline) >= 0;
35
35
  });
36
- });
37
- if (!matchedGuideline) {
38
- return 'none';
36
+ })) {
37
+ return 'temporary';
39
38
  }
40
39
 
41
- // Check whether temporary or horizontal guides
42
- if (isVerticalPosition(matchedGuideline.position)) {
43
- return isRange(matchedGuideline.position.y) ? 'relative' : 'temporary';
44
- } else {
45
- return isRange(matchedGuideline.position.x) ? 'relative' : 'none'; // Can never have temporary horizontal guides
40
+ // Check for relative guidelines
41
+ if (keys.some(function (key) {
42
+ return ['relative_'].some(function (relativeGuideline) {
43
+ return key.indexOf(relativeGuideline) >= 0;
44
+ });
45
+ })) {
46
+ return 'relative';
46
47
  }
48
+ return 'none';
47
49
  };
48
50
 
49
51
  /**
@@ -6,7 +6,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
6
6
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
7
7
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
8
8
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
9
- var packageVersion = "74.51.5";
9
+ var packageVersion = "74.51.6";
10
10
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
11
11
  // Remove URL as it has UGC
12
12
  // TODO: Sanitise the URL instead of just removing it
@@ -18,7 +18,7 @@ import { themed } from '@atlaskit/theme/components';
18
18
  import { borderRadius } from '@atlaskit/theme/constants';
19
19
  import Layer from '../Layer';
20
20
  var packageName = "@atlaskit/editor-common";
21
- var packageVersion = "74.51.5";
21
+ var packageVersion = "74.51.6";
22
22
  var halfFocusRing = 1;
23
23
  var dropOffset = '0, 8';
24
24
  var DropList = /*#__PURE__*/function (_Component) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "74.51.5",
3
+ "version": "74.51.6",
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/"
@@ -146,7 +146,7 @@
146
146
  "@atlaskit/editor-test-helpers": "^18.11.0",
147
147
  "@atlaskit/media-core": "^34.1.0",
148
148
  "@atlaskit/media-test-helpers": "^33.0.0",
149
- "@atlaskit/smart-card": "^26.15.0",
149
+ "@atlaskit/smart-card": "^26.16.0",
150
150
  "@atlaskit/util-data-test": "^17.8.0",
151
151
  "@atlaskit/visual-regression": "*",
152
152
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",