@macrulez/vue-form-schema 0.1.7 → 0.2.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.
Files changed (105) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +461 -180
  3. package/dist/MaskEngine-BEXwX4BK.js +144 -0
  4. package/dist/MaskEngine-CPr-fSPy.cjs +1 -0
  5. package/dist/ValidationEngine-BC4U1ef1.js +135 -0
  6. package/dist/ValidationEngine-Diz-qTFs.cjs +1 -0
  7. package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
  8. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  9. package/dist/core/ConditionEvaluator.d.ts.map +1 -1
  10. package/dist/core/MaskEngine.d.ts.map +1 -1
  11. package/dist/core/ValidationEngine.d.ts +13 -0
  12. package/dist/core/ValidationEngine.d.ts.map +1 -1
  13. package/dist/core/formRegistry.d.ts +33 -0
  14. package/dist/core/formRegistry.d.ts.map +1 -0
  15. package/dist/core/inferTypes.d.ts.map +1 -1
  16. package/dist/core/schemaUtils.d.ts +38 -0
  17. package/dist/core/schemaUtils.d.ts.map +1 -1
  18. package/dist/core/serverErrors.d.ts +69 -0
  19. package/dist/core/serverErrors.d.ts.map +1 -0
  20. package/dist/core/types.d.ts +22 -2
  21. package/dist/core/types.d.ts.map +1 -1
  22. package/dist/core/useForm.d.ts +4 -1
  23. package/dist/core/useForm.d.ts.map +1 -1
  24. package/dist/core/useMultiStepForm.d.ts.map +1 -1
  25. package/dist/devtools/index.d.ts +26 -0
  26. package/dist/devtools/index.d.ts.map +1 -0
  27. package/dist/devtools.cjs +1 -0
  28. package/dist/devtools.d.ts +6 -0
  29. package/dist/devtools.js +93 -0
  30. package/dist/formRegistry-Bv1eaWQ-.js +31 -0
  31. package/dist/formRegistry-DaDmXyYY.cjs +1 -0
  32. package/dist/index.cjs +1 -1
  33. package/dist/index.d.ts +5 -3
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +392 -359
  36. package/dist/openapi.cjs +1 -0
  37. package/dist/openapi.d.ts +202 -0
  38. package/dist/openapi.js +118 -0
  39. package/dist/parsers/json.d.ts.map +1 -1
  40. package/dist/parsers/openapi.d.ts +139 -0
  41. package/dist/parsers/openapi.d.ts.map +1 -0
  42. package/dist/parsers/valibot.d.ts +13 -4
  43. package/dist/parsers/valibot.d.ts.map +1 -1
  44. package/dist/parsers/yup.d.ts +10 -4
  45. package/dist/parsers/yup.d.ts.map +1 -1
  46. package/dist/parsers/zod.d.ts +18 -4
  47. package/dist/parsers/zod.d.ts.map +1 -1
  48. package/dist/schemaUtils-Cc7CwGXB.cjs +1 -0
  49. package/dist/schemaUtils-Cvlsk24U.js +337 -0
  50. package/dist/style.css +1 -0
  51. package/dist/ui/index.d.ts +1 -0
  52. package/dist/ui/index.d.ts.map +1 -1
  53. package/dist/ui/naive/index.d.ts +11 -0
  54. package/dist/ui/naive/index.d.ts.map +1 -0
  55. package/dist/ui/primevue/index.d.ts +11 -0
  56. package/dist/ui/primevue/index.d.ts.map +1 -0
  57. package/dist/ui/shadcn/index.d.ts +11 -0
  58. package/dist/ui/shadcn/index.d.ts.map +1 -0
  59. package/dist/ui/tailwind/index.d.ts +11 -0
  60. package/dist/ui/tailwind/index.d.ts.map +1 -0
  61. package/dist/ui-naive.cjs +1 -0
  62. package/dist/ui-naive.d.ts +411 -0
  63. package/dist/ui-naive.js +667 -0
  64. package/dist/ui-primevue.cjs +1 -0
  65. package/dist/ui-primevue.d.ts +411 -0
  66. package/dist/ui-primevue.js +651 -0
  67. package/dist/ui-shadcn.cjs +1 -0
  68. package/dist/ui-shadcn.d.ts +411 -0
  69. package/dist/ui-shadcn.js +650 -0
  70. package/dist/ui-tailwind.cjs +1 -0
  71. package/dist/ui-tailwind.d.ts +411 -0
  72. package/dist/ui-tailwind.js +669 -0
  73. package/dist/ui.cjs +1 -1
  74. package/dist/ui.d.ts +61 -10
  75. package/dist/ui.js +434 -299
  76. package/dist/valibot.cjs +1 -1
  77. package/dist/valibot.d.ts +35 -4
  78. package/dist/valibot.js +47 -20
  79. package/dist/yup.cjs +1 -1
  80. package/dist/yup.d.ts +33 -5
  81. package/dist/yup.js +16 -15
  82. package/dist/zod.cjs +1 -1
  83. package/dist/zod.d.ts +41 -5
  84. package/dist/zod.js +58 -28
  85. package/package.json +99 -25
  86. package/dist/MaskEngine-BqJQYybS.js +0 -233
  87. package/dist/MaskEngine-BwAs2Zb0.cjs +0 -1
  88. package/dist/__tests__/ConditionEvaluator.test.d.ts +0 -2
  89. package/dist/__tests__/ConditionEvaluator.test.d.ts.map +0 -1
  90. package/dist/__tests__/MaskEngine.test.d.ts +0 -2
  91. package/dist/__tests__/MaskEngine.test.d.ts.map +0 -1
  92. package/dist/__tests__/ValidationEngine.test.d.ts +0 -2
  93. package/dist/__tests__/ValidationEngine.test.d.ts.map +0 -1
  94. package/dist/__tests__/parsers.test.d.ts +0 -2
  95. package/dist/__tests__/parsers.test.d.ts.map +0 -1
  96. package/dist/__tests__/phase3.test.d.ts +0 -2
  97. package/dist/__tests__/phase3.test.d.ts.map +0 -1
  98. package/dist/__tests__/phase4.test.d.ts +0 -2
  99. package/dist/__tests__/phase4.test.d.ts.map +0 -1
  100. package/dist/__tests__/useFieldArray.test.d.ts +0 -2
  101. package/dist/__tests__/useFieldArray.test.d.ts.map +0 -1
  102. package/dist/__tests__/useForm.test.d.ts +0 -2
  103. package/dist/__tests__/useForm.test.d.ts.map +0 -1
  104. package/dist/__tests__/useMultiStepForm.test.d.ts +0 -2
  105. package/dist/__tests__/useMultiStepForm.test.d.ts.map +0 -1
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Vue DevTools integration — subentry-point 'vue-form-schema/devtools'.
3
+ *
4
+ * Deliberately a separate entry point (not part of the core bundle):
5
+ * `@vue/devtools-api` is only imported here, so importing the core package
6
+ * (or any other subentry) never pulls it in. Call `installFormDevtools`
7
+ * once, in development only — it adds a custom inspector listing every
8
+ * active `useForm()` instance (values/errors/touched/isValid/isDirty) and
9
+ * a timeline layer for `setField`/`touch`/`submit`/`reset`/async-validation
10
+ * events.
11
+ *
12
+ * @example
13
+ * import { createApp } from 'vue'
14
+ * import App from './App.vue'
15
+ *
16
+ * const app = createApp(App)
17
+ * if (import.meta.env.DEV) {
18
+ * const { installFormDevtools } = await import('@macrulez/vue-form-schema/devtools')
19
+ * installFormDevtools(app)
20
+ * }
21
+ * app.mount('#app')
22
+ */
23
+ import type { App } from 'vue';
24
+ /** Installs the DevTools inspector + timeline for this Vue app. Safe to call multiple times or during SSR (no-ops without a browser). */
25
+ export declare function installFormDevtools(app: App): void;
26
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/devtools/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAkE9B,yIAAyI;AACzI,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,CAiElD"}
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("@vue/devtools-api"),n=require("./formRegistry-DaDmXyYY.cjs"),l="vue-form-schema-inspector",c="vue-form-schema-timeline",b={setField:"default",touch:"default",submit:"default",submitSuccess:"default",submitError:"error",reset:"warning",asyncValidate:"default"};function a(o){return`${o.label} #${o.id}`}function p(o){const r=Object.values(o.form.errors.value).some(e=>e.length>0);return{id:String(o.id),label:a(o),tags:r?[{label:"invalid",textColor:16777215,backgroundColor:14427686}]:o.form.isDirty.value?[{label:"dirty",textColor:1120295,backgroundColor:16498468}]:[]}}function u(o){const{values:r,errors:e,touched:s,isDirty:m,isValid:d,isSubmitting:f,optionsLoading:g}=o.form;return{summary:[{key:"isValid",value:d.value},{key:"isDirty",value:m.value},{key:"isSubmitting",value:f.value}],values:Object.entries(r.value).map(([t,i])=>({key:t,value:i})),errors:Object.entries(e.value).filter(([,t])=>t.length>0).map(([t,i])=>({key:t,value:i})),touched:Object.entries(s.value).filter(([,t])=>t).map(([t,i])=>({key:t,value:i})),optionsLoading:Object.entries(g.value).filter(([,t])=>t).map(([t,i])=>({key:t,value:i}))}}function h(o){typeof window>"u"||v.setupDevtoolsPlugin({id:"vue-form-schema",label:"vue-form-schema",packageName:"@macrulez/vue-form-schema",homepage:"https://github.com/macrulezru/vue-form-schema",componentStateTypes:["vue-form-schema"],app:o},r=>{r.addInspector({id:l,label:"Forms",icon:"dynamic_form",treeFilterPlaceholder:"Search active forms",nodeActions:[{icon:"content_copy",tooltip:"Log snapshot to console",action:e=>{const s=n.getRegisteredForm(Number(e));s&&console.log(`[vue-form-schema] ${a(s)}`,u(s))}}]}),r.addTimelineLayer({id:c,label:"Forms",color:2450411}),r.on.getInspectorTree(e=>{e.inspectorId===l&&(e.rootNodes=n.getRegisteredForms().map(p))}),r.on.getInspectorState(e=>{if(e.inspectorId!==l)return;const s=n.getRegisteredForm(Number(e.nodeId));s&&(e.state=u(s))}),n.onFormEvent(e=>{const s=n.getRegisteredForm(e.formId);r.addTimelineEvent({layerId:c,event:{time:e.time,title:e.type,subtitle:s?a(s):`#${e.formId}`,data:e.payload??{},logType:b[e.type]}}),r.sendInspectorTree(l),r.sendInspectorState(l)})})}exports.installFormDevtools=h;
@@ -0,0 +1,6 @@
1
+ import { App } from 'vue';
2
+
3
+ /** Installs the DevTools inspector + timeline for this Vue app. Safe to call multiple times or during SSR (no-ops without a browser). */
4
+ export declare function installFormDevtools(app: App): void;
5
+
6
+ export { }
@@ -0,0 +1,93 @@
1
+ import { setupDevtoolsPlugin as v } from "@vue/devtools-api";
2
+ import { g as a, a as b, o as g } from "./formRegistry-Bv1eaWQ-.js";
3
+ const n = "vue-form-schema-inspector", c = "vue-form-schema-timeline", h = {
4
+ setField: "default",
5
+ touch: "default",
6
+ submit: "default",
7
+ submitSuccess: "default",
8
+ submitError: "error",
9
+ reset: "warning",
10
+ asyncValidate: "default"
11
+ };
12
+ function l(o) {
13
+ return `${o.label} #${o.id}`;
14
+ }
15
+ function y(o) {
16
+ const r = Object.values(o.form.errors.value).some((e) => e.length > 0);
17
+ return {
18
+ id: String(o.id),
19
+ label: l(o),
20
+ tags: r ? [{ label: "invalid", textColor: 16777215, backgroundColor: 14427686 }] : o.form.isDirty.value ? [{ label: "dirty", textColor: 1120295, backgroundColor: 16498468 }] : []
21
+ };
22
+ }
23
+ function m(o) {
24
+ const { values: r, errors: e, touched: s, isDirty: u, isValid: d, isSubmitting: f, optionsLoading: p } = o.form;
25
+ return {
26
+ summary: [
27
+ { key: "isValid", value: d.value },
28
+ { key: "isDirty", value: u.value },
29
+ { key: "isSubmitting", value: f.value }
30
+ ],
31
+ values: Object.entries(r.value).map(([t, i]) => ({
32
+ key: t,
33
+ value: i
34
+ })),
35
+ errors: Object.entries(e.value).filter(([, t]) => t.length > 0).map(([t, i]) => ({ key: t, value: i })),
36
+ touched: Object.entries(s.value).filter(([, t]) => t).map(([t, i]) => ({ key: t, value: i })),
37
+ optionsLoading: Object.entries(p.value).filter(([, t]) => t).map(([t, i]) => ({ key: t, value: i }))
38
+ };
39
+ }
40
+ function S(o) {
41
+ typeof window > "u" || v(
42
+ {
43
+ id: "vue-form-schema",
44
+ label: "vue-form-schema",
45
+ packageName: "@macrulez/vue-form-schema",
46
+ homepage: "https://github.com/macrulezru/vue-form-schema",
47
+ componentStateTypes: ["vue-form-schema"],
48
+ app: o
49
+ },
50
+ (r) => {
51
+ r.addInspector({
52
+ id: n,
53
+ label: "Forms",
54
+ icon: "dynamic_form",
55
+ treeFilterPlaceholder: "Search active forms",
56
+ nodeActions: [
57
+ {
58
+ icon: "content_copy",
59
+ tooltip: "Log snapshot to console",
60
+ action: (e) => {
61
+ const s = a(Number(e));
62
+ s && console.log(
63
+ `[vue-form-schema] ${l(s)}`,
64
+ m(s)
65
+ );
66
+ }
67
+ }
68
+ ]
69
+ }), r.addTimelineLayer({ id: c, label: "Forms", color: 2450411 }), r.on.getInspectorTree((e) => {
70
+ e.inspectorId === n && (e.rootNodes = b().map(y));
71
+ }), r.on.getInspectorState((e) => {
72
+ if (e.inspectorId !== n) return;
73
+ const s = a(Number(e.nodeId));
74
+ s && (e.state = m(s));
75
+ }), g((e) => {
76
+ const s = a(e.formId);
77
+ r.addTimelineEvent({
78
+ layerId: c,
79
+ event: {
80
+ time: e.time,
81
+ title: e.type,
82
+ subtitle: s ? l(s) : `#${e.formId}`,
83
+ data: e.payload ?? {},
84
+ logType: h[e.type]
85
+ }
86
+ }), r.sendInspectorTree(n), r.sendInspectorState(n);
87
+ });
88
+ }
89
+ );
90
+ }
91
+ export {
92
+ S as installFormDevtools
93
+ };
@@ -0,0 +1,31 @@
1
+ let a = 1;
2
+ const r = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set();
3
+ function u(e, o) {
4
+ const t = a++;
5
+ return r.set(t, { id: t, label: o, form: e, createdAt: Date.now() }), t;
6
+ }
7
+ function c(e) {
8
+ r.delete(e);
9
+ }
10
+ function f(e) {
11
+ return r.get(e);
12
+ }
13
+ function m() {
14
+ return Array.from(r.values());
15
+ }
16
+ function d(e, o, t) {
17
+ if (n.size === 0) return;
18
+ const s = { formId: e, type: o, payload: t, time: Date.now() };
19
+ for (const i of n) i(s);
20
+ }
21
+ function g(e) {
22
+ return n.add(e), () => n.delete(e);
23
+ }
24
+ export {
25
+ m as a,
26
+ d as e,
27
+ f as g,
28
+ g as o,
29
+ u as r,
30
+ c as u
31
+ };
@@ -0,0 +1 @@
1
+ "use strict";let m=1;const n=new Map,r=new Set;function u(e,o){const t=m++;return n.set(t,{id:t,label:o,form:e,createdAt:Date.now()}),t}function c(e){n.delete(e)}function g(e){return n.get(e)}function F(){return Array.from(n.values())}function d(e,o,t){if(r.size===0)return;const s={formId:e,type:o,payload:t,time:Date.now()};for(const i of r)i(s)}function f(e){return r.add(e),()=>r.delete(e)}exports.emitFormEvent=d;exports.getRegisteredForm=g;exports.getRegisteredForms=F;exports.onFormEvent=f;exports.registerForm=u;exports.unregisterForm=c;
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./MaskEngine-BwAs2Zb0.cjs"),l=require("vue");function G(n){const s=l.computed(()=>n.touched&&n.error.length>0),t=l.computed(()=>s.value?n.error[0]:null),e=l.computed(()=>n.touched?n.error:[]),i=l.computed(()=>n.field.required??!1),m=l.computed(()=>typeof n.field.disabled=="boolean"?n.field.disabled:!1);return{hasError:s,errorMessage:t,allErrors:e,isRequired:i,isDisabled:m}}const Q=/^[\w\s\d.'"[\]()!<>=&|?:+\-*/%]+$/;function Y(n,s){if(!Q.test(n))return console.warn(`[vue-form-schema] Blocked unsafe expression: "${n}"`),!0;try{return!!new Function("values",`"use strict"; return (${n})`)(s)}catch{return!0}}class N{constructor(){this.stopHandle=null}start(s,t,e,i){this.stopHandle=l.watchEffect(()=>{const m=t.value,f=e.value,d=this.evaluateFields(s,m);i&&this.clearHiddenValues(s,d,m,t,f),e.value=d})}stop(){var s;(s=this.stopHandle)==null||s.call(this),this.stopHandle=null}evaluateFields(s,t){return s.map(e=>{const i=this.resolveBoolean(e.visible,t,!0),m=this.resolveBoolean(e.disabled,t,!1);let f;if(typeof e.options=="function"){const p=e.options(t);f=p instanceof Promise?void 0:p}else f=e.options;return{...e,visible:i,disabled:m,options:f,fields:e.fields?this.evaluateFields(e.fields,t):void 0}})}resolveBoolean(s,t,e){return s===void 0?e:typeof s=="boolean"?s:typeof s=="function"?s(t):typeof s=="string"?Y(s,t):e}clearHiddenValues(s,t,e,i,m){for(let f=0;f<s.length;f++){const d=s[f],p=t[f],O=this.wasVisible(m,d.name),h=p.visible;if(O&&!h){const y=r.getByPath(e,d.name),F=d.defaultValue??null;y!==F&&(i.value=r.setByPath(i.value,d.name,F))}d.fields&&p.fields&&this.clearHiddenValues(d.fields,p.fields,e,i,m)}}wasVisible(s,t){const e=s.find(i=>i.name===t);return e?e.visible!==!1:!0}}function Z(n,s){return new N().evaluateFields(n,s)}function ee(n,s,t){switch(n){case"required":return t?(e,i)=>r.required(e)?t:null:r.required;case"minLength":return r.minLength(Number(s),t);case"maxLength":return r.maxLength(Number(s),t);case"min":return r.min(Number(s),t);case"max":return r.max(Number(s),t);case"pattern":return r.pattern(new RegExp(String(s)),t);case"email":return t?(e,i)=>r.email(e)?t:null:r.email;case"url":return t?(e,i)=>r.url(e)?t:null:r.url;default:return console.warn(`[vue-form-schema] Unknown validator rule: "${n}"`),null}}function D(n){const s=[];for(const t of n.validators??[]){const e=ee(t.rule,t.value,t.message);e&&s.push(e)}return{type:n.type,name:n.name,label:n.label,placeholder:n.placeholder,defaultValue:n.default,required:n.required,disabled:n.disabled,visible:n.visible,mask:n.mask,options:n.options,validators:s.length?s:void 0,fields:n.fields?n.fields.map(D):void 0}}function H(n){return n.map(D)}function te(n){if(!Array.isArray(n)||n.length===0)return!1;for(const s of n){const t=s.validators;if(Array.isArray(t)&&t.some(e=>typeof e=="function"))return!1}return n.some(s=>{const t=s;if("default"in t)return!0;const e=t.validators;return Array.isArray(e)&&e.length>0&&typeof e[0]=="object"&&e[0]!==null&&"rule"in e[0]})}function ne(n){return te(n)?H(n):n}function V(n,s={}){const t={};for(const e of n)if(e.type==="group"&&e.fields){const i=V(e.fields,s);Object.assign(t,i)}else if(e.type==="array"){const i=r.getByPath(s,e.name);t[e.name]=i??e.defaultValue??[]}else{const i=r.getByPath(s,e.name);t[e.name]=i!==void 0?i:e.defaultValue??null}for(const[e,i]of Object.entries(s))e in t||(t[e]=i);return t}function R(n){var j;const{schema:s,initialValues:t={},validateOn:e="blur",validateMode:i="first",clearOnHide:m=!1,onSubmit:f,persist:d=!1,persistKey:p,debug:O=!1}=n,h=ne(s),y=new r.ValidationEngine(300,i),F=new N,w=p??`vfs:${h.map(a=>a.name).join(",")}`;function E(){return typeof window>"u"||!d?null:d==="local"?window.localStorage:window.sessionStorage}const o=l.ref(V(h,t)),v=l.ref({}),b=l.ref({}),P=l.ref(!1),g=l.ref(h),S=l.ref({}),B=l.ref({}),x=new Set;let k=!1;F.start(h,o,g,m??!1);async function M(a){if(typeof a.options!="function")return;const u=a.options(o.value);if(u instanceof Promise){S.value={...S.value,[a.name]:!0};try{const c=await u;B.value={...B.value,[a.name]:c}}catch(c){console.warn(`[vue-form-schema] Failed to load options for "${a.name}"`,c)}finally{S.value={...S.value,[a.name]:!1}}}}const q=h.filter(a=>typeof a.options=="function");l.onMounted(async()=>{const a=E();if(a)try{const u=a.getItem(w);if(u){const c=JSON.parse(u);o.value={...o.value,...c}}}catch{}await Promise.all(q.map(u=>M(u)))}),d&&l.watch(o,a=>{var u;if(!k)try{(u=E())==null||u.setItem(w,JSON.stringify(a))}catch{}},{deep:!0});for(const a of q)(j=a.optionsDeps)!=null&&j.length&&l.watch(()=>a.optionsDeps.map(u=>r.getByPath(o.value,u)),()=>M(a));O&&l.watch(o,a=>{console.group("[vue-form-schema] values changed"),console.log("values:",JSON.parse(JSON.stringify(a))),console.log("errors:",v.value),console.log("touched:",b.value),console.groupEnd()},{deep:!0});const T=l.computed(()=>g.value.map(a=>({...a,options:B.value[a.name]??a.options,optionsLoading:S.value[a.name]??!1}))),I=l.computed(()=>{const a=V(h,t);return JSON.stringify(o.value)!==JSON.stringify(a)}),K=l.computed(()=>{const a=y.validateAll(g.value,o.value);return Object.values(a).every(u=>u.length===0)});function J(a){if(a){const u=y.validateField(a,r.getByPath(o.value,a.name),o.value);v.value={...v.value,[a.name]:u},y.validateAsync(a,r.getByPath(o.value,a.name),o.value,(c,A)=>{v.value={...v.value,[c]:[...v.value[c]??[],...A]}})}else v.value=y.validateAll(g.value,o.value)}function U(a,u){const c=L(g.value,a),A=c!=null&&c.transform?c.transform(u,o.value):u;o.value=r.setByPath(o.value,a,A),(e==="input"||e==="eager"&&x.has(a))&&c&&J(c)}function W(a){return r.getByPath(o.value,a)}function X(a){if(b.value={...b.value,[a]:!0},x.add(a),e==="blur"||e==="eager"){const u=L(g.value,a);u&&J(u)}}async function _(){const a={};for(const c of g.value)$(c,a);if(b.value=a,v.value=y.validateAll(g.value,o.value),!Object.values(v.value).some(c=>c.length>0)){P.value=!0;try{const c=C(g.value,o.value);await(f==null?void 0:f(c))}finally{P.value=!1}}}function z(a){var c;const u=a??t;o.value=V(h,u??{}),v.value={},b.value={},P.value=!1,k=!0,(c=E())==null||c.removeItem(w),Promise.resolve().then(()=>{k=!1})}return l.onUnmounted(()=>{F.stop(),y.destroy()}),{fields:T,values:o,errors:v,touched:b,optionsLoading:S,isDirty:I,isValid:K,isSubmitting:P,submit:_,reset:z,setField:U,getField:W,touchField:X}}function L(n,s){for(const t of n){if(t.name===s)return t;if(t.fields){const e=L(t.fields,s);if(e)return e}}}function $(n,s={}){return s[n.name]=!0,n.fields&&n.fields.forEach(t=>$(t,s)),s}function C(n,s){const t={...s};for(const e of n){if(e.parse){const i=r.getByPath(t,e.name);t[e.name]=e.parse(i)}if(e.fields){const i=C(e.fields,t);Object.assign(t,i)}}return t}function se(n,s){const t=n.map(o=>R(o)),e=l.ref(0),i=t.length,m=l.computed(()=>e.value===0),f=l.computed(()=>e.value===i-1),d=l.computed(()=>t[e.value]),p=l.computed(()=>t.reduce((o,v)=>({...o,...v.values.value}),{})),O=l.computed(()=>t.every(o=>o.isValid.value)),h=l.computed(()=>t.some(o=>o.isSubmitting.value));async function y(){return await t[e.value].submit(),Object.values(t[e.value].errors.value).some(v=>v.length>0)?!1:(f.value||e.value++,!0)}function F(){m.value||e.value--}function w(o){o>=0&&o<i&&(e.value=o)}async function E(){for(const o of t)if(await o.submit(),Object.values(o.errors.value).some(b=>b.length>0))return;await(s==null?void 0:s(p.value))}return{currentStep:e,totalSteps:i,isFirstStep:m,isLastStep:f,form:d,steps:t,values:p,isValid:O,isSubmitting:h,next:y,back:F,goTo:w,submit:E}}function ae(n){return{snapshot:l.computed(()=>({values:JSON.parse(JSON.stringify(n.values.value)),errors:n.errors.value,touched:n.touched.value,isDirty:n.isDirty.value,isValid:n.isValid.value,isSubmitting:n.isSubmitting.value,optionsLoading:n.optionsLoading.value,fields:n.fields.value.map(t=>({name:t.name,visible:t.visible,disabled:t.disabled}))}))}}function re(...n){const s=new Map;for(const t of n)for(const e of t)s.set(e.name,e);return Array.from(s.values())}function oe(n,s){const t=new Set(s);return n.filter(e=>!t.has(e.name))}function ie(n,s){const t=new Set(s);return n.filter(e=>t.has(e.name))}function le(n,s,t){return n.map(e=>e.name===s?{...e,...t}:e)}function ue(n){return n}exports.ValidationEngine=r.ValidationEngine;exports.applyMask=r.applyMask;exports.bindMask=r.bindMask;exports.createFormRegistry=r.createFormRegistry;exports.email=r.email;exports.getByPath=r.getByPath;exports.max=r.max;exports.maxLength=r.maxLength;exports.min=r.min;exports.minLength=r.minLength;exports.pattern=r.pattern;exports.provideRegistry=r.provideRegistry;exports.removeMask=r.removeMask;exports.required=r.required;exports.sameAs=r.sameAs;exports.setByPath=r.setByPath;exports.url=r.url;exports.useFieldArray=r.useFieldArray;exports.useRegistry=r.useRegistry;exports.ConditionEvaluator=N;exports.defineSchema=ue;exports.evaluateFieldConditions=Z;exports.extendField=le;exports.mergeSchemas=re;exports.omitFields=oe;exports.parseJSON=H;exports.pickFields=ie;exports.useForm=R;exports.useFormDebug=ae;exports.useFormField=G;exports.useMultiStepForm=se;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("./MaskEngine-CPr-fSPy.cjs"),a=require("vue"),s=require("./ValidationEngine-Diz-qTFs.cjs"),k=require("./schemaUtils-Cc7CwGXB.cjs"),S=require("./formRegistry-DaDmXyYY.cjs");function ce(e){const r=a.computed(()=>e.touched&&e.error.length>0),t=a.computed(()=>r.value?e.error[0]:null),n=a.computed(()=>e.touched?e.error:[]),i=a.computed(()=>e.field.required??!1),d=a.computed(()=>typeof e.field.disabled=="boolean"?e.field.disabled:!1);return{hasError:r,errorMessage:t,allErrors:n,isRequired:i,isDisabled:d}}function fe(e,r,t){switch(e){case"required":return t?(n,i)=>s.required(n)?t:null:s.required;case"minLength":return s.minLength(Number(r),t);case"maxLength":return s.maxLength(Number(r),t);case"min":return s.min(Number(r),t);case"max":return s.max(Number(r),t);case"pattern":return s.pattern(new RegExp(String(r)),t);case"email":return t?(n,i)=>s.email(n)?t:null:s.email;case"url":return t?(n,i)=>s.url(n)?t:null:s.url;default:return console.warn(`[vue-form-schema] Unknown validator rule: "${e}"`),null}}function G(e){const r=[];for(const t of e.validators??[]){const n=fe(t.rule,t.value,t.message);n&&r.push(n)}return{type:e.type,name:e.name,label:e.label,placeholder:e.placeholder,defaultValue:e.default,required:e.required,disabled:e.disabled,visible:e.visible,mask:e.mask,options:e.options,validators:r.length?r:void 0,fields:e.fields?e.fields.map(G):void 0}}function Q(e){return e.map(G)}function de(e){if(!Array.isArray(e)||e.length===0)return!1;for(const r of e){const t=r.validators;if(Array.isArray(t)&&t.some(n=>typeof n=="function"))return!1}return e.some(r=>{const t=r;if("default"in t)return!0;const n=t.validators;return Array.isArray(n)&&n.length>0&&typeof n[0]=="object"&&n[0]!==null&&"rule"in n[0]})}function ve(e){return de(e)?Q(e):e}function N(e,r={}){let t={};for(const n of e)if(n.type==="group"&&n.fields){const i=N(n.fields,r);for(const[d,v]of Object.entries(i))t=s.setByPath(t,d,v)}else if(n.type==="array"){const i=s.getByPath(r,n.name),d=typeof n.defaultValue=="function"?void 0:n.defaultValue;t=s.setByPath(t,n.name,i??d??[])}else if(typeof n.defaultValue!="function"){const i=s.getByPath(r,n.name);t=s.setByPath(t,n.name,i!==void 0?i:n.defaultValue??null)}for(const n of e)if(n.type!=="group"&&typeof n.defaultValue=="function"){const i=s.getByPath(r,n.name);t=s.setByPath(t,n.name,i===void 0?n.defaultValue(t):i)}for(const[n,i]of Object.entries(r))n in t||(t=s.setByPath(t,n,i));return t}function W(e){var U,H;const{schema:r,initialValues:t={},validateOn:n="blur",validateMode:i="first",clearOnHide:d=!1,onSubmit:v,persist:m=!1,persistKey:y,debug:b=!1}=e,F=(U=a.getCurrentInstance())==null?void 0:U.type,j=(F==null?void 0:F.__name)??(F==null?void 0:F.name),O=ve(r),A=new s.ValidationEngine(300,i),L=new k.ConditionEvaluator;let l=0;const P=y??`vfs:${O.map(o=>o.name).join(",")}`;function q(){return typeof window>"u"||!m?null:m==="local"?window.localStorage:window.sessionStorage}const c=a.ref(N(O,t)),g=a.ref({}),B=a.ref({}),M=a.ref(!1),E=a.ref(O),x=a.ref({}),D=a.ref({}),I=new Set;let J=!1;L.start(O,c,E,d??!1);async function T(o){if(typeof o.options!="function")return;const u=o.options(c.value);if(u instanceof Promise){x.value={...x.value,[o.name]:!0};try{const f=await u;D.value={...D.value,[o.name]:f}}catch(f){console.warn(`[vue-form-schema] Failed to load options for "${o.name}"`,f)}finally{x.value={...x.value,[o.name]:!1}}}}const $=O.filter(o=>typeof o.options=="function");a.onMounted(async()=>{const o=q();if(o)try{const u=o.getItem(P);if(u){const f=JSON.parse(u);c.value={...c.value,...f}}}catch{}await Promise.all($.map(u=>T(u)))}),m&&a.watch(c,o=>{var u;if(!J)try{(u=q())==null||u.setItem(P,JSON.stringify(o))}catch{}},{deep:!0});for(const o of $)(H=o.optionsDeps)!=null&&H.length&&a.watch(()=>o.optionsDeps.map(u=>s.getByPath(c.value,u)),()=>T(o));b&&a.watch(c,o=>{console.group("[vue-form-schema] values changed"),console.log("values:",JSON.parse(JSON.stringify(o))),console.log("errors:",g.value),console.log("touched:",B.value),console.groupEnd()},{deep:!0});const ee=a.computed(()=>E.value.map(o=>({...o,options:D.value[o.name]??o.options,optionsLoading:x.value[o.name]??!1}))),te=N(O,t),ne=a.computed(()=>!C(c.value,te)),re=a.computed(()=>{const o=A.validateAll(E.value,c.value),u=Object.values(o).every(p=>p.length===0),f=Object.values(g.value).every(p=>p.length===0);return u&&f});function K(o){if(o){const u=A.validateField(o,s.getByPath(c.value,o.name),c.value);g.value={...g.value,[o.name]:u},A.validateAsync(o,s.getByPath(c.value,o.name),c.value,(f,p)=>{g.value={...g.value,[f]:[...g.value[f]??[],...p]},S.emitFormEvent(l,"asyncValidate",{path:f,errors:p})})}else g.value=A.validateAll(E.value,c.value)}function oe(o,u){const f=z(E.value,o),p=f!=null&&f.transform?f.transform(u,c.value):u;c.value=s.setByPath(c.value,o,p),S.emitFormEvent(l,"setField",{path:o,value:p}),(n==="input"||n==="eager"&&I.has(o))&&f&&K(f)}function se(o){return s.getByPath(c.value,o)}function ie(o){if(B.value={...B.value,[o]:!0},I.add(o),S.emitFormEvent(l,"touch",{path:o}),n==="blur"||n==="eager"){const u=z(E.value,o);u&&K(u)}}async function ae(){S.emitFormEvent(l,"submit");const o={};for(const h of E.value)X(h,o);B.value=o;const u=A.validateAll(E.value,c.value),f=await A.validateAllAsync(E.value,c.value),p={...u};for(const[h,ue]of Object.entries(f))p[h]=[...p[h]??[],...ue];if(g.value=p,Object.values(g.value).some(h=>h.length>0)){S.emitFormEvent(l,"submitError",{reason:"validation",errors:g.value});return}M.value=!0;try{const h=Y(E.value,c.value);await(v==null?void 0:v(h)),S.emitFormEvent(l,"submitSuccess")}catch(h){throw S.emitFormEvent(l,"submitError",{reason:"exception",error:h instanceof Error?h.message:String(h)}),h}finally{M.value=!1}}function le(o){var f;const u=o??t;c.value=N(O,u??{}),g.value={},B.value={},M.value=!1,J=!0,(f=q())==null||f.removeItem(P),Promise.resolve().then(()=>{J=!1}),S.emitFormEvent(l,"reset")}a.onUnmounted(()=>{L.stop(),A.destroy(),S.unregisterForm(l)});const _={fields:ee,values:c,errors:g,touched:B,optionsLoading:x,isDirty:ne,isValid:re,isSubmitting:M,submit:ae,reset:le,setField:oe,getField:se,touchField:ie};return l=S.registerForm(_,j??"Form"),_}function z(e,r){for(const t of e){if(t.name===r)return t;if(t.fields){const n=z(t.fields,r);if(n)return n}}}function X(e,r={}){return r[e.name]=!0,e.fields&&e.fields.forEach(t=>X(t,r)),r}function C(e,r){if(e===r)return!0;if(e instanceof File||r instanceof File)return e===r;if(Array.isArray(e)&&Array.isArray(r))return e.length===r.length&&e.every((t,n)=>C(t,r[n]));if(e&&r&&typeof e=="object"&&typeof r=="object"){const t=Object.keys(e),n=Object.keys(r);return t.length===n.length&&t.every(i=>C(e[i],r[i]))}return!1}function Y(e,r){const t={...r};for(const n of e){if(n.parse){const i=s.getByPath(t,n.name);t[n.name]=n.parse(i)}if(n.fields){const i=Y(n.fields,t);Object.assign(t,i)}}return t}function me(e,r){const t=e.map(l=>W(l)),n=a.ref(0),i=t.length,d=a.computed(()=>n.value===0),v=a.computed(()=>n.value===i-1),m=a.computed(()=>t[n.value]),y=a.computed(()=>t.reduce((l,P)=>({...l,...P.values.value}),{})),b=a.computed(()=>t.every(l=>l.isValid.value)),F=a.computed(()=>t.some(l=>l.isSubmitting.value));async function j(){return await t[n.value].submit(),Object.values(t[n.value].errors.value).some(P=>P.length>0)?!1:(v.value||n.value++,!0)}function O(){d.value||n.value--}function A(l){l>=0&&l<i&&(n.value=l)}async function L(){for(const l of t)if(await l.submit(),Object.values(l.errors.value).some(q=>q.length>0))return;await(r==null?void 0:r(y.value))}return{currentStep:n,totalSteps:i,isFirstStep:d,isLastStep:v,form:m,steps:t,values:y,isValid:b,isSubmitting:F,next:j,back:O,goTo:A,submit:L}}function ye(e){return{snapshot:a.computed(()=>({values:JSON.parse(JSON.stringify(e.values.value)),errors:e.errors.value,touched:e.touched.value,isDirty:e.isDirty.value,isValid:e.isValid.value,isSubmitting:e.isSubmitting.value,optionsLoading:e.optionsLoading.value,fields:e.fields.value.map(t=>({name:t.name,visible:t.visible,disabled:t.disabled}))}))}}function w(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:void 0}function R(e){return Array.isArray(e)?e.filter(r=>typeof r=="string"):typeof e=="string"?[e]:[]}function ge(e){const r=w(e),t=w(r==null?void 0:r.errors)??{},n={};for(const[i,d]of Object.entries(t))n[i]=R(d);return{fieldErrors:n,formErrors:[]}}function pe(e){const r={},t=[];function n(d,v){for(const[m,y]of Object.entries(d)){if(m==="non_field_errors"||m==="detail"){t.push(...R(y));continue}const b=v?`${v}.${m}`:m,F=w(y);if(F)n(F,b);else{const j=R(y);j.length&&(r[b]=j)}}}const i=w(e);return i&&n(i,""),{fieldErrors:r,formErrors:t}}function he(e){const r=w(e)??{},t={};for(const[n,i]of Object.entries(r)){const d=R(i);d.length&&(t[n]=d)}return{fieldErrors:t,formErrors:[]}}const Fe={laravel:ge,drf:pe,flat:he};function Z(e,r="flat"){return typeof r=="function"?r(e):Fe[r](e)}function be(e,r,t={}){const{format:n="flat",touch:i=!0,merge:d=!0}=t,v=Z(r,n),m=d?{...e.errors.value}:{};for(const[y,b]of Object.entries(v.fieldErrors))m[y]=b;if(e.errors.value=m,i){const y={...e.touched.value};for(const b of Object.keys(v.fieldErrors))y[b]=!0;e.touched.value=y}return v}function Ee(e){return e}exports.applyMask=V.applyMask;exports.bindMask=V.bindMask;exports.createFormRegistry=V.createFormRegistry;exports.provideRegistry=V.provideRegistry;exports.removeMask=V.removeMask;exports.useFieldArray=V.useFieldArray;exports.useRegistry=V.useRegistry;exports.ValidationEngine=s.ValidationEngine;exports.email=s.email;exports.fileCount=s.fileCount;exports.fileSize=s.fileSize;exports.fileType=s.fileType;exports.getByPath=s.getByPath;exports.max=s.max;exports.maxLength=s.maxLength;exports.min=s.min;exports.minLength=s.minLength;exports.pattern=s.pattern;exports.required=s.required;exports.sameAs=s.sameAs;exports.setByPath=s.setByPath;exports.url=s.url;exports.ConditionEvaluator=k.ConditionEvaluator;exports.discriminatedFields=k.discriminatedFields;exports.evaluateFieldConditions=k.evaluateFieldConditions;exports.extendField=k.extendField;exports.mergeSchemas=k.mergeSchemas;exports.omitFields=k.omitFields;exports.pickFields=k.pickFields;exports.applyServerErrors=be;exports.defineSchema=Ee;exports.normalizeServerErrors=Z;exports.parseJSON=Q;exports.useForm=W;exports.useFormDebug=ye;exports.useFormField=ce;exports.useMultiStepForm=me;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export type { FieldDefinition, FieldType, FieldOption, MaskConfig, MaskPreset, ValidatorFn, AsyncValidatorFn, UseFormConfig, UseFormReturn, ValidateOn, ValidateMode, JSONSchema, JSONSchemaField, BuiltinRule, FormFieldProps, } from './core/types';
1
+ export type { FieldDefinition, FieldType, FieldOption, MaskConfig, MaskPreset, ValidatorFn, AsyncValidatorFn, UseFormConfig, UseFormReturn, TypedFieldDefinitions, ValidateOn, ValidateMode, JSONSchema, JSONSchemaField, BuiltinRule, FormFieldProps, } from './core/types';
2
2
  export { createFormRegistry, useRegistry, provideRegistry } from './core/registry';
3
3
  export type { ComponentMap } from './core/registry';
4
4
  export { useFormField } from './core/useFormField';
@@ -9,8 +9,10 @@ export type { MultiStepFormReturn } from './core/useMultiStepForm';
9
9
  export { useFormDebug } from './core/useFormDebug';
10
10
  export type { FormSnapshot } from './core/useFormDebug';
11
11
  export { useForm } from './core/useForm';
12
- export { required, minLength, maxLength, min, max, pattern, email, url, sameAs, ValidationEngine, getByPath, setByPath, } from './core/ValidationEngine';
13
- export { mergeSchemas, omitFields, pickFields, extendField } from './core/schemaUtils';
12
+ export { required, minLength, maxLength, min, max, pattern, email, url, sameAs, fileType, fileSize, fileCount, ValidationEngine, getByPath, setByPath, } from './core/ValidationEngine';
13
+ export { mergeSchemas, omitFields, pickFields, extendField, discriminatedFields, } from './core/schemaUtils';
14
+ export { applyServerErrors, normalizeServerErrors } from './core/serverErrors';
15
+ export type { NormalizedServerErrors, ServerErrorFormat, ServerErrorMapper, ApplyServerErrorsOptions, } from './core/serverErrors';
14
16
  export type { InferValues } from './core/inferTypes';
15
17
  export { defineSchema } from './core/inferTypes';
16
18
  export { ConditionEvaluator, evaluateFieldConditions } from './core/ConditionEvaluator';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,YAAY,EACV,eAAe,EACf,SAAS,EACT,WAAW,EACX,UAAU,EACV,UAAU,EACV,WAAW,EACX,gBAAg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