@evoke-platform/ui-components 1.4.0-testing.6 → 1.4.0-testing.8

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.
@@ -124,7 +124,7 @@ const customSelector = (props) => {
124
124
  .map((option) => ({ name: option.name, label: option.label }));
125
125
  val = val === '=' ? '' : options.find((option) => option.name === val).name;
126
126
  }
127
- else if (inputType === 'document') {
127
+ else if (inputType === 'document' || inputType === 'criteria') {
128
128
  opts = options
129
129
  .filter((option) => ['null', 'notNull'].includes(option.name))
130
130
  .map((option) => ({ name: option.name, label: option.label }));
@@ -16,12 +16,13 @@ export class ObjectComponent extends ReactComponent {
16
16
  delete this.errorDetails['api-error'];
17
17
  const updatedValue = pick(value, 'id', 'name');
18
18
  // set the value on the form instance at this.root.data
19
- this.setValue(!isNil(updatedValue) ? updatedValue : '');
19
+ this.setValue(!isNil(updatedValue) && !isEmpty(updatedValue) ? updatedValue : '');
20
20
  // update the value in the component instance
21
21
  this.updateValue(!isNil(updatedValue) ? updatedValue : {}, { modified: true });
22
22
  this.handleValidation();
23
23
  this.emit('changed-' + this.component.key, value);
24
24
  this.attach(this.element);
25
+ this.attachReact(this.element);
25
26
  this.component.autoSave && this.component.autoSave({ [key]: updatedValue });
26
27
  };
27
28
  this.errorDetails = {};
@@ -644,6 +644,9 @@ formComponents, allCriteriaInputs, instance, objectPropertyInputProps, associate
644
644
  associatedObject?.propertyId === property.id) {
645
645
  defaultValue = { id: associatedObject.instanceId };
646
646
  component.hidden = true;
647
+ // If "conditional" is defined, the "hidden" property isn't respected.
648
+ // Remove the "conditional" property after setting "hidden" to true.
649
+ delete component.conditional;
647
650
  }
648
651
  return {
649
652
  ...component,
@@ -719,6 +722,9 @@ formComponents, allCriteriaInputs, instance, objectPropertyInputProps, associate
719
722
  item.property.id === associatedObject.propertyId) {
720
723
  item.defaultValue = { id: associatedObject.instanceId };
721
724
  item.hidden = true;
725
+ // If "conditional" is defined, the "hidden" property isn't respected.
726
+ // Remove the "conditional" property after setting "hidden" to true.
727
+ delete item.conditional;
722
728
  }
723
729
  }
724
730
  if (nestedFieldProperty) {
@@ -733,6 +739,7 @@ formComponents, allCriteriaInputs, instance, objectPropertyInputProps, associate
733
739
  item.defaultPages = defaultPages;
734
740
  item.navigateTo = navigateTo;
735
741
  item.allCriteriaInputs = allCriteriaInputs;
742
+ item.properties = properties;
736
743
  item.isModal = isModal;
737
744
  item.fieldHeight = fieldHeight;
738
745
  item.richTextEditor = ['RepeatableField', 'Object'].includes(item.type)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evoke-platform/ui-components",
3
- "version": "1.4.0-testing.6",
3
+ "version": "1.4.0-testing.8",
4
4
  "description": "",
5
5
  "main": "dist/published/index.js",
6
6
  "module": "dist/published/index.js",