@balena/ui-shared-components 11.2.20 → 11.2.21
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.
|
@@ -128,21 +128,25 @@ export const ImageForm = memo(function ImageForm({ compatibleDeviceTypes, osVers
|
|
|
128
128
|
handleVariantChange(v ? 'dev' : 'prod');
|
|
129
129
|
} }) })), _jsx(Divider, { variant: "fullWidth", sx: { my: 3, borderStyle: 'dashed' } }), _jsxs(Box, { display: "flex", flexDirection: "column", children: [_jsxs(FormControl, { children: [_jsx(FormLabel, { id: "network-radio-buttons-group-label", children: "Network" }), _jsxs(RadioGroup, { "aria-labelledby": "network-radio-buttons-group-label", value: model.network, name: "network", onChange: (event) => {
|
|
130
130
|
onChange('network', event.target.value);
|
|
131
|
-
}, children: [_jsx(FormControlLabel, { value: "ethernet", control: _jsx(Radio, {}), label: "Ethernet only" }), _jsx(FormControlLabel, { value: "wifi", control: _jsx(Radio, {}), label: "Wifi + Ethernet" })] })] }), model.network === 'wifi' && (_jsxs(_Fragment, { children: [_jsx(InputLabel, { htmlFor: "device-wifi-ssid", sx: { mb: 2 }, children: "WiFi SSID" }), _jsx(TextField, { value: model.wifiSsid, id: "device-wifi-ssid",
|
|
132
|
-
|
|
133
|
-
|
|
131
|
+
}, children: [_jsx(FormControlLabel, { value: "ethernet", control: _jsx(Radio, {}), label: "Ethernet only" }), _jsx(FormControlLabel, { value: "wifi", control: _jsx(Radio, {}), label: "Wifi + Ethernet" })] })] }), model.network === 'wifi' && (_jsxs(_Fragment, { children: [_jsx(InputLabel, { htmlFor: "device-wifi-ssid", sx: { mb: 2 }, children: "WiFi SSID" }), _jsx(TextField, { value: model.wifiSsid, id: "device-wifi-ssid", slotProps: {
|
|
132
|
+
htmlInput: {
|
|
133
|
+
name: 'wifiSsid',
|
|
134
|
+
autoComplete: 'wifiSsid-auto-complete',
|
|
135
|
+
},
|
|
134
136
|
}, onChange: (event) => {
|
|
135
137
|
onChange('wifiSsid', event.target.value);
|
|
136
|
-
} }), _jsx(InputLabel, { htmlFor: "device-wifi-password", sx: { my: 2 }, children: "Wifi Passphrase" }), _jsx(TextField, { type: showPassword ? 'text' : 'password', id: "device-wifi-password", value: model.wifiKey,
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
event
|
|
145
|
-
|
|
138
|
+
} }), _jsx(InputLabel, { htmlFor: "device-wifi-password", sx: { my: 2 }, children: "Wifi Passphrase" }), _jsx(TextField, { type: showPassword ? 'text' : 'password', id: "device-wifi-password", value: model.wifiKey, slotProps: {
|
|
139
|
+
htmlInput: {
|
|
140
|
+
name: 'wifiKey',
|
|
141
|
+
},
|
|
142
|
+
// input and htmlInput are different https://mui.com/material-ui/api/text-field/#text-field-prop-slotProps
|
|
143
|
+
input: {
|
|
144
|
+
endAdornment: (_jsx(InputAdornment, { position: "end", children: _jsx(IconButton, { onClick: () => {
|
|
145
|
+
setShowPassword((show) => !show);
|
|
146
|
+
}, onMouseDown: (event) => {
|
|
147
|
+
event.preventDefault();
|
|
148
|
+
}, edge: "end", children: showPassword ? _jsx(VisibilityOff, {}) : _jsx(Visibility, {}) }) })),
|
|
149
|
+
},
|
|
146
150
|
}, onChange: (event) => {
|
|
147
151
|
onChange('wifiKey', event.target.value);
|
|
148
152
|
} })] }))] }), _jsx(Divider, { variant: "fullWidth", sx: { my: 3, borderStyle: 'dashed' } }), _jsxs(Button, { onClick: () => {
|
|
@@ -151,19 +155,25 @@ export const ImageForm = memo(function ImageForm({ compatibleDeviceTypes, osVers
|
|
|
151
155
|
display: 'flex',
|
|
152
156
|
alignItems: 'center',
|
|
153
157
|
height: '1.5rem',
|
|
154
|
-
}, children: _jsx(ArticleIcon, { sx: { ml: 1, fontSize: '1.15rem' } }) })] }), _jsx(TextField, { id: "poll-interval-label", "aria-labelledby": "poll-interval-label", value: model.appUpdatePollInterval,
|
|
155
|
-
|
|
156
|
-
|
|
158
|
+
}, children: _jsx(ArticleIcon, { sx: { ml: 1, fontSize: '1.15rem' } }) })] }), _jsx(TextField, { id: "poll-interval-label", "aria-labelledby": "poll-interval-label", value: model.appUpdatePollInterval, slotProps: {
|
|
159
|
+
htmlInput: {
|
|
160
|
+
name: 'appUpdatePollInterval',
|
|
161
|
+
autoComplete: 'appUpdatePollInterval-auto-complete',
|
|
162
|
+
},
|
|
157
163
|
}, onChange: (event) => {
|
|
158
164
|
onChange('appUpdatePollInterval', event.target.value);
|
|
159
|
-
} })] }), _jsx(InputLabel, { htmlFor: "provision-key-name", sx: { my: 2 }, children: "Provisioning Key name" }), _jsx(TextField, { name: "provisioningKeyName", id: "provision-key-name", value: (_a = model.provisioningKeyName) !== null && _a !== void 0 ? _a : '',
|
|
160
|
-
|
|
161
|
-
|
|
165
|
+
} })] }), _jsx(InputLabel, { htmlFor: "provision-key-name", sx: { my: 2 }, children: "Provisioning Key name" }), _jsx(TextField, { name: "provisioningKeyName", id: "provision-key-name", value: (_a = model.provisioningKeyName) !== null && _a !== void 0 ? _a : '', slotProps: {
|
|
166
|
+
htmlInput: {
|
|
167
|
+
name: 'provisioningKeyName',
|
|
168
|
+
autoComplete: 'provisioningKeyName-auto-complete',
|
|
169
|
+
},
|
|
162
170
|
}, onChange: (event) => {
|
|
163
171
|
onChange('provisioningKeyName', event.target.value);
|
|
164
|
-
} }), _jsx(InputLabel, { htmlFor: "provision-key-expiring", sx: { my: 2 }, children: "Provisioning Key expiring on" }), _jsx(TextField, { type: "date", id: "provision-key-expiring", value: (_b = model.provisioningKeyExpiryDate) !== null && _b !== void 0 ? _b : '',
|
|
165
|
-
|
|
166
|
-
|
|
172
|
+
} }), _jsx(InputLabel, { htmlFor: "provision-key-expiring", sx: { my: 2 }, children: "Provisioning Key expiring on" }), _jsx(TextField, { type: "date", id: "provision-key-expiring", value: (_b = model.provisioningKeyExpiryDate) !== null && _b !== void 0 ? _b : '', slotProps: {
|
|
173
|
+
htmlInput: {
|
|
174
|
+
name: 'provisioningKeyExpiryDate',
|
|
175
|
+
autoComplete: 'provisioningKeyExpiryDate-auto-complete',
|
|
176
|
+
},
|
|
167
177
|
}, onChange: (event) => {
|
|
168
178
|
onChange('provisioningKeyExpiryDate', event.target.value);
|
|
169
179
|
} })] }) })] }));
|
|
@@ -58,7 +58,9 @@ export const SelectWidget = ({ id, label, value, disabled, name, placeholder, on
|
|
|
58
58
|
? option.map((o) => o.label).join(', ')
|
|
59
59
|
: option.label, getOptionDisabled: (option) => Array.isArray(option)
|
|
60
60
|
? option.some((o) => o.disabled)
|
|
61
|
-
: !!option.disabled, renderInput: (params) => (_jsx(TextField, Object.assign({}, params, {
|
|
61
|
+
: !!option.disabled, renderInput: (params) => (_jsx(TextField, Object.assign({}, params, { slotProps: {
|
|
62
|
+
htmlInput: Object.assign(Object.assign({}, params.inputProps), (inputProps !== null && inputProps !== void 0 ? inputProps : {})),
|
|
63
|
+
} }, (multiple && {
|
|
62
64
|
onKeyDown: (e) => {
|
|
63
65
|
// Prevent deleting the last chip with backspace or delete https://github.com/mui/material-ui/issues/21129#issuecomment-636919142
|
|
64
66
|
if (e.key === 'Backspace' || e.key === 'Delete') {
|
|
@@ -105,13 +105,17 @@ export const AddTagForm = ({ itemType, existingTags, overridableTags = [], addTa
|
|
|
105
105
|
});
|
|
106
106
|
return (_jsxs(_Fragment, { children: [_jsxs(Stack, { gap: 2, mb: 2, alignItems: "center", direction: "row", onKeyDown: (e) => {
|
|
107
107
|
stopKeyDownEvent(e, 13, internalAddTag);
|
|
108
|
-
}, children: [_jsx(TextField, {
|
|
109
|
-
|
|
108
|
+
}, children: [_jsx(TextField, { slotProps: {
|
|
109
|
+
htmlInput: {
|
|
110
|
+
form: formUuid,
|
|
111
|
+
},
|
|
110
112
|
}, fullWidth: true, ref: tagKeyInput, onChange: (e) => {
|
|
111
113
|
setTagKey(e.target.value);
|
|
112
114
|
checkNewTagValidity(e.target.value);
|
|
113
|
-
}, value: tagKey, error: tagKeyIsInvalid, placeholder: t('labels.tag_name') }), _jsx(TextField, {
|
|
114
|
-
|
|
115
|
+
}, value: tagKey, error: tagKeyIsInvalid, placeholder: t('labels.tag_name') }), _jsx(TextField, { slotProps: {
|
|
116
|
+
htmlInput: {
|
|
117
|
+
form: formUuid,
|
|
118
|
+
},
|
|
115
119
|
}, fullWidth: true, ref: valueInput, onChange: (e) => {
|
|
116
120
|
setValue(e.target.value);
|
|
117
121
|
}, value: value, placeholder: t('labels.value') }), _jsx("form", { id: formUuid, onSubmit: internalAddTag, children: _jsx(Button, { sx: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@balena/ui-shared-components",
|
|
3
|
-
"version": "11.2.
|
|
3
|
+
"version": "11.2.21",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"files": [
|
|
@@ -137,6 +137,6 @@
|
|
|
137
137
|
},
|
|
138
138
|
"homepage": "https://github.com/balena-io/ui-shared-components#readme",
|
|
139
139
|
"versionist": {
|
|
140
|
-
"publishedAt": "2025-03-
|
|
140
|
+
"publishedAt": "2025-03-18T14:28:55.892Z"
|
|
141
141
|
}
|
|
142
142
|
}
|