@nethru/ui 1.0.75 → 1.0.77

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 CHANGED
@@ -22,6 +22,8 @@ export default function Editor({
22
22
  restrictWidth = true,
23
23
  onUpdate,
24
24
  onScroll,
25
+ onFocus,
26
+ onBlur,
25
27
  style,
26
28
  ...props
27
29
  }) {
@@ -123,6 +125,10 @@ export default function Editor({
123
125
  highlightKeyword();
124
126
  scrollToBottom();
125
127
  }, [content, view, highlightKeyword, scrollToBottom]);
128
+ useEffect(() => {
129
+ if (focused && onFocus) onFocus();
130
+ if (!focused && onBlur) onBlur();
131
+ }, [focused]);
126
132
  return /*#__PURE__*/_jsxs(Box, {
127
133
  ref: ref,
128
134
  children: [/*#__PURE__*/_jsx(CodeMirror, {
@@ -31,9 +31,9 @@ export default function ReferenceChipList({
31
31
  })
32
32
  }, index) : /*#__PURE__*/_jsx(ReferenceChip, {
33
33
  name: reference.name,
34
- onClick: event => handleClick(reference.id, event),
34
+ onClick: event => reference.clickable && handleClick(reference.id, event),
35
35
  sx: {
36
- cursor: 'default',
36
+ cursor: reference.clickable ? 'pointer' : 'default',
37
37
  ...chipStyles
38
38
  },
39
39
  ...chipProps
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nethru/ui",
3
- "version": "1.0.75",
3
+ "version": "1.0.77",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "/dist"