@dartech/arsenal-ui 1.3.55 → 1.3.57

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.
Files changed (2) hide show
  1. package/index.js +5 -33
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -537,7 +537,7 @@ const ControlCheckbox = _a => {
537
537
  } = useController({
538
538
  name,
539
539
  control,
540
- defaultValue
540
+ defaultValue: false
541
541
  });
542
542
  const value = useWatch({
543
543
  control,
@@ -1086,7 +1086,6 @@ const ControlAceEditor = /*#__PURE__*/forwardRef((_a, ref) => {
1086
1086
  if (parseValue) {
1087
1087
  try {
1088
1088
  const val = JSON.parse(value);
1089
- console.log('parsed val:', val);
1090
1089
  onChange(val);
1091
1090
  } catch (e) {
1092
1091
  onChange(value);
@@ -3621,39 +3620,11 @@ const JsonEditor = ({
3621
3620
  zIndex: 0,
3622
3621
  isolation: 'isolate'
3623
3622
  },
3624
- value: typeof value !== 'string' ? value === null ? '' : JSON.stringify(value) : value,
3623
+ value: typeof value !== 'string' ? value === null ? '' : JSON.stringify(value, null, 2) : value,
3625
3624
  onChange: handleChange,
3626
3625
  extensions: [langs.json()]
3627
- })
3628
- // <AceEditor
3629
- // wrapEnabled
3630
- // width="100%"
3631
- // height="200px"
3632
- // theme="monokai"
3633
- // fontSize={14}
3634
- // showPrintMargin={false}
3635
- // style={{ lineHeight: 1.4, zIndex: 0, isolation: 'isolate' }}
3636
- // setOptions={{
3637
- // enableLiveAutocompletion: true,
3638
- // enableBasicAutocompletion: true,
3639
- // showLineNumbers: true,
3640
- // tabSize: 2,
3641
- // useWorker: false
3642
- // }}
3643
- // ref={inputRef}
3644
- // name={name}
3645
- // value={typeof value !== 'string' ? (value === null ? '' : JSON.stringify(value)) : value}
3646
- // onChange={handleChange}
3647
- // mode="json"
3648
- // onLoad={(editor) => {
3649
- // if (!validate) {
3650
- // editor.getSession().setUseWorker(false);
3651
- // }
3652
- // }}
3653
- // />
3654
- ;
3626
+ });
3655
3627
  };
3656
-
3657
3628
  var JsonEditor$1 = JsonEditor;
3658
3629
 
3659
3630
  const StringValueField = ({
@@ -3788,7 +3759,8 @@ const PropertyWidget = ({
3788
3759
  return jsx(JsonEditor$1, {
3789
3760
  validate: true,
3790
3761
  name: name,
3791
- inputRef: inputRef
3762
+ inputRef: inputRef,
3763
+ useParsedValue: true
3792
3764
  });
3793
3765
  case PropertyType.STRING:
3794
3766
  return jsx(StringValueField$1, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dartech/arsenal-ui",
3
- "version": "1.3.55",
3
+ "version": "1.3.57",
4
4
  "author": "DAR",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"