@bigbinary/neeto-editor 1.47.127 → 1.47.130
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/dist/Editor.js +32 -29
- package/dist/Editor.js.map +1 -1
- package/dist/{chunk-C8O6gt0z.js → chunk-BSdgi_3H.js} +16 -2
- package/dist/chunk-BSdgi_3H.js.map +1 -0
- package/dist/cjs/Editor.cjs.js +32 -29
- package/dist/cjs/Editor.cjs.js.map +1 -1
- package/dist/cjs/{chunk-DkzRRlJ6.cjs.js → chunk-DRJy8PFC.cjs.js} +16 -1
- package/dist/cjs/chunk-DRJy8PFC.cjs.js.map +1 -0
- package/dist/cjs/v2/Editor.cjs.js +20 -27
- package/dist/cjs/v2/Editor.cjs.js.map +1 -1
- package/dist/cjs/v2/FormikEditor.cjs.js +1 -1
- package/dist/cjs/v2/Menu.cjs.js +1 -1
- package/dist/cjs/v2/index.cjs.js +1 -1
- package/dist/editor-stats.html +2 -2
- package/dist/v2/Editor.js +20 -27
- package/dist/v2/Editor.js.map +1 -1
- package/dist/v2/FormikEditor.js +1 -1
- package/dist/v2/Menu.js +1 -1
- package/dist/v2/index.js +1 -1
- package/package.json +1 -1
- package/types.d.ts +1 -0
- package/dist/chunk-C8O6gt0z.js.map +0 -1
- package/dist/cjs/chunk-DkzRRlJ6.cjs.js.map +0 -1
package/dist/cjs/Editor.cjs.js
CHANGED
|
@@ -2107,8 +2107,6 @@ var MentionList = /*#__PURE__*/function (_React$Component) {
|
|
|
2107
2107
|
var _this2 = this;
|
|
2108
2108
|
var selectedIndex = this.state.selectedIndex;
|
|
2109
2109
|
var items = this.props.items;
|
|
2110
|
-
var Menu = Dropdown__default.default.Menu,
|
|
2111
|
-
MenuItem = Dropdown__default.default.MenuItem;
|
|
2112
2110
|
if (ramda.isEmpty(items)) {
|
|
2113
2111
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2114
2112
|
className: "neeto-editor-mentions__wrapper",
|
|
@@ -2118,40 +2116,45 @@ var MentionList = /*#__PURE__*/function (_React$Component) {
|
|
|
2118
2116
|
})
|
|
2119
2117
|
});
|
|
2120
2118
|
}
|
|
2119
|
+
|
|
2120
|
+
// Rendered with plain elements instead of neetoUI's Dropdown.Menu. That Menu
|
|
2121
|
+
// auto-focuses its <ul> on mount, which pulls focus out of the editor and
|
|
2122
|
+
// breaks mention typing/arrow navigation (the list is driven entirely by the
|
|
2123
|
+
// editor's keydown). neetoUI's class names are kept so the popup styling is
|
|
2124
|
+
// unchanged.
|
|
2121
2125
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2122
2126
|
className: "neeto-ui-dropdown__popup",
|
|
2123
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
2124
|
-
className: "neeto-editor-mentions__wrapper",
|
|
2127
|
+
children: /*#__PURE__*/jsxRuntime.jsx("ul", {
|
|
2128
|
+
className: "neeto-ui-dropdown__popup-menu neeto-editor-mentions__wrapper",
|
|
2125
2129
|
"data-testid": "neeto-editor-mention-list",
|
|
2126
|
-
ref: this.mentionRef
|
|
2127
|
-
// Keep the list non-focusable so neetoUI's Menu can't auto-focus its
|
|
2128
|
-
// <ul> and steal focus from the editor; mention keystrokes and arrow
|
|
2129
|
-
// keys are handled through the editor's own keydown.
|
|
2130
|
-
,
|
|
2131
|
-
tabIndex: null,
|
|
2130
|
+
ref: this.mentionRef,
|
|
2132
2131
|
children: items.map(function (_ref2, index) {
|
|
2133
2132
|
var key = _ref2.key,
|
|
2134
2133
|
name = _ref2.name,
|
|
2135
2134
|
imageUrl = _ref2.imageUrl;
|
|
2136
|
-
return /*#__PURE__*/jsxRuntime.
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2135
|
+
return /*#__PURE__*/jsxRuntime.jsx("li", {
|
|
2136
|
+
className: "neeto-ui-dropdown__popup-menu-item",
|
|
2137
|
+
role: "menuitem",
|
|
2138
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("button", {
|
|
2139
|
+
"data-testid": "neeto-editor-mention-list-".concat(name),
|
|
2140
|
+
type: "button",
|
|
2141
|
+
className: classnames__default.default("neeto-ui-dropdown__popup-menu-item-btn neeto-editor-mentions__item", {
|
|
2142
|
+
active: index === selectedIndex
|
|
2143
|
+
}),
|
|
2144
|
+
onClick: function onClick() {
|
|
2145
|
+
return _this2.selectItem(index);
|
|
2146
|
+
},
|
|
2147
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Avatar__default.default, {
|
|
2148
|
+
size: "small",
|
|
2149
|
+
user: {
|
|
2150
|
+
name: name,
|
|
2151
|
+
imageUrl: imageUrl
|
|
2152
|
+
}
|
|
2153
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Typography__default.default, {
|
|
2154
|
+
style: "body2",
|
|
2155
|
+
children: name
|
|
2156
|
+
})]
|
|
2157
|
+
})
|
|
2155
2158
|
}, key);
|
|
2156
2159
|
})
|
|
2157
2160
|
})
|