@atlaskit/editor-common 78.36.3 → 78.36.4
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 +7 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/utils/validator.js +13 -4
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/utils/validator.js +13 -4
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/utils/validator.js +13 -4
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 78.36.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#95605](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/95605) [`ab6a0e7bac9c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ab6a0e7bac9c) - [ED-23098] Add support for background color mark to ADF utils and editor common validators
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
3
10
|
## 78.36.3
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -16,7 +16,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
16
16
|
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; }
|
|
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 = "78.36.
|
|
19
|
+
var packageVersion = "78.36.4";
|
|
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
|
|
@@ -20,7 +20,7 @@ var _Layer = _interopRequireDefault(require("../Layer"));
|
|
|
20
20
|
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); }; }
|
|
21
21
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @jsx jsx */
|
|
22
22
|
var packageName = "@atlaskit/editor-common";
|
|
23
|
-
var packageVersion = "78.36.
|
|
23
|
+
var packageVersion = "78.36.4";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -41,9 +41,9 @@ var ADFStages = exports.ADFStages = {
|
|
|
41
41
|
|
|
42
42
|
/*
|
|
43
43
|
* It's important that this order follows the marks rank defined here:
|
|
44
|
-
* https://product-fabric.atlassian.net/wiki/spaces/
|
|
44
|
+
* https://product-fabric.atlassian.net/wiki/spaces/ETEMP/pages/11174043/Atlassian+Document+Format+-+Internal+documentation#Rank
|
|
45
45
|
*/
|
|
46
|
-
var markOrder = exports.markOrder = ['fragment', 'link', 'em', 'strong', 'textColor', 'strike', 'subsup', 'underline', 'code', 'confluenceInlineComment', 'annotation', 'dataConsumer'];
|
|
46
|
+
var markOrder = exports.markOrder = ['fragment', 'link', 'em', 'strong', 'textColor', 'strike', 'subsup', 'underline', 'code', 'confluenceInlineComment', 'annotation', 'dataConsumer', 'backgroundColor'];
|
|
47
47
|
var isSubSupType = exports.isSubSupType = function isSubSupType(type) {
|
|
48
48
|
return type === 'sub' || type === 'sup';
|
|
49
49
|
};
|
|
@@ -802,8 +802,7 @@ var getValidNode = exports.getValidNode = function getValidNode(originalNode) {
|
|
|
802
802
|
|
|
803
803
|
/*
|
|
804
804
|
* This method will validate a Mark according to the spec defined here
|
|
805
|
-
* https://
|
|
806
|
-
*
|
|
805
|
+
* https://developer.atlassian.com/platform/atlassian-document-format/concepts/document-structure/marks/overview/
|
|
807
806
|
* This is also the place to handle backwards compatibility.
|
|
808
807
|
*
|
|
809
808
|
* If a node is not recognized or is missing required attributes, we should return null
|
|
@@ -909,6 +908,16 @@ var getValidMark = exports.getValidMark = function getValidMark(mark) {
|
|
|
909
908
|
attrs: attrs
|
|
910
909
|
};
|
|
911
910
|
}
|
|
911
|
+
case 'backgroundColor':
|
|
912
|
+
{
|
|
913
|
+
if (attrs && TEXT_COLOR_PATTERN.test(attrs.color)) {
|
|
914
|
+
return {
|
|
915
|
+
type: type,
|
|
916
|
+
attrs: attrs
|
|
917
|
+
};
|
|
918
|
+
}
|
|
919
|
+
break;
|
|
920
|
+
}
|
|
912
921
|
}
|
|
913
922
|
}
|
|
914
923
|
if (adfStage === 'stage0') {
|
|
@@ -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 = "78.36.
|
|
3
|
+
const packageVersion = "78.36.4";
|
|
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
|
|
@@ -7,7 +7,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
|
|
|
7
7
|
import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
8
8
|
import Layer from '../Layer';
|
|
9
9
|
const packageName = "@atlaskit/editor-common";
|
|
10
|
-
const packageVersion = "78.36.
|
|
10
|
+
const packageVersion = "78.36.4";
|
|
11
11
|
const halfFocusRing = 1;
|
|
12
12
|
const dropOffset = '0, 8';
|
|
13
13
|
class DropList extends Component {
|
|
@@ -30,9 +30,9 @@ export const ADFStages = {
|
|
|
30
30
|
|
|
31
31
|
/*
|
|
32
32
|
* It's important that this order follows the marks rank defined here:
|
|
33
|
-
* https://product-fabric.atlassian.net/wiki/spaces/
|
|
33
|
+
* https://product-fabric.atlassian.net/wiki/spaces/ETEMP/pages/11174043/Atlassian+Document+Format+-+Internal+documentation#Rank
|
|
34
34
|
*/
|
|
35
|
-
export const markOrder = ['fragment', 'link', 'em', 'strong', 'textColor', 'strike', 'subsup', 'underline', 'code', 'confluenceInlineComment', 'annotation', 'dataConsumer'];
|
|
35
|
+
export const markOrder = ['fragment', 'link', 'em', 'strong', 'textColor', 'strike', 'subsup', 'underline', 'code', 'confluenceInlineComment', 'annotation', 'dataConsumer', 'backgroundColor'];
|
|
36
36
|
export const isSubSupType = type => {
|
|
37
37
|
return type === 'sub' || type === 'sup';
|
|
38
38
|
};
|
|
@@ -790,8 +790,7 @@ export const getValidNode = (originalNode, schema = defaultSchema, adfStage = 'f
|
|
|
790
790
|
|
|
791
791
|
/*
|
|
792
792
|
* This method will validate a Mark according to the spec defined here
|
|
793
|
-
* https://
|
|
794
|
-
*
|
|
793
|
+
* https://developer.atlassian.com/platform/atlassian-document-format/concepts/document-structure/marks/overview/
|
|
795
794
|
* This is also the place to handle backwards compatibility.
|
|
796
795
|
*
|
|
797
796
|
* If a node is not recognized or is missing required attributes, we should return null
|
|
@@ -900,6 +899,16 @@ export const getValidMark = (mark, adfStage = 'final') => {
|
|
|
900
899
|
attrs
|
|
901
900
|
};
|
|
902
901
|
}
|
|
902
|
+
case 'backgroundColor':
|
|
903
|
+
{
|
|
904
|
+
if (attrs && TEXT_COLOR_PATTERN.test(attrs.color)) {
|
|
905
|
+
return {
|
|
906
|
+
type,
|
|
907
|
+
attrs
|
|
908
|
+
};
|
|
909
|
+
}
|
|
910
|
+
break;
|
|
911
|
+
}
|
|
903
912
|
}
|
|
904
913
|
}
|
|
905
914
|
if (adfStage === 'stage0') {
|
|
@@ -6,7 +6,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
6
6
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
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 = "78.36.
|
|
9
|
+
var packageVersion = "78.36.4";
|
|
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
|
|
@@ -15,7 +15,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
|
|
|
15
15
|
import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
16
16
|
import Layer from '../Layer';
|
|
17
17
|
var packageName = "@atlaskit/editor-common";
|
|
18
|
-
var packageVersion = "78.36.
|
|
18
|
+
var packageVersion = "78.36.4";
|
|
19
19
|
var halfFocusRing = 1;
|
|
20
20
|
var dropOffset = '0, 8';
|
|
21
21
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -34,9 +34,9 @@ export var ADFStages = {
|
|
|
34
34
|
|
|
35
35
|
/*
|
|
36
36
|
* It's important that this order follows the marks rank defined here:
|
|
37
|
-
* https://product-fabric.atlassian.net/wiki/spaces/
|
|
37
|
+
* https://product-fabric.atlassian.net/wiki/spaces/ETEMP/pages/11174043/Atlassian+Document+Format+-+Internal+documentation#Rank
|
|
38
38
|
*/
|
|
39
|
-
export var markOrder = ['fragment', 'link', 'em', 'strong', 'textColor', 'strike', 'subsup', 'underline', 'code', 'confluenceInlineComment', 'annotation', 'dataConsumer'];
|
|
39
|
+
export var markOrder = ['fragment', 'link', 'em', 'strong', 'textColor', 'strike', 'subsup', 'underline', 'code', 'confluenceInlineComment', 'annotation', 'dataConsumer', 'backgroundColor'];
|
|
40
40
|
export var isSubSupType = function isSubSupType(type) {
|
|
41
41
|
return type === 'sub' || type === 'sup';
|
|
42
42
|
};
|
|
@@ -795,8 +795,7 @@ export var getValidNode = function getValidNode(originalNode) {
|
|
|
795
795
|
|
|
796
796
|
/*
|
|
797
797
|
* This method will validate a Mark according to the spec defined here
|
|
798
|
-
* https://
|
|
799
|
-
*
|
|
798
|
+
* https://developer.atlassian.com/platform/atlassian-document-format/concepts/document-structure/marks/overview/
|
|
800
799
|
* This is also the place to handle backwards compatibility.
|
|
801
800
|
*
|
|
802
801
|
* If a node is not recognized or is missing required attributes, we should return null
|
|
@@ -902,6 +901,16 @@ export var getValidMark = function getValidMark(mark) {
|
|
|
902
901
|
attrs: attrs
|
|
903
902
|
};
|
|
904
903
|
}
|
|
904
|
+
case 'backgroundColor':
|
|
905
|
+
{
|
|
906
|
+
if (attrs && TEXT_COLOR_PATTERN.test(attrs.color)) {
|
|
907
|
+
return {
|
|
908
|
+
type: type,
|
|
909
|
+
attrs: attrs
|
|
910
|
+
};
|
|
911
|
+
}
|
|
912
|
+
break;
|
|
913
|
+
}
|
|
905
914
|
}
|
|
906
915
|
}
|
|
907
916
|
if (adfStage === 'stage0') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "78.36.
|
|
3
|
+
"version": "78.36.4",
|
|
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/"
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"@atlaskit/codemod-utils": "^4.2.0",
|
|
109
109
|
"@atlaskit/custom-steps": "^0.1.0",
|
|
110
110
|
"@atlaskit/editor-json-transformer": "^8.11.0",
|
|
111
|
-
"@atlaskit/editor-palette": "1.
|
|
111
|
+
"@atlaskit/editor-palette": "1.6.0",
|
|
112
112
|
"@atlaskit/editor-prosemirror": "4.0.0",
|
|
113
113
|
"@atlaskit/editor-shared-styles": "^2.10.0",
|
|
114
114
|
"@atlaskit/editor-tables": "^2.7.0",
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
"@atlaskit/icon": "^22.1.0",
|
|
117
117
|
"@atlaskit/icon-object": "^6.3.0",
|
|
118
118
|
"@atlaskit/in-product-testing": "^0.2.0",
|
|
119
|
-
"@atlaskit/link-datasource": "^1.
|
|
119
|
+
"@atlaskit/link-datasource": "^1.30.0",
|
|
120
120
|
"@atlaskit/link-picker": "^1.36.0",
|
|
121
121
|
"@atlaskit/media-card": "^77.11.0",
|
|
122
122
|
"@atlaskit/media-client": "^26.3.0",
|