@dartech/arsenal-ui 1.3.90 → 1.3.91
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 +16 -30
- package/package.json +1 -1
- package/src/lib/Property/UpsertProperty/PropertyValueField/BooleanValueField.d.ts +1 -0
- package/src/lib/Property/UpsertProperty/PropertyValueField/DateTimeValueField.d.ts +1 -0
- package/src/lib/Property/UpsertProperty/PropertyValueField/DateValueField.d.ts +1 -0
- package/src/lib/Property/UpsertProperty/PropertyValueField/JsonValueField.d.ts +1 -0
- package/src/lib/Property/UpsertProperty/PropertyValueField/TimeValueField.d.ts +1 -0
- package/src/lib/Property/ViewProperty/PropertyItem.d.ts +1 -0
package/index.js
CHANGED
@@ -3814,7 +3814,10 @@ const PropertyWidget = ({
|
|
3814
3814
|
entityReferenceValueComponent: EntityReferenceValueComponent,
|
3815
3815
|
fileReferenceValueComponent: FileReferenceValueComponent
|
3816
3816
|
}) => {
|
3817
|
-
const propertyType = useMemo(() =>
|
3817
|
+
const propertyType = useMemo(() => {
|
3818
|
+
var _a;
|
3819
|
+
return typeof property.propertyType === 'string' ? property.propertyType : (_a = property['propertyType']) === null || _a === void 0 ? void 0 : _a['value'];
|
3820
|
+
}, [property]);
|
3818
3821
|
switch (propertyType) {
|
3819
3822
|
case PropertyType.BIG_DECIMAL:
|
3820
3823
|
case PropertyType.FLOAT:
|
@@ -3886,7 +3889,6 @@ const PropertyWidget = ({
|
|
3886
3889
|
hideErrorMessage: true,
|
3887
3890
|
validateJson: true
|
3888
3891
|
});
|
3889
|
-
// return <JsonEditor validate name={name} ref={ref} useParsedValue />;
|
3890
3892
|
case PropertyType.STRING:
|
3891
3893
|
return jsx(StringValueField$1, {
|
3892
3894
|
name: name,
|
@@ -4055,7 +4057,6 @@ const PropertyFiller = ({
|
|
4055
4057
|
watch
|
4056
4058
|
} = useFormContext();
|
4057
4059
|
const {
|
4058
|
-
// field: { value },
|
4059
4060
|
fieldState: {
|
4060
4061
|
error,
|
4061
4062
|
isDirty
|
@@ -4499,32 +4500,14 @@ const PropertyValueField = ({
|
|
4499
4500
|
fileReferenceValueComponent
|
4500
4501
|
}) => {
|
4501
4502
|
const {
|
4502
|
-
|
4503
|
+
watch
|
4503
4504
|
} = useFormContext();
|
4504
|
-
const propertyType =
|
4505
|
-
|
4506
|
-
|
4507
|
-
});
|
4508
|
-
const
|
4509
|
-
|
4510
|
-
name: `${propertyFieldName}.isMultiple`
|
4511
|
-
});
|
4512
|
-
const format = useWatch({
|
4513
|
-
control,
|
4514
|
-
name: `${propertyFieldName}.format`
|
4515
|
-
});
|
4516
|
-
const restrictedValues = useWatch({
|
4517
|
-
control,
|
4518
|
-
name: `${propertyFieldName}.restrictedValues`
|
4519
|
-
});
|
4520
|
-
const properties = useWatch({
|
4521
|
-
control,
|
4522
|
-
name: `${propertyFieldName}.properties`
|
4523
|
-
});
|
4524
|
-
const isRequired = useWatch({
|
4525
|
-
control,
|
4526
|
-
name: `${propertyFieldName}.isRequired`
|
4527
|
-
});
|
4505
|
+
const propertyType = watch(`${propertyFieldName}.propertyType`);
|
4506
|
+
const isMultiple = `${propertyFieldName}.isMultiple`;
|
4507
|
+
const format = watch(`${propertyFieldName}.format`);
|
4508
|
+
const restrictedValues = watch(`${propertyFieldName}.restrictedValues`);
|
4509
|
+
const properties = watch(`${propertyFieldName}.properties`);
|
4510
|
+
const isRequired = watch(`${propertyFieldName}.isRequired`);
|
4528
4511
|
const fillerProperty = useMemo(() => {
|
4529
4512
|
const typeValue = typeof propertyType === 'string' ? propertyType : propertyType.value;
|
4530
4513
|
return {
|
@@ -4963,7 +4946,8 @@ const CreatePropertyFormFields = ({
|
|
4963
4946
|
var _a;
|
4964
4947
|
const {
|
4965
4948
|
control,
|
4966
|
-
setValue
|
4949
|
+
setValue,
|
4950
|
+
watch
|
4967
4951
|
} = useFormContext();
|
4968
4952
|
const propertyType = useWatch({
|
4969
4953
|
control,
|
@@ -5091,6 +5075,7 @@ const CreatePropertyFormFields = ({
|
|
5091
5075
|
}), jsx(PropertyValueField, {
|
5092
5076
|
propertyFieldName: propertyFieldName,
|
5093
5077
|
name: `${propertyFieldName}.${_globalParameter ? 'value' : 'defaultValue'}`,
|
5078
|
+
// name=
|
5094
5079
|
label: valueLabel,
|
5095
5080
|
required: _globalParameter ? isRequired : false,
|
5096
5081
|
entityReferenceDefinitionSources: entityReferenceDefinitionSources,
|
@@ -5134,6 +5119,7 @@ const CreatePropertiesList = ({
|
|
5134
5119
|
entityReferenceValueComponent,
|
5135
5120
|
fileReferenceValueComponent
|
5136
5121
|
}) => {
|
5122
|
+
var _a;
|
5137
5123
|
const fieldName = useMemo(() => parentFieldName ? `${parentFieldName}.properties` : `properties`, [parentFieldName]);
|
5138
5124
|
const {
|
5139
5125
|
clearErrors,
|
@@ -5258,7 +5244,7 @@ const CreatePropertiesList = ({
|
|
5258
5244
|
})), error && jsx(FormHelperText, Object.assign({
|
5259
5245
|
error: true
|
5260
5246
|
}, {
|
5261
|
-
children: error.root.message
|
5247
|
+
children: (_a = error.root) === null || _a === void 0 ? void 0 : _a.message
|
5262
5248
|
}))]
|
5263
5249
|
}))]
|
5264
5250
|
});
|
package/package.json
CHANGED