@canlooks/can-ui 0.0.146 → 0.0.147
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.
|
@@ -86,7 +86,8 @@ exports.DataGridHead = (0, react_2.memo)(({ allowSelectAll, columnResizable, fla
|
|
|
86
86
|
const sortable = sorter && !children?.length;
|
|
87
87
|
const isOrderingColumn = orderColumn === _key;
|
|
88
88
|
const currentOrderType = isOrderingColumn ? orderType : 'descend';
|
|
89
|
-
const
|
|
89
|
+
const filteredValue = formValue?.[_key];
|
|
90
|
+
const isFilteredColumn = !(0, utils_1.isUnset)(filteredValue) && !(Array.isArray(filteredValue) && !filteredValue.length);
|
|
90
91
|
const filterButton = ((0, jsx_runtime_1.jsx)(button_1.Button, { className: dataGrid_style_1.classes.filterButton, variant: "plain", color: isFilteredColumn ? 'primary' : 'text.placeholder', onClick: e => {
|
|
91
92
|
e.stopPropagation();
|
|
92
93
|
onFilterClick?.(_key, e);
|
|
@@ -25,7 +25,7 @@ exports.FilterBubbleContent = (0, react_1.memo)(({ columnKey, columnFilterProps
|
|
|
25
25
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(form_1.FormItem, { field: columnKey, children: 'control' in columnFilterProps
|
|
26
26
|
? columnFilterProps.control
|
|
27
27
|
: (0, jsx_runtime_1.jsx)(FilterOptions, { ...columnFilterProps, onChange: () => {
|
|
28
|
-
|
|
28
|
+
columnFilterProps.multiple === false && setOpen(false);
|
|
29
29
|
} }) }), columnFilterProps.showResetButton !== false &&
|
|
30
30
|
(0, jsx_runtime_1.jsx)(flex_1.Flex, { gap: 6, justifyContent: "center", marginTop: 6, children: (0, jsx_runtime_1.jsx)(button_1.Button, { variant: "text", onClick: () => {
|
|
31
31
|
formRef.current.resetField(columnKey);
|
|
@@ -83,7 +83,8 @@ export const DataGridHead = memo(({ allowSelectAll, columnResizable, flattedColu
|
|
|
83
83
|
const sortable = sorter && !children?.length;
|
|
84
84
|
const isOrderingColumn = orderColumn === _key;
|
|
85
85
|
const currentOrderType = isOrderingColumn ? orderType : 'descend';
|
|
86
|
-
const
|
|
86
|
+
const filteredValue = formValue?.[_key];
|
|
87
|
+
const isFilteredColumn = !isUnset(filteredValue) && !(Array.isArray(filteredValue) && !filteredValue.length);
|
|
87
88
|
const filterButton = (_jsx(Button, { className: classes.filterButton, variant: "plain", color: isFilteredColumn ? 'primary' : 'text.placeholder', onClick: e => {
|
|
88
89
|
e.stopPropagation();
|
|
89
90
|
onFilterClick?.(_key, e);
|
|
@@ -22,7 +22,7 @@ export const FilterBubbleContent = memo(({ columnKey, columnFilterProps }) => {
|
|
|
22
22
|
return (_jsxs(_Fragment, { children: [_jsx(FormItem, { field: columnKey, children: 'control' in columnFilterProps
|
|
23
23
|
? columnFilterProps.control
|
|
24
24
|
: _jsx(FilterOptions, { ...columnFilterProps, onChange: () => {
|
|
25
|
-
|
|
25
|
+
columnFilterProps.multiple === false && setOpen(false);
|
|
26
26
|
} }) }), columnFilterProps.showResetButton !== false &&
|
|
27
27
|
_jsx(Flex, { gap: 6, justifyContent: "center", marginTop: 6, children: _jsx(Button, { variant: "text", onClick: () => {
|
|
28
28
|
formRef.current.resetField(columnKey);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canlooks/can-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.147",
|
|
4
4
|
"author": "C.CanLiang <canlooks@gmail.com>",
|
|
5
5
|
"description": "My ui framework",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"clean": "npx shx rm -rf dist documentation/bootstrap.mjs documentation/vite.config.mjs",
|
|
40
40
|
"build:core": "tsc -m esnext --outDir dist/esm & tsc -m commonjs --outDir dist/cjs",
|
|
41
41
|
"build:documentation": "vite build -c documentation/vite.config.mts && tsc -p documentation/tsconfig.bootstrap.json",
|
|
42
|
-
"rebuild": "npm run clean && npm run build:core
|
|
42
|
+
"rebuild": "npm run clean && npm run build:core",
|
|
43
43
|
"dev": "vite -c test/vite.config.mts",
|
|
44
44
|
"dev:ssr": "next dev test",
|
|
45
45
|
"dev:documentation": "vite -c documentation/vite.config.mts --host",
|
|
@@ -49,10 +49,10 @@
|
|
|
49
49
|
"@dnd-kit/core": "^6.3.1",
|
|
50
50
|
"@dnd-kit/sortable": "^10.0.0",
|
|
51
51
|
"@emotion/react": "^11.14.0",
|
|
52
|
-
"@fortawesome/free-brands-svg-icons": "^7.
|
|
53
|
-
"@fortawesome/free-regular-svg-icons": "^7.
|
|
54
|
-
"@fortawesome/free-solid-svg-icons": "^7.
|
|
55
|
-
"@fortawesome/react-fontawesome": "^3.
|
|
52
|
+
"@fortawesome/free-brands-svg-icons": "^7.2.0",
|
|
53
|
+
"@fortawesome/free-regular-svg-icons": "^7.2.0",
|
|
54
|
+
"@fortawesome/free-solid-svg-icons": "^7.2.0",
|
|
55
|
+
"@fortawesome/react-fontawesome": "^3.2.0",
|
|
56
56
|
"color": "^5.0.3",
|
|
57
57
|
"dayjs": "^1.11.19",
|
|
58
58
|
"react-transition-group": "^4.4.5",
|
|
@@ -61,24 +61,24 @@
|
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@ant-design/icons": "^6.1.0",
|
|
63
63
|
"@canlooks/react-router": "^1.1.0",
|
|
64
|
-
"@canlooks/reactive": "^4.7.
|
|
64
|
+
"@canlooks/reactive": "^4.7.15",
|
|
65
65
|
"@emotion/styled": "^11.14.1",
|
|
66
66
|
"@mdi/js": "^7.4.47",
|
|
67
67
|
"@mdi/react": "^1.6.1",
|
|
68
|
-
"@mui/icons-material": "^7.3.
|
|
69
|
-
"@types/node": "^25.
|
|
70
|
-
"@types/react": "^19.2.
|
|
68
|
+
"@mui/icons-material": "^7.3.8",
|
|
69
|
+
"@types/node": "^25.3.2",
|
|
70
|
+
"@types/react": "^19.2.14",
|
|
71
71
|
"@types/react-dom": "^19.2.3",
|
|
72
72
|
"@types/react-syntax-highlighter": "^15.5.13",
|
|
73
73
|
"@types/react-transition-group": "^4.4.12",
|
|
74
74
|
"mime": "^4.1.0",
|
|
75
|
-
"next": "^16.
|
|
76
|
-
"react": "^19.2.
|
|
77
|
-
"react-dom": "^19.2.
|
|
75
|
+
"next": "^16.1.6",
|
|
76
|
+
"react": "^19.2.4",
|
|
77
|
+
"react-dom": "^19.2.4",
|
|
78
78
|
"react-markdown": "^10.1.0",
|
|
79
|
-
"react-syntax-highlighter": "^16.1.
|
|
79
|
+
"react-syntax-highlighter": "^16.1.1",
|
|
80
80
|
"remark-gfm": "^4.0.1",
|
|
81
81
|
"typescript": "^5.9.3",
|
|
82
|
-
"vite": "^7.3.
|
|
82
|
+
"vite": "^7.3.1"
|
|
83
83
|
}
|
|
84
84
|
}
|