@openg2p/registry-widgets 1.1.0-dev.7 → 1.1.0-dev.9

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.
@@ -1,5 +1,13 @@
1
1
  import { WidgetDispatch } from "../store";
2
2
  import { SectionConfig, PanelConfig, BaseWidgetConfig } from "../types";
3
3
  export declare const collectWidgets: (panels: PanelConfig[]) => BaseWidgetConfig[];
4
- export declare const sectionValidate: (section: SectionConfig, currentSchemaData: Record<string, any>, dispatch: WidgetDispatch) => boolean;
4
+ /**
5
+ * Validate all widgets in a section and dispatch errors to the store.
6
+ *
7
+ * @param skipRequired - When true, required-field checks (widget-required,
8
+ * validation.required, document-required) are skipped. Use this for
9
+ * per-section Save/Next navigation so the user can advance without filling
10
+ * every mandatory field; only format/range errors are reported.
11
+ */
12
+ export declare const sectionValidate: (section: SectionConfig, currentSchemaData: Record<string, any>, dispatch: WidgetDispatch, skipRequired?: boolean) => boolean;
5
13
  //# sourceMappingURL=sectionValidate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sectionValidate.d.ts","sourceRoot":"","sources":["../../src/utils/sectionValidate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,OAAO,EACL,aAAa,EACb,WAAW,EACX,gBAAgB,EACjB,MAAM,UAAU,CAAC;AAKlB,eAAO,MAAM,cAAc,GAAI,QAAQ,WAAW,EAAE,KAAG,gBAAgB,EAWtE,CAAC;AAEF,eAAO,MAAM,eAAe,GAC1B,SAAS,aAAa,EACtB,mBAAmB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACtC,UAAU,cAAc,KACvB,OAkEF,CAAC"}
1
+ {"version":3,"file":"sectionValidate.d.ts","sourceRoot":"","sources":["../../src/utils/sectionValidate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,OAAO,EACL,aAAa,EACb,WAAW,EACX,gBAAgB,EACjB,MAAM,UAAU,CAAC;AAKlB,eAAO,MAAM,cAAc,GAAI,QAAQ,WAAW,EAAE,KAAG,gBAAgB,EAWtE,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAC1B,SAAS,aAAa,EACtB,mBAAmB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACtC,UAAU,cAAc,EACxB,eAAc,OAAe,KAC5B,OAgEF,CAAC"}
@@ -1,9 +1,13 @@
1
1
  import { z } from 'zod';
2
2
  import { WidgetValidation } from '../types';
3
3
  /**
4
- * Validate value against validation rules
4
+ * Validate value against validation rules.
5
+ *
6
+ * @param skipRequired - When true, required-field checks are skipped (used by
7
+ * per-section Save/Next buttons so the user can move between sections without
8
+ * filling every mandatory field; only format/range checks still run).
5
9
  */
6
- export declare const validateWidget: (value: any, validation: WidgetValidation | undefined, required?: boolean) => string[];
10
+ export declare const validateWidget: (value: any, validation: WidgetValidation | undefined, required?: boolean, skipRequired?: boolean) => string[];
7
11
  /**
8
12
  * Create Zod schema from validation config
9
13
  */
@@ -1 +1 @@
1
- {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/utils/validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAkB,MAAM,UAAU,CAAC;AAG5D;;GAEG;AACH,eAAO,MAAM,cAAc,GACzB,OAAO,GAAG,EACV,YAAY,gBAAgB,GAAG,SAAS,EACxC,WAAU,OAAe,KACxB,MAAM,EAoFR,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,GAC1B,YAAY,gBAAgB,GAAG,SAAS,EACxC,WAAU,OAAe,KACxB,CAAC,CAAC,SAAS,GAAG,IAyDhB,CAAC"}
1
+ {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/utils/validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAkB,MAAM,UAAU,CAAC;AAG5D;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,GACzB,OAAO,GAAG,EACV,YAAY,gBAAgB,GAAG,SAAS,EACxC,WAAU,OAAe,EACzB,eAAc,OAAe,KAC5B,MAAM,EAmFR,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,GAC1B,YAAY,gBAAgB,GAAG,SAAS,EACxC,WAAU,OAAe,KACxB,CAAC,CAAC,SAAS,GAAG,IAyDhB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openg2p/registry-widgets",
3
- "version": "1.1.0-dev.7",
3
+ "version": "1.1.0-dev.9",
4
4
  "type": "module",
5
5
  "description": "Complete React widget library with generic form widgets, data binding, validation, and conditional logic",
6
6
  "main": "dist/index.js",