@aeria-ui/ui 0.0.127 → 0.0.129

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,6 +1,6 @@
1
1
  import { defineComponent as r, watch as n, openBlock as c, createBlock as l } from "vue";
2
2
  import { getGlobalStateManager as a, useStore as m } from "@aeria-ui/state-management";
3
- import { e as s } from "./index-e8ad8ca3.js";
3
+ import { e as s } from "./index-b59eefcb.js";
4
4
  import "@aeria-ui/i18n";
5
5
  import "@aeria-ui/core";
6
6
  import "@aeriajs/common";
@@ -1,7 +1,7 @@
1
- import { defineComponent as $, withAsyncContext as x, ref as S, unref as f, openBlock as c, createElementBlock as v, createElementVNode as y, createVNode as s, withCtx as i, withModifiers as A, createTextVNode as w } from "vue";
2
- import { useStore as g } from "@aeria-ui/state-management";
1
+ import { defineComponent as $, withAsyncContext as x, ref as S, unref as f, openBlock as c, createElementBlock as v, createElementVNode as y, createVNode as s, withCtx as i, withModifiers as A, createTextVNode as g } from "vue";
2
+ import { useStore as w } from "@aeria-ui/state-management";
3
3
  import { useRouter as I } from "vue-router";
4
- import { A as R, _ as b, a as V } from "./index-e8ad8ca3.js";
4
+ import { A as R, _ as b, a as V } from "./index-b59eefcb.js";
5
5
  import "@aeria-ui/i18n";
6
6
  import "@aeria-ui/core";
7
7
  import "@aeriajs/common";
@@ -16,7 +16,7 @@ const q = {
16
16
  __name: "activation",
17
17
  async setup(E) {
18
18
  let r, u;
19
- const a = I(), n = g("user"), C = g("meta"), _ = a.currentRoute.value.query.step || "success", l = a.currentRoute.value.query.u, m = a.currentRoute.value.query.t, { error: d, result: p } = ([r, u] = x(() => n.$functions.getInfo({
19
+ const a = I(), n = w("user"), C = w("meta"), _ = a.currentRoute.value.query.step || "success", l = a.currentRoute.value.query.u, m = a.currentRoute.value.query.t, { error: d, result: p } = ([r, u] = x(() => n.$functions.getInfo({
20
20
  userId: l,
21
21
  token: m
22
22
  })), r = await r, u(), r);
@@ -30,7 +30,7 @@ const q = {
30
30
  }), k = async () => {
31
31
  await n.$actions.custom(`activate?u=${l}&t=${m}`, {
32
32
  password: t.value.password
33
- }), n.credentials.email = t.value.email, await C.$actions.spawnModal({
33
+ }), n.credentials.email = t.value.email, C.$actions.spawnModal({
34
34
  title: "Sucesso!",
35
35
  body: "Sua conta foi ativada com sucesso. Experimente fazer login com o seu email e senha."
36
36
  }), a.push("/user/signin");
@@ -61,7 +61,7 @@ const q = {
61
61
  onClick: A(k, ["prevent"])
62
62
  }, {
63
63
  default: i(() => e[3] || (e[3] = [
64
- w(" Cadastrar senha ")
64
+ g(" Cadastrar senha ")
65
65
  ])),
66
66
  _: 2
67
67
  }, 1032, ["disabled"])
@@ -74,7 +74,7 @@ const q = {
74
74
  onClick: e[2] || (e[2] = (o) => f(a).push("/user/signin"))
75
75
  }, {
76
76
  default: i(() => e[5] || (e[5] = [
77
- w(" Ir para a página de login ")
77
+ g(" Ir para a página de login ")
78
78
  ])),
79
79
  _: 1
80
80
  })
@@ -7,6 +7,7 @@ export type FormFieldProps<TModelValue, TProperty = Property> = {
7
7
  parentPropertyName?: string;
8
8
  parentCollection?: string;
9
9
  readOnly?: boolean;
10
+ required?: boolean;
10
11
  };
11
12
  export type SearchProperty = RefProperty | ArrayProperty<RefProperty>;
12
13
  export type UploadedFile = {
@@ -2,7 +2,7 @@ import { defineComponent as c, ref as m, openBlock as u, createBlock as _, withC
2
2
  import { useRouter as v } from "vue-router";
3
3
  import { useI18n as x } from "@aeria-ui/i18n";
4
4
  import { useStore as n } from "@aeria-ui/state-management";
5
- import { h as V, _ as k, a as y } from "./index-e8ad8ca3.js";
5
+ import { h as V, _ as k, a as y } from "./index-b59eefcb.js";
6
6
  import "@aeria-ui/core";
7
7
  import "@aeriajs/common";
8
8
  import "@aeria-ui/utils";
@@ -18,7 +18,7 @@ const I = /* @__PURE__ */ c({
18
18
  _id: r.item._id,
19
19
  password: t.value.password
20
20
  }
21
- }), await l.$actions.spawnModal({
21
+ }), l.$actions.spawnModal({
22
22
  title: `${e("done", {
23
23
  capitalize: !0
24
24
  })}!`,
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as e, openBlock as t, createBlock as r, createSlots as i, withCtx as n, renderSlot as c, createCommentVNode as l } from "vue";
2
- import { d as m } from "./index-e8ad8ca3.js";
2
+ import { d as m } from "./index-b59eefcb.js";
3
3
  import "@aeria-ui/i18n";
4
4
  import "@aeria-ui/core";
5
5
  import "@aeriajs/common";
@@ -1,15 +1,15 @@
1
- import { defineComponent as b, ref as h, resolveDirective as w, openBlock as u, createElementBlock as A, Fragment as V, createVNode as s, mergeProps as g, unref as i, withCtx as a, createElementVNode as C, toDisplayString as n, renderSlot as N, createCommentVNode as P, withDirectives as m, createBlock as p, createTextVNode as d } from "vue";
1
+ import { defineComponent as h, ref as A, resolveDirective as V, openBlock as u, createElementBlock as C, Fragment as b, createVNode as s, mergeProps as g, unref as i, withCtx as r, createElementVNode as w, toDisplayString as n, renderSlot as N, createCommentVNode as P, withDirectives as m, createBlock as p, createTextVNode as d } from "vue";
2
2
  import { useRouter as z } from "vue-router";
3
3
  import { useStore as v } from "@aeria-ui/state-management";
4
4
  import { STORAGE_NAMESPACE as y } from "@aeria-ui/core";
5
- import { f as E, g as I, b as f, h as O, a as x, A as B, i as U } from "./index-e8ad8ca3.js";
5
+ import { f as E, g as I, b as f, h as O, a as x, A as B, i as U } from "./index-b59eefcb.js";
6
6
  import "@aeria-ui/i18n";
7
7
  import "@aeriajs/common";
8
8
  import "@aeria-ui/utils";
9
- const D = { class: "profile__user-name" }, F = /* @__PURE__ */ b({
9
+ const D = { class: "profile__user-name" }, F = /* @__PURE__ */ h({
10
10
  __name: "index",
11
11
  setup(M) {
12
- const _ = z(), e = v("user"), S = v("meta"), l = h(!1);
12
+ const _ = z(), e = v("user"), S = v("meta"), l = A(!1);
13
13
  e.$actions.setItem(e.currentUser);
14
14
  const k = async () => {
15
15
  if (await e.$actions.insert({
@@ -21,16 +21,16 @@ const D = { class: "profile__user-name" }, F = /* @__PURE__ */ b({
21
21
  t.user = e.item, localStorage.setItem(`${y}:auth`, JSON.stringify(t));
22
22
  }
23
23
  }
24
- await S.$actions.spawnModal({
24
+ S.$actions.spawnModal({
25
25
  title: "Feito!",
26
26
  body: "Suas informações foram salvas"
27
27
  }), l.value = !1;
28
28
  }, $ = async () => {
29
- await e.$actions.signout(), _.push("/user/signin");
29
+ e.$actions.signout(), _.push("/user/signin");
30
30
  };
31
31
  return (o, t) => {
32
- const c = w("clickable");
33
- return u(), A(V, null, [
32
+ const c = V("clickable");
33
+ return u(), C(b, null, [
34
34
  s(E, g({ alt: "User picture" }, {
35
35
  width: "14rem",
36
36
  height: "14rem"
@@ -39,19 +39,19 @@ const D = { class: "profile__user-name" }, F = /* @__PURE__ */ b({
39
39
  "file-id": i(e).item.picture_file && typeof i(e).item.picture_file == "object" ? i(e).item.picture_file._id : i(e).item.picture_file,
40
40
  style: { display: "flex", "flex-direction": "column", "align-items": "center" }
41
41
  }), {
42
- caption: a(() => [
43
- C("div", D, n(i(e).item.name), 1)
42
+ caption: r(() => [
43
+ w("div", D, n(i(e).item.name), 1)
44
44
  ]),
45
45
  _: 1
46
46
  }, 16, ["file-id"]),
47
47
  o.$slots["user-profile"] ? N(o.$slots, "user-profile", { key: 0 }, void 0, !0) : P("", !0),
48
48
  s(I, null, {
49
- "edit-profile": a(() => [
49
+ "edit-profile": r(() => [
50
50
  m((u(), p(f, {
51
51
  icon: "pencil",
52
- onClick: t[0] || (t[0] = (r) => l.value = !0)
52
+ onClick: t[0] || (t[0] = (a) => l.value = !0)
53
53
  }, {
54
- default: a(() => [
54
+ default: r(() => [
55
55
  d(n(o.t("edit_profile", { capitalize: !0 })), 1)
56
56
  ]),
57
57
  _: 1
@@ -59,12 +59,12 @@ const D = { class: "profile__user-name" }, F = /* @__PURE__ */ b({
59
59
  [c]
60
60
  ])
61
61
  ]),
62
- "change-password": a(() => [
62
+ "change-password": r(() => [
63
63
  m((u(), p(f, {
64
64
  icon: "key",
65
- onClick: t[1] || (t[1] = (r) => i(_).push("/dashboard/user/changepass"))
65
+ onClick: t[1] || (t[1] = (a) => i(_).push("/dashboard/user/changepass"))
66
66
  }, {
67
- default: a(() => [
67
+ default: r(() => [
68
68
  d(n(o.t("change_password", { capitalize: !0 })), 1)
69
69
  ]),
70
70
  _: 1
@@ -72,12 +72,12 @@ const D = { class: "profile__user-name" }, F = /* @__PURE__ */ b({
72
72
  [c]
73
73
  ])
74
74
  ]),
75
- signout: a(() => [
75
+ signout: r(() => [
76
76
  m((u(), p(f, {
77
77
  icon: "sign-out",
78
78
  onClick: $
79
79
  }, {
80
- default: a(() => [
80
+ default: r(() => [
81
81
  d(n(o.t("signout", { capitalize: !0 })), 1)
82
82
  ]),
83
83
  _: 1
@@ -89,28 +89,28 @@ const D = { class: "profile__user-name" }, F = /* @__PURE__ */ b({
89
89
  }),
90
90
  s(O, {
91
91
  modelValue: l.value,
92
- "onUpdate:modelValue": t[3] || (t[3] = (r) => l.value = r),
92
+ "onUpdate:modelValue": t[3] || (t[3] = (a) => l.value = a),
93
93
  float: "",
94
94
  "close-hint": "",
95
95
  title: o.t("edit_profile", { capitalize: !0 }),
96
- onOverlayClick: t[4] || (t[4] = (r) => l.value = !1)
96
+ onOverlayClick: t[4] || (t[4] = (a) => l.value = !1)
97
97
  }, {
98
- footer: a(() => [
98
+ footer: r(() => [
99
99
  s(x, {
100
100
  large: "",
101
101
  loading: i(e).loading.insert,
102
102
  onClick: k
103
103
  }, {
104
- default: a(() => [
104
+ default: r(() => [
105
105
  d(n(o.t("action.save", { capitalize: !0 })), 1)
106
106
  ]),
107
107
  _: 1
108
108
  }, 8, ["loading"])
109
109
  ]),
110
- default: a(() => [
110
+ default: r(() => [
111
111
  s(B, g({
112
112
  modelValue: i(e).item,
113
- "onUpdate:modelValue": t[2] || (t[2] = (r) => i(e).item = r)
113
+ "onUpdate:modelValue": t[2] || (t[2] = (a) => i(e).item = a)
114
114
  }, {
115
115
  collection: "user",
116
116
  form: i(e).$actions.useProperties([
@@ -128,7 +128,7 @@ const D = { class: "profile__user-name" }, F = /* @__PURE__ */ b({
128
128
  };
129
129
  }
130
130
  });
131
- const K = /* @__PURE__ */ U(F, [["__scopeId", "data-v-83d4bf4a"]]);
131
+ const K = /* @__PURE__ */ U(F, [["__scopeId", "data-v-d7e87647"]]);
132
132
  export {
133
133
  K as default
134
134
  };