@dartech/arsenal-ui 1.4.34 → 1.4.36
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/index.js +11 -3
- package/package.json +1 -1
package/index.js
CHANGED
@@ -571,7 +571,13 @@ const ControlSelect = _a => {
|
|
571
571
|
})) : null
|
572
572
|
}, textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.InputProps),
|
573
573
|
SelectProps: {
|
574
|
-
IconComponent: PopupIconComponent$2
|
574
|
+
IconComponent: PopupIconComponent$2,
|
575
|
+
sx: {
|
576
|
+
'& .MuiSelect-select .notranslate::after': textFieldProps.placeholder ? {
|
577
|
+
content: `"${textFieldProps.placeholder}"`,
|
578
|
+
opacity: 0.42
|
579
|
+
} : {}
|
580
|
+
}
|
575
581
|
}
|
576
582
|
}, {
|
577
583
|
children: options.map((option, index) => jsx(MenuItem, Object.assign({
|
@@ -1189,12 +1195,14 @@ const ControlAceEditor = /*#__PURE__*/forwardRef((_a, ref) => {
|
|
1189
1195
|
python: [langs.python()]
|
1190
1196
|
}), []);
|
1191
1197
|
const safeValue = useMemo(() => {
|
1192
|
-
if (mode === 'text' && typeof value !== 'string')
|
1198
|
+
if (mode === 'text' && typeof value !== 'string') {
|
1199
|
+
return JSON.stringify(value, null, 2);
|
1200
|
+
}
|
1193
1201
|
if (mode === 'json' && typeof value !== 'string') {
|
1194
1202
|
if (value === null) return '';
|
1195
1203
|
return useCleanValue ? JSON.stringify(value, null, 2).replace(/\\"/g, '') : JSON.stringify(value, null, 2);
|
1196
1204
|
}
|
1197
|
-
if (typeof value === 'string') {
|
1205
|
+
if (typeof value === 'string' && mode !== 'text') {
|
1198
1206
|
return useCleanValue ? value.replace(/\\"/g, '') : value;
|
1199
1207
|
}
|
1200
1208
|
return value;
|