@trackunit/custom-field-components 0.0.1009 → 0.0.1011
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.cjs.js +6 -0
- package/index.esm.js +6 -0
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -481,6 +481,9 @@ const useCustomFieldResolver = ({ field, definition, register, setValue, formSta
|
|
|
481
481
|
const rules = getDateValidationRules();
|
|
482
482
|
return (jsxRuntime.jsx(DateCustomField, { dataTestId: `${key}`, defaultValue: value, disabled: !isEditableCombined, errorMessage: errorMessage, helpText: description, id: uniqueIdentifier, label: title || "", readOnly: !isEditableCombined, register: validation.register, setValue: validation.setValue, title: title || "", validationRules: rules }));
|
|
483
483
|
}
|
|
484
|
+
case "StringListFieldDefinition": {
|
|
485
|
+
return null; // Not implemented
|
|
486
|
+
}
|
|
484
487
|
case "JsonFieldDefinition": {
|
|
485
488
|
return null;
|
|
486
489
|
}
|
|
@@ -536,6 +539,9 @@ const useValue = (uniqueIdentifier, numberValue, control, def, field) => {
|
|
|
536
539
|
case "JsonFieldDefinition": {
|
|
537
540
|
return null;
|
|
538
541
|
}
|
|
542
|
+
case "StringListFieldDefinition": {
|
|
543
|
+
return (field === null || field === void 0 ? void 0 : field.__typename) === "StringListFieldValueAndDefinition" ? field.stringArrayValue : null;
|
|
544
|
+
}
|
|
539
545
|
case "MonetaryFieldDefinition": {
|
|
540
546
|
return numberValue === undefined || numberValue === null || numberValue === ""
|
|
541
547
|
? ""
|
package/index.esm.js
CHANGED
|
@@ -461,6 +461,9 @@ const useCustomFieldResolver = ({ field, definition, register, setValue, formSta
|
|
|
461
461
|
const rules = getDateValidationRules();
|
|
462
462
|
return (jsx(DateCustomField, { dataTestId: `${key}`, defaultValue: value, disabled: !isEditableCombined, errorMessage: errorMessage, helpText: description, id: uniqueIdentifier, label: title || "", readOnly: !isEditableCombined, register: validation.register, setValue: validation.setValue, title: title || "", validationRules: rules }));
|
|
463
463
|
}
|
|
464
|
+
case "StringListFieldDefinition": {
|
|
465
|
+
return null; // Not implemented
|
|
466
|
+
}
|
|
464
467
|
case "JsonFieldDefinition": {
|
|
465
468
|
return null;
|
|
466
469
|
}
|
|
@@ -516,6 +519,9 @@ const useValue = (uniqueIdentifier, numberValue, control, def, field) => {
|
|
|
516
519
|
case "JsonFieldDefinition": {
|
|
517
520
|
return null;
|
|
518
521
|
}
|
|
522
|
+
case "StringListFieldDefinition": {
|
|
523
|
+
return (field === null || field === void 0 ? void 0 : field.__typename) === "StringListFieldValueAndDefinition" ? field.stringArrayValue : null;
|
|
524
|
+
}
|
|
519
525
|
case "MonetaryFieldDefinition": {
|
|
520
526
|
return numberValue === undefined || numberValue === null || numberValue === ""
|
|
521
527
|
? ""
|