@dartech/arsenal-ui 1.4.1 → 1.4.2

Sign up to get free protection for your applications and to get access to all the features.
package/index.js CHANGED
@@ -746,12 +746,12 @@ const ControlAutocomplete = _a => {
746
746
  labelKey
747
747
  });
748
748
  const handleChange = (_, value) => {
749
- onChange(useStringValue ? value[valueKey] : value);
749
+ onChange(useStringValue ? _get(value, valueKey) : value);
750
750
  setLocalValue(value);
751
751
  };
752
752
  useEffect(() => {
753
753
  if (typeof value === 'string' && valueKey && useStringValue && !localValue && options.length && !!options[0] && typeof options[0] === 'object') {
754
- setLocalValue(options.find(el => el[valueKey] === value));
754
+ setLocalValue(options.find(el => _get(el, valueKey) === value));
755
755
  } else setLocalValue(value);
756
756
  }, [localValue, options, useStringValue, value, valueKey]);
757
757
  return jsx(Autocomplete, Object.assign({}, fieldProps, {
@@ -867,11 +867,11 @@ function ControlQueryAutocomplete(_a) {
867
867
  if (!isDirty && formValue && itemQueryFunction) {
868
868
  let requestValue = formValue;
869
869
  if (typeof formValue === 'object' && valueKey in formValue) {
870
- requestValue = formValue[valueKey];
870
+ requestValue = _get(formValue, valueKey);
871
871
  }
872
872
  itemQueryFunction(requestValue).then(item => {
873
873
  setFieldValue(item);
874
- setInputValue(item[labelKey]);
874
+ setInputValue(_get(item, labelKey));
875
875
  }).catch();
876
876
  }
877
877
  }, [formValue, isDirty, valueKey, labelKey, itemQueryFunction, setFieldValue]);
@@ -1627,9 +1627,6 @@ const propertiesArrayToObject = (properties, isGlobalParameter) => {
1627
1627
  name,
1628
1628
  isRequired,
1629
1629
  isMultiple,
1630
- isVisible,
1631
- isFillable,
1632
- isEditable,
1633
1630
  sortOrder,
1634
1631
  isEnabled,
1635
1632
  uiSettings,
@@ -1648,9 +1645,6 @@ const propertiesArrayToObject = (properties, isGlobalParameter) => {
1648
1645
  }, getPropertyValue(Object.assign(Object.assign({}, property), {
1649
1646
  propertyType
1650
1647
  }), isGlobalParameter));
1651
- if (isVisible !== undefined) resultProperty.isVisible = isVisible;
1652
- if (isFillable !== undefined) resultProperty.isFillable = isFillable;
1653
- if (isEditable !== undefined) resultProperty.isEditable = isEditable;
1654
1648
  if ('isViewableInList' in property) {
1655
1649
  resultProperty['isViewableInList'] = property.isViewableInList;
1656
1650
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dartech/arsenal-ui",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "author": "DAR",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -43,9 +43,6 @@ export interface Property {
43
43
  isMultiple: boolean;
44
44
  sortOrder: number;
45
45
  isEnabled: boolean;
46
- isVisible?: boolean;
47
- isFillable?: boolean;
48
- isEditable?: boolean;
49
46
  uiSettings: unknown;
50
47
  validationNode: unknown;
51
48
  key?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { Control } from 'react-hook-form';
2
3
  type Props = {
3
4
  control: Control<any>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  type Props = {
2
3
  name: string;
3
4
  label?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  type Props = {
2
3
  name: string;
3
4
  format: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  type Props = {
2
3
  name: string;
3
4
  label?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  type Props = {
2
3
  name: string;
3
4
  label?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PropertyUnion } from '../../../interfaces';
2
3
  type PropertyItemProps = {
3
4
  property: PropertyUnion;