@trackunit/custom-field-components 0.0.704 → 0.0.705

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
@@ -433,7 +433,7 @@ const useCustomFieldResolver = ({ field, definition, register, setValue, formSta
433
433
  case "PhoneNumberFieldDefinition": {
434
434
  const value = (field === null || field === void 0 ? void 0 : field.__typename) === "PhoneNumberFieldValueAndDefinition" ? field.stringValue : undefined;
435
435
  const rules = getPhoneNumberValidationRules(!Boolean(def.uiEditable));
436
- return (jsxRuntime.jsx(reactFormComponents.PhoneFieldWithController, { control: control, controllerProps: { rules }, dataTestId: `${key}`, errorMessage: errorMessage, helpText: description, id: uniqueIdentifier, label: title, name: uniqueIdentifier, placeholder: title !== null && title !== void 0 ? title : "", readOnly: !isEditableCombined, value: value !== null && value !== void 0 ? value : "" }));
436
+ return (jsxRuntime.jsx(reactFormComponents.PhoneField, Object.assign({ dataTestId: `${key}`, errorMessage: errorMessage, helpText: description, id: uniqueIdentifier, label: title, placeholder: title !== null && title !== void 0 ? title : "", readOnly: !isEditableCombined, value: value !== null && value !== void 0 ? value : "" }, validation.register(uniqueIdentifier, Object.assign(Object.assign({}, rules), { value })))));
437
437
  }
438
438
  case "StringFieldDefinition": {
439
439
  const value = (field === null || field === void 0 ? void 0 : field.__typename) === "StringFieldValueAndDefinition" ? field.stringValue : undefined;
package/index.esm.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { registerTranslations, useNamespaceTranslation } from '@trackunit/i18n-library-translation';
3
3
  import { CustomFieldRuntime } from '@trackunit/iris-app-runtime-core';
4
- import { FormGroup, Checkbox, DateField, Select, useGetPhoneValidationRules, NumberField, TextField, PhoneFieldWithController, ActionButton } from '@trackunit/react-form-components';
4
+ import { FormGroup, Checkbox, DateField, Select, useGetPhoneValidationRules, NumberField, TextField, PhoneField, ActionButton } from '@trackunit/react-form-components';
5
5
  import { exhaustiveCheck } from '@trackunit/shared-utils';
6
6
  import * as React from 'react';
7
7
  import { useCallback, useEffect, createElement, useState } from 'react';
@@ -410,7 +410,7 @@ const useCustomFieldResolver = ({ field, definition, register, setValue, formSta
410
410
  case "PhoneNumberFieldDefinition": {
411
411
  const value = (field === null || field === void 0 ? void 0 : field.__typename) === "PhoneNumberFieldValueAndDefinition" ? field.stringValue : undefined;
412
412
  const rules = getPhoneNumberValidationRules(!Boolean(def.uiEditable));
413
- return (jsx(PhoneFieldWithController, { control: control, controllerProps: { rules }, dataTestId: `${key}`, errorMessage: errorMessage, helpText: description, id: uniqueIdentifier, label: title, name: uniqueIdentifier, placeholder: title !== null && title !== void 0 ? title : "", readOnly: !isEditableCombined, value: value !== null && value !== void 0 ? value : "" }));
413
+ return (jsx(PhoneField, Object.assign({ dataTestId: `${key}`, errorMessage: errorMessage, helpText: description, id: uniqueIdentifier, label: title, placeholder: title !== null && title !== void 0 ? title : "", readOnly: !isEditableCombined, value: value !== null && value !== void 0 ? value : "" }, validation.register(uniqueIdentifier, Object.assign(Object.assign({}, rules), { value })))));
414
414
  }
415
415
  case "StringFieldDefinition": {
416
416
  const value = (field === null || field === void 0 ? void 0 : field.__typename) === "StringFieldValueAndDefinition" ? field.stringValue : undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/custom-field-components",
3
- "version": "0.0.704",
3
+ "version": "0.0.705",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {