@trackunit/custom-field-components 0.0.58 → 0.0.60
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 +5 -4
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -1923,7 +1923,8 @@ const DropdownCustomField = ({
|
|
|
1923
1923
|
options: options,
|
|
1924
1924
|
onBlur: onBlurHandler,
|
|
1925
1925
|
value: selectedValue,
|
|
1926
|
-
isMulti: _multiSelect
|
|
1926
|
+
isMulti: _multiSelect,
|
|
1927
|
+
isClearable: true
|
|
1927
1928
|
})
|
|
1928
1929
|
}));
|
|
1929
1930
|
};
|
|
@@ -2440,7 +2441,7 @@ const getWebAddressValidationRules = definition => {
|
|
|
2440
2441
|
const getPhoneNumberValidationRules = definition => {
|
|
2441
2442
|
const defaultRules = {};
|
|
2442
2443
|
const pattern = {
|
|
2443
|
-
validate: value => isValidPhoneNumber(value)
|
|
2444
|
+
validate: value => isValidPhoneNumber(value) || value === ""
|
|
2444
2445
|
};
|
|
2445
2446
|
return definition.uiEditable ? Object.assign(Object.assign({}, pattern), defaultRules) : defaultRules;
|
|
2446
2447
|
};
|
|
@@ -2601,7 +2602,7 @@ const useCustomFieldResolver = (field, validation, unitPreference = "SI", fieldI
|
|
|
2601
2602
|
const rules = getDateValidationRules();
|
|
2602
2603
|
return jsx(DateCustomField, {
|
|
2603
2604
|
dataTestId: "dateField",
|
|
2604
|
-
id:
|
|
2605
|
+
id: key || "date-field",
|
|
2605
2606
|
defaultValue: (_3 = (_2 = typedValue.stringValue) !== null && _2 !== void 0 ? _2 : typedDefinition.defaultStringValue) !== null && _3 !== void 0 ? _3 : "",
|
|
2606
2607
|
readOnly: !typedDefinition.uiEditable,
|
|
2607
2608
|
register: validation.register,
|
|
@@ -2610,7 +2611,7 @@ const useCustomFieldResolver = (field, validation, unitPreference = "SI", fieldI
|
|
|
2610
2611
|
helpText: description || undefined,
|
|
2611
2612
|
errorMessage: errorMessage,
|
|
2612
2613
|
setValue: validation.setValue
|
|
2613
|
-
},
|
|
2614
|
+
}, key);
|
|
2614
2615
|
}
|
|
2615
2616
|
|
|
2616
2617
|
default:
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/custom-field-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.60",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@trackunit/react-core-contexts-test": "0.0.24",
|
|
8
|
-
"@trackunit/react-components": "0.0.
|
|
8
|
+
"@trackunit/react-components": "0.0.80",
|
|
9
9
|
"react": "17.0.1",
|
|
10
10
|
"react-hook-form": "^7.29.0",
|
|
11
11
|
"@trackunit/iris-app-runtime-core": "0.0.55",
|