@sprucelabs/spruce-form-utils 18.3.1 → 18.4.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.
@@ -8,6 +8,7 @@ export default class FormCardViewController<S extends Schema = any> extends Abst
8
8
  setIsBusy(isBusy: boolean): void;
9
9
  private CardVc;
10
10
  getIsValid(): boolean;
11
+ clearDirty(): void;
11
12
  validate(): Partial<Record<Extract<keyof S["fields"], string>, import("@sprucelabs/heartwood-view-controllers").TypedFieldError<S, Extract<keyof S["fields"], string>>[]>>;
12
13
  setValues(values: SchemaPartialValues<S>): Promise<void>;
13
14
  getValues(): SchemaPartialValues<S, false>;
@@ -50,6 +50,9 @@ class FormCardViewController extends AbstractViewController {
50
50
  getIsValid() {
51
51
  return this.formVc.isValid();
52
52
  }
53
+ clearDirty() {
54
+ this.formVc.clearDirty();
55
+ }
53
56
  validate() {
54
57
  const errors = this.formVc.validate();
55
58
  if (Object.keys(errors).length > 0) {
@@ -8,6 +8,7 @@ export default class FormCardViewController<S extends Schema = any> extends Abst
8
8
  setIsBusy(isBusy: boolean): void;
9
9
  private CardVc;
10
10
  getIsValid(): boolean;
11
+ clearDirty(): void;
11
12
  validate(): Partial<Record<Extract<keyof S["fields"], string>, import("@sprucelabs/heartwood-view-controllers").TypedFieldError<S, Extract<keyof S["fields"], string>>[]>>;
12
13
  setValues(values: SchemaPartialValues<S>): Promise<void>;
13
14
  getValues(): SchemaPartialValues<S, false>;
@@ -36,6 +36,9 @@ class FormCardViewController extends heartwood_view_controllers_1.AbstractViewCo
36
36
  getIsValid() {
37
37
  return this.formVc.isValid();
38
38
  }
39
+ clearDirty() {
40
+ this.formVc.clearDirty();
41
+ }
39
42
  validate() {
40
43
  const errors = this.formVc.validate();
41
44
  if (Object.keys(errors).length > 0) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sprucelabs/spruce-form-utils",
3
3
  "description": "Support for working with forms and Sprucebot. 📄",
4
- "version": "18.3.1",
4
+ "version": "18.4.0",
5
5
  "skill": {
6
6
  "namespace": "forms"
7
7
  },