@wizepe/wizeui 0.1.161
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/LICENSE +21 -0
- package/README.md +67 -0
- package/dist/style.css +1 -0
- package/dist/wizeui.es.js +2309 -0
- package/dist/wizeui.umd.js +2 -0
- package/package.json +62 -0
|
@@ -0,0 +1,2309 @@
|
|
|
1
|
+
var Z = Object.defineProperty, Q = Object.defineProperties;
|
|
2
|
+
var ee = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var U = Object.getOwnPropertySymbols;
|
|
4
|
+
var te = Object.prototype.hasOwnProperty, se = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var q = (r, e, t) => e in r ? Z(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, b = (r, e) => {
|
|
6
|
+
for (var t in e || (e = {}))
|
|
7
|
+
te.call(e, t) && q(r, t, e[t]);
|
|
8
|
+
if (U)
|
|
9
|
+
for (var t of U(e))
|
|
10
|
+
se.call(e, t) && q(r, t, e[t]);
|
|
11
|
+
return r;
|
|
12
|
+
}, $ = (r, e) => Q(r, ee(e));
|
|
13
|
+
var E = (r, e, t) => new Promise((s, a) => {
|
|
14
|
+
var n = (i) => {
|
|
15
|
+
try {
|
|
16
|
+
o(t.next(i));
|
|
17
|
+
} catch (c) {
|
|
18
|
+
a(c);
|
|
19
|
+
}
|
|
20
|
+
}, l = (i) => {
|
|
21
|
+
try {
|
|
22
|
+
o(t.throw(i));
|
|
23
|
+
} catch (c) {
|
|
24
|
+
a(c);
|
|
25
|
+
}
|
|
26
|
+
}, o = (i) => i.done ? s(i.value) : Promise.resolve(i.value).then(n, l);
|
|
27
|
+
o((t = t.apply(r, e)).next());
|
|
28
|
+
});
|
|
29
|
+
import { computed as y, ref as z, onMounted as S, watch as T, onBeforeUnmount as V, getCurrentInstance as H, onUnmounted as ae } from "vue";
|
|
30
|
+
import * as R from "moment";
|
|
31
|
+
import k from "sweetalert";
|
|
32
|
+
import { helpers as K } from "vuelidate/lib/validators";
|
|
33
|
+
function g(r, e, t, s, a, n, l, o) {
|
|
34
|
+
var i = typeof r == "function" ? r.options : r;
|
|
35
|
+
e && (i.render = e, i.staticRenderFns = t, i._compiled = !0), s && (i.functional = !0), n && (i._scopeId = "data-v-" + n);
|
|
36
|
+
var c;
|
|
37
|
+
if (l ? (c = function(w) {
|
|
38
|
+
w = w || // cached call
|
|
39
|
+
this.$vnode && this.$vnode.ssrContext || // stateful
|
|
40
|
+
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !w && typeof __VUE_SSR_CONTEXT__ != "undefined" && (w = __VUE_SSR_CONTEXT__), a && a.call(this, w), w && w._registeredComponents && w._registeredComponents.add(l);
|
|
41
|
+
}, i._ssrRegister = c) : a && (c = o ? function() {
|
|
42
|
+
a.call(
|
|
43
|
+
this,
|
|
44
|
+
(i.functional ? this.parent : this).$root.$options.shadowRoot
|
|
45
|
+
);
|
|
46
|
+
} : a), c)
|
|
47
|
+
if (i.functional) {
|
|
48
|
+
i._injectStyles = c;
|
|
49
|
+
var v = i.render;
|
|
50
|
+
i.render = function(m, d) {
|
|
51
|
+
return c.call(d), v(m, d);
|
|
52
|
+
};
|
|
53
|
+
} else {
|
|
54
|
+
var u = i.beforeCreate;
|
|
55
|
+
i.beforeCreate = u ? [].concat(u, c) : [c];
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
exports: r,
|
|
59
|
+
options: i
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
const re = {
|
|
63
|
+
__name: "WzButton",
|
|
64
|
+
props: {
|
|
65
|
+
/**
|
|
66
|
+
* Visual style variant of the button.
|
|
67
|
+
* @values primary, primary-soft, secondary, secondary-soft, success, success-soft, danger, danger-soft, warning, warning-soft, info, info-soft, light, dark, link, outline, outline-secondary, outline-success, outline-danger, outline-warning, outline-info, outline-dark
|
|
68
|
+
*/
|
|
69
|
+
variant: {
|
|
70
|
+
type: String,
|
|
71
|
+
default: "primary",
|
|
72
|
+
validator: (r) => [
|
|
73
|
+
"primary",
|
|
74
|
+
"primary-soft",
|
|
75
|
+
"secondary",
|
|
76
|
+
"secondary-soft",
|
|
77
|
+
"success",
|
|
78
|
+
"success-soft",
|
|
79
|
+
"danger",
|
|
80
|
+
"danger-soft",
|
|
81
|
+
"warning",
|
|
82
|
+
"warning-soft",
|
|
83
|
+
"info",
|
|
84
|
+
"info-soft",
|
|
85
|
+
"light",
|
|
86
|
+
"dark",
|
|
87
|
+
"link",
|
|
88
|
+
"outline",
|
|
89
|
+
"outline-secondary",
|
|
90
|
+
"outline-success",
|
|
91
|
+
"outline-danger",
|
|
92
|
+
"outline-warning",
|
|
93
|
+
"outline-info",
|
|
94
|
+
"outline-dark"
|
|
95
|
+
].includes(r)
|
|
96
|
+
},
|
|
97
|
+
/**
|
|
98
|
+
* Size of the button.
|
|
99
|
+
* @values sm, md, lg, xl
|
|
100
|
+
*/
|
|
101
|
+
size: {
|
|
102
|
+
type: String,
|
|
103
|
+
default: "md",
|
|
104
|
+
validator: (r) => ["sm", "md", "lg", "xl"].includes(r)
|
|
105
|
+
},
|
|
106
|
+
/**
|
|
107
|
+
* Whether the button is disabled.
|
|
108
|
+
*/
|
|
109
|
+
disabled: {
|
|
110
|
+
type: Boolean,
|
|
111
|
+
default: !1
|
|
112
|
+
},
|
|
113
|
+
/**
|
|
114
|
+
* If true, renders as a block-level button (full width).
|
|
115
|
+
*/
|
|
116
|
+
block: {
|
|
117
|
+
type: Boolean,
|
|
118
|
+
default: !1
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
emits: ["click"],
|
|
122
|
+
setup(r, { emit: e }) {
|
|
123
|
+
const t = r, s = y(() => [
|
|
124
|
+
"wz-btn",
|
|
125
|
+
`wz-btn-${t.variant}`,
|
|
126
|
+
`wz-btn-${t.size}`,
|
|
127
|
+
{ "wz-btn-block": t.block }
|
|
128
|
+
]);
|
|
129
|
+
return { __sfc: !0, props: t, emit: e, classes: s, handleClick: (n) => {
|
|
130
|
+
t.disabled || e("click", n);
|
|
131
|
+
} };
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
var ne = function() {
|
|
135
|
+
var e = this, t = e._self._c, s = e._self._setupProxy;
|
|
136
|
+
return t("button", { class: s.classes, attrs: { disabled: e.disabled }, on: { click: s.handleClick } }, [e._t("default")], 2);
|
|
137
|
+
}, le = [], ie = /* @__PURE__ */ g(
|
|
138
|
+
re,
|
|
139
|
+
ne,
|
|
140
|
+
le,
|
|
141
|
+
!1,
|
|
142
|
+
null,
|
|
143
|
+
null,
|
|
144
|
+
null,
|
|
145
|
+
null
|
|
146
|
+
);
|
|
147
|
+
const J = ie.exports, oe = {
|
|
148
|
+
__name: "WzLayout",
|
|
149
|
+
props: {
|
|
150
|
+
/**
|
|
151
|
+
* Whether the sidebar is collapsed initially.
|
|
152
|
+
*/
|
|
153
|
+
defaultCollapsed: {
|
|
154
|
+
type: Boolean,
|
|
155
|
+
default: !1
|
|
156
|
+
},
|
|
157
|
+
/**
|
|
158
|
+
* Defines layout navigation architecture ('vertical' | 'horizontal')
|
|
159
|
+
*/
|
|
160
|
+
navigationStyle: {
|
|
161
|
+
type: String,
|
|
162
|
+
default: "vertical"
|
|
163
|
+
},
|
|
164
|
+
/**
|
|
165
|
+
* Layout visual theme ('light' | 'dark')
|
|
166
|
+
*/
|
|
167
|
+
theme: {
|
|
168
|
+
type: String,
|
|
169
|
+
default: "light"
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
setup(r) {
|
|
173
|
+
const e = r, t = z(e.defaultCollapsed), s = () => {
|
|
174
|
+
t.value = !t.value;
|
|
175
|
+
};
|
|
176
|
+
return S(() => {
|
|
177
|
+
typeof window != "undefined" && window.innerWidth <= 768 && (t.value = !0);
|
|
178
|
+
}), { __sfc: !0, props: e, isCollapsed: t, toggleSidebar: s };
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
var ce = function() {
|
|
182
|
+
var e = this, t = e._self._c, s = e._self._setupProxy;
|
|
183
|
+
return t("div", { staticClass: "wz-admin-layout", class: "is-" + e.navigationStyle, attrs: { "data-theme": e.theme } }, [t("div", { staticClass: "wz-admin-layout-sidebar-container" }, [s.isCollapsed ? e._e() : t("div", { staticClass: "wz-admin-layout-backdrop", on: { click: s.toggleSidebar } }), e._t("sidebar", null, { collapsed: s.isCollapsed })], 2), t("div", { staticClass: "wz-admin-layout-main" }, [t("div", { staticClass: "wz-admin-layout-header-container" }, [e._t("header", null, { toggleSidebar: s.toggleSidebar, collapsed: s.isCollapsed })], 2), e.navigationStyle === "horizontal" ? t("div", { staticClass: "wz-admin-layout-horizontal-nav-container" }, [e._t("horizontal-nav")], 2) : e._e(), t("main", { staticClass: "wz-admin-layout-content" }, [e._t("default")], 2)])]);
|
|
184
|
+
}, ue = [], de = /* @__PURE__ */ g(
|
|
185
|
+
oe,
|
|
186
|
+
ce,
|
|
187
|
+
ue,
|
|
188
|
+
!1,
|
|
189
|
+
null,
|
|
190
|
+
null,
|
|
191
|
+
null,
|
|
192
|
+
null
|
|
193
|
+
);
|
|
194
|
+
const pe = de.exports, fe = {
|
|
195
|
+
__name: "WzSidebar",
|
|
196
|
+
props: {
|
|
197
|
+
/**
|
|
198
|
+
* Array of nav items. Each item is either:
|
|
199
|
+
* - Nav item: { key, label, iconHtml, children[] }
|
|
200
|
+
* - Group label: { type: 'group', label }
|
|
201
|
+
*/
|
|
202
|
+
items: {
|
|
203
|
+
type: Array,
|
|
204
|
+
default: () => []
|
|
205
|
+
},
|
|
206
|
+
/**
|
|
207
|
+
* Key of the currently active item.
|
|
208
|
+
*/
|
|
209
|
+
activeKey: {
|
|
210
|
+
type: String,
|
|
211
|
+
default: null
|
|
212
|
+
},
|
|
213
|
+
/**
|
|
214
|
+
* Main logo image source.
|
|
215
|
+
*/
|
|
216
|
+
logoSrc: {
|
|
217
|
+
type: String,
|
|
218
|
+
default: null
|
|
219
|
+
},
|
|
220
|
+
/**
|
|
221
|
+
* Mini logo image source to show when collapsed.
|
|
222
|
+
*/
|
|
223
|
+
logoMiniSrc: {
|
|
224
|
+
type: String,
|
|
225
|
+
default: null
|
|
226
|
+
},
|
|
227
|
+
/**
|
|
228
|
+
* Brand name shown in the logo area.
|
|
229
|
+
*/
|
|
230
|
+
logoText: {
|
|
231
|
+
type: String,
|
|
232
|
+
default: "Admin"
|
|
233
|
+
},
|
|
234
|
+
/**
|
|
235
|
+
* SVG HTML string for the logo icon.
|
|
236
|
+
*/
|
|
237
|
+
logoIconHtml: {
|
|
238
|
+
type: String,
|
|
239
|
+
default: null
|
|
240
|
+
},
|
|
241
|
+
/**
|
|
242
|
+
* Whether the sidebar is collapsed (mini mode).
|
|
243
|
+
*/
|
|
244
|
+
collapsed: {
|
|
245
|
+
type: Boolean,
|
|
246
|
+
default: !1
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
emits: ["item-click"],
|
|
250
|
+
setup(r, { emit: e }) {
|
|
251
|
+
const t = r, s = z(!1), a = y(() => t.collapsed && !s.value), n = (d) => d.key === t.activeKey, l = (d) => d.children && d.children.length > 0, o = (d) => l(d) ? d.children.some((h) => h.key === t.activeKey) : !1, i = () => {
|
|
252
|
+
const d = /* @__PURE__ */ new Set();
|
|
253
|
+
return t.items.forEach((h) => {
|
|
254
|
+
l(h) && h.children.some((O) => O.key === t.activeKey) && d.add(h.key);
|
|
255
|
+
}), d;
|
|
256
|
+
}, c = z(i());
|
|
257
|
+
T(() => t.activeKey, () => {
|
|
258
|
+
t.items.forEach((d) => {
|
|
259
|
+
if (l(d) && d.children.some((h) => h.key === t.activeKey) && !c.value.has(d.key)) {
|
|
260
|
+
const h = new Set(c.value);
|
|
261
|
+
h.add(d.key), c.value = h;
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
});
|
|
265
|
+
const v = (d) => c.value.has(d.key), u = (d) => {
|
|
266
|
+
if (!l(d) || a.value)
|
|
267
|
+
return;
|
|
268
|
+
const h = new Set(c.value);
|
|
269
|
+
h.has(d.key) ? h.delete(d.key) : h.add(d.key), c.value = h;
|
|
270
|
+
};
|
|
271
|
+
return { __sfc: !0, props: t, emit: e, isHovered: s, visuallyCollapsed: a, isActive: n, hasChildren: l, hasActiveChild: o, buildOpenKeys: i, openKeys: c, isOpen: v, toggle: u, handleClick: (d) => {
|
|
272
|
+
if (a.value) {
|
|
273
|
+
e("item-click", d);
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
l(d) ? u(d) : e("item-click", d);
|
|
277
|
+
}, handleChildClick: (d) => {
|
|
278
|
+
e("item-click", d);
|
|
279
|
+
} };
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
var _e = function() {
|
|
283
|
+
var e = this, t = e._self._c, s = e._self._setupProxy;
|
|
284
|
+
return t("aside", { staticClass: "wz-sidebar", class: { "wz-sidebar--collapsed": s.visuallyCollapsed }, on: { mouseenter: function(a) {
|
|
285
|
+
s.isHovered = !0;
|
|
286
|
+
}, mouseleave: function(a) {
|
|
287
|
+
s.isHovered = !1;
|
|
288
|
+
} } }, [t("div", { staticClass: "wz-sidebar-logo" }, [e._t("logo", function() {
|
|
289
|
+
return [e.logoSrc || e.logoMiniSrc ? [t("img", { class: s.visuallyCollapsed ? "wz-sidebar-logo-img-mini" : "wz-sidebar-logo-img-icon", attrs: { src: s.visuallyCollapsed ? e.logoMiniSrc || e.logoSrc : e.logoSrc || e.logoMiniSrc, alt: e.logoText || "Logo" } }), e.logoText && !s.visuallyCollapsed ? t("span", { staticClass: "wz-sidebar-logo-text" }, [e._v(e._s(e.logoText))]) : e._e()] : [e.logoIconHtml ? t("span", { staticClass: "wz-sidebar-logo-icon", domProps: { innerHTML: e._s(e.logoIconHtml) } }) : e._e(), t("span", { directives: [{ name: "show", rawName: "v-show", value: !s.visuallyCollapsed, expression: "!visuallyCollapsed" }], staticClass: "wz-sidebar-logo-text" }, [e._v(e._s(e.logoText))])]];
|
|
290
|
+
})], 2), t("nav", { staticClass: "wz-sidebar-nav" }, [e._l(e.items, function(a, n) {
|
|
291
|
+
return [a.type === "group" ? t("div", { directives: [{ name: "show", rawName: "v-show", value: !s.visuallyCollapsed, expression: "!visuallyCollapsed" }], key: `group-${n}`, staticClass: "wz-sidebar-group" }, [e._v(" " + e._s(a.label) + " ")]) : t("div", { key: a.key || n, staticClass: "wz-sidebar-item-wrapper" }, [t("div", { staticClass: "wz-sidebar-item", class: { "wz-sidebar-item--active": s.isActive(a) || s.hasActiveChild(a) }, attrs: { title: s.visuallyCollapsed ? a.label : null }, on: { click: function(l) {
|
|
292
|
+
return s.handleClick(a);
|
|
293
|
+
} } }, [t("span", { staticClass: "wz-sidebar-icon" }, [e._t("icon", function() {
|
|
294
|
+
return [a.icon ? t("i", { class: a.icon, staticStyle: { "font-size": "1.125rem" } }) : a.iconHtml ? t("span", { domProps: { innerHTML: e._s(a.iconHtml) } }) : t("i", { staticClass: "ri-checkbox-blank-circle-line", staticStyle: { "font-size": "10px" } })];
|
|
295
|
+
}, { item: a })], 2), t("span", { directives: [{ name: "show", rawName: "v-show", value: !s.visuallyCollapsed, expression: "!visuallyCollapsed" }], staticClass: "wz-sidebar-label" }, [e._v(e._s(a.label))]), s.hasChildren(a) ? t("span", { directives: [{ name: "show", rawName: "v-show", value: !s.visuallyCollapsed, expression: "!visuallyCollapsed" }], staticClass: "wz-sidebar-arrow", class: { "wz-sidebar-arrow--open": s.isOpen(a) } }, [t("i", { staticClass: "ri-arrow-right-s-line", staticStyle: { "font-size": "1.125rem" } })]) : e._e()]), t("div", { directives: [{ name: "show", rawName: "v-show", value: !s.visuallyCollapsed, expression: "!visuallyCollapsed" }], staticClass: "wz-sidebar-children-wrapper", class: { "is-open": s.hasChildren(a) && s.isOpen(a) } }, [t("div", { staticClass: "wz-sidebar-children-inner" }, [s.hasChildren(a) ? t("div", { staticClass: "wz-sidebar-children" }, e._l(a.children, function(l) {
|
|
296
|
+
return t("div", { key: l.key, staticClass: "wz-sidebar-child-item", class: { "wz-sidebar-child-item--active": s.isActive(l) }, on: { click: function(o) {
|
|
297
|
+
return s.handleChildClick(l);
|
|
298
|
+
} } }, [t("span", { staticClass: "wz-sidebar-label" }, [e._v(e._s(l.label))]), s.hasChildren(l) ? t("span", { staticClass: "wz-sidebar-arrow" }, [t("i", { staticClass: "ri-arrow-right-s-line", staticStyle: { "font-size": "1rem" } })]) : e._e()]);
|
|
299
|
+
}), 0) : e._e()])])])];
|
|
300
|
+
})], 2)]);
|
|
301
|
+
}, we = [], ve = /* @__PURE__ */ g(
|
|
302
|
+
fe,
|
|
303
|
+
_e,
|
|
304
|
+
we,
|
|
305
|
+
!1,
|
|
306
|
+
null,
|
|
307
|
+
null,
|
|
308
|
+
null,
|
|
309
|
+
null
|
|
310
|
+
);
|
|
311
|
+
const ge = ve.exports, me = {
|
|
312
|
+
__name: "WzHeader",
|
|
313
|
+
props: {
|
|
314
|
+
/**
|
|
315
|
+
* User object with name and optional avatar URL.
|
|
316
|
+
*/
|
|
317
|
+
user: {
|
|
318
|
+
type: Object,
|
|
319
|
+
default: () => ({ name: "User", avatar: null })
|
|
320
|
+
},
|
|
321
|
+
/**
|
|
322
|
+
* Number shown on the notification badge. 0 hides the badge.
|
|
323
|
+
*/
|
|
324
|
+
notificationCount: {
|
|
325
|
+
type: Number,
|
|
326
|
+
default: 0
|
|
327
|
+
},
|
|
328
|
+
/**
|
|
329
|
+
* If true, changes the menu icon to a close (X) state.
|
|
330
|
+
*/
|
|
331
|
+
collapsed: {
|
|
332
|
+
type: Boolean,
|
|
333
|
+
default: !1
|
|
334
|
+
},
|
|
335
|
+
/**
|
|
336
|
+
* Action items array of objects { key, icon, badge, badgeCount? }
|
|
337
|
+
*/
|
|
338
|
+
actionItems: {
|
|
339
|
+
type: Array,
|
|
340
|
+
default: () => []
|
|
341
|
+
},
|
|
342
|
+
/**
|
|
343
|
+
* Dropdown menu items for the user { key, label, icon, isLogout? }
|
|
344
|
+
*/
|
|
345
|
+
userMenuItems: {
|
|
346
|
+
type: Array,
|
|
347
|
+
default: () => []
|
|
348
|
+
},
|
|
349
|
+
/**
|
|
350
|
+
* Subtitle to show below the username inside the dropdown
|
|
351
|
+
*/
|
|
352
|
+
userSubtitle: {
|
|
353
|
+
type: String,
|
|
354
|
+
default: ""
|
|
355
|
+
},
|
|
356
|
+
/**
|
|
357
|
+
* Main logo image source to display in header (mobile only)
|
|
358
|
+
*/
|
|
359
|
+
logoSrc: {
|
|
360
|
+
type: String,
|
|
361
|
+
default: ""
|
|
362
|
+
},
|
|
363
|
+
/**
|
|
364
|
+
* Layout hierarchy style ('vertical' | 'horizontal')
|
|
365
|
+
*/
|
|
366
|
+
layoutMode: {
|
|
367
|
+
type: String,
|
|
368
|
+
default: "vertical"
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
emits: ["menu-toggle", "search", "notifications", "settings", "user-click", "action-click", "user-menu-click"],
|
|
372
|
+
setup(r, { emit: e }) {
|
|
373
|
+
const t = r, s = y(() => {
|
|
374
|
+
var v, u;
|
|
375
|
+
return ((u = (v = t.user) == null ? void 0 : v.name) == null ? void 0 : u.split(" ")[0]) || "";
|
|
376
|
+
}), a = (v) => v ? v.split(" ").map((u) => u[0]).slice(0, 2).join("").toUpperCase() : "?", n = z(!1), l = z(null), o = () => {
|
|
377
|
+
n.value = !n.value, e("user-click");
|
|
378
|
+
}, i = (v) => {
|
|
379
|
+
e("user-menu-click", v), n.value = !1;
|
|
380
|
+
}, c = (v) => {
|
|
381
|
+
l.value && !l.value.contains(v.target) && (n.value = !1);
|
|
382
|
+
};
|
|
383
|
+
return S(() => {
|
|
384
|
+
document.addEventListener("click", c);
|
|
385
|
+
}), V(() => {
|
|
386
|
+
document.removeEventListener("click", c);
|
|
387
|
+
}), { __sfc: !0, props: t, emit: e, firstName: s, initials: a, isUserMenuOpen: n, userMenuContainer: l, toggleUserMenu: o, handleUserItemClick: i, handleClickOutside: c };
|
|
388
|
+
}
|
|
389
|
+
};
|
|
390
|
+
var ye = function() {
|
|
391
|
+
var e = this, t = e._self._c, s = e._self._setupProxy;
|
|
392
|
+
return t("header", { staticClass: "wz-header", class: { "wz-header--horizontal": e.layoutMode === "horizontal" } }, [t("div", { staticClass: "wz-header-left" }, [t("div", { staticClass: "wz-header-dynamic-logo", class: e.layoutMode === "horizontal" ? "wz-header-logo-always-visible" : "wz-header-mobile-logo" }, [e.logoSrc ? t("img", { staticClass: "wz-header-dynamic-logo-img", attrs: { src: e.logoSrc, alt: "Logo" } }) : e._e()]), e.layoutMode === "vertical" ? t("button", { staticClass: "wz-header-action wz-header-icon-desktop", attrs: { title: "Toggle Menu" }, on: { click: function(a) {
|
|
393
|
+
return e.$emit("menu-toggle");
|
|
394
|
+
} } }, [t("i", { class: e.collapsed ? "ri-close-line" : "ri-menu-line", staticStyle: { "font-size": "16px", "font-weight": "500", "line-height": "24px", color: "rgb(97, 116, 143)" } })]) : e._e(), t("button", { staticClass: "wz-header-action wz-header-icon-mobile", staticStyle: { display: "none" }, attrs: { title: "Toggle Menu" }, on: { click: function(a) {
|
|
395
|
+
return e.$emit("menu-toggle");
|
|
396
|
+
} } }, [t("i", { staticClass: "ri-menu-line", staticStyle: { "font-size": "16px", "font-weight": "500", "line-height": "24px", color: "rgb(97, 116, 143)" } })]), e._t("left")], 2), t("div", { staticClass: "wz-header-right" }, [e._t("actions", function() {
|
|
397
|
+
return [e.actionItems && e.actionItems.length ? [e._l(e.actionItems, function(a) {
|
|
398
|
+
return [a.badge ? t("div", { key: "badge-" + a.key, staticClass: "wz-header-badge" }, [t("button", { staticClass: "wz-header-action", attrs: { title: a.key }, on: { click: function(n) {
|
|
399
|
+
return s.emit("action-click", a);
|
|
400
|
+
} } }, [t("i", { class: a.icon, staticStyle: { "font-size": "1.125rem" } })]), a.badgeCount || e.notificationCount > 0 ? t("span", { staticClass: "wz-header-badge-dot" }, [e._v(" " + e._s(a.badgeCount || e.notificationCount > 9 ? "9+" : a.badgeCount || e.notificationCount) + " ")]) : e._e()]) : t("button", { key: a.key, staticClass: "wz-header-action", attrs: { title: a.key }, on: { click: function(n) {
|
|
401
|
+
return s.emit("action-click", a);
|
|
402
|
+
} } }, [t("i", { class: a.icon, staticStyle: { "font-size": "1.125rem" } })])];
|
|
403
|
+
})] : [t("button", { staticClass: "wz-header-action", attrs: { title: "Search" }, on: { click: function(a) {
|
|
404
|
+
return s.emit("search");
|
|
405
|
+
} } }, [t("i", { staticClass: "ri-search-line", staticStyle: { "font-size": "1.125rem" } })]), e._m(0), e._m(1), t("div", { staticClass: "wz-header-badge" }, [t("button", { staticClass: "wz-header-action", attrs: { title: "Notifications" }, on: { click: function(a) {
|
|
406
|
+
return s.emit("notifications");
|
|
407
|
+
} } }, [t("i", { staticClass: "ri-notification-3-line", staticStyle: { "font-size": "1.125rem" } })]), e.notificationCount > 0 ? t("span", { staticClass: "wz-header-badge-dot" }, [e._v(" " + e._s(e.notificationCount > 9 ? "9+" : e.notificationCount) + " ")]) : e._e()]), e._m(2), e._m(3)]];
|
|
408
|
+
}), t("button", { staticClass: "wz-header-action", attrs: { title: "Settings" }, on: { click: function(a) {
|
|
409
|
+
return s.emit("settings");
|
|
410
|
+
} } }, [t("i", { staticClass: "ri-settings-3-line wz-anim-spin", staticStyle: { "font-size": "1.125rem", display: "inline-block" } })]), t("div", { staticClass: "wz-header-divider" }), t("div", { ref: "userMenuContainer", staticClass: "wz-header-user-wrapper" }, [e._t("user", function() {
|
|
411
|
+
return [t("div", { staticClass: "wz-header-user", on: { click: function(a) {
|
|
412
|
+
return a.stopPropagation(), s.toggleUserMenu.apply(null, arguments);
|
|
413
|
+
} } }, [e.user.avatar ? t("img", { staticClass: "wz-header-user-avatar", attrs: { src: e.user.avatar, alt: e.user.name } }) : t("div", { staticClass: "wz-header-user-avatar-placeholder" }, [e._v(" " + e._s(s.initials(e.user.name)) + " ")]), t("span", { staticClass: "wz-header-user-name wz-header-user-name--full" }, [e._v(e._s(e.user.name))]), t("span", { staticClass: "wz-header-user-name wz-header-user-name--short" }, [e._v(e._s(s.firstName))])])];
|
|
414
|
+
}), e.userMenuItems && e.userMenuItems.length > 0 ? t("div", { directives: [{ name: "show", rawName: "v-show", value: s.isUserMenuOpen, expression: "isUserMenuOpen" }], staticClass: "wz-header-dropdown" }, [t("div", { staticClass: "wz-header-dropdown-header" }, [t("div", { staticClass: "wz-header-dropdown-title" }, [e._v(e._s(e.user.name))]), e.userSubtitle ? t("div", { staticClass: "wz-header-dropdown-subtitle" }, [e._v(e._s(e.userSubtitle))]) : e._e()]), t("div", { staticClass: "wz-header-dropdown-body" }, e._l(e.userMenuItems, function(a, n) {
|
|
415
|
+
return t("div", { key: n, staticClass: "wz-header-dropdown-item", class: { "wz-header-dropdown-item--logout": a.isLogout }, on: { click: function(l) {
|
|
416
|
+
return s.handleUserItemClick(a);
|
|
417
|
+
} } }, [a.icon && !a.isLogout ? t("i", { class: a.icon }) : e._e(), t("span", [e._v(e._s(a.label))])]);
|
|
418
|
+
}), 0)]) : e._e()], 2)], 2)]);
|
|
419
|
+
}, he = [function() {
|
|
420
|
+
var r = this, e = r._self._c;
|
|
421
|
+
return r._self._setupProxy, e("button", { staticClass: "wz-header-action", attrs: { title: "Language" } }, [e("i", { staticClass: "ri-global-line", staticStyle: { "font-size": "1.125rem" } })]);
|
|
422
|
+
}, function() {
|
|
423
|
+
var r = this, e = r._self._c;
|
|
424
|
+
return r._self._setupProxy, e("button", { staticClass: "wz-header-action", attrs: { title: "Toggle dark mode" } }, [e("i", { staticClass: "ri-moon-line", staticStyle: { "font-size": "1.125rem" } })]);
|
|
425
|
+
}, function() {
|
|
426
|
+
var r = this, e = r._self._c;
|
|
427
|
+
return r._self._setupProxy, e("button", { staticClass: "wz-header-action", attrs: { title: "Calendar" } }, [e("i", { staticClass: "ri-calendar-line", staticStyle: { "font-size": "1.125rem" } })]);
|
|
428
|
+
}, function() {
|
|
429
|
+
var r = this, e = r._self._c;
|
|
430
|
+
return r._self._setupProxy, e("button", { staticClass: "wz-header-action", attrs: { title: "Fullscreen" } }, [e("i", { staticClass: "ri-fullscreen-line", staticStyle: { "font-size": "1.125rem" } })]);
|
|
431
|
+
}], ze = /* @__PURE__ */ g(
|
|
432
|
+
me,
|
|
433
|
+
ye,
|
|
434
|
+
he,
|
|
435
|
+
!1,
|
|
436
|
+
null,
|
|
437
|
+
null,
|
|
438
|
+
null,
|
|
439
|
+
null
|
|
440
|
+
);
|
|
441
|
+
const Ce = ze.exports, be = {
|
|
442
|
+
__name: "WzSettingsPanel",
|
|
443
|
+
props: {
|
|
444
|
+
/**
|
|
445
|
+
* Defines if the Settings Drawer is currently open
|
|
446
|
+
*/
|
|
447
|
+
isOpen: {
|
|
448
|
+
type: Boolean,
|
|
449
|
+
default: !1
|
|
450
|
+
},
|
|
451
|
+
/**
|
|
452
|
+
* Title shown at the top of the Switcher
|
|
453
|
+
*/
|
|
454
|
+
title: {
|
|
455
|
+
type: String,
|
|
456
|
+
default: "Configuración general"
|
|
457
|
+
},
|
|
458
|
+
/**
|
|
459
|
+
* Active values mapped by ID. e.g. { themeMode: 'light', navigationStyle: 'vertical' }
|
|
460
|
+
*/
|
|
461
|
+
value: {
|
|
462
|
+
type: Object,
|
|
463
|
+
default: () => ({})
|
|
464
|
+
},
|
|
465
|
+
/**
|
|
466
|
+
* Array of extra dynamic setting blocks to inject globally below the defaults
|
|
467
|
+
*/
|
|
468
|
+
extraSettings: {
|
|
469
|
+
type: Array,
|
|
470
|
+
default: () => []
|
|
471
|
+
}
|
|
472
|
+
},
|
|
473
|
+
emits: ["close", "input", "setting-change"],
|
|
474
|
+
setup(r, { emit: e }) {
|
|
475
|
+
const t = r, s = [
|
|
476
|
+
{
|
|
477
|
+
id: "themeMode",
|
|
478
|
+
title: "Modo de color:",
|
|
479
|
+
options: [
|
|
480
|
+
{ value: "light", label: "Claro" },
|
|
481
|
+
{ value: "dark", label: "Oscuro" }
|
|
482
|
+
]
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
id: "navigationStyle",
|
|
486
|
+
title: "Estilo de navegación:",
|
|
487
|
+
options: [
|
|
488
|
+
{ value: "vertical", label: "Vertical" },
|
|
489
|
+
{ value: "horizontal", label: "Horizontal" }
|
|
490
|
+
]
|
|
491
|
+
}
|
|
492
|
+
], a = y(() => [...s, ...t.extraSettings]);
|
|
493
|
+
return { __sfc: !0, props: t, emit: e, baseSettings: s, allSettings: a, handleSelection: (o, i) => {
|
|
494
|
+
const c = $(b({}, t.value), { [o]: i });
|
|
495
|
+
e("input", c), e("setting-change", { id: o, value: i });
|
|
496
|
+
}, closePanel: () => {
|
|
497
|
+
e("close");
|
|
498
|
+
} };
|
|
499
|
+
}
|
|
500
|
+
};
|
|
501
|
+
var ke = function() {
|
|
502
|
+
var e = this, t = e._self._c, s = e._self._setupProxy;
|
|
503
|
+
return t("div", { staticClass: "wz-settings", class: { "wz-settings--open": e.isOpen } }, [t("div", { staticClass: "wz-settings-overlay", on: { click: s.closePanel } }), t("aside", { staticClass: "wz-settings-panel" }, [t("div", { staticClass: "wz-settings-header" }, [t("h3", { staticClass: "wz-settings-title" }, [e._v(e._s(e.title))]), t("button", { staticClass: "wz-settings-close", attrs: { title: "Close Settings" }, on: { click: s.closePanel } }, [t("i", { staticClass: "ri-close-circle-line" })])]), e._m(0), t("div", { staticClass: "wz-settings-body" }, [e._l(s.allSettings, function(a) {
|
|
504
|
+
return [t("div", { key: a.id, staticClass: "wz-settings-section" }, [t("h4", { staticClass: "wz-settings-section-title" }, [e._v(e._s(a.title))]), t("div", { staticClass: "wz-settings-radio-group" }, e._l(a.options, function(n) {
|
|
505
|
+
return t("label", { key: n.value, staticClass: "wz-settings-radio-label" }, [t("div", { staticClass: "wz-settings-radio-circle", class: { "wz-settings-radio-circle--active": e.value[a.id] === n.value } }, [t("span", { directives: [{ name: "show", rawName: "v-show", value: e.value[a.id] === n.value, expression: "value[setting.id] === opt.value" }], staticClass: "wz-settings-radio-dot" })]), t("input", { staticClass: "wz-settings-radio-native", attrs: { type: "radio", name: a.id }, domProps: { value: n.value, checked: e.value[a.id] === n.value }, on: { change: function(l) {
|
|
506
|
+
return s.handleSelection(a.id, n.value);
|
|
507
|
+
} } }), t("span", { staticClass: "wz-settings-radio-text" }, [e._v(e._s(n.label))])]);
|
|
508
|
+
}), 0)])];
|
|
509
|
+
})], 2)])]);
|
|
510
|
+
}, xe = [function() {
|
|
511
|
+
var r = this, e = r._self._c;
|
|
512
|
+
return r._self._setupProxy, e("div", { staticClass: "wz-settings-tabs" }, [e("div", { staticClass: "wz-settings-tab wz-settings-tab--active" }, [r._v("Estilo del tema")])]);
|
|
513
|
+
}], $e = /* @__PURE__ */ g(
|
|
514
|
+
be,
|
|
515
|
+
ke,
|
|
516
|
+
xe,
|
|
517
|
+
!1,
|
|
518
|
+
null,
|
|
519
|
+
null,
|
|
520
|
+
null,
|
|
521
|
+
null
|
|
522
|
+
);
|
|
523
|
+
const Se = $e.exports, Pe = {
|
|
524
|
+
__name: "WzHorizontalNav",
|
|
525
|
+
props: {
|
|
526
|
+
items: {
|
|
527
|
+
type: Array,
|
|
528
|
+
default: () => []
|
|
529
|
+
},
|
|
530
|
+
activeKey: {
|
|
531
|
+
type: String,
|
|
532
|
+
default: null
|
|
533
|
+
}
|
|
534
|
+
},
|
|
535
|
+
emits: ["item-click"],
|
|
536
|
+
setup(r, { emit: e }) {
|
|
537
|
+
const t = r, s = z(null), a = (u) => {
|
|
538
|
+
s.value && s.value.scrollBy({ left: u * 250, behavior: "smooth" });
|
|
539
|
+
}, n = z(null), l = z({}), o = (u) => {
|
|
540
|
+
const m = u.closest(".wz-horizontal-nav").getBoundingClientRect(), d = u.getBoundingClientRect();
|
|
541
|
+
l.value = {
|
|
542
|
+
top: "100%",
|
|
543
|
+
left: d.left - m.left + "px"
|
|
544
|
+
};
|
|
545
|
+
}, i = (u, w) => {
|
|
546
|
+
if (!u.children || u.children.length === 0) {
|
|
547
|
+
e("item-click", u), n.value = null;
|
|
548
|
+
return;
|
|
549
|
+
}
|
|
550
|
+
n.value === u.key ? n.value = null : (o(w.currentTarget), n.value = u.key);
|
|
551
|
+
}, c = (u) => {
|
|
552
|
+
e("item-click", u), n.value = null;
|
|
553
|
+
}, v = (u) => {
|
|
554
|
+
u.target.closest(".wz-horizontal-nav") || (n.value = null);
|
|
555
|
+
};
|
|
556
|
+
return S(() => {
|
|
557
|
+
document.addEventListener("click", v);
|
|
558
|
+
}), V(() => {
|
|
559
|
+
document.removeEventListener("click", v);
|
|
560
|
+
}), { __sfc: !0, props: t, emit: e, trackWrapper: s, scroll: a, openDropdown: n, dropdownStyle: l, positionDropdown: o, toggleDropdown: i, handleChildClick: c, handleDocClick: v };
|
|
561
|
+
}
|
|
562
|
+
};
|
|
563
|
+
var Fe = function() {
|
|
564
|
+
var e = this, t = e._self._c, s = e._self._setupProxy;
|
|
565
|
+
return t("div", { staticClass: "wz-horizontal-nav" }, [t("button", { staticClass: "wz-horizontal-nav-arrow", on: { click: function(a) {
|
|
566
|
+
return a.stopPropagation(), s.scroll(-1);
|
|
567
|
+
} } }, [t("i", { staticClass: "ri-arrow-left-s-line" })]), t("div", { ref: "trackWrapper", staticClass: "wz-horizontal-nav-track-wrapper" }, [t("div", { staticClass: "wz-horizontal-nav-track" }, [e._l(e.items, function(a, n) {
|
|
568
|
+
return [a.type !== "group" ? t("div", { key: a.key || n, staticClass: "wz-horizontal-nav-item", class: {
|
|
569
|
+
"wz-horizontal-nav-item--active": a.key === e.activeKey || a.children && a.children.some((l) => l.key === e.activeKey),
|
|
570
|
+
"wz-horizontal-nav-item--open": s.openDropdown === a.key
|
|
571
|
+
}, on: { click: function(l) {
|
|
572
|
+
return l.stopPropagation(), s.toggleDropdown(a, l);
|
|
573
|
+
} } }, [a.icon ? t("i", { class: a.icon }) : e._e(), t("span", [e._v(e._s(a.label))]), a.children && a.children.length > 0 ? t("i", { staticClass: "wz-horizontal-nav-chevron", class: s.openDropdown === a.key ? "ri-arrow-down-s-line" : "ri-arrow-right-s-line" }) : e._e()]) : e._e()];
|
|
574
|
+
})], 2)]), t("button", { staticClass: "wz-horizontal-nav-arrow", on: { click: function(a) {
|
|
575
|
+
return a.stopPropagation(), s.scroll(1);
|
|
576
|
+
} } }, [t("i", { staticClass: "ri-arrow-right-s-line" })]), s.openDropdown ? t("div", { staticClass: "wz-horizontal-nav-dropdown", style: s.dropdownStyle, on: { click: function(a) {
|
|
577
|
+
a.stopPropagation();
|
|
578
|
+
} } }, [e._l(e.items, function(a) {
|
|
579
|
+
return [a.key === s.openDropdown && a.children ? e._l(a.children, function(n) {
|
|
580
|
+
return t("div", { key: n.key, staticClass: "wz-horizontal-dropdown-child", class: { "wz-horizontal-dropdown-child--active": n.key === e.activeKey }, on: { click: function(l) {
|
|
581
|
+
return l.stopPropagation(), s.handleChildClick(n);
|
|
582
|
+
} } }, [t("span", [e._v(e._s(n.label))]), n.children && n.children.length > 0 ? t("i", { staticClass: "ri-arrow-right-s-line wz-horizontal-dropdown-child-arrow" }) : e._e()]);
|
|
583
|
+
}) : e._e()];
|
|
584
|
+
})], 2) : e._e()]);
|
|
585
|
+
}, Te = [], Oe = /* @__PURE__ */ g(
|
|
586
|
+
Pe,
|
|
587
|
+
Fe,
|
|
588
|
+
Te,
|
|
589
|
+
!1,
|
|
590
|
+
null,
|
|
591
|
+
null,
|
|
592
|
+
null,
|
|
593
|
+
null
|
|
594
|
+
);
|
|
595
|
+
const Ie = Oe.exports, Ee = {
|
|
596
|
+
__name: "WzCard",
|
|
597
|
+
props: {
|
|
598
|
+
/**
|
|
599
|
+
* Main title of the card header
|
|
600
|
+
*/
|
|
601
|
+
title: {
|
|
602
|
+
type: String,
|
|
603
|
+
default: ""
|
|
604
|
+
},
|
|
605
|
+
/**
|
|
606
|
+
* Shadow size: none, sm, md, lg
|
|
607
|
+
*/
|
|
608
|
+
shadow: {
|
|
609
|
+
type: String,
|
|
610
|
+
default: "sm"
|
|
611
|
+
},
|
|
612
|
+
/**
|
|
613
|
+
* Whether the card body has default padding
|
|
614
|
+
*/
|
|
615
|
+
bodyPadding: {
|
|
616
|
+
type: Boolean,
|
|
617
|
+
default: !0
|
|
618
|
+
},
|
|
619
|
+
/**
|
|
620
|
+
* Whether to show a separating border below the header
|
|
621
|
+
*/
|
|
622
|
+
headerBorder: {
|
|
623
|
+
type: Boolean,
|
|
624
|
+
default: !0
|
|
625
|
+
},
|
|
626
|
+
/**
|
|
627
|
+
* Adds an interactive hover effect (lifts up and adds shadow)
|
|
628
|
+
*/
|
|
629
|
+
hoverable: {
|
|
630
|
+
type: Boolean,
|
|
631
|
+
default: !1
|
|
632
|
+
}
|
|
633
|
+
},
|
|
634
|
+
emits: ["click", "header-click"],
|
|
635
|
+
setup(r, { emit: e }) {
|
|
636
|
+
const t = r, s = y(() => [
|
|
637
|
+
`wz-card--${t.shadow}`,
|
|
638
|
+
{ "wz-card--hoverable": t.hoverable }
|
|
639
|
+
]);
|
|
640
|
+
return { __sfc: !0, props: t, emit: e, cardClasses: s };
|
|
641
|
+
}
|
|
642
|
+
};
|
|
643
|
+
var Re = function() {
|
|
644
|
+
var e = this, t = e._self._c, s = e._self._setupProxy;
|
|
645
|
+
return t("div", { staticClass: "wz-card", class: s.cardClasses, on: { click: function(a) {
|
|
646
|
+
return s.emit("click", a);
|
|
647
|
+
} } }, [e.$slots.header || e.title || e.$slots["header-actions"] ? t("div", { staticClass: "wz-card-header", class: { "wz-card-header--border": e.headerBorder }, on: { click: function(a) {
|
|
648
|
+
return s.emit("header-click", a);
|
|
649
|
+
} } }, [e._t("header", function() {
|
|
650
|
+
return [t("div", { staticClass: "wz-card-title section-title" }, [e._t("header-title", function() {
|
|
651
|
+
return [e._v(e._s(e.title))];
|
|
652
|
+
})], 2), e.$slots["header-actions"] ? t("div", { staticClass: "wz-card-actions" }, [e._t("header-actions")], 2) : e._e()];
|
|
653
|
+
})], 2) : e._e(), t("div", { staticClass: "wz-card-body", class: { "wz-card-body--no-padding": !e.bodyPadding } }, [e._t("default")], 2), e.$slots.footer ? t("div", { staticClass: "wz-card-footer" }, [e._t("footer")], 2) : e._e()]);
|
|
654
|
+
}, Ae = [], Me = /* @__PURE__ */ g(
|
|
655
|
+
Ee,
|
|
656
|
+
Re,
|
|
657
|
+
Ae,
|
|
658
|
+
!1,
|
|
659
|
+
null,
|
|
660
|
+
null,
|
|
661
|
+
null,
|
|
662
|
+
null
|
|
663
|
+
);
|
|
664
|
+
const We = Me.exports, De = {
|
|
665
|
+
__name: "WzAlert",
|
|
666
|
+
props: {
|
|
667
|
+
variant: {
|
|
668
|
+
type: String,
|
|
669
|
+
default: "primary"
|
|
670
|
+
// primary, secondary, success, danger, warning, info, light, dark
|
|
671
|
+
},
|
|
672
|
+
icon: {
|
|
673
|
+
type: String,
|
|
674
|
+
default: ""
|
|
675
|
+
// e.g. "ri-information-line"
|
|
676
|
+
},
|
|
677
|
+
dismissible: {
|
|
678
|
+
type: Boolean,
|
|
679
|
+
default: !1
|
|
680
|
+
}
|
|
681
|
+
},
|
|
682
|
+
emits: ["dismiss"],
|
|
683
|
+
setup(r, { emit: e }) {
|
|
684
|
+
return { __sfc: !0, props: r, emit: e };
|
|
685
|
+
}
|
|
686
|
+
};
|
|
687
|
+
var Be = function() {
|
|
688
|
+
var e = this, t = e._self._c, s = e._self._setupProxy;
|
|
689
|
+
return t("div", { staticClass: "wz-alert", class: [`wz-alert--${e.variant}`] }, [e.icon || e.$slots.icon ? t("div", { staticClass: "wz-alert-icon" }, [e._t("icon", function() {
|
|
690
|
+
return [e.icon ? t("i", { class: e.icon }) : e._e()];
|
|
691
|
+
})], 2) : e._e(), t("div", { staticClass: "wz-alert-content" }, [e._t("default")], 2), e.dismissible ? t("button", { staticClass: "wz-alert-dismiss", attrs: { title: "Dismiss" }, on: { click: function(a) {
|
|
692
|
+
return s.emit("dismiss");
|
|
693
|
+
} } }, [t("i", { staticClass: "ri-close-line" })]) : e._e()]);
|
|
694
|
+
}, Ve = [], Le = /* @__PURE__ */ g(
|
|
695
|
+
De,
|
|
696
|
+
Be,
|
|
697
|
+
Ve,
|
|
698
|
+
!1,
|
|
699
|
+
null,
|
|
700
|
+
null,
|
|
701
|
+
null,
|
|
702
|
+
null
|
|
703
|
+
);
|
|
704
|
+
const Ne = Le.exports, Ue = {
|
|
705
|
+
__name: "WzBadge",
|
|
706
|
+
props: {
|
|
707
|
+
variant: {
|
|
708
|
+
type: String,
|
|
709
|
+
default: "primary"
|
|
710
|
+
// soft (translucent): primary secondary success warning danger info light dark
|
|
711
|
+
// solid (filled): primary-solid secondary-solid success-solid warning-solid danger-solid info-solid
|
|
712
|
+
// outline (border): outline-primary outline-secondary outline-success outline-warning outline-danger outline-info
|
|
713
|
+
},
|
|
714
|
+
pill: {
|
|
715
|
+
type: Boolean,
|
|
716
|
+
default: !1
|
|
717
|
+
},
|
|
718
|
+
icon: {
|
|
719
|
+
type: String,
|
|
720
|
+
default: ""
|
|
721
|
+
},
|
|
722
|
+
dismissible: {
|
|
723
|
+
type: Boolean,
|
|
724
|
+
default: !1
|
|
725
|
+
}
|
|
726
|
+
},
|
|
727
|
+
emits: ["dismiss"],
|
|
728
|
+
setup(r, { emit: e }) {
|
|
729
|
+
return { __sfc: !0, props: r, emit: e };
|
|
730
|
+
}
|
|
731
|
+
};
|
|
732
|
+
var qe = function() {
|
|
733
|
+
var e = this, t = e._self._c, s = e._self._setupProxy;
|
|
734
|
+
return t("span", { staticClass: "wz-badge", class: [`wz-badge--${e.variant}`, { "wz-badge--pill": e.pill }] }, [e.icon ? t("i", { class: [e.icon, "wz-badge-icon"] }) : e._e(), e._t("default"), e.dismissible ? t("button", { staticClass: "wz-badge-dismiss", attrs: { title: "Dismiss" }, on: { click: function(a) {
|
|
735
|
+
return a.stopPropagation(), s.emit("dismiss");
|
|
736
|
+
} } }, [t("i", { staticClass: "ri-close-line" })]) : e._e()], 2);
|
|
737
|
+
}, Ke = [], je = /* @__PURE__ */ g(
|
|
738
|
+
Ue,
|
|
739
|
+
qe,
|
|
740
|
+
Ke,
|
|
741
|
+
!1,
|
|
742
|
+
null,
|
|
743
|
+
null,
|
|
744
|
+
null,
|
|
745
|
+
null
|
|
746
|
+
);
|
|
747
|
+
const G = je.exports, Ye = {
|
|
748
|
+
__name: "WzDropdown",
|
|
749
|
+
props: {
|
|
750
|
+
/**
|
|
751
|
+
* Array de opciones: { key: string, label: string, danger?: boolean }
|
|
752
|
+
*/
|
|
753
|
+
items: {
|
|
754
|
+
type: Array,
|
|
755
|
+
default: () => []
|
|
756
|
+
},
|
|
757
|
+
/**
|
|
758
|
+
* Clase RemixIcon del botón trigger.
|
|
759
|
+
*/
|
|
760
|
+
triggerIcon: {
|
|
761
|
+
type: String,
|
|
762
|
+
default: "ri-more-2-fill"
|
|
763
|
+
},
|
|
764
|
+
/**
|
|
765
|
+
* Tooltip del botón trigger.
|
|
766
|
+
*/
|
|
767
|
+
triggerTitle: {
|
|
768
|
+
type: String,
|
|
769
|
+
default: "Opciones"
|
|
770
|
+
},
|
|
771
|
+
/**
|
|
772
|
+
* Apertura del menú: 'left' lo alinea a la derecha del trigger (se abre hacia la izquierda),
|
|
773
|
+
* 'right' lo alinea a la izquierda del trigger (se abre hacia la derecha).
|
|
774
|
+
*/
|
|
775
|
+
placement: {
|
|
776
|
+
type: String,
|
|
777
|
+
default: "left",
|
|
778
|
+
validator: (r) => ["left", "right"].includes(r)
|
|
779
|
+
}
|
|
780
|
+
},
|
|
781
|
+
emits: ["click"],
|
|
782
|
+
setup(r, { emit: e }) {
|
|
783
|
+
const t = r, s = z(!1), a = z(null), n = z(null), l = z(null), o = z({
|
|
784
|
+
position: "fixed",
|
|
785
|
+
top: "0px",
|
|
786
|
+
left: "0px",
|
|
787
|
+
zIndex: 99999
|
|
788
|
+
});
|
|
789
|
+
function i() {
|
|
790
|
+
if (!n.value)
|
|
791
|
+
return;
|
|
792
|
+
const m = n.value.getBoundingClientRect(), d = document.documentElement.clientWidth, h = m.bottom + 2;
|
|
793
|
+
t.placement === "left" ? o.value = {
|
|
794
|
+
position: "fixed",
|
|
795
|
+
top: h + "px",
|
|
796
|
+
right: d - m.right + 12 + "px",
|
|
797
|
+
left: "auto",
|
|
798
|
+
zIndex: 99999
|
|
799
|
+
} : o.value = {
|
|
800
|
+
position: "fixed",
|
|
801
|
+
top: h + "px",
|
|
802
|
+
left: m.left + "px",
|
|
803
|
+
right: "auto",
|
|
804
|
+
zIndex: 99999
|
|
805
|
+
};
|
|
806
|
+
}
|
|
807
|
+
function c() {
|
|
808
|
+
s.value || i(), s.value = !s.value;
|
|
809
|
+
}
|
|
810
|
+
function v(m) {
|
|
811
|
+
e("click", m), s.value = !1;
|
|
812
|
+
}
|
|
813
|
+
function u(m) {
|
|
814
|
+
a.value && !a.value.contains(m.target) && (s.value = !1);
|
|
815
|
+
}
|
|
816
|
+
function w() {
|
|
817
|
+
s.value && i();
|
|
818
|
+
}
|
|
819
|
+
return S(() => {
|
|
820
|
+
document.addEventListener("mousedown", u), document.addEventListener("scroll", w, !0), window.addEventListener("resize", w);
|
|
821
|
+
}), V(() => {
|
|
822
|
+
document.removeEventListener("mousedown", u), document.removeEventListener("scroll", w, !0), window.removeEventListener("resize", w);
|
|
823
|
+
}), { __sfc: !0, props: t, emit: e, isOpen: s, dropdownWrapper: a, triggerBtn: n, menuEl: l, menuStyle: o, calcPosition: i, toggle: c, handleClick: v, handleClickOutside: u, handleScroll: w };
|
|
824
|
+
}
|
|
825
|
+
};
|
|
826
|
+
var He = function() {
|
|
827
|
+
var e = this, t = e._self._c, s = e._self._setupProxy;
|
|
828
|
+
return t("div", { ref: "dropdownWrapper", staticClass: "wz-dropdown" }, [t("button", { ref: "triggerBtn", staticClass: "wz-dropdown-trigger", attrs: { title: e.triggerTitle }, on: { click: function(a) {
|
|
829
|
+
return a.stopPropagation(), s.toggle.apply(null, arguments);
|
|
830
|
+
} } }, [e._t("trigger", function() {
|
|
831
|
+
return [t("i", { class: e.triggerIcon })];
|
|
832
|
+
})], 2), t("div", { directives: [{ name: "show", rawName: "v-show", value: s.isOpen, expression: "isOpen" }], ref: "menuEl", staticClass: "wz-dropdown-menu", style: s.menuStyle }, e._l(e.items, function(a) {
|
|
833
|
+
return t("div", { key: a.key, staticClass: "wz-dropdown-item", class: { "wz-dropdown-item--danger": a.danger }, on: { click: function(n) {
|
|
834
|
+
return n.stopPropagation(), s.handleClick(a);
|
|
835
|
+
} } }, [t("span", [e._v(e._s(a.label))])]);
|
|
836
|
+
}), 0)]);
|
|
837
|
+
}, Je = [], Ge = /* @__PURE__ */ g(
|
|
838
|
+
Ye,
|
|
839
|
+
He,
|
|
840
|
+
Je,
|
|
841
|
+
!1,
|
|
842
|
+
null,
|
|
843
|
+
null,
|
|
844
|
+
null,
|
|
845
|
+
null
|
|
846
|
+
);
|
|
847
|
+
const Xe = Ge.exports, Ze = {
|
|
848
|
+
__name: "WzTableContainer",
|
|
849
|
+
setup(r) {
|
|
850
|
+
return { __sfc: !0 };
|
|
851
|
+
}
|
|
852
|
+
};
|
|
853
|
+
var Qe = function() {
|
|
854
|
+
var e = this, t = e._self._c;
|
|
855
|
+
return e._self._setupProxy, t("div", { staticClass: "wz-table-container" }, [e._t("default")], 2);
|
|
856
|
+
}, et = [], tt = /* @__PURE__ */ g(
|
|
857
|
+
Ze,
|
|
858
|
+
Qe,
|
|
859
|
+
et,
|
|
860
|
+
!1,
|
|
861
|
+
null,
|
|
862
|
+
null,
|
|
863
|
+
null,
|
|
864
|
+
null
|
|
865
|
+
);
|
|
866
|
+
const st = tt.exports, at = {
|
|
867
|
+
__name: "WzTableToolbar",
|
|
868
|
+
setup(r) {
|
|
869
|
+
return { __sfc: !0 };
|
|
870
|
+
}
|
|
871
|
+
};
|
|
872
|
+
var rt = function() {
|
|
873
|
+
var e = this, t = e._self._c;
|
|
874
|
+
return e._self._setupProxy, t("div", { staticClass: "wz-table-toolbar" }, [t("div", { staticClass: "wz-table-toolbar-top" }, [e.$slots.left || e.$scopedSlots.left ? t("div", { staticClass: "wz-table-toolbar-left" }, [e._t("left")], 2) : e._e(), e.$slots.right || e.$scopedSlots.right ? t("div", { staticClass: "wz-table-toolbar-right" }, [e._t("right")], 2) : e._e()]), e.$slots.filters || e.$scopedSlots.filters ? t("div", { staticClass: "wz-table-toolbar-bottom" }, [e._t("filters")], 2) : e._e()]);
|
|
875
|
+
}, nt = [], lt = /* @__PURE__ */ g(
|
|
876
|
+
at,
|
|
877
|
+
rt,
|
|
878
|
+
nt,
|
|
879
|
+
!1,
|
|
880
|
+
null,
|
|
881
|
+
null,
|
|
882
|
+
null,
|
|
883
|
+
null
|
|
884
|
+
);
|
|
885
|
+
const it = lt.exports, ot = {
|
|
886
|
+
__name: "WzFilterMenu",
|
|
887
|
+
props: {
|
|
888
|
+
options: {
|
|
889
|
+
type: Array,
|
|
890
|
+
default: () => []
|
|
891
|
+
},
|
|
892
|
+
selectedOptionFilter: {
|
|
893
|
+
type: Object,
|
|
894
|
+
default: () => ({})
|
|
895
|
+
}
|
|
896
|
+
},
|
|
897
|
+
emits: ["setFilters"],
|
|
898
|
+
setup(r, { emit: e }) {
|
|
899
|
+
var L;
|
|
900
|
+
const t = r, s = z(null), a = z(!1), n = z(null), l = z({}), o = (L = H()) == null ? void 0 : L.proxy, i = (p) => {
|
|
901
|
+
if (!p)
|
|
902
|
+
return "";
|
|
903
|
+
const f = p.split("-");
|
|
904
|
+
return f.length !== 3 ? p : `${f[2]}-${f[1]}-${f[0]}`;
|
|
905
|
+
}, c = (p) => {
|
|
906
|
+
if (!p)
|
|
907
|
+
return "";
|
|
908
|
+
const f = p.split("-");
|
|
909
|
+
return f.length !== 3 ? p : `${f[2]}-${f[1]}-${f[0]}`;
|
|
910
|
+
}, v = () => {
|
|
911
|
+
a.value = !a.value;
|
|
912
|
+
}, u = (p) => {
|
|
913
|
+
if (a.value && s.value && !s.value.contains(p.target)) {
|
|
914
|
+
if (!document.body.contains(p.target))
|
|
915
|
+
return;
|
|
916
|
+
a.value = !1;
|
|
917
|
+
}
|
|
918
|
+
};
|
|
919
|
+
S(() => {
|
|
920
|
+
document.addEventListener("mousedown", u), w(), m();
|
|
921
|
+
}), ae(() => {
|
|
922
|
+
document.removeEventListener("mousedown", u);
|
|
923
|
+
}), T(() => t.selectedOptionFilter, () => {
|
|
924
|
+
w();
|
|
925
|
+
}, { deep: !0 }), T(a, (p) => {
|
|
926
|
+
p && w();
|
|
927
|
+
});
|
|
928
|
+
const w = () => {
|
|
929
|
+
const p = {};
|
|
930
|
+
t.options.forEach((f) => {
|
|
931
|
+
var _, C;
|
|
932
|
+
f.type === "MULTIPLE" ? p[f.key] = Array.isArray(t.selectedOptionFilter[f.key]) ? [...t.selectedOptionFilter[f.key]] : [] : f.type === "DATE" && f.isRange ? p[f.key] = {
|
|
933
|
+
start: ((_ = t.selectedOptionFilter[f.key]) == null ? void 0 : _.start) || "",
|
|
934
|
+
end: ((C = t.selectedOptionFilter[f.key]) == null ? void 0 : C.end) || ""
|
|
935
|
+
} : p[f.key] = t.selectedOptionFilter[f.key] || "";
|
|
936
|
+
}), l.value = p, t.options.length > 0 && (n.value = t.options[0]);
|
|
937
|
+
}, m = () => {
|
|
938
|
+
if (!o || !o.$route)
|
|
939
|
+
return;
|
|
940
|
+
const p = o.$route.query || {};
|
|
941
|
+
if (Object.keys(p).length > 0) {
|
|
942
|
+
const f = {};
|
|
943
|
+
t.options.forEach((_) => {
|
|
944
|
+
const C = p[_.key];
|
|
945
|
+
if (C !== void 0)
|
|
946
|
+
if (_.type === "MULTIPLE")
|
|
947
|
+
f[_.key] = Array.isArray(C) ? C : [C];
|
|
948
|
+
else if (_.type === "DATE")
|
|
949
|
+
if (_.isRange) {
|
|
950
|
+
const x = String(C).split("__");
|
|
951
|
+
f[_.key] = {
|
|
952
|
+
start: c(x[0]) || "",
|
|
953
|
+
end: c(x[1]) || ""
|
|
954
|
+
};
|
|
955
|
+
} else
|
|
956
|
+
f[_.key] = c(C) || "";
|
|
957
|
+
else
|
|
958
|
+
f[_.key] = C;
|
|
959
|
+
}), l.value = b(b({}, l.value), f), e("setFilters", I());
|
|
960
|
+
}
|
|
961
|
+
}, d = () => {
|
|
962
|
+
a.value = !1;
|
|
963
|
+
}, h = (p) => {
|
|
964
|
+
n.value = p;
|
|
965
|
+
}, O = () => {
|
|
966
|
+
t.options.forEach((p) => {
|
|
967
|
+
p.type === "MULTIPLE" ? l.value[p.key] = [] : p.type === "DATE" && p.isRange ? l.value[p.key] = { start: "", end: "" } : l.value[p.key] = "";
|
|
968
|
+
});
|
|
969
|
+
}, I = () => {
|
|
970
|
+
const p = {};
|
|
971
|
+
return Object.keys(l.value).forEach((f) => {
|
|
972
|
+
const _ = l.value[f];
|
|
973
|
+
Array.isArray(_) ? _.length > 0 && (p[f] = _) : _ && typeof _ == "object" ? (_.start || _.end) && (p[f] = _) : _ !== "" && _ !== null && (p[f] = _);
|
|
974
|
+
}), p;
|
|
975
|
+
};
|
|
976
|
+
return { __sfc: !0, props: t, emit: e, menuWrapper: s, isOpen: a, selectedCategory: n, localFilters: l, vm: o, toURLDate: i, fromURLDate: c, toggleMenu: v, handleClickOutside: u, initFilters: w, syncFromURL: m, hideMenu: d, selectCategory: h, clearFilters: O, getCleanedFilters: I, applyFilters: () => {
|
|
977
|
+
const p = I();
|
|
978
|
+
if (o && o.$router && o.$route) {
|
|
979
|
+
const f = b({}, o.$route.query);
|
|
980
|
+
t.options.forEach((_) => {
|
|
981
|
+
delete f[_.key];
|
|
982
|
+
}), Object.keys(p).forEach((_) => {
|
|
983
|
+
const C = t.options.find((P) => P.key === _), x = p[_];
|
|
984
|
+
if (C && C.type === "DATE")
|
|
985
|
+
if (C.isRange) {
|
|
986
|
+
const P = i(x.start), N = i(x.end);
|
|
987
|
+
(P || N) && (f[_] = `${P}__${N}`);
|
|
988
|
+
} else
|
|
989
|
+
f[_] = i(x);
|
|
990
|
+
else
|
|
991
|
+
f[_] = x;
|
|
992
|
+
}), o.$router.push({
|
|
993
|
+
name: o.$route.name,
|
|
994
|
+
query: f
|
|
995
|
+
}).catch((_) => {
|
|
996
|
+
_.name !== "NavigationDuplicated" && console.error(_);
|
|
997
|
+
});
|
|
998
|
+
}
|
|
999
|
+
e("setFilters", p), a.value = !1;
|
|
1000
|
+
}, WzButton: J };
|
|
1001
|
+
}
|
|
1002
|
+
};
|
|
1003
|
+
var ct = function() {
|
|
1004
|
+
var e = this, t = e._self._c, s = e._self._setupProxy;
|
|
1005
|
+
return t("div", { ref: "menuWrapper", staticClass: "wz-relative wz-inline-block" }, [t(s.WzButton, { attrs: { variant: "primary-soft" }, on: { click: s.toggleMenu } }, [t("i", { staticClass: "ri-filter-3-line wz-mr-1" }), e._v(" Filtrar ")]), t("div", { directives: [{ name: "show", rawName: "v-show", value: s.isOpen, expression: "isOpen" }], staticClass: "wz-absolute wz-z-50 wz-top-full wz-left-0 wz-mt-2 wz-bg-white dark:wz-bg-[var(--admin-bg-panel)] wz-rounded-md wz-border wz-border-gray-200 dark:wz-border-gray-700 wz-overflow-hidden wz-flex wz-flex-col wz-transition-all", staticStyle: { width: "calc(100vw - 2rem)", "max-width": "480px", "transform-origin": "top left", "box-shadow": "0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1)" } }, [t("div", { staticClass: "wz-flex wz-flex-row", staticStyle: { height: "280px" } }, [t("div", { staticClass: "wz-filter-panel wz-h-full wz-border-r wz-border-gray-100 dark:wz-border-gray-800 wz-overflow-y-auto wz-py-2 wz-bg-gray-50/50 dark:wz-bg-[#13151a]", staticStyle: { width: "40%" } }, e._l(e.options, function(a) {
|
|
1006
|
+
var n, l, o;
|
|
1007
|
+
return t("div", { key: a.key, staticClass: "wz-px-3 wz-py-2 wz-cursor-pointer wz-font-medium wz-transition-colors wz-flex wz-justify-between wz-items-center", class: ((n = s.selectedCategory) == null ? void 0 : n.key) === a.key ? "wz-text-primary dark:wz-text-primary wz-bg-white dark:wz-bg-transparent wz-border-primary" : "wz-text-gray-600 dark:wz-text-gray-400 hover:wz-bg-gray-100 dark:hover:wz-bg-gray-800 wz-border-transparent", style: ((l = s.selectedCategory) == null ? void 0 : l.key) === a.key ? "font-size: 13px; border-left-width: 3px; background-color: color-mix(in srgb, var(--admin-primary-color, #6366f1) 10%, transparent);" : "font-size: 13px; border-left-width: 3px;", on: { click: function(i) {
|
|
1008
|
+
return s.selectCategory(a);
|
|
1009
|
+
} } }, [t("span", { staticClass: "wz-truncate" }, [e._v(e._s(a.label))]), ((o = s.selectedCategory) == null ? void 0 : o.key) === a.key ? t("i", { staticClass: "ri-arrow-right-s-line" }) : e._e()]);
|
|
1010
|
+
}), 0), t("div", { staticClass: "wz-filter-panel wz-h-full wz-p-3 wz-overflow-y-auto wz-bg-white dark:wz-bg-[var(--admin-bg-panel)]", staticStyle: { width: "60%" } }, [s.selectedCategory ? [s.selectedCategory.type === "SINGLE" ? t("div", { staticClass: "wz-flex wz-flex-col wz-gap-2" }, e._l(s.selectedCategory.options, function(a) {
|
|
1011
|
+
return t("label", { key: a.key, staticClass: "wz-flex wz-items-center wz-gap-3 wz-cursor-pointer group" }, [t("input", { directives: [{ name: "model", rawName: "v-model", value: s.localFilters[s.selectedCategory.key], expression: "localFilters[selectedCategory.key]" }], staticClass: "wz-w-4 wz-h-4 wz-text-primary wz-border-gray-300 focus:wz-ring-primary dark:wz-bg-gray-800 dark:wz-border-gray-600 wz-cursor-pointer", attrs: { type: "radio", name: "filter_" + s.selectedCategory.key }, domProps: { value: a.key, checked: e._q(s.localFilters[s.selectedCategory.key], a.key) }, on: { change: function(n) {
|
|
1012
|
+
return e.$set(s.localFilters, s.selectedCategory.key, a.key);
|
|
1013
|
+
} } }), t("span", { staticClass: "wz-text-gray-700 dark:wz-text-gray-300 group-hover:wz-text-primary wz-transition-colors wz-uppercase", staticStyle: { "font-size": "13px" } }, [e._v(e._s(a.label || a.name || a))])]);
|
|
1014
|
+
}), 0) : e._e(), s.selectedCategory.type === "MULTIPLE" ? t("div", { staticClass: "wz-flex wz-flex-col wz-gap-2" }, e._l(s.selectedCategory.options, function(a) {
|
|
1015
|
+
return t("label", { key: a.key, staticClass: "wz-flex wz-items-center wz-gap-3 wz-cursor-pointer group" }, [t("input", { directives: [{ name: "model", rawName: "v-model", value: s.localFilters[s.selectedCategory.key], expression: "localFilters[selectedCategory.key]" }], staticClass: "wz-w-4 wz-h-4 wz-rounded-sm wz-text-primary wz-border-gray-300 focus:wz-ring-primary dark:wz-bg-gray-800 dark:wz-border-gray-600 wz-cursor-pointer", attrs: { type: "checkbox" }, domProps: { value: a.key, checked: Array.isArray(s.localFilters[s.selectedCategory.key]) ? e._i(s.localFilters[s.selectedCategory.key], a.key) > -1 : s.localFilters[s.selectedCategory.key] }, on: { change: function(n) {
|
|
1016
|
+
var l = s.localFilters[s.selectedCategory.key], o = n.target, i = !!o.checked;
|
|
1017
|
+
if (Array.isArray(l)) {
|
|
1018
|
+
var c = a.key, v = e._i(l, c);
|
|
1019
|
+
o.checked ? v < 0 && e.$set(s.localFilters, s.selectedCategory.key, l.concat([c])) : v > -1 && e.$set(s.localFilters, s.selectedCategory.key, l.slice(0, v).concat(l.slice(v + 1)));
|
|
1020
|
+
} else
|
|
1021
|
+
e.$set(s.localFilters, s.selectedCategory.key, i);
|
|
1022
|
+
} } }), t("span", { staticClass: "wz-text-gray-700 dark:wz-text-gray-300 group-hover:wz-text-primary wz-transition-colors wz-uppercase", staticStyle: { "font-size": "13px" } }, [e._v(e._s(a.label || a.name || a))])]);
|
|
1023
|
+
}), 0) : e._e(), s.selectedCategory.type === "DATE" ? t("div", { staticClass: "wz-flex wz-flex-col wz-gap-4" }, [s.selectedCategory.isRange ? t("div", { staticClass: "wz-flex wz-flex-col wz-gap-4" }, [t("div", [t("label", { staticClass: "wz-block wz-font-semibold wz-text-gray-500 dark:wz-text-gray-400 wz-mb-1 wz-uppercase wz-tracking-wider", staticStyle: { "font-size": "11px" } }, [e._v("Desde")]), t("input", { directives: [{ name: "model", rawName: "v-model", value: s.localFilters[s.selectedCategory.key].start, expression: "localFilters[selectedCategory.key].start" }], staticClass: "wz-w-full wz-box-border wz-px-2 wz-py-1.5 wz-border wz-border-gray-300 wz-rounded dark:wz-bg-gray-800 dark:wz-border-gray-700 dark:wz-text-white focus:wz-outline-none focus:wz-ring-1 focus:wz-ring-primary focus:wz-border-primary", staticStyle: { "font-size": "13px", "box-sizing": "border-box" }, attrs: { type: "date" }, domProps: { value: s.localFilters[s.selectedCategory.key].start }, on: { input: function(a) {
|
|
1024
|
+
a.target.composing || e.$set(s.localFilters[s.selectedCategory.key], "start", a.target.value);
|
|
1025
|
+
} } })]), t("div", [t("label", { staticClass: "wz-block wz-font-semibold wz-text-gray-500 dark:wz-text-gray-400 wz-mb-1 wz-uppercase wz-tracking-wider", staticStyle: { "font-size": "11px" } }, [e._v("Hasta")]), t("input", { directives: [{ name: "model", rawName: "v-model", value: s.localFilters[s.selectedCategory.key].end, expression: "localFilters[selectedCategory.key].end" }], staticClass: "wz-w-full wz-box-border wz-px-2 wz-py-1.5 wz-border wz-border-gray-300 wz-rounded dark:wz-bg-gray-800 dark:wz-border-gray-700 dark:wz-text-white focus:wz-outline-none focus:wz-ring-1 focus:wz-ring-primary focus:wz-border-primary", staticStyle: { "font-size": "13px", "box-sizing": "border-box" }, attrs: { type: "date" }, domProps: { value: s.localFilters[s.selectedCategory.key].end }, on: { input: function(a) {
|
|
1026
|
+
a.target.composing || e.$set(s.localFilters[s.selectedCategory.key], "end", a.target.value);
|
|
1027
|
+
} } })])]) : t("div", [t("label", { staticClass: "wz-block wz-font-semibold wz-text-gray-500 dark:wz-text-gray-400 wz-mb-1 wz-uppercase wz-tracking-wider", staticStyle: { "font-size": "11px" } }, [e._v("Fecha Específica")]), t("input", { directives: [{ name: "model", rawName: "v-model", value: s.localFilters[s.selectedCategory.key], expression: "localFilters[selectedCategory.key]" }], staticClass: "wz-w-full wz-box-border wz-px-2 wz-py-1.5 wz-border wz-border-gray-300 wz-rounded dark:wz-bg-gray-800 dark:wz-border-gray-700 dark:wz-text-white focus:wz-outline-none focus:wz-ring-1 focus:wz-ring-primary focus:wz-border-primary", staticStyle: { "font-size": "13px", "box-sizing": "border-box" }, attrs: { type: "date" }, domProps: { value: s.localFilters[s.selectedCategory.key] }, on: { input: function(a) {
|
|
1028
|
+
a.target.composing || e.$set(s.localFilters, s.selectedCategory.key, a.target.value);
|
|
1029
|
+
} } })])]) : e._e()] : e._e()], 2)]), t("div", { staticClass: "wz-px-3 wz-py-2 wz-border-t wz-border-gray-200 dark:wz-border-gray-700 wz-flex wz-justify-between wz-items-center wz-bg-white dark:wz-bg-[var(--admin-bg-panel)]" }, [t(s.WzButton, { attrs: { variant: "outline", size: "sm" }, on: { click: s.clearFilters } }, [e._v(" Limpiar ")]), t("div", { staticClass: "wz-flex wz-gap-2" }, [t(s.WzButton, { attrs: { variant: "outline-danger", size: "sm" }, on: { click: s.hideMenu } }, [e._v(" Cancelar ")]), t(s.WzButton, { attrs: { variant: "primary", size: "sm" }, on: { click: s.applyFilters } }, [e._v(" Aplicar ")])], 1)], 1)])], 1);
|
|
1030
|
+
}, ut = [], dt = /* @__PURE__ */ g(
|
|
1031
|
+
ot,
|
|
1032
|
+
ct,
|
|
1033
|
+
ut,
|
|
1034
|
+
!1,
|
|
1035
|
+
null,
|
|
1036
|
+
null,
|
|
1037
|
+
null,
|
|
1038
|
+
null
|
|
1039
|
+
);
|
|
1040
|
+
const pt = dt.exports, ft = {
|
|
1041
|
+
__name: "WzTableFilters",
|
|
1042
|
+
setup(r) {
|
|
1043
|
+
return { __sfc: !0 };
|
|
1044
|
+
}
|
|
1045
|
+
};
|
|
1046
|
+
var _t = function() {
|
|
1047
|
+
var e = this, t = e._self._c;
|
|
1048
|
+
return e._self._setupProxy, e.$slots.default ? t("div", { staticClass: "wz-table-filters" }, [e._t("default")], 2) : e._e();
|
|
1049
|
+
}, wt = [], vt = /* @__PURE__ */ g(
|
|
1050
|
+
ft,
|
|
1051
|
+
_t,
|
|
1052
|
+
wt,
|
|
1053
|
+
!1,
|
|
1054
|
+
null,
|
|
1055
|
+
null,
|
|
1056
|
+
null,
|
|
1057
|
+
null
|
|
1058
|
+
);
|
|
1059
|
+
const gt = vt.exports, mt = {
|
|
1060
|
+
__name: "WzTable",
|
|
1061
|
+
setup(r) {
|
|
1062
|
+
return { __sfc: !0 };
|
|
1063
|
+
}
|
|
1064
|
+
};
|
|
1065
|
+
var yt = function() {
|
|
1066
|
+
var e = this, t = e._self._c;
|
|
1067
|
+
return e._self._setupProxy, t("div", { staticClass: "wz-table-wrapper" }, [t("table", { staticClass: "wz-table" }, [e._t("default")], 2)]);
|
|
1068
|
+
}, ht = [], zt = /* @__PURE__ */ g(
|
|
1069
|
+
mt,
|
|
1070
|
+
yt,
|
|
1071
|
+
ht,
|
|
1072
|
+
!1,
|
|
1073
|
+
null,
|
|
1074
|
+
null,
|
|
1075
|
+
null,
|
|
1076
|
+
null
|
|
1077
|
+
);
|
|
1078
|
+
const Ct = zt.exports, bt = {
|
|
1079
|
+
__name: "WzTableFooter",
|
|
1080
|
+
setup(r) {
|
|
1081
|
+
return { __sfc: !0 };
|
|
1082
|
+
}
|
|
1083
|
+
};
|
|
1084
|
+
var kt = function() {
|
|
1085
|
+
var e = this, t = e._self._c;
|
|
1086
|
+
return e._self._setupProxy, t("div", { staticClass: "wz-table-footer" }, [e._t("default")], 2);
|
|
1087
|
+
}, xt = [], $t = /* @__PURE__ */ g(
|
|
1088
|
+
bt,
|
|
1089
|
+
kt,
|
|
1090
|
+
xt,
|
|
1091
|
+
!1,
|
|
1092
|
+
null,
|
|
1093
|
+
null,
|
|
1094
|
+
null,
|
|
1095
|
+
null
|
|
1096
|
+
);
|
|
1097
|
+
const St = $t.exports, Pt = {
|
|
1098
|
+
__name: "WzSearchBar",
|
|
1099
|
+
props: {
|
|
1100
|
+
placeholder: {
|
|
1101
|
+
type: String,
|
|
1102
|
+
default: "Buscar por nombre o número de documento"
|
|
1103
|
+
},
|
|
1104
|
+
value: {
|
|
1105
|
+
type: String,
|
|
1106
|
+
default: ""
|
|
1107
|
+
},
|
|
1108
|
+
oldValue: {
|
|
1109
|
+
type: String,
|
|
1110
|
+
default: ""
|
|
1111
|
+
}
|
|
1112
|
+
},
|
|
1113
|
+
emits: ["search", "input"],
|
|
1114
|
+
setup(r, { emit: e }) {
|
|
1115
|
+
var i;
|
|
1116
|
+
const t = r, s = z(!1), a = z(""), n = (i = H()) == null ? void 0 : i.proxy;
|
|
1117
|
+
return S(() => {
|
|
1118
|
+
let c = t.oldValue || t.value;
|
|
1119
|
+
n && n.$route && n.$route.query && n.$route.query.search && (c = n.$route.query.search), a.value = c, a.value && e("input", a.value);
|
|
1120
|
+
}), T(() => t.value, (c) => {
|
|
1121
|
+
c !== a.value && (a.value = c);
|
|
1122
|
+
}), { __sfc: !0, props: t, emit: e, focus: s, keyword: a, vm: n, search: () => {
|
|
1123
|
+
e("search", a.value);
|
|
1124
|
+
}, setCurrentValue: () => {
|
|
1125
|
+
e("input", a.value);
|
|
1126
|
+
} };
|
|
1127
|
+
}
|
|
1128
|
+
};
|
|
1129
|
+
var Ft = function() {
|
|
1130
|
+
var e = this, t = e._self._c, s = e._self._setupProxy;
|
|
1131
|
+
return t("form", { staticClass: "wz-relative wz-flex wz-items-center wz-w-full wz-h-[36px] wz-bg-transparent wz-border wz-border-solid wz-rounded-md wz-transition-all wz-duration-200", style: {
|
|
1132
|
+
minWidth: "min(100%, 200px)",
|
|
1133
|
+
width: "100%",
|
|
1134
|
+
maxWidth: "500px",
|
|
1135
|
+
borderColor: s.focus ? "var(--admin-primary-color, #6366f1)" : "var(--admin-border-color, #e5e7eb)",
|
|
1136
|
+
boxShadow: s.focus ? "0 0 0 2px color-mix(in srgb, var(--admin-primary-color, #6366f1) 15%, transparent)" : "none"
|
|
1137
|
+
}, attrs: { autocomplete: "off" }, on: { submit: function(a) {
|
|
1138
|
+
return a.preventDefault(), s.search.apply(null, arguments);
|
|
1139
|
+
} } }, [t("i", { staticClass: "ri-search-line wz-text-gray-400 wz-ml-3 wz-text-lg" }), t("input", { directives: [{ name: "model", rawName: "v-model", value: s.keyword, expression: "keyword" }], staticClass: "wz-w-full wz-h-full wz-bg-transparent wz-border-none wz-outline-none wz-px-2 wz-text-sm wz-text-gray-700 dark:wz-text-gray-200 placeholder-gray-400 wz-box-border", attrs: { type: "search", placeholder: e.placeholder, autocomplete: "off", title: e.placeholder }, domProps: { value: s.keyword }, on: { focus: function(a) {
|
|
1140
|
+
s.focus = !0;
|
|
1141
|
+
}, blur: function(a) {
|
|
1142
|
+
s.focus = !1;
|
|
1143
|
+
}, input: [function(a) {
|
|
1144
|
+
a.target.composing || (s.keyword = a.target.value);
|
|
1145
|
+
}, s.setCurrentValue] } })]);
|
|
1146
|
+
}, Tt = [], Ot = /* @__PURE__ */ g(
|
|
1147
|
+
Pt,
|
|
1148
|
+
Ft,
|
|
1149
|
+
Tt,
|
|
1150
|
+
!1,
|
|
1151
|
+
null,
|
|
1152
|
+
null,
|
|
1153
|
+
null,
|
|
1154
|
+
null
|
|
1155
|
+
);
|
|
1156
|
+
const It = Ot.exports, Et = {
|
|
1157
|
+
__name: "WzPagination",
|
|
1158
|
+
props: {
|
|
1159
|
+
total: {
|
|
1160
|
+
type: Number,
|
|
1161
|
+
required: !0,
|
|
1162
|
+
default: 0
|
|
1163
|
+
},
|
|
1164
|
+
perPage: {
|
|
1165
|
+
type: Number,
|
|
1166
|
+
default: 100
|
|
1167
|
+
},
|
|
1168
|
+
currentPage: {
|
|
1169
|
+
type: Number,
|
|
1170
|
+
default: 1
|
|
1171
|
+
},
|
|
1172
|
+
perPageOptions: {
|
|
1173
|
+
type: Array,
|
|
1174
|
+
default: () => [100, 200, 500]
|
|
1175
|
+
}
|
|
1176
|
+
},
|
|
1177
|
+
emits: ["update:currentPage", "update:perPage", "change"],
|
|
1178
|
+
setup(r, { emit: e }) {
|
|
1179
|
+
const t = r, s = y(() => Math.ceil(t.total / t.perPage) || 1), a = y(() => {
|
|
1180
|
+
const o = t.currentPage, i = s.value, c = 1, v = [], u = [];
|
|
1181
|
+
let w;
|
|
1182
|
+
for (let m = 1; m <= i; m++)
|
|
1183
|
+
(m === 1 || m === i || m >= o - c && m <= o + c) && v.push(m);
|
|
1184
|
+
return v.forEach((m) => {
|
|
1185
|
+
w && (m - w === 2 ? u.push(w + 1) : m - w !== 1 && u.push("...")), u.push(m), w = m;
|
|
1186
|
+
}), u;
|
|
1187
|
+
});
|
|
1188
|
+
return { __sfc: !0, props: t, emit: e, totalPages: s, pages: a, goToPage: (o) => {
|
|
1189
|
+
o >= 1 && o <= s.value && o !== t.currentPage && (e("update:currentPage", o), e("change", { page: o, perPage: t.perPage }));
|
|
1190
|
+
}, onPerPageChange: (o) => {
|
|
1191
|
+
const i = parseInt(o.target.value, 10);
|
|
1192
|
+
e("update:perPage", i), e("update:currentPage", 1), e("change", { page: 1, perPage: i });
|
|
1193
|
+
} };
|
|
1194
|
+
}
|
|
1195
|
+
};
|
|
1196
|
+
var Rt = function() {
|
|
1197
|
+
var e = this, t = e._self._c, s = e._self._setupProxy;
|
|
1198
|
+
return t("div", { staticClass: "wz-flex wz-flex-col sm:wz-flex-row wz-items-center wz-justify-between wz-w-full wz-gap-2" }, [t("div", { staticClass: "wz-flex wz-items-center wz-text-sm wz-pagination-text" }, [t("span", [e._v("Mostrando")]), t("div", { staticClass: "wz-relative wz-mx-2" }, [t("select", { staticClass: "wz-appearance-none wz-bg-transparent wz-border wz-py-1 wz-pl-3 wz-pr-8 wz-rounded-md wz-cursor-pointer focus:wz-outline-none wz-transition-colors wz-pagination-select", domProps: { value: e.perPage }, on: { change: s.onPerPageChange } }, e._l(e.perPageOptions, function(a) {
|
|
1199
|
+
return t("option", { key: a, domProps: { value: a } }, [e._v(" " + e._s(a) + " ")]);
|
|
1200
|
+
}), 0), t("div", { staticClass: "wz-pointer-events-none wz-absolute wz-inset-y-0 wz-right-0 wz-flex wz-items-center wz-px-2 wz-pagination-text" }, [t("svg", { staticClass: "wz-fill-current wz-h-4 wz-w-4", attrs: { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20" } }, [t("path", { attrs: { d: "M9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828 5.757 6.586 4.343 8z" } })])])]), t("span", [e._v("registros de " + e._s(e.total))])]), t("div", { staticClass: "wz-flex wz-items-center wz-space-x-1" }, [t("button", { staticClass: "wz-px-3 wz-py-1.5 wz-text-sm wz-font-medium wz-pagination-nav disabled:wz-opacity-40 disabled:wz-cursor-not-allowed wz-transition-colors", attrs: { disabled: e.currentPage === 1 }, on: { click: function(a) {
|
|
1201
|
+
return s.goToPage(e.currentPage - 1);
|
|
1202
|
+
} } }, [e._v(" Ant ")]), e._l(s.pages, function(a, n) {
|
|
1203
|
+
return [a !== "..." ? t("button", { staticClass: "wz-px-3 wz-py-1.5 wz-text-sm wz-font-medium wz-rounded-md wz-transition-colors wz-pagination-page", class: { "wz-pagination-page--active": a === e.currentPage }, style: a === e.currentPage ? "background-color: var(--admin-primary-color); color: #fff;" : "", on: { click: function(l) {
|
|
1204
|
+
return s.goToPage(a);
|
|
1205
|
+
} } }, [e._v(" " + e._s(a) + " ")]) : t("span", { staticClass: "wz-px-2 wz-py-1.5 wz-text-sm wz-pagination-text" }, [e._v(" ... ")])];
|
|
1206
|
+
}), t("button", { staticClass: "wz-px-3 wz-py-1.5 wz-text-sm wz-font-medium wz-pagination-nav disabled:wz-opacity-40 disabled:wz-cursor-not-allowed wz-transition-colors", attrs: { disabled: e.currentPage === s.totalPages || s.totalPages === 0 }, on: { click: function(a) {
|
|
1207
|
+
return s.goToPage(e.currentPage + 1);
|
|
1208
|
+
} } }, [e._v(" Sig ")])], 2)]);
|
|
1209
|
+
}, At = [], Mt = /* @__PURE__ */ g(
|
|
1210
|
+
Et,
|
|
1211
|
+
Rt,
|
|
1212
|
+
At,
|
|
1213
|
+
!1,
|
|
1214
|
+
null,
|
|
1215
|
+
null,
|
|
1216
|
+
null,
|
|
1217
|
+
null
|
|
1218
|
+
);
|
|
1219
|
+
const Wt = Mt.exports, Dt = {
|
|
1220
|
+
__name: "WzTabs",
|
|
1221
|
+
props: {
|
|
1222
|
+
items: {
|
|
1223
|
+
type: Array,
|
|
1224
|
+
default: () => []
|
|
1225
|
+
},
|
|
1226
|
+
/** Vue 3 v-model */
|
|
1227
|
+
modelValue: {
|
|
1228
|
+
default: ""
|
|
1229
|
+
},
|
|
1230
|
+
/** Vue 2 v-model */
|
|
1231
|
+
value: {
|
|
1232
|
+
default: ""
|
|
1233
|
+
},
|
|
1234
|
+
variant: {
|
|
1235
|
+
type: String,
|
|
1236
|
+
default: "underline",
|
|
1237
|
+
validator: (r) => ["underline", "pills", "cards"].includes(r)
|
|
1238
|
+
},
|
|
1239
|
+
bordered: {
|
|
1240
|
+
type: Boolean,
|
|
1241
|
+
default: !1
|
|
1242
|
+
}
|
|
1243
|
+
},
|
|
1244
|
+
emits: ["update:modelValue", "input", "change"],
|
|
1245
|
+
setup(r, { emit: e }) {
|
|
1246
|
+
const t = r, s = y(() => {
|
|
1247
|
+
const n = t.modelValue || t.value;
|
|
1248
|
+
return n || (t.items.length ? t.items[0].key : "");
|
|
1249
|
+
});
|
|
1250
|
+
function a(n) {
|
|
1251
|
+
n.disabled || (e("update:modelValue", n.key), e("input", n.key), e("change", n.key));
|
|
1252
|
+
}
|
|
1253
|
+
return { __sfc: !0, props: t, emit: e, activeKey: s, selectTab: a, WzBadge: G };
|
|
1254
|
+
}
|
|
1255
|
+
};
|
|
1256
|
+
var Bt = function() {
|
|
1257
|
+
var e = this, t = e._self._c, s = e._self._setupProxy;
|
|
1258
|
+
return t("div", { staticClass: "wz-tabs", class: [`wz-tabs--${e.variant}`, { "wz-tabs--bordered": e.bordered }] }, [t("div", { staticClass: "wz-tabs-nav", attrs: { role: "tablist" } }, e._l(e.items, function(a) {
|
|
1259
|
+
return t("button", { key: a.key, staticClass: "wz-tab-item", class: {
|
|
1260
|
+
"wz-tab-item--active": s.activeKey === a.key,
|
|
1261
|
+
"wz-tab-item--disabled": a.disabled
|
|
1262
|
+
}, attrs: { type: "button", role: "tab", "aria-selected": s.activeKey === a.key, "aria-disabled": a.disabled, disabled: a.disabled }, on: { click: function(n) {
|
|
1263
|
+
return s.selectTab(a);
|
|
1264
|
+
} } }, [a.icon ? t("i", { class: [a.icon, "wz-tab-item-icon"] }) : e._e(), t("span", [e._v(e._s(a.label))]), a.badge != null ? t(s.WzBadge, { staticClass: "wz-tab-item-badge", attrs: { variant: s.activeKey === a.key ? "primary" : "light", pill: "" } }, [e._v(e._s(a.badge))]) : e._e()], 1);
|
|
1265
|
+
}), 0), t("div", { staticClass: "wz-tabs-content", attrs: { role: "tabpanel" } }, [e._t(s.activeKey), e._t("default")], 2)]);
|
|
1266
|
+
}, Vt = [], Lt = /* @__PURE__ */ g(
|
|
1267
|
+
Dt,
|
|
1268
|
+
Bt,
|
|
1269
|
+
Vt,
|
|
1270
|
+
!1,
|
|
1271
|
+
null,
|
|
1272
|
+
null,
|
|
1273
|
+
null,
|
|
1274
|
+
null
|
|
1275
|
+
);
|
|
1276
|
+
const Nt = Lt.exports, Ut = {
|
|
1277
|
+
__name: "WzInput",
|
|
1278
|
+
props: {
|
|
1279
|
+
/** Vue 3 v-model */
|
|
1280
|
+
modelValue: { default: null },
|
|
1281
|
+
/** Vue 2 v-model */
|
|
1282
|
+
value: { default: null },
|
|
1283
|
+
/** Input type */
|
|
1284
|
+
type: { type: String, default: "text" },
|
|
1285
|
+
/** Label displayed above */
|
|
1286
|
+
label: { type: String, default: "" },
|
|
1287
|
+
/** Placeholder text */
|
|
1288
|
+
placeholder: { type: String, default: "" },
|
|
1289
|
+
/** Whether the field is required */
|
|
1290
|
+
required: { type: Boolean, default: !1 },
|
|
1291
|
+
/** Disabled state */
|
|
1292
|
+
disabled: { type: Boolean, default: !1 },
|
|
1293
|
+
/** Read-only state */
|
|
1294
|
+
readonly: { type: Boolean, default: !1 },
|
|
1295
|
+
/** Error message (empty string = no error) */
|
|
1296
|
+
error: { type: String, default: "" },
|
|
1297
|
+
/** Helper text below */
|
|
1298
|
+
helper: { type: String, default: "" },
|
|
1299
|
+
/** Max character length */
|
|
1300
|
+
maxlength: { type: [Number, String], default: null },
|
|
1301
|
+
/** Autocomplete attribute */
|
|
1302
|
+
autocomplete: { type: String, default: "off" },
|
|
1303
|
+
/** Text prefix (left side) */
|
|
1304
|
+
prefix: { type: String, default: "" },
|
|
1305
|
+
/** Text suffix (right side) */
|
|
1306
|
+
suffix: { type: String, default: "" },
|
|
1307
|
+
/** Custom id */
|
|
1308
|
+
id: { type: String, default: "" },
|
|
1309
|
+
/** min (for type number/date) */
|
|
1310
|
+
min: { default: null },
|
|
1311
|
+
/** max (for type number/date) */
|
|
1312
|
+
max: { default: null },
|
|
1313
|
+
/** step (for type number) */
|
|
1314
|
+
step: { default: null }
|
|
1315
|
+
},
|
|
1316
|
+
emits: ["update:modelValue", "input", "change", "blur", "focus", "enter"],
|
|
1317
|
+
setup(r, { emit: e }) {
|
|
1318
|
+
const t = r, s = z(!1);
|
|
1319
|
+
let a = 0;
|
|
1320
|
+
const n = y(() => t.id || `wz-input-${++a}`), l = y(() => {
|
|
1321
|
+
var i, c;
|
|
1322
|
+
return (c = (i = t.modelValue) != null ? i : t.value) != null ? c : "";
|
|
1323
|
+
});
|
|
1324
|
+
function o(i) {
|
|
1325
|
+
const c = i.target.value;
|
|
1326
|
+
e("update:modelValue", c), e("input", c);
|
|
1327
|
+
}
|
|
1328
|
+
return { __sfc: !0, props: t, emit: e, showPassword: s, idCounter: a, inputId: n, currentValue: l, onInput: o };
|
|
1329
|
+
}
|
|
1330
|
+
};
|
|
1331
|
+
var qt = function() {
|
|
1332
|
+
var e = this, t = e._self._c, s = e._self._setupProxy;
|
|
1333
|
+
return t("div", { staticClass: "wz-form-group" }, [e.label ? t("label", { staticClass: "wz-form-label", attrs: { for: s.inputId } }, [e._v(" " + e._s(e.label)), e.required ? t("span", { staticClass: "wz-form-required" }, [e._v("*")]) : e._e()]) : e._e(), t("div", { staticClass: "wz-form-input-wrapper", class: {
|
|
1334
|
+
"has-prefix": !!e.$slots.prefix || !!e.prefix,
|
|
1335
|
+
"has-suffix": !!e.$slots.suffix || !!e.suffix || e.type === "password"
|
|
1336
|
+
} }, [e.$slots.prefix || e.prefix ? t("span", { staticClass: "wz-form-prefix" }, [e._t("prefix", function() {
|
|
1337
|
+
return [e._v(e._s(e.prefix))];
|
|
1338
|
+
})], 2) : e._e(), t("input", e._b({ staticClass: "wz-form-control", class: { "wz-form-control--error": !!e.error }, attrs: { id: s.inputId, type: s.showPassword ? "text" : e.type, placeholder: e.placeholder, disabled: e.disabled, readonly: e.readonly, maxlength: e.maxlength, autocomplete: e.autocomplete, min: e.min, max: e.max, step: e.step }, domProps: { value: s.currentValue }, on: { input: s.onInput, change: function(a) {
|
|
1339
|
+
return e.$emit("change", a.target.value);
|
|
1340
|
+
}, blur: function(a) {
|
|
1341
|
+
return e.$emit("blur", a);
|
|
1342
|
+
}, focus: function(a) {
|
|
1343
|
+
return e.$emit("focus", a);
|
|
1344
|
+
}, keyup: function(a) {
|
|
1345
|
+
return !a.type.indexOf("key") && e._k(a.keyCode, "enter", 13, a.key, "Enter") ? null : e.$emit("enter", s.currentValue);
|
|
1346
|
+
} } }, "input", e.$attrs, !1)), e.type === "password" ? t("button", { staticClass: "wz-form-suffix-btn", attrs: { type: "button", tabindex: "-1" }, on: { click: function(a) {
|
|
1347
|
+
s.showPassword = !s.showPassword;
|
|
1348
|
+
} } }, [t("i", { class: s.showPassword ? "ri-eye-off-line" : "ri-eye-line" })]) : e.$slots.suffix || e.suffix ? t("span", { staticClass: "wz-form-suffix" }, [e._t("suffix", function() {
|
|
1349
|
+
return [e._v(e._s(e.suffix))];
|
|
1350
|
+
})], 2) : e._e()]), e.error ? t("span", { staticClass: "wz-form-error-msg" }, [t("i", { staticClass: "ri-error-warning-line" }), e._v(e._s(e.error) + " ")]) : e.helper ? t("span", { staticClass: "wz-form-helper" }, [e._v(e._s(e.helper))]) : e._e()]);
|
|
1351
|
+
}, Kt = [], jt = /* @__PURE__ */ g(
|
|
1352
|
+
Ut,
|
|
1353
|
+
qt,
|
|
1354
|
+
Kt,
|
|
1355
|
+
!1,
|
|
1356
|
+
null,
|
|
1357
|
+
null,
|
|
1358
|
+
null,
|
|
1359
|
+
null
|
|
1360
|
+
);
|
|
1361
|
+
const Yt = jt.exports, Ht = {
|
|
1362
|
+
__name: "WzSelect",
|
|
1363
|
+
props: {
|
|
1364
|
+
/** Vue 3 v-model */
|
|
1365
|
+
modelValue: { default: null },
|
|
1366
|
+
/** Vue 2 v-model */
|
|
1367
|
+
value: { default: null },
|
|
1368
|
+
/**
|
|
1369
|
+
* Array of options.
|
|
1370
|
+
* Each item can be: { key, label, disabled? } or primitive (string/number).
|
|
1371
|
+
*/
|
|
1372
|
+
items: { type: Array, default: () => [] },
|
|
1373
|
+
/** Placeholder option (null value) */
|
|
1374
|
+
defaultOption: { type: String, default: "" },
|
|
1375
|
+
/** Label */
|
|
1376
|
+
label: { type: String, default: "" },
|
|
1377
|
+
/** Required marker */
|
|
1378
|
+
required: { type: Boolean, default: !1 },
|
|
1379
|
+
/** Disabled state */
|
|
1380
|
+
disabled: { type: Boolean, default: !1 },
|
|
1381
|
+
/** Error message */
|
|
1382
|
+
error: { type: String, default: "" },
|
|
1383
|
+
/** Helper text */
|
|
1384
|
+
helper: { type: String, default: "" },
|
|
1385
|
+
/** Custom id */
|
|
1386
|
+
id: { type: String, default: "" }
|
|
1387
|
+
},
|
|
1388
|
+
emits: ["update:modelValue", "input", "change"],
|
|
1389
|
+
setup(r, { emit: e }) {
|
|
1390
|
+
const t = r;
|
|
1391
|
+
let s = 0;
|
|
1392
|
+
const a = y(() => t.id || `wz-select-${++s}`), n = y(() => {
|
|
1393
|
+
var i, c;
|
|
1394
|
+
return (c = (i = t.modelValue) != null ? i : t.value) != null ? c : null;
|
|
1395
|
+
}), l = y(
|
|
1396
|
+
() => t.items.map((i) => i !== null && typeof i == "object" ? i : { key: i, label: i })
|
|
1397
|
+
);
|
|
1398
|
+
function o(i) {
|
|
1399
|
+
const c = i.target.value, v = l.value.find((w) => String(w.key) === c), u = v ? v.key : c;
|
|
1400
|
+
e("update:modelValue", u), e("input", u), e("change", u);
|
|
1401
|
+
}
|
|
1402
|
+
return { __sfc: !0, props: t, emit: e, idCounter: s, selectId: a, currentValue: n, normalizedItems: l, onChange: o };
|
|
1403
|
+
}
|
|
1404
|
+
};
|
|
1405
|
+
var Jt = function() {
|
|
1406
|
+
var e = this, t = e._self._c, s = e._self._setupProxy;
|
|
1407
|
+
return t("div", { staticClass: "wz-form-group" }, [e.label ? t("label", { staticClass: "wz-form-label", attrs: { for: s.selectId } }, [e._v(" " + e._s(e.label)), e.required ? t("span", { staticClass: "wz-form-required" }, [e._v("*")]) : e._e()]) : e._e(), t("div", { staticClass: "wz-form-select-wrapper" }, [t("select", e._b({ staticClass: "wz-form-control", class: { "wz-form-control--error": !!e.error }, attrs: { id: s.selectId, disabled: e.disabled }, on: { change: s.onChange } }, "select", e.$attrs, !1), [e.defaultOption ? t("option", { domProps: { value: null, selected: s.currentValue == null } }, [e._v(" " + e._s(e.defaultOption) + " ")]) : e._e(), e._l(s.normalizedItems, function(a) {
|
|
1408
|
+
return t("option", { key: a.key, attrs: { disabled: a.disabled }, domProps: { value: a.key, selected: String(s.currentValue) === String(a.key) } }, [e._v(" " + e._s(a.label) + " ")]);
|
|
1409
|
+
})], 2), e._m(0)]), e.error ? t("span", { staticClass: "wz-form-error-msg" }, [t("i", { staticClass: "ri-error-warning-line" }), e._v(e._s(e.error) + " ")]) : e.helper ? t("span", { staticClass: "wz-form-helper" }, [e._v(e._s(e.helper))]) : e._e()]);
|
|
1410
|
+
}, Gt = [function() {
|
|
1411
|
+
var r = this, e = r._self._c;
|
|
1412
|
+
return r._self._setupProxy, e("span", { staticClass: "wz-form-select-arrow" }, [e("i", { staticClass: "ri-arrow-down-s-line" })]);
|
|
1413
|
+
}], Xt = /* @__PURE__ */ g(
|
|
1414
|
+
Ht,
|
|
1415
|
+
Jt,
|
|
1416
|
+
Gt,
|
|
1417
|
+
!1,
|
|
1418
|
+
null,
|
|
1419
|
+
null,
|
|
1420
|
+
null,
|
|
1421
|
+
null
|
|
1422
|
+
);
|
|
1423
|
+
const Zt = Xt.exports, Qt = {
|
|
1424
|
+
__name: "WzTextarea",
|
|
1425
|
+
props: {
|
|
1426
|
+
modelValue: { default: null },
|
|
1427
|
+
value: { default: null },
|
|
1428
|
+
label: { type: String, default: "" },
|
|
1429
|
+
placeholder: { type: String, default: "" },
|
|
1430
|
+
required: { type: Boolean, default: !1 },
|
|
1431
|
+
disabled: { type: Boolean, default: !1 },
|
|
1432
|
+
readonly: { type: Boolean, default: !1 },
|
|
1433
|
+
error: { type: String, default: "" },
|
|
1434
|
+
helper: { type: String, default: "" },
|
|
1435
|
+
maxlength: { type: [Number, String], default: null },
|
|
1436
|
+
rows: { type: [Number, String], default: 3 },
|
|
1437
|
+
/** Show character counter */
|
|
1438
|
+
showCount: { type: Boolean, default: !1 },
|
|
1439
|
+
id: { type: String, default: "" }
|
|
1440
|
+
},
|
|
1441
|
+
emits: ["update:modelValue", "input", "change", "blur", "focus"],
|
|
1442
|
+
setup(r, { emit: e }) {
|
|
1443
|
+
const t = r;
|
|
1444
|
+
let s = 0;
|
|
1445
|
+
const a = y(() => t.id || `wz-textarea-${++s}`), n = y(() => {
|
|
1446
|
+
var o, i;
|
|
1447
|
+
return (i = (o = t.modelValue) != null ? o : t.value) != null ? i : "";
|
|
1448
|
+
});
|
|
1449
|
+
function l(o) {
|
|
1450
|
+
const i = o.target.value;
|
|
1451
|
+
e("update:modelValue", i), e("input", i);
|
|
1452
|
+
}
|
|
1453
|
+
return { __sfc: !0, props: t, emit: e, idCounter: s, textareaId: a, currentValue: n, onInput: l };
|
|
1454
|
+
}
|
|
1455
|
+
};
|
|
1456
|
+
var es = function() {
|
|
1457
|
+
var e = this, t = e._self._c, s = e._self._setupProxy;
|
|
1458
|
+
return t("div", { staticClass: "wz-form-group" }, [e.label ? t("label", { staticClass: "wz-form-label", attrs: { for: s.textareaId } }, [e._v(" " + e._s(e.label)), e.required ? t("span", { staticClass: "wz-form-required" }, [e._v("*")]) : e._e()]) : e._e(), t("textarea", e._b({ staticClass: "wz-form-control wz-form-textarea", class: { "wz-form-control--error": !!e.error }, attrs: { id: s.textareaId, placeholder: e.placeholder, disabled: e.disabled, readonly: e.readonly, maxlength: e.maxlength, rows: e.rows }, domProps: { value: s.currentValue }, on: { input: s.onInput, change: function(a) {
|
|
1459
|
+
return e.$emit("change", a.target.value);
|
|
1460
|
+
}, blur: function(a) {
|
|
1461
|
+
return e.$emit("blur", a);
|
|
1462
|
+
}, focus: function(a) {
|
|
1463
|
+
return e.$emit("focus", a);
|
|
1464
|
+
} } }, "textarea", e.$attrs, !1)), e.maxlength && e.showCount ? t("div", { staticClass: "wz-form-helper", staticStyle: { "text-align": "right" } }, [e._v(" " + e._s((s.currentValue || "").length) + " / " + e._s(e.maxlength) + " ")]) : e._e(), e.error ? t("span", { staticClass: "wz-form-error-msg" }, [t("i", { staticClass: "ri-error-warning-line" }), e._v(e._s(e.error) + " ")]) : e.helper ? t("span", { staticClass: "wz-form-helper" }, [e._v(e._s(e.helper))]) : e._e()]);
|
|
1465
|
+
}, ts = [], ss = /* @__PURE__ */ g(
|
|
1466
|
+
Qt,
|
|
1467
|
+
es,
|
|
1468
|
+
ts,
|
|
1469
|
+
!1,
|
|
1470
|
+
null,
|
|
1471
|
+
null,
|
|
1472
|
+
null,
|
|
1473
|
+
null
|
|
1474
|
+
);
|
|
1475
|
+
const as = ss.exports, rs = {
|
|
1476
|
+
__name: "WzDatepicker",
|
|
1477
|
+
props: {
|
|
1478
|
+
modelValue: { default: null },
|
|
1479
|
+
value: { default: null },
|
|
1480
|
+
label: { type: String, default: "" },
|
|
1481
|
+
required: { type: Boolean, default: !1 },
|
|
1482
|
+
disabled: { type: Boolean, default: !1 },
|
|
1483
|
+
readonly: { type: Boolean, default: !1 },
|
|
1484
|
+
error: { type: String, default: "" },
|
|
1485
|
+
helper: { type: String, default: "" },
|
|
1486
|
+
/** Min date (YYYY-MM-DD) */
|
|
1487
|
+
min: { type: String, default: "" },
|
|
1488
|
+
/** Max date (YYYY-MM-DD) */
|
|
1489
|
+
max: { type: String, default: "" },
|
|
1490
|
+
id: { type: String, default: "" }
|
|
1491
|
+
},
|
|
1492
|
+
emits: ["update:modelValue", "input", "change", "blur"],
|
|
1493
|
+
setup(r, { emit: e }) {
|
|
1494
|
+
const t = r;
|
|
1495
|
+
let s = 0;
|
|
1496
|
+
const a = y(() => t.id || `wz-datepicker-${++s}`), n = y(() => {
|
|
1497
|
+
var o, i;
|
|
1498
|
+
return (i = (o = t.modelValue) != null ? o : t.value) != null ? i : "";
|
|
1499
|
+
});
|
|
1500
|
+
function l(o) {
|
|
1501
|
+
const i = o.target.value;
|
|
1502
|
+
e("update:modelValue", i), e("input", i);
|
|
1503
|
+
}
|
|
1504
|
+
return { __sfc: !0, props: t, emit: e, idCounter: s, inputId: a, currentValue: n, onInput: l };
|
|
1505
|
+
}
|
|
1506
|
+
};
|
|
1507
|
+
var ns = function() {
|
|
1508
|
+
var e = this, t = e._self._c, s = e._self._setupProxy;
|
|
1509
|
+
return t("div", { staticClass: "wz-form-group" }, [e.label ? t("label", { staticClass: "wz-form-label", attrs: { for: s.inputId } }, [e._v(" " + e._s(e.label)), e.required ? t("span", { staticClass: "wz-form-required" }, [e._v("*")]) : e._e()]) : e._e(), t("div", { staticClass: "wz-form-input-wrapper has-suffix" }, [t("input", e._b({ staticClass: "wz-form-control", class: { "wz-form-control--error": !!e.error }, attrs: { id: s.inputId, type: "date", min: e.min, max: e.max, disabled: e.disabled, readonly: e.readonly }, domProps: { value: s.currentValue }, on: { input: s.onInput, change: function(a) {
|
|
1510
|
+
return e.$emit("change", a.target.value);
|
|
1511
|
+
}, blur: function(a) {
|
|
1512
|
+
return e.$emit("blur", a);
|
|
1513
|
+
} } }, "input", e.$attrs, !1)), e._m(0)]), e.error ? t("span", { staticClass: "wz-form-error-msg" }, [t("i", { staticClass: "ri-error-warning-line" }), e._v(e._s(e.error) + " ")]) : e.helper ? t("span", { staticClass: "wz-form-helper" }, [e._v(e._s(e.helper))]) : e._e()]);
|
|
1514
|
+
}, ls = [function() {
|
|
1515
|
+
var r = this, e = r._self._c;
|
|
1516
|
+
return r._self._setupProxy, e("span", { staticClass: "wz-form-suffix", staticStyle: { "pointer-events": "none" } }, [e("i", { staticClass: "ri-calendar-line" })]);
|
|
1517
|
+
}], is = /* @__PURE__ */ g(
|
|
1518
|
+
rs,
|
|
1519
|
+
ns,
|
|
1520
|
+
ls,
|
|
1521
|
+
!1,
|
|
1522
|
+
null,
|
|
1523
|
+
null,
|
|
1524
|
+
null,
|
|
1525
|
+
null
|
|
1526
|
+
);
|
|
1527
|
+
const os = is.exports, cs = {
|
|
1528
|
+
__name: "WzProgress",
|
|
1529
|
+
props: {
|
|
1530
|
+
/** Progress value (0–100) */
|
|
1531
|
+
value: { type: Number, default: 0 },
|
|
1532
|
+
/** Color variant */
|
|
1533
|
+
variant: {
|
|
1534
|
+
type: String,
|
|
1535
|
+
default: "primary",
|
|
1536
|
+
validator: (r) => ["primary", "success", "danger", "warning", "info", "secondary"].includes(r)
|
|
1537
|
+
},
|
|
1538
|
+
/** Bar height in px */
|
|
1539
|
+
height: { type: [Number, String], default: 8 },
|
|
1540
|
+
/** Show percentage label inside the bar */
|
|
1541
|
+
showLabel: { type: Boolean, default: !1 }
|
|
1542
|
+
},
|
|
1543
|
+
setup(r) {
|
|
1544
|
+
const e = r, t = y(() => Math.min(100, Math.max(0, e.value))), s = y(() => typeof e.height == "number" ? `${e.height}px` : e.height);
|
|
1545
|
+
return { __sfc: !0, props: e, clampedValue: t, heightPx: s };
|
|
1546
|
+
}
|
|
1547
|
+
};
|
|
1548
|
+
var us = function() {
|
|
1549
|
+
var e = this, t = e._self._c, s = e._self._setupProxy;
|
|
1550
|
+
return t("div", { staticClass: "wz-progress", style: { height: s.heightPx } }, [t("div", { staticClass: "wz-progress-bar", class: `wz-progress-bar--${e.variant}`, style: { width: s.clampedValue + "%" }, attrs: { role: "progressbar", "aria-valuenow": s.clampedValue, "aria-valuemin": "0", "aria-valuemax": "100" } }, [e.showLabel ? t("span", { staticClass: "wz-progress-label" }, [e._v(e._s(s.clampedValue) + "%")]) : e._e()])]);
|
|
1551
|
+
}, ds = [], ps = /* @__PURE__ */ g(
|
|
1552
|
+
cs,
|
|
1553
|
+
us,
|
|
1554
|
+
ds,
|
|
1555
|
+
!1,
|
|
1556
|
+
null,
|
|
1557
|
+
null,
|
|
1558
|
+
null,
|
|
1559
|
+
null
|
|
1560
|
+
);
|
|
1561
|
+
const fs = ps.exports, _s = {
|
|
1562
|
+
__name: "WzModal",
|
|
1563
|
+
props: {
|
|
1564
|
+
/** Vue 3 v-model */
|
|
1565
|
+
modelValue: { type: Boolean, default: !1 },
|
|
1566
|
+
/** Vue 2 v-model */
|
|
1567
|
+
value: { type: Boolean, default: !1 },
|
|
1568
|
+
title: { type: String, default: "" },
|
|
1569
|
+
size: {
|
|
1570
|
+
type: String,
|
|
1571
|
+
default: "md",
|
|
1572
|
+
validator: (r) => ["sm", "md", "lg", "xl"].includes(r)
|
|
1573
|
+
},
|
|
1574
|
+
hideClose: { type: Boolean, default: !1 },
|
|
1575
|
+
/** Close on overlay click */
|
|
1576
|
+
closeOnOverlay: { type: Boolean, default: !0 }
|
|
1577
|
+
},
|
|
1578
|
+
emits: ["update:modelValue", "input", "close"],
|
|
1579
|
+
setup(r, { emit: e }) {
|
|
1580
|
+
const t = r, s = y(() => t.modelValue || t.value);
|
|
1581
|
+
function a() {
|
|
1582
|
+
e("update:modelValue", !1), e("input", !1), e("close");
|
|
1583
|
+
}
|
|
1584
|
+
function n() {
|
|
1585
|
+
t.closeOnOverlay && a();
|
|
1586
|
+
}
|
|
1587
|
+
return { __sfc: !0, props: t, emit: e, isOpen: s, close: a, onOverlayClick: n };
|
|
1588
|
+
}
|
|
1589
|
+
};
|
|
1590
|
+
var ws = function() {
|
|
1591
|
+
var e = this, t = e._self._c, s = e._self._setupProxy;
|
|
1592
|
+
return t("teleport", { attrs: { to: "body" } }, [t("transition", { attrs: { name: "wz-modal-fade" } }, [s.isOpen ? t("div", { staticClass: "wz-modal-overlay", on: { click: function(a) {
|
|
1593
|
+
return a.target !== a.currentTarget ? null : s.onOverlayClick.apply(null, arguments);
|
|
1594
|
+
} } }, [t("div", { staticClass: "wz-modal", class: `wz-modal--${e.size}`, attrs: { role: "dialog", "aria-modal": "true" } }, [t("div", { staticClass: "wz-modal-header" }, [t("h5", { staticClass: "wz-modal-title" }, [e._t("title", function() {
|
|
1595
|
+
return [e._v(e._s(e.title))];
|
|
1596
|
+
})], 2), e.hideClose ? e._e() : t("button", { staticClass: "wz-modal-close", attrs: { type: "button" }, on: { click: s.close } }, [t("i", { staticClass: "ri-close-line" })])]), t("div", { staticClass: "wz-modal-body" }, [e._t("default")], 2), e.$slots.footer ? t("div", { staticClass: "wz-modal-footer" }, [e._t("footer")], 2) : e._e()])]) : e._e()])], 1);
|
|
1597
|
+
}, vs = [], gs = /* @__PURE__ */ g(
|
|
1598
|
+
_s,
|
|
1599
|
+
ws,
|
|
1600
|
+
vs,
|
|
1601
|
+
!1,
|
|
1602
|
+
null,
|
|
1603
|
+
null,
|
|
1604
|
+
null,
|
|
1605
|
+
null
|
|
1606
|
+
);
|
|
1607
|
+
const ms = gs.exports, ys = {
|
|
1608
|
+
name: "WzConfirmModal",
|
|
1609
|
+
model: {
|
|
1610
|
+
prop: "value",
|
|
1611
|
+
event: "input"
|
|
1612
|
+
},
|
|
1613
|
+
props: {
|
|
1614
|
+
value: { type: Boolean, default: !1 },
|
|
1615
|
+
title: { type: String, default: "Confirmar" },
|
|
1616
|
+
description: { type: String, default: "" },
|
|
1617
|
+
acceptText: { type: String, default: "Aceptar" },
|
|
1618
|
+
cancelText: { type: String, default: "Cancelar" },
|
|
1619
|
+
acceptVariant: { type: String, default: "danger" },
|
|
1620
|
+
alertVariant: { type: String, default: "warning" },
|
|
1621
|
+
closeOnOverlay: { type: Boolean, default: !1 }
|
|
1622
|
+
},
|
|
1623
|
+
computed: {
|
|
1624
|
+
isOpen() {
|
|
1625
|
+
return this.value;
|
|
1626
|
+
}
|
|
1627
|
+
},
|
|
1628
|
+
methods: {
|
|
1629
|
+
close() {
|
|
1630
|
+
this.$emit("input", !1);
|
|
1631
|
+
},
|
|
1632
|
+
onCancel() {
|
|
1633
|
+
this.close(), this.$emit("cancel");
|
|
1634
|
+
},
|
|
1635
|
+
onConfirm() {
|
|
1636
|
+
this.$emit("confirm");
|
|
1637
|
+
},
|
|
1638
|
+
onOverlayClick() {
|
|
1639
|
+
this.closeOnOverlay && this.onCancel();
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
};
|
|
1643
|
+
var hs = function() {
|
|
1644
|
+
var e = this, t = e._self._c;
|
|
1645
|
+
return t("transition", { attrs: { name: "wz-modal-fade" } }, [e.isOpen ? t("div", { staticClass: "wz-modal-overlay", on: { click: function(s) {
|
|
1646
|
+
return s.target !== s.currentTarget ? null : e.onOverlayClick.apply(null, arguments);
|
|
1647
|
+
} } }, [t("div", { staticClass: "wz-modal wz-modal--md", attrs: { role: "dialog", "aria-modal": "true" } }, [t("div", { staticClass: "wz-modal-header" }, [t("h5", { staticClass: "wz-modal-title" }, [e._v(e._s(e.title))]), t("button", { staticClass: "wz-modal-close", attrs: { type: "button" }, on: { click: e.onCancel } }, [t("i", { staticClass: "ri-close-line" })])]), t("div", { staticClass: "wz-modal-body" }, [t("div", { staticClass: "wz-alert", class: `wz-alert--${e.alertVariant}`, staticStyle: { "margin-bottom": "0" } }, [t("span", { staticClass: "wz-alert-icon" }, [t("i", { staticClass: "ri-error-warning-line" })]), t("span", { staticClass: "wz-alert-content" }, [e._v(e._s(e.description))])])]), t("div", { staticClass: "wz-modal-footer" }, [t("button", { staticClass: "wz-btn wz-btn-md wz-btn-outline", attrs: { type: "button" }, on: { click: e.onCancel } }, [e._v(" " + e._s(e.cancelText) + " ")]), t("button", { staticClass: "wz-btn wz-btn-md", class: `wz-btn-${e.acceptVariant}`, attrs: { type: "button" }, on: { click: e.onConfirm } }, [e._v(" " + e._s(e.acceptText) + " ")])])])]) : e._e()]);
|
|
1648
|
+
}, zs = [], Cs = /* @__PURE__ */ g(
|
|
1649
|
+
ys,
|
|
1650
|
+
hs,
|
|
1651
|
+
zs,
|
|
1652
|
+
!1,
|
|
1653
|
+
null,
|
|
1654
|
+
null,
|
|
1655
|
+
null,
|
|
1656
|
+
null
|
|
1657
|
+
);
|
|
1658
|
+
const bs = Cs.exports, j = {
|
|
1659
|
+
success: "ri-check-line",
|
|
1660
|
+
danger: "ri-close-line",
|
|
1661
|
+
warning: "ri-alert-line",
|
|
1662
|
+
info: "ri-information-line"
|
|
1663
|
+
}, ks = {
|
|
1664
|
+
success: "ÉXITO",
|
|
1665
|
+
danger: "ERROR",
|
|
1666
|
+
warning: "ADVERTENCIA",
|
|
1667
|
+
info: "INFORMACIÓN"
|
|
1668
|
+
}, xs = {
|
|
1669
|
+
name: "WzSweetAlert",
|
|
1670
|
+
model: { prop: "value", event: "input" },
|
|
1671
|
+
props: {
|
|
1672
|
+
value: { type: Boolean, default: !1 },
|
|
1673
|
+
type: { type: String, default: "success", validator: (r) => ["success", "danger", "warning", "info"].includes(r) },
|
|
1674
|
+
title: { type: String, default: "" },
|
|
1675
|
+
message: { type: String, default: "" },
|
|
1676
|
+
confirmText: { type: String, default: "OK" }
|
|
1677
|
+
},
|
|
1678
|
+
computed: {
|
|
1679
|
+
isOpen() {
|
|
1680
|
+
return this.value;
|
|
1681
|
+
},
|
|
1682
|
+
iconClass() {
|
|
1683
|
+
return j[this.type] || j.success;
|
|
1684
|
+
},
|
|
1685
|
+
resolvedTitle() {
|
|
1686
|
+
return this.title || ks[this.type] || "";
|
|
1687
|
+
}
|
|
1688
|
+
},
|
|
1689
|
+
methods: {
|
|
1690
|
+
onConfirm() {
|
|
1691
|
+
this.$emit("input", !1), this.$emit("confirm");
|
|
1692
|
+
}
|
|
1693
|
+
}
|
|
1694
|
+
};
|
|
1695
|
+
var $s = function() {
|
|
1696
|
+
var e = this, t = e._self._c;
|
|
1697
|
+
return t("transition", { attrs: { name: "wz-modal-fade" } }, [e.isOpen ? t("div", { staticClass: "wz-modal-overlay" }, [t("div", { staticClass: "wz-sweet-alert", attrs: { role: "dialog", "aria-modal": "true" } }, [t("div", { staticClass: "wz-sweet-icon", class: `wz-sweet-icon--${e.type}` }, [t("i", { class: e.iconClass })]), t("h3", { staticClass: "wz-sweet-title" }, [e._v(e._s(e.resolvedTitle))]), e.message ? t("p", { staticClass: "wz-sweet-message" }, [e._v(e._s(e.message))]) : e._e(), t("button", { staticClass: "wz-btn wz-btn-md wz-btn-primary", staticStyle: { "min-width": "100px", "margin-top": "8px" }, attrs: { type: "button" }, on: { click: e.onConfirm } }, [e._v(" " + e._s(e.confirmText) + " ")])])]) : e._e()]);
|
|
1698
|
+
}, Ss = [], Ps = /* @__PURE__ */ g(
|
|
1699
|
+
xs,
|
|
1700
|
+
$s,
|
|
1701
|
+
Ss,
|
|
1702
|
+
!1,
|
|
1703
|
+
null,
|
|
1704
|
+
null,
|
|
1705
|
+
null,
|
|
1706
|
+
null
|
|
1707
|
+
);
|
|
1708
|
+
const Fs = Ps.exports, Ts = {
|
|
1709
|
+
name: "WzFileInput",
|
|
1710
|
+
props: {
|
|
1711
|
+
idFile: { type: String, required: !0 },
|
|
1712
|
+
acceptFile: { type: Array, default: () => [] },
|
|
1713
|
+
multiple: { type: Boolean, default: !1 },
|
|
1714
|
+
typeComponent: { type: String, default: "complete" }
|
|
1715
|
+
},
|
|
1716
|
+
data() {
|
|
1717
|
+
return {
|
|
1718
|
+
files: [],
|
|
1719
|
+
isDragging: !1
|
|
1720
|
+
};
|
|
1721
|
+
},
|
|
1722
|
+
methods: {
|
|
1723
|
+
openPicker() {
|
|
1724
|
+
this.$refs.fileInput.click();
|
|
1725
|
+
},
|
|
1726
|
+
onFileChange() {
|
|
1727
|
+
const r = Array.from(this.$refs.fileInput.files);
|
|
1728
|
+
this.files = this.multiple ? [...this.files, ...r] : r, this.$emit("onChange", this.files);
|
|
1729
|
+
},
|
|
1730
|
+
onDrop(r) {
|
|
1731
|
+
this.isDragging = !1;
|
|
1732
|
+
const e = Array.from(r.dataTransfer.files);
|
|
1733
|
+
this.files = this.multiple ? [...this.files, ...e] : [e[0]].filter(Boolean), this.$emit("onChange", this.files);
|
|
1734
|
+
},
|
|
1735
|
+
removeFile(r) {
|
|
1736
|
+
this.files.splice(r, 1), this.$refs.fileInput.value = null, this.$emit("onChange", this.files);
|
|
1737
|
+
},
|
|
1738
|
+
reset() {
|
|
1739
|
+
this.files = [], this.$refs.fileInput && (this.$refs.fileInput.value = null);
|
|
1740
|
+
}
|
|
1741
|
+
}
|
|
1742
|
+
};
|
|
1743
|
+
var Os = function() {
|
|
1744
|
+
var e = this, t = e._self._c;
|
|
1745
|
+
return t("div", { staticClass: "wz-file-input", class: { "wz-file-input--dragging": e.isDragging }, on: { dragover: function(s) {
|
|
1746
|
+
s.preventDefault(), e.isDragging = !0;
|
|
1747
|
+
}, dragleave: function(s) {
|
|
1748
|
+
s.preventDefault(), e.isDragging = !1;
|
|
1749
|
+
}, drop: function(s) {
|
|
1750
|
+
return s.preventDefault(), e.onDrop.apply(null, arguments);
|
|
1751
|
+
} } }, [e.files.length > 0 ? t("div", { staticClass: "wz-file-list" }, [e._l(e.files, function(s, a) {
|
|
1752
|
+
return t("div", { key: a, staticClass: "wz-file-item" }, [t("i", { staticClass: "ri-file-line wz-file-item-icon" }), t("span", { staticClass: "wz-file-item-name" }, [e._v(e._s(s.name))]), t("button", { staticClass: "wz-file-item-remove", attrs: { type: "button" }, on: { click: function(n) {
|
|
1753
|
+
return e.removeFile(a);
|
|
1754
|
+
} } }, [t("i", { staticClass: "ri-close-line" })])]);
|
|
1755
|
+
}), t("button", { staticClass: "wz-btn wz-btn-sm wz-btn-outline", staticStyle: { "margin-top": "8px" }, attrs: { type: "button" }, on: { click: e.openPicker } }, [t("i", { staticClass: "ri-folder-open-line" }), e._v(" Cambiar archivo ")])], 2) : t("div", { staticClass: "wz-file-drop-zone", on: { click: e.openPicker } }, [t("i", { staticClass: "ri-upload-2-line wz-file-drop-icon" }), e._m(0), e.acceptFile && e.acceptFile.length ? t("p", { staticClass: "wz-file-drop-hint" }, [e._v(" Formatos: " + e._s(e.acceptFile.join(", ")) + " ")]) : e._e()]), t("input", { ref: "fileInput", staticStyle: { display: "none" }, attrs: { type: "file", id: e.idFile, accept: e.acceptFile ? e.acceptFile.join(",") : void 0, multiple: e.multiple }, on: { change: e.onFileChange } })]);
|
|
1756
|
+
}, Is = [function() {
|
|
1757
|
+
var r = this, e = r._self._c;
|
|
1758
|
+
return e("p", { staticClass: "wz-file-drop-text" }, [r._v(" Arrastra tu archivo aquí o "), e("span", { staticClass: "wz-file-drop-link" }, [r._v("haz clic para buscar")])]);
|
|
1759
|
+
}], Es = /* @__PURE__ */ g(
|
|
1760
|
+
Ts,
|
|
1761
|
+
Os,
|
|
1762
|
+
Is,
|
|
1763
|
+
!1,
|
|
1764
|
+
null,
|
|
1765
|
+
null,
|
|
1766
|
+
null,
|
|
1767
|
+
null
|
|
1768
|
+
);
|
|
1769
|
+
const Rs = Es.exports, As = {
|
|
1770
|
+
name: "WzLoader"
|
|
1771
|
+
};
|
|
1772
|
+
var Ms = function() {
|
|
1773
|
+
var e = this, t = e._self._c;
|
|
1774
|
+
return t("div", { staticClass: "wz-loader-overlay" }, [t("div", { staticClass: "wz-loader-content" }, [e.$slots.brand ? t("div", { staticClass: "wz-loader-brand" }, [e._t("brand")], 2) : e._e(), e._m(0)])]);
|
|
1775
|
+
}, Ws = [function() {
|
|
1776
|
+
var r = this, e = r._self._c;
|
|
1777
|
+
return e("div", { staticClass: "wz-loader-dots" }, [e("span"), e("span"), e("span")]);
|
|
1778
|
+
}], Ds = /* @__PURE__ */ g(
|
|
1779
|
+
As,
|
|
1780
|
+
Ms,
|
|
1781
|
+
Ws,
|
|
1782
|
+
!1,
|
|
1783
|
+
null,
|
|
1784
|
+
null,
|
|
1785
|
+
null,
|
|
1786
|
+
null
|
|
1787
|
+
);
|
|
1788
|
+
const Bs = Ds.exports, Vs = {
|
|
1789
|
+
__name: "WzTooltip",
|
|
1790
|
+
props: {
|
|
1791
|
+
text: {
|
|
1792
|
+
type: String,
|
|
1793
|
+
default: ""
|
|
1794
|
+
},
|
|
1795
|
+
position: {
|
|
1796
|
+
type: String,
|
|
1797
|
+
default: "top",
|
|
1798
|
+
validator: (r) => ["top", "bottom", "left", "right"].includes(r)
|
|
1799
|
+
},
|
|
1800
|
+
delay: {
|
|
1801
|
+
type: Number,
|
|
1802
|
+
default: 200
|
|
1803
|
+
},
|
|
1804
|
+
arrow: {
|
|
1805
|
+
type: Boolean,
|
|
1806
|
+
default: !0
|
|
1807
|
+
}
|
|
1808
|
+
},
|
|
1809
|
+
setup(r) {
|
|
1810
|
+
const e = r, t = y(() => ({
|
|
1811
|
+
"--wz-tooltip-delay": `${e.delay}ms`
|
|
1812
|
+
}));
|
|
1813
|
+
return { __sfc: !0, props: e, cssVars: t };
|
|
1814
|
+
}
|
|
1815
|
+
};
|
|
1816
|
+
var Ls = function() {
|
|
1817
|
+
var e = this, t = e._self._c, s = e._self._setupProxy;
|
|
1818
|
+
return t("span", { staticClass: "wz-tooltip", class: [`wz-tooltip--${e.position}`, { "wz-tooltip--no-arrow": !e.arrow }], style: s.cssVars }, [e._t("default"), e.text ? t("span", { staticClass: "wz-tooltip-bubble", attrs: { role: "tooltip" } }, [e._v(e._s(e.text))]) : e._e()], 2);
|
|
1819
|
+
}, Ns = [], Us = /* @__PURE__ */ g(
|
|
1820
|
+
Vs,
|
|
1821
|
+
Ls,
|
|
1822
|
+
Ns,
|
|
1823
|
+
!1,
|
|
1824
|
+
null,
|
|
1825
|
+
null,
|
|
1826
|
+
null,
|
|
1827
|
+
null
|
|
1828
|
+
);
|
|
1829
|
+
const qs = Us.exports, Ks = {
|
|
1830
|
+
name: "WzCheckbox",
|
|
1831
|
+
model: {
|
|
1832
|
+
prop: "checked",
|
|
1833
|
+
event: "change"
|
|
1834
|
+
},
|
|
1835
|
+
props: {
|
|
1836
|
+
checked: { type: [Boolean, Array], default: !1 },
|
|
1837
|
+
value: { default: null },
|
|
1838
|
+
switch: { type: Boolean, default: !1 },
|
|
1839
|
+
size: { type: String, default: "md", validator: (r) => ["sm", "md", "lg"].includes(r) },
|
|
1840
|
+
disabled: { type: Boolean, default: !1 }
|
|
1841
|
+
},
|
|
1842
|
+
computed: {
|
|
1843
|
+
switchMode() {
|
|
1844
|
+
return this.$props.switch;
|
|
1845
|
+
},
|
|
1846
|
+
isChecked() {
|
|
1847
|
+
return Array.isArray(this.checked) ? this.checked.includes(this.value) : !!this.checked;
|
|
1848
|
+
}
|
|
1849
|
+
},
|
|
1850
|
+
methods: {
|
|
1851
|
+
onChange(r) {
|
|
1852
|
+
if (Array.isArray(this.checked)) {
|
|
1853
|
+
const e = [...this.checked], t = e.indexOf(this.value);
|
|
1854
|
+
r.target.checked && t === -1 && e.push(this.value), !r.target.checked && t !== -1 && e.splice(t, 1), this.$emit("change", e);
|
|
1855
|
+
} else
|
|
1856
|
+
this.$emit("change", r.target.checked);
|
|
1857
|
+
}
|
|
1858
|
+
}
|
|
1859
|
+
};
|
|
1860
|
+
var js = function() {
|
|
1861
|
+
var e = this, t = e._self._c;
|
|
1862
|
+
return t("label", { staticClass: "wz-checkbox", class: [
|
|
1863
|
+
`wz-checkbox--${e.size}`,
|
|
1864
|
+
{ "wz-checkbox--switch": e.switchMode, "wz-checkbox--disabled": e.disabled }
|
|
1865
|
+
] }, [t("input", { staticClass: "wz-checkbox-input", attrs: { type: "checkbox", disabled: e.disabled }, domProps: { checked: e.isChecked, value: e.value }, on: { change: e.onChange } }), t("span", { staticClass: "wz-checkbox-control", class: { "wz-checkbox-control--switch": e.switchMode } }, [e.switchMode ? e._e() : t("span", { staticClass: "wz-checkbox-check" })]), e.$slots.default ? t("span", { staticClass: "wz-checkbox-label" }, [e._t("default")], 2) : e._e()]);
|
|
1866
|
+
}, Ys = [], Hs = /* @__PURE__ */ g(
|
|
1867
|
+
Ks,
|
|
1868
|
+
js,
|
|
1869
|
+
Ys,
|
|
1870
|
+
!1,
|
|
1871
|
+
null,
|
|
1872
|
+
null,
|
|
1873
|
+
null,
|
|
1874
|
+
null
|
|
1875
|
+
);
|
|
1876
|
+
const Js = Hs.exports, da = {
|
|
1877
|
+
data() {
|
|
1878
|
+
return {
|
|
1879
|
+
sortKey: "",
|
|
1880
|
+
sortDir: "asc"
|
|
1881
|
+
};
|
|
1882
|
+
},
|
|
1883
|
+
methods: {
|
|
1884
|
+
toggleSort(r) {
|
|
1885
|
+
this.sortKey === r ? this.sortDir = this.sortDir === "asc" ? "desc" : "asc" : (this.sortKey = r, this.sortDir = "asc");
|
|
1886
|
+
},
|
|
1887
|
+
sortIcon(r) {
|
|
1888
|
+
return this.sortKey !== r ? "ri-arrow-up-down-line" : this.sortDir === "asc" ? "ri-arrow-up-s-line" : "ri-arrow-down-s-line";
|
|
1889
|
+
},
|
|
1890
|
+
sortedList(r) {
|
|
1891
|
+
if (!this.sortKey || !r || !r.length)
|
|
1892
|
+
return r;
|
|
1893
|
+
const e = this.sortKey, t = this.sortDir === "asc" ? 1 : -1;
|
|
1894
|
+
return [...r].sort((s, a) => {
|
|
1895
|
+
const n = s[e], l = a[e];
|
|
1896
|
+
return n == null && l == null ? 0 : n == null ? 1 : l == null ? -1 : typeof n == "number" && typeof l == "number" ? (n - l) * t : String(n).localeCompare(String(l), void 0, {
|
|
1897
|
+
numeric: !0,
|
|
1898
|
+
sensitivity: "base"
|
|
1899
|
+
}) * t;
|
|
1900
|
+
});
|
|
1901
|
+
}
|
|
1902
|
+
}
|
|
1903
|
+
}, pa = {
|
|
1904
|
+
data() {
|
|
1905
|
+
return {
|
|
1906
|
+
confirmModal: {
|
|
1907
|
+
show: !1,
|
|
1908
|
+
title: "Confirmar",
|
|
1909
|
+
description: "",
|
|
1910
|
+
acceptText: "Aceptar",
|
|
1911
|
+
cancelText: "Cancelar",
|
|
1912
|
+
acceptVariant: "danger",
|
|
1913
|
+
alertVariant: "warning",
|
|
1914
|
+
action: null
|
|
1915
|
+
}
|
|
1916
|
+
};
|
|
1917
|
+
},
|
|
1918
|
+
methods: {
|
|
1919
|
+
openConfirmModal({
|
|
1920
|
+
title: r = "Confirmar",
|
|
1921
|
+
description: e = "",
|
|
1922
|
+
acceptText: t = "Aceptar",
|
|
1923
|
+
cancelText: s = "Cancelar",
|
|
1924
|
+
acceptVariant: a = "danger",
|
|
1925
|
+
alertVariant: n = "warning",
|
|
1926
|
+
action: l = null
|
|
1927
|
+
} = {}) {
|
|
1928
|
+
this.confirmModal = { show: !0, title: r, description: e, acceptText: t, cancelText: s, acceptVariant: a, alertVariant: n, action: l };
|
|
1929
|
+
},
|
|
1930
|
+
closeConfirmModal() {
|
|
1931
|
+
this.confirmModal = $(b({}, this.confirmModal), { show: !1 });
|
|
1932
|
+
}
|
|
1933
|
+
}
|
|
1934
|
+
}, fa = {
|
|
1935
|
+
data() {
|
|
1936
|
+
return {
|
|
1937
|
+
alertModal: {
|
|
1938
|
+
show: !1,
|
|
1939
|
+
type: "success",
|
|
1940
|
+
title: "",
|
|
1941
|
+
message: "",
|
|
1942
|
+
confirmText: "OK"
|
|
1943
|
+
}
|
|
1944
|
+
};
|
|
1945
|
+
},
|
|
1946
|
+
methods: {
|
|
1947
|
+
showAlert({ type: r = "success", title: e = "", message: t = "", confirmText: s = "OK" } = {}) {
|
|
1948
|
+
this.alertModal = { show: !0, type: r, title: e, message: t, confirmText: s };
|
|
1949
|
+
},
|
|
1950
|
+
showSuccess(r, e = "") {
|
|
1951
|
+
this.showAlert({ type: "success", title: e, message: r });
|
|
1952
|
+
},
|
|
1953
|
+
showError(r, e = "") {
|
|
1954
|
+
this.showAlert({ type: "danger", title: e, message: r });
|
|
1955
|
+
},
|
|
1956
|
+
showWarning(r, e = "") {
|
|
1957
|
+
this.showAlert({ type: "warning", title: e, message: r });
|
|
1958
|
+
},
|
|
1959
|
+
hideAlert() {
|
|
1960
|
+
this.alertModal = $(b({}, this.alertModal), { show: !1 });
|
|
1961
|
+
}
|
|
1962
|
+
}
|
|
1963
|
+
}, F = { SINGLE: 1, MULTIPLE: 2, DATE: 3 }, _a = {
|
|
1964
|
+
data() {
|
|
1965
|
+
return {
|
|
1966
|
+
filters: {},
|
|
1967
|
+
showFilters: !1
|
|
1968
|
+
};
|
|
1969
|
+
},
|
|
1970
|
+
computed: {
|
|
1971
|
+
showFiltersList() {
|
|
1972
|
+
return Object.keys(this.filters).length >= 1;
|
|
1973
|
+
},
|
|
1974
|
+
filterList() {
|
|
1975
|
+
const r = {};
|
|
1976
|
+
return Object.keys(this.filters).forEach((e) => {
|
|
1977
|
+
!e.includes("Start") && !e.includes("End") && (r[e] = this.filters[e]);
|
|
1978
|
+
}), r;
|
|
1979
|
+
}
|
|
1980
|
+
},
|
|
1981
|
+
methods: {
|
|
1982
|
+
setFilters(r) {
|
|
1983
|
+
this.filters = JSON.parse(JSON.stringify(r)), this.showFilters = !1, this.loadData();
|
|
1984
|
+
},
|
|
1985
|
+
deleteFilter(r) {
|
|
1986
|
+
const e = b({}, this.filters), t = b({}, this.$route.query);
|
|
1987
|
+
delete e[r], delete t[r];
|
|
1988
|
+
const s = (this.filterOptions || []).find((a) => a.key === r);
|
|
1989
|
+
s && s.type === F.DATE && s.isRange && (delete e[`${r}Start`], delete e[`${r}End`]), this.$router.push({ name: this.$route.name, query: t }), this.filters = e, this.loadData();
|
|
1990
|
+
},
|
|
1991
|
+
getFilterName(r, e) {
|
|
1992
|
+
if (r.includes("Start") || r.includes("End"))
|
|
1993
|
+
return;
|
|
1994
|
+
const t = (this.filterOptions || []).find((s) => s.key.includes(r));
|
|
1995
|
+
if (!t)
|
|
1996
|
+
return r;
|
|
1997
|
+
if (t.type === F.DATE)
|
|
1998
|
+
return t.isRange ? `${t.label} = ${R(e.start).format("DD/MM/YYYY")} a ${R(e.end).format("DD/MM/YYYY")}` : `${t.label} = ${R(e).format("DD/MM/YYYY")}`;
|
|
1999
|
+
if (t.type === F.SINGLE) {
|
|
2000
|
+
const s = t.options.find((a) => a.key == e);
|
|
2001
|
+
return `${t.label} = ${s ? s.label : e}`;
|
|
2002
|
+
}
|
|
2003
|
+
if (t.type === F.MULTIPLE) {
|
|
2004
|
+
const s = e.map((a) => {
|
|
2005
|
+
const n = (this.filterOptions || []).find((l) => l.key == r);
|
|
2006
|
+
return n ? (n.options.find((l) => l.key == a) || {}).label : a;
|
|
2007
|
+
});
|
|
2008
|
+
return `${t.label} = ${s.join(", ")}`;
|
|
2009
|
+
}
|
|
2010
|
+
return r;
|
|
2011
|
+
}
|
|
2012
|
+
}
|
|
2013
|
+
}, wa = {
|
|
2014
|
+
data() {
|
|
2015
|
+
return {
|
|
2016
|
+
pageSize: 10,
|
|
2017
|
+
page: 1,
|
|
2018
|
+
total: 0,
|
|
2019
|
+
search: null
|
|
2020
|
+
};
|
|
2021
|
+
},
|
|
2022
|
+
mounted() {
|
|
2023
|
+
this.page = parseInt(this.$route.query.page) || 1, this.search = this.$route.query.search || null;
|
|
2024
|
+
},
|
|
2025
|
+
computed: {
|
|
2026
|
+
totalPages() {
|
|
2027
|
+
return Math.ceil(this.total / this.pageSize);
|
|
2028
|
+
}
|
|
2029
|
+
},
|
|
2030
|
+
methods: {
|
|
2031
|
+
changePage(r) {
|
|
2032
|
+
this.page = r, this.$router.push({ name: this.$route.name, query: $(b({}, this.$route.query), { page: r }) }), this.loadData();
|
|
2033
|
+
},
|
|
2034
|
+
changePageSize(r) {
|
|
2035
|
+
this.page = 1, this.pageSize = r, this.$router.push({ name: this.$route.name, query: $(b({}, this.$route.query), { page: 1 }) }), this.loadData();
|
|
2036
|
+
},
|
|
2037
|
+
onSearch(r) {
|
|
2038
|
+
this.page = 1, this.search = r;
|
|
2039
|
+
const e = $(b({}, this.$route.query), { page: 1 });
|
|
2040
|
+
r ? e.search = r : delete e.search, this.$router.push({ name: this.$route.name, query: e }), this.loadData();
|
|
2041
|
+
}
|
|
2042
|
+
}
|
|
2043
|
+
}, Gs = "Ocurrió un error en la petición, por favor intenta nuevamente.", va = {
|
|
2044
|
+
success(r, e) {
|
|
2045
|
+
return k({ title: "ÉXITO", text: r, timer: 5e3, icon: "success" }).then(() => {
|
|
2046
|
+
typeof e == "function" && e(), k.close();
|
|
2047
|
+
});
|
|
2048
|
+
},
|
|
2049
|
+
error(r, e) {
|
|
2050
|
+
return k({ title: "ERROR", text: r && typeof r == "string" ? r : Gs, timer: 5e3, icon: "error" }).then(() => {
|
|
2051
|
+
typeof e == "function" && e(), k.close();
|
|
2052
|
+
});
|
|
2053
|
+
},
|
|
2054
|
+
alert(r, e, t) {
|
|
2055
|
+
return k({ title: r, text: e, timer: 5e3, icon: "warning" }).then(() => {
|
|
2056
|
+
typeof t == "function" && t(), k.close();
|
|
2057
|
+
});
|
|
2058
|
+
},
|
|
2059
|
+
dialog(r, e, t, s) {
|
|
2060
|
+
return k({
|
|
2061
|
+
title: r || "Confirmación",
|
|
2062
|
+
text: e,
|
|
2063
|
+
icon: "warning",
|
|
2064
|
+
buttons: { cancelar: { text: "Cancelar", value: "cancel" }, ok: { text: "Acepto", value: "ok" } },
|
|
2065
|
+
dangerMode: !0
|
|
2066
|
+
}).then((a) => {
|
|
2067
|
+
a === "ok" ? (k.close(), t && setTimeout(t, 300)) : s && setTimeout(s, 300);
|
|
2068
|
+
});
|
|
2069
|
+
}
|
|
2070
|
+
}, A = "ssoState", M = "user", W = "accessToken", D = "refreshToken", B = "business", ga = {
|
|
2071
|
+
getUser() {
|
|
2072
|
+
return JSON.parse(localStorage.getItem(M) || "{}");
|
|
2073
|
+
},
|
|
2074
|
+
setUser(r) {
|
|
2075
|
+
localStorage.setItem(M, JSON.stringify(r));
|
|
2076
|
+
},
|
|
2077
|
+
clearUser() {
|
|
2078
|
+
localStorage.removeItem(M);
|
|
2079
|
+
},
|
|
2080
|
+
getAccessToken() {
|
|
2081
|
+
return localStorage.getItem(W);
|
|
2082
|
+
},
|
|
2083
|
+
setAccessToken(r) {
|
|
2084
|
+
localStorage.setItem(W, r);
|
|
2085
|
+
},
|
|
2086
|
+
clearAccessToken() {
|
|
2087
|
+
localStorage.removeItem(W);
|
|
2088
|
+
},
|
|
2089
|
+
getRefreshToken() {
|
|
2090
|
+
return localStorage.getItem(D);
|
|
2091
|
+
},
|
|
2092
|
+
setRefreshToken(r) {
|
|
2093
|
+
localStorage.setItem(D, r);
|
|
2094
|
+
},
|
|
2095
|
+
clearRefreshToken() {
|
|
2096
|
+
localStorage.removeItem(D);
|
|
2097
|
+
},
|
|
2098
|
+
getSsoState() {
|
|
2099
|
+
return localStorage.getItem(A);
|
|
2100
|
+
},
|
|
2101
|
+
setSsoState(r) {
|
|
2102
|
+
localStorage.setItem(A, r);
|
|
2103
|
+
},
|
|
2104
|
+
clearSsoState() {
|
|
2105
|
+
localStorage.removeItem(A);
|
|
2106
|
+
},
|
|
2107
|
+
getBusiness() {
|
|
2108
|
+
return localStorage.getItem(B);
|
|
2109
|
+
},
|
|
2110
|
+
setBusiness(r) {
|
|
2111
|
+
localStorage.setItem(B, JSON.stringify(r));
|
|
2112
|
+
},
|
|
2113
|
+
clearBusiness() {
|
|
2114
|
+
localStorage.removeItem(B);
|
|
2115
|
+
},
|
|
2116
|
+
clearAll() {
|
|
2117
|
+
localStorage.clear();
|
|
2118
|
+
}
|
|
2119
|
+
}, Y = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", ma = {
|
|
2120
|
+
getRandomState() {
|
|
2121
|
+
let r = "";
|
|
2122
|
+
for (let e = 0; e < 36; e++)
|
|
2123
|
+
r += Y.charAt(Math.floor(Math.random() * Y.length));
|
|
2124
|
+
return r;
|
|
2125
|
+
},
|
|
2126
|
+
getCallbackParameters(r) {
|
|
2127
|
+
const e = new URL(r);
|
|
2128
|
+
return {
|
|
2129
|
+
state: e.searchParams.get("state"),
|
|
2130
|
+
sessionState: e.searchParams.get("session_state"),
|
|
2131
|
+
code: e.searchParams.get("code"),
|
|
2132
|
+
redirectUri: typeof process != "undefined" ? process.env.VUE_APP_SSO_AUTH_REDIRECT_URI : void 0
|
|
2133
|
+
};
|
|
2134
|
+
}
|
|
2135
|
+
}, ya = {
|
|
2136
|
+
getErrorMessages(r) {
|
|
2137
|
+
const e = [];
|
|
2138
|
+
return r && r.errors ? Array.isArray(r.errors) && r.errors.length > 0 ? r.errors.forEach((t) => {
|
|
2139
|
+
t.description && e.push(t.description);
|
|
2140
|
+
}) : Object.keys(r.errors).forEach((t) => e.push(r.errors[t])) : e.push("Ocurrió un error inesperado, por favor intente nuevamente"), e.join(`
|
|
2141
|
+
`);
|
|
2142
|
+
}
|
|
2143
|
+
}, ha = {
|
|
2144
|
+
capitalizeName(r) {
|
|
2145
|
+
return r ? r.toLowerCase().replace(/\b\w/g, (e) => e.toUpperCase()) : "";
|
|
2146
|
+
}
|
|
2147
|
+
}, Xs = 1048576, za = {
|
|
2148
|
+
maxFileSize: (r) => (e) => !e || e.size < Xs * r,
|
|
2149
|
+
fileType: (r) => (e) => !e || e.type === r,
|
|
2150
|
+
greaterThan: (r) => K.withParams(
|
|
2151
|
+
{ type: "greaterThan", value: r },
|
|
2152
|
+
(e) => !K.req(e) || e > r
|
|
2153
|
+
),
|
|
2154
|
+
mobile: (r) => r ? /^[0-9]*$/.test(r) && r.length === 9 : !0,
|
|
2155
|
+
url: (r) => /(https?:\/\/)(www\.)?(?!www)[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#()?&/=]*)/.test(r),
|
|
2156
|
+
validateImageSize: (r, e, t, s = !1) => E(void 0, null, function* () {
|
|
2157
|
+
if (!r)
|
|
2158
|
+
throw new Error("No se proporcionó ninguna imagen.");
|
|
2159
|
+
const a = new Image();
|
|
2160
|
+
return yield new Promise((n, l) => {
|
|
2161
|
+
a.onload = n, a.onerror = l, a.src = URL.createObjectURL(r);
|
|
2162
|
+
}), s ? a.width === e && a.height === t : a.width <= e && a.height <= t;
|
|
2163
|
+
})
|
|
2164
|
+
}, Zs = (r) => {
|
|
2165
|
+
const e = new FormData();
|
|
2166
|
+
for (const t in r) {
|
|
2167
|
+
const s = r[t];
|
|
2168
|
+
Array.isArray(s) && s.length > 0 ? s.forEach((a, n) => {
|
|
2169
|
+
var l;
|
|
2170
|
+
if (typeof a == "string" || typeof a == "number")
|
|
2171
|
+
e.append(`${t}[${n}]`, a);
|
|
2172
|
+
else if (a instanceof File)
|
|
2173
|
+
e.append(t, a);
|
|
2174
|
+
else if (a && typeof a == "object")
|
|
2175
|
+
for (const o in a)
|
|
2176
|
+
e.append(`${t}[${n}].${o}`, (l = a[o]) != null ? l : "");
|
|
2177
|
+
}) : e.append(t, s != null ? s : "");
|
|
2178
|
+
}
|
|
2179
|
+
return e;
|
|
2180
|
+
}, Qs = (r, e = 2) => {
|
|
2181
|
+
const t = parseFloat(r);
|
|
2182
|
+
return isNaN(t) ? "" : t.toLocaleString("en", { minimumFractionDigits: e, maximumFractionDigits: e });
|
|
2183
|
+
}, ea = (r, e) => {
|
|
2184
|
+
for (const t in e)
|
|
2185
|
+
if (e[t].key === r)
|
|
2186
|
+
return e[t];
|
|
2187
|
+
return {};
|
|
2188
|
+
}, ta = (r) => {
|
|
2189
|
+
const e = r.headers["content-disposition"];
|
|
2190
|
+
return e ? e.substr(e.indexOf("filename=") + 9) : "";
|
|
2191
|
+
}, sa = (r) => r ? r.split("@")[0] : "-", aa = (r, e) => E(void 0, null, function* () {
|
|
2192
|
+
try {
|
|
2193
|
+
const s = yield (yield import("axios")).default.get(r, { responseType: "blob" }), a = new Blob([s.data], { type: s.headers["content-type"] }), n = document.createElement("a");
|
|
2194
|
+
n.href = URL.createObjectURL(a), n.download = e, n.click(), URL.revokeObjectURL(n.href);
|
|
2195
|
+
} catch (t) {
|
|
2196
|
+
console.error(t);
|
|
2197
|
+
}
|
|
2198
|
+
}), ra = (r = 12) => {
|
|
2199
|
+
const e = [], t = /* @__PURE__ */ new Date(), s = t.getDate() === new Date(t.getFullYear(), t.getMonth() + 1, 0).getDate();
|
|
2200
|
+
let a = new Date(t.getFullYear(), t.getMonth(), 1);
|
|
2201
|
+
for (let n = 0; n < r; n++) {
|
|
2202
|
+
const l = a.getFullYear().toString() + String(a.getMonth() + 1).padStart(2, "0");
|
|
2203
|
+
e.push(l), a.setMonth(a.getMonth() - 1);
|
|
2204
|
+
}
|
|
2205
|
+
if (s) {
|
|
2206
|
+
const n = new Date(t.getFullYear(), t.getMonth() + 1, 1), l = n.getFullYear().toString() + String(n.getMonth() + 1).padStart(2, "0");
|
|
2207
|
+
e.unshift(l);
|
|
2208
|
+
}
|
|
2209
|
+
return e;
|
|
2210
|
+
}, Ca = {
|
|
2211
|
+
getFormData: Zs,
|
|
2212
|
+
formatNumber: Qs,
|
|
2213
|
+
searchValue: ea,
|
|
2214
|
+
getFileName: ta,
|
|
2215
|
+
trimEmail: sa,
|
|
2216
|
+
downloadFile: aa,
|
|
2217
|
+
generatePeriods: ra
|
|
2218
|
+
}, na = {
|
|
2219
|
+
WzButton: J,
|
|
2220
|
+
WzSidebar: ge,
|
|
2221
|
+
WzHeader: Ce,
|
|
2222
|
+
WzLayout: pe,
|
|
2223
|
+
WzSettingsPanel: Se,
|
|
2224
|
+
WzHorizontalNav: Ie,
|
|
2225
|
+
WzCard: We,
|
|
2226
|
+
WzAlert: Ne,
|
|
2227
|
+
WzBadge: G,
|
|
2228
|
+
WzDropdown: Xe,
|
|
2229
|
+
WzTabs: Nt,
|
|
2230
|
+
WzTableContainer: st,
|
|
2231
|
+
WzTableToolbar: it,
|
|
2232
|
+
WzFilterMenu: pt,
|
|
2233
|
+
WzTableFilters: gt,
|
|
2234
|
+
WzTable: Ct,
|
|
2235
|
+
WzTableFooter: St,
|
|
2236
|
+
WzSearchBar: It,
|
|
2237
|
+
WzPagination: Wt,
|
|
2238
|
+
WzInput: Yt,
|
|
2239
|
+
WzSelect: Zt,
|
|
2240
|
+
WzTextarea: as,
|
|
2241
|
+
WzDatepicker: os,
|
|
2242
|
+
WzProgress: fs,
|
|
2243
|
+
WzModal: ms,
|
|
2244
|
+
WzConfirmModal: bs,
|
|
2245
|
+
WzSweetAlert: Fs,
|
|
2246
|
+
WzFileInput: Rs,
|
|
2247
|
+
WzLoader: Bs,
|
|
2248
|
+
WzTooltip: qs,
|
|
2249
|
+
WzCheckbox: Js
|
|
2250
|
+
}, X = (r) => {
|
|
2251
|
+
Object.entries(na).forEach(([e, t]) => {
|
|
2252
|
+
r.component(e, t);
|
|
2253
|
+
});
|
|
2254
|
+
};
|
|
2255
|
+
typeof window != "undefined" && window.Vue && X(window.Vue);
|
|
2256
|
+
const ba = { install: X };
|
|
2257
|
+
export {
|
|
2258
|
+
va as Alert,
|
|
2259
|
+
fa as AlertMixin,
|
|
2260
|
+
pa as ConfirmModalMixin,
|
|
2261
|
+
za as CustomValidators,
|
|
2262
|
+
ya as ErrorUtils,
|
|
2263
|
+
_a as FilterMixin,
|
|
2264
|
+
ha as Helpers,
|
|
2265
|
+
ga as LocalStorage,
|
|
2266
|
+
wa as PaginationMixin,
|
|
2267
|
+
ma as SSOUtils,
|
|
2268
|
+
da as SortMixin,
|
|
2269
|
+
Ca as Util,
|
|
2270
|
+
Ne as WzAlert,
|
|
2271
|
+
G as WzBadge,
|
|
2272
|
+
J as WzButton,
|
|
2273
|
+
We as WzCard,
|
|
2274
|
+
Js as WzCheckbox,
|
|
2275
|
+
bs as WzConfirmModal,
|
|
2276
|
+
os as WzDatepicker,
|
|
2277
|
+
Xe as WzDropdown,
|
|
2278
|
+
Rs as WzFileInput,
|
|
2279
|
+
pt as WzFilterMenu,
|
|
2280
|
+
Ce as WzHeader,
|
|
2281
|
+
Ie as WzHorizontalNav,
|
|
2282
|
+
Yt as WzInput,
|
|
2283
|
+
pe as WzLayout,
|
|
2284
|
+
Bs as WzLoader,
|
|
2285
|
+
ms as WzModal,
|
|
2286
|
+
Wt as WzPagination,
|
|
2287
|
+
fs as WzProgress,
|
|
2288
|
+
It as WzSearchBar,
|
|
2289
|
+
Zt as WzSelect,
|
|
2290
|
+
Se as WzSettingsPanel,
|
|
2291
|
+
ge as WzSidebar,
|
|
2292
|
+
Fs as WzSweetAlert,
|
|
2293
|
+
Ct as WzTable,
|
|
2294
|
+
st as WzTableContainer,
|
|
2295
|
+
gt as WzTableFilters,
|
|
2296
|
+
St as WzTableFooter,
|
|
2297
|
+
it as WzTableToolbar,
|
|
2298
|
+
Nt as WzTabs,
|
|
2299
|
+
as as WzTextarea,
|
|
2300
|
+
qs as WzTooltip,
|
|
2301
|
+
ba as default,
|
|
2302
|
+
aa as downloadFile,
|
|
2303
|
+
Qs as formatNumber,
|
|
2304
|
+
ra as generatePeriods,
|
|
2305
|
+
ta as getFileName,
|
|
2306
|
+
Zs as getFormData,
|
|
2307
|
+
ea as searchValue,
|
|
2308
|
+
sa as trimEmail
|
|
2309
|
+
};
|