@appmax_npm/ds-prime 1.0.0-alpha.80 → 1.0.0-alpha.82
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/amfilterlevel/index.js +29 -29
- package/package.json +1 -1
package/amfilterlevel/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as q, ref as I, computed as v, defineAsyncComponent as G, onMounted as H, watch as J, openBlock as p, createElementBlock as d, Fragment as D, createVNode as s, unref as N, withCtx as
|
|
1
|
+
import { defineComponent as q, ref as I, computed as v, defineAsyncComponent as G, onMounted as H, watch as J, openBlock as p, createElementBlock as d, Fragment as D, createVNode as s, unref as N, withCtx as l, createElementVNode as h, createTextVNode as c, toDisplayString as y, renderList as K, createCommentVNode as B, createBlock as Q, resolveDynamicComponent as W, mergeProps as Z } from "vue";
|
|
2
2
|
import M from "primevue/drawer";
|
|
3
3
|
import { _ as ee } from "../AmChip.vue_vue_type_script_setup_true_lang-BMxK8yMe.js";
|
|
4
4
|
import { _ as k } from "../AmText.vue_vue_type_script_setup_true_lang-BMNozCVT.js";
|
|
@@ -7,19 +7,19 @@ import { _ as te } from "../AmIcon.vue_vue_type_script_setup_true_lang-BVNnd-E1.
|
|
|
7
7
|
import { _ as P } from "../AmIconButton.vue_vue_type_script_setup_true_lang-BbPbbVqM.js";
|
|
8
8
|
const g = (e) => new Date(e), L = (e) => g(e).toLocaleDateString("pt-BR"), oe = ([e, t]) => g(e).getDate() === g(t).getDate(), ne = (e, t) => {
|
|
9
9
|
if (!t || !Array.isArray(t)) return "";
|
|
10
|
-
const [r,
|
|
11
|
-
return r ? !
|
|
10
|
+
const [r, a] = t;
|
|
11
|
+
return r ? !a || oe(t) ? L(r) : `${L(r)} à ${L(a)}` : "";
|
|
12
12
|
}, le = (e, t) => {
|
|
13
13
|
if (!Array.isArray(t)) return "";
|
|
14
14
|
const r = t[t.length - 1];
|
|
15
15
|
if (r === void 0 || !Array.isArray(e == null ? void 0 : e.options)) return "";
|
|
16
|
-
const
|
|
17
|
-
if (
|
|
16
|
+
const a = t.length;
|
|
17
|
+
if (a === 0) return "";
|
|
18
18
|
const { label: f = "" } = e.options.find((_) => _.value === r) || {};
|
|
19
|
-
return
|
|
19
|
+
return a === 1 ? f : `${f}, +${a - 1}`;
|
|
20
20
|
}, ae = (e, t) => {
|
|
21
21
|
if (t === void 0 || !Array.isArray(e.options)) return "";
|
|
22
|
-
const { label: r = "" } = e.options.find((
|
|
22
|
+
const { label: r = "" } = e.options.find((a) => a.value === t) || {};
|
|
23
23
|
return r;
|
|
24
24
|
}, V = {
|
|
25
25
|
date: {
|
|
@@ -48,18 +48,18 @@ const g = (e) => new Date(e), L = (e) => g(e).toLocaleDateString("pt-BR"), oe =
|
|
|
48
48
|
},
|
|
49
49
|
emits: ["update:modelValue", "update:visible"],
|
|
50
50
|
setup(e, { emit: t }) {
|
|
51
|
-
const
|
|
52
|
-
() =>
|
|
51
|
+
const a = e, f = t, _ = () => f("update:visible", !1), i = I({}), b = I(-1), w = v(
|
|
52
|
+
() => a.fields.map((o) => ({
|
|
53
53
|
...o,
|
|
54
54
|
component: re(o),
|
|
55
55
|
formatChipLabel: ie(o),
|
|
56
56
|
options: o.options || []
|
|
57
57
|
}))
|
|
58
|
-
), m = v(() => w.value[b.value]), S = v(() => b.value > -1), T = v(() => m.value.component ? G(m.value.component) : null), X = v(() => i.value[m.value.name]), A = (o,
|
|
59
|
-
i.value = { ...i.value, [o]:
|
|
58
|
+
), m = v(() => w.value[b.value]), S = v(() => b.value > -1), T = v(() => m.value.component ? G(m.value.component) : null), X = v(() => i.value[m.value.name]), A = (o, n) => {
|
|
59
|
+
i.value = { ...i.value, [o]: n };
|
|
60
60
|
}, Y = (o) => A(m.value.name, o), j = (o) => {
|
|
61
|
-
const
|
|
62
|
-
return Array.isArray(
|
|
61
|
+
const n = i.value[o];
|
|
62
|
+
return Array.isArray(n) ? n.length > 0 : n != null && n !== "";
|
|
63
63
|
}, z = (o) => A(o, void 0), R = (o) => {
|
|
64
64
|
b.value = o;
|
|
65
65
|
}, E = () => {
|
|
@@ -67,11 +67,11 @@ const g = (e) => new Date(e), L = (e) => g(e).toLocaleDateString("pt-BR"), oe =
|
|
|
67
67
|
}, F = () => {
|
|
68
68
|
f("update:modelValue", i.value), _();
|
|
69
69
|
}, $ = () => {
|
|
70
|
-
|
|
70
|
+
a.visible && (i.value = a.modelValue);
|
|
71
71
|
}, O = () => {
|
|
72
72
|
i.value = {}, F();
|
|
73
73
|
};
|
|
74
|
-
return H($), J(() =>
|
|
74
|
+
return H($), J(() => a.visible, $), (o, n) => (p(), d(D, null, [
|
|
75
75
|
s(N(M), {
|
|
76
76
|
class: "am-filter-level",
|
|
77
77
|
visible: o.visible,
|
|
@@ -79,14 +79,14 @@ const g = (e) => new Date(e), L = (e) => g(e).toLocaleDateString("pt-BR"), oe =
|
|
|
79
79
|
"show-close-icon": !1,
|
|
80
80
|
"block-scroll": ""
|
|
81
81
|
}, {
|
|
82
|
-
header:
|
|
82
|
+
header: l(() => [
|
|
83
83
|
h("div", ue, [
|
|
84
84
|
s(k, {
|
|
85
85
|
as: "h1",
|
|
86
86
|
variant: "title",
|
|
87
87
|
size: "small"
|
|
88
88
|
}, {
|
|
89
|
-
default:
|
|
89
|
+
default: l(() => [
|
|
90
90
|
c(y(o.title), 1)
|
|
91
91
|
]),
|
|
92
92
|
_: 1
|
|
@@ -97,7 +97,7 @@ const g = (e) => new Date(e), L = (e) => g(e).toLocaleDateString("pt-BR"), oe =
|
|
|
97
97
|
})
|
|
98
98
|
])
|
|
99
99
|
]),
|
|
100
|
-
default:
|
|
100
|
+
default: l(() => [
|
|
101
101
|
(p(!0), d(D, null, K(w.value, (u, x) => (p(), d(D, {
|
|
102
102
|
key: u.name
|
|
103
103
|
}, [
|
|
@@ -108,9 +108,9 @@ const g = (e) => new Date(e), L = (e) => g(e).toLocaleDateString("pt-BR"), oe =
|
|
|
108
108
|
text: "",
|
|
109
109
|
onClick: (U) => R(x)
|
|
110
110
|
}, {
|
|
111
|
-
default:
|
|
111
|
+
default: l(() => [
|
|
112
112
|
s(k, { as: "span" }, {
|
|
113
|
-
default:
|
|
113
|
+
default: l(() => [
|
|
114
114
|
c(y(u.label), 1)
|
|
115
115
|
]),
|
|
116
116
|
_: 2
|
|
@@ -128,7 +128,7 @@ const g = (e) => new Date(e), L = (e) => g(e).toLocaleDateString("pt-BR"), oe =
|
|
|
128
128
|
onRemove: (U) => z(u.name),
|
|
129
129
|
removable: ""
|
|
130
130
|
}, {
|
|
131
|
-
default:
|
|
131
|
+
default: l(() => [
|
|
132
132
|
c(y(u.formatChipLabel(u, i.value[u.name], i.value)), 1)
|
|
133
133
|
]),
|
|
134
134
|
_: 2
|
|
@@ -136,14 +136,14 @@ const g = (e) => new Date(e), L = (e) => g(e).toLocaleDateString("pt-BR"), oe =
|
|
|
136
136
|
])) : B("", !0)
|
|
137
137
|
], 64))), 128))
|
|
138
138
|
]),
|
|
139
|
-
footer:
|
|
139
|
+
footer: l(() => [
|
|
140
140
|
h("div", pe, [
|
|
141
141
|
s(C, {
|
|
142
142
|
class: "w-full",
|
|
143
143
|
onClick: O,
|
|
144
144
|
severity: "secondary"
|
|
145
145
|
}, {
|
|
146
|
-
default:
|
|
146
|
+
default: l(() => n[0] || (n[0] = [
|
|
147
147
|
c("Limpar")
|
|
148
148
|
])),
|
|
149
149
|
_: 1
|
|
@@ -152,7 +152,7 @@ const g = (e) => new Date(e), L = (e) => g(e).toLocaleDateString("pt-BR"), oe =
|
|
|
152
152
|
class: "w-full",
|
|
153
153
|
onClick: F
|
|
154
154
|
}, {
|
|
155
|
-
default:
|
|
155
|
+
default: l(() => n[1] || (n[1] = [
|
|
156
156
|
c("Aplicar")
|
|
157
157
|
])),
|
|
158
158
|
_: 1
|
|
@@ -167,7 +167,7 @@ const g = (e) => new Date(e), L = (e) => g(e).toLocaleDateString("pt-BR"), oe =
|
|
|
167
167
|
position: "right",
|
|
168
168
|
"show-close-icon": !1
|
|
169
169
|
}, {
|
|
170
|
-
header:
|
|
170
|
+
header: l(() => [
|
|
171
171
|
h("div", fe, [
|
|
172
172
|
s(P, {
|
|
173
173
|
icon: "arrow_back",
|
|
@@ -179,26 +179,26 @@ const g = (e) => new Date(e), L = (e) => g(e).toLocaleDateString("pt-BR"), oe =
|
|
|
179
179
|
variant: "title",
|
|
180
180
|
size: "small"
|
|
181
181
|
}, {
|
|
182
|
-
default:
|
|
182
|
+
default: l(() => [
|
|
183
183
|
c(y(m.value.label), 1)
|
|
184
184
|
]),
|
|
185
185
|
_: 1
|
|
186
186
|
})
|
|
187
187
|
])
|
|
188
188
|
]),
|
|
189
|
-
default:
|
|
189
|
+
default: l(() => [
|
|
190
190
|
(p(), Q(W(T.value), Z({
|
|
191
191
|
modelValue: X.value,
|
|
192
192
|
"onUpdate:modelValue": Y
|
|
193
193
|
}, m.value), null, 16, ["modelValue"]))
|
|
194
194
|
]),
|
|
195
|
-
footer:
|
|
195
|
+
footer: l(() => [
|
|
196
196
|
h("div", ve, [
|
|
197
197
|
s(C, {
|
|
198
198
|
class: "w-full",
|
|
199
199
|
onClick: E
|
|
200
200
|
}, {
|
|
201
|
-
default:
|
|
201
|
+
default: l(() => n[2] || (n[2] = [
|
|
202
202
|
c("Confirmar")
|
|
203
203
|
])),
|
|
204
204
|
_: 1
|