@etsoo/materialui 1.5.97 → 1.5.98
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/cjs/ComboBox.js +1 -1
- package/lib/cjs/ComboBoxMultiple.js +1 -1
- package/lib/cjs/ListMultipler.js +1 -1
- package/lib/cjs/SearchBar.js +0 -6
- package/lib/cjs/Tiplist.js +1 -1
- package/lib/cjs/TiplistPro.js +1 -1
- package/lib/mjs/ComboBox.js +1 -1
- package/lib/mjs/ComboBoxMultiple.js +1 -1
- package/lib/mjs/ListMultipler.js +1 -1
- package/lib/mjs/SearchBar.js +0 -6
- package/lib/mjs/Tiplist.js +1 -1
- package/lib/mjs/TiplistPro.js +1 -1
- package/package.json +1 -1
- package/src/ComboBox.tsx +3 -3
- package/src/ComboBoxMultiple.tsx +3 -3
- package/src/ListMultipler.tsx +1 -1
- package/src/SearchBar.tsx +0 -10
- package/src/Tiplist.tsx +3 -3
- package/src/TiplistPro.tsx +3 -3
package/lib/cjs/ComboBox.js
CHANGED
|
@@ -124,7 +124,7 @@ function ComboBox(props) {
|
|
|
124
124
|
};
|
|
125
125
|
}, []);
|
|
126
126
|
// Layout
|
|
127
|
-
return ((0, jsx_runtime_1.jsxs)(
|
|
127
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: { flex: 2 }, children: [(0, jsx_runtime_1.jsx)("input", { ref: inputRef, "data-reset": inputReset ?? true, type: idIsString ? "text" : "number", style: { display: "none" }, name: name, value: getValue(stateValue), readOnly: true, onChange: inputOnChange }), (0, jsx_runtime_1.jsxs)(Stack_1.default, { gap: 0.5, direction: "row", width: "100%", children: [(0, jsx_runtime_1.jsx)(Autocomplete_1.default, { value: stateValue, disableCloseOnSelect: disableCloseOnSelect, getOptionLabel: getOptionLabel, isOptionEqualToValue: (option, value) => option[idField] === value[idField], onChange: (event, value, reason, details) => {
|
|
128
128
|
// Set value
|
|
129
129
|
setInputValue(value);
|
|
130
130
|
// Custom
|
|
@@ -121,7 +121,7 @@ function ComboBoxMultiple(props) {
|
|
|
121
121
|
};
|
|
122
122
|
}, []);
|
|
123
123
|
// Layout
|
|
124
|
-
return ((0, jsx_runtime_1.jsxs)(
|
|
124
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: { flex: 2 }, children: [(0, jsx_runtime_1.jsx)("input", { ref: inputRef, "data-reset": inputReset ?? true, type: "text", style: { display: "none" }, name: name, value: getValue(stateValue), readOnly: true, onChange: inputOnChange }), (0, jsx_runtime_1.jsx)(Autocomplete_1.default, { value: stateValue == null
|
|
125
125
|
? []
|
|
126
126
|
: Array.isArray(stateValue)
|
|
127
127
|
? stateValue
|
package/lib/cjs/ListMultipler.js
CHANGED
|
@@ -57,5 +57,5 @@ function ListMultipler(props) {
|
|
|
57
57
|
}
|
|
58
58
|
const inputType = typeof ids[0] === "string" ? "text" : "number";
|
|
59
59
|
// Layout
|
|
60
|
-
return ((0, jsx_runtime_1.jsxs)(List_1.default, { ...rest, children: [name && ((0, jsx_runtime_1.jsx)("input", { type: inputType, style: { display: "none"
|
|
60
|
+
return ((0, jsx_runtime_1.jsxs)(List_1.default, { ...rest, children: [name && ((0, jsx_runtime_1.jsx)("input", { type: inputType, style: { display: "none" }, name: name, value: ids.join(","), readOnly: true })), data.map((u) => ((0, jsx_runtime_1.jsx)(ListItem_1.default, { ...listItemProps, children: (0, jsx_runtime_1.jsxs)(ListItemButton_1.default, { dense: true, onClick: () => handleToggle(u[idField]), children: [(0, jsx_runtime_1.jsx)(ListItemIcon_1.default, { children: (0, jsx_runtime_1.jsx)(Checkbox_1.default, { edge: "start", disableRipple: true, checked: ids.includes(u[idField]) }) }), (0, jsx_runtime_1.jsx)(ListItemText_1.default, { primary: GetListItemLabel(u, primaryLabel), secondary: GetListItemLabel(u, secondaryLabel), ...listItemTextProps })] }) }, `${u[idField]}`)))] }));
|
|
61
61
|
}
|
package/lib/cjs/SearchBar.js
CHANGED
|
@@ -152,12 +152,6 @@ function SearchBar(props) {
|
|
|
152
152
|
let newIndex = others;
|
|
153
153
|
for (let c = 0; c < others; c++) {
|
|
154
154
|
const child = children[c];
|
|
155
|
-
// Ignore it when it's input and hidden or display none
|
|
156
|
-
if (child instanceof HTMLInputElement &&
|
|
157
|
-
(child.type === "hidden" ||
|
|
158
|
-
(child.parentElement == null && child.readOnly))) {
|
|
159
|
-
continue;
|
|
160
|
-
}
|
|
161
155
|
const cachedWidth = child.getAttribute(cachedWidthName);
|
|
162
156
|
let childWidth;
|
|
163
157
|
if (cachedWidth) {
|
package/lib/cjs/Tiplist.js
CHANGED
|
@@ -172,7 +172,7 @@ function Tiplist(props) {
|
|
|
172
172
|
};
|
|
173
173
|
}, []);
|
|
174
174
|
// Layout
|
|
175
|
-
return ((0, jsx_runtime_1.jsxs)(
|
|
175
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: { flex: 2 }, children: [(0, jsx_runtime_1.jsx)("input", { ref: inputRef, "data-reset": inputReset ?? true, type: idIsString ? "text" : "number", style: { display: "none" }, name: name, value: `${inputValue ?? (state.current.idSet ? "" : localIdValue ?? "")}`, readOnly: true, onChange: inputOnChange }), (0, jsx_runtime_1.jsx)(Autocomplete_1.default, { filterOptions: (options, _state) => options, value: states.value, options: states.options, onChange: (event, value, reason, details) => {
|
|
176
176
|
// Set value
|
|
177
177
|
setInputValue(value);
|
|
178
178
|
// Custom
|
package/lib/cjs/TiplistPro.js
CHANGED
|
@@ -158,7 +158,7 @@ function TiplistPro(props) {
|
|
|
158
158
|
};
|
|
159
159
|
}, []);
|
|
160
160
|
// Layout
|
|
161
|
-
return ((0, jsx_runtime_1.jsxs)(
|
|
161
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: { flex: 2 }, children: [(0, jsx_runtime_1.jsx)("input", { ref: inputRef, "data-reset": inputReset ?? true, type: idIsString ? "text" : "number", style: { display: "none" }, name: name, value: inputValue ?? (state.current.idSet ? "" : localIdValue ?? ""), readOnly: true, onChange: inputOnChange }), (0, jsx_runtime_1.jsx)(Autocomplete_1.default, { filterOptions: (options, _state) => options, value: states.value, options: states.options, freeSolo: true, clearOnBlur: false, onChange: (event, value, reason, details) => {
|
|
162
162
|
if (typeof value === "object") {
|
|
163
163
|
// Set value
|
|
164
164
|
setInputValue(value);
|
package/lib/mjs/ComboBox.js
CHANGED
|
@@ -118,7 +118,7 @@ export function ComboBox(props) {
|
|
|
118
118
|
};
|
|
119
119
|
}, []);
|
|
120
120
|
// Layout
|
|
121
|
-
return (_jsxs(
|
|
121
|
+
return (_jsxs("div", { style: { flex: 2 }, children: [_jsx("input", { ref: inputRef, "data-reset": inputReset ?? true, type: idIsString ? "text" : "number", style: { display: "none" }, name: name, value: getValue(stateValue), readOnly: true, onChange: inputOnChange }), _jsxs(Stack, { gap: 0.5, direction: "row", width: "100%", children: [_jsx(Autocomplete, { value: stateValue, disableCloseOnSelect: disableCloseOnSelect, getOptionLabel: getOptionLabel, isOptionEqualToValue: (option, value) => option[idField] === value[idField], onChange: (event, value, reason, details) => {
|
|
122
122
|
// Set value
|
|
123
123
|
setInputValue(value);
|
|
124
124
|
// Custom
|
|
@@ -115,7 +115,7 @@ export function ComboBoxMultiple(props) {
|
|
|
115
115
|
};
|
|
116
116
|
}, []);
|
|
117
117
|
// Layout
|
|
118
|
-
return (_jsxs(
|
|
118
|
+
return (_jsxs("div", { style: { flex: 2 }, children: [_jsx("input", { ref: inputRef, "data-reset": inputReset ?? true, type: "text", style: { display: "none" }, name: name, value: getValue(stateValue), readOnly: true, onChange: inputOnChange }), _jsx(Autocomplete, { value: stateValue == null
|
|
119
119
|
? []
|
|
120
120
|
: Array.isArray(stateValue)
|
|
121
121
|
? stateValue
|
package/lib/mjs/ListMultipler.js
CHANGED
|
@@ -51,5 +51,5 @@ export function ListMultipler(props) {
|
|
|
51
51
|
}
|
|
52
52
|
const inputType = typeof ids[0] === "string" ? "text" : "number";
|
|
53
53
|
// Layout
|
|
54
|
-
return (_jsxs(List, { ...rest, children: [name && (_jsx("input", { type: inputType, style: { display: "none"
|
|
54
|
+
return (_jsxs(List, { ...rest, children: [name && (_jsx("input", { type: inputType, style: { display: "none" }, name: name, value: ids.join(","), readOnly: true })), data.map((u) => (_jsx(ListItem, { ...listItemProps, children: _jsxs(ListItemButton, { dense: true, onClick: () => handleToggle(u[idField]), children: [_jsx(ListItemIcon, { children: _jsx(Checkbox, { edge: "start", disableRipple: true, checked: ids.includes(u[idField]) }) }), _jsx(ListItemText, { primary: GetListItemLabel(u, primaryLabel), secondary: GetListItemLabel(u, secondaryLabel), ...listItemTextProps })] }) }, `${u[idField]}`)))] }));
|
|
55
55
|
}
|
package/lib/mjs/SearchBar.js
CHANGED
|
@@ -146,12 +146,6 @@ export function SearchBar(props) {
|
|
|
146
146
|
let newIndex = others;
|
|
147
147
|
for (let c = 0; c < others; c++) {
|
|
148
148
|
const child = children[c];
|
|
149
|
-
// Ignore it when it's input and hidden or display none
|
|
150
|
-
if (child instanceof HTMLInputElement &&
|
|
151
|
-
(child.type === "hidden" ||
|
|
152
|
-
(child.parentElement == null && child.readOnly))) {
|
|
153
|
-
continue;
|
|
154
|
-
}
|
|
155
149
|
const cachedWidth = child.getAttribute(cachedWidthName);
|
|
156
150
|
let childWidth;
|
|
157
151
|
if (cachedWidth) {
|
package/lib/mjs/Tiplist.js
CHANGED
|
@@ -166,7 +166,7 @@ export function Tiplist(props) {
|
|
|
166
166
|
};
|
|
167
167
|
}, []);
|
|
168
168
|
// Layout
|
|
169
|
-
return (_jsxs(
|
|
169
|
+
return (_jsxs("div", { style: { flex: 2 }, children: [_jsx("input", { ref: inputRef, "data-reset": inputReset ?? true, type: idIsString ? "text" : "number", style: { display: "none" }, name: name, value: `${inputValue ?? (state.current.idSet ? "" : localIdValue ?? "")}`, readOnly: true, onChange: inputOnChange }), _jsx(Autocomplete, { filterOptions: (options, _state) => options, value: states.value, options: states.options, onChange: (event, value, reason, details) => {
|
|
170
170
|
// Set value
|
|
171
171
|
setInputValue(value);
|
|
172
172
|
// Custom
|
package/lib/mjs/TiplistPro.js
CHANGED
|
@@ -152,7 +152,7 @@ export function TiplistPro(props) {
|
|
|
152
152
|
};
|
|
153
153
|
}, []);
|
|
154
154
|
// Layout
|
|
155
|
-
return (_jsxs(
|
|
155
|
+
return (_jsxs("div", { style: { flex: 2 }, children: [_jsx("input", { ref: inputRef, "data-reset": inputReset ?? true, type: idIsString ? "text" : "number", style: { display: "none" }, name: name, value: inputValue ?? (state.current.idSet ? "" : localIdValue ?? ""), readOnly: true, onChange: inputOnChange }), _jsx(Autocomplete, { filterOptions: (options, _state) => options, value: states.value, options: states.options, freeSolo: true, clearOnBlur: false, onChange: (event, value, reason, details) => {
|
|
156
156
|
if (typeof value === "object") {
|
|
157
157
|
// Set value
|
|
158
158
|
setInputValue(value);
|
package/package.json
CHANGED
package/src/ComboBox.tsx
CHANGED
|
@@ -236,12 +236,12 @@ export function ComboBox<
|
|
|
236
236
|
|
|
237
237
|
// Layout
|
|
238
238
|
return (
|
|
239
|
-
<
|
|
239
|
+
<div style={{ flex: 2 }}>
|
|
240
240
|
<input
|
|
241
241
|
ref={inputRef}
|
|
242
242
|
data-reset={inputReset ?? true}
|
|
243
243
|
type={idIsString ? "text" : "number"}
|
|
244
|
-
style={{ display: "none"
|
|
244
|
+
style={{ display: "none" }}
|
|
245
245
|
name={name}
|
|
246
246
|
value={getValue(stateValue)}
|
|
247
247
|
readOnly
|
|
@@ -311,6 +311,6 @@ export function ComboBox<
|
|
|
311
311
|
</IconButton>
|
|
312
312
|
)}
|
|
313
313
|
</Stack>
|
|
314
|
-
</
|
|
314
|
+
</div>
|
|
315
315
|
);
|
|
316
316
|
}
|
package/src/ComboBoxMultiple.tsx
CHANGED
|
@@ -239,12 +239,12 @@ export function ComboBoxMultiple<
|
|
|
239
239
|
|
|
240
240
|
// Layout
|
|
241
241
|
return (
|
|
242
|
-
<
|
|
242
|
+
<div style={{ flex: 2 }}>
|
|
243
243
|
<input
|
|
244
244
|
ref={inputRef}
|
|
245
245
|
data-reset={inputReset ?? true}
|
|
246
246
|
type="text"
|
|
247
|
-
style={{ display: "none"
|
|
247
|
+
style={{ display: "none" }}
|
|
248
248
|
name={name}
|
|
249
249
|
value={getValue(stateValue)}
|
|
250
250
|
readOnly
|
|
@@ -306,6 +306,6 @@ export function ComboBoxMultiple<
|
|
|
306
306
|
loadingText={loadingText}
|
|
307
307
|
{...rest}
|
|
308
308
|
/>
|
|
309
|
-
</
|
|
309
|
+
</div>
|
|
310
310
|
);
|
|
311
311
|
}
|
package/src/ListMultipler.tsx
CHANGED
|
@@ -124,7 +124,7 @@ export function ListMultipler<T extends object>(props: ListMultiplerProps<T>) {
|
|
|
124
124
|
{name && (
|
|
125
125
|
<input
|
|
126
126
|
type={inputType}
|
|
127
|
-
style={{ display: "none"
|
|
127
|
+
style={{ display: "none" }}
|
|
128
128
|
name={name}
|
|
129
129
|
value={ids.join(",")}
|
|
130
130
|
readOnly
|
package/src/SearchBar.tsx
CHANGED
|
@@ -233,16 +233,6 @@ export function SearchBar(props: SearchBarProps) {
|
|
|
233
233
|
let newIndex: number = others;
|
|
234
234
|
for (let c: number = 0; c < others; c++) {
|
|
235
235
|
const child = children[c];
|
|
236
|
-
|
|
237
|
-
// Ignore it when it's input and hidden or display none
|
|
238
|
-
if (
|
|
239
|
-
child instanceof HTMLInputElement &&
|
|
240
|
-
(child.type === "hidden" ||
|
|
241
|
-
(child.parentElement == null && child.readOnly))
|
|
242
|
-
) {
|
|
243
|
-
continue;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
236
|
const cachedWidth = child.getAttribute(cachedWidthName);
|
|
247
237
|
let childWidth: number;
|
|
248
238
|
if (cachedWidth) {
|
package/src/Tiplist.tsx
CHANGED
|
@@ -285,12 +285,12 @@ export function Tiplist<
|
|
|
285
285
|
|
|
286
286
|
// Layout
|
|
287
287
|
return (
|
|
288
|
-
<
|
|
288
|
+
<div style={{ flex: 2 }}>
|
|
289
289
|
<input
|
|
290
290
|
ref={inputRef}
|
|
291
291
|
data-reset={inputReset ?? true}
|
|
292
292
|
type={idIsString ? "text" : "number"}
|
|
293
|
-
style={{ display: "none"
|
|
293
|
+
style={{ display: "none" }}
|
|
294
294
|
name={name}
|
|
295
295
|
value={`${
|
|
296
296
|
inputValue ?? (state.current.idSet ? "" : localIdValue ?? "")
|
|
@@ -393,6 +393,6 @@ export function Tiplist<
|
|
|
393
393
|
getOptionKey={getOptionKey}
|
|
394
394
|
{...rest}
|
|
395
395
|
/>
|
|
396
|
-
</
|
|
396
|
+
</div>
|
|
397
397
|
);
|
|
398
398
|
}
|
package/src/TiplistPro.tsx
CHANGED
|
@@ -299,12 +299,12 @@ export function TiplistPro<T extends ListType2 = ListType2>(
|
|
|
299
299
|
|
|
300
300
|
// Layout
|
|
301
301
|
return (
|
|
302
|
-
<
|
|
302
|
+
<div style={{ flex: 2 }}>
|
|
303
303
|
<input
|
|
304
304
|
ref={inputRef}
|
|
305
305
|
data-reset={inputReset ?? true}
|
|
306
306
|
type={idIsString ? "text" : "number"}
|
|
307
|
-
style={{ display: "none"
|
|
307
|
+
style={{ display: "none" }}
|
|
308
308
|
name={name}
|
|
309
309
|
value={inputValue ?? (state.current.idSet ? "" : localIdValue ?? "")}
|
|
310
310
|
readOnly
|
|
@@ -394,6 +394,6 @@ export function TiplistPro<T extends ListType2 = ListType2>(
|
|
|
394
394
|
}}
|
|
395
395
|
{...rest}
|
|
396
396
|
/>
|
|
397
|
-
</
|
|
397
|
+
</div>
|
|
398
398
|
);
|
|
399
399
|
}
|