@appmax_npm/ds-prime 1.0.0-alpha.102 → 1.0.0-alpha.104

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 (2) hide show
  1. package/amform/index.js +32 -13
  2. package/package.json +1 -1
package/amform/index.js CHANGED
@@ -1,21 +1,40 @@
1
- import { defineComponent as m, openBlock as a, createBlock as n, unref as e, withCtx as l, renderSlot as c, normalizeProps as p, guardReactiveProps as f } from "vue";
2
- import { Form as u } from "@primevue/forms";
3
- import { zodResolver as d } from "@primevue/forms/resolvers/zod";
4
- const i = { name: "AmForm" }, x = /* @__PURE__ */ m({
5
- ...i,
6
- props: {
1
+ import { defineComponent as v, mergeModels as p, ref as n, useModel as _, computed as h, watch as f, nextTick as m, openBlock as k, createBlock as w, unref as c, withCtx as y, renderSlot as R, normalizeProps as V, guardReactiveProps as g } from "vue";
2
+ import { Form as x } from "@primevue/forms";
3
+ import { zodResolver as M } from "@primevue/forms/resolvers/zod";
4
+ const b = { name: "AmForm" }, C = /* @__PURE__ */ v({
5
+ ...b,
6
+ props: /* @__PURE__ */ p({
7
7
  schema: {}
8
- },
9
- setup(r) {
10
- const o = d(r.schema);
11
- return (t, _) => (a(), n(e(u), { resolver: e(o) }, {
12
- default: l((s) => [
13
- c(t.$slots, "default", p(f(s)))
8
+ }, {
9
+ modelValue: { type: Object, default: () => ({}) },
10
+ modelModifiers: {}
11
+ }),
12
+ emits: ["update:modelValue"],
13
+ setup(s) {
14
+ const d = M(s.schema), r = n(), l = _(s, "modelValue"), t = n(!1), i = h(() => {
15
+ var o;
16
+ const e = (o = r.value) == null ? void 0 : o.states;
17
+ return e ? Object.keys(e).reduce((a, u) => (a[u] = e[u].value, a), {}) : {};
18
+ });
19
+ return f(
20
+ () => l.value,
21
+ async (e) => {
22
+ !r.value || t.value || (t.value = !0, r.value.setValues(e), await m(), t.value = !1);
23
+ }
24
+ ), f(i, async (e) => {
25
+ t.value || (t.value = !0, l.value = e, await m(), t.value = !1);
26
+ }), (e, o) => (k(), w(c(x), {
27
+ ref_key: "formRef",
28
+ ref: r,
29
+ resolver: c(d)
30
+ }, {
31
+ default: y((a) => [
32
+ R(e.$slots, "default", V(g(a)))
14
33
  ]),
15
34
  _: 3
16
35
  }, 8, ["resolver"]));
17
36
  }
18
37
  });
19
38
  export {
20
- x as default
39
+ C as default
21
40
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appmax_npm/ds-prime",
3
- "version": "1.0.0-alpha.102",
3
+ "version": "1.0.0-alpha.104",
4
4
  "description": "Design System da Appmax baseado no Primevue",
5
5
  "author": "Appmax",
6
6
  "exports": {