@caipira/tamandua 0.0.88 → 0.0.89

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/dist/ModalForm.js CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as a } from "./ModalForm.vue_vue_type_script_setup_true_lang-RfK0Mn81.js";
2
- import { p as l } from "./plugin-DNXazWwT.js";
1
+ import { _ as a } from "./ModalForm.vue_vue_type_script_setup_true_lang-arUXLdgo.js";
2
+ import { p as l } from "./plugin-CrcKkoHW.js";
3
3
  export {
4
4
  a as ModalForm,
5
5
  l as ModalFormPlugin
@@ -1,4 +1,4 @@
1
- import { defineComponent as F, ref as d, computed as K, resolveComponent as o, openBlock as l, createBlock as i, withCtx as s, createElementVNode as L, createCommentVNode as u, renderSlot as M, createElementBlock as R, createVNode as m, normalizeClass as j, resolveDynamicComponent as H, mergeProps as I, toHandlers as O } from "vue";
1
+ import { defineComponent as F, ref as d, computed as K, resolveComponent as n, openBlock as s, createBlock as i, withCtx as a, createElementVNode as L, createCommentVNode as u, renderSlot as M, createElementBlock as R, createVNode as m, normalizeClass as j, resolveDynamicComponent as H, mergeProps as I, toHandlers as O } from "vue";
2
2
  import { C as P } from "./crud-n73o4CzO.js";
3
3
  const T = { class: "flex items-baseline justify-between w-full" }, U = {
4
4
  key: 0,
@@ -13,10 +13,10 @@ const T = { class: "flex items-baseline justify-between w-full" }, U = {
13
13
  },
14
14
  emits: ["saved", "deleted", "closed"],
15
15
  setup(y, { expose: k, emit: g }) {
16
- const r = y, v = g, e = d(), p = d(!1), _ = d(""), c = d(), n = K(() => r.forms.find((a) => a.key === _.value)), w = (a, t) => {
17
- _.value = a, e.value = new P(n.value?.title, c), t ? e.value?.edit(t) : e.value?.show();
18
- }, h = () => {
19
- e.value?.onSave(!p.value), v("saved");
16
+ const r = y, v = g, e = d(), p = d(!1), _ = d(""), c = d(), l = K(() => r.forms.find((t) => t.key === _.value)), w = (t, o) => {
17
+ _.value = t, e.value = new P(l.value?.title, c), o ? e.value?.edit(o) : e.value?.show();
18
+ }, h = (t) => {
19
+ e.value?.onSave(!p.value), v("saved", t);
20
20
  }, x = () => {
21
21
  v("deleted"), e.value?.onDelete();
22
22
  }, b = () => {
@@ -26,34 +26,34 @@ const T = { class: "flex items-baseline justify-between w-full" }, U = {
26
26
  }, D = () => {
27
27
  e.value?.close(), v("closed");
28
28
  };
29
- return k({ open: w, delete: b, submit: S, reset: V }), (a, t) => {
30
- const E = o("t-input-switch"), B = o("t-icon"), N = o("t-dropdown"), $ = o("t-popover"), C = o("t-button"), z = o("t-popconfirm"), A = o("t-modal");
31
- return e.value?.visible ? (l(), i(A, {
29
+ return k({ open: w, delete: b, submit: S, reset: V }), (t, o) => {
30
+ const E = n("t-input-switch"), B = n("t-icon"), N = n("t-dropdown"), $ = n("t-popover"), C = n("t-button"), z = n("t-popconfirm"), A = n("t-modal");
31
+ return e.value?.visible ? (s(), i(A, {
32
32
  key: 0,
33
33
  title: e.value?.title,
34
34
  onClosed: D
35
35
  }, {
36
- header: s(() => [
36
+ header: a(() => [
37
37
  L("div", T, [
38
- n.value?.pinnable && !e.value?.isEditing ? (l(), i(E, {
38
+ l.value?.pinnable && !e.value?.isEditing ? (s(), i(E, {
39
39
  key: 0,
40
40
  modelValue: p.value,
41
- "onUpdate:modelValue": t[0] || (t[0] = (f) => p.value = f),
41
+ "onUpdate:modelValue": o[0] || (o[0] = (f) => p.value = f),
42
42
  label: "Keep open",
43
43
  class: "mt-4"
44
44
  }, null, 8, ["modelValue"])) : u("", !0),
45
- M(a.$slots, "header")
45
+ M(t.$slots, "header")
46
46
  ])
47
47
  ]),
48
- footer: s(() => [
49
- r.options.length ? (l(), R("div", U, [
48
+ footer: a(() => [
49
+ r.options.length ? (s(), R("div", U, [
50
50
  m($, { placement: "bottom-start" }, {
51
- content: s(() => [
51
+ content: a(() => [
52
52
  m(N, {
53
53
  items: r.options
54
54
  }, null, 8, ["items"])
55
55
  ]),
56
- default: s(() => [
56
+ default: a(() => [
57
57
  m(B, {
58
58
  icon: "dots-vertical",
59
59
  class: "text-lg mr-6",
@@ -64,13 +64,13 @@ const T = { class: "flex items-baseline justify-between w-full" }, U = {
64
64
  ]),
65
65
  _: 1
66
66
  })
67
- ])) : (l(), i(z, {
67
+ ])) : (s(), i(z, {
68
68
  key: 1,
69
- message: `Are you sure you want to delete this ${n.value?.title}?`,
69
+ message: `Are you sure you want to delete this ${l.value?.title}?`,
70
70
  onConfirm: b
71
71
  }, {
72
- default: s(({ onTogglePopover: f }) => [
73
- e.value?.isEditing ? (l(), i(C, {
72
+ default: a(({ onTogglePopover: f }) => [
73
+ e.value?.isEditing ? (s(), i(C, {
74
74
  key: 0,
75
75
  variant: "danger",
76
76
  icon: "trash-can-outline",
@@ -90,17 +90,17 @@ const T = { class: "flex items-baseline justify-between w-full" }, U = {
90
90
  class: j({
91
91
  "ml-auto": !e.value?.isEditing
92
92
  }),
93
- onClick: t[1] || (t[1] = () => e.value?.save())
93
+ onClick: o[1] || (o[1] = () => e.value?.save())
94
94
  }, null, 8, ["label", "is-disabled", "class"])
95
95
  ]),
96
- default: s(() => [
97
- n.value ? (l(), i(H(n.value.component), I({
96
+ default: a(() => [
97
+ l.value ? (s(), i(H(l.value.component), I({
98
98
  key: 0,
99
99
  identifier: `${e.value?.id}`,
100
100
  class: [r.formClass],
101
101
  ref_key: "formReference",
102
102
  ref: c
103
- }, O(n.value?.events ?? {}), {
103
+ }, O(l.value?.events ?? {}), {
104
104
  onDeleted: x,
105
105
  onSaved: h
106
106
  }), null, 16, ["identifier", "class"])) : u("", !0)
@@ -31,7 +31,7 @@ import { _ as ar } from "./InputText.vue_vue_type_script_setup_true_lang-JLAlUE_
31
31
  import { _ as sr } from "./InputTextarea.vue_vue_type_script_setup_true_lang-C8f2hfeZ.js";
32
32
  import { _ as fr } from "./Link.vue_vue_type_script_setup_true_lang-khitC1tF.js";
33
33
  import { _ as nr } from "./Modal.vue_vue_type_script_setup_true_lang-60BGY-iH.js";
34
- import { _ as ur } from "./ModalForm.vue_vue_type_script_setup_true_lang-RfK0Mn81.js";
34
+ import { _ as ur } from "./ModalForm.vue_vue_type_script_setup_true_lang-arUXLdgo.js";
35
35
  import { _ as lr } from "./Pagination.vue_vue_type_script_setup_true_lang-BCQUrEVO.js";
36
36
  import { _ as cr } from "./Popconfirm.vue_vue_type_script_setup_true_lang-CZCgvV88.js";
37
37
  import { P as Tr } from "./Popover-BCOzqGp1.js";
@@ -1,5 +1,5 @@
1
1
  import { r } from "./register-component-B-fdqewb.js";
2
- import { _ as s } from "./ModalForm.vue_vue_type_script_setup_true_lang-RfK0Mn81.js";
2
+ import { _ as s } from "./ModalForm.vue_vue_type_script_setup_true_lang-arUXLdgo.js";
3
3
  const m = {
4
4
  install(o) {
5
5
  r(o, s);
@@ -43,7 +43,7 @@ import { p as x } from "./plugin-Clp0zNY0.js";
43
43
  import "./Link.vue_vue_type_script_setup_true_lang-khitC1tF.js";
44
44
  import { p as D } from "./plugin-Ddhlf1jJ.js";
45
45
  import { p as F } from "./plugin-CPpRqUnI.js";
46
- import { p as L } from "./plugin-DNXazWwT.js";
46
+ import { p as L } from "./plugin-CrcKkoHW.js";
47
47
  import { p as M } from "./plugin-jyvJNavM.js";
48
48
  import "./Popconfirm.vue_vue_type_script_setup_true_lang-CZCgvV88.js";
49
49
  import { p as _ } from "./plugin-DOUuWnyJ.js";
package/dist/plugins.js CHANGED
@@ -43,7 +43,7 @@ import { p as Sr } from "./plugin-Clp0zNY0.js";
43
43
  import "./Link.vue_vue_type_script_setup_true_lang-khitC1tF.js";
44
44
  import { p as vr } from "./plugin-Ddhlf1jJ.js";
45
45
  import { p as Dr } from "./plugin-CPpRqUnI.js";
46
- import { p as Lr } from "./plugin-DNXazWwT.js";
46
+ import { p as Lr } from "./plugin-CrcKkoHW.js";
47
47
  import { p as Ar } from "./plugin-jyvJNavM.js";
48
48
  import "./Popconfirm.vue_vue_type_script_setup_true_lang-CZCgvV88.js";
49
49
  import { p as Er } from "./plugin-DOUuWnyJ.js";
package/dist/tamandua.js CHANGED
@@ -1,4 +1,4 @@
1
- import { p as n } from "./plugins-DZdm2aFN.js";
1
+ import { p as n } from "./plugins-BXkzJLLO.js";
2
2
  const o = {
3
3
  install(s) {
4
4
  for (const i in n)
@@ -15,7 +15,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<
15
15
  } | undefined>;
16
16
  reset: () => void;
17
17
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
18
- saved: () => void;
18
+ saved: (val?: any) => void;
19
19
  deleted: () => void;
20
20
  closed: () => void;
21
21
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ModalFormProps>, {
@@ -23,7 +23,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<
23
23
  formClass: string;
24
24
  }>>> & {
25
25
  onClosed?: (() => any) | undefined;
26
- onSaved?: (() => any) | undefined;
26
+ onSaved?: ((val?: any) => any) | undefined;
27
27
  onDeleted?: (() => any) | undefined;
28
28
  }, {
29
29
  options: import("../types.js").InputSelectOption[];
@@ -15,7 +15,7 @@ export type ModalFormProps = {
15
15
  formClass?: string;
16
16
  };
17
17
  export type ModalFormEvents = {
18
- (e: "saved"): void;
18
+ (e: "saved", val?: any): void;
19
19
  (e: "deleted"): void;
20
20
  (e: "closed"): void;
21
21
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caipira/tamandua",
3
- "version": "0.0.88",
3
+ "version": "0.0.89",
4
4
  "private": false,
5
5
  "description": "UI library for the Caipira ecosystem",
6
6
  "license": "GPL-3.0-only",