@trackunit/custom-field-components 1.12.0 → 1.12.2

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
@@ -129,10 +129,10 @@ const setupLibraryTranslations = () => {
129
129
  };
130
130
 
131
131
  /**
132
- * A component that can be used to render a boolean field
132
+ * A component that can be used to render a boolean field.
133
+ * See BooleanCustomFieldProps for prop documentation.
133
134
  *
134
- * @param options BooleanCustomFieldProps - options for the component
135
- * @returns {ReactElement }ReactElement - a component that can be used to render a boolean field
135
+ * @returns {ReactElement} A component that can be used to render a boolean field.
136
136
  */
137
137
  const BooleanCustomField = ({ defaultValue, "data-testid": dataTestId = "booleanField", onChange, value, id, setValue, register, validationRules, disabled = false, label, tip, isInvalid, errorMessage, helpAddon, maxLength, helpText, ...rest }) => {
138
138
  const initialValue = value !== undefined ? value : defaultValue ? defaultValue : false;
@@ -182,10 +182,10 @@ const convertToValueFormat = (value) => {
182
182
  return { label: value, value };
183
183
  };
184
184
  /**
185
- * A custom field that can be used to render a dropdown
185
+ * A custom field that can be used to render a dropdown.
186
+ * See DropdownCustomFieldProps for prop documentation.
186
187
  *
187
- * @param options DropdownCustomFieldProps - an object with all the props
188
- * @returns {ReactElement} - a dropdown component
188
+ * @returns {ReactElement} A dropdown component.
189
189
  */
190
190
  const DropdownCustomField = ({ defaultValue, "data-testid": dataTestId, onChange, onBlur, id, disabled = false, allValues, multiSelect = false, register, validationRules, setValue, label, tip, errorMessage, helpText, isInvalid = false, helpAddon, }) => {
191
191
  const renderAsInvalid = isInvalid || Boolean(errorMessage);
package/index.esm.js CHANGED
@@ -127,10 +127,10 @@ const setupLibraryTranslations = () => {
127
127
  };
128
128
 
129
129
  /**
130
- * A component that can be used to render a boolean field
130
+ * A component that can be used to render a boolean field.
131
+ * See BooleanCustomFieldProps for prop documentation.
131
132
  *
132
- * @param options BooleanCustomFieldProps - options for the component
133
- * @returns {ReactElement }ReactElement - a component that can be used to render a boolean field
133
+ * @returns {ReactElement} A component that can be used to render a boolean field.
134
134
  */
135
135
  const BooleanCustomField = ({ defaultValue, "data-testid": dataTestId = "booleanField", onChange, value, id, setValue, register, validationRules, disabled = false, label, tip, isInvalid, errorMessage, helpAddon, maxLength, helpText, ...rest }) => {
136
136
  const initialValue = value !== undefined ? value : defaultValue ? defaultValue : false;
@@ -180,10 +180,10 @@ const convertToValueFormat = (value) => {
180
180
  return { label: value, value };
181
181
  };
182
182
  /**
183
- * A custom field that can be used to render a dropdown
183
+ * A custom field that can be used to render a dropdown.
184
+ * See DropdownCustomFieldProps for prop documentation.
184
185
  *
185
- * @param options DropdownCustomFieldProps - an object with all the props
186
- * @returns {ReactElement} - a dropdown component
186
+ * @returns {ReactElement} A dropdown component.
187
187
  */
188
188
  const DropdownCustomField = ({ defaultValue, "data-testid": dataTestId, onChange, onBlur, id, disabled = false, allValues, multiSelect = false, register, validationRules, setValue, label, tip, errorMessage, helpText, isInvalid = false, helpAddon, }) => {
189
189
  const renderAsInvalid = isInvalid || Boolean(errorMessage);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/custom-field-components",
3
- "version": "1.12.0",
3
+ "version": "1.12.2",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -10,15 +10,15 @@
10
10
  "react": "19.0.0",
11
11
  "react-hook-form": "7.62.0",
12
12
  "react-select": "^5.10.2",
13
- "@trackunit/react-form-components": "1.13.0",
14
- "@trackunit/shared-utils": "1.13.19",
15
- "@trackunit/custom-field-api": "1.12.0",
16
- "@trackunit/iris-app-runtime-core": "1.13.0",
17
- "@trackunit/react-components": "1.16.0",
18
- "@trackunit/react-modal": "1.13.0",
19
- "@trackunit/react-core-hooks": "1.12.0",
20
- "@trackunit/i18n-library-translation": "1.12.0",
21
- "@trackunit/iris-app-runtime-core-api": "1.12.0"
13
+ "@trackunit/react-form-components": "1.13.2",
14
+ "@trackunit/shared-utils": "1.13.21",
15
+ "@trackunit/custom-field-api": "1.12.2",
16
+ "@trackunit/iris-app-runtime-core": "1.13.2",
17
+ "@trackunit/react-components": "1.16.2",
18
+ "@trackunit/react-modal": "1.13.2",
19
+ "@trackunit/react-core-hooks": "1.12.2",
20
+ "@trackunit/i18n-library-translation": "1.12.2",
21
+ "@trackunit/iris-app-runtime-core-api": "1.12.2"
22
22
  },
23
23
  "module": "./index.esm.js",
24
24
  "main": "./index.cjs.js",
@@ -72,9 +72,9 @@ export interface BooleanCustomFieldProps extends Omit<CheckboxProps, "value" | "
72
72
  errorMessage?: string;
73
73
  }
74
74
  /**
75
- * A component that can be used to render a boolean field
75
+ * A component that can be used to render a boolean field.
76
+ * See BooleanCustomFieldProps for prop documentation.
76
77
  *
77
- * @param options BooleanCustomFieldProps - options for the component
78
- * @returns {ReactElement }ReactElement - a component that can be used to render a boolean field
78
+ * @returns {ReactElement} A component that can be used to render a boolean field.
79
79
  */
80
80
  export declare const BooleanCustomField: ({ defaultValue, "data-testid": dataTestId, onChange, value, id, setValue, register, validationRules, disabled, label, tip, isInvalid, errorMessage, helpAddon, maxLength, helpText, ...rest }: BooleanCustomFieldProps) => ReactElement;
@@ -85,10 +85,10 @@ export interface DropdownCustomFieldProps extends FormGroupExposedProps {
85
85
  type OnChange = (event?: ChangeEvent<HTMLInputElement>) => void;
86
86
  type OnBlur = (event: FocusEvent<HTMLInputElement>) => void;
87
87
  /**
88
- * A custom field that can be used to render a dropdown
88
+ * A custom field that can be used to render a dropdown.
89
+ * See DropdownCustomFieldProps for prop documentation.
89
90
  *
90
- * @param options DropdownCustomFieldProps - an object with all the props
91
- * @returns {ReactElement} - a dropdown component
91
+ * @returns {ReactElement} A dropdown component.
92
92
  */
93
93
  export declare const DropdownCustomField: ({ defaultValue, "data-testid": dataTestId, onChange, onBlur, id, disabled, allValues, multiSelect, register, validationRules, setValue, label, tip, errorMessage, helpText, isInvalid, helpAddon, }: DropdownCustomFieldProps) => ReactElement;
94
94
  export {};