@orchidui/core 1.8.1-39 → 1.8.1-40
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/DataDisplay/CustomerCard/OcCustomerCard.js +1 -1
- package/dist/DataDisplay/FloatContent/OcFloatContent.js +1 -1
- package/dist/DataDisplay/InfoCard/OcInfoCard.js +1 -1
- package/dist/DataDisplay/ListDetail/OcListDetail.js +1 -1
- package/dist/DataDisplay/ListItem/OcListItem.js +1 -1
- package/dist/DataDisplay/OnboardingListItem/OcOnboardingListItem.js +1 -1
- package/dist/DataDisplay/Overview/OcOverview.js +1 -1
- package/dist/DataDisplay/Pagination/OcPagination.js +1 -1
- package/dist/DataDisplay/Table/OcTable.js +1 -1
- package/dist/DataDisplay/TransferSummary/OcTransferSummary.js +1 -1
- package/dist/Disclosure/Accordion/OcAccordion.js +1 -1
- package/dist/Disclosure/OnboardingAccordion/OnboardingAccordion.js +1 -1
- package/dist/Disclosure/Steps/OcSteps.js +1 -1
- package/dist/Disclosure/Tabs/Tabs.js +1 -1
- package/dist/Disclosure/Variants/OcVariants.js +1 -1
- package/dist/Elements/AdditionalContent/OcAdditionalContent.js +1 -1
- package/dist/Elements/AuthenticationOption/AuthenticationOption.js +1 -1
- package/dist/Elements/Box/OcBox.js +1 -1
- package/dist/Elements/EmptyPage/OcEmptyPage.js +1 -1
- package/dist/Elements/FeatureOverviewCard/OcFeatureOverviewCard.js +1 -1
- package/dist/Elements/Header/OcHeader.js +1 -1
- package/dist/Elements/PageTitle/OcPageTitle.js +1 -1
- package/dist/Elements/SandboxBanner/OcSandboxBanner.js +1 -1
- package/dist/Elements/Sidebar/OcSidebar.js +2 -2
- package/dist/Elements/SubSidebar/OcSubSidebar.js +1 -1
- package/dist/Elements/VerificationOption/OcVerificationOption.js +1 -1
- package/dist/Feedback/Banner/OcBanner.js +1 -1
- package/dist/Feedback/Chip/OcChip.js +1 -1
- package/dist/Feedback/ShareIcon/OcShareIcon.js +1 -1
- package/dist/Feedback/Snackbar/OcSnackbar.js +1 -1
- package/dist/Form/BaseInput/OcBaseInput.js +1 -1
- package/dist/Form/Button/OcButton.js +1 -1
- package/dist/Form/Calendar/OcCalendar.js +1 -1
- package/dist/Form/CardInput/OcCardInput.js +1 -1
- package/dist/Form/Checkbox/OcCheckbox.js +1 -1
- package/dist/Form/CheckboxesGroup/OcCheckboxesGroup.js +1 -1
- package/dist/Form/Criteria/OcCriteria.js +1 -1
- package/dist/Form/Cropper/OcCropper.js +1 -1
- package/dist/Form/DatePicker/OcDatePicker.js +1 -1
- package/dist/Form/EmojiPicker/OcEmojiPicker.js +1 -1
- package/dist/Form/Input/OcInput.js +1 -1
- package/dist/Form/LinkInput/OcLinkInput.js +1 -1
- package/dist/Form/MultipleUploadFile/OcMultipleUploadFile.js +1 -1
- package/dist/Form/NumberInput/OcNumberInput.js +1 -1
- package/dist/Form/PhoneInput/OcPhoneInput.js +1 -1
- package/dist/Form/Radio/OcRadio.js +1 -1
- package/dist/Form/RadioGroup/OcRadioGroup.js +1 -1
- package/dist/Form/RangeInput/OcRangeInput.js +1 -1
- package/dist/Form/SectionItem/OcSectionItem.js +1 -1
- package/dist/Form/Select/OcSelect.js +1 -1
- package/dist/Form/SelectOptions/OcSelectOptions.js +1 -1
- package/dist/Form/SingleFileUpload/OcSingleFileUpload.js +1 -1
- package/dist/Form/Slider/OcSlider.js +1 -1
- package/dist/Form/TextArea/OcTextArea.js +1 -1
- package/dist/Form/index.js +1 -1
- package/dist/FormBuilder/OcFormBuilder.js +1 -1
- package/dist/{OcAccountSetupProgress-B20EcCLz.js → OcAccountSetupProgress-CUEk_I0d.js} +1 -1
- package/dist/{OcComplexCalendar-DBjXvjBD.js → OcComplexCalendar-G7ath5xu.js} +1 -1
- package/dist/{OcComplexDatePicker-CO2dlua3.js → OcComplexDatePicker-C1q9JceR.js} +1 -1
- package/dist/{OcCropper-CTDUS0Yy.js → OcCropper-CkGNup0e.js} +1 -1
- package/dist/OcDataTable-CR5HHnYI.js +586 -0
- package/dist/{OcDraggableList-DiwgHfkZ.js → OcDraggableList-bZDagsrE.js} +1 -1
- package/dist/{OcEmojiPicker-t5jyyfGN.js → OcEmojiPicker-DFw0HHxu.js} +1 -1
- package/dist/{OcFilterForm-BLQrLw79.js → OcFilterForm-BEqvwKoc.js} +1 -1
- package/dist/{OcFilterSearch-h4LznWtx.js → OcFilterSearch-ClhQrFuE.js} +7 -7
- package/dist/{OcFilterSearchFor-BQuPGomG.js → OcFilterSearchFor-B6Tk8SMQ.js} +1 -1
- package/dist/{OcModalCropper-D3RcXQtQ.js → OcModalCropper-BHb1-jAs.js} +2 -2
- package/dist/{OcTimePicker-cXD7e4cz.js → OcTimePicker-BpPm2EFl.js} +1 -1
- package/dist/Overlay/ConfirmationModal/OcConfirmationModal.js +1 -1
- package/dist/Overlay/CopyTooltip/OcCopyTooltip.js +1 -1
- package/dist/Overlay/Dropdown/OcDropdown.js +1 -1
- package/dist/Overlay/Modal/OcModal.js +1 -1
- package/dist/Overlay/SupportMenu/OcSupportMenu.js +1 -1
- package/dist/Overlay/Tooltip/OcTooltip.js +1 -1
- package/dist/Overlay/Whitelist/OcWhiteList.js +1 -1
- package/dist/{SubPlanCard-CSirRc5L.js → SubPlanCard-DBlFPlzp.js} +1 -1
- package/dist/{ThumbnailSection-Bi-ZgZ8x.js → ThumbnailSection-BY3ZLH_P.js} +1 -1
- package/dist/{ThumbnailTheme-BY_rMzG1.js → ThumbnailTheme-CZTg77cc.js} +1 -1
- package/dist/{index-QdkKm3wf.js → index-DmWvHxcZ.js} +8 -8
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/OcDataTable-DWtVE4qU.js +0 -586
@@ -0,0 +1,586 @@
|
|
1
|
+
import { ref as M, onMounted as Ve, openBlock as d, createBlock as q, unref as k, withCtx as A, createElementVNode as G, createElementBlock as O, createVNode as R, mergeProps as be, Fragment as ae, renderList as se, normalizeClass as oe, toDisplayString as ke, createCommentVNode as S, computed as B, createSlots as Re, renderSlot as T, normalizeProps as he, guardReactiveProps as xe } from "vue";
|
2
|
+
import { ay as Oe, C as Je, B as Fe, K as ze, Z as He, aJ as Ze, aK as Ge, aL as We, H as Xe, I as we, j as _e } from "./index-DmWvHxcZ.js";
|
3
|
+
import te from "dayjs";
|
4
|
+
import { VueDraggableNext as Se } from "vue-draggable-next";
|
5
|
+
import { getFromLocalStorage as ue, formatHeadersFromLocalStorage as je, formatHeadersToLocalStorage as el, setInLocalStorage as $e } from "./DataTable/utils/editColumnsUtils.js";
|
6
|
+
import { _ as Ee } from "./OcIcon-CSpRxnwd.js";
|
7
|
+
const ll = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, al = {
|
8
|
+
key: 0,
|
9
|
+
class: "gap-y-2 flex flex-col border-b pb-3 border-oc-gray-200"
|
10
|
+
}, tl = { class: "gap-y-2 flex flex-col" }, sl = {
|
11
|
+
key: 0,
|
12
|
+
class: "flex items-center bg-white justify-between h-[26px]"
|
13
|
+
}, ol = { class: "flex items-center w-full gap-x-3" }, ul = { class: "truncate w-full max-w-[160px]" }, rl = {
|
14
|
+
__name: "ColumnEdit",
|
15
|
+
props: {
|
16
|
+
options: {
|
17
|
+
type: Object,
|
18
|
+
default: () => ({})
|
19
|
+
},
|
20
|
+
headers: {
|
21
|
+
type: Array,
|
22
|
+
default: () => []
|
23
|
+
},
|
24
|
+
localKey: {
|
25
|
+
type: String,
|
26
|
+
default: ""
|
27
|
+
}
|
28
|
+
},
|
29
|
+
emits: ["change-active", "onMoved", "update-order"],
|
30
|
+
setup(K, { emit: ee }) {
|
31
|
+
const c = ee, C = K, f = M([]), y = M([]), H = M(!1), F = (a = !1) => {
|
32
|
+
y.value = y.value.map((g) => ({
|
33
|
+
...g,
|
34
|
+
isActive: !0
|
35
|
+
})), c("update-order", {
|
36
|
+
fixedHeaders: y.value,
|
37
|
+
activeHeaders: f.value,
|
38
|
+
isOnMount: a
|
39
|
+
});
|
40
|
+
}, W = {
|
41
|
+
handle: ".drag-el",
|
42
|
+
filter: ".is-disabled",
|
43
|
+
group: "headers",
|
44
|
+
animation: 500,
|
45
|
+
forceFallback: !1,
|
46
|
+
move: (a) => a.to.dataset.activeHeaders ? !0 : !!a.draggedContext.futureIndex,
|
47
|
+
"onUpdate:modelValue": () => F()
|
48
|
+
};
|
49
|
+
return Ve(() => {
|
50
|
+
const a = ue(C.localKey), { fixed: g, active: b } = je(a, C.headers, C.localKey);
|
51
|
+
y.value = g || C.headers.slice(0, 1), f.value = b || C.headers.slice(1).map(($) => {
|
52
|
+
var V, Q, N;
|
53
|
+
return {
|
54
|
+
...$,
|
55
|
+
isActive: ((N = (Q = (V = C.options) == null ? void 0 : V.active) == null ? void 0 : Q.find((X) => X.key === $.key)) == null ? void 0 : N.isActive) ?? !0
|
56
|
+
};
|
57
|
+
}), F(!0);
|
58
|
+
}), (a, g) => (d(), q(k(Oe), {
|
59
|
+
modelValue: H.value,
|
60
|
+
"onUpdate:modelValue": g[3] || (g[3] = (b) => H.value = b),
|
61
|
+
class: "h-[36px]",
|
62
|
+
"is-attach-to-body": ""
|
63
|
+
}, {
|
64
|
+
menu: A(() => [
|
65
|
+
G("div", ll, [
|
66
|
+
y.value.length ? (d(), O("div", al, [
|
67
|
+
g[4] || (g[4] = G("span", { class: "text-oc-text-400 font-medium" }, "Fixed columns", -1)),
|
68
|
+
R(k(Se), be({
|
69
|
+
key: "key",
|
70
|
+
modelValue: y.value,
|
71
|
+
"onUpdate:modelValue": g[0] || (g[0] = (b) => y.value = b)
|
72
|
+
}, W), {
|
73
|
+
default: A(() => [
|
74
|
+
(d(!0), O(ae, null, se(y.value, (b, $) => (d(), O("div", {
|
75
|
+
key: b.key,
|
76
|
+
class: oe(["flex items-center justify-between h-[26px]", $ ? "" : "is-disabled"])
|
77
|
+
}, [
|
78
|
+
G("span", null, ke(b.label), 1),
|
79
|
+
$ ? (d(), q(k(Ee), {
|
80
|
+
key: 0,
|
81
|
+
width: "18",
|
82
|
+
height: "18",
|
83
|
+
class: "text-oc-text-400 drag-el cursor-move",
|
84
|
+
name: "draggable"
|
85
|
+
})) : S("", !0)
|
86
|
+
], 2))), 128))
|
87
|
+
]),
|
88
|
+
_: 1
|
89
|
+
}, 16, ["modelValue"])
|
90
|
+
])) : S("", !0),
|
91
|
+
G("div", tl, [
|
92
|
+
g[5] || (g[5] = G("span", { class: "text-oc-text-400 font-medium" }, "Active columns", -1)),
|
93
|
+
R(k(Se), be({
|
94
|
+
key: "key",
|
95
|
+
modelValue: f.value,
|
96
|
+
"onUpdate:modelValue": g[2] || (g[2] = (b) => f.value = b)
|
97
|
+
}, W, { "data-active-headers": "true" }), {
|
98
|
+
default: A(() => [
|
99
|
+
(d(!0), O(ae, null, se(f.value, (b) => (d(), O(ae, {
|
100
|
+
key: b.key
|
101
|
+
}, [
|
102
|
+
b.key !== "actions" ? (d(), O("div", sl, [
|
103
|
+
G("div", ol, [
|
104
|
+
R(k(Je), {
|
105
|
+
modelValue: b.isActive,
|
106
|
+
"onUpdate:modelValue": [
|
107
|
+
($) => b.isActive = $,
|
108
|
+
g[1] || (g[1] = ($) => F())
|
109
|
+
],
|
110
|
+
class: "!w-fit"
|
111
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
112
|
+
G("div", ul, ke(b.label), 1)
|
113
|
+
]),
|
114
|
+
f.value.length > 1 ? (d(), q(k(Ee), {
|
115
|
+
key: 0,
|
116
|
+
width: "18",
|
117
|
+
height: "18",
|
118
|
+
class: "text-oc-text-400 drag-el cursor-move",
|
119
|
+
name: "draggable"
|
120
|
+
})) : S("", !0)
|
121
|
+
])) : S("", !0)
|
122
|
+
], 64))), 128))
|
123
|
+
]),
|
124
|
+
_: 1
|
125
|
+
}, 16, ["modelValue"])
|
126
|
+
])
|
127
|
+
])
|
128
|
+
]),
|
129
|
+
default: A(() => [
|
130
|
+
R(k(Fe), {
|
131
|
+
label: "Edit Column",
|
132
|
+
"left-icon": "setting",
|
133
|
+
variant: "secondary"
|
134
|
+
})
|
135
|
+
]),
|
136
|
+
_: 1
|
137
|
+
}, 8, ["modelValue"]));
|
138
|
+
}
|
139
|
+
}, il = { class: "relative flex flex-col gap-9" }, nl = {
|
140
|
+
key: 0,
|
141
|
+
class: "flex items-center px-4 min-h-[52px]"
|
142
|
+
}, dl = {
|
143
|
+
key: 0,
|
144
|
+
class: "absolute flex items-center gap-5 left-5"
|
145
|
+
}, vl = {
|
146
|
+
key: 1,
|
147
|
+
class: "absolute flex gap-3 left-5"
|
148
|
+
}, cl = {
|
149
|
+
key: 1,
|
150
|
+
class: "flex justify-center w-full gap-5 md:justify-start"
|
151
|
+
}, fl = {
|
152
|
+
key: 2,
|
153
|
+
class: "items-center hidden md:flex"
|
154
|
+
}, hl = {
|
155
|
+
__name: "OcDataTable",
|
156
|
+
props: {
|
157
|
+
isLoading: Boolean,
|
158
|
+
id: {
|
159
|
+
type: String,
|
160
|
+
required: !0
|
161
|
+
},
|
162
|
+
options: {
|
163
|
+
type: Object,
|
164
|
+
required: !0
|
165
|
+
},
|
166
|
+
filter: {
|
167
|
+
type: Object,
|
168
|
+
required: !0
|
169
|
+
},
|
170
|
+
selected: {
|
171
|
+
type: Array,
|
172
|
+
required: !1
|
173
|
+
},
|
174
|
+
rowClass: String,
|
175
|
+
rowKey: {
|
176
|
+
type: String,
|
177
|
+
Function,
|
178
|
+
default: "id"
|
179
|
+
},
|
180
|
+
rowLink: String
|
181
|
+
},
|
182
|
+
emits: {
|
183
|
+
"update:selected": [],
|
184
|
+
"update:filter": [],
|
185
|
+
"click:row": [],
|
186
|
+
"filter-fields-changed": [],
|
187
|
+
"filter-removed": [],
|
188
|
+
"search-query-changed": [],
|
189
|
+
"hover:cell": [],
|
190
|
+
"columns-changed": []
|
191
|
+
},
|
192
|
+
setup(K, { emit: ee }) {
|
193
|
+
var ne, de, ve, ce, fe, pe, me, ye, ge;
|
194
|
+
const c = K, C = ee, f = B(() => {
|
195
|
+
var l;
|
196
|
+
return (l = c.options) == null ? void 0 : l.pagination;
|
197
|
+
}), y = B(() => {
|
198
|
+
var l;
|
199
|
+
return (l = c.options) == null ? void 0 : l.cursor;
|
200
|
+
}), H = M(), F = B(() => {
|
201
|
+
var l;
|
202
|
+
return (l = c.options) == null ? void 0 : l.tableOptions;
|
203
|
+
}), W = B(() => {
|
204
|
+
var l;
|
205
|
+
return {
|
206
|
+
...F.value,
|
207
|
+
headers: H.value ? H.value.map((e) => {
|
208
|
+
var u, r;
|
209
|
+
return e.class = ((r = (u = F.value) == null ? void 0 : u.headers.find((i) => i.key === e.key)) == null ? void 0 : r.class) ?? "", e;
|
210
|
+
}).filter((e) => ie(e.key)) : (l = F.value) == null ? void 0 : l.headers.filter((e) => ie(e.key))
|
211
|
+
};
|
212
|
+
}), a = B(() => {
|
213
|
+
var l;
|
214
|
+
return (l = c.options) == null ? void 0 : l.filterOptions;
|
215
|
+
}), g = B(() => {
|
216
|
+
var l;
|
217
|
+
return (l = c.options) == null ? void 0 : l.hidePerPageDropdown;
|
218
|
+
}), b = B(() => {
|
219
|
+
var l;
|
220
|
+
return ((l = f.value) == null ? void 0 : l.last_page) === 1;
|
221
|
+
}), $ = M(!1), V = M(c.filter[(de = (ne = a.value) == null ? void 0 : ne.tabs) == null ? void 0 : de.key]), Q = M(c.filter.page), N = M(
|
222
|
+
(ce = (ve = a.value) == null ? void 0 : ve.per_page) != null && ce.key ? c.filter[(pe = (fe = a.value) == null ? void 0 : fe.per_page) == null ? void 0 : pe.key] : c.filter.per_page
|
223
|
+
), X = ((ge = c.filter[(ye = (me = a.value) == null ? void 0 : me.search) == null ? void 0 : ye.key]) == null ? void 0 : ge.trim()) ?? "", J = M(X ? X.split(",") : []), re = M(!1), Ae = B(
|
224
|
+
() => {
|
225
|
+
var l, e;
|
226
|
+
return (e = (l = c.options) == null ? void 0 : l.perPageOptions) == null ? void 0 : e.map(
|
227
|
+
(u) => ({
|
228
|
+
label: `${u}`,
|
229
|
+
value: u
|
230
|
+
})
|
231
|
+
);
|
232
|
+
}
|
233
|
+
), Ce = B(() => {
|
234
|
+
let l = [
|
235
|
+
{
|
236
|
+
label: "10",
|
237
|
+
value: 10
|
238
|
+
},
|
239
|
+
{
|
240
|
+
label: "15",
|
241
|
+
value: 15
|
242
|
+
},
|
243
|
+
{
|
244
|
+
label: "20",
|
245
|
+
value: 20
|
246
|
+
},
|
247
|
+
{
|
248
|
+
label: "25",
|
249
|
+
value: 25
|
250
|
+
},
|
251
|
+
{
|
252
|
+
label: "40",
|
253
|
+
value: 40
|
254
|
+
},
|
255
|
+
{
|
256
|
+
label: "50",
|
257
|
+
value: 50
|
258
|
+
},
|
259
|
+
{
|
260
|
+
label: "75",
|
261
|
+
value: 75
|
262
|
+
},
|
263
|
+
{
|
264
|
+
label: "99",
|
265
|
+
value: 99
|
266
|
+
}
|
267
|
+
], e = Ae.value ?? l;
|
268
|
+
if (f.value) {
|
269
|
+
const u = f.value.total < 100 ? f.value.total : 100;
|
270
|
+
u > 10 && (e = e.filter((r) => r.value <= u));
|
271
|
+
}
|
272
|
+
return [...new Set(e)];
|
273
|
+
}), De = B(() => {
|
274
|
+
var l;
|
275
|
+
return ((l = c.selected) == null ? void 0 : l.length) > 0;
|
276
|
+
}), Ke = (l) => {
|
277
|
+
!l.trim() || J.value.includes(l) || (J.value = [l], D(), C("search-query-changed", l));
|
278
|
+
}, Le = (l) => {
|
279
|
+
J.value = J.value.filter((e) => e !== l), D();
|
280
|
+
}, Z = c.filter;
|
281
|
+
!Z && f ? Z.page = 1 : !Z && y && (Z.cursor = "");
|
282
|
+
const t = M(Z), Pe = () => {
|
283
|
+
var e, u, r, i, v, s, p, m, w, h, j, L, P, U;
|
284
|
+
J.value = [], V.value = "";
|
285
|
+
const l = {};
|
286
|
+
a.value ? Z.page = 1 : Z.cursor = "", (u = (e = a.value) == null ? void 0 : e.per_page) != null && u.key ? l[(i = (r = a.value) == null ? void 0 : r.per_page) == null ? void 0 : i.key] = N.value : l.per_page = N.value, (s = (v = a.value) == null ? void 0 : v.tabs) != null && s.key ? l[(m = (p = a.value) == null ? void 0 : p.tabs) == null ? void 0 : m.key] = V.value : l.tabs = V.value, (h = (w = a.value) == null ? void 0 : w.columnEdit) != null && h.key && (l[(L = (j = a.value) == null ? void 0 : j.columnEdit) == null ? void 0 : L.key] = t.value[(U = (P = a.value) == null ? void 0 : P.columnEdit) == null ? void 0 : U.key]), t.value = l, D();
|
287
|
+
}, Ue = () => {
|
288
|
+
D(null, Q.value);
|
289
|
+
}, Ye = () => {
|
290
|
+
c.id && $e(c.id, JSON.stringify(t.value));
|
291
|
+
}, Be = () => c.id ? ue(c.id) : null, D = (l = null, e = !1, u = "", r = !1) => {
|
292
|
+
var v, s, p, m, w, h, j, L, P, U, z, Y;
|
293
|
+
f.value && !e && (Q.value = 1), f.value ? t.value.page = Q.value : t.value.cursor = u, (v = a.value) != null && v.per_page ? t.value[a.value.per_page.key] = N.value : t.value.per_page = N.value, (s = a.value) != null && s.tabs && (t.value[a.value.tabs.key] = V.value), (p = a.value) != null && p.search && ((w = (m = a.value.search) == null ? void 0 : m.options) != null && w.length ? (Object.keys(t.value).forEach((o) => {
|
294
|
+
var x;
|
295
|
+
(x = a.value.search.options) != null && x.map((E) => E.value).includes(o) && delete t.value[o];
|
296
|
+
}), t.value[((h = t.value) == null ? void 0 : h.selectedSearchOption) || ((L = (j = a.value.search) == null ? void 0 : j.options[0]) == null ? void 0 : L.value) || a.value.search.key] = J.value.join()) : t.value[a.value.search.key] = J.value.join()), l && ($.value = !1, t.value = { ...t.value, ...l }, Object.keys(t.value).forEach((o) => {
|
297
|
+
Array.isArray(t.value[o]) && t.value[o].length === 0 && delete t.value[o];
|
298
|
+
}));
|
299
|
+
let i = (U = (P = a.value) == null ? void 0 : P.tabs) == null ? void 0 : U.key;
|
300
|
+
if (i && V.value !== t.value[i]) {
|
301
|
+
const o = (Y = (z = a.value.tabs) == null ? void 0 : z.options) == null ? void 0 : Y.find(
|
302
|
+
(x) => {
|
303
|
+
var E, n;
|
304
|
+
return ((E = x.value) == null ? void 0 : E.toString()) === ((n = t.value[i]) == null ? void 0 : n.toString());
|
305
|
+
}
|
306
|
+
);
|
307
|
+
if (o != null && o.value)
|
308
|
+
return V.value = o.value, D(), !1;
|
309
|
+
}
|
310
|
+
Ye(), C("update:filter", t.value, r);
|
311
|
+
}, Me = (l, e) => {
|
312
|
+
(e === a.value.tabs.key || e === "tabs") && (V.value = ""), D(l), C("filter-removed", e);
|
313
|
+
}, Ne = (l) => {
|
314
|
+
let e = [];
|
315
|
+
return l.forEach((u) => {
|
316
|
+
e.push(u.key);
|
317
|
+
}), e;
|
318
|
+
}, Ie = B(() => {
|
319
|
+
if (t.value) {
|
320
|
+
let l = [];
|
321
|
+
return Object.keys(t.value).forEach((e) => {
|
322
|
+
var v, s, p, m, w, h, j, L, P, U, z;
|
323
|
+
let u = (s = (v = a.value) == null ? void 0 : v.tabs) == null ? void 0 : s.key;
|
324
|
+
const r = (m = (p = a.value) == null ? void 0 : p.search) == null ? void 0 : m.key, i = ((h = (w = a.value) == null ? void 0 : w.per_page) == null ? void 0 : h.key) ?? "per_page";
|
325
|
+
if ((j = a.value.form) == null || j.find((Y) => {
|
326
|
+
Y.name === u && (u = "");
|
327
|
+
}), e !== "page" && e !== "cursor" && e !== i && e !== u && e !== r) {
|
328
|
+
let Y = null, o = (L = a.value.form) == null ? void 0 : L.find((E) => {
|
329
|
+
if (typeof E.name == "object") {
|
330
|
+
let n = !1;
|
331
|
+
return E.name.forEach((I) => {
|
332
|
+
I.key === e && (n = !0, Y = Ne(E.name));
|
333
|
+
}), n;
|
334
|
+
} else
|
335
|
+
return E.name === e;
|
336
|
+
}), x = "";
|
337
|
+
if (o && t.value[e]) {
|
338
|
+
if (typeof o.name == "object" ? (P = o.name) == null || P.forEach((n) => {
|
339
|
+
x && (x += " - "), x += t.value[n.key];
|
340
|
+
}) : x = t.value[e], o.props.options && (x = (o.props.multiple ? t.value[e] : [t.value[e]]).map(
|
341
|
+
(I) => {
|
342
|
+
var _;
|
343
|
+
return (_ = o.props.options.find(({ value: le }) => le === I)) == null ? void 0 : _.label;
|
344
|
+
}
|
345
|
+
).join(", ")), o.type === "RangeInput" && Array.isArray(t.value[e]) && (x = t.value[e][0].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + " - " + t.value[e][1].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")), o.type === "DatePicker")
|
346
|
+
if (((U = o == null ? void 0 : o.props) == null ? void 0 : U.type) === "range" && o.name && o.name[1]) {
|
347
|
+
const n = te(t.value[o.name[0].key]).format("MM/DD/YYYY"), I = te(t.value[o.name[1].key]).format("MM/DD/YYYY");
|
348
|
+
x = n === I ? n : n + " - " + I;
|
349
|
+
} else x = te(t.value[o.name]).format("MM/DD/YYYY");
|
350
|
+
let E = `${(z = o == null ? void 0 : o.props) == null ? void 0 : z.label} : ${x}`;
|
351
|
+
o && o.name && typeof o.name == "object" && l.find((I) => I.name === Y[0]) && (E = ""), l.push({
|
352
|
+
label: E,
|
353
|
+
name: e,
|
354
|
+
multiNames: Y
|
355
|
+
});
|
356
|
+
}
|
357
|
+
}
|
358
|
+
}), l;
|
359
|
+
}
|
360
|
+
return [];
|
361
|
+
}), ie = (l) => {
|
362
|
+
var e, u, r, i, v, s;
|
363
|
+
return ((s = (v = (i = (r = t.value) == null ? void 0 : r[(u = (e = a.value) == null ? void 0 : e.columnEdit) == null ? void 0 : u.key]) == null ? void 0 : i.active) == null ? void 0 : v.find((p) => p.key === l)) == null ? void 0 : s.isActive) ?? !0;
|
364
|
+
}, Te = ({ fixedHeaders: l, activeHeaders: e, isOnMount: u }) => {
|
365
|
+
var r, i, v, s, p, m, w, h;
|
366
|
+
if (t.value[(i = (r = a.value) == null ? void 0 : r.columnEdit) == null ? void 0 : i.key] || (t.value[(s = (v = a.value) == null ? void 0 : v.columnEdit) == null ? void 0 : s.key] = {}), t.value[(m = (p = a.value) == null ? void 0 : p.columnEdit) == null ? void 0 : m.key].fixed = l, t.value[(h = (w = a.value) == null ? void 0 : w.columnEdit) == null ? void 0 : h.key].active = e, H.value = [...l, ...e], !u) {
|
367
|
+
const j = el(l, e);
|
368
|
+
$e(a.value.columnEdit.localStorageKey, j);
|
369
|
+
}
|
370
|
+
C("columns-changed", e);
|
371
|
+
}, qe = () => {
|
372
|
+
var l, e, u, r, i, v;
|
373
|
+
if ((e = (l = a.value) == null ? void 0 : l.columnEdit) != null && e.localStorageKey) {
|
374
|
+
const s = ue(a.value.columnEdit.localStorageKey);
|
375
|
+
if (s) {
|
376
|
+
const { fixed: p, active: m } = je(
|
377
|
+
s,
|
378
|
+
F.value.headers,
|
379
|
+
a.value.columnEdit.localStorageKey
|
380
|
+
);
|
381
|
+
t.value[(r = (u = a.value) == null ? void 0 : u.columnEdit) == null ? void 0 : r.key].fixed = p, t.value[(v = (i = a.value) == null ? void 0 : i.columnEdit) == null ? void 0 : v.key].active = m, H.value = [...p, ...m];
|
382
|
+
}
|
383
|
+
}
|
384
|
+
}, Qe = (l) => {
|
385
|
+
t.value.selectedSearchOption = l;
|
386
|
+
};
|
387
|
+
return Ve(() => {
|
388
|
+
var e, u, r, i, v;
|
389
|
+
qe();
|
390
|
+
const l = Be();
|
391
|
+
l && (t.value = JSON.parse(l), V.value = V.value || ((e = t.value) == null ? void 0 : e.tabs) || ((i = t.value) == null ? void 0 : i[(r = (u = a.value) == null ? void 0 : u.tabs) == null ? void 0 : r.key]), Q.value = ((v = t.value) == null ? void 0 : v.page) || 1, D(null, !0, t.value.cursor, !0));
|
392
|
+
}), (l, e) => {
|
393
|
+
var u, r, i, v;
|
394
|
+
return d(), O("div", il, [
|
395
|
+
F.value ? (d(), q(k(ze), {
|
396
|
+
key: 0,
|
397
|
+
selected: K.selected,
|
398
|
+
"row-key": K.rowKey,
|
399
|
+
options: W.value,
|
400
|
+
"is-loading": K.isLoading,
|
401
|
+
"loading-rows": N.value,
|
402
|
+
"row-class": K.rowClass,
|
403
|
+
"row-link": K.rowLink,
|
404
|
+
"is-sticky": F.value.isSticky,
|
405
|
+
"is-borderless": F.value.isBorderless,
|
406
|
+
"onUpdate:selected": e[7] || (e[7] = (s) => l.$emit("update:selected", s)),
|
407
|
+
"onClick:row": e[8] || (e[8] = (s) => l.$emit("click:row", s)),
|
408
|
+
"onHover:cell": e[9] || (e[9] = (s) => l.$emit("hover:cell", s))
|
409
|
+
}, Re({
|
410
|
+
after: A(() => [
|
411
|
+
T(l.$slots, "after")
|
412
|
+
]),
|
413
|
+
empty: A(() => [
|
414
|
+
T(l.$slots, "empty")
|
415
|
+
]),
|
416
|
+
"table-header": A((s) => [
|
417
|
+
T(l.$slots, "table-header", he(xe(s)))
|
418
|
+
]),
|
419
|
+
"table-body": A((s) => [
|
420
|
+
T(l.$slots, "table-body", he(xe(s)))
|
421
|
+
]),
|
422
|
+
_: 2
|
423
|
+
}, [
|
424
|
+
l.$slots.before || (u = a.value) != null && u.search || (r = a.value) != null && r.form || (i = a.value) != null && i.tabs ? {
|
425
|
+
name: "before",
|
426
|
+
fn: A(() => {
|
427
|
+
var s, p, m, w;
|
428
|
+
return [
|
429
|
+
T(l.$slots, "before"),
|
430
|
+
(s = a.value) != null && s.search || (p = a.value) != null && p.form || (m = a.value) != null && m.tabs ? (d(), O("div", nl, [
|
431
|
+
De.value ? (d(), O("div", dl, [
|
432
|
+
T(l.$slots, "bulk-actions", { selectedRows: K.selected })
|
433
|
+
])) : (d(), O("div", vl, [
|
434
|
+
(w = a.value) != null && w.tabs ? (d(), q(k(He), {
|
435
|
+
key: 0,
|
436
|
+
modelValue: V.value,
|
437
|
+
"onUpdate:modelValue": [
|
438
|
+
e[0] || (e[0] = (h) => V.value = h),
|
439
|
+
e[1] || (e[1] = (h) => D(null))
|
440
|
+
],
|
441
|
+
"is-disabled": K.isLoading,
|
442
|
+
tabs: a.value.tabs.options,
|
443
|
+
variant: "pills"
|
444
|
+
}, null, 8, ["modelValue", "is-disabled", "tabs"])) : S("", !0)
|
445
|
+
])),
|
446
|
+
T(l.$slots, "filter-options", {}, () => {
|
447
|
+
var h, j, L, P, U, z, Y, o, x, E;
|
448
|
+
return [
|
449
|
+
(h = a.value) != null && h.search || (j = a.value) != null && j.form || (L = a.value) != null && L.columnEdit ? (d(), O("div", {
|
450
|
+
key: 0,
|
451
|
+
class: oe([
|
452
|
+
"flex gap-3 absolute ml-auto bg-oc-bg-light right-4 max-w-[calc(100%-24px)]",
|
453
|
+
a.value ? re.value ? "md:w-fit w-full" : "" : "w-full justify-end"
|
454
|
+
])
|
455
|
+
}, [
|
456
|
+
(P = a.value) != null && P.search ? (d(), q(k(Ze), {
|
457
|
+
key: 0,
|
458
|
+
"is-search-only": !a.value.tabs || a.value.isSearchOnly,
|
459
|
+
"search-options": ((U = a.value.search) == null ? void 0 : U.options) ?? [],
|
460
|
+
"selected-option": (((z = t.value) == null ? void 0 : z.selectedSearchOption) || ((o = (Y = a.value.search) == null ? void 0 : Y.options[0]) == null ? void 0 : o.value)) ?? "keywords",
|
461
|
+
onAddQuery: Ke,
|
462
|
+
onToggle: e[2] || (e[2] = (n) => re.value = n),
|
463
|
+
onChangeSearchKey: Qe
|
464
|
+
}, null, 8, ["is-search-only", "search-options", "selected-option"])) : S("", !0),
|
465
|
+
(x = a.value) != null && x.form ? (d(), q(k(Oe), {
|
466
|
+
key: 1,
|
467
|
+
modelValue: $.value,
|
468
|
+
"onUpdate:modelValue": e[6] || (e[6] = (n) => $.value = n),
|
469
|
+
distance: 9,
|
470
|
+
placement: "bottom-end",
|
471
|
+
"is-attach-to-body": ""
|
472
|
+
}, {
|
473
|
+
menu: A(() => [
|
474
|
+
$.value ? (d(), q(k(Ge), {
|
475
|
+
key: 0,
|
476
|
+
id: K.id,
|
477
|
+
"json-form": a.value.form ?? [],
|
478
|
+
grid: a.value.grid ?? null,
|
479
|
+
values: c.filter,
|
480
|
+
actions: a.value.actions,
|
481
|
+
onApplyFilter: e[3] || (e[3] = (n) => D(n)),
|
482
|
+
onFilterFieldsChanged: e[4] || (e[4] = (n) => C("filter-fields-changed", n)),
|
483
|
+
onCancel: e[5] || (e[5] = (n) => $.value = !1)
|
484
|
+
}, {
|
485
|
+
default: A(({ errors: n, values: I, jsonForm: _, updateForm: le }) => [
|
486
|
+
T(l.$slots, "custom-filter-form", {
|
487
|
+
errors: n,
|
488
|
+
values: I,
|
489
|
+
jsonForm: _,
|
490
|
+
updateFilter: le
|
491
|
+
})
|
492
|
+
]),
|
493
|
+
_: 3
|
494
|
+
}, 8, ["id", "json-form", "grid", "values", "actions"])) : S("", !0)
|
495
|
+
]),
|
496
|
+
default: A(() => [
|
497
|
+
R(k(Fe), {
|
498
|
+
"is-active": $.value,
|
499
|
+
variant: "secondary",
|
500
|
+
"left-icon": "filter"
|
501
|
+
}, null, 8, ["is-active"])
|
502
|
+
]),
|
503
|
+
_: 3
|
504
|
+
}, 8, ["modelValue"])) : S("", !0),
|
505
|
+
a.value.columnEdit ? (d(), q(rl, {
|
506
|
+
key: 2,
|
507
|
+
options: t.value.columnEdit,
|
508
|
+
headers: ((E = F.value) == null ? void 0 : E.headers) || [],
|
509
|
+
"local-key": a.value.columnEdit.localStorageKey,
|
510
|
+
onUpdateOrder: Te
|
511
|
+
}, null, 8, ["options", "headers", "local-key"])) : S("", !0)
|
512
|
+
], 2)) : S("", !0)
|
513
|
+
];
|
514
|
+
})
|
515
|
+
])) : S("", !0),
|
516
|
+
R(k(We), {
|
517
|
+
filters: Ie.value,
|
518
|
+
queries: J.value,
|
519
|
+
class: "border-t border-oc-gray-200",
|
520
|
+
onRemoveQuery: Le,
|
521
|
+
onRemoveAll: Pe,
|
522
|
+
onRemoveFilter: Me
|
523
|
+
}, null, 8, ["filters", "queries"])
|
524
|
+
];
|
525
|
+
}),
|
526
|
+
key: "0"
|
527
|
+
} : void 0,
|
528
|
+
se((v = F.value) == null ? void 0 : v.headers, (s, p) => ({
|
529
|
+
name: s.key,
|
530
|
+
fn: A(({ data: m, item: w }) => [
|
531
|
+
T(l.$slots, s.key, {
|
532
|
+
data: m,
|
533
|
+
item: w
|
534
|
+
})
|
535
|
+
])
|
536
|
+
}))
|
537
|
+
]), 1032, ["selected", "row-key", "options", "is-loading", "loading-rows", "row-class", "row-link", "is-sticky", "is-borderless"])) : S("", !0),
|
538
|
+
T(l.$slots, "before-pagination"),
|
539
|
+
f.value || y.value ? (d(), O("div", {
|
540
|
+
key: 1,
|
541
|
+
class: oe(["flex items-center gap-3", f.value && f.value.last_page === 1 ? "justify-end" : ""])
|
542
|
+
}, [
|
543
|
+
f.value && !b.value ? (d(), q(k(Xe), {
|
544
|
+
key: 0,
|
545
|
+
modelValue: Q.value,
|
546
|
+
"onUpdate:modelValue": [
|
547
|
+
e[10] || (e[10] = (s) => Q.value = s),
|
548
|
+
Ue
|
549
|
+
],
|
550
|
+
class: "justify-center",
|
551
|
+
"max-page": f.value.last_page,
|
552
|
+
strategy: f.value.strategy,
|
553
|
+
"total-visible": "5"
|
554
|
+
}, null, 8, ["modelValue", "max-page", "strategy"])) : S("", !0),
|
555
|
+
y.value ? (d(), O("div", cl, [
|
556
|
+
R(k(we), {
|
557
|
+
disabled: !y.value.prev,
|
558
|
+
onClick: e[11] || (e[11] = (s) => y.value.prev ? D(null, !1, y.value.prev) : null)
|
559
|
+
}, null, 8, ["disabled"]),
|
560
|
+
R(k(we), {
|
561
|
+
disabled: !y.value.next,
|
562
|
+
"is-next": "",
|
563
|
+
onClick: e[12] || (e[12] = (s) => y.value.next ? D(null, !1, y.value.next) : null)
|
564
|
+
}, null, 8, ["disabled"])
|
565
|
+
])) : S("", !0),
|
566
|
+
g.value ? S("", !0) : (d(), O("div", fl, [
|
567
|
+
R(k(_e), {
|
568
|
+
modelValue: N.value,
|
569
|
+
"onUpdate:modelValue": [
|
570
|
+
e[13] || (e[13] = (s) => N.value = s),
|
571
|
+
e[14] || (e[14] = (s) => D(null))
|
572
|
+
],
|
573
|
+
label: "Item per page",
|
574
|
+
"is-inline-label": "",
|
575
|
+
"popper-options": { placement: "auto" },
|
576
|
+
options: Ce.value
|
577
|
+
}, null, 8, ["modelValue", "options"])
|
578
|
+
]))
|
579
|
+
], 2)) : S("", !0)
|
580
|
+
]);
|
581
|
+
};
|
582
|
+
}
|
583
|
+
};
|
584
|
+
export {
|
585
|
+
hl as default
|
586
|
+
};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ref as w, openBlock as n, createBlock as y, unref as l, withCtx as r, createElementBlock as b, Fragment as C, renderList as D, normalizeClass as s, createElementVNode as o, createCommentVNode as m, renderSlot as u, toDisplayString as k, createVNode as f } from "vue";
|
2
|
-
import { aH as $, aD as S, ay as B } from "./index-
|
2
|
+
import { aH as $, aD as S, ay as B } from "./index-DmWvHxcZ.js";
|
3
3
|
import { _ as g } from "./OcIcon-CSpRxnwd.js";
|
4
4
|
const M = ["onMouseleave", "onMouseover", "onClick"], L = { class: "flex justify-evenly w-full" }, N = { class: "flex w-full" }, U = { class: "ml-4 flex w-full" }, E = { class: "flex items-center flex-wrap w-full" }, H = ["href"], O = { class: "min-w-[120px]" }, W = { class: "truncate w-[200px]" }, j = { class: "flex items-center ml-4" }, z = { class: "flex w-full" }, q = {
|
5
5
|
__name: "OcDraggableList",
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ref as m, computed as p, openBlock as s, createElementBlock as l, createVNode as f, unref as c, withCtx as v, createElementVNode as n, Fragment as T, renderList as V, normalizeClass as k, createTextVNode as C, createBlock as N, createCommentVNode as z } from "vue";
|
2
|
-
import { ay as U, d as J, B as b } from "./index-
|
2
|
+
import { ay as U, d as J, B as b } from "./index-DmWvHxcZ.js";
|
3
3
|
import { EMOJI_LIST as a, EMOJI_CATEGORIES as P } from "./Form/EmojiPicker/conts/emoji.js";
|
4
4
|
import { _ as A } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
5
5
|
const F = { class: "flex items-center justify-center rounded bg-oc-bg-dark h-[140px] relative w-full z-50" }, G = ["innerHTML"], R = { class: "p-4 w-[340px]" }, q = { class: "bg-oc-bg-dark p-4 rounded flex items-center justify-center" }, K = ["innerHTML"], Q = { class: "pt-3 pb-4" }, W = ["id", "innerHTML", "onClick"], X = {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ref as r, computed as u, onMounted as B, openBlock as O, createElementBlock as k, renderSlot as $, createElementVNode as f, createVNode as c, unref as i } from "vue";
|
2
|
-
import { u as w, B as m } from "./index-
|
2
|
+
import { u as w, B as m } from "./index-DmWvHxcZ.js";
|
3
3
|
const C = { class: "flex w-[326px] flex-col gap-y-5" }, A = { class: "max-h-[500px] overflow-y-auto p-5" }, E = { class: "flex gap-x-5 px-5 pb-5" }, N = {
|
4
4
|
__name: "OcFilterForm",
|
5
5
|
props: {
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { ref as c, computed as B, openBlock as s, createElementBlock as u, Fragment as
|
2
|
-
import { d as E, ay as F, az as I, B as w } from "./index-
|
1
|
+
import { ref as c, computed as B, openBlock as s, createElementBlock as u, Fragment as x, createElementVNode as i, normalizeClass as O, createVNode as m, unref as r, withKeys as K, createSlots as N, withCtx as v, renderList as Q, createBlock as f, toDisplayString as z, createCommentVNode as S, nextTick as D } from "vue";
|
2
|
+
import { d as E, ay as F, az as I, B as w } from "./index-DmWvHxcZ.js";
|
3
3
|
import { _ as U } from "./OcIcon-CSpRxnwd.js";
|
4
4
|
const j = { class: "flex gap-x-4" }, q = { class: "flex gap-x-2 items-center pl-2 text-oc-text-400 font-medium text-sm" }, A = { class: "p-2 flex flex-col" }, J = {
|
5
5
|
__name: "OcFilterSearch",
|
@@ -17,11 +17,11 @@ const j = { class: "flex gap-x-4" }, q = { class: "flex gap-x-2 items-center pl-
|
|
17
17
|
const h = C, y = t, l = c(!1), o = c(""), d = c(!1), p = c(), V = async () => {
|
18
18
|
l.value = !0, h("toggle", l), await D(), p.value.focus();
|
19
19
|
}, $ = B(() => y.searchOptions.find((n) => n.value === y.selectedOption)), b = (n) => {
|
20
|
-
h("
|
20
|
+
h("change-search-key", n), d.value = !1;
|
21
21
|
};
|
22
22
|
return (n, a) => {
|
23
|
-
var g,
|
24
|
-
return s(), u(
|
23
|
+
var g, k;
|
24
|
+
return s(), u(x, null, [
|
25
25
|
i("div", {
|
26
26
|
class: O(["w-full", l.value || t.isSearchOnly ? "" : "absolute max-w-0 overflow-hidden"])
|
27
27
|
}, [
|
@@ -41,7 +41,7 @@ const j = { class: "flex gap-x-4" }, q = { class: "flex gap-x-2 items-center pl-
|
|
41
41
|
["enter"]
|
42
42
|
))
|
43
43
|
}, N({ _: 2 }, [
|
44
|
-
(
|
44
|
+
(k = t.searchOptions) != null && k.length ? {
|
45
45
|
name: "trailing",
|
46
46
|
fn: v(() => [
|
47
47
|
m(r(F), {
|
@@ -52,7 +52,7 @@ const j = { class: "flex gap-x-4" }, q = { class: "flex gap-x-2 items-center pl-
|
|
52
52
|
}, {
|
53
53
|
menu: v(() => [
|
54
54
|
i("div", A, [
|
55
|
-
(s(!0), u(
|
55
|
+
(s(!0), u(x, null, Q(t.searchOptions, (e) => (s(), f(r(I), {
|
56
56
|
key: e.value,
|
57
57
|
class: "text-sm",
|
58
58
|
text: e.label,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { computed as k, openBlock as a, createBlock as m, unref as n, withCtx as x, createElementVNode as f, createElementBlock as v, Fragment as b, renderList as p, createVNode as F, createCommentVNode as $ } from "vue";
|
2
|
-
import { M as y, at as i } from "./index-
|
2
|
+
import { M as y, at as i } from "./index-DmWvHxcZ.js";
|
3
3
|
const C = { class: "flex gap-1 items-center normal-case flex-wrap" }, R = {
|
4
4
|
__name: "OcFilterSearchFor",
|
5
5
|
props: {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ref as e, openBlock as v, createBlock as d, unref as l, withCtx as x, createVNode as O } from "vue";
|
2
|
-
import { aA as b } from "./index-
|
3
|
-
import k from "./OcCropper-
|
2
|
+
import { aA as b } from "./index-DmWvHxcZ.js";
|
3
|
+
import k from "./OcCropper-CkGNup0e.js";
|
4
4
|
const h = {
|
5
5
|
__name: "OcModalCropper",
|
6
6
|
props: {
|