@nethru/ui 1.0.69 → 1.0.71
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/DataGrid.js +3 -3
- package/dist/Editor.js +17 -3
- package/dist/PropertyTable.js +3 -3
- package/package.json +4 -3
package/dist/DataGrid.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { DataGridPro as MuiDataGridPro, GRID_CHECKBOX_SELECTION_COL_DEF, GridCell, GridToolbarQuickFilter, koKR } from "@mui/x-data-grid-pro";
|
|
3
3
|
import { Box, Stack } from "@mui/material";
|
|
4
4
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -12,7 +12,7 @@ const styles = {
|
|
|
12
12
|
borderBottom: 'none'
|
|
13
13
|
},
|
|
14
14
|
'.MuiDataGrid-columnSeparator': {
|
|
15
|
-
visibility: 'hidden !important'
|
|
15
|
+
// visibility: 'hidden !important'
|
|
16
16
|
},
|
|
17
17
|
'.MuiDataGrid-columnHeaders': {
|
|
18
18
|
//borderBottom: 'none !important'
|
|
@@ -95,7 +95,7 @@ export default function DataGrid({
|
|
|
95
95
|
children: children
|
|
96
96
|
});
|
|
97
97
|
};
|
|
98
|
-
return /*#__PURE__*/_jsx(
|
|
98
|
+
return /*#__PURE__*/_jsx(MuiDataGridPro, {
|
|
99
99
|
columns: columns,
|
|
100
100
|
rows: rows,
|
|
101
101
|
autoHeight: true,
|
package/dist/Editor.js
CHANGED
|
@@ -21,6 +21,7 @@ export default function Editor({
|
|
|
21
21
|
autoScrollToBottom = false,
|
|
22
22
|
restrictWidth = true,
|
|
23
23
|
onUpdate,
|
|
24
|
+
onScroll,
|
|
24
25
|
style,
|
|
25
26
|
...props
|
|
26
27
|
}) {
|
|
@@ -75,6 +76,21 @@ export default function Editor({
|
|
|
75
76
|
extension: extension
|
|
76
77
|
};
|
|
77
78
|
}, []);
|
|
79
|
+
const extensionList = useMemo(() => {
|
|
80
|
+
const result = [jsonFormat ? json() : javascript({
|
|
81
|
+
jsx: true
|
|
82
|
+
}), EditorView.lineWrapping, highlight.extension];
|
|
83
|
+
if (onScroll) {
|
|
84
|
+
result.push(EditorView.domEventHandlers({
|
|
85
|
+
scroll(event, view) {
|
|
86
|
+
if (!event.target?.className.includes('cm-scroller')) return;
|
|
87
|
+
onScroll(event, view.scrollDOM);
|
|
88
|
+
}
|
|
89
|
+
}));
|
|
90
|
+
}
|
|
91
|
+
result.push(...extensions);
|
|
92
|
+
return result;
|
|
93
|
+
}, [jsonFormat, highlight.extension, extensions, onScroll]);
|
|
78
94
|
const handleUpdate = viewUpdate => {
|
|
79
95
|
setFocused(viewUpdate.view.hasFocus);
|
|
80
96
|
if (onUpdate) onUpdate(viewUpdate);
|
|
@@ -112,9 +128,7 @@ export default function Editor({
|
|
|
112
128
|
children: [/*#__PURE__*/_jsx(CodeMirror, {
|
|
113
129
|
value: content,
|
|
114
130
|
editable: !readOnly,
|
|
115
|
-
extensions:
|
|
116
|
-
jsx: true
|
|
117
|
-
}), EditorView.lineWrapping, highlight.extension, ...extensions],
|
|
131
|
+
extensions: extensionList,
|
|
118
132
|
basicSetup: {
|
|
119
133
|
...basicSetup,
|
|
120
134
|
highlightActiveLineGutter: false,
|
package/dist/PropertyTable.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { forwardRef, useMemo, useState } from "react";
|
|
2
2
|
import { Box, Typography } from "@mui/material";
|
|
3
3
|
import MenuItem from "@mui/material/MenuItem";
|
|
4
|
-
import { DataGrid, useGridApiContext } from "@mui/x-data-grid";
|
|
5
4
|
import Select from "./Select";
|
|
5
|
+
import { DataGridPro, useGridApiContext } from "@mui/x-data-grid-pro";
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
8
|
const PropertyTable = /*#__PURE__*/forwardRef(({
|
|
@@ -25,7 +25,7 @@ const PropertyTable = /*#__PURE__*/forwardRef(({
|
|
|
25
25
|
backgroundColor: '#f8f9fa'
|
|
26
26
|
},
|
|
27
27
|
'.MuiDataGrid-columnSeparator': {
|
|
28
|
-
visibility: 'hidden !important'
|
|
28
|
+
// visibility: 'hidden !important'
|
|
29
29
|
},
|
|
30
30
|
'&.MuiDataGrid-root .MuiDataGrid-columnHeader:focus': {
|
|
31
31
|
outline: 'none !important'
|
|
@@ -87,7 +87,7 @@ const PropertyTable = /*#__PURE__*/forwardRef(({
|
|
|
87
87
|
return /*#__PURE__*/_jsxs(Box, {
|
|
88
88
|
ref: ref,
|
|
89
89
|
sx: outerSx,
|
|
90
|
-
children: [/*#__PURE__*/_jsx(
|
|
90
|
+
children: [/*#__PURE__*/_jsx(DataGridPro, {
|
|
91
91
|
columns: arrangedColumns,
|
|
92
92
|
rows: rows,
|
|
93
93
|
columnHeaderHeight: 35,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nethru/ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.71",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"files": [
|
|
6
6
|
"/dist"
|
|
@@ -13,8 +13,9 @@
|
|
|
13
13
|
"@fontsource/roboto": "^5.0.8",
|
|
14
14
|
"@mui/icons-material": "^5.14.18",
|
|
15
15
|
"@mui/material": "^5.14.18",
|
|
16
|
-
"@mui/x-data-grid": "^6.
|
|
17
|
-
"@mui/x-date-pickers": "^
|
|
16
|
+
"@mui/x-data-grid-pro": "^6.19.10",
|
|
17
|
+
"@mui/x-date-pickers-pro": "^7.2.0",
|
|
18
|
+
"@mui/x-license": "^7.2.0",
|
|
18
19
|
"@mui/x-tree-view": "^6.17.0",
|
|
19
20
|
"@nethru/ui": "^1.0.19",
|
|
20
21
|
"@testing-library/jest-dom": "^5.17.0",
|