@aeria-ui/ui 0.0.93 → 0.0.95

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 n, watch as r, 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-38b20f7b.js";
3
+ import { e as s } from "./index-fd38f589.js";
4
4
  import "@aeria-ui/i18n";
5
5
  import "@aeriajs/common";
6
6
  import "@aeria-ui/core";
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as k, withAsyncContext as $, ref as x, unref as p, openBlock as f, createElementBlock as _, createVNode as r, withCtx as i, withModifiers as S, createTextVNode as v, createElementVNode as g } from "vue";
2
2
  import { useStore as y } from "@aeria-ui/state-management";
3
3
  import { useRouter as A } from "vue-router";
4
- import { A as I, _ as R, a as w } from "./index-38b20f7b.js";
4
+ import { A as I, _ as R, a as w } from "./index-fd38f589.js";
5
5
  import "@aeria-ui/i18n";
6
6
  import "@aeriajs/common";
7
7
  import "@aeria-ui/core";
@@ -7,5 +7,5 @@ export declare const call: import('vue').Ref<(actionProps: import('@aeriajs/type
7
7
  action: string;
8
8
  }) => (filters?: {
9
9
  _id: string | string[];
10
- }) => void>;
10
+ } | undefined) => void>;
11
11
  export declare const actionEventBus: import('vue').Ref<ActionEvent | undefined>;
@@ -10,7 +10,7 @@ type Props = {
10
10
  noLayoutToggle?: boolean;
11
11
  layout?: Layout;
12
12
  action?: Ref<ReturnType<typeof useAction>> | ReturnType<typeof useAction>;
13
- componentProps?: Record<string, any>;
13
+ componentProps?: Record<string, unknown>;
14
14
  scrollPagination?: boolean;
15
15
  noQueryPersistence?: boolean;
16
16
  };
@@ -1,16 +1,16 @@
1
- import { Property, CollectionAction } from '@aeriajs/types';
1
+ import { Property, CollectionAction, TableLayout } from '@aeriajs/types';
2
2
  import { Ref } from 'vue';
3
3
 
4
4
  type Props = {
5
5
  columns?: Record<string, Property>;
6
- rows?: any;
6
+ rows?: any[];
7
7
  collection?: string | Ref<string>;
8
8
  checkbox?: boolean;
9
9
  actions?: (CollectionAction<any> & {
10
10
  action: string;
11
- click: (...args: any[]) => void;
11
+ click: (...args: unknown[]) => void;
12
12
  })[];
13
- layout?: any;
13
+ layout?: TableLayout<any>;
14
14
  };
15
15
  declare function __VLS_template(): Partial<Record<`row-${string}`, (_: {
16
16
  store: any;
@@ -23,9 +23,9 @@ declare function __VLS_template(): Partial<Record<`row-${string}`, (_: {
23
23
  tfoot?(_: {}): any;
24
24
  };
25
25
  declare const __VLS_component: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
26
- itemClick: (value: any) => void;
26
+ itemClick: (value: unknown) => void;
27
27
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & {
28
- onItemClick?: ((value: any) => any) | undefined;
28
+ onItemClick?: ((value: unknown) => any) | undefined;
29
29
  }, {}, {}>;
30
30
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
31
31
  export default _default;
@@ -1,5 +1,5 @@
1
1
  type Props = {
2
- modelValue: Record<string, any> & {
2
+ modelValue: Record<string, unknown> & {
3
3
  password: string;
4
4
  confirmation: string;
5
5
  };
@@ -10,12 +10,12 @@ declare function __VLS_template(): {
10
10
  }): any;
11
11
  };
12
12
  declare const __VLS_component: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
13
- "update:modelValue": (value: Record<string, any> & {
13
+ "update:modelValue": (value: Record<string, unknown> & {
14
14
  password: string;
15
15
  confirmation: string;
16
16
  }) => void;
17
17
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & {
18
- "onUpdate:modelValue"?: ((value: Record<string, any> & {
18
+ "onUpdate:modelValue"?: ((value: Record<string, unknown> & {
19
19
  password: string;
20
20
  confirmation: string;
21
21
  }) => any) | undefined;
@@ -14,7 +14,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__
14
14
  type: "object";
15
15
  default?: any;
16
16
  }) | (EnumProperty & import('@aeriajs/types').PropertyBase & {
17
- additionalProperties: Property;
17
+ additionalProperties: boolean | Property;
18
18
  } & {
19
19
  type: "object";
20
20
  default?: any;
@@ -45,7 +45,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__
45
45
  type: "object";
46
46
  default?: any;
47
47
  }) | (EnumProperty & import('@aeriajs/types').PropertyBase & {
48
- additionalProperties: Property;
48
+ additionalProperties: boolean | Property;
49
49
  } & {
50
50
  type: "object";
51
51
  default?: any;
@@ -2,9 +2,9 @@ import { Property, FileProperty } from '@aeriajs/types';
2
2
  import { FormFieldProps } from '../types.js';
3
3
 
4
4
  type Props = FormFieldProps<any, Property & FileProperty> & {
5
- meta?: Record<string, any>;
6
- modelValue?: any;
7
- content?: any;
5
+ meta?: Record<string, unknown>;
6
+ modelValue?: unknown;
7
+ content?: unknown;
8
8
  };
9
9
  type TempFile = {
10
10
  tempId: string;
@@ -1,6 +1,6 @@
1
1
  import { Property } from '@aeriajs/types';
2
2
  import { GlobalStateManager } from '@aeria-ui/state-management';
3
3
 
4
- export declare const getComponent: (property: Property, customComponents: Record<string, any>) => any;
5
- export declare const pushToArray: (modelValue: any[] | undefined, property: Property, manager: GlobalStateManager) => number;
6
- export declare const spliceFromArray: (modelValue: any[], index: number) => void;
4
+ export declare const getComponent: (property: Property, customComponents: Record<string, unknown>) => {};
5
+ export declare const pushToArray: (modelValue: unknown[] | undefined, property: Property, manager: GlobalStateManager) => number;
6
+ export declare const spliceFromArray: (modelValue: unknown[], index: number) => void;
@@ -21,12 +21,12 @@ type Props = FormFieldProps<any> & {
21
21
  };
22
22
  formLayout?: Description['formLayout'];
23
23
  required?: string[];
24
- formComponents?: Record<string, any>;
25
- propertyComponents?: Record<string, any>;
24
+ formComponents?: Record<string, unknown>;
25
+ propertyComponents?: Record<string, unknown>;
26
26
  omitFormHeader?: boolean;
27
27
  omitInputLabels?: boolean;
28
28
  innerInputLabel?: boolean;
29
- validationErrors?: Record<string, any> | null;
29
+ validationErrors?: Record<string, unknown> | null;
30
30
  highlightRequired?: boolean;
31
31
  focus?: boolean;
32
32
  includeId?: boolean;
@@ -64,7 +64,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<
64
64
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
65
65
  onClipboardCopy?: ((value: string) => any) | undefined;
66
66
  }, {
67
- validationErrors: Record<string, any> | null;
67
+ validationErrors: Record<string, unknown> | null;
68
68
  highlightRequired: boolean;
69
69
  }, {}>;
70
70
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
@@ -1,9 +1,10 @@
1
+ import { CollectionStoreItem } from '@aeria-ui/core';
1
2
  import { SearchProperty } from '../../../../types.js';
2
3
 
3
4
  type Props = {
4
- item: Record<string, any>;
5
+ item: Record<string, unknown>;
5
6
  indexes: readonly string[];
6
- modelValue?: any;
7
+ modelValue?: CollectionStoreItem | CollectionStoreItem[];
7
8
  property: SearchProperty;
8
9
  readOnly?: boolean;
9
10
  };
@@ -11,11 +12,11 @@ declare function __VLS_template(): {
11
12
  default?(_: {}): any;
12
13
  };
13
14
  declare const __VLS_component: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
14
- "update:modelValue": (value: any) => void;
15
- change: (value: Record<string, any>) => void;
15
+ "update:modelValue": (value: CollectionStoreItem | CollectionStoreItem[] | null | undefined) => void;
16
+ change: (value: Record<string, unknown>) => void;
16
17
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & {
17
- onChange?: ((value: Record<string, any>) => any) | undefined;
18
- "onUpdate:modelValue"?: ((value: any) => any) | undefined;
18
+ onChange?: ((value: Record<string, unknown>) => any) | undefined;
19
+ "onUpdate:modelValue"?: ((value: CollectionStoreItem | CollectionStoreItem[] | null | undefined) => any) | undefined;
19
20
  }, {}, {}>;
20
21
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
21
22
  export default _default;
@@ -1,56 +1,56 @@
1
- import { defineComponent as S, ref as b, resolveDirective as h, openBlock as u, createElementBlock as w, Fragment as A, createVNode as s, mergeProps as _, unref as o, withCtx as a, createElementVNode as V, toDisplayString as n, renderSlot as C, createCommentVNode as N, withDirectives as d, createBlock as p, createTextVNode as c } from "vue";
2
- import { useRouter as P } from "vue-router";
3
- import { useStore as g } from "@aeria-ui/state-management";
4
- import { STORAGE_NAMESPACE as v } from "@aeria-ui/core";
5
- import { f as z, g as E, b as f, h as I, a as O, A as B, i as U } from "./index-38b20f7b.js";
1
+ import { defineComponent as h, ref as w, resolveDirective as A, openBlock as u, createElementBlock as V, Fragment as C, createVNode as s, mergeProps as g, unref as i, withCtx as a, createElementVNode as b, toDisplayString as n, renderSlot as N, createCommentVNode as P, withDirectives as d, createBlock as p, createTextVNode as c } from "vue";
2
+ import { useRouter as z } from "vue-router";
3
+ import { useStore as v } from "@aeria-ui/state-management";
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-fd38f589.js";
6
6
  import "@aeria-ui/i18n";
7
7
  import "@aeriajs/common";
8
- const x = { class: "profile__user-name" }, D = /* @__PURE__ */ S({
8
+ const D = { class: "profile__user-name" }, F = /* @__PURE__ */ h({
9
9
  __name: "index",
10
- setup(F) {
11
- const e = g("user"), y = g("meta"), l = b(!1);
10
+ setup(M) {
11
+ const _ = z(), e = v("user"), k = v("meta"), l = w(!1);
12
12
  e.$actions.setItem(e.currentUser);
13
- const $ = async () => {
13
+ const S = async () => {
14
14
  await e.$actions.insert({
15
15
  what: e.item
16
16
  });
17
- const i = localStorage.getItem(`${v}:auth`);
18
- if (i) {
19
- const t = JSON.parse(i);
20
- t.user = e.item, localStorage.setItem(`${v}:auth`, JSON.stringify(t));
17
+ const o = localStorage.getItem(`${y}:auth`);
18
+ if (o) {
19
+ const t = JSON.parse(o);
20
+ t.user = e.item, localStorage.setItem(`${y}:auth`, JSON.stringify(t));
21
21
  }
22
- await y.$actions.spawnModal({
22
+ await k.$actions.spawnModal({
23
23
  title: "Feito!",
24
24
  body: "Suas informações foram salvas"
25
25
  }), l.value = !1;
26
- }, k = async () => {
27
- await e.$actions.signout(), P().push("/user/signin");
26
+ }, $ = async () => {
27
+ await e.$actions.signout(), _.push("/user/signin");
28
28
  };
29
- return (i, t) => {
30
- const m = h("clickable");
31
- return u(), w(A, null, [
32
- s(z, _({ alt: "User picture" }, {
29
+ return (o, t) => {
30
+ const m = A("clickable");
31
+ return u(), V(C, null, [
32
+ s(E, g({ alt: "User picture" }, {
33
33
  width: "14rem",
34
34
  height: "14rem"
35
35
  }, {
36
36
  bordered: "",
37
- "file-id": o(e).item.picture_file && typeof o(e).item.picture_file == "object" ? o(e).item.picture_file._id : o(e).item.picture_file,
37
+ "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,
38
38
  style: { display: "flex", "flex-direction": "column", "align-items": "center" }
39
39
  }), {
40
40
  caption: a(() => [
41
- V("div", x, n(o(e).item.name), 1)
41
+ b("div", D, n(i(e).item.name), 1)
42
42
  ]),
43
43
  _: 1
44
44
  }, 16, ["file-id"]),
45
- i.$slots["user-profile"] ? C(i.$slots, "user-profile", { key: 0 }, void 0, !0) : N("", !0),
46
- s(E, null, {
45
+ o.$slots["user-profile"] ? N(o.$slots, "user-profile", { key: 0 }, void 0, !0) : P("", !0),
46
+ s(I, null, {
47
47
  "edit-profile": a(() => [
48
48
  d((u(), p(f, {
49
49
  icon: "pencil",
50
50
  onClick: t[0] || (t[0] = (r) => l.value = !0)
51
51
  }, {
52
52
  default: a(() => [
53
- c(n(i.t("edit_profile", { capitalize: !0 })), 1)
53
+ c(n(o.t("edit_profile", { capitalize: !0 })), 1)
54
54
  ]),
55
55
  _: 1
56
56
  })), [
@@ -60,10 +60,10 @@ const x = { class: "profile__user-name" }, D = /* @__PURE__ */ S({
60
60
  "change-password": a(() => [
61
61
  d((u(), p(f, {
62
62
  icon: "key",
63
- onClick: t[1] || (t[1] = (r) => i.$router.push("/dashboard/user/changepass"))
63
+ onClick: t[1] || (t[1] = (r) => i(_).push("/dashboard/user/changepass"))
64
64
  }, {
65
65
  default: a(() => [
66
- c(n(i.t("change_password", { capitalize: !0 })), 1)
66
+ c(n(o.t("change_password", { capitalize: !0 })), 1)
67
67
  ]),
68
68
  _: 1
69
69
  })), [
@@ -73,10 +73,10 @@ const x = { class: "profile__user-name" }, D = /* @__PURE__ */ S({
73
73
  signout: a(() => [
74
74
  d((u(), p(f, {
75
75
  icon: "sign-out",
76
- onClick: k
76
+ onClick: $
77
77
  }, {
78
78
  default: a(() => [
79
- c(n(i.t("signout", { capitalize: !0 })), 1)
79
+ c(n(o.t("signout", { capitalize: !0 })), 1)
80
80
  ]),
81
81
  _: 1
82
82
  })), [
@@ -85,39 +85,39 @@ const x = { class: "profile__user-name" }, D = /* @__PURE__ */ S({
85
85
  ]),
86
86
  _: 1
87
87
  }),
88
- s(I, {
88
+ s(O, {
89
89
  modelValue: l.value,
90
90
  "onUpdate:modelValue": t[3] || (t[3] = (r) => l.value = r),
91
91
  float: "",
92
92
  "close-hint": "",
93
- title: i.t("edit_profile", { capitalize: !0 }),
93
+ title: o.t("edit_profile", { capitalize: !0 }),
94
94
  onOverlayClick: t[4] || (t[4] = (r) => l.value = !1)
95
95
  }, {
96
96
  footer: a(() => [
97
- s(O, {
97
+ s(x, {
98
98
  large: "",
99
- loading: o(e).loading.insert,
100
- onClick: $
99
+ loading: i(e).loading.insert,
100
+ onClick: S
101
101
  }, {
102
102
  default: a(() => [
103
- c(n(i.t("action.save", { capitalize: !0 })), 1)
103
+ c(n(o.t("action.save", { capitalize: !0 })), 1)
104
104
  ]),
105
105
  _: 1
106
106
  }, 8, ["loading"])
107
107
  ]),
108
108
  default: a(() => [
109
- s(B, _({
110
- modelValue: o(e).item,
111
- "onUpdate:modelValue": t[2] || (t[2] = (r) => o(e).item = r)
109
+ s(B, g({
110
+ modelValue: i(e).item,
111
+ "onUpdate:modelValue": t[2] || (t[2] = (r) => i(e).item = r)
112
112
  }, {
113
113
  collection: "user",
114
- form: o(e).$actions.useProperties([
114
+ form: i(e).$actions.useProperties([
115
115
  "name",
116
116
  "email",
117
117
  "phone",
118
118
  "picture_file"
119
119
  ]),
120
- formLayout: o(e).description.formLayout
120
+ formLayout: i(e).description.formLayout
121
121
  }), null, 16, ["modelValue"])
122
122
  ]),
123
123
  _: 1
@@ -126,7 +126,7 @@ const x = { class: "profile__user-name" }, D = /* @__PURE__ */ S({
126
126
  };
127
127
  }
128
128
  });
129
- const q = /* @__PURE__ */ U(D, [["__scopeId", "data-v-357c9b3a"]]);
129
+ const H = /* @__PURE__ */ U(F, [["__scopeId", "data-v-19f77ae6"]]);
130
130
  export {
131
- q as default
131
+ H as default
132
132
  };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as e, openBlock as t, createBlock as r, createSlots as n, withCtx as c, renderSlot as i, createCommentVNode as l } from "vue";
2
- import { d as m } from "./index-38b20f7b.js";
2
+ import { d as m } from "./index-fd38f589.js";
3
3
  import "@aeria-ui/i18n";
4
4
  import "@aeriajs/common";
5
5
  import "@aeria-ui/state-management";
@@ -2,7 +2,7 @@ import { defineComponent as c, ref as u, openBlock as m, 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-38b20f7b.js";
5
+ import { h as V, _ as k, a as y } from "./index-fd38f589.js";
6
6
  import "@aeriajs/common";
7
7
  import "@aeria-ui/core";
8
8
  const D = /* @__PURE__ */ c({