@trackunit/react-form-components 0.0.277 → 0.0.280

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 CHANGED
@@ -2227,14 +2227,6 @@ const UrlField = React.forwardRef((_a, ref) => {
2227
2227
  return (jsxRuntime.jsx(FormGroup, { htmlFor: htmlForId, label: label, tip: tip, isInvalid: renderAsInvalid, helpText: renderAsInvalid ? errorMessage : helpText, helpAddon: helpAddon, disabled: rest.disabled, dataTestId: dataTestId && `${dataTestId}-FormGroup`, children: jsxRuntime.jsx(UrlInput, Object.assign({ id: htmlForId, "aria-labelledby": htmlForId + "-label", ref: ref, value: value || defaultValue, isInvalid: renderAsInvalid, disabled: rest.disabled }, rest, { className: className, dataTestId: dataTestId })) }));
2228
2228
  });
2229
2229
 
2230
- /**
2231
- * A utility function to get the error message from a FieldError object.
2232
- * This handles the case where the field is required and the u-ser has not entered a value.
2233
- */
2234
- const errorMessageFromFieldError = (cannotBeEmptyMessage, error) => {
2235
- return (error === null || error === void 0 ? void 0 : error.message) || (error === null || error === void 0 ? void 0 : error.type) === "required" ? cannotBeEmptyMessage : undefined;
2236
- };
2237
-
2238
2230
  /*
2239
2231
  * ----------------------------
2240
2232
  * | SETUP TRANSLATIONS START |
@@ -2305,7 +2297,6 @@ exports.cvaSelectMenu = cvaSelectMenu;
2305
2297
  exports.cvaSelectMenuList = cvaSelectMenuList;
2306
2298
  exports.cvaSelectPrefix = cvaSelectPrefix;
2307
2299
  exports.cvaSelectXIcon = cvaSelectXIcon;
2308
- exports.errorMessageFromFieldError = errorMessageFromFieldError;
2309
2300
  exports.getCountryAbbreviation = getCountryAbbreviation;
2310
2301
  exports.getOrderedOptions = getOrderedOptions;
2311
2302
  exports.getPhoneNumberWithPlus = getPhoneNumberWithPlus;
package/index.esm.js CHANGED
@@ -2197,14 +2197,6 @@ const UrlField = forwardRef((_a, ref) => {
2197
2197
  return (jsx(FormGroup, { htmlFor: htmlForId, label: label, tip: tip, isInvalid: renderAsInvalid, helpText: renderAsInvalid ? errorMessage : helpText, helpAddon: helpAddon, disabled: rest.disabled, dataTestId: dataTestId && `${dataTestId}-FormGroup`, children: jsx(UrlInput, Object.assign({ id: htmlForId, "aria-labelledby": htmlForId + "-label", ref: ref, value: value || defaultValue, isInvalid: renderAsInvalid, disabled: rest.disabled }, rest, { className: className, dataTestId: dataTestId })) }));
2198
2198
  });
2199
2199
 
2200
- /**
2201
- * A utility function to get the error message from a FieldError object.
2202
- * This handles the case where the field is required and the u-ser has not entered a value.
2203
- */
2204
- const errorMessageFromFieldError = (cannotBeEmptyMessage, error) => {
2205
- return (error === null || error === void 0 ? void 0 : error.message) || (error === null || error === void 0 ? void 0 : error.type) === "required" ? cannotBeEmptyMessage : undefined;
2206
- };
2207
-
2208
2200
  /*
2209
2201
  * ----------------------------
2210
2202
  * | SETUP TRANSLATIONS START |
@@ -2214,4 +2206,4 @@ const errorMessageFromFieldError = (cannotBeEmptyMessage, error) => {
2214
2206
  */
2215
2207
  setupLibraryTranslations();
2216
2208
 
2217
- export { ActionButton, BaseInput, Checkbox, CreatableSelect, DateField, DateInput, DropZone, EMAIL_REGEX, EmailField, EmailInput, FormGroup, Label, MultiSelectMenuItem, NumberField, NumberInput, OptionCard, PasswordField, PasswordInput, PhoneField, PhoneInput, RadioGroup, RadioItem, Schedule, ScheduleVariant, Search, Select, SingleSelectMenuItem, TextArea, TextAreaField, TextField, TextInput, TimeRange, TimeRangeField, Toggle, UploadField, UploadInput, UrlField, UrlInput, checkIfPhoneNumberHasPlus, countryCodeToFlagEmoji, cvaInput, cvaInputAddon, cvaInputAddonAfter, cvaInputAddonBefore, cvaInputBase, cvaInputBaseDisabled, cvaInputBaseInvalid, cvaInputField, cvaInputPrefix, cvaInputSuffix, cvaSelect, cvaSelectCounter, cvaSelectDynamicTagContainer, cvaSelectIcon, cvaSelectMenu, cvaSelectMenuList, cvaSelectPrefix, cvaSelectXIcon, errorMessageFromFieldError, getCountryAbbreviation, getOrderedOptions, getPhoneNumberWithPlus, isInvalidCountryCode, isInvalidPhoneNumber, isMultiValue, parseSchedule, serializeSchedule, useCustomComponents, usePhoneInput, validateEmailAddress, validatePhoneNumber, weekDay };
2209
+ export { ActionButton, BaseInput, Checkbox, CreatableSelect, DateField, DateInput, DropZone, EMAIL_REGEX, EmailField, EmailInput, FormGroup, Label, MultiSelectMenuItem, NumberField, NumberInput, OptionCard, PasswordField, PasswordInput, PhoneField, PhoneInput, RadioGroup, RadioItem, Schedule, ScheduleVariant, Search, Select, SingleSelectMenuItem, TextArea, TextAreaField, TextField, TextInput, TimeRange, TimeRangeField, Toggle, UploadField, UploadInput, UrlField, UrlInput, checkIfPhoneNumberHasPlus, countryCodeToFlagEmoji, cvaInput, cvaInputAddon, cvaInputAddonAfter, cvaInputAddonBefore, cvaInputBase, cvaInputBaseDisabled, cvaInputBaseInvalid, cvaInputField, cvaInputPrefix, cvaInputSuffix, cvaSelect, cvaSelectCounter, cvaSelectDynamicTagContainer, cvaSelectIcon, cvaSelectMenu, cvaSelectMenuList, cvaSelectPrefix, cvaSelectXIcon, getCountryAbbreviation, getOrderedOptions, getPhoneNumberWithPlus, isInvalidCountryCode, isInvalidPhoneNumber, isMultiValue, parseSchedule, serializeSchedule, useCustomComponents, usePhoneInput, validateEmailAddress, validatePhoneNumber, weekDay };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-form-components",
3
- "version": "0.0.277",
3
+ "version": "0.0.280",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
package/src/index.d.ts CHANGED
@@ -34,5 +34,4 @@ export * from "./components/UploadInput/UploadInput";
34
34
  export * from "./components/UrlField/UrlField";
35
35
  export * from "./components/UrlInput/UrlInput";
36
36
  export * from "./utilities/emailUtils";
37
- export * from "./utilities/formErrorMessageUtils";
38
37
  export * from "./utilities/usePhoneInput";
@@ -1,8 +0,0 @@
1
- /**
2
- * A utility function to get the error message from a FieldError object.
3
- * This handles the case where the field is required and the u-ser has not entered a value.
4
- */
5
- export declare const errorMessageFromFieldError: (cannotBeEmptyMessage: string, error?: {
6
- message?: string;
7
- type?: string;
8
- }) => string | undefined;