@udecode/plate-mention-ui
Advanced tools
Comparing version 5.3.5 to 6.0.0
# @udecode/plate-mention-ui | ||
## 6.0.0 | ||
## 5.3.5 | ||
@@ -4,0 +6,0 @@ |
@@ -1,5 +0,5 @@ | ||
import { useEffect } from 'react'; | ||
import * as React from 'react'; | ||
import React__default, { useEffect } from 'react'; | ||
import { comboboxStore, Combobox } from '@udecode/plate-combobox'; | ||
import { ELEMENT_MENTION, getMentionOnSelectItem, COMBOBOX_TRIGGER_MENTION } from '@udecode/plate-mention'; | ||
import { jsx, jsxs } from 'react/jsx-runtime'; | ||
import { createStyles } from '@udecode/plate-styled-components'; | ||
@@ -38,3 +38,3 @@ import _styled, { css } from 'styled-components'; | ||
if ((_ref = activeId !== id) !== null && _ref !== void 0 ? _ref : pluginKey) return null; | ||
return /*#__PURE__*/jsx(Combobox, { | ||
return /*#__PURE__*/React__default.createElement(Combobox, { | ||
items: items, | ||
@@ -62,2 +62,20 @@ component: component, | ||
function _extends() { | ||
_extends = Object.assign || function (target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
} | ||
} | ||
return target; | ||
}; | ||
return _extends.apply(this, arguments); | ||
} | ||
const MentionElement = props => { | ||
@@ -84,3 +102,3 @@ const { | ||
}); | ||
return /*#__PURE__*/jsxs(_StyledSpan, { ...attributes, | ||
return /*#__PURE__*/React.createElement(_StyledSpan, _extends({}, attributes, { | ||
as: as, | ||
@@ -90,8 +108,6 @@ "data-slate-value": element.value, | ||
contentEditable: false, | ||
onClick: getHandler(onClick, element), | ||
...rootProps, | ||
...nodeProps, | ||
$_css: styles.root.css, | ||
children: [prefix, renderLabel ? renderLabel(element) : element.value, children] | ||
}); | ||
onClick: getHandler(onClick, element) | ||
}, rootProps, nodeProps, { | ||
$_css: styles.root.css | ||
}), prefix, renderLabel ? renderLabel(element) : element.value, children); | ||
}; | ||
@@ -98,0 +114,0 @@ |
@@ -5,6 +5,5 @@ 'use strict'; | ||
var react = require('react'); | ||
var React = require('react'); | ||
var plateCombobox = require('@udecode/plate-combobox'); | ||
var plateMention = require('@udecode/plate-mention'); | ||
var jsxRuntime = require('react/jsx-runtime'); | ||
var plateStyledComponents = require('@udecode/plate-styled-components'); | ||
@@ -17,2 +16,24 @@ var _styled = require('styled-components'); | ||
function _interopNamespace(e) { | ||
if (e && e.__esModule) return e; | ||
var n = Object.create(null); | ||
if (e) { | ||
Object.keys(e).forEach(function (k) { | ||
if (k !== 'default') { | ||
var d = Object.getOwnPropertyDescriptor(e, k); | ||
Object.defineProperty(n, k, d.get ? d : { | ||
enumerable: true, | ||
get: function () { | ||
return e[k]; | ||
} | ||
}); | ||
} | ||
}); | ||
} | ||
n['default'] = e; | ||
return Object.freeze(n); | ||
} | ||
var React__default = /*#__PURE__*/_interopDefaultLegacy(React); | ||
var React__namespace = /*#__PURE__*/_interopNamespace(React); | ||
var _styled__default = /*#__PURE__*/_interopDefaultLegacy(_styled); | ||
@@ -39,3 +60,3 @@ | ||
}); | ||
react.useEffect(() => { | ||
React.useEffect(() => { | ||
plateCombobox.comboboxStore.set.setComboboxById({ | ||
@@ -49,3 +70,3 @@ id: id !== null && id !== void 0 ? id : pluginKey, | ||
if ((_ref = activeId !== id) !== null && _ref !== void 0 ? _ref : pluginKey) return null; | ||
return /*#__PURE__*/jsxRuntime.jsx(plateCombobox.Combobox, { | ||
return /*#__PURE__*/React__default['default'].createElement(plateCombobox.Combobox, { | ||
items: items, | ||
@@ -73,2 +94,20 @@ component: component, | ||
function _extends() { | ||
_extends = Object.assign || function (target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
} | ||
} | ||
return target; | ||
}; | ||
return _extends.apply(this, arguments); | ||
} | ||
const MentionElement = props => { | ||
@@ -95,3 +134,3 @@ const { | ||
}); | ||
return /*#__PURE__*/jsxRuntime.jsxs(_StyledSpan, { ...attributes, | ||
return /*#__PURE__*/React__namespace.createElement(_StyledSpan, _extends({}, attributes, { | ||
as: as, | ||
@@ -101,8 +140,6 @@ "data-slate-value": element.value, | ||
contentEditable: false, | ||
onClick: plateCommon.getHandler(onClick, element), | ||
...rootProps, | ||
...nodeProps, | ||
$_css: styles.root.css, | ||
children: [prefix, renderLabel ? renderLabel(element) : element.value, children] | ||
}); | ||
onClick: plateCommon.getHandler(onClick, element) | ||
}, rootProps, nodeProps, { | ||
$_css: styles.root.css | ||
}), prefix, renderLabel ? renderLabel(element) : element.value, children); | ||
}; | ||
@@ -109,0 +146,0 @@ |
{ | ||
"name": "@udecode/plate-mention-ui", | ||
"version": "5.3.5", | ||
"version": "6.0.0", | ||
"description": "Media embed UI for Plate", | ||
@@ -35,7 +35,7 @@ "keywords": [ | ||
"dependencies": { | ||
"@udecode/plate-combobox": "5.3.5", | ||
"@udecode/plate-common": "5.3.5", | ||
"@udecode/plate-core": "5.3.1", | ||
"@udecode/plate-mention": "5.3.5", | ||
"@udecode/plate-styled-components": "5.3.5" | ||
"@udecode/plate-combobox": "6.0.0", | ||
"@udecode/plate-common": "6.0.0", | ||
"@udecode/plate-core": "6.0.0", | ||
"@udecode/plate-mention": "6.0.0", | ||
"@udecode/plate-styled-components": "6.0.0" | ||
}, | ||
@@ -42,0 +42,0 @@ "peerDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
41246
283
+ Added@udecode/plate-combobox@6.0.0(transitive)
+ Added@udecode/plate-common@6.0.0(transitive)
+ Added@udecode/plate-core@6.0.0(transitive)
+ Added@udecode/plate-mention@6.0.0(transitive)
+ Added@udecode/plate-popper@6.0.0(transitive)
+ Added@udecode/plate-styled-components@6.0.0(transitive)
- Removed@udecode/plate-combobox@5.3.5(transitive)
- Removed@udecode/plate-common@5.3.5(transitive)
- Removed@udecode/plate-core@5.3.1(transitive)
- Removed@udecode/plate-mention@5.3.5(transitive)
- Removed@udecode/plate-popper@5.3.5(transitive)
- Removed@udecode/plate-styled-components@5.3.5(transitive)
Updated@udecode/plate-common@6.0.0
Updated@udecode/plate-core@6.0.0
Updated@udecode/plate-mention@6.0.0