@orchidui/dashboard 0.8.0 → 1.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/dist/Dashboard/Card/OcCard.js +1 -1
- package/dist/Dashboard/Charts/PieChart/OcPieChart.js +1 -1
- package/dist/Dashboard/TextEditor/QuillEditor.js +1 -1
- package/dist/{OcCard-CfotNHx8.js → OcCard-w0EuBfr4.js} +1 -1
- package/dist/{OcPieChart-B6eV6nlg.js → OcPieChart-Kn-CkXip.js} +1 -1
- package/dist/{QuillEditor-CTgEQ0_O.js → QuillEditor-Bm3QXhLB.js} +80 -77
- package/dist/index.js +71 -71
- package/package.json +2 -2
- package/dist/OcComplexCalendar-Boa7mNFU-BOc2Ou_B.js +0 -5863
- package/dist/OcComplexDatePicker-BydI4VSR-WtcGs_4g.js +0 -92
- package/dist/OcCropper-7E2i6ayU-D2MlvrOQ.js +0 -1602
- package/dist/OcDataTable-CsCGrRx7-BQ4BTMoM.js +0 -580
- package/dist/OcDraggable-CA_BCbpl-5qLRNtse.js +0 -34
- package/dist/OcDraggableList-BUu5SgoA-CFkaqmpK.js +0 -157
- package/dist/OcEmojiPicker-DYYK7OB3-bcz9JkU1.js +0 -1170
- package/dist/OcFilterForm-7ehuJUMp-D7aE0HSM.js +0 -83
- package/dist/OcFilterSearch-B4AZsLBn-C9rTBQa6.js +0 -69
- package/dist/OcFilterSearchFor-DfwJG-5N-BzJe6fhu.js +0 -67
- package/dist/OcModalCropper-Z4jlnFc5-CtKIW0ED.js +0 -46
- package/dist/OcTimePicker-D9fPU8_m-DXvgZvEY.js +0 -98
- package/dist/OcTimePopup-CXGhaOev-Bh4cnZdX.js +0 -130
- package/dist/SubPlanCard-DHj4RHJZ-BXLF6lxf.js +0 -79
- package/dist/ThumbnailSection-CJBS0QXp-CzVwtuYN.js +0 -41
- package/dist/ThumbnailTheme-hey6se0g-jbmLdCu-.js +0 -118
- package/dist/_commonjsHelpers-DaMA6jEr.js +0 -8
- package/dist/index-DyVteXE3-BhWmKQss.js +0 -7340
- package/dist/vue-draggable-next.esm-bundler-Ci24Fze9.js +0 -1543
|
@@ -1,580 +0,0 @@
|
|
|
1
|
-
import { computed as F, ref as C, onMounted as xe, openBlock as r, createElementBlock as V, createBlock as Y, unref as f, createSlots as Le, withCtx as S, renderSlot as M, normalizeProps as pe, guardReactiveProps as me, createCommentVNode as h, normalizeClass as ie, createVNode as B, renderList as re, createElementVNode as z, mergeProps as fe, Fragment as oe, toDisplayString as ye } from "vue";
|
|
2
|
-
import { c as ne, e as Re, Z as De, D as Te, b as we, j as Je, G as Ve, A as ze, q as Ge, f as ge, i as Qe, g as ke, T as We } from "./index-DyVteXE3-BhWmKQss.js";
|
|
3
|
-
import { V as be } from "./vue-draggable-next.esm-bundler-Ci24Fze9.js";
|
|
4
|
-
const Ze = (p = [], A = []) => {
|
|
5
|
-
const N = {
|
|
6
|
-
fixed: {},
|
|
7
|
-
active: {}
|
|
8
|
-
};
|
|
9
|
-
return p.forEach((v) => {
|
|
10
|
-
N.fixed[v.key] = v.isActive;
|
|
11
|
-
}), A.forEach((v) => {
|
|
12
|
-
N.active[v.key] = v.isActive;
|
|
13
|
-
}), JSON.stringify(N);
|
|
14
|
-
}, je = (p, A, N) => {
|
|
15
|
-
const v = p ? JSON.parse(p) : null;
|
|
16
|
-
return v ? [...Object.keys(v.fixed), ...Object.keys(v.active)].length !== A.length ? (localStorage.removeItem(N), { fixed: null, active: null }) : {
|
|
17
|
-
fixed: Object.keys(v.fixed).map((x) => ({
|
|
18
|
-
...A.find((w) => w.key === x) || {},
|
|
19
|
-
isActive: v.fixed[x]
|
|
20
|
-
})),
|
|
21
|
-
active: Object.keys(v.active).map((x) => ({
|
|
22
|
-
...A.find((w) => w.key === x) || {},
|
|
23
|
-
isActive: v.active[x]
|
|
24
|
-
}))
|
|
25
|
-
} : { fixed: null, active: null };
|
|
26
|
-
}, he = (p, A) => localStorage.setItem(p, A), ve = (p) => localStorage.getItem(p), Xe = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, el = {
|
|
27
|
-
key: 0,
|
|
28
|
-
class: "gap-y-2 flex flex-col border-b pb-3 border-oc-gray-200"
|
|
29
|
-
}, ll = { class: "gap-y-2 flex flex-col" }, al = {
|
|
30
|
-
key: 0,
|
|
31
|
-
class: "flex items-center bg-white justify-between h-[26px]"
|
|
32
|
-
}, ul = { class: "flex items-center w-full gap-x-3" }, tl = { class: "truncate w-full max-w-[160px]" }, ol = {
|
|
33
|
-
__name: "ColumnEdit",
|
|
34
|
-
props: {
|
|
35
|
-
options: {
|
|
36
|
-
type: Object,
|
|
37
|
-
default: () => ({})
|
|
38
|
-
},
|
|
39
|
-
headers: {
|
|
40
|
-
type: Array,
|
|
41
|
-
default: () => []
|
|
42
|
-
},
|
|
43
|
-
localKey: {
|
|
44
|
-
type: String,
|
|
45
|
-
default: ""
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
emits: ["change-active", "onMoved", "update-order"],
|
|
49
|
-
setup(p, { emit: A }) {
|
|
50
|
-
const N = A, v = p, x = C([]), w = C([]), Z = C(!1), G = (U = !1) => {
|
|
51
|
-
w.value = w.value.map((m) => ({
|
|
52
|
-
...m,
|
|
53
|
-
isActive: !0
|
|
54
|
-
})), N("update-order", {
|
|
55
|
-
fixedHeaders: w.value,
|
|
56
|
-
activeHeaders: x.value,
|
|
57
|
-
isOnMount: U
|
|
58
|
-
});
|
|
59
|
-
}, X = {
|
|
60
|
-
handle: ".drag-el",
|
|
61
|
-
filter: ".is-disabled",
|
|
62
|
-
group: "headers",
|
|
63
|
-
animation: 500,
|
|
64
|
-
forceFallback: !1,
|
|
65
|
-
move: (U) => U.to.dataset.activeHeaders ? !0 : !!U.draggedContext.futureIndex,
|
|
66
|
-
"onUpdate:modelValue": () => G()
|
|
67
|
-
};
|
|
68
|
-
return xe(() => {
|
|
69
|
-
const U = ve(v.localKey), { fixed: m, active: o } = je(U, v.headers, v.localKey);
|
|
70
|
-
w.value = m || v.headers.slice(0, 1), x.value = o || v.headers.slice(1).map((j) => {
|
|
71
|
-
var y, E, L;
|
|
72
|
-
return {
|
|
73
|
-
...j,
|
|
74
|
-
isActive: ((L = (E = (y = v.options) == null ? void 0 : y.active) == null ? void 0 : E.find((K) => K.key === j.key)) == null ? void 0 : L.isActive) ?? !0
|
|
75
|
-
};
|
|
76
|
-
}), G(!0);
|
|
77
|
-
}), (U, m) => (r(), Y(f(we), {
|
|
78
|
-
modelValue: Z.value,
|
|
79
|
-
"onUpdate:modelValue": m[3] || (m[3] = (o) => Z.value = o),
|
|
80
|
-
class: "h-[36px]",
|
|
81
|
-
"is-attach-to-body": ""
|
|
82
|
-
}, {
|
|
83
|
-
menu: S(() => [
|
|
84
|
-
z("div", Xe, [
|
|
85
|
-
w.value.length ? (r(), V("div", el, [
|
|
86
|
-
m[4] || (m[4] = z("span", { class: "text-oc-text-400 font-medium" }, "Fixed columns", -1)),
|
|
87
|
-
B(f(be), fe({
|
|
88
|
-
key: "key",
|
|
89
|
-
modelValue: w.value,
|
|
90
|
-
"onUpdate:modelValue": m[0] || (m[0] = (o) => w.value = o)
|
|
91
|
-
}, X), {
|
|
92
|
-
default: S(() => [
|
|
93
|
-
(r(!0), V(oe, null, re(w.value, (o, j) => (r(), V("div", {
|
|
94
|
-
key: o.key,
|
|
95
|
-
class: ie(["flex items-center justify-between h-[26px]", j ? "" : "is-disabled"])
|
|
96
|
-
}, [
|
|
97
|
-
z("span", null, ye(o.label), 1),
|
|
98
|
-
j ? (r(), Y(f(ke), {
|
|
99
|
-
key: 0,
|
|
100
|
-
width: "18",
|
|
101
|
-
height: "18",
|
|
102
|
-
class: "text-oc-text-400 drag-el cursor-move",
|
|
103
|
-
name: "draggable"
|
|
104
|
-
})) : h("", !0)
|
|
105
|
-
], 2))), 128))
|
|
106
|
-
]),
|
|
107
|
-
_: 1
|
|
108
|
-
}, 16, ["modelValue"])
|
|
109
|
-
])) : h("", !0),
|
|
110
|
-
z("div", ll, [
|
|
111
|
-
m[5] || (m[5] = z("span", { class: "text-oc-text-400 font-medium" }, "Active columns", -1)),
|
|
112
|
-
B(f(be), fe({
|
|
113
|
-
key: "key",
|
|
114
|
-
modelValue: x.value,
|
|
115
|
-
"onUpdate:modelValue": m[2] || (m[2] = (o) => x.value = o)
|
|
116
|
-
}, X, { "data-active-headers": "true" }), {
|
|
117
|
-
default: S(() => [
|
|
118
|
-
(r(!0), V(oe, null, re(x.value, (o) => (r(), V(oe, {
|
|
119
|
-
key: o.key
|
|
120
|
-
}, [
|
|
121
|
-
o.key !== "actions" ? (r(), V("div", al, [
|
|
122
|
-
z("div", ul, [
|
|
123
|
-
B(f(We), {
|
|
124
|
-
modelValue: o.isActive,
|
|
125
|
-
"onUpdate:modelValue": [
|
|
126
|
-
(j) => o.isActive = j,
|
|
127
|
-
m[1] || (m[1] = (j) => G())
|
|
128
|
-
],
|
|
129
|
-
class: "!w-fit"
|
|
130
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
131
|
-
z("div", tl, ye(o.label), 1)
|
|
132
|
-
]),
|
|
133
|
-
x.value.length > 1 ? (r(), Y(f(ke), {
|
|
134
|
-
key: 0,
|
|
135
|
-
width: "18",
|
|
136
|
-
height: "18",
|
|
137
|
-
class: "text-oc-text-400 drag-el cursor-move",
|
|
138
|
-
name: "draggable"
|
|
139
|
-
})) : h("", !0)
|
|
140
|
-
])) : h("", !0)
|
|
141
|
-
], 64))), 128))
|
|
142
|
-
]),
|
|
143
|
-
_: 1
|
|
144
|
-
}, 16, ["modelValue"])
|
|
145
|
-
])
|
|
146
|
-
])
|
|
147
|
-
]),
|
|
148
|
-
default: S(() => [
|
|
149
|
-
B(f(Ve), {
|
|
150
|
-
label: "Edit Column",
|
|
151
|
-
"left-icon": "setting",
|
|
152
|
-
variant: "secondary"
|
|
153
|
-
})
|
|
154
|
-
]),
|
|
155
|
-
_: 1
|
|
156
|
-
}, 8, ["modelValue"]));
|
|
157
|
-
}
|
|
158
|
-
}, nl = { class: "flex flex-col gap-9 relative" }, il = {
|
|
159
|
-
key: 0,
|
|
160
|
-
class: "flex items-center px-4 min-h-[52px]"
|
|
161
|
-
}, rl = {
|
|
162
|
-
key: 0,
|
|
163
|
-
class: "flex gap-5 items-center absolute left-5"
|
|
164
|
-
}, vl = {
|
|
165
|
-
key: 1,
|
|
166
|
-
class: "flex gap-3 absolute left-5"
|
|
167
|
-
}, sl = {
|
|
168
|
-
key: 1,
|
|
169
|
-
class: "flex w-full gap-5 md:justify-start justify-center"
|
|
170
|
-
}, dl = {
|
|
171
|
-
key: 2,
|
|
172
|
-
class: "hidden md:flex items-center"
|
|
173
|
-
}, fl = {
|
|
174
|
-
__name: "OcDataTable",
|
|
175
|
-
props: {
|
|
176
|
-
isLoading: Boolean,
|
|
177
|
-
id: {
|
|
178
|
-
type: String,
|
|
179
|
-
required: !0
|
|
180
|
-
},
|
|
181
|
-
options: {
|
|
182
|
-
type: Object,
|
|
183
|
-
required: !0
|
|
184
|
-
},
|
|
185
|
-
filter: {
|
|
186
|
-
type: Object,
|
|
187
|
-
required: !0
|
|
188
|
-
},
|
|
189
|
-
selected: {
|
|
190
|
-
type: Array,
|
|
191
|
-
required: !1
|
|
192
|
-
},
|
|
193
|
-
rowClass: String,
|
|
194
|
-
rowKey: {
|
|
195
|
-
type: String,
|
|
196
|
-
Function,
|
|
197
|
-
default: "id"
|
|
198
|
-
},
|
|
199
|
-
rowLink: String
|
|
200
|
-
},
|
|
201
|
-
emits: {
|
|
202
|
-
"update:selected": [],
|
|
203
|
-
"update:filter": [],
|
|
204
|
-
"click:row": [],
|
|
205
|
-
"filter-fields-changed": [],
|
|
206
|
-
"filter-removed": [],
|
|
207
|
-
"search-query-changed": [],
|
|
208
|
-
"hover:cell": []
|
|
209
|
-
},
|
|
210
|
-
setup(p, { emit: A }) {
|
|
211
|
-
var N, v, x, w, Z, G, X, U, m;
|
|
212
|
-
const o = p, j = A, y = F(() => {
|
|
213
|
-
var l;
|
|
214
|
-
return (l = o.options) == null ? void 0 : l.pagination;
|
|
215
|
-
}), E = F(() => {
|
|
216
|
-
var l;
|
|
217
|
-
return (l = o.options) == null ? void 0 : l.cursor;
|
|
218
|
-
}), L = C(), K = F(() => {
|
|
219
|
-
var l;
|
|
220
|
-
return (l = o.options) == null ? void 0 : l.tableOptions;
|
|
221
|
-
}), Se = F(() => {
|
|
222
|
-
var l;
|
|
223
|
-
return {
|
|
224
|
-
...K.value,
|
|
225
|
-
headers: L.value ? L.value.filter((e) => ce(e.key)) : (l = K.value) == null ? void 0 : l.headers.filter((e) => ce(e.key))
|
|
226
|
-
};
|
|
227
|
-
}), a = F(() => {
|
|
228
|
-
var l;
|
|
229
|
-
return (l = o.options) == null ? void 0 : l.filterOptions;
|
|
230
|
-
}), Ee = F(() => {
|
|
231
|
-
var l;
|
|
232
|
-
return (l = o.options) == null ? void 0 : l.hidePerPageDropdown;
|
|
233
|
-
}), _e = F(() => {
|
|
234
|
-
var l;
|
|
235
|
-
return ((l = y.value) == null ? void 0 : l.last_page) === 1;
|
|
236
|
-
}), Q = C(!1), P = C(o.filter[(v = (N = a.value) == null ? void 0 : N.tabs) == null ? void 0 : v.key]), ee = C(o.filter.page), R = C(
|
|
237
|
-
(w = (x = a.value) == null ? void 0 : x.per_page) != null && w.key ? o.filter[(G = (Z = a.value) == null ? void 0 : Z.per_page) == null ? void 0 : G.key] : o.filter.per_page
|
|
238
|
-
), se = ((m = o.filter[(U = (X = a.value) == null ? void 0 : X.search) == null ? void 0 : U.key]) == null ? void 0 : m.trim()) ?? "", H = C(se ? se.split(",") : []), de = C(!1), Ae = F(
|
|
239
|
-
() => {
|
|
240
|
-
var l, e;
|
|
241
|
-
return (e = (l = o.options) == null ? void 0 : l.perPageOptions) == null ? void 0 : e.map(
|
|
242
|
-
(n) => ({
|
|
243
|
-
label: `${n}`,
|
|
244
|
-
value: n
|
|
245
|
-
})
|
|
246
|
-
);
|
|
247
|
-
}
|
|
248
|
-
), $e = F(() => {
|
|
249
|
-
let l = [
|
|
250
|
-
{
|
|
251
|
-
label: "10",
|
|
252
|
-
value: 10
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
label: "15",
|
|
256
|
-
value: 15
|
|
257
|
-
},
|
|
258
|
-
{
|
|
259
|
-
label: "20",
|
|
260
|
-
value: 20
|
|
261
|
-
},
|
|
262
|
-
{
|
|
263
|
-
label: "25",
|
|
264
|
-
value: 25
|
|
265
|
-
},
|
|
266
|
-
{
|
|
267
|
-
label: "40",
|
|
268
|
-
value: 40
|
|
269
|
-
},
|
|
270
|
-
{
|
|
271
|
-
label: "50",
|
|
272
|
-
value: 50
|
|
273
|
-
},
|
|
274
|
-
{
|
|
275
|
-
label: "75",
|
|
276
|
-
value: 75
|
|
277
|
-
},
|
|
278
|
-
{
|
|
279
|
-
label: "99",
|
|
280
|
-
value: 99
|
|
281
|
-
}
|
|
282
|
-
], e = Ae.value ?? l;
|
|
283
|
-
if (y.value) {
|
|
284
|
-
const n = y.value.total < 100 ? y.value.total : 100;
|
|
285
|
-
n > 10 && (e = e.filter((i) => i.value <= n));
|
|
286
|
-
}
|
|
287
|
-
return [...new Set(e)];
|
|
288
|
-
}), Oe = F(() => {
|
|
289
|
-
var l;
|
|
290
|
-
return ((l = o.selected) == null ? void 0 : l.length) > 0;
|
|
291
|
-
}), Fe = (l) => {
|
|
292
|
-
!l.trim() || H.value.includes(l) || (a.value ? H.value.push(l) : H.value = [l], $(), j("search-query-changed", l));
|
|
293
|
-
}, Ce = (l) => {
|
|
294
|
-
H.value = H.value.filter((e) => e !== l), $();
|
|
295
|
-
}, D = o.filter;
|
|
296
|
-
!D && y ? D.page = 1 : !D && E && (D.cursor = "");
|
|
297
|
-
const t = C(D), Ne = () => {
|
|
298
|
-
var l, e, n, i, s, c, u, g;
|
|
299
|
-
H.value = [], P.value = "";
|
|
300
|
-
const k = {};
|
|
301
|
-
a.value ? D.page = 1 : D.cursor = "", (e = (l = a.value) == null ? void 0 : l.per_page) != null && e.key ? k[(i = (n = a.value) == null ? void 0 : n.per_page) == null ? void 0 : i.key] = R.value : k.per_page = R.value, (c = (s = a.value) == null ? void 0 : s.tabs) != null && c.key ? k[(g = (u = a.value) == null ? void 0 : u.tabs) == null ? void 0 : g.key] = P.value : k.tabs = P.value, t.value = k, $();
|
|
302
|
-
}, Ue = () => {
|
|
303
|
-
$(null, ee.value);
|
|
304
|
-
}, Ke = () => {
|
|
305
|
-
var l, e;
|
|
306
|
-
(e = (l = a.value) == null ? void 0 : l.columnEdit) != null && e.localStorageKey && he(o.id, JSON.stringify(t.value));
|
|
307
|
-
}, Me = () => o.id ? ve(o.id) : null, $ = (l = null, e = !1, n = "") => {
|
|
308
|
-
var i, s, c;
|
|
309
|
-
y.value && !e && (ee.value = 1), y.value ? t.value.page = ee.value : t.value.cursor = n, (i = a.value) != null && i.per_page ? t.value[a.value.per_page.key] = R.value : t.value.per_page = R.value, (s = a.value) != null && s.tabs && (t.value[a.value.tabs.key] = P.value), (c = a.value) != null && c.search && (t.value[a.value.search.key] = H.value.join()), l && (Q.value = !1, t.value = { ...t.value, ...l }, Object.keys(t.value).forEach((u) => {
|
|
310
|
-
Array.isArray(t.value[u]) && t.value[u].length === 0 && delete t.value[u];
|
|
311
|
-
})), Ke(), j("update:filter", t.value);
|
|
312
|
-
}, Ye = (l, e) => {
|
|
313
|
-
$(l), j("filter-removed", e);
|
|
314
|
-
}, qe = (l) => {
|
|
315
|
-
let e = [];
|
|
316
|
-
return l.forEach((n) => {
|
|
317
|
-
e.push(n.key);
|
|
318
|
-
}), e;
|
|
319
|
-
}, Be = F(() => {
|
|
320
|
-
if (t.value) {
|
|
321
|
-
let l = [];
|
|
322
|
-
return Object.keys(t.value).forEach((e) => {
|
|
323
|
-
var n, i, s, c, u, g, k, T, I, le, ae;
|
|
324
|
-
let W = (i = (n = a.value) == null ? void 0 : n.tabs) == null ? void 0 : i.key;
|
|
325
|
-
const ue = (c = (s = a.value) == null ? void 0 : s.search) == null ? void 0 : c.key, te = ((g = (u = a.value) == null ? void 0 : u.per_page) == null ? void 0 : g.key) ?? "per_page";
|
|
326
|
-
if ((k = a.value.form) == null || k.find((b) => {
|
|
327
|
-
b.name === W && (W = "");
|
|
328
|
-
}), e !== "page" && e !== "cursor" && e !== te && e !== W && e !== ue) {
|
|
329
|
-
let b = null, d = (T = a.value.form) == null ? void 0 : T.find((q) => {
|
|
330
|
-
if (typeof q.name == "object") {
|
|
331
|
-
let _ = !1;
|
|
332
|
-
return q.name.forEach((J) => {
|
|
333
|
-
J.key === e && (_ = !0, b = qe(q.name));
|
|
334
|
-
}), _;
|
|
335
|
-
} else
|
|
336
|
-
return q.name === e;
|
|
337
|
-
}), O = "";
|
|
338
|
-
if (d && t.value[e]) {
|
|
339
|
-
if (typeof d.name == "object" ? (I = d.name) == null || I.forEach((_) => {
|
|
340
|
-
O && (O += " - "), O += t.value[_.key];
|
|
341
|
-
}) : O = t.value[e], d.props.options && (O = (d.props.multiple ? t.value[e] : [t.value[e]]).map(
|
|
342
|
-
(_) => {
|
|
343
|
-
var J;
|
|
344
|
-
return (J = d.props.options.find(({ value: Ie }) => Ie === _)) == null ? void 0 : J.label;
|
|
345
|
-
}
|
|
346
|
-
).join(", ")), d.type === "RangeInput" && Array.isArray(t.value[e]) && (O = t.value[e][0].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + " - " + t.value[e][1].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")), d.type === "DatePicker")
|
|
347
|
-
if (((le = d == null ? void 0 : d.props) == null ? void 0 : le.type) === "range" && d.name && d.name[1]) {
|
|
348
|
-
const _ = ne(t.value[d.name[0].key]).format("MM/DD/YYYY"), J = ne(t.value[d.name[1].key]).format("MM/DD/YYYY");
|
|
349
|
-
O = _ === J ? _ : _ + " - " + J;
|
|
350
|
-
} else O = ne(t.value[d.name]).format("MM/DD/YYYY");
|
|
351
|
-
let q = `${(ae = d == null ? void 0 : d.props) == null ? void 0 : ae.label} : ${O}`;
|
|
352
|
-
d && d.name && typeof d.name == "object" && l.find((_) => _.name === b[0]) && (q = ""), l.push({
|
|
353
|
-
label: q,
|
|
354
|
-
name: e,
|
|
355
|
-
multiNames: b
|
|
356
|
-
});
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
}), l;
|
|
360
|
-
}
|
|
361
|
-
return [];
|
|
362
|
-
}), ce = (l) => {
|
|
363
|
-
var e, n, i, s, c, u;
|
|
364
|
-
return ((u = (c = (s = (i = t.value) == null ? void 0 : i[(n = (e = a.value) == null ? void 0 : e.columnEdit) == null ? void 0 : n.key]) == null ? void 0 : s.active) == null ? void 0 : c.find((g) => g.key === l)) == null ? void 0 : u.isActive) ?? !0;
|
|
365
|
-
}, Pe = ({ fixedHeaders: l, activeHeaders: e, isOnMount: n }) => {
|
|
366
|
-
var i, s, c, u;
|
|
367
|
-
if (t.value[(s = (i = a.value) == null ? void 0 : i.columnEdit) == null ? void 0 : s.key].fixed = l, t.value[(u = (c = a.value) == null ? void 0 : c.columnEdit) == null ? void 0 : u.key].active = e, L.value = [...l, ...e], !n) {
|
|
368
|
-
const g = Ze(l, e);
|
|
369
|
-
he(a.value.columnEdit.localStorageKey, g);
|
|
370
|
-
}
|
|
371
|
-
}, He = () => {
|
|
372
|
-
var l, e, n, i, s, c;
|
|
373
|
-
if ((e = (l = a.value) == null ? void 0 : l.columnEdit) != null && e.localStorageKey) {
|
|
374
|
-
const u = ve(a.value.columnEdit.localStorageKey);
|
|
375
|
-
if (u) {
|
|
376
|
-
const { fixed: g, active: k } = je(
|
|
377
|
-
u,
|
|
378
|
-
K.value.headers,
|
|
379
|
-
a.value.columnEdit.localStorageKey
|
|
380
|
-
);
|
|
381
|
-
t.value[(i = (n = a.value) == null ? void 0 : n.columnEdit) == null ? void 0 : i.key].fixed = g, t.value[(c = (s = a.value) == null ? void 0 : s.columnEdit) == null ? void 0 : c.key].active = k, L.value = [...g, ...k];
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
};
|
|
385
|
-
return xe(() => {
|
|
386
|
-
var l, e, n, i;
|
|
387
|
-
He();
|
|
388
|
-
const s = Me();
|
|
389
|
-
s && (t.value = JSON.parse(s), P.value = P.value || ((l = t.value) == null ? void 0 : l.tabs) || ((i = t.value) == null ? void 0 : i[(n = (e = a.value) == null ? void 0 : e.tabs) == null ? void 0 : n.key]), $());
|
|
390
|
-
}), (l, e) => {
|
|
391
|
-
var n, i, s, c;
|
|
392
|
-
return r(), V("div", nl, [
|
|
393
|
-
K.value ? (r(), Y(f(Re), {
|
|
394
|
-
key: 0,
|
|
395
|
-
selected: p.selected,
|
|
396
|
-
"row-key": p.rowKey,
|
|
397
|
-
options: Se.value,
|
|
398
|
-
"is-loading": p.isLoading,
|
|
399
|
-
"loading-rows": R.value,
|
|
400
|
-
"row-class": p.rowClass,
|
|
401
|
-
"row-link": p.rowLink,
|
|
402
|
-
"is-sticky": K.value.isSticky,
|
|
403
|
-
"is-borderless": K.value.isBorderless,
|
|
404
|
-
"onUpdate:selected": e[7] || (e[7] = (u) => l.$emit("update:selected", u)),
|
|
405
|
-
"onClick:row": e[8] || (e[8] = (u) => l.$emit("click:row", u)),
|
|
406
|
-
"onHover:cell": e[9] || (e[9] = (u) => l.$emit("hover:cell", u))
|
|
407
|
-
}, Le({
|
|
408
|
-
after: S(() => [
|
|
409
|
-
M(l.$slots, "after")
|
|
410
|
-
]),
|
|
411
|
-
empty: S(() => [
|
|
412
|
-
M(l.$slots, "empty")
|
|
413
|
-
]),
|
|
414
|
-
"table-header": S((u) => [
|
|
415
|
-
M(l.$slots, "table-header", pe(me(u)))
|
|
416
|
-
]),
|
|
417
|
-
"table-body": S((u) => [
|
|
418
|
-
M(l.$slots, "table-body", pe(me(u)))
|
|
419
|
-
]),
|
|
420
|
-
_: 2
|
|
421
|
-
}, [
|
|
422
|
-
l.$slots.before || (n = a.value) != null && n.search || (i = a.value) != null && i.form || (s = a.value) != null && s.tabs ? {
|
|
423
|
-
name: "before",
|
|
424
|
-
fn: S(() => {
|
|
425
|
-
var u, g, k, T;
|
|
426
|
-
return [
|
|
427
|
-
M(l.$slots, "before"),
|
|
428
|
-
(u = a.value) != null && u.search || (g = a.value) != null && g.form || (k = a.value) != null && k.tabs ? (r(), V("div", il, [
|
|
429
|
-
Oe.value ? (r(), V("div", rl, [
|
|
430
|
-
M(l.$slots, "bulk-actions", { selectedRows: p.selected })
|
|
431
|
-
])) : (r(), V("div", vl, [
|
|
432
|
-
(T = a.value) != null && T.tabs ? (r(), Y(f(De), {
|
|
433
|
-
key: 0,
|
|
434
|
-
modelValue: P.value,
|
|
435
|
-
"onUpdate:modelValue": [
|
|
436
|
-
e[0] || (e[0] = (I) => P.value = I),
|
|
437
|
-
e[1] || (e[1] = (I) => $(null))
|
|
438
|
-
],
|
|
439
|
-
tabs: a.value.tabs.options,
|
|
440
|
-
variant: "pills"
|
|
441
|
-
}, null, 8, ["modelValue", "tabs"])) : h("", !0)
|
|
442
|
-
])),
|
|
443
|
-
M(l.$slots, "filter-options", {}, () => {
|
|
444
|
-
var I, le, ae, W, ue, te;
|
|
445
|
-
return [
|
|
446
|
-
(I = a.value) != null && I.search || (le = a.value) != null && le.form || (ae = a.value) != null && ae.columnEdit ? (r(), V("div", {
|
|
447
|
-
key: 0,
|
|
448
|
-
class: ie([
|
|
449
|
-
"flex gap-3 absolute ml-auto bg-oc-bg-light right-4 max-w-[calc(100%-24px)]",
|
|
450
|
-
a.value ? de.value ? "md:w-fit w-full" : "" : "w-full justify-end"
|
|
451
|
-
])
|
|
452
|
-
}, [
|
|
453
|
-
(W = a.value) != null && W.search ? (r(), Y(f(Te), {
|
|
454
|
-
key: 0,
|
|
455
|
-
"is-search-only": !a.value.tabs || a.value.isSearchOnly,
|
|
456
|
-
onAddQuery: Fe,
|
|
457
|
-
onToggle: e[2] || (e[2] = (b) => de.value = b)
|
|
458
|
-
}, null, 8, ["is-search-only"])) : h("", !0),
|
|
459
|
-
(ue = a.value) != null && ue.form ? (r(), Y(f(we), {
|
|
460
|
-
key: 1,
|
|
461
|
-
modelValue: Q.value,
|
|
462
|
-
"onUpdate:modelValue": e[6] || (e[6] = (b) => Q.value = b),
|
|
463
|
-
distance: 9,
|
|
464
|
-
placement: "bottom-end",
|
|
465
|
-
"is-attach-to-body": ""
|
|
466
|
-
}, {
|
|
467
|
-
menu: S(() => [
|
|
468
|
-
Q.value ? (r(), Y(f(Je), {
|
|
469
|
-
key: 0,
|
|
470
|
-
id: p.id,
|
|
471
|
-
"json-form": a.value.form ?? [],
|
|
472
|
-
grid: a.value.grid ?? null,
|
|
473
|
-
values: o.filter,
|
|
474
|
-
actions: a.value.actions,
|
|
475
|
-
onApplyFilter: e[3] || (e[3] = (b) => $(b)),
|
|
476
|
-
onFilterFieldsChanged: e[4] || (e[4] = (b) => j("filter-fields-changed", b)),
|
|
477
|
-
onCancel: e[5] || (e[5] = (b) => Q.value = !1)
|
|
478
|
-
}, {
|
|
479
|
-
default: S(({ errors: b, values: d, jsonForm: O, updateForm: q }) => [
|
|
480
|
-
M(l.$slots, "custom-filter-form", {
|
|
481
|
-
errors: b,
|
|
482
|
-
values: d,
|
|
483
|
-
jsonForm: O,
|
|
484
|
-
updateFilter: q
|
|
485
|
-
})
|
|
486
|
-
]),
|
|
487
|
-
_: 3
|
|
488
|
-
}, 8, ["id", "json-form", "grid", "values", "actions"])) : h("", !0)
|
|
489
|
-
]),
|
|
490
|
-
default: S(() => [
|
|
491
|
-
B(f(Ve), {
|
|
492
|
-
"is-active": Q.value,
|
|
493
|
-
variant: "secondary",
|
|
494
|
-
"left-icon": "filter"
|
|
495
|
-
}, null, 8, ["is-active"])
|
|
496
|
-
]),
|
|
497
|
-
_: 3
|
|
498
|
-
}, 8, ["modelValue"])) : h("", !0),
|
|
499
|
-
a.value.columnEdit ? (r(), Y(ol, {
|
|
500
|
-
key: 2,
|
|
501
|
-
options: t.value.columnEdit,
|
|
502
|
-
headers: ((te = K.value) == null ? void 0 : te.headers) || [],
|
|
503
|
-
"local-key": a.value.columnEdit.localStorageKey,
|
|
504
|
-
onUpdateOrder: Pe
|
|
505
|
-
}, null, 8, ["options", "headers", "local-key"])) : h("", !0)
|
|
506
|
-
], 2)) : h("", !0)
|
|
507
|
-
];
|
|
508
|
-
})
|
|
509
|
-
])) : h("", !0),
|
|
510
|
-
B(f(ze), {
|
|
511
|
-
filters: Be.value,
|
|
512
|
-
queries: H.value,
|
|
513
|
-
class: "border-t border-oc-gray-200",
|
|
514
|
-
onRemoveQuery: Ce,
|
|
515
|
-
onRemoveAll: Ne,
|
|
516
|
-
onRemoveFilter: Ye
|
|
517
|
-
}, null, 8, ["filters", "queries"])
|
|
518
|
-
];
|
|
519
|
-
}),
|
|
520
|
-
key: "0"
|
|
521
|
-
} : void 0,
|
|
522
|
-
re((c = K.value) == null ? void 0 : c.headers, (u, g) => ({
|
|
523
|
-
name: u.key,
|
|
524
|
-
fn: S(({ data: k, item: T }) => [
|
|
525
|
-
M(l.$slots, u.key, {
|
|
526
|
-
data: k,
|
|
527
|
-
item: T
|
|
528
|
-
})
|
|
529
|
-
])
|
|
530
|
-
}))
|
|
531
|
-
]), 1032, ["selected", "row-key", "options", "is-loading", "loading-rows", "row-class", "row-link", "is-sticky", "is-borderless"])) : h("", !0),
|
|
532
|
-
M(l.$slots, "before-pagination"),
|
|
533
|
-
y.value || E.value ? (r(), V("div", {
|
|
534
|
-
key: 1,
|
|
535
|
-
class: ie(["flex gap-3 items-center", y.value && y.value.last_page === 1 ? "justify-end" : ""])
|
|
536
|
-
}, [
|
|
537
|
-
y.value && !_e.value ? (r(), Y(f(Ge), {
|
|
538
|
-
key: 0,
|
|
539
|
-
modelValue: ee.value,
|
|
540
|
-
"onUpdate:modelValue": [
|
|
541
|
-
e[10] || (e[10] = (u) => ee.value = u),
|
|
542
|
-
Ue
|
|
543
|
-
],
|
|
544
|
-
class: "justify-center",
|
|
545
|
-
"max-page": y.value.last_page,
|
|
546
|
-
strategy: y.value.strategy,
|
|
547
|
-
"total-visible": "5"
|
|
548
|
-
}, null, 8, ["modelValue", "max-page", "strategy"])) : h("", !0),
|
|
549
|
-
E.value ? (r(), V("div", sl, [
|
|
550
|
-
B(f(ge), {
|
|
551
|
-
disabled: !E.value.prev,
|
|
552
|
-
onClick: e[11] || (e[11] = (u) => E.value.prev ? $(null, !1, E.value.prev) : null)
|
|
553
|
-
}, null, 8, ["disabled"]),
|
|
554
|
-
B(f(ge), {
|
|
555
|
-
disabled: !E.value.next,
|
|
556
|
-
"is-next": "",
|
|
557
|
-
onClick: e[12] || (e[12] = (u) => E.value.next ? $(null, !1, E.value.next) : null)
|
|
558
|
-
}, null, 8, ["disabled"])
|
|
559
|
-
])) : h("", !0),
|
|
560
|
-
Ee.value ? h("", !0) : (r(), V("div", dl, [
|
|
561
|
-
B(f(Qe), {
|
|
562
|
-
modelValue: R.value,
|
|
563
|
-
"onUpdate:modelValue": [
|
|
564
|
-
e[13] || (e[13] = (u) => R.value = u),
|
|
565
|
-
e[14] || (e[14] = (u) => $(null))
|
|
566
|
-
],
|
|
567
|
-
label: "Item per page",
|
|
568
|
-
"is-inline-label": "",
|
|
569
|
-
"popper-options": { placement: "auto" },
|
|
570
|
-
options: $e.value
|
|
571
|
-
}, null, 8, ["modelValue", "options"])
|
|
572
|
-
]))
|
|
573
|
-
], 2)) : h("", !0)
|
|
574
|
-
]);
|
|
575
|
-
};
|
|
576
|
-
}
|
|
577
|
-
};
|
|
578
|
-
export {
|
|
579
|
-
fl as default
|
|
580
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { computed as m, openBlock as n, createBlock as s, unref as i, withCtx as p, renderSlot as c } from "vue";
|
|
2
|
-
import { V as g } from "./vue-draggable-next.esm-bundler-Ci24Fze9.js";
|
|
3
|
-
const h = {
|
|
4
|
-
__name: "OcDraggable",
|
|
5
|
-
props: {
|
|
6
|
-
modelValue: Array
|
|
7
|
-
},
|
|
8
|
-
emits: {
|
|
9
|
-
"update:modelValue": [],
|
|
10
|
-
detectMove: null
|
|
11
|
-
},
|
|
12
|
-
setup(a, { emit: o }) {
|
|
13
|
-
const u = a, l = o, t = m(() => u.modelValue), r = (e) => {
|
|
14
|
-
l("update:modelValue", t.value, e);
|
|
15
|
-
}, d = (e) => {
|
|
16
|
-
l("detectMove", e);
|
|
17
|
-
};
|
|
18
|
-
return (e, f) => (n(), s(i(g), {
|
|
19
|
-
handle: ".drag-el",
|
|
20
|
-
list: t.value,
|
|
21
|
-
animation: 500,
|
|
22
|
-
move: d,
|
|
23
|
-
onChange: r
|
|
24
|
-
}, {
|
|
25
|
-
default: p(() => [
|
|
26
|
-
c(e.$slots, "default", { list: t.value })
|
|
27
|
-
]),
|
|
28
|
-
_: 3
|
|
29
|
-
}, 8, ["list"]));
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
export {
|
|
33
|
-
h as default
|
|
34
|
-
};
|