@appmax_npm/ds-prime 1.0.0-alpha.105 → 1.0.0-alpha.106

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.
package/amfield/index.js CHANGED
@@ -1,11 +1,11 @@
1
- import { defineComponent as m, createPropsRestProxy as d, useAttrs as i, openBlock as o, createBlock as s, unref as b, withCtx as t, createVNode as c, resolveDynamicComponent as u, mergeProps as f } from "vue";
2
- import { _ } from "../AmFieldWrapper.vue_vue_type_script_setup_true_lang-DO4K4-35.js";
3
- import h from "primevue/inputtext";
4
- import { FormField as y } from "@primevue/forms";
5
- const P = { name: "AmField" }, A = /* @__PURE__ */ m({
6
- ...P,
1
+ import { defineComponent as m, createPropsRestProxy as p, openBlock as o, createBlock as s, unref as d, withCtx as t, createVNode as i, resolveDynamicComponent as b, mergeProps as u } from "vue";
2
+ import { _ as c } from "../AmFieldWrapper.vue_vue_type_script_setup_true_lang-DO4K4-35.js";
3
+ import f from "primevue/inputtext";
4
+ import { FormField as _ } from "@primevue/forms";
5
+ const h = { name: "AmField" }, g = /* @__PURE__ */ m({
6
+ ...h,
7
7
  props: {
8
- as: { default: () => h },
8
+ as: { default: () => f },
9
9
  name: {},
10
10
  class: {},
11
11
  style: {},
@@ -14,21 +14,21 @@ const P = { name: "AmField" }, A = /* @__PURE__ */ m({
14
14
  disabled: { type: Boolean }
15
15
  },
16
16
  setup(n) {
17
- const a = d(n, ["as", "help", "label"]), p = { ...i(), ...a };
18
- return (e, B) => (o(), s(b(y), {
17
+ const a = p(n, ["as", "help", "label"]);
18
+ return (e, y) => (o(), s(d(_), {
19
19
  name: a.name
20
20
  }, {
21
21
  default: t((r) => {
22
22
  var l;
23
23
  return [
24
- c(_, {
24
+ i(c, {
25
25
  help: e.help,
26
26
  label: e.label,
27
27
  error: (l = r == null ? void 0 : r.error) == null ? void 0 : l.message,
28
28
  disabled: a.disabled
29
29
  }, {
30
30
  default: t(() => [
31
- (o(), s(u(e.as), f(p, { disabled: e.disabled }), null, 16, ["disabled"]))
31
+ (o(), s(b(e.as), u({ ...e.$attrs, ...a }, { disabled: e.disabled }), null, 16, ["disabled"]))
32
32
  ]),
33
33
  _: 2
34
34
  }, 1032, ["help", "label", "error", "disabled"])
@@ -39,5 +39,5 @@ const P = { name: "AmField" }, A = /* @__PURE__ */ m({
39
39
  }
40
40
  });
41
41
  export {
42
- A as default
42
+ g as default
43
43
  };
package/amform/index.d.ts CHANGED
@@ -4,7 +4,6 @@ import type { ZodObject } from 'zod';
4
4
 
5
5
  export interface AmFormProps {
6
6
  schema: ZodObject;
7
- debug?: boolean;
8
7
  modelValue?: Record<string, unknown>;
9
8
  }
10
9
 
package/amform/index.js CHANGED
@@ -1,42 +1,41 @@
1
- import { defineComponent as p, mergeModels as g, ref as n, useModel as V, computed as b, watch as d, nextTick as f, openBlock as h, createBlock as y, unref as c, withCtx as k, renderSlot as x, normalizeProps as R, guardReactiveProps as w } from "vue";
2
- import { Form as B } from "@primevue/forms";
3
- import { zodResolver as M } from "@primevue/forms/resolvers/zod";
4
- const _ = { name: "AmForm" }, F = /* @__PURE__ */ p({
5
- ..._,
6
- props: /* @__PURE__ */ g({
1
+ import { defineComponent as v, mergeModels as i, ref as m, useModel as p, computed as _, watch as n, openBlock as h, createBlock as V, unref as d, withCtx as R, renderSlot as g, normalizeProps as k, guardReactiveProps as M } from "vue";
2
+ import { Form as b } from "@primevue/forms";
3
+ import { zodResolver as j } from "@primevue/forms/resolvers/zod";
4
+ const w = { name: "AmForm" }, B = /* @__PURE__ */ v({
5
+ ...w,
6
+ props: /* @__PURE__ */ i({
7
7
  schema: {},
8
- debug: { type: Boolean },
9
8
  modelValue: {}
10
9
  }, {
11
10
  modelValue: { type: Object, default: () => ({}) },
12
11
  modelModifiers: {}
13
12
  }),
14
13
  emits: ["update:modelValue"],
15
- setup(l, { expose: m }) {
16
- const i = M(l.schema), t = n(), o = V(l, "modelValue"), a = n(!1), v = b(() => {
17
- var r;
18
- const e = (r = t.value) == null ? void 0 : r.states;
19
- return e ? Object.keys(e).reduce((u, s) => (u[s] = e[s].value, u), {}) : {};
14
+ setup(l) {
15
+ const f = j(l.schema), t = m(), o = p(l, "modelValue"), s = m(!1), c = _(() => {
16
+ var a;
17
+ const e = (a = t.value) == null ? void 0 : a.states;
18
+ return e ? Object.keys(e).reduce((r, u) => (r[u] = e[u].value, r), {}) : {};
20
19
  });
21
- return d(
20
+ return n(
22
21
  () => o.value,
23
- async (e) => {
24
- !t.value || a.value || (a.value = !0, t.value.setValues(e), l.debug && console.log("Values updated: down", e), await f(), a.value = !1);
22
+ (e) => {
23
+ t.value && (s.value = !0, t.value.setValues(e));
25
24
  }
26
- ), d(v, async (e) => {
27
- a.value || (a.value = !0, o.value = e, l.debug && console.log("Values updated: up", e), await f(), a.value = !1);
28
- }), m({ ...t.value, values: o }), (e, r) => (h(), y(c(B), {
25
+ ), n(c, (e) => {
26
+ s.value = !0, o.value = e;
27
+ }), (e, a) => (h(), V(d(b), {
29
28
  ref_key: "formRef",
30
29
  ref: t,
31
- resolver: c(i)
30
+ resolver: d(f)
32
31
  }, {
33
- default: k((u) => [
34
- x(e.$slots, "default", R(w({ ...u, values: o.value })))
32
+ default: R((r) => [
33
+ g(e.$slots, "default", k(M({ ...r, values: o.value })))
35
34
  ]),
36
35
  _: 3
37
36
  }, 8, ["resolver"]));
38
37
  }
39
38
  });
40
39
  export {
41
- F as default
40
+ B as default
42
41
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appmax_npm/ds-prime",
3
- "version": "1.0.0-alpha.105",
3
+ "version": "1.0.0-alpha.106",
4
4
  "description": "Design System da Appmax baseado no Primevue",
5
5
  "author": "Appmax",
6
6
  "exports": {