@atlaskit/editor-common 74.34.4 → 74.34.5
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 +6 -0
- package/dist/cjs/guideline/fixedGuideline.js +31 -12
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/guideline/fixedGuideline.js +32 -11
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/guideline/fixedGuideline.js +31 -12
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/guideline/fixedGuideline.d.ts +3 -0
- package/dist/types-ts4.5/guideline/fixedGuideline.d.ts +3 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 74.34.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`d432ad14798`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d432ad14798) - [ux] Added standard page guidelines when custom table width enabled and is resizing table.
|
|
8
|
+
|
|
3
9
|
## 74.34.4
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -19,6 +19,7 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
|
|
|
19
19
|
* {left: 100, right: -100, length: -200},
|
|
20
20
|
* {left: -100.5, right: 100.5, length: 201},
|
|
21
21
|
* ]
|
|
22
|
+
* When length is 0, return {left: 0, right: 0, length: 0}
|
|
22
23
|
*
|
|
23
24
|
* @param lengths A colection of length values which will be split into a left & right guides.
|
|
24
25
|
* @returns A collection of LengthGuide objects which can be used to draw left & right guides
|
|
@@ -26,8 +27,15 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
|
|
|
26
27
|
var createGuidesFromLengths = function createGuidesFromLengths(lengths) {
|
|
27
28
|
return Array.from(new Set(lengths)).reduce(function (acc, length) {
|
|
28
29
|
var h = length * 0.5;
|
|
30
|
+
if (length === 0) {
|
|
31
|
+
return [].concat((0, _toConsumableArray2.default)(acc), [{
|
|
32
|
+
left: 0,
|
|
33
|
+
right: 0,
|
|
34
|
+
length: length
|
|
35
|
+
}]);
|
|
36
|
+
}
|
|
29
37
|
if (!h || !Number.isFinite(length)) {
|
|
30
|
-
// Filter out nonsensical values,
|
|
38
|
+
// Filter out nonsensical values, null, undefined, NaN, empty string
|
|
31
39
|
return acc;
|
|
32
40
|
}
|
|
33
41
|
return [].concat((0, _toConsumableArray2.default)(acc), [{
|
|
@@ -41,6 +49,8 @@ var createGuidesFromLengths = function createGuidesFromLengths(lengths) {
|
|
|
41
49
|
/**
|
|
42
50
|
* This creates a Guideline configuration generating a collection of guideline pairs from each supplied length value.
|
|
43
51
|
* Each length value generates a guideline config for both the left and right side of the length.
|
|
52
|
+
* When length is 0, generate a guideline at position: {x: 0}
|
|
53
|
+
*
|
|
44
54
|
*/
|
|
45
55
|
exports.createGuidesFromLengths = createGuidesFromLengths;
|
|
46
56
|
var createFixedGuidelinesFromLengths = function createFixedGuidelinesFromLengths(lengths) {
|
|
@@ -49,17 +59,26 @@ var createFixedGuidelinesFromLengths = function createFixedGuidelinesFromLengths
|
|
|
49
59
|
var left = _ref.left,
|
|
50
60
|
right = _ref.right,
|
|
51
61
|
length = _ref.length;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
if (length === 0) {
|
|
63
|
+
return [].concat((0, _toConsumableArray2.default)(acc), [{
|
|
64
|
+
key: "".concat(key, "-").concat(length, "-centre"),
|
|
65
|
+
position: {
|
|
66
|
+
x: left
|
|
67
|
+
}
|
|
68
|
+
}]);
|
|
69
|
+
} else {
|
|
70
|
+
return [].concat((0, _toConsumableArray2.default)(acc), [{
|
|
71
|
+
key: "".concat(key, "-").concat(length, "-left"),
|
|
72
|
+
position: {
|
|
73
|
+
x: left
|
|
74
|
+
}
|
|
75
|
+
}, {
|
|
76
|
+
key: "".concat(key, "-").concat(length, "-right"),
|
|
77
|
+
position: {
|
|
78
|
+
x: right
|
|
79
|
+
}
|
|
80
|
+
}]);
|
|
81
|
+
}
|
|
63
82
|
}, []);
|
|
64
83
|
};
|
|
65
84
|
exports.createFixedGuidelinesFromLengths = createFixedGuidelinesFromLengths;
|
|
@@ -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.34.
|
|
19
|
+
var packageVersion = "74.34.5";
|
|
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.34.
|
|
27
|
+
var packageVersion = "74.34.5";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var DropList = /*#__PURE__*/function (_Component) {
|
package/dist/cjs/version.json
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* {left: 100, right: -100, length: -200},
|
|
12
12
|
* {left: -100.5, right: 100.5, length: 201},
|
|
13
13
|
* ]
|
|
14
|
+
* When length is 0, return {left: 0, right: 0, length: 0}
|
|
14
15
|
*
|
|
15
16
|
* @param lengths A colection of length values which will be split into a left & right guides.
|
|
16
17
|
* @returns A collection of LengthGuide objects which can be used to draw left & right guides
|
|
@@ -18,8 +19,15 @@
|
|
|
18
19
|
export const createGuidesFromLengths = lengths => {
|
|
19
20
|
return Array.from(new Set(lengths)).reduce((acc, length) => {
|
|
20
21
|
const h = length * 0.5;
|
|
22
|
+
if (length === 0) {
|
|
23
|
+
return [...acc, {
|
|
24
|
+
left: 0,
|
|
25
|
+
right: 0,
|
|
26
|
+
length
|
|
27
|
+
}];
|
|
28
|
+
}
|
|
21
29
|
if (!h || !Number.isFinite(length)) {
|
|
22
|
-
// Filter out nonsensical values,
|
|
30
|
+
// Filter out nonsensical values, null, undefined, NaN, empty string
|
|
23
31
|
return acc;
|
|
24
32
|
}
|
|
25
33
|
return [...acc, {
|
|
@@ -33,21 +41,34 @@ export const createGuidesFromLengths = lengths => {
|
|
|
33
41
|
/**
|
|
34
42
|
* This creates a Guideline configuration generating a collection of guideline pairs from each supplied length value.
|
|
35
43
|
* Each length value generates a guideline config for both the left and right side of the length.
|
|
44
|
+
* When length is 0, generate a guideline at position: {x: 0}
|
|
45
|
+
*
|
|
36
46
|
*/
|
|
37
47
|
export const createFixedGuidelinesFromLengths = (lengths, key = 'guide') => {
|
|
38
48
|
return createGuidesFromLengths(lengths).reduce((acc, {
|
|
39
49
|
left,
|
|
40
50
|
right,
|
|
41
51
|
length
|
|
42
|
-
}) =>
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
52
|
+
}) => {
|
|
53
|
+
if (length === 0) {
|
|
54
|
+
return [...acc, {
|
|
55
|
+
key: `${key}-${length}-centre`,
|
|
56
|
+
position: {
|
|
57
|
+
x: left
|
|
58
|
+
}
|
|
59
|
+
}];
|
|
60
|
+
} else {
|
|
61
|
+
return [...acc, {
|
|
62
|
+
key: `${key}-${length}-left`,
|
|
63
|
+
position: {
|
|
64
|
+
x: left
|
|
65
|
+
}
|
|
66
|
+
}, {
|
|
67
|
+
key: `${key}-${length}-right`,
|
|
68
|
+
position: {
|
|
69
|
+
x: right
|
|
70
|
+
}
|
|
71
|
+
}];
|
|
46
72
|
}
|
|
47
|
-
},
|
|
48
|
-
key: `${key}-${length}-right`,
|
|
49
|
-
position: {
|
|
50
|
-
x: right
|
|
51
|
-
}
|
|
52
|
-
}], []);
|
|
73
|
+
}, []);
|
|
53
74
|
};
|
|
@@ -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.34.
|
|
3
|
+
const packageVersion = "74.34.5";
|
|
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.34.
|
|
11
|
+
const packageVersion = "74.34.5";
|
|
12
12
|
const halfFocusRing = 1;
|
|
13
13
|
const dropOffset = '0, 8';
|
|
14
14
|
class DropList extends Component {
|
package/dist/es2019/version.json
CHANGED
|
@@ -12,6 +12,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
12
12
|
* {left: 100, right: -100, length: -200},
|
|
13
13
|
* {left: -100.5, right: 100.5, length: 201},
|
|
14
14
|
* ]
|
|
15
|
+
* When length is 0, return {left: 0, right: 0, length: 0}
|
|
15
16
|
*
|
|
16
17
|
* @param lengths A colection of length values which will be split into a left & right guides.
|
|
17
18
|
* @returns A collection of LengthGuide objects which can be used to draw left & right guides
|
|
@@ -19,8 +20,15 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
19
20
|
export var createGuidesFromLengths = function createGuidesFromLengths(lengths) {
|
|
20
21
|
return Array.from(new Set(lengths)).reduce(function (acc, length) {
|
|
21
22
|
var h = length * 0.5;
|
|
23
|
+
if (length === 0) {
|
|
24
|
+
return [].concat(_toConsumableArray(acc), [{
|
|
25
|
+
left: 0,
|
|
26
|
+
right: 0,
|
|
27
|
+
length: length
|
|
28
|
+
}]);
|
|
29
|
+
}
|
|
22
30
|
if (!h || !Number.isFinite(length)) {
|
|
23
|
-
// Filter out nonsensical values,
|
|
31
|
+
// Filter out nonsensical values, null, undefined, NaN, empty string
|
|
24
32
|
return acc;
|
|
25
33
|
}
|
|
26
34
|
return [].concat(_toConsumableArray(acc), [{
|
|
@@ -34,6 +42,8 @@ export var createGuidesFromLengths = function createGuidesFromLengths(lengths) {
|
|
|
34
42
|
/**
|
|
35
43
|
* This creates a Guideline configuration generating a collection of guideline pairs from each supplied length value.
|
|
36
44
|
* Each length value generates a guideline config for both the left and right side of the length.
|
|
45
|
+
* When length is 0, generate a guideline at position: {x: 0}
|
|
46
|
+
*
|
|
37
47
|
*/
|
|
38
48
|
export var createFixedGuidelinesFromLengths = function createFixedGuidelinesFromLengths(lengths) {
|
|
39
49
|
var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'guide';
|
|
@@ -41,16 +51,25 @@ export var createFixedGuidelinesFromLengths = function createFixedGuidelinesFrom
|
|
|
41
51
|
var left = _ref.left,
|
|
42
52
|
right = _ref.right,
|
|
43
53
|
length = _ref.length;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
if (length === 0) {
|
|
55
|
+
return [].concat(_toConsumableArray(acc), [{
|
|
56
|
+
key: "".concat(key, "-").concat(length, "-centre"),
|
|
57
|
+
position: {
|
|
58
|
+
x: left
|
|
59
|
+
}
|
|
60
|
+
}]);
|
|
61
|
+
} else {
|
|
62
|
+
return [].concat(_toConsumableArray(acc), [{
|
|
63
|
+
key: "".concat(key, "-").concat(length, "-left"),
|
|
64
|
+
position: {
|
|
65
|
+
x: left
|
|
66
|
+
}
|
|
67
|
+
}, {
|
|
68
|
+
key: "".concat(key, "-").concat(length, "-right"),
|
|
69
|
+
position: {
|
|
70
|
+
x: right
|
|
71
|
+
}
|
|
72
|
+
}]);
|
|
73
|
+
}
|
|
55
74
|
}, []);
|
|
56
75
|
};
|
|
@@ -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.34.
|
|
9
|
+
var packageVersion = "74.34.5";
|
|
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.34.
|
|
21
|
+
var packageVersion = "74.34.5";
|
|
22
22
|
var halfFocusRing = 1;
|
|
23
23
|
var dropOffset = '0, 8';
|
|
24
24
|
var DropList = /*#__PURE__*/function (_Component) {
|
package/dist/esm/version.json
CHANGED
|
@@ -12,6 +12,7 @@ import { LengthGuide } from './types';
|
|
|
12
12
|
* {left: 100, right: -100, length: -200},
|
|
13
13
|
* {left: -100.5, right: 100.5, length: 201},
|
|
14
14
|
* ]
|
|
15
|
+
* When length is 0, return {left: 0, right: 0, length: 0}
|
|
15
16
|
*
|
|
16
17
|
* @param lengths A colection of length values which will be split into a left & right guides.
|
|
17
18
|
* @returns A collection of LengthGuide objects which can be used to draw left & right guides
|
|
@@ -20,6 +21,8 @@ export declare const createGuidesFromLengths: (lengths: number[]) => LengthGuide
|
|
|
20
21
|
/**
|
|
21
22
|
* This creates a Guideline configuration generating a collection of guideline pairs from each supplied length value.
|
|
22
23
|
* Each length value generates a guideline config for both the left and right side of the length.
|
|
24
|
+
* When length is 0, generate a guideline at position: {x: 0}
|
|
25
|
+
*
|
|
23
26
|
*/
|
|
24
27
|
export declare const createFixedGuidelinesFromLengths: (lengths: number[], key?: string) => {
|
|
25
28
|
key: string;
|
|
@@ -12,6 +12,7 @@ import { LengthGuide } from './types';
|
|
|
12
12
|
* {left: 100, right: -100, length: -200},
|
|
13
13
|
* {left: -100.5, right: 100.5, length: 201},
|
|
14
14
|
* ]
|
|
15
|
+
* When length is 0, return {left: 0, right: 0, length: 0}
|
|
15
16
|
*
|
|
16
17
|
* @param lengths A colection of length values which will be split into a left & right guides.
|
|
17
18
|
* @returns A collection of LengthGuide objects which can be used to draw left & right guides
|
|
@@ -20,6 +21,8 @@ export declare const createGuidesFromLengths: (lengths: number[]) => LengthGuide
|
|
|
20
21
|
/**
|
|
21
22
|
* This creates a Guideline configuration generating a collection of guideline pairs from each supplied length value.
|
|
22
23
|
* Each length value generates a guideline config for both the left and right side of the length.
|
|
24
|
+
* When length is 0, generate a guideline at position: {x: 0}
|
|
25
|
+
*
|
|
23
26
|
*/
|
|
24
27
|
export declare const createFixedGuidelinesFromLengths: (lengths: number[], key?: string) => {
|
|
25
28
|
key: string;
|
package/package.json
CHANGED