@quickflo/quickforms-vue 1.15.0 → 1.16.1

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 +1 @@
1
- {"version":3,"file":"DynamicForm.vue.d.ts","sourceRoot":"","sources":["../../src/components/DynamicForm.vue"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AA4RrD,iBAAS,cAAc;qBA4HO,GAAG;EAGhC;AAmBD,QAAA,MAAM,eAAe;gBAxJT,OAAO,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;;;kBAqK8I,IAAI;;;;;;;;;;;;;;eApapL,OAAO;gBAAU,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;;;gBA+P5D,OAAO,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;;;kBAqK8I,IAAI;;;;;;;;;;;;;;eApapL,OAAO;gBAAU,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;;;aAd5D,WAAW,CAAC,GAAG,CAAC;wBACL,OAAO;4EA8a5B,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAUxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
1
+ {"version":3,"file":"DynamicForm.vue.d.ts","sourceRoot":"","sources":["../../src/components/DynamicForm.vue"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAqSrD,iBAAS,cAAc;qBA4HO,GAAG;EAGhC;AAmBD,QAAA,MAAM,eAAe;gBAxJT,OAAO,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;;;kBAqK8I,IAAI;;;;;;;;;;;;;;eA7apL,OAAO;gBAAU,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;;;gBAwQ5D,OAAO,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;;;kBAqK8I,IAAI;;;;;;;;;;;;;;eA7apL,OAAO;gBAAU,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;;;aAd5D,WAAW,CAAC,GAAG,CAAC;wBACL,OAAO;4EAub5B,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAUxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useFormField.d.ts","sourceRoot":"","sources":["../../src/composables/useFormField.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAkDvD;;GAEG;AACH,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,UAAU,EAClB,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAO;;;;;;;;;;;EAsWjC"}
1
+ {"version":3,"file":"useFormField.d.ts","sourceRoot":"","sources":["../../src/composables/useFormField.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAkDvD;;GAEG;AACH,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,UAAU,EAClB,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAO;;;;;;;;;;;EA2WjC"}
package/dist/index.js CHANGED
@@ -5034,43 +5034,45 @@ function xt(n, e, t = {}) {
5034
5034
  if (P && typeof P != "boolean")
5035
5035
  for (let U = 0; U < D.length; U++) {
5036
5036
  const N = D[U];
5037
- if (P.type === "string" && typeof N == "string") {
5038
- if (P.format === "email" && !Ih(N))
5039
- return a(
5040
- "items.format",
5041
- `Item "${N}" is not a valid email address`
5042
- );
5043
- if ((P.format === "url" || P.format === "uri") && !Nh(N))
5044
- return a(
5045
- "items.format",
5046
- `Item "${N}" is not a valid URL`
5047
- );
5048
- if (P.minLength !== void 0 && N.length < P.minLength)
5049
- return a(
5050
- "items.minLength",
5051
- `Item "${N}" must be at least ${P.minLength} characters`
5052
- );
5053
- if (P.maxLength !== void 0 && N.length > P.maxLength)
5037
+ if (!(typeof N == "string" && /\{\{.*?\}\}/.test(N))) {
5038
+ if (P.type === "string" && typeof N == "string") {
5039
+ if (P.format === "email" && !Ih(N))
5040
+ return a(
5041
+ "items.format",
5042
+ `Item "${N}" is not a valid email address`
5043
+ );
5044
+ if ((P.format === "url" || P.format === "uri") && !Nh(N))
5045
+ return a(
5046
+ "items.format",
5047
+ `Item "${N}" is not a valid URL`
5048
+ );
5049
+ if (P.minLength !== void 0 && N.length < P.minLength)
5050
+ return a(
5051
+ "items.minLength",
5052
+ `Item "${N}" must be at least ${P.minLength} characters`
5053
+ );
5054
+ if (P.maxLength !== void 0 && N.length > P.maxLength)
5055
+ return a(
5056
+ "items.maxLength",
5057
+ `Item "${N}" must be at most ${P.maxLength} characters`
5058
+ );
5059
+ if (P.pattern)
5060
+ try {
5061
+ if (!new RegExp(P.pattern).test(N))
5062
+ return a(
5063
+ "items.pattern",
5064
+ `Item "${N}" has invalid format`
5065
+ );
5066
+ } catch {
5067
+ console.warn("Invalid regex pattern:", P.pattern);
5068
+ }
5069
+ }
5070
+ if (P.enum && !P.enum.includes(N))
5054
5071
  return a(
5055
- "items.maxLength",
5056
- `Item "${N}" must be at most ${P.maxLength} characters`
5072
+ "items.enum",
5073
+ `Item "${N}" is not a valid option`
5057
5074
  );
5058
- if (P.pattern)
5059
- try {
5060
- if (!new RegExp(P.pattern).test(N))
5061
- return a(
5062
- "items.pattern",
5063
- `Item "${N}" has invalid format`
5064
- );
5065
- } catch {
5066
- console.warn("Invalid regex pattern:", P.pattern);
5067
- }
5068
5075
  }
5069
- if (P.enum && !P.enum.includes(N))
5070
- return a(
5071
- "items.enum",
5072
- `Item "${N}" is not a valid option`
5073
- );
5074
5076
  }
5075
5077
  }
5076
5078
  if (e.enum && !e.enum.includes(D))
@@ -24917,7 +24919,7 @@ const rn = "__root__", R2 = /* @__PURE__ */ it({
24917
24919
  setup(n, { expose: e, emit: t }) {
24918
24920
  var I, B, R, P, U;
24919
24921
  e();
24920
- const i = n, r = y0(n, "modelValue"), s = t, o = i.options.registry || D2(), l = ee(() => i.schema.type === "object" && !i.schema.properties), a = l.value ? {
24922
+ const i = n, r = y0(n, "modelValue"), s = t, o = i.options.registry || D2(), l = ee(() => i.schema["x-render"] ? !0 : i.schema.type === "object" && !i.schema.properties), a = l.value ? {
24921
24923
  [rn]: r.value && typeof r.value == "object" && Object.keys(r.value).length > 0 ? r.value : i.options.useDefaults !== !1 ? ni.getDefaultValue(i.schema) : {}
24922
24924
  } : i.options.useDefaults !== !1 ? { ...ni.getDefaultValue(i.schema), ...r.value } : { ...r.value }, { handleSubmit: c, values: h, setValues: f, setFieldValue: u, errors: d, meta: m } = S0({
24923
24925
  initialValues: a,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quickflo/quickforms-vue",
3
- "version": "1.15.0",
3
+ "version": "1.16.1",
4
4
  "description": "Vue 3 bindings for QuickForms - JSON Schema form generator",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -37,7 +37,7 @@
37
37
  "@codemirror/view": "^6.38.8",
38
38
  "vee-validate": "^4.12.0",
39
39
  "vue-codemirror": "^6.1.1",
40
- "@quickflo/quickforms": "1.15.0"
40
+ "@quickflo/quickforms": "1.16.1"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@types/node": "^20.0.0",