@trackunit/custom-field-components 0.0.385 → 0.0.389
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 +3472 -317
- package/index.js +3472 -317
- package/package.json +7 -7
- package/src/BooleanCustomField.d.ts +80 -80
- package/src/CustomField.d.ts +36 -36
- package/src/DateCustomField.d.ts +54 -54
- package/src/DropdownCustomField.d.ts +100 -100
- package/src/UnitPreference.d.ts +1 -1
- package/src/getValidationRules.d.ts +62 -62
- package/src/index.d.ts +2 -2
- package/src/types.d.ts +2 -2
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
import { BooleanFieldDefinition, DateFieldDefinition, DropDownFieldDefinition, EmailFieldDefinition, NumberFieldDefinition, PhoneNumberFieldDefinition, StringFieldDefinition, WebAddressFieldDefinition } from "@trackunit/iris-app-runtime-core-api";
|
|
2
|
-
import { RegisterOptions } from "react-hook-form";
|
|
3
|
-
/**
|
|
4
|
-
* Validation rules for a field
|
|
5
|
-
*/
|
|
6
|
-
export type ValidationRules = RegisterOptions;
|
|
7
|
-
/**
|
|
8
|
-
* Get validation rules for a field
|
|
9
|
-
*
|
|
10
|
-
* @param { WebAddressFieldDefinition } definition the field definition
|
|
11
|
-
* @returns { ValidationRules} the validation rules
|
|
12
|
-
*/
|
|
13
|
-
export declare const getWebAddressValidationRules: (definition: WebAddressFieldDefinition) => ValidationRules;
|
|
14
|
-
/**
|
|
15
|
-
* Get validation rules for a field.
|
|
16
|
-
*
|
|
17
|
-
* @param { NumberFieldDefinition } definition the field definition
|
|
18
|
-
* @returns { ValidationRules} the validation rules
|
|
19
|
-
*/
|
|
20
|
-
export declare const getNumberValidationRules: (definition: NumberFieldDefinition) => ValidationRules;
|
|
21
|
-
/**
|
|
22
|
-
* Get validation rules for a string field.
|
|
23
|
-
*
|
|
24
|
-
* @param { StringFieldDefinition } definition the field definition
|
|
25
|
-
* @returns { ValidationRules} the validation rules
|
|
26
|
-
*/
|
|
27
|
-
export declare const getStringValidationRules: (definition: StringFieldDefinition) => ValidationRules;
|
|
28
|
-
/**
|
|
29
|
-
* Get validation rules for a boolean field.
|
|
30
|
-
*
|
|
31
|
-
* @param { BooleanFieldDefinition } definition the field definition
|
|
32
|
-
* @returns { ValidationRules} the validation rules
|
|
33
|
-
*/
|
|
34
|
-
export declare const getBooleanValidationRules: (definition: BooleanFieldDefinition) => ValidationRules;
|
|
35
|
-
/**
|
|
36
|
-
* Get validation rules for a dropdown field.
|
|
37
|
-
*
|
|
38
|
-
* @param { DropDownFieldDefinition } definition the field definition
|
|
39
|
-
* @returns { ValidationRules} the validation rules
|
|
40
|
-
*/
|
|
41
|
-
export declare const getDropdownValidationRules: (definition: DropDownFieldDefinition) => ValidationRules;
|
|
42
|
-
/**
|
|
43
|
-
* Get validation rules for a date field.
|
|
44
|
-
*
|
|
45
|
-
* @param { DateFieldDefinition } definition the field definition
|
|
46
|
-
* @returns { ValidationRules} the validation rules
|
|
47
|
-
*/
|
|
48
|
-
export declare const getDateValidationRules: (definition: DateFieldDefinition) => ValidationRules;
|
|
49
|
-
/**
|
|
50
|
-
* Get validation rules for an email field.
|
|
51
|
-
*
|
|
52
|
-
* @param { EmailFieldDefinition } definition the field definition
|
|
53
|
-
* @returns { ValidationRules} the validation rules
|
|
54
|
-
*/
|
|
55
|
-
export declare const getEmailValidationRules: (definition: EmailFieldDefinition) => ValidationRules;
|
|
56
|
-
/**
|
|
57
|
-
* Get validation rules for a phonenumber field.
|
|
58
|
-
*
|
|
59
|
-
* @param { PhoneNumberFieldDefinition } definition the field definition
|
|
60
|
-
* @returns { ValidationRules} the validation rules
|
|
61
|
-
*/
|
|
62
|
-
export declare const getPhoneNumberValidationRules: (definition: PhoneNumberFieldDefinition) => ValidationRules;
|
|
1
|
+
import { BooleanFieldDefinition, DateFieldDefinition, DropDownFieldDefinition, EmailFieldDefinition, NumberFieldDefinition, PhoneNumberFieldDefinition, StringFieldDefinition, WebAddressFieldDefinition } from "@trackunit/iris-app-runtime-core-api";
|
|
2
|
+
import { RegisterOptions } from "react-hook-form";
|
|
3
|
+
/**
|
|
4
|
+
* Validation rules for a field
|
|
5
|
+
*/
|
|
6
|
+
export type ValidationRules = RegisterOptions;
|
|
7
|
+
/**
|
|
8
|
+
* Get validation rules for a field
|
|
9
|
+
*
|
|
10
|
+
* @param { WebAddressFieldDefinition } definition the field definition
|
|
11
|
+
* @returns { ValidationRules} the validation rules
|
|
12
|
+
*/
|
|
13
|
+
export declare const getWebAddressValidationRules: (definition: WebAddressFieldDefinition) => ValidationRules;
|
|
14
|
+
/**
|
|
15
|
+
* Get validation rules for a field.
|
|
16
|
+
*
|
|
17
|
+
* @param { NumberFieldDefinition } definition the field definition
|
|
18
|
+
* @returns { ValidationRules} the validation rules
|
|
19
|
+
*/
|
|
20
|
+
export declare const getNumberValidationRules: (definition: NumberFieldDefinition) => ValidationRules;
|
|
21
|
+
/**
|
|
22
|
+
* Get validation rules for a string field.
|
|
23
|
+
*
|
|
24
|
+
* @param { StringFieldDefinition } definition the field definition
|
|
25
|
+
* @returns { ValidationRules} the validation rules
|
|
26
|
+
*/
|
|
27
|
+
export declare const getStringValidationRules: (definition: StringFieldDefinition) => ValidationRules;
|
|
28
|
+
/**
|
|
29
|
+
* Get validation rules for a boolean field.
|
|
30
|
+
*
|
|
31
|
+
* @param { BooleanFieldDefinition } definition the field definition
|
|
32
|
+
* @returns { ValidationRules} the validation rules
|
|
33
|
+
*/
|
|
34
|
+
export declare const getBooleanValidationRules: (definition: BooleanFieldDefinition) => ValidationRules;
|
|
35
|
+
/**
|
|
36
|
+
* Get validation rules for a dropdown field.
|
|
37
|
+
*
|
|
38
|
+
* @param { DropDownFieldDefinition } definition the field definition
|
|
39
|
+
* @returns { ValidationRules} the validation rules
|
|
40
|
+
*/
|
|
41
|
+
export declare const getDropdownValidationRules: (definition: DropDownFieldDefinition) => ValidationRules;
|
|
42
|
+
/**
|
|
43
|
+
* Get validation rules for a date field.
|
|
44
|
+
*
|
|
45
|
+
* @param { DateFieldDefinition } definition the field definition
|
|
46
|
+
* @returns { ValidationRules} the validation rules
|
|
47
|
+
*/
|
|
48
|
+
export declare const getDateValidationRules: (definition: DateFieldDefinition) => ValidationRules;
|
|
49
|
+
/**
|
|
50
|
+
* Get validation rules for an email field.
|
|
51
|
+
*
|
|
52
|
+
* @param { EmailFieldDefinition } definition the field definition
|
|
53
|
+
* @returns { ValidationRules} the validation rules
|
|
54
|
+
*/
|
|
55
|
+
export declare const getEmailValidationRules: (definition: EmailFieldDefinition) => ValidationRules;
|
|
56
|
+
/**
|
|
57
|
+
* Get validation rules for a phonenumber field.
|
|
58
|
+
*
|
|
59
|
+
* @param { PhoneNumberFieldDefinition } definition the field definition
|
|
60
|
+
* @returns { ValidationRules} the validation rules
|
|
61
|
+
*/
|
|
62
|
+
export declare const getPhoneNumberValidationRules: (definition: PhoneNumberFieldDefinition) => ValidationRules;
|
package/src/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./CustomField";
|
|
2
|
-
export * from "./UnitPreference";
|
|
1
|
+
export * from "./CustomField";
|
|
2
|
+
export * from "./UnitPreference";
|
package/src/types.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { FormGroupProps } from "@trackunit/react-form-components";
|
|
2
|
-
export type FormGroupExposedProps = Pick<FormGroupProps, "label" | "tip" | "helpText" | "helpAddon">;
|
|
1
|
+
import { FormGroupProps } from "@trackunit/react-form-components";
|
|
2
|
+
export type FormGroupExposedProps = Pick<FormGroupProps, "label" | "tip" | "helpText" | "helpAddon">;
|