@beavernsticks/beaver-admin-ui-vue 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -0
- package/dist/beaver-admin-ui-vue.css +1 -0
- package/dist/index.d.ts +847 -0
- package/dist/index.es.js +1660 -0
- package/dist/index.umd.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +78 -0
package/dist/index.es.js
ADDED
|
@@ -0,0 +1,1660 @@
|
|
|
1
|
+
import { reactive as Z, computed as B, ref as T, markRaw as _, defineComponent as f, createBlock as u, openBlock as n, unref as s, h as ee, resolveDirective as q, withDirectives as D, createElementBlock as v, createCommentVNode as p, renderSlot as $, createElementVNode as m, normalizeClass as F, toDisplayString as k, mergeModels as b, useModel as g, withCtx as d, createVNode as c, useId as L, Fragment as C, renderList as I, Teleport as te, resolveDynamicComponent as le, mergeProps as oe, resolveComponent as G, isRef as ae, inject as se, Transition as ne, normalizeStyle as K, createTextVNode as ie, watch as re } from "vue";
|
|
2
|
+
import { isEqual as ue } from "lodash-es";
|
|
3
|
+
import { defineStore as W, storeToRefs as Q } from "pinia";
|
|
4
|
+
import { useBreakpoints as de, breakpointsTailwind as ce } from "@vueuse/core";
|
|
5
|
+
import { useConfirm as me, Button as h, AutoComplete as fe, Checkbox as ve, DatePicker as pe, Textarea as X, IconField as A, InputMask as be, InputIcon as R, MultiSelect as ge, InputNumber as ye, RadioButtonGroup as he, RadioButton as E, Password as xe, InputText as Y, Select as ke, ToggleSwitch as we, ScrollPanel as O, Menu as Ve, Drawer as U, ConfirmDialog as $e, Tabs as Me, TabList as Be, Tab as Ce, TabPanels as qe, TabPanel as De, DataTable as Se, Column as Ie, TreeTable as Re } from "primevue";
|
|
6
|
+
import H from "dayjs";
|
|
7
|
+
function jt(e, t) {
|
|
8
|
+
const a = Z({ ...e }), l = t ? Array.isArray(t) ? t : [t] : [], o = l.reduce(
|
|
9
|
+
(y, V) => (y[V] = B({
|
|
10
|
+
get: () => a[V],
|
|
11
|
+
set: (M) => {
|
|
12
|
+
a[V] = M;
|
|
13
|
+
}
|
|
14
|
+
}), y),
|
|
15
|
+
{}
|
|
16
|
+
);
|
|
17
|
+
function i(y) {
|
|
18
|
+
Object.keys(a).forEach((V) => {
|
|
19
|
+
a[V] = y[V];
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function r() {
|
|
23
|
+
Object.keys(a).filter((y) => !l.includes(y)).forEach((y) => {
|
|
24
|
+
a[y] = e[y];
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
const x = B(() => Object.keys(a).filter((y) => !l.includes(y)).some((y) => !ue(a[y], e[y])));
|
|
28
|
+
return {
|
|
29
|
+
filter: a,
|
|
30
|
+
// filterFields,
|
|
31
|
+
// filterFieldsChanged,
|
|
32
|
+
filterIsApplied: x,
|
|
33
|
+
filterApply: i,
|
|
34
|
+
filterReset: r,
|
|
35
|
+
// filterResetDraft,
|
|
36
|
+
...o
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
const Te = W("drawer", () => {
|
|
40
|
+
const e = T([]);
|
|
41
|
+
function t(l, o) {
|
|
42
|
+
e.value.push({ component: _(l), props: o });
|
|
43
|
+
}
|
|
44
|
+
function a(l) {
|
|
45
|
+
e.value.splice(l, 1);
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
stack: e,
|
|
49
|
+
openDrawer: t,
|
|
50
|
+
closeDrawer: a
|
|
51
|
+
};
|
|
52
|
+
}), ze = W("responsive", () => {
|
|
53
|
+
const e = T(!1);
|
|
54
|
+
function t() {
|
|
55
|
+
e.value = !e.value;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
isMobileMenuVisible: e,
|
|
59
|
+
toggleMobileMenu: t
|
|
60
|
+
};
|
|
61
|
+
});
|
|
62
|
+
function j() {
|
|
63
|
+
const e = Te(), { stack: t } = Q(e);
|
|
64
|
+
return {
|
|
65
|
+
stack: t,
|
|
66
|
+
open: e.openDrawer,
|
|
67
|
+
close: e.closeDrawer
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
function z() {
|
|
71
|
+
const e = de(ce), t = ze(), { isMobileMenuVisible: a } = Q(t), l = e.smaller("sm"), o = e.between("sm", "lg"), i = e.greater("lg"), r = l, x = o, y = i, V = e.smaller("lg"), M = e.greater("sm");
|
|
72
|
+
return {
|
|
73
|
+
breakpoints: e,
|
|
74
|
+
// Полный доступ к breakpoints API
|
|
75
|
+
isMobile: l,
|
|
76
|
+
isTablet: o,
|
|
77
|
+
isDesktop: i,
|
|
78
|
+
mobileOnly: r,
|
|
79
|
+
tabletOnly: x,
|
|
80
|
+
desktopOnly: y,
|
|
81
|
+
isMobileOrTablet: V,
|
|
82
|
+
isTabletOrDesktop: M,
|
|
83
|
+
isMobileMenuVisible: a,
|
|
84
|
+
toggleMobileMenu: t.toggleMobileMenu
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
function Pt() {
|
|
88
|
+
const e = me();
|
|
89
|
+
function t(a) {
|
|
90
|
+
e.require({
|
|
91
|
+
header: a.header || "Подтвердите действие",
|
|
92
|
+
message: a.message,
|
|
93
|
+
acceptLabel: a.acceptLabel || "Подтвердить",
|
|
94
|
+
acceptProps: {
|
|
95
|
+
severity: "danger",
|
|
96
|
+
rounded: !0,
|
|
97
|
+
size: "small"
|
|
98
|
+
},
|
|
99
|
+
rejectLabel: a.rejectLabel || "Отменить",
|
|
100
|
+
rejectProps: {
|
|
101
|
+
severity: "secondary",
|
|
102
|
+
outlined: !0,
|
|
103
|
+
rounded: !0,
|
|
104
|
+
size: "small"
|
|
105
|
+
},
|
|
106
|
+
accept: a.acceptHandler,
|
|
107
|
+
reject: a.rejectHandler
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
return {
|
|
111
|
+
showConfirm: t
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
const Ne = /* @__PURE__ */ f({
|
|
115
|
+
__name: "CreateButton",
|
|
116
|
+
props: {
|
|
117
|
+
component: {}
|
|
118
|
+
},
|
|
119
|
+
setup(e) {
|
|
120
|
+
const { open: t } = j(), { isDesktop: a } = z();
|
|
121
|
+
return (l, o) => (n(), u(s(h), {
|
|
122
|
+
label: s(a) ? "Создать" : void 0,
|
|
123
|
+
size: "small",
|
|
124
|
+
rounded: "",
|
|
125
|
+
icon: "pi pi-plus",
|
|
126
|
+
onClick: o[0] || (o[0] = (i) => s(t)(e.component))
|
|
127
|
+
}, null, 8, ["label"]));
|
|
128
|
+
}
|
|
129
|
+
}), Le = /* @__PURE__ */ f({
|
|
130
|
+
__name: "FilterButton",
|
|
131
|
+
props: {
|
|
132
|
+
hasChanges: { type: Boolean },
|
|
133
|
+
component: {}
|
|
134
|
+
},
|
|
135
|
+
setup(e) {
|
|
136
|
+
const { open: t } = j(), { isDesktop: a } = z();
|
|
137
|
+
return (l, o) => (n(), u(s(h), {
|
|
138
|
+
label: s(a) ? "Фильтр" : void 0,
|
|
139
|
+
size: "small",
|
|
140
|
+
variant: "outlined",
|
|
141
|
+
icon: `pi ${e.hasChanges ? "pi-filter-fill text-primary" : "pi-filter"}`,
|
|
142
|
+
severity: "secondary",
|
|
143
|
+
rounded: "",
|
|
144
|
+
onClick: o[0] || (o[0] = (i) => s(t)(e.component))
|
|
145
|
+
}, null, 8, ["label", "icon"]));
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
function Ht(e, t) {
|
|
149
|
+
return ee(e, t?.props, t?.slots || t?.children);
|
|
150
|
+
}
|
|
151
|
+
function S(e, t) {
|
|
152
|
+
return {
|
|
153
|
+
value: e,
|
|
154
|
+
pt: { text: "!text-xs" },
|
|
155
|
+
showDelay: t ? 1e3 : void 0
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
const Oe = /* @__PURE__ */ f({
|
|
159
|
+
__name: "SearchToggleButton",
|
|
160
|
+
props: {
|
|
161
|
+
value: { type: Boolean }
|
|
162
|
+
},
|
|
163
|
+
setup(e) {
|
|
164
|
+
return (t, a) => {
|
|
165
|
+
const l = q("tooltip");
|
|
166
|
+
return D((n(), u(s(h), {
|
|
167
|
+
icon: "pi pi-search",
|
|
168
|
+
severity: e.value ? "primary" : "secondary",
|
|
169
|
+
rounded: "",
|
|
170
|
+
size: "small",
|
|
171
|
+
variant: e.value ? void 0 : "outlined"
|
|
172
|
+
}, null, 8, ["severity", "variant"])), [
|
|
173
|
+
[
|
|
174
|
+
l,
|
|
175
|
+
s(S)(e.value ? "Выключить поиск" : "Включить поиск", !0),
|
|
176
|
+
void 0,
|
|
177
|
+
{ right: !0 }
|
|
178
|
+
]
|
|
179
|
+
]);
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
}), Jt = /* @__PURE__ */ f({
|
|
183
|
+
__name: "SelectAddButton",
|
|
184
|
+
setup(e) {
|
|
185
|
+
return (t, a) => (n(), u(s(h), {
|
|
186
|
+
label: "Добавить",
|
|
187
|
+
severity: "secondary",
|
|
188
|
+
text: "",
|
|
189
|
+
size: "small",
|
|
190
|
+
icon: "pi pi-plus",
|
|
191
|
+
fluid: "",
|
|
192
|
+
class: "rounded-t-none"
|
|
193
|
+
}));
|
|
194
|
+
}
|
|
195
|
+
}), Gt = /* @__PURE__ */ f({
|
|
196
|
+
__name: "TableAddButton",
|
|
197
|
+
props: {
|
|
198
|
+
tooltip: { default: "Добавить" }
|
|
199
|
+
},
|
|
200
|
+
setup(e) {
|
|
201
|
+
return (t, a) => {
|
|
202
|
+
const l = q("tooltip");
|
|
203
|
+
return D((n(), u(s(h), {
|
|
204
|
+
text: "",
|
|
205
|
+
rounded: "",
|
|
206
|
+
size: "small",
|
|
207
|
+
icon: "pi pi-plus",
|
|
208
|
+
severity: "info"
|
|
209
|
+
}, null, 512)), [
|
|
210
|
+
[
|
|
211
|
+
l,
|
|
212
|
+
s(S)(e.tooltip, !0),
|
|
213
|
+
void 0,
|
|
214
|
+
{ left: !0 }
|
|
215
|
+
]
|
|
216
|
+
]);
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
}), Kt = /* @__PURE__ */ f({
|
|
220
|
+
__name: "TableDeleteButton",
|
|
221
|
+
props: {
|
|
222
|
+
tooltip: { default: "Удалить" }
|
|
223
|
+
},
|
|
224
|
+
setup(e) {
|
|
225
|
+
return (t, a) => {
|
|
226
|
+
const l = q("tooltip");
|
|
227
|
+
return D((n(), u(s(h), {
|
|
228
|
+
text: "",
|
|
229
|
+
rounded: "",
|
|
230
|
+
size: "small",
|
|
231
|
+
icon: "pi pi-trash",
|
|
232
|
+
severity: "danger"
|
|
233
|
+
}, null, 512)), [
|
|
234
|
+
[
|
|
235
|
+
l,
|
|
236
|
+
s(S)(e.tooltip, !0),
|
|
237
|
+
void 0,
|
|
238
|
+
{ left: !0 }
|
|
239
|
+
]
|
|
240
|
+
]);
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
}), Wt = /* @__PURE__ */ f({
|
|
244
|
+
__name: "TableEditButton",
|
|
245
|
+
props: {
|
|
246
|
+
tooltip: { default: "Редактировать" }
|
|
247
|
+
},
|
|
248
|
+
setup(e) {
|
|
249
|
+
return (t, a) => {
|
|
250
|
+
const l = q("tooltip");
|
|
251
|
+
return D((n(), u(s(h), {
|
|
252
|
+
text: "",
|
|
253
|
+
rounded: "",
|
|
254
|
+
size: "small",
|
|
255
|
+
icon: "pi pi-pencil"
|
|
256
|
+
}, null, 512)), [
|
|
257
|
+
[
|
|
258
|
+
l,
|
|
259
|
+
s(S)(e.tooltip, !0),
|
|
260
|
+
void 0,
|
|
261
|
+
{ left: !0 }
|
|
262
|
+
]
|
|
263
|
+
]);
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
}), Qt = /* @__PURE__ */ f({
|
|
267
|
+
__name: "TablePurgeButton",
|
|
268
|
+
props: {
|
|
269
|
+
tooltip: { default: "Уничтожить" }
|
|
270
|
+
},
|
|
271
|
+
setup(e) {
|
|
272
|
+
return (t, a) => {
|
|
273
|
+
const l = q("tooltip");
|
|
274
|
+
return D((n(), u(s(h), {
|
|
275
|
+
text: "",
|
|
276
|
+
rounded: "",
|
|
277
|
+
size: "small",
|
|
278
|
+
icon: "pi pi-times",
|
|
279
|
+
severity: "danger"
|
|
280
|
+
}, null, 512)), [
|
|
281
|
+
[
|
|
282
|
+
l,
|
|
283
|
+
s(S)(e.tooltip, !0),
|
|
284
|
+
void 0,
|
|
285
|
+
{ left: !0 }
|
|
286
|
+
]
|
|
287
|
+
]);
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
}), Xt = /* @__PURE__ */ f({
|
|
291
|
+
__name: "TableRestoreButton",
|
|
292
|
+
props: {
|
|
293
|
+
tooltip: { default: "Восстановить" }
|
|
294
|
+
},
|
|
295
|
+
setup(e) {
|
|
296
|
+
return (t, a) => {
|
|
297
|
+
const l = q("tooltip");
|
|
298
|
+
return D((n(), u(s(h), {
|
|
299
|
+
text: "",
|
|
300
|
+
rounded: "",
|
|
301
|
+
size: "small",
|
|
302
|
+
icon: "pi pi-undo",
|
|
303
|
+
severity: "warn"
|
|
304
|
+
}, null, 512)), [
|
|
305
|
+
[
|
|
306
|
+
l,
|
|
307
|
+
s(S)(e.tooltip, !0),
|
|
308
|
+
void 0,
|
|
309
|
+
{ left: !0 }
|
|
310
|
+
]
|
|
311
|
+
]);
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
}), Ae = { class: "flex flex-col gap-1" }, Ee = {
|
|
315
|
+
key: 0,
|
|
316
|
+
class: "text-sm text-surface-600"
|
|
317
|
+
}, Fe = {
|
|
318
|
+
key: 0,
|
|
319
|
+
class: "text-red-600 mr-1"
|
|
320
|
+
}, Ue = {
|
|
321
|
+
key: 1,
|
|
322
|
+
class: "text-sm text-red-600"
|
|
323
|
+
}, je = {
|
|
324
|
+
key: 2,
|
|
325
|
+
class: "text-sm text-surface-400"
|
|
326
|
+
}, w = /* @__PURE__ */ f({
|
|
327
|
+
__name: "FormField",
|
|
328
|
+
props: {
|
|
329
|
+
label: {},
|
|
330
|
+
isRequired: { type: Boolean },
|
|
331
|
+
isBold: { type: Boolean },
|
|
332
|
+
hint: {},
|
|
333
|
+
errorMessage: {}
|
|
334
|
+
},
|
|
335
|
+
setup(e) {
|
|
336
|
+
return (t, a) => (n(), v("div", Ae, [
|
|
337
|
+
e.label ? (n(), v("label", Ee, [
|
|
338
|
+
e.isRequired ? (n(), v("span", Fe, "*")) : p("", !0),
|
|
339
|
+
m("span", {
|
|
340
|
+
class: F({ "font-medium": e.isBold })
|
|
341
|
+
}, k(e.label) + ":", 3)
|
|
342
|
+
])) : p("", !0),
|
|
343
|
+
$(t.$slots, "default"),
|
|
344
|
+
e.errorMessage ? (n(), v("small", Ue, k(e.errorMessage), 1)) : p("", !0),
|
|
345
|
+
e.hint && !e.errorMessage ? (n(), v("small", je, k(e.hint), 1)) : p("", !0)
|
|
346
|
+
]));
|
|
347
|
+
}
|
|
348
|
+
}), Yt = /* @__PURE__ */ f({
|
|
349
|
+
__name: "AutocompleteInput",
|
|
350
|
+
props: /* @__PURE__ */ b({
|
|
351
|
+
label: {},
|
|
352
|
+
isRequired: { type: Boolean },
|
|
353
|
+
options: { default: () => [] },
|
|
354
|
+
optionLabel: { default: "title" },
|
|
355
|
+
optionValue: { default: "id" },
|
|
356
|
+
errorMessage: { default: void 0 }
|
|
357
|
+
}, {
|
|
358
|
+
modelValue: {
|
|
359
|
+
required: !0
|
|
360
|
+
},
|
|
361
|
+
modelModifiers: {}
|
|
362
|
+
}),
|
|
363
|
+
emits: /* @__PURE__ */ b(["search"], ["update:modelValue"]),
|
|
364
|
+
setup(e) {
|
|
365
|
+
const t = g(e, "modelValue");
|
|
366
|
+
return (a, l) => (n(), u(w, {
|
|
367
|
+
"is-required": e.isRequired,
|
|
368
|
+
label: e.label,
|
|
369
|
+
"error-message": e.errorMessage
|
|
370
|
+
}, {
|
|
371
|
+
default: d(() => [
|
|
372
|
+
c(s(fe), {
|
|
373
|
+
modelValue: t.value,
|
|
374
|
+
"onUpdate:modelValue": l[0] || (l[0] = (o) => t.value = o),
|
|
375
|
+
suggestions: e.options,
|
|
376
|
+
"option-label": e.optionLabel,
|
|
377
|
+
"option-value": e.optionValue,
|
|
378
|
+
"data-key": e.optionValue,
|
|
379
|
+
placeholder: "Выберите значение",
|
|
380
|
+
"pt:pcinputtext:root": "placeholder-surface-400",
|
|
381
|
+
"overlay-class": "bg-white",
|
|
382
|
+
fluid: "",
|
|
383
|
+
"label-class": { "text-surface-400": !t.value },
|
|
384
|
+
dropdown: "",
|
|
385
|
+
"dropdown-mode": "current",
|
|
386
|
+
"force-selection": "",
|
|
387
|
+
onComplete: l[1] || (l[1] = (o) => a.$emit("search", o.query)),
|
|
388
|
+
onDropdownClick: l[2] || (l[2] = (o) => a.$emit("search", o.query)),
|
|
389
|
+
onClear: l[3] || (l[3] = (o) => t.value = null)
|
|
390
|
+
}, null, 8, ["modelValue", "suggestions", "option-label", "option-value", "data-key", "label-class"])
|
|
391
|
+
]),
|
|
392
|
+
_: 1
|
|
393
|
+
}, 8, ["is-required", "label", "error-message"]));
|
|
394
|
+
}
|
|
395
|
+
}), Pe = { class: "flex flex-col gap-1" }, He = ["for"], Zt = /* @__PURE__ */ f({
|
|
396
|
+
__name: "CheckboxGroupInput",
|
|
397
|
+
props: /* @__PURE__ */ b({
|
|
398
|
+
label: {},
|
|
399
|
+
errorMessage: {},
|
|
400
|
+
hint: {},
|
|
401
|
+
options: {}
|
|
402
|
+
}, {
|
|
403
|
+
modelValue: {},
|
|
404
|
+
modelModifiers: {}
|
|
405
|
+
}),
|
|
406
|
+
emits: ["update:modelValue"],
|
|
407
|
+
setup(e) {
|
|
408
|
+
const t = g(e, "modelValue"), a = L();
|
|
409
|
+
return (l, o) => (n(), u(w, {
|
|
410
|
+
label: e.label,
|
|
411
|
+
hint: e.hint,
|
|
412
|
+
"error-message": e.errorMessage,
|
|
413
|
+
"is-bold": ""
|
|
414
|
+
}, {
|
|
415
|
+
default: d(() => [
|
|
416
|
+
m("div", Pe, [
|
|
417
|
+
(n(!0), v(C, null, I(e.options, (i, r) => (n(), v("div", {
|
|
418
|
+
key: r,
|
|
419
|
+
class: "flex items-center gap-2"
|
|
420
|
+
}, [
|
|
421
|
+
c(s(ve), {
|
|
422
|
+
modelValue: t.value,
|
|
423
|
+
"onUpdate:modelValue": o[0] || (o[0] = (x) => t.value = x),
|
|
424
|
+
"input-id": `${s(a)}-option-${r}`,
|
|
425
|
+
value: i.id
|
|
426
|
+
}, null, 8, ["modelValue", "input-id", "value"]),
|
|
427
|
+
m("label", {
|
|
428
|
+
for: `${s(a)}-option-${r}`,
|
|
429
|
+
class: "text-sm cursor-pointer"
|
|
430
|
+
}, k(i.label), 9, He)
|
|
431
|
+
]))), 128))
|
|
432
|
+
])
|
|
433
|
+
]),
|
|
434
|
+
_: 1
|
|
435
|
+
}, 8, ["label", "hint", "error-message"]));
|
|
436
|
+
}
|
|
437
|
+
}), _t = /* @__PURE__ */ f({
|
|
438
|
+
__name: "DateInput",
|
|
439
|
+
props: /* @__PURE__ */ b({
|
|
440
|
+
label: {},
|
|
441
|
+
errorMessage: {},
|
|
442
|
+
isRequired: { type: Boolean }
|
|
443
|
+
}, {
|
|
444
|
+
modelValue: {},
|
|
445
|
+
modelModifiers: {}
|
|
446
|
+
}),
|
|
447
|
+
emits: ["update:modelValue"],
|
|
448
|
+
setup(e) {
|
|
449
|
+
const t = g(e, "modelValue", {
|
|
450
|
+
get: (a) => a ? H(a).toDate() : void 0,
|
|
451
|
+
set: (a) => a ? H(a).startOf("day").toDate() : void 0
|
|
452
|
+
});
|
|
453
|
+
return (a, l) => (n(), u(w, {
|
|
454
|
+
label: e.label,
|
|
455
|
+
"error-message": e.errorMessage,
|
|
456
|
+
"is-required": e.isRequired
|
|
457
|
+
}, {
|
|
458
|
+
default: d(() => [
|
|
459
|
+
c(s(pe), {
|
|
460
|
+
modelValue: t.value,
|
|
461
|
+
"onUpdate:modelValue": l[0] || (l[0] = (o) => t.value = o),
|
|
462
|
+
fluid: "",
|
|
463
|
+
"show-icon": "",
|
|
464
|
+
"icon-display": "input",
|
|
465
|
+
"date-format": "dd.mm.yy",
|
|
466
|
+
"manual-input": !1,
|
|
467
|
+
invalid: !!e.errorMessage
|
|
468
|
+
}, null, 8, ["modelValue", "invalid"])
|
|
469
|
+
]),
|
|
470
|
+
_: 1
|
|
471
|
+
}, 8, ["label", "error-message", "is-required"]));
|
|
472
|
+
}
|
|
473
|
+
}), el = /* @__PURE__ */ f({
|
|
474
|
+
__name: "JSONInput",
|
|
475
|
+
props: /* @__PURE__ */ b({
|
|
476
|
+
label: {},
|
|
477
|
+
errorMessage: {},
|
|
478
|
+
isRequired: { type: Boolean }
|
|
479
|
+
}, {
|
|
480
|
+
modelValue: { required: !0 },
|
|
481
|
+
modelModifiers: {}
|
|
482
|
+
}),
|
|
483
|
+
emits: ["update:modelValue"],
|
|
484
|
+
setup(e) {
|
|
485
|
+
const t = g(e, "modelValue"), a = B({
|
|
486
|
+
get: () => {
|
|
487
|
+
try {
|
|
488
|
+
return JSON.stringify(t.value, null, 2);
|
|
489
|
+
} catch {
|
|
490
|
+
return "";
|
|
491
|
+
}
|
|
492
|
+
},
|
|
493
|
+
set: (l) => {
|
|
494
|
+
try {
|
|
495
|
+
t.value = JSON.parse(l);
|
|
496
|
+
} catch (o) {
|
|
497
|
+
console.error(o);
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
});
|
|
501
|
+
return (l, o) => (n(), u(w, {
|
|
502
|
+
label: e.label,
|
|
503
|
+
"error-message": e.errorMessage,
|
|
504
|
+
"is-required": e.isRequired
|
|
505
|
+
}, {
|
|
506
|
+
default: d(() => [
|
|
507
|
+
c(s(X), {
|
|
508
|
+
modelValue: a.value,
|
|
509
|
+
"onUpdate:modelValue": o[0] || (o[0] = (i) => a.value = i),
|
|
510
|
+
rows: 10,
|
|
511
|
+
fluid: "",
|
|
512
|
+
invalid: !!e.errorMessage
|
|
513
|
+
}, null, 8, ["modelValue", "invalid"])
|
|
514
|
+
]),
|
|
515
|
+
_: 1
|
|
516
|
+
}, 8, ["label", "error-message", "is-required"]));
|
|
517
|
+
}
|
|
518
|
+
}), tl = /* @__PURE__ */ f({
|
|
519
|
+
__name: "MaskedInput",
|
|
520
|
+
props: /* @__PURE__ */ b({
|
|
521
|
+
label: {},
|
|
522
|
+
errorMessage: {},
|
|
523
|
+
isRequired: { type: Boolean },
|
|
524
|
+
autofocus: { type: Boolean },
|
|
525
|
+
isDisabled: { type: Boolean },
|
|
526
|
+
mask: {},
|
|
527
|
+
unmask: { type: Boolean },
|
|
528
|
+
reset: { type: Function },
|
|
529
|
+
isChanged: { type: Boolean }
|
|
530
|
+
}, {
|
|
531
|
+
modelValue: {},
|
|
532
|
+
modelModifiers: {}
|
|
533
|
+
}),
|
|
534
|
+
emits: ["update:modelValue"],
|
|
535
|
+
setup(e) {
|
|
536
|
+
const t = g(e, "modelValue");
|
|
537
|
+
return (a, l) => (n(), u(w, {
|
|
538
|
+
label: e.label,
|
|
539
|
+
"error-message": e.errorMessage,
|
|
540
|
+
"is-required": e.isRequired
|
|
541
|
+
}, {
|
|
542
|
+
default: d(() => [
|
|
543
|
+
c(s(A), null, {
|
|
544
|
+
default: d(() => [
|
|
545
|
+
c(s(be), {
|
|
546
|
+
modelValue: t.value,
|
|
547
|
+
"onUpdate:modelValue": l[0] || (l[0] = (o) => t.value = o),
|
|
548
|
+
fluid: "",
|
|
549
|
+
mask: e.mask,
|
|
550
|
+
unmask: e.unmask,
|
|
551
|
+
invalid: !!e.errorMessage,
|
|
552
|
+
autofocus: e.autofocus,
|
|
553
|
+
disabled: e.isDisabled
|
|
554
|
+
}, null, 8, ["modelValue", "mask", "unmask", "invalid", "autofocus", "disabled"]),
|
|
555
|
+
e.reset && e.isChanged ? (n(), u(s(R), {
|
|
556
|
+
key: 0,
|
|
557
|
+
class: "pi pi-undo cursor-pointer",
|
|
558
|
+
onClick: e.reset
|
|
559
|
+
}, null, 8, ["onClick"])) : p("", !0)
|
|
560
|
+
]),
|
|
561
|
+
_: 1
|
|
562
|
+
})
|
|
563
|
+
]),
|
|
564
|
+
_: 1
|
|
565
|
+
}, 8, ["label", "error-message", "is-required"]));
|
|
566
|
+
}
|
|
567
|
+
}), Je = {
|
|
568
|
+
key: 0,
|
|
569
|
+
class: "p-3 flex justify-between"
|
|
570
|
+
}, ll = /* @__PURE__ */ f({
|
|
571
|
+
__name: "MultiselectInput",
|
|
572
|
+
props: /* @__PURE__ */ b({
|
|
573
|
+
label: {},
|
|
574
|
+
isRequired: { type: Boolean },
|
|
575
|
+
options: { default: () => [] },
|
|
576
|
+
optionLabel: { type: [String, Function], default: "title" },
|
|
577
|
+
optionValue: { type: [String, Function], default: "id" },
|
|
578
|
+
errorMessage: { default: void 0 },
|
|
579
|
+
allowCreation: { type: Boolean },
|
|
580
|
+
maxSelectedLabels: { default: 0 }
|
|
581
|
+
}, {
|
|
582
|
+
modelValue: {},
|
|
583
|
+
modelModifiers: {}
|
|
584
|
+
}),
|
|
585
|
+
emits: ["update:modelValue"],
|
|
586
|
+
setup(e) {
|
|
587
|
+
const t = g(e, "modelValue", {
|
|
588
|
+
get: (l) => l || [],
|
|
589
|
+
set: (l) => l?.length ? l : void 0
|
|
590
|
+
}), a = T("");
|
|
591
|
+
return (l, o) => (n(), u(w, {
|
|
592
|
+
"is-required": e.isRequired,
|
|
593
|
+
label: e.label,
|
|
594
|
+
"error-message": e.errorMessage
|
|
595
|
+
}, {
|
|
596
|
+
default: d(() => [
|
|
597
|
+
c(s(ge), {
|
|
598
|
+
modelValue: t.value,
|
|
599
|
+
"onUpdate:modelValue": o[0] || (o[0] = (i) => t.value = i),
|
|
600
|
+
options: e.options,
|
|
601
|
+
"data-key": "id",
|
|
602
|
+
"option-label": e.optionLabel,
|
|
603
|
+
"option-value": e.optionValue,
|
|
604
|
+
"overlay-class": "bg-white",
|
|
605
|
+
fluid: "",
|
|
606
|
+
"show-clear": !e.isRequired,
|
|
607
|
+
multiple: "",
|
|
608
|
+
"max-selected-labels": e.maxSelectedLabels,
|
|
609
|
+
"filter-placeholder": "Поиск...",
|
|
610
|
+
placeholder: "Выберите значение",
|
|
611
|
+
"pt:label": !t.value?.length && "!text-surface-400",
|
|
612
|
+
"selected-items-label": "Выбрано: { items }",
|
|
613
|
+
"show-toggle-all": !1
|
|
614
|
+
}, {
|
|
615
|
+
footer: d(() => [
|
|
616
|
+
e.allowCreation ? (n(), v("div", Je, [
|
|
617
|
+
c(s(h), {
|
|
618
|
+
disabled: !a.value,
|
|
619
|
+
label: "Добавить",
|
|
620
|
+
severity: "secondary",
|
|
621
|
+
text: "",
|
|
622
|
+
size: "small",
|
|
623
|
+
icon: "pi pi-plus"
|
|
624
|
+
}, null, 8, ["disabled"])
|
|
625
|
+
])) : p("", !0)
|
|
626
|
+
]),
|
|
627
|
+
_: 1
|
|
628
|
+
}, 8, ["modelValue", "options", "option-label", "option-value", "show-clear", "max-selected-labels", "pt:label"])
|
|
629
|
+
]),
|
|
630
|
+
_: 1
|
|
631
|
+
}, 8, ["is-required", "label", "error-message"]));
|
|
632
|
+
}
|
|
633
|
+
}), ol = /* @__PURE__ */ f({
|
|
634
|
+
__name: "NumberInput",
|
|
635
|
+
props: /* @__PURE__ */ b({
|
|
636
|
+
label: {},
|
|
637
|
+
errorMessage: {},
|
|
638
|
+
isRequired: { type: Boolean }
|
|
639
|
+
}, {
|
|
640
|
+
modelValue: {},
|
|
641
|
+
modelModifiers: {}
|
|
642
|
+
}),
|
|
643
|
+
emits: ["update:modelValue"],
|
|
644
|
+
setup(e) {
|
|
645
|
+
const t = g(e, "modelValue");
|
|
646
|
+
return (a, l) => (n(), u(w, {
|
|
647
|
+
label: e.label,
|
|
648
|
+
"error-message": e.errorMessage,
|
|
649
|
+
"is-required": e.isRequired
|
|
650
|
+
}, {
|
|
651
|
+
default: d(() => [
|
|
652
|
+
c(s(ye), {
|
|
653
|
+
modelValue: t.value,
|
|
654
|
+
"onUpdate:modelValue": l[0] || (l[0] = (o) => t.value = o),
|
|
655
|
+
fluid: "",
|
|
656
|
+
invalid: !!e.errorMessage
|
|
657
|
+
}, null, 8, ["modelValue", "invalid"])
|
|
658
|
+
]),
|
|
659
|
+
_: 1
|
|
660
|
+
}, 8, ["label", "error-message", "is-required"]));
|
|
661
|
+
}
|
|
662
|
+
}), Ge = { class: "flex items-center gap-2" }, Ke = ["for"], We = { class: "flex items-center gap-2" }, Qe = ["for"], Xe = { class: "flex items-center gap-2" }, Ye = ["for"], al = /* @__PURE__ */ f({
|
|
663
|
+
__name: "OptionalBooleanInput",
|
|
664
|
+
props: /* @__PURE__ */ b({
|
|
665
|
+
label: {},
|
|
666
|
+
errorMessage: {},
|
|
667
|
+
hint: {}
|
|
668
|
+
}, {
|
|
669
|
+
modelValue: { type: Boolean },
|
|
670
|
+
modelModifiers: {}
|
|
671
|
+
}),
|
|
672
|
+
emits: ["update:modelValue"],
|
|
673
|
+
setup(e) {
|
|
674
|
+
const t = g(e, "modelValue"), a = B({
|
|
675
|
+
get: () => {
|
|
676
|
+
switch (t.value) {
|
|
677
|
+
case !0:
|
|
678
|
+
return "true";
|
|
679
|
+
case !1:
|
|
680
|
+
return "false";
|
|
681
|
+
default:
|
|
682
|
+
return "undefined";
|
|
683
|
+
}
|
|
684
|
+
},
|
|
685
|
+
set: (r) => {
|
|
686
|
+
t.value = r === "true" ? !0 : r === "false" ? !1 : void 0;
|
|
687
|
+
}
|
|
688
|
+
}), l = L(), o = L(), i = L();
|
|
689
|
+
return (r, x) => (n(), u(w, {
|
|
690
|
+
label: e.label,
|
|
691
|
+
hint: e.hint,
|
|
692
|
+
"error-message": e.errorMessage,
|
|
693
|
+
"is-bold": ""
|
|
694
|
+
}, {
|
|
695
|
+
default: d(() => [
|
|
696
|
+
c(s(he), {
|
|
697
|
+
modelValue: a.value,
|
|
698
|
+
"onUpdate:modelValue": x[0] || (x[0] = (y) => a.value = y),
|
|
699
|
+
class: "flex max-sm:flex-col flex-wrap gap-4"
|
|
700
|
+
}, {
|
|
701
|
+
default: d(() => [
|
|
702
|
+
m("div", Ge, [
|
|
703
|
+
c(s(E), {
|
|
704
|
+
"input-id": s(l),
|
|
705
|
+
value: "undefined"
|
|
706
|
+
}, null, 8, ["input-id"]),
|
|
707
|
+
m("label", {
|
|
708
|
+
for: s(l),
|
|
709
|
+
class: "text-sm cursor-pointer"
|
|
710
|
+
}, "Неважно", 8, Ke)
|
|
711
|
+
]),
|
|
712
|
+
m("div", We, [
|
|
713
|
+
c(s(E), {
|
|
714
|
+
"input-id": s(o),
|
|
715
|
+
value: "true"
|
|
716
|
+
}, null, 8, ["input-id"]),
|
|
717
|
+
m("label", {
|
|
718
|
+
for: s(o),
|
|
719
|
+
class: "text-sm cursor-pointer"
|
|
720
|
+
}, "Да", 8, Qe)
|
|
721
|
+
]),
|
|
722
|
+
m("div", Xe, [
|
|
723
|
+
c(s(E), {
|
|
724
|
+
"input-id": s(i),
|
|
725
|
+
value: "false"
|
|
726
|
+
}, null, 8, ["input-id"]),
|
|
727
|
+
m("label", {
|
|
728
|
+
for: s(i),
|
|
729
|
+
class: "text-sm cursor-pointer"
|
|
730
|
+
}, "Нет", 8, Ye)
|
|
731
|
+
])
|
|
732
|
+
]),
|
|
733
|
+
_: 1
|
|
734
|
+
}, 8, ["modelValue"])
|
|
735
|
+
]),
|
|
736
|
+
_: 1
|
|
737
|
+
}, 8, ["label", "hint", "error-message"]));
|
|
738
|
+
}
|
|
739
|
+
}), sl = /* @__PURE__ */ f({
|
|
740
|
+
__name: "PasswordInput",
|
|
741
|
+
props: /* @__PURE__ */ b({
|
|
742
|
+
label: {},
|
|
743
|
+
errorMessage: {},
|
|
744
|
+
isRequired: { type: Boolean },
|
|
745
|
+
isDisabled: { type: Boolean },
|
|
746
|
+
reset: { type: Function },
|
|
747
|
+
isChanged: { type: Boolean }
|
|
748
|
+
}, {
|
|
749
|
+
modelValue: {},
|
|
750
|
+
modelModifiers: {}
|
|
751
|
+
}),
|
|
752
|
+
emits: ["update:modelValue"],
|
|
753
|
+
setup(e) {
|
|
754
|
+
const t = g(e, "modelValue");
|
|
755
|
+
return (a, l) => (n(), u(w, {
|
|
756
|
+
label: e.label,
|
|
757
|
+
"error-message": e.errorMessage,
|
|
758
|
+
"is-required": e.isRequired
|
|
759
|
+
}, {
|
|
760
|
+
default: d(() => [
|
|
761
|
+
c(s(A), null, {
|
|
762
|
+
default: d(() => [
|
|
763
|
+
c(s(xe), {
|
|
764
|
+
modelValue: t.value,
|
|
765
|
+
"onUpdate:modelValue": l[0] || (l[0] = (o) => t.value = o),
|
|
766
|
+
fluid: "",
|
|
767
|
+
feedback: !1,
|
|
768
|
+
"toggle-mask": "",
|
|
769
|
+
placeholder: "Введите значение",
|
|
770
|
+
"pt:pc-input-text:root": "placeholder-surface-400",
|
|
771
|
+
"pt:maskicon": "cursor-pointer",
|
|
772
|
+
"pt:unmaskicon": "cursor-pointer",
|
|
773
|
+
invalid: !!e.errorMessage,
|
|
774
|
+
disabled: e.isDisabled
|
|
775
|
+
}, null, 8, ["modelValue", "invalid", "disabled"]),
|
|
776
|
+
e.reset && e.isChanged ? (n(), u(s(R), {
|
|
777
|
+
key: 0,
|
|
778
|
+
class: "pi pi-undo cursor-pointer mr-6",
|
|
779
|
+
onClick: e.reset
|
|
780
|
+
}, null, 8, ["onClick"])) : p("", !0)
|
|
781
|
+
]),
|
|
782
|
+
_: 1
|
|
783
|
+
})
|
|
784
|
+
]),
|
|
785
|
+
_: 1
|
|
786
|
+
}, 8, ["label", "error-message", "is-required"]));
|
|
787
|
+
}
|
|
788
|
+
}), Ze = /* @__PURE__ */ f({
|
|
789
|
+
__name: "SearchInput",
|
|
790
|
+
props: {
|
|
791
|
+
modelValue: {},
|
|
792
|
+
modelModifiers: {}
|
|
793
|
+
},
|
|
794
|
+
emits: ["update:modelValue"],
|
|
795
|
+
setup(e) {
|
|
796
|
+
const t = g(e, "modelValue", {
|
|
797
|
+
get: (a) => a || "",
|
|
798
|
+
set: (a) => a || void 0
|
|
799
|
+
});
|
|
800
|
+
return (a, l) => (n(), u(s(A), null, {
|
|
801
|
+
default: d(() => [
|
|
802
|
+
c(s(R), { class: "pi pi-search" }),
|
|
803
|
+
c(s(Y), {
|
|
804
|
+
modelValue: t.value,
|
|
805
|
+
"onUpdate:modelValue": l[0] || (l[0] = (o) => t.value = o),
|
|
806
|
+
placeholder: "Поиск...",
|
|
807
|
+
fluid: "",
|
|
808
|
+
class: "!rounded-full !border-none !shadow-none",
|
|
809
|
+
size: "small"
|
|
810
|
+
}, null, 8, ["modelValue"]),
|
|
811
|
+
t.value ? (n(), u(s(R), {
|
|
812
|
+
key: 0,
|
|
813
|
+
class: "pi pi-times cursor-pointer",
|
|
814
|
+
onClick: l[1] || (l[1] = (o) => t.value = void 0)
|
|
815
|
+
})) : p("", !0)
|
|
816
|
+
]),
|
|
817
|
+
_: 1
|
|
818
|
+
}));
|
|
819
|
+
}
|
|
820
|
+
}), nl = /* @__PURE__ */ f({
|
|
821
|
+
__name: "SelectInput",
|
|
822
|
+
props: /* @__PURE__ */ b({
|
|
823
|
+
label: {},
|
|
824
|
+
isRequired: { type: Boolean },
|
|
825
|
+
options: { default: () => [] },
|
|
826
|
+
optionLabel: { default: "title" },
|
|
827
|
+
optionValue: { default: "id" },
|
|
828
|
+
errorMessage: { default: void 0 }
|
|
829
|
+
}, {
|
|
830
|
+
modelValue: {},
|
|
831
|
+
modelModifiers: {}
|
|
832
|
+
}),
|
|
833
|
+
emits: ["update:modelValue"],
|
|
834
|
+
setup(e) {
|
|
835
|
+
const t = g(e, "modelValue");
|
|
836
|
+
return (a, l) => (n(), u(w, {
|
|
837
|
+
"is-required": e.isRequired,
|
|
838
|
+
label: e.label,
|
|
839
|
+
"error-message": e.errorMessage
|
|
840
|
+
}, {
|
|
841
|
+
default: d(() => [
|
|
842
|
+
c(s(ke), {
|
|
843
|
+
modelValue: t.value,
|
|
844
|
+
"onUpdate:modelValue": l[0] || (l[0] = (o) => t.value = o),
|
|
845
|
+
options: e.options,
|
|
846
|
+
"option-label": e.optionLabel,
|
|
847
|
+
"option-value": e.optionValue,
|
|
848
|
+
"data-key": e.optionValue,
|
|
849
|
+
"overlay-class": "bg-white",
|
|
850
|
+
fluid: "",
|
|
851
|
+
"show-clear": !e.isRequired,
|
|
852
|
+
placeholder: "Выберите значение",
|
|
853
|
+
"label-class": { "text-surface-400": !t.value }
|
|
854
|
+
}, null, 8, ["modelValue", "options", "option-label", "option-value", "data-key", "show-clear", "label-class"])
|
|
855
|
+
]),
|
|
856
|
+
_: 1
|
|
857
|
+
}, 8, ["is-required", "label", "error-message"]));
|
|
858
|
+
}
|
|
859
|
+
}), il = /* @__PURE__ */ f({
|
|
860
|
+
__name: "TextareaInput",
|
|
861
|
+
props: /* @__PURE__ */ b({
|
|
862
|
+
label: {},
|
|
863
|
+
errorMessage: {},
|
|
864
|
+
isRequired: { type: Boolean }
|
|
865
|
+
}, {
|
|
866
|
+
modelValue: {},
|
|
867
|
+
modelModifiers: {}
|
|
868
|
+
}),
|
|
869
|
+
emits: ["update:modelValue"],
|
|
870
|
+
setup(e) {
|
|
871
|
+
const t = g(e, "modelValue");
|
|
872
|
+
return (a, l) => (n(), u(w, {
|
|
873
|
+
label: e.label,
|
|
874
|
+
"error-message": e.errorMessage,
|
|
875
|
+
"is-required": e.isRequired
|
|
876
|
+
}, {
|
|
877
|
+
default: d(() => [
|
|
878
|
+
c(s(X), {
|
|
879
|
+
modelValue: t.value,
|
|
880
|
+
"onUpdate:modelValue": l[0] || (l[0] = (o) => t.value = o),
|
|
881
|
+
rows: "5",
|
|
882
|
+
fluid: "",
|
|
883
|
+
invalid: !!e.errorMessage
|
|
884
|
+
}, null, 8, ["modelValue", "invalid"])
|
|
885
|
+
]),
|
|
886
|
+
_: 1
|
|
887
|
+
}, 8, ["label", "error-message", "is-required"]));
|
|
888
|
+
}
|
|
889
|
+
}), rl = /* @__PURE__ */ f({
|
|
890
|
+
__name: "TextInput",
|
|
891
|
+
props: /* @__PURE__ */ b({
|
|
892
|
+
label: {},
|
|
893
|
+
errorMessage: {},
|
|
894
|
+
isRequired: { type: Boolean },
|
|
895
|
+
autofocus: { type: Boolean },
|
|
896
|
+
isDisabled: { type: Boolean },
|
|
897
|
+
reset: { type: Function },
|
|
898
|
+
isChanged: { type: Boolean }
|
|
899
|
+
}, {
|
|
900
|
+
modelValue: {},
|
|
901
|
+
modelModifiers: {}
|
|
902
|
+
}),
|
|
903
|
+
emits: ["update:modelValue"],
|
|
904
|
+
setup(e) {
|
|
905
|
+
const t = g(e, "modelValue");
|
|
906
|
+
return (a, l) => (n(), u(w, {
|
|
907
|
+
label: e.label,
|
|
908
|
+
"error-message": e.errorMessage,
|
|
909
|
+
"is-required": e.isRequired
|
|
910
|
+
}, {
|
|
911
|
+
default: d(() => [
|
|
912
|
+
c(s(A), null, {
|
|
913
|
+
default: d(() => [
|
|
914
|
+
c(s(Y), {
|
|
915
|
+
modelValue: t.value,
|
|
916
|
+
"onUpdate:modelValue": l[0] || (l[0] = (o) => t.value = o),
|
|
917
|
+
fluid: "",
|
|
918
|
+
invalid: !!e.errorMessage,
|
|
919
|
+
autofocus: e.autofocus,
|
|
920
|
+
disabled: e.isDisabled
|
|
921
|
+
}, null, 8, ["modelValue", "invalid", "autofocus", "disabled"]),
|
|
922
|
+
e.reset && e.isChanged ? (n(), u(s(R), {
|
|
923
|
+
key: 0,
|
|
924
|
+
class: "pi pi-undo cursor-pointer",
|
|
925
|
+
onClick: e.reset
|
|
926
|
+
}, null, 8, ["onClick"])) : p("", !0)
|
|
927
|
+
]),
|
|
928
|
+
_: 1
|
|
929
|
+
})
|
|
930
|
+
]),
|
|
931
|
+
_: 1
|
|
932
|
+
}, 8, ["label", "error-message", "is-required"]));
|
|
933
|
+
}
|
|
934
|
+
}), _e = { class: "flex flex-col gap-1" }, et = { class: "flex gap-2 items-center" }, tt = {
|
|
935
|
+
key: 0,
|
|
936
|
+
class: "text-sm text-red-600"
|
|
937
|
+
}, lt = {
|
|
938
|
+
key: 1,
|
|
939
|
+
class: "text-sm text-slate-400"
|
|
940
|
+
}, ul = /* @__PURE__ */ f({
|
|
941
|
+
__name: "ToggleSwitch",
|
|
942
|
+
props: /* @__PURE__ */ b({
|
|
943
|
+
label: {},
|
|
944
|
+
errorMessage: {},
|
|
945
|
+
hint: {}
|
|
946
|
+
}, {
|
|
947
|
+
modelValue: { type: Boolean },
|
|
948
|
+
modelModifiers: {}
|
|
949
|
+
}),
|
|
950
|
+
emits: ["update:modelValue"],
|
|
951
|
+
setup(e) {
|
|
952
|
+
const t = g(e, "modelValue");
|
|
953
|
+
return (a, l) => (n(), v("div", _e, [
|
|
954
|
+
m("div", et, [
|
|
955
|
+
c(s(we), {
|
|
956
|
+
modelValue: t.value,
|
|
957
|
+
"onUpdate:modelValue": l[0] || (l[0] = (o) => t.value = o),
|
|
958
|
+
invalid: !!e.errorMessage
|
|
959
|
+
}, null, 8, ["modelValue", "invalid"]),
|
|
960
|
+
e.label ? (n(), v("label", {
|
|
961
|
+
key: 0,
|
|
962
|
+
class: "text-sm text-slate-600 cursor-pointer select-none",
|
|
963
|
+
onClick: l[1] || (l[1] = (o) => t.value = !t.value)
|
|
964
|
+
}, [
|
|
965
|
+
m("span", null, k(e.label), 1)
|
|
966
|
+
])) : p("", !0)
|
|
967
|
+
]),
|
|
968
|
+
e.errorMessage ? (n(), v("small", tt, k(e.errorMessage), 1)) : p("", !0),
|
|
969
|
+
e.hint && !e.errorMessage ? (n(), v("small", lt, k(e.hint), 1)) : p("", !0)
|
|
970
|
+
]));
|
|
971
|
+
}
|
|
972
|
+
}), dl = /* @__PURE__ */ f({
|
|
973
|
+
__name: "WysiwygInput",
|
|
974
|
+
props: /* @__PURE__ */ b({
|
|
975
|
+
label: { default: void 0 },
|
|
976
|
+
isRequired: { type: Boolean, default: !1 },
|
|
977
|
+
errorMessage: { default: void 0 }
|
|
978
|
+
}, {
|
|
979
|
+
modelValue: {},
|
|
980
|
+
modelModifiers: {}
|
|
981
|
+
}),
|
|
982
|
+
emits: ["update:modelValue"],
|
|
983
|
+
setup(e) {
|
|
984
|
+
return g(e, "modelValue"), (t, a) => (n(), u(w, {
|
|
985
|
+
label: e.label,
|
|
986
|
+
"is-required": e.isRequired,
|
|
987
|
+
"error-message": e.errorMessage
|
|
988
|
+
}, null, 8, ["label", "is-required", "error-message"]));
|
|
989
|
+
}
|
|
990
|
+
}), ot = /* @__PURE__ */ f({
|
|
991
|
+
__name: "DrawerHost",
|
|
992
|
+
setup(e) {
|
|
993
|
+
const { stack: t, close: a } = j();
|
|
994
|
+
return (l, o) => (n(), u(te, { to: "body" }, [
|
|
995
|
+
(n(!0), v(C, null, I(s(t), (i, r) => (n(), u(le(i.component), oe({
|
|
996
|
+
key: i.key || r,
|
|
997
|
+
ref_for: !0
|
|
998
|
+
}, i.props, {
|
|
999
|
+
onClose: (x) => s(a)(r)
|
|
1000
|
+
}), null, 16, ["onClose"]))), 128))
|
|
1001
|
+
]));
|
|
1002
|
+
}
|
|
1003
|
+
}), at = { class: "flex flex-col h-full overflow-hidden" }, st = ["src"], nt = {
|
|
1004
|
+
key: 1,
|
|
1005
|
+
class: "font-medium h-7 flex items-center text-xl text-slate-600 truncate"
|
|
1006
|
+
}, it = { class: "grow" }, rt = {
|
|
1007
|
+
key: 1,
|
|
1008
|
+
class: "pi pi-angle-right text-surface-300 shrink-0"
|
|
1009
|
+
}, ut = {
|
|
1010
|
+
key: 1,
|
|
1011
|
+
class: "flex items-center rounded-full ml-3 hover:bg-surface-200 transition-all text-sm px-2 py-1.5 gap-1.5 cursor-pointer"
|
|
1012
|
+
}, dt = { class: "grow" }, J = /* @__PURE__ */ f({
|
|
1013
|
+
__name: "MenuSidebar",
|
|
1014
|
+
props: {
|
|
1015
|
+
items: { default: () => [] },
|
|
1016
|
+
logo: { default: "" },
|
|
1017
|
+
appName: { default: "" }
|
|
1018
|
+
},
|
|
1019
|
+
emits: ["navigate"],
|
|
1020
|
+
setup(e) {
|
|
1021
|
+
const { isDesktop: t } = z();
|
|
1022
|
+
return (a, l) => {
|
|
1023
|
+
const o = G("RouterLink");
|
|
1024
|
+
return n(), v("div", at, [
|
|
1025
|
+
s(t) && (e.logo || e.appName) ? (n(), u(o, {
|
|
1026
|
+
key: 0,
|
|
1027
|
+
to: "/",
|
|
1028
|
+
class: "w-fit max-w-full px-3 flex items-center shrink-0 h-14 overflow-hidden"
|
|
1029
|
+
}, {
|
|
1030
|
+
default: d(() => [
|
|
1031
|
+
e.logo ? (n(), v("img", {
|
|
1032
|
+
key: 0,
|
|
1033
|
+
src: e.logo,
|
|
1034
|
+
class: "h-10"
|
|
1035
|
+
}, null, 8, st)) : e.appName ? (n(), v("div", nt, k(e.appName), 1)) : p("", !0)
|
|
1036
|
+
]),
|
|
1037
|
+
_: 1
|
|
1038
|
+
})) : p("", !0),
|
|
1039
|
+
c(s(O), {
|
|
1040
|
+
class: "grow overflow-hidden",
|
|
1041
|
+
"pt:bary": "!hidden"
|
|
1042
|
+
}, {
|
|
1043
|
+
default: d(() => [
|
|
1044
|
+
c(s(Ve), {
|
|
1045
|
+
model: e.items,
|
|
1046
|
+
class: "grow !border-none !bg-transparent",
|
|
1047
|
+
pt: {
|
|
1048
|
+
itemContent: {
|
|
1049
|
+
class: "!bg-transparent"
|
|
1050
|
+
},
|
|
1051
|
+
submenuLabel: {
|
|
1052
|
+
class: "!text-sm"
|
|
1053
|
+
},
|
|
1054
|
+
list: {
|
|
1055
|
+
class: "!gap-1 !p-0 !pb-3"
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
}, {
|
|
1059
|
+
item: d(({ item: i }) => [
|
|
1060
|
+
i.route ? (n(), u(o, {
|
|
1061
|
+
key: 0,
|
|
1062
|
+
to: i.route,
|
|
1063
|
+
class: "flex items-center rounded-full ml-3 hover:bg-surface-200 transition-all text-sm px-2 py-1.5 gap-1.5",
|
|
1064
|
+
"active-class": "bg-white",
|
|
1065
|
+
onClick: l[0] || (l[0] = (r) => a.$emit("navigate"))
|
|
1066
|
+
}, {
|
|
1067
|
+
default: d(({ isActive: r }) => [
|
|
1068
|
+
i.icon ? (n(), v("span", {
|
|
1069
|
+
key: 0,
|
|
1070
|
+
class: F(["shrink-0", i.icon])
|
|
1071
|
+
}, null, 2)) : p("", !0),
|
|
1072
|
+
m("span", it, k(i.label), 1),
|
|
1073
|
+
r ? (n(), v("span", rt)) : p("", !0)
|
|
1074
|
+
]),
|
|
1075
|
+
_: 2
|
|
1076
|
+
}, 1032, ["to"])) : (n(), v("div", ut, [
|
|
1077
|
+
m("span", {
|
|
1078
|
+
class: F(["shrink-0", i.icon])
|
|
1079
|
+
}, null, 2),
|
|
1080
|
+
m("span", dt, k(i.label), 1)
|
|
1081
|
+
]))
|
|
1082
|
+
]),
|
|
1083
|
+
_: 1
|
|
1084
|
+
}, 8, ["model"])
|
|
1085
|
+
]),
|
|
1086
|
+
_: 1
|
|
1087
|
+
})
|
|
1088
|
+
]);
|
|
1089
|
+
};
|
|
1090
|
+
}
|
|
1091
|
+
}), ct = { class: "h-dvh overflow-hidden" }, mt = { class: "h-full flex relative lg:static bg-surface-100 items-stretch" }, ft = ["src"], vt = {
|
|
1092
|
+
key: 1,
|
|
1093
|
+
class: "font-bold"
|
|
1094
|
+
}, pt = { class: "grow max-w-full overflow-hidden" }, cl = /* @__PURE__ */ f({
|
|
1095
|
+
__name: "AdminLayout",
|
|
1096
|
+
props: {
|
|
1097
|
+
menuItems: { default: () => [] },
|
|
1098
|
+
logo: { default: "" },
|
|
1099
|
+
appName: { default: "" }
|
|
1100
|
+
},
|
|
1101
|
+
setup(e) {
|
|
1102
|
+
const { isDesktop: t, isMobileMenuVisible: a } = z();
|
|
1103
|
+
return (l, o) => {
|
|
1104
|
+
const i = G("RouterLink");
|
|
1105
|
+
return n(), v("div", ct, [
|
|
1106
|
+
m("div", mt, [
|
|
1107
|
+
s(t) ? (n(), u(J, {
|
|
1108
|
+
key: 1,
|
|
1109
|
+
items: e.menuItems,
|
|
1110
|
+
logo: e.logo,
|
|
1111
|
+
"app-name": e.appName,
|
|
1112
|
+
class: "shrink-0 w-64"
|
|
1113
|
+
}, null, 8, ["items", "logo", "app-name"])) : (n(), u(s(U), {
|
|
1114
|
+
key: 0,
|
|
1115
|
+
visible: s(a),
|
|
1116
|
+
"onUpdate:visible": o[1] || (o[1] = (r) => ae(a) ? a.value = r : null),
|
|
1117
|
+
class: "!bg-surface-100",
|
|
1118
|
+
"pt:content": {
|
|
1119
|
+
class: "!p-0 !pr-3"
|
|
1120
|
+
}
|
|
1121
|
+
}, {
|
|
1122
|
+
header: d(() => [
|
|
1123
|
+
e.logo || e.appName ? (n(), u(i, {
|
|
1124
|
+
key: 0,
|
|
1125
|
+
to: "/",
|
|
1126
|
+
class: "h-10 overflow-hidden flex items-center",
|
|
1127
|
+
onClick: o[0] || (o[0] = (r) => a.value = !1)
|
|
1128
|
+
}, {
|
|
1129
|
+
default: d(() => [
|
|
1130
|
+
e.logo ? (n(), v("img", {
|
|
1131
|
+
key: 0,
|
|
1132
|
+
src: e.logo,
|
|
1133
|
+
class: "h-10"
|
|
1134
|
+
}, null, 8, ft)) : e.appName ? (n(), v("div", vt, k(e.appName), 1)) : p("", !0)
|
|
1135
|
+
]),
|
|
1136
|
+
_: 1
|
|
1137
|
+
})) : p("", !0)
|
|
1138
|
+
]),
|
|
1139
|
+
default: d(() => [
|
|
1140
|
+
c(J, {
|
|
1141
|
+
items: e.menuItems,
|
|
1142
|
+
logo: e.logo,
|
|
1143
|
+
"app-name": e.appName,
|
|
1144
|
+
class: "w-full grow"
|
|
1145
|
+
}, null, 8, ["items", "logo", "app-name"])
|
|
1146
|
+
]),
|
|
1147
|
+
_: 1
|
|
1148
|
+
}, 8, ["visible"])),
|
|
1149
|
+
m("div", pt, [
|
|
1150
|
+
$(l.$slots, "default")
|
|
1151
|
+
]),
|
|
1152
|
+
o[2] || (o[2] = m("div", { class: "animate-fadein" }, null, -1))
|
|
1153
|
+
]),
|
|
1154
|
+
c(s($e)),
|
|
1155
|
+
c(ot)
|
|
1156
|
+
]);
|
|
1157
|
+
};
|
|
1158
|
+
}
|
|
1159
|
+
});
|
|
1160
|
+
Symbol(process.env.NODE_ENV !== "production" ? "navigation failure" : "");
|
|
1161
|
+
Symbol(process.env.NODE_ENV !== "production" ? "router view location matched" : "");
|
|
1162
|
+
Symbol(process.env.NODE_ENV !== "production" ? "router view depth" : "");
|
|
1163
|
+
const bt = Symbol(process.env.NODE_ENV !== "production" ? "router" : "");
|
|
1164
|
+
Symbol(process.env.NODE_ENV !== "production" ? "route location" : "");
|
|
1165
|
+
Symbol(process.env.NODE_ENV !== "production" ? "router view location" : "");
|
|
1166
|
+
function gt() {
|
|
1167
|
+
return se(bt);
|
|
1168
|
+
}
|
|
1169
|
+
const yt = { class: "flex flex-col h-dvh overflow-hidden p-3 gap-3" }, ht = { class: "shrink-0 flex items-center gap-2 h-8" }, xt = {
|
|
1170
|
+
key: 0,
|
|
1171
|
+
class: "flex gap-1 items-center"
|
|
1172
|
+
}, kt = { class: "grow font-medium text-xl text-slate-600 flex gap-1 items-center max-sm:text-base" }, wt = {
|
|
1173
|
+
key: 0,
|
|
1174
|
+
class: "pi pi-angle-right"
|
|
1175
|
+
}, Vt = { key: 1 }, $t = {
|
|
1176
|
+
key: 1,
|
|
1177
|
+
class: "flex gap-1 items-center leading-tight"
|
|
1178
|
+
}, Mt = {
|
|
1179
|
+
key: 0,
|
|
1180
|
+
class: "shrink-0"
|
|
1181
|
+
}, Bt = { class: "grow flex flex-col overflow-hidden" }, ml = /* @__PURE__ */ f({
|
|
1182
|
+
__name: "BaseLayout",
|
|
1183
|
+
props: /* @__PURE__ */ b({
|
|
1184
|
+
title: {},
|
|
1185
|
+
noSearch: { type: Boolean },
|
|
1186
|
+
backRoute: { default: void 0 },
|
|
1187
|
+
isFilterApplied: { type: Boolean, default: !1 },
|
|
1188
|
+
filterComponent: { default: void 0 },
|
|
1189
|
+
formComponent: { default: void 0 },
|
|
1190
|
+
reload: { type: Function, default: void 0 }
|
|
1191
|
+
}, {
|
|
1192
|
+
search: {},
|
|
1193
|
+
searchModifiers: {}
|
|
1194
|
+
}),
|
|
1195
|
+
emits: ["update:search"],
|
|
1196
|
+
setup(e) {
|
|
1197
|
+
const t = e, a = g(e, "search"), l = gt(), { isDesktop: o, toggleMobileMenu: i } = z(), r = T(!!a.value), x = B(() => Array.isArray(t.title) ? t.title : [t.title]);
|
|
1198
|
+
function y() {
|
|
1199
|
+
r.value = !r.value, r.value || (a.value = void 0);
|
|
1200
|
+
}
|
|
1201
|
+
return (V, M) => (n(), v("div", yt, [
|
|
1202
|
+
m("div", ht, [
|
|
1203
|
+
!s(o) || e.backRoute || !e.noSearch ? (n(), v("div", xt, [
|
|
1204
|
+
s(o) ? p("", !0) : (n(), u(s(h), {
|
|
1205
|
+
key: 0,
|
|
1206
|
+
icon: "pi pi-bars",
|
|
1207
|
+
severity: "secondary",
|
|
1208
|
+
rounded: "",
|
|
1209
|
+
size: "small",
|
|
1210
|
+
variant: "outlined",
|
|
1211
|
+
onClick: s(i)
|
|
1212
|
+
}, null, 8, ["onClick"])),
|
|
1213
|
+
e.backRoute ? (n(), u(s(h), {
|
|
1214
|
+
key: 1,
|
|
1215
|
+
icon: "pi pi-arrow-left",
|
|
1216
|
+
severity: "secondary",
|
|
1217
|
+
rounded: "",
|
|
1218
|
+
size: "small",
|
|
1219
|
+
variant: "outlined",
|
|
1220
|
+
onClick: M[0] || (M[0] = (N) => s(l).replace(e.backRoute))
|
|
1221
|
+
})) : p("", !0),
|
|
1222
|
+
e.noSearch ? p("", !0) : (n(), u(Oe, {
|
|
1223
|
+
key: 2,
|
|
1224
|
+
value: r.value,
|
|
1225
|
+
onClick: y
|
|
1226
|
+
}, null, 8, ["value"]))
|
|
1227
|
+
])) : p("", !0),
|
|
1228
|
+
m("div", kt, [
|
|
1229
|
+
s(o) ? (n(!0), v(C, { key: 0 }, I(x.value, (N, P) => (n(), v(C, { key: P }, [
|
|
1230
|
+
m("span", null, k(N), 1),
|
|
1231
|
+
P < x.value.length - 1 ? (n(), v("span", wt)) : p("", !0)
|
|
1232
|
+
], 64))), 128)) : (n(), v("span", Vt, k(x.value[x.value.length - 1]), 1))
|
|
1233
|
+
]),
|
|
1234
|
+
V.$slots["right-actions"] || e.filterComponent || e.formComponent || e.reload ? (n(), v("div", $t, [
|
|
1235
|
+
$(V.$slots, "right-actions"),
|
|
1236
|
+
e.filterComponent ? (n(), u(Le, {
|
|
1237
|
+
key: 0,
|
|
1238
|
+
"has-changes": e.isFilterApplied,
|
|
1239
|
+
component: e.filterComponent
|
|
1240
|
+
}, null, 8, ["has-changes", "component"])) : p("", !0),
|
|
1241
|
+
e.formComponent ? (n(), u(Ne, {
|
|
1242
|
+
key: 1,
|
|
1243
|
+
component: e.formComponent
|
|
1244
|
+
}, null, 8, ["component"])) : p("", !0),
|
|
1245
|
+
s(o) && e.reload ? (n(), u(s(h), {
|
|
1246
|
+
key: 2,
|
|
1247
|
+
icon: "pi pi-refresh",
|
|
1248
|
+
severity: "secondary",
|
|
1249
|
+
rounded: "",
|
|
1250
|
+
size: "small",
|
|
1251
|
+
variant: "outlined",
|
|
1252
|
+
onClick: e.reload
|
|
1253
|
+
}, null, 8, ["onClick"])) : p("", !0)
|
|
1254
|
+
])) : p("", !0)
|
|
1255
|
+
]),
|
|
1256
|
+
e.noSearch ? p("", !0) : (n(), u(ne, { key: 0 }, {
|
|
1257
|
+
default: d(() => [
|
|
1258
|
+
r.value ? (n(), v("div", Mt, [
|
|
1259
|
+
c(Ze, {
|
|
1260
|
+
modelValue: a.value,
|
|
1261
|
+
"onUpdate:modelValue": M[1] || (M[1] = (N) => a.value = N)
|
|
1262
|
+
}, null, 8, ["modelValue"])
|
|
1263
|
+
])) : p("", !0)
|
|
1264
|
+
]),
|
|
1265
|
+
_: 1
|
|
1266
|
+
})),
|
|
1267
|
+
m("div", Bt, [
|
|
1268
|
+
$(V.$slots, "default")
|
|
1269
|
+
])
|
|
1270
|
+
]));
|
|
1271
|
+
}
|
|
1272
|
+
}), Ct = { class: "flex flex-col gap-2 w-full !p-4 !pt-0" }, qt = { class: "flex items-center gap-2" }, fl = /* @__PURE__ */ f({
|
|
1273
|
+
__name: "FilterDrawer",
|
|
1274
|
+
props: /* @__PURE__ */ b({
|
|
1275
|
+
isSubmittable: { type: Boolean },
|
|
1276
|
+
isChanged: { type: Boolean },
|
|
1277
|
+
width: { default: "384px" }
|
|
1278
|
+
}, {
|
|
1279
|
+
modelValue: { type: Boolean, required: !0 },
|
|
1280
|
+
modelModifiers: {}
|
|
1281
|
+
}),
|
|
1282
|
+
emits: /* @__PURE__ */ b(["close", "reset", "apply"], ["update:modelValue"]),
|
|
1283
|
+
setup(e) {
|
|
1284
|
+
const t = e, a = g(e, "modelValue"), l = B(() => `--filter-drawer-width: ${t.width};`);
|
|
1285
|
+
return (o, i) => (n(), u(s(U), {
|
|
1286
|
+
visible: a.value,
|
|
1287
|
+
"onUpdate:visible": i[2] || (i[2] = (r) => a.value = r),
|
|
1288
|
+
position: "right",
|
|
1289
|
+
header: "Фильтр",
|
|
1290
|
+
style: K(l.value),
|
|
1291
|
+
class: "!w-[var(--filter-drawer-width)] max-w-full",
|
|
1292
|
+
"pt:content": {
|
|
1293
|
+
class: "!p-0 relative"
|
|
1294
|
+
},
|
|
1295
|
+
"pt:footer": {
|
|
1296
|
+
class: "border-t border-surface-100"
|
|
1297
|
+
},
|
|
1298
|
+
onAfterHide: i[3] || (i[3] = (r) => o.$emit("close"))
|
|
1299
|
+
}, {
|
|
1300
|
+
footer: d(() => [
|
|
1301
|
+
m("div", qt, [
|
|
1302
|
+
c(s(h), {
|
|
1303
|
+
label: "Сбросить",
|
|
1304
|
+
disabled: !e.isChanged,
|
|
1305
|
+
size: "small",
|
|
1306
|
+
variant: "text",
|
|
1307
|
+
severity: "secondary",
|
|
1308
|
+
rounded: "",
|
|
1309
|
+
onClick: i[0] || (i[0] = (r) => o.$emit("reset"))
|
|
1310
|
+
}, null, 8, ["disabled"]),
|
|
1311
|
+
i[4] || (i[4] = m("div", { class: "grow" }, null, -1)),
|
|
1312
|
+
c(s(h), {
|
|
1313
|
+
label: "Применить",
|
|
1314
|
+
disabled: !e.isSubmittable,
|
|
1315
|
+
size: "small",
|
|
1316
|
+
rounded: "",
|
|
1317
|
+
onClick: i[1] || (i[1] = (r) => o.$emit("apply"))
|
|
1318
|
+
}, null, 8, ["disabled"])
|
|
1319
|
+
])
|
|
1320
|
+
]),
|
|
1321
|
+
default: d(() => [
|
|
1322
|
+
c(s(O), { class: "grow" }, {
|
|
1323
|
+
default: d(() => [
|
|
1324
|
+
m("div", Ct, [
|
|
1325
|
+
$(o.$slots, "default")
|
|
1326
|
+
])
|
|
1327
|
+
]),
|
|
1328
|
+
_: 3
|
|
1329
|
+
})
|
|
1330
|
+
]),
|
|
1331
|
+
_: 3
|
|
1332
|
+
}, 8, ["visible", "style"]));
|
|
1333
|
+
}
|
|
1334
|
+
}), Dt = { class: "flex flex-col gap-2 w-full !p-4" }, St = { class: "flex flex-col gap-2 w-full !p-4 !pt-0" }, It = { class: "flex items-center gap-2" }, vl = /* @__PURE__ */ f({
|
|
1335
|
+
__name: "FormDrawer",
|
|
1336
|
+
props: /* @__PURE__ */ b({
|
|
1337
|
+
title: {},
|
|
1338
|
+
subtitle: { default: void 0 },
|
|
1339
|
+
mode: { default: "create" },
|
|
1340
|
+
isSubmittable: { type: Boolean },
|
|
1341
|
+
isSubmitting: { type: Boolean },
|
|
1342
|
+
tabs: { default: void 0 },
|
|
1343
|
+
width: { default: "400px" }
|
|
1344
|
+
}, {
|
|
1345
|
+
modelValue: { type: Boolean, required: !0 },
|
|
1346
|
+
modelModifiers: {}
|
|
1347
|
+
}),
|
|
1348
|
+
emits: /* @__PURE__ */ b(["close", "delete", "save"], ["update:modelValue"]),
|
|
1349
|
+
setup(e) {
|
|
1350
|
+
const t = e, a = g(e, "modelValue"), l = B(() => `--form-drawer-width: ${t.width};`);
|
|
1351
|
+
return (o, i) => (n(), u(s(U), {
|
|
1352
|
+
visible: a.value,
|
|
1353
|
+
"onUpdate:visible": i[3] || (i[3] = (r) => a.value = r),
|
|
1354
|
+
position: "right",
|
|
1355
|
+
header: e.title,
|
|
1356
|
+
style: K(l.value),
|
|
1357
|
+
class: "!w-[var(--form-drawer-width)] max-w-full",
|
|
1358
|
+
"pt:content": {
|
|
1359
|
+
class: "!p-0 relative"
|
|
1360
|
+
},
|
|
1361
|
+
"pt:title": {
|
|
1362
|
+
class: "!text-xl"
|
|
1363
|
+
},
|
|
1364
|
+
"pt:footer": {
|
|
1365
|
+
class: "border-t border-surface-100"
|
|
1366
|
+
},
|
|
1367
|
+
onAfterHide: i[4] || (i[4] = (r) => o.$emit("close"))
|
|
1368
|
+
}, {
|
|
1369
|
+
footer: d(() => [
|
|
1370
|
+
m("div", It, [
|
|
1371
|
+
e.mode === "edit" ? (n(), u(s(h), {
|
|
1372
|
+
key: 0,
|
|
1373
|
+
label: "Удалить",
|
|
1374
|
+
size: "small",
|
|
1375
|
+
variant: "text",
|
|
1376
|
+
severity: "danger",
|
|
1377
|
+
rounded: "",
|
|
1378
|
+
onClick: i[0] || (i[0] = (r) => o.$emit("delete"))
|
|
1379
|
+
})) : p("", !0),
|
|
1380
|
+
i[5] || (i[5] = m("div", { class: "grow" }, null, -1)),
|
|
1381
|
+
c(s(h), {
|
|
1382
|
+
label: "Сохранить",
|
|
1383
|
+
size: "small",
|
|
1384
|
+
disabled: !e.isSubmittable,
|
|
1385
|
+
loading: e.isSubmitting,
|
|
1386
|
+
rounded: "",
|
|
1387
|
+
onClick: i[1] || (i[1] = (r) => o.$emit("save"))
|
|
1388
|
+
}, null, 8, ["disabled", "loading"]),
|
|
1389
|
+
c(s(h), {
|
|
1390
|
+
label: "Отменить",
|
|
1391
|
+
variant: "outlined",
|
|
1392
|
+
severity: "secondary",
|
|
1393
|
+
size: "small",
|
|
1394
|
+
rounded: "",
|
|
1395
|
+
onClick: i[2] || (i[2] = (r) => a.value = !1)
|
|
1396
|
+
})
|
|
1397
|
+
])
|
|
1398
|
+
]),
|
|
1399
|
+
default: d(() => [
|
|
1400
|
+
e.tabs?.length ? (n(), u(s(Me), {
|
|
1401
|
+
key: 0,
|
|
1402
|
+
value: e.tabs[0].id,
|
|
1403
|
+
scrollable: "",
|
|
1404
|
+
class: "grow h-full flex flex-col"
|
|
1405
|
+
}, {
|
|
1406
|
+
default: d(() => [
|
|
1407
|
+
c(s(Be), { class: "shrink-0" }, {
|
|
1408
|
+
default: d(() => [
|
|
1409
|
+
(n(!0), v(C, null, I(e.tabs, (r) => (n(), u(s(Ce), {
|
|
1410
|
+
key: r.id,
|
|
1411
|
+
value: r.id,
|
|
1412
|
+
class: "text-sm"
|
|
1413
|
+
}, {
|
|
1414
|
+
default: d(() => [
|
|
1415
|
+
ie(k(r.label), 1)
|
|
1416
|
+
]),
|
|
1417
|
+
_: 2
|
|
1418
|
+
}, 1032, ["value"]))), 128))
|
|
1419
|
+
]),
|
|
1420
|
+
_: 1
|
|
1421
|
+
}),
|
|
1422
|
+
c(s(qe), { class: "grow overflow-hidden !p-0" }, {
|
|
1423
|
+
default: d(() => [
|
|
1424
|
+
(n(!0), v(C, null, I(e.tabs, (r) => (n(), u(s(De), {
|
|
1425
|
+
key: r.id,
|
|
1426
|
+
value: r.id,
|
|
1427
|
+
class: "h-full"
|
|
1428
|
+
}, {
|
|
1429
|
+
default: d(() => [
|
|
1430
|
+
c(s(O), { class: "h-full" }, {
|
|
1431
|
+
default: d(() => [
|
|
1432
|
+
m("div", Dt, [
|
|
1433
|
+
$(o.$slots, `tab_${r.id}`)
|
|
1434
|
+
])
|
|
1435
|
+
]),
|
|
1436
|
+
_: 2
|
|
1437
|
+
}, 1024)
|
|
1438
|
+
]),
|
|
1439
|
+
_: 2
|
|
1440
|
+
}, 1032, ["value"]))), 128))
|
|
1441
|
+
]),
|
|
1442
|
+
_: 3
|
|
1443
|
+
})
|
|
1444
|
+
]),
|
|
1445
|
+
_: 3
|
|
1446
|
+
}, 8, ["value"])) : (n(), u(s(O), {
|
|
1447
|
+
key: 1,
|
|
1448
|
+
class: "grow"
|
|
1449
|
+
}, {
|
|
1450
|
+
default: d(() => [
|
|
1451
|
+
m("div", St, [
|
|
1452
|
+
$(o.$slots, "default")
|
|
1453
|
+
])
|
|
1454
|
+
]),
|
|
1455
|
+
_: 3
|
|
1456
|
+
}))
|
|
1457
|
+
]),
|
|
1458
|
+
_: 3
|
|
1459
|
+
}, 8, ["visible", "header", "style"]));
|
|
1460
|
+
}
|
|
1461
|
+
}), Rt = { class: "p-3 flex items-center select-none" }, Tt = { class: "grow" }, pl = /* @__PURE__ */ f({
|
|
1462
|
+
__name: "BaseTable",
|
|
1463
|
+
props: /* @__PURE__ */ b({
|
|
1464
|
+
items: {},
|
|
1465
|
+
totalItems: {},
|
|
1466
|
+
isLoading: { type: Boolean },
|
|
1467
|
+
selectable: { type: Boolean },
|
|
1468
|
+
size: { default: "medium" },
|
|
1469
|
+
rows: { default: 10 }
|
|
1470
|
+
}, {
|
|
1471
|
+
selected: {},
|
|
1472
|
+
selectedModifiers: {},
|
|
1473
|
+
page: { required: !0 },
|
|
1474
|
+
pageModifiers: {}
|
|
1475
|
+
}),
|
|
1476
|
+
emits: ["update:selected", "update:page"],
|
|
1477
|
+
setup(e) {
|
|
1478
|
+
const t = g(e, "selected"), a = g(e, "page");
|
|
1479
|
+
return (l, o) => (n(), u(s(Se), {
|
|
1480
|
+
selection: t.value,
|
|
1481
|
+
"onUpdate:selection": o[1] || (o[1] = (i) => t.value = i),
|
|
1482
|
+
"data-key": "id",
|
|
1483
|
+
value: e.items,
|
|
1484
|
+
"total-records": e.totalItems,
|
|
1485
|
+
loading: e.isLoading,
|
|
1486
|
+
first: a.value * e.rows,
|
|
1487
|
+
pt: {
|
|
1488
|
+
tableContainer: {
|
|
1489
|
+
class: "grow"
|
|
1490
|
+
},
|
|
1491
|
+
footer: {
|
|
1492
|
+
class: ["!p-0 !border-t !border-surface-100", t.value?.length ? "block" : "hidden"]
|
|
1493
|
+
},
|
|
1494
|
+
emptyMessageCell: {
|
|
1495
|
+
class: "!border-none"
|
|
1496
|
+
}
|
|
1497
|
+
},
|
|
1498
|
+
size: e.size,
|
|
1499
|
+
class: "flex flex-col w-full grow text-sm bg-white rounded-2xl overflow-hidden",
|
|
1500
|
+
paginator: "",
|
|
1501
|
+
scrollable: "",
|
|
1502
|
+
"show-headers": !!e.totalItems,
|
|
1503
|
+
rows: e.rows,
|
|
1504
|
+
"always-show-paginator": !1,
|
|
1505
|
+
lazy: "",
|
|
1506
|
+
onPage: o[2] || (o[2] = (i) => a.value = i.page)
|
|
1507
|
+
}, {
|
|
1508
|
+
empty: d(() => [...o[3] || (o[3] = [
|
|
1509
|
+
m("div", { class: "flex justify-center items-center p-3 text-surface-400 select-none" }, " По вашему запросу ничего не найдено. ", -1)
|
|
1510
|
+
])]),
|
|
1511
|
+
footer: d(() => [
|
|
1512
|
+
m("div", Rt, [
|
|
1513
|
+
m("div", null, "Выбрано: " + k(t.value?.length || 0), 1),
|
|
1514
|
+
m("div", Tt, [
|
|
1515
|
+
$(l.$slots, "bulk-actions")
|
|
1516
|
+
]),
|
|
1517
|
+
c(s(h), {
|
|
1518
|
+
variant: "text",
|
|
1519
|
+
severity: "secondary",
|
|
1520
|
+
size: "small",
|
|
1521
|
+
label: "Сбросить",
|
|
1522
|
+
onClick: o[0] || (o[0] = (i) => t.value = void 0)
|
|
1523
|
+
})
|
|
1524
|
+
])
|
|
1525
|
+
]),
|
|
1526
|
+
default: d(() => [
|
|
1527
|
+
e.selectable ? (n(), u(s(Ie), {
|
|
1528
|
+
key: 0,
|
|
1529
|
+
"selection-mode": "multiple",
|
|
1530
|
+
"header-style": "width: 2rem"
|
|
1531
|
+
})) : p("", !0),
|
|
1532
|
+
$(l.$slots, "default")
|
|
1533
|
+
]),
|
|
1534
|
+
_: 3
|
|
1535
|
+
}, 8, ["selection", "value", "total-records", "loading", "first", "pt", "size", "show-headers", "rows"]));
|
|
1536
|
+
}
|
|
1537
|
+
}), zt = { class: "p-3 flex items-center select-none" }, Nt = { class: "grow" }, bl = /* @__PURE__ */ f({
|
|
1538
|
+
__name: "BaseTreeTable",
|
|
1539
|
+
props: /* @__PURE__ */ b({
|
|
1540
|
+
items: {},
|
|
1541
|
+
totalItems: {},
|
|
1542
|
+
isLoading: { type: Boolean },
|
|
1543
|
+
selectable: { type: Boolean },
|
|
1544
|
+
size: { default: "medium" },
|
|
1545
|
+
rows: { default: 10 }
|
|
1546
|
+
}, {
|
|
1547
|
+
selected: {},
|
|
1548
|
+
selectedModifiers: {},
|
|
1549
|
+
page: { required: !0 },
|
|
1550
|
+
pageModifiers: {}
|
|
1551
|
+
}),
|
|
1552
|
+
emits: ["update:selected", "update:page"],
|
|
1553
|
+
setup(e) {
|
|
1554
|
+
const t = g(e, "selected"), a = g(e, "page"), l = T();
|
|
1555
|
+
return re(l, (o) => {
|
|
1556
|
+
const i = [];
|
|
1557
|
+
o && (Object.keys(o).forEach((r) => {
|
|
1558
|
+
const x = o[r];
|
|
1559
|
+
x.checked && !x.partialChecked && i.push(r);
|
|
1560
|
+
}), console.log(i)), t.value = i;
|
|
1561
|
+
}), (o, i) => (n(), u(s(Re), {
|
|
1562
|
+
"selection-keys": l.value,
|
|
1563
|
+
"onUpdate:selectionKeys": i[1] || (i[1] = (r) => l.value = r),
|
|
1564
|
+
"data-key": "key",
|
|
1565
|
+
"auto-layout": "",
|
|
1566
|
+
value: e.items,
|
|
1567
|
+
"total-records": e.totalItems,
|
|
1568
|
+
loading: e.isLoading,
|
|
1569
|
+
first: a.value * e.rows,
|
|
1570
|
+
pt: {
|
|
1571
|
+
tableContainer: {
|
|
1572
|
+
class: "grow"
|
|
1573
|
+
},
|
|
1574
|
+
footer: {
|
|
1575
|
+
class: ["p-0 border-t border-surface-100", t.value?.length ? "block" : "hidden"]
|
|
1576
|
+
},
|
|
1577
|
+
emptyMessageCell: {
|
|
1578
|
+
class: "!border-none"
|
|
1579
|
+
}
|
|
1580
|
+
},
|
|
1581
|
+
size: e.size,
|
|
1582
|
+
class: "flex flex-col w-full grow text-sm bg-white rounded-2xl overflow-hidden",
|
|
1583
|
+
paginator: "",
|
|
1584
|
+
scrollable: "",
|
|
1585
|
+
"show-headers": !!e.totalItems,
|
|
1586
|
+
rows: e.rows,
|
|
1587
|
+
"always-show-paginator": !1,
|
|
1588
|
+
lazy: "",
|
|
1589
|
+
"selection-mode": e.selectable ? "checkbox" : void 0,
|
|
1590
|
+
"meta-key-selection": "",
|
|
1591
|
+
onPage: i[2] || (i[2] = (r) => a.value = r.page)
|
|
1592
|
+
}, {
|
|
1593
|
+
empty: d(() => [...i[3] || (i[3] = [
|
|
1594
|
+
m("div", { class: "flex justify-center items-center p-3 text-surface-400 select-none" }, " По вашему запросу ничего не найдено. ", -1)
|
|
1595
|
+
])]),
|
|
1596
|
+
footer: d(() => [
|
|
1597
|
+
m("div", zt, [
|
|
1598
|
+
m("div", null, "Выбрано: " + k(t.value?.length || 0), 1),
|
|
1599
|
+
m("div", Nt, [
|
|
1600
|
+
$(o.$slots, "bulk-actions")
|
|
1601
|
+
]),
|
|
1602
|
+
c(s(h), {
|
|
1603
|
+
variant: "text",
|
|
1604
|
+
severity: "danger",
|
|
1605
|
+
size: "small",
|
|
1606
|
+
label: "Сбросить",
|
|
1607
|
+
onClick: i[0] || (i[0] = (r) => l.value = void 0)
|
|
1608
|
+
})
|
|
1609
|
+
])
|
|
1610
|
+
]),
|
|
1611
|
+
default: d(() => [
|
|
1612
|
+
$(o.$slots, "default")
|
|
1613
|
+
]),
|
|
1614
|
+
_: 3
|
|
1615
|
+
}, 8, ["selection-keys", "value", "total-records", "loading", "first", "pt", "size", "show-headers", "rows", "selection-mode"]));
|
|
1616
|
+
}
|
|
1617
|
+
});
|
|
1618
|
+
export {
|
|
1619
|
+
cl as AdminLayout,
|
|
1620
|
+
Yt as AutocompleteInput,
|
|
1621
|
+
ml as BaseLayout,
|
|
1622
|
+
pl as BaseTable,
|
|
1623
|
+
bl as BaseTreeTable,
|
|
1624
|
+
Zt as CheckboxGroupInput,
|
|
1625
|
+
Ne as CreateButton,
|
|
1626
|
+
_t as DateInput,
|
|
1627
|
+
ot as DrawerHost,
|
|
1628
|
+
Le as FilterButton,
|
|
1629
|
+
fl as FilterDrawer,
|
|
1630
|
+
vl as FormDrawer,
|
|
1631
|
+
w as FormField,
|
|
1632
|
+
el as JSONInput,
|
|
1633
|
+
tl as MaskedInput,
|
|
1634
|
+
J as MenuSidebar,
|
|
1635
|
+
ll as MultiselectInput,
|
|
1636
|
+
ol as NumberInput,
|
|
1637
|
+
al as OptionalBooleanInput,
|
|
1638
|
+
sl as PasswordInput,
|
|
1639
|
+
Ze as SearchInput,
|
|
1640
|
+
Oe as SearchToggleButton,
|
|
1641
|
+
Jt as SelectAddButton,
|
|
1642
|
+
nl as SelectInput,
|
|
1643
|
+
Gt as TableAddButton,
|
|
1644
|
+
Kt as TableDeleteButton,
|
|
1645
|
+
Wt as TableEditButton,
|
|
1646
|
+
Qt as TablePurgeButton,
|
|
1647
|
+
Xt as TableRestoreButton,
|
|
1648
|
+
rl as TextInput,
|
|
1649
|
+
il as TextareaInput,
|
|
1650
|
+
ul as ToggleSwitch,
|
|
1651
|
+
dl as WysiwygInput,
|
|
1652
|
+
Ht as prepareComponent,
|
|
1653
|
+
S as prepareTooltip,
|
|
1654
|
+
jt as useAdvancedFilter,
|
|
1655
|
+
j as useDrawer,
|
|
1656
|
+
Te as useDrawerStore,
|
|
1657
|
+
z as useResponsive,
|
|
1658
|
+
ze as useResponsiveStore,
|
|
1659
|
+
Pt as useSimpleConfirm
|
|
1660
|
+
};
|