@atlaskit/editor-synced-block-renderer 4.0.9 → 4.0.10
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,13 @@
|
|
|
1
1
|
# @atlaskit/editor-synced-block-renderer
|
|
2
2
|
|
|
3
|
+
## 4.0.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`2b78b030e4e42`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2b78b030e4e42) -
|
|
8
|
+
EDITOR-3952 Update style for task in destination synced block
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 4.0.9
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
|
@@ -6,11 +6,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.AKRendererWrapper = void 0;
|
|
9
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
+
var _reactIntlNext = require("react-intl-next");
|
|
14
|
+
var _messages = require("@atlaskit/editor-common/messages");
|
|
12
15
|
var _renderer = require("@atlaskit/renderer");
|
|
13
16
|
var _actions = require("@atlaskit/renderer/actions");
|
|
17
|
+
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
18
|
+
var _excluded = ["componentKey"];
|
|
14
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); }
|
|
15
20
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16
21
|
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) { (0, _defineProperty2.default)(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; }
|
|
@@ -25,6 +30,26 @@ var ValidationContextWrapper = function ValidationContextWrapper(_ref) {
|
|
|
25
30
|
value: validationContextValue
|
|
26
31
|
}, children);
|
|
27
32
|
};
|
|
33
|
+
var DisabledTaskWithTooltip = function DisabledTaskWithTooltip(_ref2) {
|
|
34
|
+
var componentKey = _ref2.componentKey,
|
|
35
|
+
props = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
|
|
36
|
+
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
37
|
+
formatMessage = _useIntl.formatMessage;
|
|
38
|
+
var tooltipContent = formatMessage(_messages.syncBlockMessages.taskInDestinationSyncedBlockTooltip);
|
|
39
|
+
var Component = _renderer.defaultNodeComponents[componentKey];
|
|
40
|
+
return /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
41
|
+
content: tooltipContent,
|
|
42
|
+
position: "auto-start"
|
|
43
|
+
}, function (tooltipProps) {
|
|
44
|
+
return (
|
|
45
|
+
/*#__PURE__*/
|
|
46
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
47
|
+
_react.default.createElement("div", tooltipProps, /*#__PURE__*/_react.default.createElement(Component, (0, _extends2.default)({}, props, {
|
|
48
|
+
disableOnChange: true
|
|
49
|
+
})))
|
|
50
|
+
);
|
|
51
|
+
});
|
|
52
|
+
};
|
|
28
53
|
var defaultOptions = {
|
|
29
54
|
allowAltTextOnImages: true,
|
|
30
55
|
allowAnnotations: true,
|
|
@@ -46,42 +71,40 @@ var defaultOptions = {
|
|
|
46
71
|
},
|
|
47
72
|
smartLinks: undefined
|
|
48
73
|
};
|
|
49
|
-
var AKRendererWrapper = exports.AKRendererWrapper = /*#__PURE__*/(0, _react.memo)(function (
|
|
50
|
-
var doc =
|
|
51
|
-
dataProviders =
|
|
52
|
-
options =
|
|
74
|
+
var AKRendererWrapper = exports.AKRendererWrapper = /*#__PURE__*/(0, _react.memo)(function (_ref3) {
|
|
75
|
+
var doc = _ref3.doc,
|
|
76
|
+
dataProviders = _ref3.dataProviders,
|
|
77
|
+
options = _ref3.options;
|
|
53
78
|
var mergedOptions = _objectSpread(_objectSpread({}, defaultOptions), options);
|
|
54
|
-
var
|
|
55
|
-
allowAltTextOnImages =
|
|
56
|
-
allowAnnotations =
|
|
57
|
-
allowColumnSorting =
|
|
58
|
-
allowCopyToClipboard =
|
|
59
|
-
allowCustomPanels =
|
|
60
|
-
allowHeadingAnchorLinks =
|
|
61
|
-
allowPlaceholderText =
|
|
62
|
-
allowRendererContainerStyles =
|
|
63
|
-
allowSelectAllTrap =
|
|
64
|
-
allowUgcScrubber =
|
|
65
|
-
allowWrapCodeBlock =
|
|
66
|
-
emojiResourceConfig =
|
|
67
|
-
media =
|
|
68
|
-
smartLinks =
|
|
69
|
-
stickyHeaders =
|
|
79
|
+
var _ref4 = mergedOptions !== null && mergedOptions !== void 0 ? mergedOptions : {},
|
|
80
|
+
allowAltTextOnImages = _ref4.allowAltTextOnImages,
|
|
81
|
+
allowAnnotations = _ref4.allowAnnotations,
|
|
82
|
+
allowColumnSorting = _ref4.allowColumnSorting,
|
|
83
|
+
allowCopyToClipboard = _ref4.allowCopyToClipboard,
|
|
84
|
+
allowCustomPanels = _ref4.allowCustomPanels,
|
|
85
|
+
allowHeadingAnchorLinks = _ref4.allowHeadingAnchorLinks,
|
|
86
|
+
allowPlaceholderText = _ref4.allowPlaceholderText,
|
|
87
|
+
allowRendererContainerStyles = _ref4.allowRendererContainerStyles,
|
|
88
|
+
allowSelectAllTrap = _ref4.allowSelectAllTrap,
|
|
89
|
+
allowUgcScrubber = _ref4.allowUgcScrubber,
|
|
90
|
+
allowWrapCodeBlock = _ref4.allowWrapCodeBlock,
|
|
91
|
+
emojiResourceConfig = _ref4.emojiResourceConfig,
|
|
92
|
+
media = _ref4.media,
|
|
93
|
+
smartLinks = _ref4.smartLinks,
|
|
94
|
+
stickyHeaders = _ref4.stickyHeaders;
|
|
70
95
|
var nodeComponents = (0, _react.useMemo)(function () {
|
|
71
96
|
return {
|
|
72
97
|
taskItem: function taskItem(props) {
|
|
73
|
-
var TaskItem = _renderer.defaultNodeComponents['taskItem'];
|
|
74
98
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
75
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
76
|
-
|
|
77
|
-
}));
|
|
99
|
+
return /*#__PURE__*/_react.default.createElement(DisabledTaskWithTooltip, (0, _extends2.default)({
|
|
100
|
+
componentKey: "taskItem"
|
|
101
|
+
}, props));
|
|
78
102
|
},
|
|
79
103
|
blockTaskItem: function blockTaskItem(props) {
|
|
80
|
-
var BlockTaskItem = _renderer.defaultNodeComponents['blockTaskItem'];
|
|
81
104
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
82
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
83
|
-
|
|
84
|
-
}));
|
|
105
|
+
return /*#__PURE__*/_react.default.createElement(DisabledTaskWithTooltip, (0, _extends2.default)({
|
|
106
|
+
componentKey: "blockTaskItem"
|
|
107
|
+
}, props));
|
|
85
108
|
}
|
|
86
109
|
};
|
|
87
110
|
}, []);
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { memo, useMemo } from 'react';
|
|
3
|
+
import { useIntl } from 'react-intl-next';
|
|
4
|
+
import { syncBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
3
5
|
import { ReactRenderer, ValidationContextProvider, defaultNodeComponents } from '@atlaskit/renderer';
|
|
4
6
|
import { RendererActionsContext } from '@atlaskit/renderer/actions';
|
|
7
|
+
import Tooltip from '@atlaskit/tooltip';
|
|
5
8
|
const ValidationContextWrapper = ({
|
|
6
9
|
children
|
|
7
10
|
}) => {
|
|
@@ -12,6 +15,25 @@ const ValidationContextWrapper = ({
|
|
|
12
15
|
value: validationContextValue
|
|
13
16
|
}, children);
|
|
14
17
|
};
|
|
18
|
+
const DisabledTaskWithTooltip = ({
|
|
19
|
+
componentKey,
|
|
20
|
+
...props
|
|
21
|
+
}) => {
|
|
22
|
+
const {
|
|
23
|
+
formatMessage
|
|
24
|
+
} = useIntl();
|
|
25
|
+
const tooltipContent = formatMessage(messages.taskInDestinationSyncedBlockTooltip);
|
|
26
|
+
const Component = defaultNodeComponents[componentKey];
|
|
27
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
28
|
+
content: tooltipContent,
|
|
29
|
+
position: "auto-start"
|
|
30
|
+
}, tooltipProps =>
|
|
31
|
+
/*#__PURE__*/
|
|
32
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
33
|
+
React.createElement("div", tooltipProps, /*#__PURE__*/React.createElement(Component, _extends({}, props, {
|
|
34
|
+
disableOnChange: true
|
|
35
|
+
}))));
|
|
36
|
+
};
|
|
15
37
|
const defaultOptions = {
|
|
16
38
|
allowAltTextOnImages: true,
|
|
17
39
|
allowAnnotations: true,
|
|
@@ -62,18 +84,16 @@ export const AKRendererWrapper = /*#__PURE__*/memo(({
|
|
|
62
84
|
const nodeComponents = useMemo(() => {
|
|
63
85
|
return {
|
|
64
86
|
taskItem: props => {
|
|
65
|
-
const TaskItem = defaultNodeComponents['taskItem'];
|
|
66
87
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
67
|
-
return /*#__PURE__*/React.createElement(
|
|
68
|
-
|
|
69
|
-
}));
|
|
88
|
+
return /*#__PURE__*/React.createElement(DisabledTaskWithTooltip, _extends({
|
|
89
|
+
componentKey: "taskItem"
|
|
90
|
+
}, props));
|
|
70
91
|
},
|
|
71
92
|
blockTaskItem: props => {
|
|
72
|
-
const BlockTaskItem = defaultNodeComponents['blockTaskItem'];
|
|
73
93
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
74
|
-
return /*#__PURE__*/React.createElement(
|
|
75
|
-
|
|
76
|
-
}));
|
|
94
|
+
return /*#__PURE__*/React.createElement(DisabledTaskWithTooltip, _extends({
|
|
95
|
+
componentKey: "blockTaskItem"
|
|
96
|
+
}, props));
|
|
77
97
|
}
|
|
78
98
|
};
|
|
79
99
|
}, []);
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
+
var _excluded = ["componentKey"];
|
|
3
5
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
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; }
|
|
5
7
|
import React, { memo, useMemo } from 'react';
|
|
8
|
+
import { useIntl } from 'react-intl-next';
|
|
9
|
+
import { syncBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
6
10
|
import { ReactRenderer, ValidationContextProvider, defaultNodeComponents } from '@atlaskit/renderer';
|
|
7
11
|
import { RendererActionsContext } from '@atlaskit/renderer/actions';
|
|
12
|
+
import Tooltip from '@atlaskit/tooltip';
|
|
8
13
|
var ValidationContextWrapper = function ValidationContextWrapper(_ref) {
|
|
9
14
|
var children = _ref.children;
|
|
10
15
|
var validationContextValue = useMemo(function () {
|
|
@@ -16,6 +21,26 @@ var ValidationContextWrapper = function ValidationContextWrapper(_ref) {
|
|
|
16
21
|
value: validationContextValue
|
|
17
22
|
}, children);
|
|
18
23
|
};
|
|
24
|
+
var DisabledTaskWithTooltip = function DisabledTaskWithTooltip(_ref2) {
|
|
25
|
+
var componentKey = _ref2.componentKey,
|
|
26
|
+
props = _objectWithoutProperties(_ref2, _excluded);
|
|
27
|
+
var _useIntl = useIntl(),
|
|
28
|
+
formatMessage = _useIntl.formatMessage;
|
|
29
|
+
var tooltipContent = formatMessage(messages.taskInDestinationSyncedBlockTooltip);
|
|
30
|
+
var Component = defaultNodeComponents[componentKey];
|
|
31
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
32
|
+
content: tooltipContent,
|
|
33
|
+
position: "auto-start"
|
|
34
|
+
}, function (tooltipProps) {
|
|
35
|
+
return (
|
|
36
|
+
/*#__PURE__*/
|
|
37
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
38
|
+
React.createElement("div", tooltipProps, /*#__PURE__*/React.createElement(Component, _extends({}, props, {
|
|
39
|
+
disableOnChange: true
|
|
40
|
+
})))
|
|
41
|
+
);
|
|
42
|
+
});
|
|
43
|
+
};
|
|
19
44
|
var defaultOptions = {
|
|
20
45
|
allowAltTextOnImages: true,
|
|
21
46
|
allowAnnotations: true,
|
|
@@ -37,42 +62,40 @@ var defaultOptions = {
|
|
|
37
62
|
},
|
|
38
63
|
smartLinks: undefined
|
|
39
64
|
};
|
|
40
|
-
export var AKRendererWrapper = /*#__PURE__*/memo(function (
|
|
41
|
-
var doc =
|
|
42
|
-
dataProviders =
|
|
43
|
-
options =
|
|
65
|
+
export var AKRendererWrapper = /*#__PURE__*/memo(function (_ref3) {
|
|
66
|
+
var doc = _ref3.doc,
|
|
67
|
+
dataProviders = _ref3.dataProviders,
|
|
68
|
+
options = _ref3.options;
|
|
44
69
|
var mergedOptions = _objectSpread(_objectSpread({}, defaultOptions), options);
|
|
45
|
-
var
|
|
46
|
-
allowAltTextOnImages =
|
|
47
|
-
allowAnnotations =
|
|
48
|
-
allowColumnSorting =
|
|
49
|
-
allowCopyToClipboard =
|
|
50
|
-
allowCustomPanels =
|
|
51
|
-
allowHeadingAnchorLinks =
|
|
52
|
-
allowPlaceholderText =
|
|
53
|
-
allowRendererContainerStyles =
|
|
54
|
-
allowSelectAllTrap =
|
|
55
|
-
allowUgcScrubber =
|
|
56
|
-
allowWrapCodeBlock =
|
|
57
|
-
emojiResourceConfig =
|
|
58
|
-
media =
|
|
59
|
-
smartLinks =
|
|
60
|
-
stickyHeaders =
|
|
70
|
+
var _ref4 = mergedOptions !== null && mergedOptions !== void 0 ? mergedOptions : {},
|
|
71
|
+
allowAltTextOnImages = _ref4.allowAltTextOnImages,
|
|
72
|
+
allowAnnotations = _ref4.allowAnnotations,
|
|
73
|
+
allowColumnSorting = _ref4.allowColumnSorting,
|
|
74
|
+
allowCopyToClipboard = _ref4.allowCopyToClipboard,
|
|
75
|
+
allowCustomPanels = _ref4.allowCustomPanels,
|
|
76
|
+
allowHeadingAnchorLinks = _ref4.allowHeadingAnchorLinks,
|
|
77
|
+
allowPlaceholderText = _ref4.allowPlaceholderText,
|
|
78
|
+
allowRendererContainerStyles = _ref4.allowRendererContainerStyles,
|
|
79
|
+
allowSelectAllTrap = _ref4.allowSelectAllTrap,
|
|
80
|
+
allowUgcScrubber = _ref4.allowUgcScrubber,
|
|
81
|
+
allowWrapCodeBlock = _ref4.allowWrapCodeBlock,
|
|
82
|
+
emojiResourceConfig = _ref4.emojiResourceConfig,
|
|
83
|
+
media = _ref4.media,
|
|
84
|
+
smartLinks = _ref4.smartLinks,
|
|
85
|
+
stickyHeaders = _ref4.stickyHeaders;
|
|
61
86
|
var nodeComponents = useMemo(function () {
|
|
62
87
|
return {
|
|
63
88
|
taskItem: function taskItem(props) {
|
|
64
|
-
var TaskItem = defaultNodeComponents['taskItem'];
|
|
65
89
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
66
|
-
return /*#__PURE__*/React.createElement(
|
|
67
|
-
|
|
68
|
-
}));
|
|
90
|
+
return /*#__PURE__*/React.createElement(DisabledTaskWithTooltip, _extends({
|
|
91
|
+
componentKey: "taskItem"
|
|
92
|
+
}, props));
|
|
69
93
|
},
|
|
70
94
|
blockTaskItem: function blockTaskItem(props) {
|
|
71
|
-
var BlockTaskItem = defaultNodeComponents['blockTaskItem'];
|
|
72
95
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
73
|
-
return /*#__PURE__*/React.createElement(
|
|
74
|
-
|
|
75
|
-
}));
|
|
96
|
+
return /*#__PURE__*/React.createElement(DisabledTaskWithTooltip, _extends({
|
|
97
|
+
componentKey: "blockTaskItem"
|
|
98
|
+
}, props));
|
|
76
99
|
}
|
|
77
100
|
};
|
|
78
101
|
}, []);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-synced-block-renderer",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.10",
|
|
4
4
|
"description": "SyncedBlockRenderer for @atlaskit/editor-plugin-synced-block",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"@atlaskit/renderer": "^124.22.0",
|
|
41
41
|
"@atlaskit/spinner": "^19.0.0",
|
|
42
42
|
"@atlaskit/tokens": "^9.0.0",
|
|
43
|
+
"@atlaskit/tooltip": "^20.11.0",
|
|
43
44
|
"@babel/runtime": "^7.0.0",
|
|
44
45
|
"react-relay": "npm:atl-react-relay@0.0.0-main-39e79f66",
|
|
45
46
|
"relay-runtime": "npm:atl-relay-runtime@0.0.0-main-39e79f66"
|