@formkit/core
Advanced tools
Comparing version 1.0.0-beta.7-8099304 to 1.0.0-beta.7-927abc9
@@ -138,3 +138,3 @@ /** | ||
value: any; | ||
from?: number; | ||
from?: number | symbol; | ||
} | ||
@@ -425,59 +425,3 @@ | ||
*/ | ||
state: Record<string, boolean | undefined> & { | ||
/** | ||
* If the input has been blurred. | ||
*/ | ||
blurred: boolean; | ||
/** | ||
* True when these conditions are met: | ||
* | ||
* Either: | ||
* - The input has validation rules | ||
* - The validation rules are all passing | ||
* - There are no errors on the input | ||
* Or: | ||
* - The input has no validation rules | ||
* - The input has no errors | ||
* - The input is dirty and has a value | ||
* | ||
* This is not intended to be used on forms/groups/lists but instead on | ||
* individual inputs. Imagine placing a green checkbox next to each input | ||
* when the user filled it out correctly — thats what these are for. | ||
*/ | ||
complete: boolean; | ||
/** | ||
* If the input has had a value typed into it or a change made to it. | ||
*/ | ||
dirty: boolean; | ||
/** | ||
* If the input has explicit errors placed on it, or in the case of a group, | ||
* list, or form, this is true if any children have errors on them. | ||
*/ | ||
errors: boolean; | ||
/** | ||
* True when the input has validation rules. Has nothing to do with the | ||
* state of those validation rules. | ||
*/ | ||
rules: boolean; | ||
/** | ||
* True when the input has completed its internal debounce cycle and the | ||
* value was committed to the form. | ||
*/ | ||
settled: boolean; | ||
/** | ||
* If the form has been submitted. | ||
*/ | ||
submitted: boolean; | ||
/** | ||
* If the input (or group/form/list) is passing all validation rules. In | ||
* the case of groups, forms, and lists this includes the validation state | ||
* of all its children. | ||
*/ | ||
valid: boolean; | ||
/** | ||
* If the validation-visibility has been satisfied and any validation | ||
* messages should be displayed. | ||
*/ | ||
validationVisible: boolean; | ||
}; | ||
state: FormKitFrameworkContextState; | ||
/** | ||
@@ -496,2 +440,69 @@ * The type of input "text" or "select" (retrieved from node.props.type). This | ||
/** | ||
* The state inside a node’s framework context. Usually used to track things | ||
* like blurred, and validity states. | ||
* @public | ||
*/ | ||
export declare interface FormKitFrameworkContextState { | ||
/** | ||
* If the input has been blurred. | ||
*/ | ||
blurred: boolean; | ||
/** | ||
* True when these conditions are met: | ||
* | ||
* Either: | ||
* - The input has validation rules | ||
* - The validation rules are all passing | ||
* - There are no errors on the input | ||
* Or: | ||
* - The input has no validation rules | ||
* - The input has no errors | ||
* - The input is dirty and has a value | ||
* | ||
* This is not intended to be used on forms/groups/lists but instead on | ||
* individual inputs. Imagine placing a green checkbox next to each input | ||
* when the user filled it out correctly — thats what these are for. | ||
*/ | ||
complete: boolean; | ||
/** | ||
* If the input has had a value typed into it or a change made to it. | ||
*/ | ||
dirty: boolean; | ||
/** | ||
* If the input has explicit errors placed on it, or in the case of a group, | ||
* list, or form, this is true if any children have errors on them. | ||
*/ | ||
errors: boolean; | ||
/** | ||
* True when the input has validation rules. Has nothing to do with the | ||
* state of those validation rules. | ||
*/ | ||
rules: boolean; | ||
/** | ||
* True when the input has completed its internal debounce cycle and the | ||
* value was committed to the form. | ||
*/ | ||
settled: boolean; | ||
/** | ||
* If the form has been submitted. | ||
*/ | ||
submitted: boolean; | ||
/** | ||
* If the input (or group/form/list) is passing all validation rules. In | ||
* the case of groups, forms, and lists this includes the validation state | ||
* of all its children. | ||
*/ | ||
valid: boolean; | ||
/** | ||
* If the validation-visibility has been satisfied and any validation | ||
* messages should be displayed. | ||
*/ | ||
validationVisible: boolean; | ||
/** | ||
* Allow users to add their own arbitrary states. | ||
*/ | ||
[index: string]: boolean; | ||
} | ||
/** | ||
* FormKit inputs of type 'group' must have keyed values by default. | ||
@@ -674,4 +685,9 @@ * @public | ||
*/ | ||
add: (node: FormKitNode) => FormKitNode; | ||
add: (node: FormKitNode, index?: number) => FormKitNode; | ||
/** | ||
* Adds props to the given node by removing them from node.props.attrs and | ||
* moving them to the top-level node.props object. | ||
*/ | ||
addProps: (props: string[]) => FormKitNode; | ||
/** | ||
* Gets a node at another address. Addresses are dot-syntax paths (or arrays) | ||
@@ -837,2 +853,3 @@ * of node names. For example: form.users.0.first_name There are a few | ||
children: FormKitNode[] | Set<FormKitNode>; | ||
index?: number; | ||
plugins: FormKitPlugin[]; | ||
@@ -1234,2 +1251,9 @@ alias: string; | ||
/** | ||
* When creating a new node and having its value injected directly at a specific | ||
* location. | ||
* @public | ||
*/ | ||
export declare const valueInserted: unique symbol; | ||
/** | ||
* When propagating values up a tree, this value indicates the child should be | ||
@@ -1236,0 +1260,0 @@ * moved. |
{ | ||
"name": "@formkit/core", | ||
"version": "1.0.0-beta.7-8099304", | ||
"version": "1.0.0-beta.7-927abc9", | ||
"type": "module", | ||
@@ -36,5 +36,5 @@ "description": "The framework agnostic core of FormKit", | ||
"dependencies": { | ||
"@formkit/utils": "1.0.0-beta.7-8099304" | ||
"@formkit/utils": "1.0.0-beta.7-927abc9" | ||
}, | ||
"devDependencies": {} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
209376
6243
+ Added@formkit/utils@1.0.0-beta.7-927abc9(transitive)
- Removed@formkit/utils@1.0.0-beta.7-8099304(transitive)