@vertesia/ui 1.1.0-dev.20260427.060440Z → 1.1.0
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/lib/esm/core/components/shadcn/filters/comboBox/SelectCombobox.js +8 -7
- package/lib/esm/core/components/shadcn/filters/comboBox/SelectCombobox.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/filters.js +1 -1
- package/lib/esm/core/components/shadcn/filters/filters.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/core/components/shadcn/filters/comboBox/SelectCombobox.d.ts +2 -1
- package/lib/types/core/components/shadcn/filters/comboBox/SelectCombobox.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/filters/filters.d.ts.map +1 -1
- package/lib/vertesia-ui-core.js +1 -1
- package/lib/vertesia-ui-core.js.map +1 -1
- package/package.json +5 -5
- package/src/core/components/shadcn/filters/comboBox/SelectCombobox.tsx +14 -7
- package/src/core/components/shadcn/filters/filters.tsx +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vertesia/ui",
|
|
3
|
-
"version": "1.1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Vertesia UI components and and hooks",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -86,10 +86,10 @@
|
|
|
86
86
|
"vega": "^6.2.0",
|
|
87
87
|
"vega-embed": "^7.1.0",
|
|
88
88
|
"vega-lite": "^6.4.1",
|
|
89
|
-
"@vertesia/
|
|
90
|
-
"@vertesia/
|
|
91
|
-
"@vertesia/common": "1.1.0
|
|
92
|
-
"@vertesia/
|
|
89
|
+
"@vertesia/fusion-ux": "1.1.0",
|
|
90
|
+
"@vertesia/json": "1.1.0",
|
|
91
|
+
"@vertesia/common": "1.1.0",
|
|
92
|
+
"@vertesia/client": "1.1.0"
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
95
|
"@eslint/compat": "^2.0.2",
|
|
@@ -13,12 +13,14 @@ export const SelectionCombobox = ({
|
|
|
13
13
|
setFilterValues,
|
|
14
14
|
options,
|
|
15
15
|
labelRenderer,
|
|
16
|
+
multiple = true,
|
|
16
17
|
}: {
|
|
17
18
|
filterType: string;
|
|
18
19
|
filterValues: FilterOption[];
|
|
19
20
|
setFilterValues: (filterValues: FilterOption[]) => void;
|
|
20
21
|
options: FilterGroupOption[];
|
|
21
22
|
labelRenderer?: (value: string) => React.ReactNode | Promise<React.ReactNode>;
|
|
23
|
+
multiple?: boolean;
|
|
22
24
|
}) => {
|
|
23
25
|
const [open, setOpen] = useState(false);
|
|
24
26
|
const [commandInput, setCommandInput] = useState("");
|
|
@@ -88,7 +90,9 @@ export const SelectionCombobox = ({
|
|
|
88
90
|
setOpen(false);
|
|
89
91
|
}}
|
|
90
92
|
>
|
|
91
|
-
|
|
93
|
+
{multiple && (
|
|
94
|
+
<input type="checkbox" checked={true} onChange={() => {}} />
|
|
95
|
+
)}
|
|
92
96
|
<DynamicLabel
|
|
93
97
|
value={value.value || ''}
|
|
94
98
|
labelRenderer={labelRenderer}
|
|
@@ -112,20 +116,23 @@ export const SelectionCombobox = ({
|
|
|
112
116
|
key={filter.value}
|
|
113
117
|
value={String(filter.label || filter.value)}
|
|
114
118
|
onSelect={() => {
|
|
115
|
-
|
|
119
|
+
const next = {
|
|
116
120
|
value: filter.value,
|
|
117
121
|
label: filter.label
|
|
118
|
-
}
|
|
122
|
+
};
|
|
123
|
+
setFilterValues(multiple ? [...filterValues, next] : [next]);
|
|
119
124
|
setTimeout(() => {
|
|
120
125
|
setCommandInput("");
|
|
121
126
|
}, 200);
|
|
122
127
|
setOpen(false);
|
|
123
128
|
}}
|
|
124
129
|
>
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
130
|
+
{multiple && (
|
|
131
|
+
<Checkbox
|
|
132
|
+
checked={false}
|
|
133
|
+
className="opacity-0 group-data-[selected=true]:opacity-100"
|
|
134
|
+
/>
|
|
135
|
+
)}
|
|
129
136
|
<span className="text-muted">
|
|
130
137
|
<DynamicLabel
|
|
131
138
|
value={filter.value || ''}
|