@wgalleti/primevue-components 1.1.2 → 1.2.0

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.
@@ -47,19 +47,19 @@ var Ue = {
47
47
  key: 0,
48
48
  class: "w-cell-neutral"
49
49
  }, Ke = {
50
- key: 3,
50
+ key: 4,
51
51
  class: "w-cell-date"
52
52
  }, qe = {
53
- key: 4,
53
+ key: 5,
54
54
  class: "w-cell-date"
55
55
  }, Je = {
56
- key: 5,
56
+ key: 6,
57
57
  class: "w-cell-number"
58
58
  }, $ = {
59
- key: 6,
59
+ key: 7,
60
60
  class: "w-cell-number"
61
61
  }, Ye = {
62
- key: 7,
62
+ key: 8,
63
63
  class: "w-cell-text"
64
64
  }, Xe = /* @__PURE__ */ x({
65
65
  __name: "WCrudColumnRenderer",
@@ -73,24 +73,42 @@ var Ue = {
73
73
  function o(e, t, n) {
74
74
  return e.tagValue ? e.tagValue(t, n) : t ? e.trueLabel ?? "Ativo" : e.falseLabel ?? "Inativo";
75
75
  }
76
- function s(e, t, n) {
76
+ function s(e) {
77
+ return !!(e.tagValue || e.tagSeverity);
78
+ }
79
+ function c(e, t, n) {
80
+ return e.tagValue ? e.tagValue(t, n) : e.format ? e.format(t, n) : String(t);
81
+ }
82
+ function l(e, t, n) {
83
+ return e.tagSeverity?.(t, n) ?? "secondary";
84
+ }
85
+ function u(e, t, n) {
77
86
  return e.tagSeverity ? e.tagSeverity(t, n) : t ? e.trueSeverity === void 0 ? "success" : e.trueSeverity : e.falseSeverity === void 0 ? "danger" : e.falseSeverity;
78
87
  }
79
- return (n, c) => e.value == null ? (M(), h("span", Ue, "—")) : e.column.type === "image" ? (M(), h("img", {
88
+ return (n, f) => e.value == null ? (M(), h("span", Ue, "—")) : e.column.type === "image" ? (M(), h("img", {
80
89
  key: 1,
81
90
  src: String(e.value),
82
91
  alt: e.column.header,
83
92
  class: "w-cell-image"
84
- }, null, 8, We)) : e.column.type === "boolean" ? (M(), h(d, { key: 2 }, [s(e.column, e.value, e.rowData) === null ? (M(), h("span", Ge, L(o(e.column, e.value, e.rowData)), 1)) : (M(), p(R(X), {
93
+ }, null, 8, We)) : e.column.type === "boolean" ? (M(), h(d, { key: 2 }, [u(e.column, e.value, e.rowData) === null ? (M(), h("span", Ge, L(o(e.column, e.value, e.rowData)), 1)) : (M(), p(R(X), {
85
94
  key: 1,
86
95
  value: o(e.column, e.value, e.rowData),
87
- severity: s(e.column, e.value, e.rowData),
88
- class: k(["w-tag", `w-tag--${s(e.column, e.value, e.rowData)}`])
96
+ severity: u(e.column, e.value, e.rowData),
97
+ class: k(["w-tag", `w-tag--${u(e.column, e.value, e.rowData)}`])
98
+ }, null, 8, [
99
+ "value",
100
+ "severity",
101
+ "class"
102
+ ]))], 64)) : s(e.column) ? (M(), p(R(X), {
103
+ key: 3,
104
+ value: c(e.column, e.value, e.rowData),
105
+ severity: l(e.column, e.value, e.rowData),
106
+ class: k(["w-tag", `w-tag--${l(e.column, e.value, e.rowData)}`])
89
107
  }, null, 8, [
90
108
  "value",
91
109
  "severity",
92
110
  "class"
93
- ]))], 64)) : e.column.type === "date" ? (M(), h("span", Ke, L(R(t)(e.value)), 1)) : e.column.type === "datetime" ? (M(), h("span", qe, L(R(r)(e.value)), 1)) : e.column.type === "currency" ? (M(), h("span", Je, L(R(i)(e.value)), 1)) : e.column.type === "number" ? (M(), h("span", $, L(e.column.format ? e.column.format(e.value, e.rowData) : R(a)(e.value, e.column.decimals ?? 0)), 1)) : (M(), h("span", Ye, L(e.column.format ? e.column.format(e.value, e.rowData) : e.value), 1));
111
+ ])) : e.column.type === "date" ? (M(), h("span", Ke, L(e.column.format ? e.column.format(e.value, e.rowData) : R(t)(e.value)), 1)) : e.column.type === "datetime" ? (M(), h("span", qe, L(e.column.format ? e.column.format(e.value, e.rowData) : R(r)(e.value)), 1)) : e.column.type === "currency" ? (M(), h("span", Je, L(e.column.format ? e.column.format(e.value, e.rowData) : R(i)(e.value)), 1)) : e.column.type === "number" ? (M(), h("span", $, L(e.column.format ? e.column.format(e.value, e.rowData) : R(a)(e.value, e.column.decimals ?? 0)), 1)) : (M(), h("span", Ye, L(e.column.format ? e.column.format(e.value, e.rowData) : e.value), 1));
94
112
  }
95
113
  }), Ze = Object.defineProperty, Qe = (e, t, n) => t in e ? Ze(e, t, {
96
114
  enumerable: !0,
@@ -2238,6 +2256,7 @@ var pn = { class: "w-crud-form" }, mn = {
2238
2256
  max: i.max,
2239
2257
  "min-fraction-digits": i.minFractionDigits,
2240
2258
  "max-fraction-digits": i.maxFractionDigits,
2259
+ "use-grouping": i.useGrouping !== !1,
2241
2260
  suffix: i.suffix,
2242
2261
  prefix: i.prefix,
2243
2262
  placeholder: i.placeholder,
@@ -2252,6 +2271,7 @@ var pn = { class: "w-crud-form" }, mn = {
2252
2271
  "max",
2253
2272
  "min-fraction-digits",
2254
2273
  "max-fraction-digits",
2274
+ "use-grouping",
2255
2275
  "suffix",
2256
2276
  "prefix",
2257
2277
  "placeholder",
@@ -2838,6 +2858,7 @@ var Zn = { class: "w-crud" }, Qn = {
2838
2858
  },
2839
2859
  dialogWidth: { default: "480px" },
2840
2860
  formColumns: {},
2861
+ asideWidth: {},
2841
2862
  autoInit: {
2842
2863
  type: Boolean,
2843
2864
  default: !0
@@ -3802,15 +3823,32 @@ var Zn = { class: "w-crud" }, Qn = {
3802
3823
  width: t.dialogWidth,
3803
3824
  "form-columns": t.formColumns ?? t.crud.config.formColumns,
3804
3825
  "keyboard-nav": t.crud.config.keyboardNav,
3826
+ "aside-width": t.asideWidth,
3805
3827
  "onUpdate:visible": n[18] ||= (e) => {
3806
3828
  t.crud.dialogVisible.value = e, e || (t.crud.editingItem.value = null);
3807
3829
  },
3808
3830
  "onUpdate:field": n[19] ||= (e, n) => t.crud.setFormField(e, n),
3809
3831
  onSave: n[20] ||= (e) => t.crud.save()
3810
- }, _({ _: 2 }, [F(t.crud.config.form, (t) => ({
3811
- name: `field-${t.field}`,
3812
- fn: V((n) => [I(e.$slots, `field-${t.field}`, A(S(n)))])
3813
- }))]), 1032, [
3832
+ }, _({ _: 2 }, [
3833
+ F(t.crud.config.form, (t) => ({
3834
+ name: `field-${t.field}`,
3835
+ fn: V((n) => [I(e.$slots, `field-${t.field}`, A(S(n)))])
3836
+ })),
3837
+ F(t.crud.config.form.filter((e) => e.type === "image"), (t) => ({
3838
+ name: `image-${t.field}`,
3839
+ fn: V((n) => [I(e.$slots, `image-${t.field}`, A(S(n)))])
3840
+ })),
3841
+ e.$slots["after-fields"] ? {
3842
+ name: "after-fields",
3843
+ fn: V((t) => [I(e.$slots, "after-fields", A(S(t)))]),
3844
+ key: "0"
3845
+ } : void 0,
3846
+ e.$slots.aside ? {
3847
+ name: "aside",
3848
+ fn: V((t) => [I(e.$slots, "aside", A(S(t)))]),
3849
+ key: "1"
3850
+ } : void 0
3851
+ ]), 1032, [
3814
3852
  "visible",
3815
3853
  "title",
3816
3854
  "fields",
@@ -3820,7 +3858,8 @@ var Zn = { class: "w-crud" }, Qn = {
3820
3858
  "disabled",
3821
3859
  "width",
3822
3860
  "form-columns",
3823
- "keyboard-nav"
3861
+ "keyboard-nav",
3862
+ "aside-width"
3824
3863
  ])]),
3825
3864
  e.$slots["delete-message"] ? (M(), p(R(ye), {
3826
3865
  key: 2,
@@ -7586,4 +7625,4 @@ var jc = {
7586
7625
  //#endregion
7587
7626
  export { Zi as A, Kn as B, Aa as C, ra as D, la as E, Ti as F, It as G, dn as H, pi as I, gt as J, Mt as K, Lr as L, Ki as M, Mi as N, na as O, Ei as P, Xn as R, Va as S, ma as T, Jt as U, Hn as V, Lt as W, _t as X, bt as Y, Xe as Z, fo as _, Qc as a, Ua as b, Nc as c, $o as d, Ao as f, yo as g, Co as h, nl as i, $i as j, Xi as k, Ls as l, Oo as m, hl as n, Zc as o, ko as p, yt as q, dl as r, Bc as s, El as t, ss as u, $a as v, xa as w, Ha as x, Ga as y, Yn as z };
7588
7627
 
7589
- //# sourceMappingURL=components-BVJTg_MO.js.map
7628
+ //# sourceMappingURL=components-D5eeRtRP.js.map