@atlaskit/editor-common 112.13.2 → 112.13.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 +17 -0
- package/afm-cc/tsconfig.json +0 -3
- package/afm-jira/tsconfig.json +0 -3
- package/afm-products/tsconfig.json +0 -3
- package/dist/cjs/extensibility/Extension/Extension/index.js +2 -17
- package/dist/cjs/extensibility/index.js +0 -7
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/node-width/index.js +3 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/extensibility/Extension/Extension/index.js +1 -12
- package/dist/es2019/extensibility/index.js +0 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/node-width/index.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/extensibility/Extension/Extension/index.js +2 -17
- package/dist/esm/extensibility/index.js +0 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/node-width/index.js +2 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/extensibility/index.d.ts +0 -1
- package/dist/types/node-width/index.d.ts +1 -1
- package/dist/types-ts4.5/extensibility/index.d.ts +0 -1
- package/dist/types-ts4.5/node-width/index.d.ts +1 -1
- package/package.json +5 -3
- package/dist/cjs/extensibility/Extension/LegacyContentHeader/index.js +0 -113
- package/dist/es2019/extensibility/Extension/LegacyContentHeader/index.js +0 -108
- package/dist/esm/extensibility/Extension/LegacyContentHeader/index.js +0 -106
- package/dist/types/extensibility/Extension/LegacyContentHeader/index.d.ts +0 -12
- package/dist/types-ts4.5/extensibility/Extension/LegacyContentHeader/index.d.ts +0 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 112.13.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`6442aba65e911`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6442aba65e911) -
|
|
8
|
+
Clean up cc_editor_lcm_readonly_initial experiment - remove LegacyContentHeader rendering and
|
|
9
|
+
associated dead code
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 112.13.3
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [`55ea61cf8df26`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/55ea61cf8df26) -
|
|
17
|
+
Enable table scaling in bodiedSyncBlock nested editor (behind platform_synced_block_patch_8)
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 112.13.2
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
package/afm-jira/tsconfig.json
CHANGED
|
@@ -18,7 +18,6 @@ var _hooks = require("../../../hooks");
|
|
|
18
18
|
var _ui = require("../../../ui");
|
|
19
19
|
var _utils = require("../../../utils");
|
|
20
20
|
var _shouldExtensionBreakout = require("../../utils/should-extension-breakout");
|
|
21
|
-
var _LegacyContentHeader = require("../LegacyContentHeader");
|
|
22
21
|
var _Lozenge = _interopRequireDefault(require("../Lozenge"));
|
|
23
22
|
var _styles = require("../styles");
|
|
24
23
|
var _extensionUtils = require("./extension-utils");
|
|
@@ -102,8 +101,7 @@ function ExtensionWithPluginState(props) {
|
|
|
102
101
|
'with-margin-styles': showMacroInteractionDesignUpdates && !isNodeNested && !showBodiedExtensionRendererView,
|
|
103
102
|
'with-hover-border': (0, _expValEquals.expValEquals)('cc_editor_ttvc_release_bundle_one', 'extensionHoverRefactor', true) ? false : showMacroInteractionDesignUpdates && isNodeHovered,
|
|
104
103
|
'with-danger-overlay': showMacroInteractionDesignUpdates,
|
|
105
|
-
'without-frame': removeBorder
|
|
106
|
-
'legacy-content': (0, _expValEquals.expValEquals)('cc_editor_lcm_readonly_initial', 'isEnabled', true) ? undefined : showLegacyContentHeader
|
|
104
|
+
'without-frame': removeBorder
|
|
107
105
|
}, _styles2.widerLayoutClassName, shouldBreakout));
|
|
108
106
|
var overflowClassNames = (0, _classnames2.default)('extension-overflow-wrapper', {
|
|
109
107
|
'with-body': hasBody,
|
|
@@ -146,20 +144,7 @@ function ExtensionWithPluginState(props) {
|
|
|
146
144
|
}
|
|
147
145
|
};
|
|
148
146
|
var extensionContentStyles = (0, _expValEquals.expValEquals)('platform_editor_extension_styles', 'isEnabled', true) ? _styles2.extensionContent : _styles2.content;
|
|
149
|
-
return (0, _react2.jsx)(_react.Fragment, null,
|
|
150
|
-
isNodeSelected: isNodeSelected,
|
|
151
|
-
isNodeHovered: isNodeHovered
|
|
152
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
153
|
-
,
|
|
154
|
-
onMouseEnter: function onMouseEnter() {
|
|
155
|
-
return handleMouseEvent(true);
|
|
156
|
-
}
|
|
157
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
158
|
-
,
|
|
159
|
-
onMouseLeave: function onMouseLeave() {
|
|
160
|
-
return handleMouseEvent(false);
|
|
161
|
-
}
|
|
162
|
-
}), !showLegacyContentHeader && showMacroInteractionDesignUpdates && !isLivePageViewMode && (0, _react2.jsx)(_Lozenge.default, {
|
|
147
|
+
return (0, _react2.jsx)(_react.Fragment, null, !showLegacyContentHeader && showMacroInteractionDesignUpdates && !isLivePageViewMode && (0, _react2.jsx)(_Lozenge.default, {
|
|
163
148
|
isNodeSelected: isNodeSelected,
|
|
164
149
|
isNodeHovered: isNodeHovered,
|
|
165
150
|
isNodeNested: isNodeNested,
|
|
@@ -34,15 +34,8 @@ Object.defineProperty(exports, "ExtensionNodeWrapper", {
|
|
|
34
34
|
return _ExtensionNodeWrapper.ExtensionNodeWrapper;
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
|
-
Object.defineProperty(exports, "LegacyContentHeader", {
|
|
38
|
-
enumerable: true,
|
|
39
|
-
get: function get() {
|
|
40
|
-
return _LegacyContentHeader.LegacyContentHeader;
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
37
|
var _ExtensionNodeWrapper = require("./ExtensionNodeWrapper");
|
|
44
38
|
var _Extension = require("./Extension");
|
|
45
|
-
var _LegacyContentHeader = require("./Extension/LegacyContentHeader");
|
|
46
39
|
var _extensionNodeView = _interopRequireWildcard(require("./extensionNodeView"));
|
|
47
40
|
var _ExtensionComponent = require("./ExtensionComponent");
|
|
48
41
|
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); }
|
|
@@ -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.13.
|
|
22
|
+
var packageVersion = "112.13.3";
|
|
23
23
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
24
24
|
// Remove URL as it has UGC
|
|
25
25
|
// Ignored via go/ees007
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.layoutToWidth = exports.getTableWidthWithNumberColumn = exports.getTableContainerWidth = exports.getParentNodeWidth = void 0;
|
|
8
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
7
9
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
8
10
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
9
11
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
@@ -111,7 +113,7 @@ var getNestedParentNode = function getNestedParentNode(tablePos, state) {
|
|
|
111
113
|
return null;
|
|
112
114
|
}
|
|
113
115
|
var $pos = state.doc.resolve(tablePos);
|
|
114
|
-
var parent = (0, _utils.findParentNodeOfTypeClosestToPos)($pos, [state.schema.nodes.bodiedExtension, state.schema.nodes.extensionFrame, state.schema.nodes.layoutSection, state.schema.nodes.expand, state.schema.nodes.tableCell, state.schema.nodes.tableHeader]);
|
|
116
|
+
var parent = (0, _utils.findParentNodeOfTypeClosestToPos)($pos, [state.schema.nodes.bodiedExtension, state.schema.nodes.extensionFrame, state.schema.nodes.layoutSection, state.schema.nodes.expand, state.schema.nodes.tableCell, state.schema.nodes.tableHeader].concat((0, _toConsumableArray2.default)((0, _platformFeatureFlags.fg)('platform_synced_block_patch_8') ? [state.schema.nodes.bodiedSyncBlock] : [])));
|
|
115
117
|
return parent ? parent.node : null;
|
|
116
118
|
};
|
|
117
119
|
var calcBreakoutNodeWidth = function calcBreakoutNodeWidth(layout, containerWidth, isFullWidthModeEnabled, breakoutWidth) {
|
|
@@ -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.13.
|
|
27
|
+
var packageVersion = "112.13.3";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -15,7 +15,6 @@ import { useSharedPluginStateWithSelector } from '../../../hooks';
|
|
|
15
15
|
import { overflowShadow } from '../../../ui';
|
|
16
16
|
import { calculateBreakoutStyles } from '../../../utils';
|
|
17
17
|
import { shouldExtensionBreakout } from '../../utils/should-extension-breakout';
|
|
18
|
-
import { LegacyContentHeader } from '../LegacyContentHeader';
|
|
19
18
|
import ExtensionLozenge from '../Lozenge';
|
|
20
19
|
import { overlay } from '../styles';
|
|
21
20
|
import { isEmptyBodiedMacro } from './extension-utils';
|
|
@@ -96,7 +95,6 @@ function ExtensionWithPluginState(props) {
|
|
|
96
95
|
'with-hover-border': expValEquals('cc_editor_ttvc_release_bundle_one', 'extensionHoverRefactor', true) ? false : showMacroInteractionDesignUpdates && isNodeHovered,
|
|
97
96
|
'with-danger-overlay': showMacroInteractionDesignUpdates,
|
|
98
97
|
'without-frame': removeBorder,
|
|
99
|
-
'legacy-content': expValEquals('cc_editor_lcm_readonly_initial', 'isEnabled', true) ? undefined : showLegacyContentHeader,
|
|
100
98
|
[widerLayoutClassName]: shouldBreakout
|
|
101
99
|
});
|
|
102
100
|
const overflowClassNames = classnames('extension-overflow-wrapper', {
|
|
@@ -146,16 +144,7 @@ function ExtensionWithPluginState(props) {
|
|
|
146
144
|
}
|
|
147
145
|
};
|
|
148
146
|
const extensionContentStyles = expValEquals('platform_editor_extension_styles', 'isEnabled', true) ? extensionContent : content;
|
|
149
|
-
return jsx(Fragment, null,
|
|
150
|
-
isNodeSelected: isNodeSelected,
|
|
151
|
-
isNodeHovered: isNodeHovered
|
|
152
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
153
|
-
,
|
|
154
|
-
onMouseEnter: () => handleMouseEvent(true)
|
|
155
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
156
|
-
,
|
|
157
|
-
onMouseLeave: () => handleMouseEvent(false)
|
|
158
|
-
}), !showLegacyContentHeader && showMacroInteractionDesignUpdates && !isLivePageViewMode && jsx(ExtensionLozenge, {
|
|
147
|
+
return jsx(Fragment, null, !showLegacyContentHeader && showMacroInteractionDesignUpdates && !isLivePageViewMode && jsx(ExtensionLozenge, {
|
|
159
148
|
isNodeSelected: isNodeSelected,
|
|
160
149
|
isNodeHovered: isNodeHovered,
|
|
161
150
|
isNodeNested: isNodeNested,
|
|
@@ -3,6 +3,5 @@
|
|
|
3
3
|
|
|
4
4
|
export { ExtensionNodeWrapper } from './ExtensionNodeWrapper';
|
|
5
5
|
export { Extension } from './Extension';
|
|
6
|
-
export { LegacyContentHeader } from './Extension/LegacyContentHeader';
|
|
7
6
|
export { default as ExtensionNodeView, ExtensionNode } from './extensionNodeView';
|
|
8
7
|
export { ExtensionComponent } from './ExtensionComponent';
|
|
@@ -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.13.
|
|
7
|
+
const packageVersion = "112.13.3";
|
|
8
8
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
9
9
|
// Remove URL as it has UGC
|
|
10
10
|
// Ignored via go/ees007
|
|
@@ -105,7 +105,7 @@ const getNestedParentNode = (tablePos, state) => {
|
|
|
105
105
|
return null;
|
|
106
106
|
}
|
|
107
107
|
const $pos = state.doc.resolve(tablePos);
|
|
108
|
-
const parent = findParentNodeOfTypeClosestToPos($pos, [state.schema.nodes.bodiedExtension, state.schema.nodes.extensionFrame, state.schema.nodes.layoutSection, state.schema.nodes.expand, state.schema.nodes.tableCell, state.schema.nodes.tableHeader]);
|
|
108
|
+
const parent = findParentNodeOfTypeClosestToPos($pos, [state.schema.nodes.bodiedExtension, state.schema.nodes.extensionFrame, state.schema.nodes.layoutSection, state.schema.nodes.expand, state.schema.nodes.tableCell, state.schema.nodes.tableHeader, ...(fg('platform_synced_block_patch_8') ? [state.schema.nodes.bodiedSyncBlock] : [])]);
|
|
109
109
|
return parent ? parent.node : null;
|
|
110
110
|
};
|
|
111
111
|
const calcBreakoutNodeWidth = (layout, containerWidth, isFullWidthModeEnabled, breakoutWidth) => {
|
|
@@ -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.13.
|
|
17
|
+
const packageVersion = "112.13.3";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -20,7 +20,6 @@ import { useSharedPluginStateWithSelector } from '../../../hooks';
|
|
|
20
20
|
import { overflowShadow } from '../../../ui';
|
|
21
21
|
import { calculateBreakoutStyles } from '../../../utils';
|
|
22
22
|
import { shouldExtensionBreakout } from '../../utils/should-extension-breakout';
|
|
23
|
-
import { LegacyContentHeader } from '../LegacyContentHeader';
|
|
24
23
|
import ExtensionLozenge from '../Lozenge';
|
|
25
24
|
import { overlay } from '../styles';
|
|
26
25
|
import { isEmptyBodiedMacro } from './extension-utils';
|
|
@@ -95,8 +94,7 @@ function ExtensionWithPluginState(props) {
|
|
|
95
94
|
'with-margin-styles': showMacroInteractionDesignUpdates && !isNodeNested && !showBodiedExtensionRendererView,
|
|
96
95
|
'with-hover-border': expValEquals('cc_editor_ttvc_release_bundle_one', 'extensionHoverRefactor', true) ? false : showMacroInteractionDesignUpdates && isNodeHovered,
|
|
97
96
|
'with-danger-overlay': showMacroInteractionDesignUpdates,
|
|
98
|
-
'without-frame': removeBorder
|
|
99
|
-
'legacy-content': expValEquals('cc_editor_lcm_readonly_initial', 'isEnabled', true) ? undefined : showLegacyContentHeader
|
|
97
|
+
'without-frame': removeBorder
|
|
100
98
|
}, widerLayoutClassName, shouldBreakout));
|
|
101
99
|
var overflowClassNames = classnames('extension-overflow-wrapper', {
|
|
102
100
|
'with-body': hasBody,
|
|
@@ -139,20 +137,7 @@ function ExtensionWithPluginState(props) {
|
|
|
139
137
|
}
|
|
140
138
|
};
|
|
141
139
|
var extensionContentStyles = expValEquals('platform_editor_extension_styles', 'isEnabled', true) ? extensionContent : content;
|
|
142
|
-
return jsx(Fragment, null,
|
|
143
|
-
isNodeSelected: isNodeSelected,
|
|
144
|
-
isNodeHovered: isNodeHovered
|
|
145
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
146
|
-
,
|
|
147
|
-
onMouseEnter: function onMouseEnter() {
|
|
148
|
-
return handleMouseEvent(true);
|
|
149
|
-
}
|
|
150
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
151
|
-
,
|
|
152
|
-
onMouseLeave: function onMouseLeave() {
|
|
153
|
-
return handleMouseEvent(false);
|
|
154
|
-
}
|
|
155
|
-
}), !showLegacyContentHeader && showMacroInteractionDesignUpdates && !isLivePageViewMode && jsx(ExtensionLozenge, {
|
|
140
|
+
return jsx(Fragment, null, !showLegacyContentHeader && showMacroInteractionDesignUpdates && !isLivePageViewMode && jsx(ExtensionLozenge, {
|
|
156
141
|
isNodeSelected: isNodeSelected,
|
|
157
142
|
isNodeHovered: isNodeHovered,
|
|
158
143
|
isNodeNested: isNodeNested,
|
|
@@ -3,6 +3,5 @@
|
|
|
3
3
|
|
|
4
4
|
export { ExtensionNodeWrapper } from './ExtensionNodeWrapper';
|
|
5
5
|
export { Extension } from './Extension';
|
|
6
|
-
export { LegacyContentHeader } from './Extension/LegacyContentHeader';
|
|
7
6
|
export { default as ExtensionNodeView, ExtensionNode } from './extensionNodeView';
|
|
8
7
|
export { ExtensionComponent } from './ExtensionComponent';
|
|
@@ -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.13.
|
|
13
|
+
var packageVersion = "112.13.3";
|
|
14
14
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
15
15
|
// Remove URL as it has UGC
|
|
16
16
|
// Ignored via go/ees007
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
1
2
|
import { findParentNodeOfTypeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
|
|
2
3
|
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic, akEditorWideLayoutWidth, gridMediumMaxWidth } from '@atlaskit/editor-shared-styles';
|
|
3
4
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -105,7 +106,7 @@ var getNestedParentNode = function getNestedParentNode(tablePos, state) {
|
|
|
105
106
|
return null;
|
|
106
107
|
}
|
|
107
108
|
var $pos = state.doc.resolve(tablePos);
|
|
108
|
-
var parent = findParentNodeOfTypeClosestToPos($pos, [state.schema.nodes.bodiedExtension, state.schema.nodes.extensionFrame, state.schema.nodes.layoutSection, state.schema.nodes.expand, state.schema.nodes.tableCell, state.schema.nodes.tableHeader]);
|
|
109
|
+
var parent = findParentNodeOfTypeClosestToPos($pos, [state.schema.nodes.bodiedExtension, state.schema.nodes.extensionFrame, state.schema.nodes.layoutSection, state.schema.nodes.expand, state.schema.nodes.tableCell, state.schema.nodes.tableHeader].concat(_toConsumableArray(fg('platform_synced_block_patch_8') ? [state.schema.nodes.bodiedSyncBlock] : [])));
|
|
109
110
|
return parent ? parent.node : null;
|
|
110
111
|
};
|
|
111
112
|
var calcBreakoutNodeWidth = function calcBreakoutNodeWidth(layout, containerWidth, isFullWidthModeEnabled, breakoutWidth) {
|
|
@@ -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.13.
|
|
24
|
+
var packageVersion = "112.13.3";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { ExtensionNodeWrapper } from './ExtensionNodeWrapper';
|
|
2
2
|
export { Extension } from './Extension';
|
|
3
|
-
export { LegacyContentHeader } from './Extension/LegacyContentHeader';
|
|
4
3
|
export { default as ExtensionNodeView, ExtensionNode } from './extensionNodeView';
|
|
5
4
|
export { ExtensionComponent } from './ExtensionComponent';
|
|
6
5
|
export type { MacroInteractionDesignFeatureFlags, GetPMNodeHeight } from './types';
|
|
@@ -3,8 +3,8 @@ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
|
3
3
|
import type { EditorContainerWidth } from '../types/editor-container-width';
|
|
4
4
|
export declare const layoutToWidth: {
|
|
5
5
|
default: number;
|
|
6
|
-
wide: number;
|
|
7
6
|
'full-width': number;
|
|
7
|
+
wide: number;
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
10
|
* Calculates width of parent node of a nested node (inside layouts, extension)
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { ExtensionNodeWrapper } from './ExtensionNodeWrapper';
|
|
2
2
|
export { Extension } from './Extension';
|
|
3
|
-
export { LegacyContentHeader } from './Extension/LegacyContentHeader';
|
|
4
3
|
export { default as ExtensionNodeView, ExtensionNode } from './extensionNodeView';
|
|
5
4
|
export { ExtensionComponent } from './ExtensionComponent';
|
|
6
5
|
export type { MacroInteractionDesignFeatureFlags, GetPMNodeHeight } from './types';
|
|
@@ -3,8 +3,8 @@ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
|
3
3
|
import type { EditorContainerWidth } from '../types/editor-container-width';
|
|
4
4
|
export declare const layoutToWidth: {
|
|
5
5
|
default: number;
|
|
6
|
-
wide: number;
|
|
7
6
|
'full-width': number;
|
|
7
|
+
wide: number;
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
10
|
* Calculates width of parent node of a nested node (inside layouts, extension)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "112.13.
|
|
3
|
+
"version": "112.13.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/"
|
|
@@ -78,10 +78,9 @@
|
|
|
78
78
|
"@atlaskit/smart-card": "^43.28.0",
|
|
79
79
|
"@atlaskit/smart-user-picker": "^9.2.0",
|
|
80
80
|
"@atlaskit/spinner": "^19.0.0",
|
|
81
|
-
"@atlaskit/status": "^3.2.0",
|
|
82
81
|
"@atlaskit/task-decision": "^19.3.0",
|
|
83
82
|
"@atlaskit/textfield": "^8.2.0",
|
|
84
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
83
|
+
"@atlaskit/tmp-editor-statsig": "^51.0.0",
|
|
85
84
|
"@atlaskit/tokens": "^11.4.0",
|
|
86
85
|
"@atlaskit/tooltip": "^21.0.0",
|
|
87
86
|
"@atlaskit/width-detector": "^5.0.0",
|
|
@@ -278,6 +277,9 @@
|
|
|
278
277
|
},
|
|
279
278
|
"platform_editor_media_border_radius_fix": {
|
|
280
279
|
"type": "boolean"
|
|
280
|
+
},
|
|
281
|
+
"platform_synced_block_patch_8": {
|
|
282
|
+
"type": "boolean"
|
|
281
283
|
}
|
|
282
284
|
}
|
|
283
285
|
}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.LegacyContentHeader = void 0;
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
var _react2 = require("@emotion/react");
|
|
10
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
-
var _reactIntlNext = require("react-intl-next");
|
|
12
|
-
var _statusWarning = _interopRequireDefault(require("@atlaskit/icon/core/status-warning"));
|
|
13
|
-
var _link = _interopRequireDefault(require("@atlaskit/link"));
|
|
14
|
-
var _status = require("@atlaskit/status");
|
|
15
|
-
/**
|
|
16
|
-
* @jsxRuntime classic
|
|
17
|
-
* @jsx jsx
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic
|
|
21
|
-
|
|
22
|
-
var i18n = (0, _reactIntlNext.defineMessages)({
|
|
23
|
-
legacyContentHeader: {
|
|
24
|
-
id: 'editor.extension.legacyContentHeader',
|
|
25
|
-
defaultMessage: 'Legacy Content',
|
|
26
|
-
description: 'Header for the legacy content extension in the editor.'
|
|
27
|
-
},
|
|
28
|
-
contentHasLimitedFunctionality: {
|
|
29
|
-
id: 'editor.extension.legacyContentHeader.contentHasLimitedFunctionality',
|
|
30
|
-
defaultMessage: 'This content has limited functionality, ',
|
|
31
|
-
description: 'Message indicating that the legacy content has limited functionality.'
|
|
32
|
-
},
|
|
33
|
-
learnMore: {
|
|
34
|
-
id: 'editor.extension.legacyContentHeader.learnMore',
|
|
35
|
-
defaultMessage: ' Learn more',
|
|
36
|
-
description: 'Link text for learning more about the legacy content.'
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
var lcmHeaderStyles = (0, _react2.css)({
|
|
40
|
-
padding: "0 ".concat("var(--ds-space-200, 16px)", " ", "var(--ds-space-050, 4px)", " ", "var(--ds-space-200, 16px)"),
|
|
41
|
-
backgroundColor: "var(--ds-background-neutral, #0515240F)",
|
|
42
|
-
borderRadius: "var(--ds-radius-small, 4px)".concat(" ", "var(--ds-radius-small, 4px)", " 0 0"),
|
|
43
|
-
boxShadow: "0 0 0 1px ".concat("var(--ds-background-neutral, #0515240F)"),
|
|
44
|
-
position: 'relative',
|
|
45
|
-
top: "-1px",
|
|
46
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
47
|
-
'&.with-hover-border': {
|
|
48
|
-
boxShadow: "0 0 0 1px ".concat("var(--ds-border-input, #8C8F97)")
|
|
49
|
-
},
|
|
50
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
51
|
-
'&.selected': {
|
|
52
|
-
boxShadow: "0 0 0 1px ".concat("var(--ds-border-selected, #1868DB)"),
|
|
53
|
-
backgroundColor: "var(--ds-background-selected, #E9F2FE)"
|
|
54
|
-
},
|
|
55
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
56
|
-
'& .status-lozenge-span': {
|
|
57
|
-
marginRight: "var(--ds-space-100, 8px)"
|
|
58
|
-
},
|
|
59
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
60
|
-
'& > .legacy-content-header-text': {
|
|
61
|
-
font: "var(--ds-font-body-small, normal 400 12px/16px \"Atlassian Sans\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
62
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
63
|
-
'& span': {
|
|
64
|
-
paddingRight: "var(--ds-space-050, 4px)"
|
|
65
|
-
},
|
|
66
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
67
|
-
'& a': {
|
|
68
|
-
cursor: 'pointer'
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
var LegacyContentHeader = exports.LegacyContentHeader = function LegacyContentHeader(_ref) {
|
|
73
|
-
var isNodeHovered = _ref.isNodeHovered,
|
|
74
|
-
isNodeSelected = _ref.isNodeSelected,
|
|
75
|
-
onMouseEnter = _ref.onMouseEnter,
|
|
76
|
-
onMouseLeave = _ref.onMouseLeave;
|
|
77
|
-
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
78
|
-
formatMessage = _useIntl.formatMessage;
|
|
79
|
-
var classNames = (0, _classnames.default)('legacy-content-header', {
|
|
80
|
-
'with-hover-border': isNodeHovered,
|
|
81
|
-
selected: isNodeSelected
|
|
82
|
-
});
|
|
83
|
-
var learnMore = (0, _react.useCallback)(function () {
|
|
84
|
-
window.open('https://support.atlassian.com/confluence-cloud/docs/the-legacy-content-macro/', '_blank');
|
|
85
|
-
}, []);
|
|
86
|
-
return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)("div", {
|
|
87
|
-
"data-testid": "editor-extension-legacy-content-header",
|
|
88
|
-
css: [lcmHeaderStyles]
|
|
89
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
90
|
-
,
|
|
91
|
-
className: classNames
|
|
92
|
-
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
93
|
-
,
|
|
94
|
-
onMouseEnter: onMouseEnter
|
|
95
|
-
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
96
|
-
,
|
|
97
|
-
onMouseLeave: onMouseLeave
|
|
98
|
-
}, (0, _react2.jsx)(_status.Status, {
|
|
99
|
-
text: formatMessage(i18n.legacyContentHeader),
|
|
100
|
-
color: isNodeSelected ? 'blue' : 'neutral',
|
|
101
|
-
style: "bold",
|
|
102
|
-
isBold: true
|
|
103
|
-
}), (0, _react2.jsx)("span", {
|
|
104
|
-
className: "legacy-content-header-text"
|
|
105
|
-
}, (0, _react2.jsx)(_statusWarning.default, {
|
|
106
|
-
label: formatMessage(i18n.contentHasLimitedFunctionality),
|
|
107
|
-
size: "small"
|
|
108
|
-
}), formatMessage(i18n.contentHasLimitedFunctionality), "\xA0", (0, _react2.jsx)(_link.default, {
|
|
109
|
-
onClick: learnMore,
|
|
110
|
-
href: "https://support.atlassian.com/confluence-cloud/docs/the-legacy-content-macro/",
|
|
111
|
-
target: "_blank"
|
|
112
|
-
}, formatMessage(i18n.learnMore)))));
|
|
113
|
-
};
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { Fragment, useCallback } from 'react';
|
|
7
|
-
|
|
8
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic
|
|
9
|
-
import { css, jsx } from '@emotion/react';
|
|
10
|
-
import classnames from 'classnames';
|
|
11
|
-
import { defineMessages, useIntl } from 'react-intl-next';
|
|
12
|
-
import StatusWarningIcon from '@atlaskit/icon/core/status-warning';
|
|
13
|
-
import Link from '@atlaskit/link';
|
|
14
|
-
import { Status } from '@atlaskit/status';
|
|
15
|
-
const i18n = defineMessages({
|
|
16
|
-
legacyContentHeader: {
|
|
17
|
-
id: 'editor.extension.legacyContentHeader',
|
|
18
|
-
defaultMessage: 'Legacy Content',
|
|
19
|
-
description: 'Header for the legacy content extension in the editor.'
|
|
20
|
-
},
|
|
21
|
-
contentHasLimitedFunctionality: {
|
|
22
|
-
id: 'editor.extension.legacyContentHeader.contentHasLimitedFunctionality',
|
|
23
|
-
defaultMessage: 'This content has limited functionality, ',
|
|
24
|
-
description: 'Message indicating that the legacy content has limited functionality.'
|
|
25
|
-
},
|
|
26
|
-
learnMore: {
|
|
27
|
-
id: 'editor.extension.legacyContentHeader.learnMore',
|
|
28
|
-
defaultMessage: ' Learn more',
|
|
29
|
-
description: 'Link text for learning more about the legacy content.'
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
const lcmHeaderStyles = css({
|
|
33
|
-
padding: `0 ${"var(--ds-space-200, 16px)"} ${"var(--ds-space-050, 4px)"} ${"var(--ds-space-200, 16px)"}`,
|
|
34
|
-
backgroundColor: "var(--ds-background-neutral, #0515240F)",
|
|
35
|
-
borderRadius: `${"var(--ds-radius-small, 4px)"} ${"var(--ds-radius-small, 4px)"} 0 0`,
|
|
36
|
-
boxShadow: `0 0 0 1px ${"var(--ds-background-neutral, #0515240F)"}`,
|
|
37
|
-
position: 'relative',
|
|
38
|
-
top: `-1px`,
|
|
39
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
40
|
-
'&.with-hover-border': {
|
|
41
|
-
boxShadow: `0 0 0 1px ${"var(--ds-border-input, #8C8F97)"}`
|
|
42
|
-
},
|
|
43
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
44
|
-
'&.selected': {
|
|
45
|
-
boxShadow: `0 0 0 1px ${"var(--ds-border-selected, #1868DB)"}`,
|
|
46
|
-
backgroundColor: "var(--ds-background-selected, #E9F2FE)"
|
|
47
|
-
},
|
|
48
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
49
|
-
'& .status-lozenge-span': {
|
|
50
|
-
marginRight: "var(--ds-space-100, 8px)"
|
|
51
|
-
},
|
|
52
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
53
|
-
'& > .legacy-content-header-text': {
|
|
54
|
-
font: "var(--ds-font-body-small, normal 400 12px/16px \"Atlassian Sans\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
55
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
56
|
-
'& span': {
|
|
57
|
-
paddingRight: "var(--ds-space-050, 4px)"
|
|
58
|
-
},
|
|
59
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
60
|
-
'& a': {
|
|
61
|
-
cursor: 'pointer'
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
export const LegacyContentHeader = ({
|
|
66
|
-
isNodeHovered,
|
|
67
|
-
isNodeSelected,
|
|
68
|
-
onMouseEnter,
|
|
69
|
-
onMouseLeave
|
|
70
|
-
}) => {
|
|
71
|
-
const {
|
|
72
|
-
formatMessage
|
|
73
|
-
} = useIntl();
|
|
74
|
-
const classNames = classnames('legacy-content-header', {
|
|
75
|
-
'with-hover-border': isNodeHovered,
|
|
76
|
-
selected: isNodeSelected
|
|
77
|
-
});
|
|
78
|
-
const learnMore = useCallback(() => {
|
|
79
|
-
window.open('https://support.atlassian.com/confluence-cloud/docs/the-legacy-content-macro/', '_blank');
|
|
80
|
-
}, []);
|
|
81
|
-
return jsx(Fragment, null, jsx("div", {
|
|
82
|
-
"data-testid": "editor-extension-legacy-content-header",
|
|
83
|
-
css: [lcmHeaderStyles]
|
|
84
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
85
|
-
,
|
|
86
|
-
className: classNames
|
|
87
|
-
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
88
|
-
,
|
|
89
|
-
onMouseEnter: onMouseEnter
|
|
90
|
-
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
91
|
-
,
|
|
92
|
-
onMouseLeave: onMouseLeave
|
|
93
|
-
}, jsx(Status, {
|
|
94
|
-
text: formatMessage(i18n.legacyContentHeader),
|
|
95
|
-
color: isNodeSelected ? 'blue' : 'neutral',
|
|
96
|
-
style: "bold",
|
|
97
|
-
isBold: true
|
|
98
|
-
}), jsx("span", {
|
|
99
|
-
className: "legacy-content-header-text"
|
|
100
|
-
}, jsx(StatusWarningIcon, {
|
|
101
|
-
label: formatMessage(i18n.contentHasLimitedFunctionality),
|
|
102
|
-
size: "small"
|
|
103
|
-
}), formatMessage(i18n.contentHasLimitedFunctionality), "\xA0", jsx(Link, {
|
|
104
|
-
onClick: learnMore,
|
|
105
|
-
href: "https://support.atlassian.com/confluence-cloud/docs/the-legacy-content-macro/",
|
|
106
|
-
target: "_blank"
|
|
107
|
-
}, formatMessage(i18n.learnMore)))));
|
|
108
|
-
};
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { Fragment, useCallback } from 'react';
|
|
7
|
-
|
|
8
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic
|
|
9
|
-
import { css, jsx } from '@emotion/react';
|
|
10
|
-
import classnames from 'classnames';
|
|
11
|
-
import { defineMessages, useIntl } from 'react-intl-next';
|
|
12
|
-
import StatusWarningIcon from '@atlaskit/icon/core/status-warning';
|
|
13
|
-
import Link from '@atlaskit/link';
|
|
14
|
-
import { Status } from '@atlaskit/status';
|
|
15
|
-
var i18n = defineMessages({
|
|
16
|
-
legacyContentHeader: {
|
|
17
|
-
id: 'editor.extension.legacyContentHeader',
|
|
18
|
-
defaultMessage: 'Legacy Content',
|
|
19
|
-
description: 'Header for the legacy content extension in the editor.'
|
|
20
|
-
},
|
|
21
|
-
contentHasLimitedFunctionality: {
|
|
22
|
-
id: 'editor.extension.legacyContentHeader.contentHasLimitedFunctionality',
|
|
23
|
-
defaultMessage: 'This content has limited functionality, ',
|
|
24
|
-
description: 'Message indicating that the legacy content has limited functionality.'
|
|
25
|
-
},
|
|
26
|
-
learnMore: {
|
|
27
|
-
id: 'editor.extension.legacyContentHeader.learnMore',
|
|
28
|
-
defaultMessage: ' Learn more',
|
|
29
|
-
description: 'Link text for learning more about the legacy content.'
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
var lcmHeaderStyles = css({
|
|
33
|
-
padding: "0 ".concat("var(--ds-space-200, 16px)", " ", "var(--ds-space-050, 4px)", " ", "var(--ds-space-200, 16px)"),
|
|
34
|
-
backgroundColor: "var(--ds-background-neutral, #0515240F)",
|
|
35
|
-
borderRadius: "var(--ds-radius-small, 4px)".concat(" ", "var(--ds-radius-small, 4px)", " 0 0"),
|
|
36
|
-
boxShadow: "0 0 0 1px ".concat("var(--ds-background-neutral, #0515240F)"),
|
|
37
|
-
position: 'relative',
|
|
38
|
-
top: "-1px",
|
|
39
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
40
|
-
'&.with-hover-border': {
|
|
41
|
-
boxShadow: "0 0 0 1px ".concat("var(--ds-border-input, #8C8F97)")
|
|
42
|
-
},
|
|
43
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
44
|
-
'&.selected': {
|
|
45
|
-
boxShadow: "0 0 0 1px ".concat("var(--ds-border-selected, #1868DB)"),
|
|
46
|
-
backgroundColor: "var(--ds-background-selected, #E9F2FE)"
|
|
47
|
-
},
|
|
48
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
49
|
-
'& .status-lozenge-span': {
|
|
50
|
-
marginRight: "var(--ds-space-100, 8px)"
|
|
51
|
-
},
|
|
52
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
53
|
-
'& > .legacy-content-header-text': {
|
|
54
|
-
font: "var(--ds-font-body-small, normal 400 12px/16px \"Atlassian Sans\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
55
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
56
|
-
'& span': {
|
|
57
|
-
paddingRight: "var(--ds-space-050, 4px)"
|
|
58
|
-
},
|
|
59
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
60
|
-
'& a': {
|
|
61
|
-
cursor: 'pointer'
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
export var LegacyContentHeader = function LegacyContentHeader(_ref) {
|
|
66
|
-
var isNodeHovered = _ref.isNodeHovered,
|
|
67
|
-
isNodeSelected = _ref.isNodeSelected,
|
|
68
|
-
onMouseEnter = _ref.onMouseEnter,
|
|
69
|
-
onMouseLeave = _ref.onMouseLeave;
|
|
70
|
-
var _useIntl = useIntl(),
|
|
71
|
-
formatMessage = _useIntl.formatMessage;
|
|
72
|
-
var classNames = classnames('legacy-content-header', {
|
|
73
|
-
'with-hover-border': isNodeHovered,
|
|
74
|
-
selected: isNodeSelected
|
|
75
|
-
});
|
|
76
|
-
var learnMore = useCallback(function () {
|
|
77
|
-
window.open('https://support.atlassian.com/confluence-cloud/docs/the-legacy-content-macro/', '_blank');
|
|
78
|
-
}, []);
|
|
79
|
-
return jsx(Fragment, null, jsx("div", {
|
|
80
|
-
"data-testid": "editor-extension-legacy-content-header",
|
|
81
|
-
css: [lcmHeaderStyles]
|
|
82
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
83
|
-
,
|
|
84
|
-
className: classNames
|
|
85
|
-
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
86
|
-
,
|
|
87
|
-
onMouseEnter: onMouseEnter
|
|
88
|
-
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
89
|
-
,
|
|
90
|
-
onMouseLeave: onMouseLeave
|
|
91
|
-
}, jsx(Status, {
|
|
92
|
-
text: formatMessage(i18n.legacyContentHeader),
|
|
93
|
-
color: isNodeSelected ? 'blue' : 'neutral',
|
|
94
|
-
style: "bold",
|
|
95
|
-
isBold: true
|
|
96
|
-
}), jsx("span", {
|
|
97
|
-
className: "legacy-content-header-text"
|
|
98
|
-
}, jsx(StatusWarningIcon, {
|
|
99
|
-
label: formatMessage(i18n.contentHasLimitedFunctionality),
|
|
100
|
-
size: "small"
|
|
101
|
-
}), formatMessage(i18n.contentHasLimitedFunctionality), "\xA0", jsx(Link, {
|
|
102
|
-
onClick: learnMore,
|
|
103
|
-
href: "https://support.atlassian.com/confluence-cloud/docs/the-legacy-content-macro/",
|
|
104
|
-
target: "_blank"
|
|
105
|
-
}, formatMessage(i18n.learnMore)))));
|
|
106
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { jsx } from '@emotion/react';
|
|
6
|
-
export type LegacyContentHeaderProps = {
|
|
7
|
-
isNodeHovered?: boolean;
|
|
8
|
-
isNodeSelected?: boolean;
|
|
9
|
-
onMouseEnter?: () => void;
|
|
10
|
-
onMouseLeave?: () => void;
|
|
11
|
-
};
|
|
12
|
-
export declare const LegacyContentHeader: ({ isNodeHovered, isNodeSelected, onMouseEnter, onMouseLeave, }: LegacyContentHeaderProps) => jsx.JSX.Element;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { jsx } from '@emotion/react';
|
|
6
|
-
export type LegacyContentHeaderProps = {
|
|
7
|
-
isNodeHovered?: boolean;
|
|
8
|
-
isNodeSelected?: boolean;
|
|
9
|
-
onMouseEnter?: () => void;
|
|
10
|
-
onMouseLeave?: () => void;
|
|
11
|
-
};
|
|
12
|
-
export declare const LegacyContentHeader: ({ isNodeHovered, isNodeSelected, onMouseEnter, onMouseLeave, }: LegacyContentHeaderProps) => jsx.JSX.Element;
|