@dynamicforms/vue-forms 0.18.0 → 1.0.0
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/dist/dynamicforms-vue-forms.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/package.json +7 -3
- package/readme.md +1 -3
package/dist/index.d.ts
CHANGED
|
@@ -662,6 +662,10 @@ export declare abstract class FieldBase<T = any, X extends object = Extras> {
|
|
|
662
662
|
* List of errors. The array handed out is the one the element holds, and a validator writes into it in place,
|
|
663
663
|
* so a transaction that is open takes the element into its record here: a rollback that put back everything
|
|
664
664
|
* except the errors would leave a state the form never held.
|
|
665
|
+
*
|
|
666
|
+
* The array and its members are Vue proxies, not the raw instances a validator returned - `field.errors[0] ===
|
|
667
|
+
* myError` is `false` for the very error that produced it. Unwrapping here would lose the tracked read a
|
|
668
|
+
* template needs to re-render when a message behind a `Ref` changes; `toRaw()` compares identity instead.
|
|
665
669
|
*/
|
|
666
670
|
get errors(): ValidationError[];
|
|
667
671
|
set errors(newValue: ValidationError[]);
|
|
@@ -825,6 +829,8 @@ export declare abstract class FieldBase<T = any, X extends object = Extras> {
|
|
|
825
829
|
/**
|
|
826
830
|
* Records a child's new verdict in this element's tally. The child reports it as it settles, and the commit
|
|
827
831
|
* settles the deepest element first, so the tally a container reads when its own turn comes is finished.
|
|
832
|
+
* The delta is applied here rather than recomputed by walking the members at commit, which would cost
|
|
833
|
+
* `O(members)` per container and turn a list fill back into the quadratic walk this tally exists to avoid.
|
|
828
834
|
*/
|
|
829
835
|
protected childValidityChanged(nowValid: boolean): void;
|
|
830
836
|
/**
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamicforms/vue-forms",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"description": "A
|
|
7
|
-
"author": "Jure
|
|
6
|
+
"description": "A Vue.js library for form state management with built-in validation, conditional logic, nested structures, and a rich event system. UI-agnostic and TypeScript-first.",
|
|
7
|
+
"author": "Jure Erznožnik",
|
|
8
8
|
"files": [
|
|
9
9
|
"dist/*"
|
|
10
10
|
],
|
|
@@ -92,5 +92,9 @@
|
|
|
92
92
|
"vue-eslint-parser": "^10.4.1",
|
|
93
93
|
"vue-markdown-render": "^2.3.0",
|
|
94
94
|
"vue-tsc": "^2"
|
|
95
|
+
},
|
|
96
|
+
"allowScripts": {
|
|
97
|
+
"@parcel/watcher@2.5.6": true,
|
|
98
|
+
"unrs-resolver@1.12.2": true
|
|
95
99
|
}
|
|
96
100
|
}
|
package/readme.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @dynamicforms/vue-forms
|
|
2
2
|
|
|
3
|
-
A
|
|
3
|
+
A reactive data entry forms library for Vue.js that handles form state management without dictating your
|
|
4
4
|
UI components.
|
|
5
5
|
|
|
6
6
|
## Introduction
|
|
@@ -18,7 +18,6 @@ mechanism applies at every level of a nested form.
|
|
|
18
18
|
- **Fields that react to each other**: Conditional visibility, enablement and values are declared as statements over other fields, and an action pipeline lets a handler intercept, transform or abort an event.
|
|
19
19
|
- **Reactive & Type-Safe**: Every member of a field, group or list is a tracked read, and a group's value type is inferred from the fields it holds, nested structures included.
|
|
20
20
|
- **Structural serialization**: A group's value is the shape of its fields, and `Group.createFromFormData()` turns a plain object back into a form.
|
|
21
|
-
- **Lightweight**: `vue` (^3.5.2) is the only peer dependency and `lodash-es` the only runtime one.
|
|
22
21
|
|
|
23
22
|
## Features
|
|
24
23
|
|
|
@@ -42,7 +41,6 @@ mechanism applies at every level of a nested form.
|
|
|
42
41
|
as a second type argument, checked by the compiler and read through `extra`
|
|
43
42
|
- **Display modes**: control field visibility with different display modes (Full, Hidden, Invisible, Suppress)
|
|
44
43
|
- **TypeScript support**: full type definitions, and a group's value type inferred from the fields it holds
|
|
45
|
-
- **Lightweight**: `vue` (^3.5.2) is the only peer dependency and `lodash-es` the only runtime one
|
|
46
44
|
|
|
47
45
|
## Installation
|
|
48
46
|
|