@dartech/arsenal-ui 1.4.32 → 1.4.34

Sign up to get free protection for your applications and to get access to all the features.
package/index.js CHANGED
@@ -1189,6 +1189,7 @@ const ControlAceEditor = /*#__PURE__*/forwardRef((_a, ref) => {
1189
1189
  python: [langs.python()]
1190
1190
  }), []);
1191
1191
  const safeValue = useMemo(() => {
1192
+ if (mode === 'text' && typeof value !== 'string') return JSON.stringify(value, null, 2);
1192
1193
  if (mode === 'json' && typeof value !== 'string') {
1193
1194
  if (value === null) return '';
1194
1195
  return useCleanValue ? JSON.stringify(value, null, 2).replace(/\\"/g, '') : JSON.stringify(value, null, 2);
@@ -1250,8 +1251,9 @@ const ControlAceEditor = /*#__PURE__*/forwardRef((_a, ref) => {
1250
1251
  },
1251
1252
  readOnly: readOnly,
1252
1253
  value: safeValue,
1253
- onChange: handleChange,
1254
- extensions: extensions[mode]
1254
+ onChange: handleChange
1255
+ }, mode === 'text' ? {} : {
1256
+ extentions: extensions[mode]
1255
1257
  }, otherProps)), error && !hideErrorMessage && jsx(FormHelperText, Object.assign({
1256
1258
  variant: "standard",
1257
1259
  error: true
@@ -6192,7 +6194,8 @@ const PropertyFiller = ({
6192
6194
  label: valueLabel,
6193
6195
  parseValue: true,
6194
6196
  hideErrorMessage: true,
6195
- useCleanValue: true
6197
+ useCleanValue: true,
6198
+ mode: propertyType === PropertyType.ANY ? 'text' : 'json'
6196
6199
  }) : jsx(ControlInput, {
6197
6200
  control: control,
6198
6201
  name: name,
@@ -6452,7 +6455,8 @@ const MultiplePropertyFiller = ({
6452
6455
  label: valueLabel,
6453
6456
  parseValue: true,
6454
6457
  hideErrorMessage: true,
6455
- useCleanValue: true
6458
+ useCleanValue: true,
6459
+ mode: propertyType === PropertyType.ANY ? 'text' : 'json'
6456
6460
  }) : jsx(ControlInput, {
6457
6461
  required: true,
6458
6462
  hideErrorMessage: true,
@@ -7013,7 +7017,8 @@ const inputThemeOptions = {
7013
7017
  marginBottom: baseTheme.spacing(1),
7014
7018
  fontWeight: 500,
7015
7019
  fontSize: '14px',
7016
- lineHeight: '20px'
7020
+ lineHeight: '20px',
7021
+ pointerEvents: 'auto'
7017
7022
  }
7018
7023
  }
7019
7024
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dartech/arsenal-ui",
3
- "version": "1.4.32",
3
+ "version": "1.4.34",
4
4
  "author": "DAR",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -4,7 +4,7 @@ import { ReactNode } from 'react';
4
4
  export interface ControlAceEditorProps {
5
5
  name: string;
6
6
  control: Control<any>;
7
- mode?: 'json' | 'javascript' | 'python';
7
+ mode?: 'json' | 'javascript' | 'python' | 'text';
8
8
  label?: ReactNode;
9
9
  width?: string;
10
10
  height?: string;
@@ -44,6 +44,7 @@ declare const inputThemeOptions: {
44
44
  fontWeight: number;
45
45
  fontSize: string;
46
46
  lineHeight: string;
47
+ pointerEvents: string;
47
48
  };
48
49
  };
49
50
  };