@atlaskit/editor-common 96.8.2 → 97.0.0
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 +8 -0
- package/dist/cjs/extensibility/Extension/Extension/index.js +1 -3
- package/dist/cjs/extensibility/Extension/InlineExtension/index.js +1 -3
- package/dist/cjs/extensibility/Extension/Lozenge/ExtensionLabel.js +20 -55
- package/dist/cjs/extensibility/Extension/Lozenge/LozengeComponent.js +0 -2
- package/dist/cjs/extensibility/Extension/Lozenge/index.js +0 -2
- package/dist/cjs/extensibility/MultiBodiedExtension/index.js +1 -3
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/extensibility/Extension/Extension/index.js +1 -3
- package/dist/es2019/extensibility/Extension/InlineExtension/index.js +1 -3
- package/dist/es2019/extensibility/Extension/Lozenge/ExtensionLabel.js +11 -45
- package/dist/es2019/extensibility/Extension/Lozenge/LozengeComponent.js +0 -2
- package/dist/es2019/extensibility/Extension/Lozenge/index.js +0 -2
- package/dist/es2019/extensibility/MultiBodiedExtension/index.js +1 -3
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/extensibility/Extension/Extension/index.js +1 -3
- package/dist/esm/extensibility/Extension/InlineExtension/index.js +1 -3
- package/dist/esm/extensibility/Extension/Lozenge/ExtensionLabel.js +11 -45
- package/dist/esm/extensibility/Extension/Lozenge/LozengeComponent.js +0 -2
- package/dist/esm/extensibility/Extension/Lozenge/index.js +0 -2
- package/dist/esm/extensibility/MultiBodiedExtension/index.js +1 -3
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/extensibility/Extension/Lozenge/ExtensionLabel.d.ts +6 -3
- package/dist/types/extensibility/Extension/Lozenge/LozengeComponent.d.ts +1 -2
- package/dist/types/extensibility/Extension/Lozenge/index.d.ts +0 -1
- package/dist/types/extensibility/types.d.ts +0 -1
- package/dist/types/types/feature-flags.d.ts +0 -8
- package/dist/types-ts4.5/extensibility/Extension/Lozenge/ExtensionLabel.d.ts +6 -3
- package/dist/types-ts4.5/extensibility/Extension/Lozenge/LozengeComponent.d.ts +1 -2
- package/dist/types-ts4.5/extensibility/Extension/Lozenge/index.d.ts +0 -1
- package/dist/types-ts4.5/extensibility/types.d.ts +0 -1
- package/dist/types-ts4.5/types/feature-flags.d.ts +0 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 97.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#182298](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/182298)
|
|
8
|
+
[`2f0dfff283d2e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2f0dfff283d2e) -
|
|
9
|
+
Clean up extension button experiment which determines whether or not to show the new button label
|
|
10
|
+
|
|
3
11
|
## 96.8.2
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -52,8 +52,7 @@ function ExtensionWithPluginState(props) {
|
|
|
52
52
|
showBodiedExtensionRendererView = props.showBodiedExtensionRendererView,
|
|
53
53
|
setShowBodiedExtensionRendererView = props.setShowBodiedExtensionRendererView;
|
|
54
54
|
var _ref = macroInteractionDesignFeatureFlags || {},
|
|
55
|
-
showMacroInteractionDesignUpdates = _ref.showMacroInteractionDesignUpdates
|
|
56
|
-
showMacroButtonUpdates = _ref.showMacroButtonUpdates;
|
|
55
|
+
showMacroInteractionDesignUpdates = _ref.showMacroInteractionDesignUpdates;
|
|
57
56
|
var hasBody = ['bodiedExtension', 'multiBodiedExtension'].includes(node.type.name);
|
|
58
57
|
var hasChildren = !!children;
|
|
59
58
|
var removeBorder = showMacroInteractionDesignUpdates || !!(hideFrame && !hasBody);
|
|
@@ -126,7 +125,6 @@ function ExtensionWithPluginState(props) {
|
|
|
126
125
|
isNodeNested: isNodeNested,
|
|
127
126
|
node: node,
|
|
128
127
|
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates,
|
|
129
|
-
showMacroButtonUpdates: showMacroButtonUpdates,
|
|
130
128
|
customContainerStyles: customContainerStyles,
|
|
131
129
|
setIsNodeHovered: setIsNodeHovered,
|
|
132
130
|
isBodiedMacro: hasBody,
|
|
@@ -33,8 +33,7 @@ var InlineExtension = function InlineExtension(props) {
|
|
|
33
33
|
isNodeHovered = props.isNodeHovered,
|
|
34
34
|
setIsNodeHovered = props.setIsNodeHovered;
|
|
35
35
|
var _ref = macroInteractionDesignFeatureFlags || {},
|
|
36
|
-
showMacroInteractionDesignUpdates = _ref.showMacroInteractionDesignUpdates
|
|
37
|
-
showMacroButtonUpdates = _ref.showMacroButtonUpdates;
|
|
36
|
+
showMacroInteractionDesignUpdates = _ref.showMacroInteractionDesignUpdates;
|
|
38
37
|
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(pluginInjectionApi, ['width']),
|
|
39
38
|
widthState = _useSharedPluginState.widthState;
|
|
40
39
|
var hasChildren = !!children;
|
|
@@ -55,7 +54,6 @@ var InlineExtension = function InlineExtension(props) {
|
|
|
55
54
|
isNodeSelected: isNodeSelected,
|
|
56
55
|
isNodeHovered: isNodeHovered,
|
|
57
56
|
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates,
|
|
58
|
-
showMacroButtonUpdates: showMacroButtonUpdates,
|
|
59
57
|
setIsNodeHovered: setIsNodeHovered
|
|
60
58
|
}), (0, _react2.jsx)("div", {
|
|
61
59
|
"data-testid": "inline-extension-wrapper"
|
|
@@ -6,8 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.getShouldShowBodiedMacroLabel = exports.ExtensionLabel = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
var _react = require("react");
|
|
10
|
-
var _react2 = require("@emotion/react");
|
|
9
|
+
var _react = require("@emotion/react");
|
|
11
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
11
|
var _reactIntlNext = require("react-intl-next");
|
|
13
12
|
var _customize = _interopRequireDefault(require("@atlaskit/icon/core/customize"));
|
|
@@ -19,7 +18,7 @@ var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
|
19
18
|
|
|
20
19
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
21
20
|
|
|
22
|
-
var containerStyles = (0,
|
|
21
|
+
var containerStyles = (0, _react.css)({
|
|
23
22
|
textAlign: 'left',
|
|
24
23
|
zIndex: 1,
|
|
25
24
|
position: 'relative',
|
|
@@ -28,7 +27,7 @@ var containerStyles = (0, _react2.css)({
|
|
|
28
27
|
marginTop: "var(--ds-space-300, 24px)"
|
|
29
28
|
}
|
|
30
29
|
});
|
|
31
|
-
var
|
|
30
|
+
var labelStyles = (0, _react.css)({
|
|
32
31
|
opacity: 0,
|
|
33
32
|
lineHeight: 1,
|
|
34
33
|
display: 'inline-flex',
|
|
@@ -60,9 +59,7 @@ var sharedLabelStyles = (0, _react2.css)({
|
|
|
60
59
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
61
60
|
'&.bodied-border': {
|
|
62
61
|
boxShadow: "0 0 0 1px ".concat("var(--ds-border, #091E4224)")
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
var buttonLabelStyles = (0, _react2.css)({
|
|
62
|
+
},
|
|
66
63
|
minHeight: "var(--ds-space-300, 24px)",
|
|
67
64
|
alignItems: 'center',
|
|
68
65
|
borderRadius: "var(--ds-border-radius, 3px)",
|
|
@@ -85,32 +82,11 @@ var buttonLabelStyles = (0, _react2.css)({
|
|
|
85
82
|
boxShadow: "0 0 0 1px ".concat("var(--ds-border, #091E4224)")
|
|
86
83
|
}
|
|
87
84
|
});
|
|
88
|
-
var spacerStyles = (0,
|
|
85
|
+
var spacerStyles = (0, _react.css)({
|
|
89
86
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
90
87
|
height: '10px'
|
|
91
88
|
});
|
|
92
|
-
var
|
|
93
|
-
// cannot use font.body or editor custom font.body here as line-height need to be 1 (from sharedLabelStyles)
|
|
94
|
-
// cannot use space token as there is not token for 14px
|
|
95
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
96
|
-
fontSize: '14px',
|
|
97
|
-
fontWeight: "var(--ds-font-weight-regular, 400)",
|
|
98
|
-
padding: "var(--ds-space-025, 2px)".concat(" ", "var(--ds-space-050, 4px)")
|
|
99
|
-
});
|
|
100
|
-
var originalLabelStyles = (0, _react2.css)({
|
|
101
|
-
background: "var(--ds-background-accent-gray-subtle-pressed, #DCDFE4)",
|
|
102
|
-
borderRadius: "var(--ds-border-radius, 3px)".concat(" ", "var(--ds-border-radius, 3px)", " 0 0"),
|
|
103
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
104
|
-
'&.show-label': {
|
|
105
|
-
color: "var(--ds-text-subtle, #44546F)"
|
|
106
|
-
},
|
|
107
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
108
|
-
'&.inline': {
|
|
109
|
-
// need to add margin since we don't get it for free like block ones via the padding to make it flush with editor elements
|
|
110
|
-
marginLeft: "var(--ds-space-150, 12px)"
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
var iconStyles = (0, _react2.css)({
|
|
89
|
+
var iconStyles = (0, _react.css)({
|
|
114
90
|
marginLeft: "var(--ds-space-075, 6px)",
|
|
115
91
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
116
92
|
'&.hide-icon': {
|
|
@@ -142,9 +118,8 @@ var ExtensionLabel = exports.ExtensionLabel = function ExtensionLabel(_ref) {
|
|
|
142
118
|
isNodeNested = _ref.isNodeNested,
|
|
143
119
|
setIsNodeHovered = _ref.setIsNodeHovered,
|
|
144
120
|
isBodiedMacro = _ref.isBodiedMacro,
|
|
145
|
-
showMacroButtonUpdates = _ref.showMacroButtonUpdates,
|
|
146
|
-
showLivePagesBodiedMacrosRendererView = _ref.showLivePagesBodiedMacrosRendererView,
|
|
147
121
|
showUpdatedLivePages1PBodiedExtensionUI = _ref.showUpdatedLivePages1PBodiedExtensionUI,
|
|
122
|
+
showLivePagesBodiedMacrosRendererView = _ref.showLivePagesBodiedMacrosRendererView,
|
|
148
123
|
showBodiedExtensionRendererView = _ref.showBodiedExtensionRendererView;
|
|
149
124
|
var isInlineExtension = extensionName === 'inlineExtension';
|
|
150
125
|
var showDefaultBodiedStyles = isBodiedMacro && !isNodeHovered;
|
|
@@ -152,7 +127,7 @@ var ExtensionLabel = exports.ExtensionLabel = function ExtensionLabel(_ref) {
|
|
|
152
127
|
var containerClassNames = (0, _classnames.default)({
|
|
153
128
|
bodied: isBodiedMacro
|
|
154
129
|
});
|
|
155
|
-
var
|
|
130
|
+
var labelClassNames = (0, _classnames.default)('extension-label', {
|
|
156
131
|
nested: isNodeNested,
|
|
157
132
|
inline: isInlineExtension,
|
|
158
133
|
bodied: isBodiedMacro,
|
|
@@ -160,10 +135,8 @@ var ExtensionLabel = exports.ExtensionLabel = function ExtensionLabel(_ref) {
|
|
|
160
135
|
'bodied-background': showDefaultBodiedStyles,
|
|
161
136
|
'show-label': shouldShowBodiedMacroLabel,
|
|
162
137
|
'with-bodied-macro-live-page-styles': isBodiedMacro && showLivePagesBodiedMacrosRendererView,
|
|
163
|
-
'always-hide-label': isBodiedMacro && showBodiedExtensionRendererView
|
|
164
|
-
|
|
165
|
-
var newButtonLabelClassNames = (0, _classnames.default)({
|
|
166
|
-
// For new button design, non-bodied macros should have a flush label. Inline macros don't need this since they never had the margin-left applied.
|
|
138
|
+
'always-hide-label': isBodiedMacro && showBodiedExtensionRendererView,
|
|
139
|
+
// Need this separate class since we don't ever want to show the label during view mode
|
|
167
140
|
'remove-left-margin': !isBodiedMacro && !isInlineExtension && !isNodeNested,
|
|
168
141
|
'remove-nested-left-margin': isNodeNested && !isBodiedMacro && !isInlineExtension
|
|
169
142
|
});
|
|
@@ -172,7 +145,7 @@ var ExtensionLabel = exports.ExtensionLabel = function ExtensionLabel(_ref) {
|
|
|
172
145
|
});
|
|
173
146
|
return (
|
|
174
147
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
175
|
-
(0,
|
|
148
|
+
(0, _react.jsx)("div", {
|
|
176
149
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
177
150
|
css: containerStyles
|
|
178
151
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
@@ -190,38 +163,30 @@ var ExtensionLabel = exports.ExtensionLabel = function ExtensionLabel(_ref) {
|
|
|
190
163
|
setIsNodeHovered === null || setIsNodeHovered === void 0 || setIsNodeHovered(false);
|
|
191
164
|
},
|
|
192
165
|
"data-testid": "new-lozenge-container"
|
|
193
|
-
},
|
|
194
|
-
content: (0,
|
|
166
|
+
}, (0, _react.jsx)(_tooltip.default, {
|
|
167
|
+
content: (0, _react.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, i18n.configure, {
|
|
195
168
|
values: {
|
|
196
169
|
macroName: text
|
|
197
170
|
}
|
|
198
171
|
})),
|
|
199
172
|
position: "top"
|
|
200
173
|
}, function (tooltipProps) {
|
|
201
|
-
return (0,
|
|
174
|
+
return (0, _react.jsx)("span", (0, _extends2.default)({
|
|
202
175
|
"data-testid": "new-lozenge-button"
|
|
203
176
|
}, tooltipProps, {
|
|
204
|
-
css:
|
|
177
|
+
css: labelStyles
|
|
205
178
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
206
179
|
,
|
|
207
|
-
className:
|
|
208
|
-
}), text, (0,
|
|
180
|
+
className: labelClassNames
|
|
181
|
+
}), text, (0, _react.jsx)("span", {
|
|
209
182
|
css: iconStyles,
|
|
210
183
|
className: iconClassNames,
|
|
211
184
|
"data-testid": "config-icon"
|
|
212
|
-
}, (0,
|
|
185
|
+
}, (0, _react.jsx)(_customize.default, {
|
|
213
186
|
label: ""
|
|
214
187
|
})));
|
|
215
|
-
}), (0,
|
|
188
|
+
}), (0, _react.jsx)("div", {
|
|
216
189
|
css: spacerStyles
|
|
217
|
-
}))
|
|
218
|
-
"data-testid": "new-lozenge",
|
|
219
|
-
css: [sharedLabelStyles, originalLabelStyles]
|
|
220
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
221
|
-
,
|
|
222
|
-
className: sharedLabelClassNames
|
|
223
|
-
}, (0, _react2.jsx)("span", {
|
|
224
|
-
css: textStyles
|
|
225
|
-
}, text)))
|
|
190
|
+
}))
|
|
226
191
|
);
|
|
227
192
|
};
|
|
@@ -28,7 +28,6 @@ var LozengeComponent = exports.LozengeComponent = function LozengeComponent(_ref
|
|
|
28
28
|
params = _ref.params,
|
|
29
29
|
renderImage = _ref.renderImage,
|
|
30
30
|
showMacroInteractionDesignUpdates = _ref.showMacroInteractionDesignUpdates,
|
|
31
|
-
showMacroButtonUpdates = _ref.showMacroButtonUpdates,
|
|
32
31
|
customContainerStyles = _ref.customContainerStyles,
|
|
33
32
|
isNodeHovered = _ref.isNodeHovered,
|
|
34
33
|
isNodeNested = _ref.isNodeNested,
|
|
@@ -48,7 +47,6 @@ var LozengeComponent = exports.LozengeComponent = function LozengeComponent(_ref
|
|
|
48
47
|
customContainerStyles: customContainerStyles,
|
|
49
48
|
setIsNodeHovered: setIsNodeHovered,
|
|
50
49
|
isBodiedMacro: isBodiedMacro,
|
|
51
|
-
showMacroButtonUpdates: showMacroButtonUpdates,
|
|
52
50
|
showLivePagesBodiedMacrosRendererView: showLivePagesBodiedMacrosRendererView,
|
|
53
51
|
showUpdatedLivePages1PBodiedExtensionUI: showUpdatedLivePages1PBodiedExtensionUI,
|
|
54
52
|
showBodiedExtensionRendererView: showBodiedExtensionRendererView
|
|
@@ -47,7 +47,6 @@ var ExtensionLozenge = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
47
47
|
(0, _defineProperty2.default)(_this, "renderFallback", function (lozengeData) {
|
|
48
48
|
var _this$props = _this.props,
|
|
49
49
|
showMacroInteractionDesignUpdates = _this$props.showMacroInteractionDesignUpdates,
|
|
50
|
-
showMacroButtonUpdates = _this$props.showMacroButtonUpdates,
|
|
51
50
|
isNodeSelected = _this$props.isNodeSelected,
|
|
52
51
|
isNodeHovered = _this$props.isNodeHovered,
|
|
53
52
|
isNodeNested = _this$props.isNodeNested,
|
|
@@ -69,7 +68,6 @@ var ExtensionLozenge = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
69
68
|
isNodeSelected: isNodeSelected,
|
|
70
69
|
isNodeNested: isNodeNested,
|
|
71
70
|
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates,
|
|
72
|
-
showMacroButtonUpdates: showMacroButtonUpdates,
|
|
73
71
|
extensionName: name,
|
|
74
72
|
lozengeData: lozengeData,
|
|
75
73
|
params: params,
|
|
@@ -89,8 +89,7 @@ var MultiBodiedExtensionWithWidth = function MultiBodiedExtensionWithWidth(_ref)
|
|
|
89
89
|
isNodeNested = _ref.isNodeNested,
|
|
90
90
|
setIsNodeHovered = _ref.setIsNodeHovered;
|
|
91
91
|
var _ref2 = macroInteractionDesignFeatureFlags || {},
|
|
92
|
-
showMacroInteractionDesignUpdates = _ref2.showMacroInteractionDesignUpdates
|
|
93
|
-
showMacroButtonUpdates = _ref2.showMacroButtonUpdates;
|
|
92
|
+
showMacroInteractionDesignUpdates = _ref2.showMacroInteractionDesignUpdates;
|
|
94
93
|
var _node$attrs = node.attrs,
|
|
95
94
|
parameters = _node$attrs.parameters,
|
|
96
95
|
extensionKey = _node$attrs.extensionKey;
|
|
@@ -166,7 +165,6 @@ var MultiBodiedExtensionWithWidth = function MultiBodiedExtensionWithWidth(_ref)
|
|
|
166
165
|
isNodeSelected: isNodeSelected,
|
|
167
166
|
node: node,
|
|
168
167
|
showMacroInteractionDesignUpdates: true,
|
|
169
|
-
showMacroButtonUpdates: showMacroButtonUpdates,
|
|
170
168
|
customContainerStyles: mbeWrapperStyles,
|
|
171
169
|
isNodeHovered: isNodeHovered,
|
|
172
170
|
isNodeNested: isNodeNested,
|
|
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
17
17
|
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 && {}.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; }
|
|
18
18
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
19
19
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
20
|
-
var packageVersion = "
|
|
20
|
+
var packageVersion = "97.0.0";
|
|
21
21
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
22
22
|
// Remove URL as it has UGC
|
|
23
23
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
23
23
|
* @jsx jsx
|
|
24
24
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
25
25
|
var packageName = "@atlaskit/editor-common";
|
|
26
|
-
var packageVersion = "
|
|
26
|
+
var packageVersion = "97.0.0";
|
|
27
27
|
var halfFocusRing = 1;
|
|
28
28
|
var dropOffset = '0, 8';
|
|
29
29
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -40,8 +40,7 @@ function ExtensionWithPluginState(props) {
|
|
|
40
40
|
setShowBodiedExtensionRendererView
|
|
41
41
|
} = props;
|
|
42
42
|
const {
|
|
43
|
-
showMacroInteractionDesignUpdates
|
|
44
|
-
showMacroButtonUpdates
|
|
43
|
+
showMacroInteractionDesignUpdates
|
|
45
44
|
} = macroInteractionDesignFeatureFlags || {};
|
|
46
45
|
const hasBody = ['bodiedExtension', 'multiBodiedExtension'].includes(node.type.name);
|
|
47
46
|
const hasChildren = !!children;
|
|
@@ -124,7 +123,6 @@ function ExtensionWithPluginState(props) {
|
|
|
124
123
|
isNodeNested: isNodeNested,
|
|
125
124
|
node: node,
|
|
126
125
|
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates,
|
|
127
|
-
showMacroButtonUpdates: showMacroButtonUpdates,
|
|
128
126
|
customContainerStyles: customContainerStyles,
|
|
129
127
|
setIsNodeHovered: setIsNodeHovered,
|
|
130
128
|
isBodiedMacro: hasBody,
|
|
@@ -24,8 +24,7 @@ const InlineExtension = props => {
|
|
|
24
24
|
setIsNodeHovered
|
|
25
25
|
} = props;
|
|
26
26
|
const {
|
|
27
|
-
showMacroInteractionDesignUpdates
|
|
28
|
-
showMacroButtonUpdates
|
|
27
|
+
showMacroInteractionDesignUpdates
|
|
29
28
|
} = macroInteractionDesignFeatureFlags || {};
|
|
30
29
|
const {
|
|
31
30
|
widthState
|
|
@@ -48,7 +47,6 @@ const InlineExtension = props => {
|
|
|
48
47
|
isNodeSelected: isNodeSelected,
|
|
49
48
|
isNodeHovered: isNodeHovered,
|
|
50
49
|
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates,
|
|
51
|
-
showMacroButtonUpdates: showMacroButtonUpdates,
|
|
52
50
|
setIsNodeHovered: setIsNodeHovered
|
|
53
51
|
}), jsx("div", {
|
|
54
52
|
"data-testid": "inline-extension-wrapper"
|
|
@@ -3,7 +3,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
* @jsxRuntime classic
|
|
4
4
|
* @jsx jsx
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import classnames from 'classnames';
|
|
@@ -19,7 +19,7 @@ const containerStyles = css({
|
|
|
19
19
|
marginTop: "var(--ds-space-300, 24px)"
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
|
-
const
|
|
22
|
+
const labelStyles = css({
|
|
23
23
|
opacity: 0,
|
|
24
24
|
lineHeight: 1,
|
|
25
25
|
display: 'inline-flex',
|
|
@@ -51,9 +51,7 @@ const sharedLabelStyles = css({
|
|
|
51
51
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
52
52
|
'&.bodied-border': {
|
|
53
53
|
boxShadow: `0 0 0 1px ${"var(--ds-border, #091E4224)"}`
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
const buttonLabelStyles = css({
|
|
54
|
+
},
|
|
57
55
|
minHeight: "var(--ds-space-300, 24px)",
|
|
58
56
|
alignItems: 'center',
|
|
59
57
|
borderRadius: "var(--ds-border-radius, 3px)",
|
|
@@ -80,27 +78,6 @@ const spacerStyles = css({
|
|
|
80
78
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
81
79
|
height: '10px'
|
|
82
80
|
});
|
|
83
|
-
const textStyles = css({
|
|
84
|
-
// cannot use font.body or editor custom font.body here as line-height need to be 1 (from sharedLabelStyles)
|
|
85
|
-
// cannot use space token as there is not token for 14px
|
|
86
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
87
|
-
fontSize: '14px',
|
|
88
|
-
fontWeight: "var(--ds-font-weight-regular, 400)",
|
|
89
|
-
padding: `${"var(--ds-space-025, 2px)"} ${"var(--ds-space-050, 4px)"}`
|
|
90
|
-
});
|
|
91
|
-
const originalLabelStyles = css({
|
|
92
|
-
background: "var(--ds-background-accent-gray-subtle-pressed, #DCDFE4)",
|
|
93
|
-
borderRadius: `${"var(--ds-border-radius, 3px)"} ${"var(--ds-border-radius, 3px)"} 0 0`,
|
|
94
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
95
|
-
'&.show-label': {
|
|
96
|
-
color: "var(--ds-text-subtle, #44546F)"
|
|
97
|
-
},
|
|
98
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
99
|
-
'&.inline': {
|
|
100
|
-
// need to add margin since we don't get it for free like block ones via the padding to make it flush with editor elements
|
|
101
|
-
marginLeft: "var(--ds-space-150, 12px)"
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
81
|
const iconStyles = css({
|
|
105
82
|
marginLeft: "var(--ds-space-075, 6px)",
|
|
106
83
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
@@ -133,9 +110,8 @@ export const ExtensionLabel = ({
|
|
|
133
110
|
isNodeNested,
|
|
134
111
|
setIsNodeHovered,
|
|
135
112
|
isBodiedMacro,
|
|
136
|
-
showMacroButtonUpdates,
|
|
137
|
-
showLivePagesBodiedMacrosRendererView,
|
|
138
113
|
showUpdatedLivePages1PBodiedExtensionUI,
|
|
114
|
+
showLivePagesBodiedMacrosRendererView,
|
|
139
115
|
showBodiedExtensionRendererView
|
|
140
116
|
}) => {
|
|
141
117
|
const isInlineExtension = extensionName === 'inlineExtension';
|
|
@@ -144,7 +120,7 @@ export const ExtensionLabel = ({
|
|
|
144
120
|
const containerClassNames = classnames({
|
|
145
121
|
bodied: isBodiedMacro
|
|
146
122
|
});
|
|
147
|
-
const
|
|
123
|
+
const labelClassNames = classnames('extension-label', {
|
|
148
124
|
nested: isNodeNested,
|
|
149
125
|
inline: isInlineExtension,
|
|
150
126
|
bodied: isBodiedMacro,
|
|
@@ -152,10 +128,8 @@ export const ExtensionLabel = ({
|
|
|
152
128
|
'bodied-background': showDefaultBodiedStyles,
|
|
153
129
|
'show-label': shouldShowBodiedMacroLabel,
|
|
154
130
|
'with-bodied-macro-live-page-styles': isBodiedMacro && showLivePagesBodiedMacrosRendererView,
|
|
155
|
-
'always-hide-label': isBodiedMacro && showBodiedExtensionRendererView
|
|
156
|
-
|
|
157
|
-
const newButtonLabelClassNames = classnames({
|
|
158
|
-
// For new button design, non-bodied macros should have a flush label. Inline macros don't need this since they never had the margin-left applied.
|
|
131
|
+
'always-hide-label': isBodiedMacro && showBodiedExtensionRendererView,
|
|
132
|
+
// Need this separate class since we don't ever want to show the label during view mode
|
|
159
133
|
'remove-left-margin': !isBodiedMacro && !isInlineExtension && !isNodeNested,
|
|
160
134
|
'remove-nested-left-margin': isNodeNested && !isBodiedMacro && !isInlineExtension
|
|
161
135
|
});
|
|
@@ -182,7 +156,7 @@ export const ExtensionLabel = ({
|
|
|
182
156
|
setIsNodeHovered === null || setIsNodeHovered === void 0 ? void 0 : setIsNodeHovered(false);
|
|
183
157
|
},
|
|
184
158
|
"data-testid": "new-lozenge-container"
|
|
185
|
-
},
|
|
159
|
+
}, jsx(Tooltip, {
|
|
186
160
|
content: jsx(FormattedMessage, _extends({}, i18n.configure, {
|
|
187
161
|
values: {
|
|
188
162
|
macroName: text
|
|
@@ -192,10 +166,10 @@ export const ExtensionLabel = ({
|
|
|
192
166
|
}, tooltipProps => jsx("span", _extends({
|
|
193
167
|
"data-testid": "new-lozenge-button"
|
|
194
168
|
}, tooltipProps, {
|
|
195
|
-
css:
|
|
169
|
+
css: labelStyles
|
|
196
170
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
197
171
|
,
|
|
198
|
-
className:
|
|
172
|
+
className: labelClassNames
|
|
199
173
|
}), text, jsx("span", {
|
|
200
174
|
css: iconStyles,
|
|
201
175
|
className: iconClassNames,
|
|
@@ -204,14 +178,6 @@ export const ExtensionLabel = ({
|
|
|
204
178
|
label: ""
|
|
205
179
|
})))), jsx("div", {
|
|
206
180
|
css: spacerStyles
|
|
207
|
-
}))
|
|
208
|
-
"data-testid": "new-lozenge",
|
|
209
|
-
css: [sharedLabelStyles, originalLabelStyles]
|
|
210
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
211
|
-
,
|
|
212
|
-
className: sharedLabelClassNames
|
|
213
|
-
}, jsx("span", {
|
|
214
|
-
css: textStyles
|
|
215
|
-
}, text)))
|
|
181
|
+
}))
|
|
216
182
|
);
|
|
217
183
|
};
|
|
@@ -20,7 +20,6 @@ export const LozengeComponent = ({
|
|
|
20
20
|
params,
|
|
21
21
|
renderImage,
|
|
22
22
|
showMacroInteractionDesignUpdates,
|
|
23
|
-
showMacroButtonUpdates,
|
|
24
23
|
customContainerStyles,
|
|
25
24
|
isNodeHovered,
|
|
26
25
|
isNodeNested,
|
|
@@ -41,7 +40,6 @@ export const LozengeComponent = ({
|
|
|
41
40
|
customContainerStyles: customContainerStyles,
|
|
42
41
|
setIsNodeHovered: setIsNodeHovered,
|
|
43
42
|
isBodiedMacro: isBodiedMacro,
|
|
44
|
-
showMacroButtonUpdates: showMacroButtonUpdates,
|
|
45
43
|
showLivePagesBodiedMacrosRendererView: showLivePagesBodiedMacrosRendererView,
|
|
46
44
|
showUpdatedLivePages1PBodiedExtensionUI: showUpdatedLivePages1PBodiedExtensionUI,
|
|
47
45
|
showBodiedExtensionRendererView: showBodiedExtensionRendererView
|
|
@@ -32,7 +32,6 @@ export default class ExtensionLozenge extends Component {
|
|
|
32
32
|
_defineProperty(this, "renderFallback", lozengeData => {
|
|
33
33
|
const {
|
|
34
34
|
showMacroInteractionDesignUpdates,
|
|
35
|
-
showMacroButtonUpdates,
|
|
36
35
|
isNodeSelected,
|
|
37
36
|
isNodeHovered,
|
|
38
37
|
isNodeNested,
|
|
@@ -58,7 +57,6 @@ export default class ExtensionLozenge extends Component {
|
|
|
58
57
|
isNodeSelected: isNodeSelected,
|
|
59
58
|
isNodeNested: isNodeNested,
|
|
60
59
|
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates,
|
|
61
|
-
showMacroButtonUpdates: showMacroButtonUpdates,
|
|
62
60
|
extensionName: name,
|
|
63
61
|
lozengeData: lozengeData,
|
|
64
62
|
params: params,
|
|
@@ -79,8 +79,7 @@ const MultiBodiedExtensionWithWidth = ({
|
|
|
79
79
|
setIsNodeHovered
|
|
80
80
|
}) => {
|
|
81
81
|
const {
|
|
82
|
-
showMacroInteractionDesignUpdates
|
|
83
|
-
showMacroButtonUpdates
|
|
82
|
+
showMacroInteractionDesignUpdates
|
|
84
83
|
} = macroInteractionDesignFeatureFlags || {};
|
|
85
84
|
const {
|
|
86
85
|
parameters,
|
|
@@ -156,7 +155,6 @@ const MultiBodiedExtensionWithWidth = ({
|
|
|
156
155
|
isNodeSelected: isNodeSelected,
|
|
157
156
|
node: node,
|
|
158
157
|
showMacroInteractionDesignUpdates: true,
|
|
159
|
-
showMacroButtonUpdates: showMacroButtonUpdates,
|
|
160
158
|
customContainerStyles: mbeWrapperStyles,
|
|
161
159
|
isNodeHovered: isNodeHovered,
|
|
162
160
|
isNodeNested: isNodeNested,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isFedRamp } from './environment';
|
|
2
2
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
3
3
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
4
|
-
const packageVersion = "
|
|
4
|
+
const packageVersion = "97.0.0";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
13
13
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
14
14
|
import Layer from '../Layer';
|
|
15
15
|
const packageName = "@atlaskit/editor-common";
|
|
16
|
-
const packageVersion = "
|
|
16
|
+
const packageVersion = "97.0.0";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
class DropList extends Component {
|
|
@@ -44,8 +44,7 @@ function ExtensionWithPluginState(props) {
|
|
|
44
44
|
showBodiedExtensionRendererView = props.showBodiedExtensionRendererView,
|
|
45
45
|
setShowBodiedExtensionRendererView = props.setShowBodiedExtensionRendererView;
|
|
46
46
|
var _ref = macroInteractionDesignFeatureFlags || {},
|
|
47
|
-
showMacroInteractionDesignUpdates = _ref.showMacroInteractionDesignUpdates
|
|
48
|
-
showMacroButtonUpdates = _ref.showMacroButtonUpdates;
|
|
47
|
+
showMacroInteractionDesignUpdates = _ref.showMacroInteractionDesignUpdates;
|
|
49
48
|
var hasBody = ['bodiedExtension', 'multiBodiedExtension'].includes(node.type.name);
|
|
50
49
|
var hasChildren = !!children;
|
|
51
50
|
var removeBorder = showMacroInteractionDesignUpdates || !!(hideFrame && !hasBody);
|
|
@@ -118,7 +117,6 @@ function ExtensionWithPluginState(props) {
|
|
|
118
117
|
isNodeNested: isNodeNested,
|
|
119
118
|
node: node,
|
|
120
119
|
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates,
|
|
121
|
-
showMacroButtonUpdates: showMacroButtonUpdates,
|
|
122
120
|
customContainerStyles: customContainerStyles,
|
|
123
121
|
setIsNodeHovered: setIsNodeHovered,
|
|
124
122
|
isBodiedMacro: hasBody,
|
|
@@ -22,8 +22,7 @@ var InlineExtension = function InlineExtension(props) {
|
|
|
22
22
|
isNodeHovered = props.isNodeHovered,
|
|
23
23
|
setIsNodeHovered = props.setIsNodeHovered;
|
|
24
24
|
var _ref = macroInteractionDesignFeatureFlags || {},
|
|
25
|
-
showMacroInteractionDesignUpdates = _ref.showMacroInteractionDesignUpdates
|
|
26
|
-
showMacroButtonUpdates = _ref.showMacroButtonUpdates;
|
|
25
|
+
showMacroInteractionDesignUpdates = _ref.showMacroInteractionDesignUpdates;
|
|
27
26
|
var _useSharedPluginState = useSharedPluginState(pluginInjectionApi, ['width']),
|
|
28
27
|
widthState = _useSharedPluginState.widthState;
|
|
29
28
|
var hasChildren = !!children;
|
|
@@ -44,7 +43,6 @@ var InlineExtension = function InlineExtension(props) {
|
|
|
44
43
|
isNodeSelected: isNodeSelected,
|
|
45
44
|
isNodeHovered: isNodeHovered,
|
|
46
45
|
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates,
|
|
47
|
-
showMacroButtonUpdates: showMacroButtonUpdates,
|
|
48
46
|
setIsNodeHovered: setIsNodeHovered
|
|
49
47
|
}), jsx("div", {
|
|
50
48
|
"data-testid": "inline-extension-wrapper"
|
|
@@ -3,7 +3,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
* @jsxRuntime classic
|
|
4
4
|
* @jsx jsx
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import classnames from 'classnames';
|
|
@@ -19,7 +19,7 @@ var containerStyles = css({
|
|
|
19
19
|
marginTop: "var(--ds-space-300, 24px)"
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
|
-
var
|
|
22
|
+
var labelStyles = css({
|
|
23
23
|
opacity: 0,
|
|
24
24
|
lineHeight: 1,
|
|
25
25
|
display: 'inline-flex',
|
|
@@ -51,9 +51,7 @@ var sharedLabelStyles = css({
|
|
|
51
51
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
52
52
|
'&.bodied-border': {
|
|
53
53
|
boxShadow: "0 0 0 1px ".concat("var(--ds-border, #091E4224)")
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
var buttonLabelStyles = css({
|
|
54
|
+
},
|
|
57
55
|
minHeight: "var(--ds-space-300, 24px)",
|
|
58
56
|
alignItems: 'center',
|
|
59
57
|
borderRadius: "var(--ds-border-radius, 3px)",
|
|
@@ -80,27 +78,6 @@ var spacerStyles = css({
|
|
|
80
78
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
81
79
|
height: '10px'
|
|
82
80
|
});
|
|
83
|
-
var textStyles = css({
|
|
84
|
-
// cannot use font.body or editor custom font.body here as line-height need to be 1 (from sharedLabelStyles)
|
|
85
|
-
// cannot use space token as there is not token for 14px
|
|
86
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
87
|
-
fontSize: '14px',
|
|
88
|
-
fontWeight: "var(--ds-font-weight-regular, 400)",
|
|
89
|
-
padding: "var(--ds-space-025, 2px)".concat(" ", "var(--ds-space-050, 4px)")
|
|
90
|
-
});
|
|
91
|
-
var originalLabelStyles = css({
|
|
92
|
-
background: "var(--ds-background-accent-gray-subtle-pressed, #DCDFE4)",
|
|
93
|
-
borderRadius: "var(--ds-border-radius, 3px)".concat(" ", "var(--ds-border-radius, 3px)", " 0 0"),
|
|
94
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
95
|
-
'&.show-label': {
|
|
96
|
-
color: "var(--ds-text-subtle, #44546F)"
|
|
97
|
-
},
|
|
98
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
99
|
-
'&.inline': {
|
|
100
|
-
// need to add margin since we don't get it for free like block ones via the padding to make it flush with editor elements
|
|
101
|
-
marginLeft: "var(--ds-space-150, 12px)"
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
81
|
var iconStyles = css({
|
|
105
82
|
marginLeft: "var(--ds-space-075, 6px)",
|
|
106
83
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
@@ -133,9 +110,8 @@ export var ExtensionLabel = function ExtensionLabel(_ref) {
|
|
|
133
110
|
isNodeNested = _ref.isNodeNested,
|
|
134
111
|
setIsNodeHovered = _ref.setIsNodeHovered,
|
|
135
112
|
isBodiedMacro = _ref.isBodiedMacro,
|
|
136
|
-
showMacroButtonUpdates = _ref.showMacroButtonUpdates,
|
|
137
|
-
showLivePagesBodiedMacrosRendererView = _ref.showLivePagesBodiedMacrosRendererView,
|
|
138
113
|
showUpdatedLivePages1PBodiedExtensionUI = _ref.showUpdatedLivePages1PBodiedExtensionUI,
|
|
114
|
+
showLivePagesBodiedMacrosRendererView = _ref.showLivePagesBodiedMacrosRendererView,
|
|
139
115
|
showBodiedExtensionRendererView = _ref.showBodiedExtensionRendererView;
|
|
140
116
|
var isInlineExtension = extensionName === 'inlineExtension';
|
|
141
117
|
var showDefaultBodiedStyles = isBodiedMacro && !isNodeHovered;
|
|
@@ -143,7 +119,7 @@ export var ExtensionLabel = function ExtensionLabel(_ref) {
|
|
|
143
119
|
var containerClassNames = classnames({
|
|
144
120
|
bodied: isBodiedMacro
|
|
145
121
|
});
|
|
146
|
-
var
|
|
122
|
+
var labelClassNames = classnames('extension-label', {
|
|
147
123
|
nested: isNodeNested,
|
|
148
124
|
inline: isInlineExtension,
|
|
149
125
|
bodied: isBodiedMacro,
|
|
@@ -151,10 +127,8 @@ export var ExtensionLabel = function ExtensionLabel(_ref) {
|
|
|
151
127
|
'bodied-background': showDefaultBodiedStyles,
|
|
152
128
|
'show-label': shouldShowBodiedMacroLabel,
|
|
153
129
|
'with-bodied-macro-live-page-styles': isBodiedMacro && showLivePagesBodiedMacrosRendererView,
|
|
154
|
-
'always-hide-label': isBodiedMacro && showBodiedExtensionRendererView
|
|
155
|
-
|
|
156
|
-
var newButtonLabelClassNames = classnames({
|
|
157
|
-
// For new button design, non-bodied macros should have a flush label. Inline macros don't need this since they never had the margin-left applied.
|
|
130
|
+
'always-hide-label': isBodiedMacro && showBodiedExtensionRendererView,
|
|
131
|
+
// Need this separate class since we don't ever want to show the label during view mode
|
|
158
132
|
'remove-left-margin': !isBodiedMacro && !isInlineExtension && !isNodeNested,
|
|
159
133
|
'remove-nested-left-margin': isNodeNested && !isBodiedMacro && !isInlineExtension
|
|
160
134
|
});
|
|
@@ -181,7 +155,7 @@ export var ExtensionLabel = function ExtensionLabel(_ref) {
|
|
|
181
155
|
setIsNodeHovered === null || setIsNodeHovered === void 0 || setIsNodeHovered(false);
|
|
182
156
|
},
|
|
183
157
|
"data-testid": "new-lozenge-container"
|
|
184
|
-
},
|
|
158
|
+
}, jsx(Tooltip, {
|
|
185
159
|
content: jsx(FormattedMessage, _extends({}, i18n.configure, {
|
|
186
160
|
values: {
|
|
187
161
|
macroName: text
|
|
@@ -192,10 +166,10 @@ export var ExtensionLabel = function ExtensionLabel(_ref) {
|
|
|
192
166
|
return jsx("span", _extends({
|
|
193
167
|
"data-testid": "new-lozenge-button"
|
|
194
168
|
}, tooltipProps, {
|
|
195
|
-
css:
|
|
169
|
+
css: labelStyles
|
|
196
170
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
197
171
|
,
|
|
198
|
-
className:
|
|
172
|
+
className: labelClassNames
|
|
199
173
|
}), text, jsx("span", {
|
|
200
174
|
css: iconStyles,
|
|
201
175
|
className: iconClassNames,
|
|
@@ -205,14 +179,6 @@ export var ExtensionLabel = function ExtensionLabel(_ref) {
|
|
|
205
179
|
})));
|
|
206
180
|
}), jsx("div", {
|
|
207
181
|
css: spacerStyles
|
|
208
|
-
}))
|
|
209
|
-
"data-testid": "new-lozenge",
|
|
210
|
-
css: [sharedLabelStyles, originalLabelStyles]
|
|
211
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
212
|
-
,
|
|
213
|
-
className: sharedLabelClassNames
|
|
214
|
-
}, jsx("span", {
|
|
215
|
-
css: textStyles
|
|
216
|
-
}, text)))
|
|
182
|
+
}))
|
|
217
183
|
);
|
|
218
184
|
};
|
|
@@ -23,7 +23,6 @@ export var LozengeComponent = function LozengeComponent(_ref) {
|
|
|
23
23
|
params = _ref.params,
|
|
24
24
|
renderImage = _ref.renderImage,
|
|
25
25
|
showMacroInteractionDesignUpdates = _ref.showMacroInteractionDesignUpdates,
|
|
26
|
-
showMacroButtonUpdates = _ref.showMacroButtonUpdates,
|
|
27
26
|
customContainerStyles = _ref.customContainerStyles,
|
|
28
27
|
isNodeHovered = _ref.isNodeHovered,
|
|
29
28
|
isNodeNested = _ref.isNodeNested,
|
|
@@ -43,7 +42,6 @@ export var LozengeComponent = function LozengeComponent(_ref) {
|
|
|
43
42
|
customContainerStyles: customContainerStyles,
|
|
44
43
|
setIsNodeHovered: setIsNodeHovered,
|
|
45
44
|
isBodiedMacro: isBodiedMacro,
|
|
46
|
-
showMacroButtonUpdates: showMacroButtonUpdates,
|
|
47
45
|
showLivePagesBodiedMacrosRendererView: showLivePagesBodiedMacrosRendererView,
|
|
48
46
|
showUpdatedLivePages1PBodiedExtensionUI: showUpdatedLivePages1PBodiedExtensionUI,
|
|
49
47
|
showBodiedExtensionRendererView: showBodiedExtensionRendererView
|
|
@@ -42,7 +42,6 @@ var ExtensionLozenge = /*#__PURE__*/function (_Component) {
|
|
|
42
42
|
_defineProperty(_this, "renderFallback", function (lozengeData) {
|
|
43
43
|
var _this$props = _this.props,
|
|
44
44
|
showMacroInteractionDesignUpdates = _this$props.showMacroInteractionDesignUpdates,
|
|
45
|
-
showMacroButtonUpdates = _this$props.showMacroButtonUpdates,
|
|
46
45
|
isNodeSelected = _this$props.isNodeSelected,
|
|
47
46
|
isNodeHovered = _this$props.isNodeHovered,
|
|
48
47
|
isNodeNested = _this$props.isNodeNested,
|
|
@@ -64,7 +63,6 @@ var ExtensionLozenge = /*#__PURE__*/function (_Component) {
|
|
|
64
63
|
isNodeSelected: isNodeSelected,
|
|
65
64
|
isNodeNested: isNodeNested,
|
|
66
65
|
showMacroInteractionDesignUpdates: showMacroInteractionDesignUpdates,
|
|
67
|
-
showMacroButtonUpdates: showMacroButtonUpdates,
|
|
68
66
|
extensionName: name,
|
|
69
67
|
lozengeData: lozengeData,
|
|
70
68
|
params: params,
|
|
@@ -81,8 +81,7 @@ var MultiBodiedExtensionWithWidth = function MultiBodiedExtensionWithWidth(_ref)
|
|
|
81
81
|
isNodeNested = _ref.isNodeNested,
|
|
82
82
|
setIsNodeHovered = _ref.setIsNodeHovered;
|
|
83
83
|
var _ref2 = macroInteractionDesignFeatureFlags || {},
|
|
84
|
-
showMacroInteractionDesignUpdates = _ref2.showMacroInteractionDesignUpdates
|
|
85
|
-
showMacroButtonUpdates = _ref2.showMacroButtonUpdates;
|
|
84
|
+
showMacroInteractionDesignUpdates = _ref2.showMacroInteractionDesignUpdates;
|
|
86
85
|
var _node$attrs = node.attrs,
|
|
87
86
|
parameters = _node$attrs.parameters,
|
|
88
87
|
extensionKey = _node$attrs.extensionKey;
|
|
@@ -158,7 +157,6 @@ var MultiBodiedExtensionWithWidth = function MultiBodiedExtensionWithWidth(_ref)
|
|
|
158
157
|
isNodeSelected: isNodeSelected,
|
|
159
158
|
node: node,
|
|
160
159
|
showMacroInteractionDesignUpdates: true,
|
|
161
|
-
showMacroButtonUpdates: showMacroButtonUpdates,
|
|
162
160
|
customContainerStyles: mbeWrapperStyles,
|
|
163
161
|
isNodeHovered: isNodeHovered,
|
|
164
162
|
isNodeNested: isNodeNested,
|
|
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
import { isFedRamp } from './environment';
|
|
8
8
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
9
9
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
10
|
-
var packageVersion = "
|
|
10
|
+
var packageVersion = "97.0.0";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
20
20
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
21
21
|
import Layer from '../Layer';
|
|
22
22
|
var packageName = "@atlaskit/editor-common";
|
|
23
|
-
var packageVersion = "
|
|
23
|
+
var packageVersion = "97.0.0";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
1
5
|
import type { CSSProperties } from 'react';
|
|
2
6
|
import { jsx } from '@emotion/react';
|
|
3
7
|
export declare const getShouldShowBodiedMacroLabel: (isBodiedMacro: boolean | undefined, isNodeHovered: boolean | undefined, showLivePagesBodiedMacrosRendererView: boolean | undefined, showBodiedExtensionRendererView: boolean | undefined, showUpdatedLivePages1PBodiedExtensionUI: boolean | undefined) => boolean | undefined;
|
|
@@ -9,10 +13,9 @@ type ExtensionLabelProps = {
|
|
|
9
13
|
customContainerStyles?: CSSProperties;
|
|
10
14
|
setIsNodeHovered?: (isHovered: boolean) => void;
|
|
11
15
|
isBodiedMacro?: boolean;
|
|
12
|
-
showMacroButtonUpdates?: boolean;
|
|
13
|
-
showLivePagesBodiedMacrosRendererView?: boolean;
|
|
14
16
|
showUpdatedLivePages1PBodiedExtensionUI?: boolean;
|
|
17
|
+
showLivePagesBodiedMacrosRendererView?: boolean;
|
|
15
18
|
showBodiedExtensionRendererView?: boolean;
|
|
16
19
|
};
|
|
17
|
-
export declare const ExtensionLabel: ({ text, extensionName, isNodeHovered, customContainerStyles, isNodeNested, setIsNodeHovered, isBodiedMacro,
|
|
20
|
+
export declare const ExtensionLabel: ({ text, extensionName, isNodeHovered, customContainerStyles, isNodeNested, setIsNodeHovered, isBodiedMacro, showUpdatedLivePages1PBodiedExtensionUI, showLivePagesBodiedMacrosRendererView, showBodiedExtensionRendererView, }: ExtensionLabelProps) => jsx.JSX.Element;
|
|
18
21
|
export {};
|
|
@@ -10,7 +10,6 @@ type LozengeComponentProps = {
|
|
|
10
10
|
renderImage: (lozengeData: LozengeData) => void;
|
|
11
11
|
isNodeSelected?: boolean;
|
|
12
12
|
showMacroInteractionDesignUpdates?: boolean;
|
|
13
|
-
showMacroButtonUpdates?: boolean;
|
|
14
13
|
customContainerStyles?: CSSProperties;
|
|
15
14
|
isNodeHovered?: boolean;
|
|
16
15
|
isNodeNested?: boolean;
|
|
@@ -21,5 +20,5 @@ type LozengeComponentProps = {
|
|
|
21
20
|
showBodiedExtensionRendererView?: boolean;
|
|
22
21
|
setShowBodiedExtensionRendererView?: (showBodiedExtensionRendererView: boolean) => void;
|
|
23
22
|
};
|
|
24
|
-
export declare const LozengeComponent: ({ lozengeData, extensionName, title, params, renderImage, showMacroInteractionDesignUpdates,
|
|
23
|
+
export declare const LozengeComponent: ({ lozengeData, extensionName, title, params, renderImage, showMacroInteractionDesignUpdates, customContainerStyles, isNodeHovered, isNodeNested, setIsNodeHovered, isBodiedMacro, showLivePagesBodiedMacrosRendererView, showUpdatedLivePages1PBodiedExtensionUI, showBodiedExtensionRendererView, setShowBodiedExtensionRendererView, }: LozengeComponentProps) => jsx.JSX.Element;
|
|
25
24
|
export {};
|
|
@@ -9,7 +9,6 @@ import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
|
9
9
|
export interface Props {
|
|
10
10
|
node: PmNode;
|
|
11
11
|
showMacroInteractionDesignUpdates?: boolean;
|
|
12
|
-
showMacroButtonUpdates?: boolean;
|
|
13
12
|
isNodeSelected?: boolean;
|
|
14
13
|
isNodeHovered?: boolean;
|
|
15
14
|
isNodeNested?: boolean;
|
|
@@ -5,6 +5,5 @@ type WidthPluginType = NextEditorPlugin<'width', {
|
|
|
5
5
|
export type ExtensionsPluginInjectionAPI = PublicPluginAPI<[WidthPluginType]> | undefined;
|
|
6
6
|
export type MacroInteractionDesignFeatureFlags = {
|
|
7
7
|
showMacroInteractionDesignUpdates?: boolean;
|
|
8
|
-
showMacroButtonUpdates?: boolean;
|
|
9
8
|
};
|
|
10
9
|
export {};
|
|
@@ -230,14 +230,6 @@ export type FeatureFlags = {
|
|
|
230
230
|
* @default false
|
|
231
231
|
*/
|
|
232
232
|
macroInteractionUpdates?: boolean;
|
|
233
|
-
/**
|
|
234
|
-
* @description
|
|
235
|
-
* Enables macro interaction visual button updates
|
|
236
|
-
*
|
|
237
|
-
* @see https://product-fabric.atlassian.net/browse/PGXT-5513
|
|
238
|
-
* @default false
|
|
239
|
-
*/
|
|
240
|
-
macroInteractionButtonUpdates?: boolean;
|
|
241
233
|
/**
|
|
242
234
|
* @description
|
|
243
235
|
* Enables extra analytics to be added for comments on media
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
1
5
|
import type { CSSProperties } from 'react';
|
|
2
6
|
import { jsx } from '@emotion/react';
|
|
3
7
|
export declare const getShouldShowBodiedMacroLabel: (isBodiedMacro: boolean | undefined, isNodeHovered: boolean | undefined, showLivePagesBodiedMacrosRendererView: boolean | undefined, showBodiedExtensionRendererView: boolean | undefined, showUpdatedLivePages1PBodiedExtensionUI: boolean | undefined) => boolean | undefined;
|
|
@@ -9,10 +13,9 @@ type ExtensionLabelProps = {
|
|
|
9
13
|
customContainerStyles?: CSSProperties;
|
|
10
14
|
setIsNodeHovered?: (isHovered: boolean) => void;
|
|
11
15
|
isBodiedMacro?: boolean;
|
|
12
|
-
showMacroButtonUpdates?: boolean;
|
|
13
|
-
showLivePagesBodiedMacrosRendererView?: boolean;
|
|
14
16
|
showUpdatedLivePages1PBodiedExtensionUI?: boolean;
|
|
17
|
+
showLivePagesBodiedMacrosRendererView?: boolean;
|
|
15
18
|
showBodiedExtensionRendererView?: boolean;
|
|
16
19
|
};
|
|
17
|
-
export declare const ExtensionLabel: ({ text, extensionName, isNodeHovered, customContainerStyles, isNodeNested, setIsNodeHovered, isBodiedMacro,
|
|
20
|
+
export declare const ExtensionLabel: ({ text, extensionName, isNodeHovered, customContainerStyles, isNodeNested, setIsNodeHovered, isBodiedMacro, showUpdatedLivePages1PBodiedExtensionUI, showLivePagesBodiedMacrosRendererView, showBodiedExtensionRendererView, }: ExtensionLabelProps) => jsx.JSX.Element;
|
|
18
21
|
export {};
|
|
@@ -10,7 +10,6 @@ type LozengeComponentProps = {
|
|
|
10
10
|
renderImage: (lozengeData: LozengeData) => void;
|
|
11
11
|
isNodeSelected?: boolean;
|
|
12
12
|
showMacroInteractionDesignUpdates?: boolean;
|
|
13
|
-
showMacroButtonUpdates?: boolean;
|
|
14
13
|
customContainerStyles?: CSSProperties;
|
|
15
14
|
isNodeHovered?: boolean;
|
|
16
15
|
isNodeNested?: boolean;
|
|
@@ -21,5 +20,5 @@ type LozengeComponentProps = {
|
|
|
21
20
|
showBodiedExtensionRendererView?: boolean;
|
|
22
21
|
setShowBodiedExtensionRendererView?: (showBodiedExtensionRendererView: boolean) => void;
|
|
23
22
|
};
|
|
24
|
-
export declare const LozengeComponent: ({ lozengeData, extensionName, title, params, renderImage, showMacroInteractionDesignUpdates,
|
|
23
|
+
export declare const LozengeComponent: ({ lozengeData, extensionName, title, params, renderImage, showMacroInteractionDesignUpdates, customContainerStyles, isNodeHovered, isNodeNested, setIsNodeHovered, isBodiedMacro, showLivePagesBodiedMacrosRendererView, showUpdatedLivePages1PBodiedExtensionUI, showBodiedExtensionRendererView, setShowBodiedExtensionRendererView, }: LozengeComponentProps) => jsx.JSX.Element;
|
|
25
24
|
export {};
|
|
@@ -9,7 +9,6 @@ import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
|
9
9
|
export interface Props {
|
|
10
10
|
node: PmNode;
|
|
11
11
|
showMacroInteractionDesignUpdates?: boolean;
|
|
12
|
-
showMacroButtonUpdates?: boolean;
|
|
13
12
|
isNodeSelected?: boolean;
|
|
14
13
|
isNodeHovered?: boolean;
|
|
15
14
|
isNodeNested?: boolean;
|
|
@@ -230,14 +230,6 @@ export type FeatureFlags = {
|
|
|
230
230
|
* @default false
|
|
231
231
|
*/
|
|
232
232
|
macroInteractionUpdates?: boolean;
|
|
233
|
-
/**
|
|
234
|
-
* @description
|
|
235
|
-
* Enables macro interaction visual button updates
|
|
236
|
-
*
|
|
237
|
-
* @see https://product-fabric.atlassian.net/browse/PGXT-5513
|
|
238
|
-
* @default false
|
|
239
|
-
*/
|
|
240
|
-
macroInteractionButtonUpdates?: boolean;
|
|
241
233
|
/**
|
|
242
234
|
* @description
|
|
243
235
|
* Enables extra analytics to be added for comments on media
|
package/package.json
CHANGED