@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 +12 -12
- package/amform/index.d.ts +0 -1
- package/amform/index.js +21 -22
- package/package.json +1 -1
package/amfield/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as m, createPropsRestProxy as
|
|
2
|
-
import { _ } from "../AmFieldWrapper.vue_vue_type_script_setup_true_lang-DO4K4-35.js";
|
|
3
|
-
import
|
|
4
|
-
import { FormField as
|
|
5
|
-
const
|
|
6
|
-
...
|
|
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: () =>
|
|
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 =
|
|
18
|
-
return (e,
|
|
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(
|
|
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
|
-
|
|
42
|
+
g as default
|
|
43
43
|
};
|
package/amform/index.d.ts
CHANGED
package/amform/index.js
CHANGED
|
@@ -1,42 +1,41 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Form as
|
|
3
|
-
import { zodResolver as
|
|
4
|
-
const
|
|
5
|
-
...
|
|
6
|
-
props: /* @__PURE__ */
|
|
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
|
|
16
|
-
const
|
|
17
|
-
var
|
|
18
|
-
const e = (
|
|
19
|
-
return e ? Object.keys(e).reduce((
|
|
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
|
|
20
|
+
return n(
|
|
22
21
|
() => o.value,
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
(e) => {
|
|
23
|
+
t.value && (s.value = !0, t.value.setValues(e));
|
|
25
24
|
}
|
|
26
|
-
),
|
|
27
|
-
|
|
28
|
-
}),
|
|
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:
|
|
30
|
+
resolver: d(f)
|
|
32
31
|
}, {
|
|
33
|
-
default:
|
|
34
|
-
|
|
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
|
-
|
|
40
|
+
B as default
|
|
42
41
|
};
|