@orchidui/core 1.8.1-113 → 1.8.1-115
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/DataTable/useDataTable.js +49 -49
- 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/TopBanner/OcTopBanner.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-BHZKRi83.js → OcAccountSetupProgress-DdwbNh_j.js} +1 -1
- package/dist/{OcComplexCalendar-DpEmr9kN.js → OcComplexCalendar-NB-nixtt.js} +1 -1
- package/dist/{OcComplexDatePicker-BaA7wDaR.js → OcComplexDatePicker-CCZNKVjC.js} +1 -1
- package/dist/{OcCropper-DI9cu89P.js → OcCropper-D7GFhoWz.js} +1 -1
- package/dist/OcDataTable-YUm4ppk9.js +532 -0
- package/dist/{OcDraggableList-D6Q9aZI0.js → OcDraggableList-BTxRKiVF.js} +1 -1
- package/dist/{OcEmojiPicker-B9K3pg5W.js → OcEmojiPicker-D6nfctf9.js} +1 -1
- package/dist/{OcFilterForm-B4ASDeTk.js → OcFilterForm-MWslQjtt.js} +1 -1
- package/dist/{OcFilterSearch-SHFmbTuq.js → OcFilterSearch-BlMXCzOr.js} +1 -1
- package/dist/{OcFilterSearchFor-B1so0yiO.js → OcFilterSearchFor-C9-lxT4W.js} +1 -1
- package/dist/{OcModalCropper-C5wArpL9.js → OcModalCropper-DKhsnxRF.js} +2 -2
- package/dist/{OcTimePicker-BFCYWz49.js → OcTimePicker-DDf4hJM7.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-CP56AtvN.js → SubPlanCard-CvHxRfDv.js} +1 -1
- package/dist/{ThumbnailSection-Ba03sZNp.js → ThumbnailSection-SmaP6Acx.js} +1 -1
- package/dist/{ThumbnailTheme-ChifSN57.js → ThumbnailTheme-UBdrnl_Z.js} +1 -1
- package/dist/{index-SvoT4d-2.js → index-BtrJ8Wk_.js} +8 -8
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/OcDataTable-DB7Q2Frw.js +0 -535
@@ -0,0 +1,532 @@
|
|
1
|
+
import { ref as V, onMounted as je, createBlock as j, openBlock as i, unref as r, withCtx as x, createVNode as T, createElementVNode as q, createElementBlock as k, createCommentVNode as y, mergeProps as Oe, Fragment as se, renderList as re, normalizeClass as ie, toDisplayString as Ve, computed as O, watch as ue, renderSlot as P, createSlots as el, normalizeProps as Ee, guardReactiveProps as Ce } from "vue";
|
2
|
+
import { az as Ae, B as Ke, C as ll, K as al, Z as tl, aK as ol, aL as sl, aM as ul, H as rl, I as De, j as il } from "./index-BtrJ8Wk_.js";
|
3
|
+
import { VueDraggableNext as Le } from "vue-draggable-next";
|
4
|
+
import { getFromLocalStorage as Te, formatHeadersFromLocalStorage as Ue, formatHeadersToLocalStorage as nl, setInLocalStorage as dl } from "./DataTable/utils/editColumnsUtils.js";
|
5
|
+
import { _ as Pe } from "./OcIcon-CBf___w1.js";
|
6
|
+
import { formatFilterDisplay as vl, clearAllFilters as cl } from "./DataTable/utils/filterUtils.js";
|
7
|
+
import { formatCustomItemsPerPageOptions as ml, getItemsPerPageOptions as pl } from "./DataTable/utils/paginationUtils.js";
|
8
|
+
import { getFilterFromLocalStorage as fl, saveFilterToLocalStorage as gl } from "./DataTable/utils/storageUtils.js";
|
9
|
+
import { useDataTable as yl } from "./DataTable/useDataTable.js";
|
10
|
+
import "dayjs";
|
11
|
+
const bl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, kl = {
|
12
|
+
key: 0,
|
13
|
+
class: "gap-y-2 flex flex-col border-b pb-3 border-oc-gray-200"
|
14
|
+
}, hl = { class: "gap-y-2 flex flex-col" }, Sl = {
|
15
|
+
key: 0,
|
16
|
+
class: "flex items-center bg-white justify-between h-[26px]"
|
17
|
+
}, xl = { class: "flex items-center w-full gap-x-3" }, wl = { class: "truncate w-full max-w-[160px]" }, $l = {
|
18
|
+
__name: "ColumnEdit",
|
19
|
+
props: {
|
20
|
+
options: {
|
21
|
+
type: Object,
|
22
|
+
default: () => ({})
|
23
|
+
},
|
24
|
+
headers: {
|
25
|
+
type: Array,
|
26
|
+
default: () => []
|
27
|
+
},
|
28
|
+
localKey: {
|
29
|
+
type: String,
|
30
|
+
default: ""
|
31
|
+
}
|
32
|
+
},
|
33
|
+
emits: [
|
34
|
+
"change-active",
|
35
|
+
"onMoved",
|
36
|
+
"update-order"
|
37
|
+
],
|
38
|
+
setup(A, { emit: te }) {
|
39
|
+
const u = te, w = A, g = V([]), h = V([]), $ = V(!1), M = {
|
40
|
+
handle: ".drag-el",
|
41
|
+
filter: ".is-disabled",
|
42
|
+
group: "headers",
|
43
|
+
animation: 500,
|
44
|
+
forceFallback: !1,
|
45
|
+
move: (K) => K.to.dataset.activeHeaders ? !0 : !!K.draggedContext.futureIndex,
|
46
|
+
"onUpdate:modelValue": () => Q()
|
47
|
+
}, Q = (K = !1) => {
|
48
|
+
h.value = h.value.map((m) => ({
|
49
|
+
...m,
|
50
|
+
isActive: !0
|
51
|
+
})), u("update-order", {
|
52
|
+
fixedHeaders: h.value,
|
53
|
+
activeHeaders: g.value,
|
54
|
+
isOnMount: K
|
55
|
+
});
|
56
|
+
};
|
57
|
+
return je(() => {
|
58
|
+
const K = Te(w.localKey), { fixed: m, active: s } = Ue(K, w.headers, w.localKey);
|
59
|
+
h.value = m || w.headers.slice(0, 1), g.value = s || w.headers.slice(1).map((C) => {
|
60
|
+
var ee, l, le;
|
61
|
+
return {
|
62
|
+
...C,
|
63
|
+
isActive: ((le = (l = (ee = w.options) == null ? void 0 : ee.active) == null ? void 0 : l.find((oe) => oe.key === C.key)) == null ? void 0 : le.isActive) ?? !0
|
64
|
+
};
|
65
|
+
}), Q(!0);
|
66
|
+
}), (K, m) => (i(), j(r(Ae), {
|
67
|
+
modelValue: $.value,
|
68
|
+
"onUpdate:modelValue": m[3] || (m[3] = (s) => $.value = s),
|
69
|
+
class: "h-[36px]",
|
70
|
+
"is-attach-to-body": ""
|
71
|
+
}, {
|
72
|
+
menu: x(() => [
|
73
|
+
q("div", bl, [
|
74
|
+
h.value.length ? (i(), k("div", kl, [
|
75
|
+
m[4] || (m[4] = q("span", { class: "text-oc-text-400 font-medium" }, "Fixed columns", -1)),
|
76
|
+
T(r(Le), Oe({
|
77
|
+
key: "key",
|
78
|
+
modelValue: h.value,
|
79
|
+
"onUpdate:modelValue": m[0] || (m[0] = (s) => h.value = s)
|
80
|
+
}, M), {
|
81
|
+
default: x(() => [
|
82
|
+
(i(!0), k(se, null, re(h.value, (s, C) => (i(), k("div", {
|
83
|
+
key: s.key,
|
84
|
+
class: ie(["flex items-center justify-between h-[26px]", C ? "" : "is-disabled"])
|
85
|
+
}, [
|
86
|
+
q("span", null, Ve(s.label), 1),
|
87
|
+
C ? (i(), j(r(Pe), {
|
88
|
+
key: 0,
|
89
|
+
width: "18",
|
90
|
+
height: "18",
|
91
|
+
class: "text-oc-text-400 drag-el cursor-move",
|
92
|
+
name: "draggable"
|
93
|
+
})) : y("", !0)
|
94
|
+
], 2))), 128))
|
95
|
+
]),
|
96
|
+
_: 1
|
97
|
+
}, 16, ["modelValue"])
|
98
|
+
])) : y("", !0),
|
99
|
+
q("div", hl, [
|
100
|
+
m[5] || (m[5] = q("span", { class: "text-oc-text-400 font-medium" }, "Active columns", -1)),
|
101
|
+
T(r(Le), Oe({
|
102
|
+
key: "key",
|
103
|
+
modelValue: g.value,
|
104
|
+
"onUpdate:modelValue": m[2] || (m[2] = (s) => g.value = s)
|
105
|
+
}, M, { "data-active-headers": "true" }), {
|
106
|
+
default: x(() => [
|
107
|
+
(i(!0), k(se, null, re(g.value, (s) => (i(), k(se, {
|
108
|
+
key: s.key
|
109
|
+
}, [
|
110
|
+
s.key !== "actions" ? (i(), k("div", Sl, [
|
111
|
+
q("div", xl, [
|
112
|
+
T(r(ll), {
|
113
|
+
modelValue: s.isActive,
|
114
|
+
"onUpdate:modelValue": [
|
115
|
+
(C) => s.isActive = C,
|
116
|
+
m[1] || (m[1] = (C) => Q())
|
117
|
+
],
|
118
|
+
class: "!w-fit"
|
119
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
120
|
+
q("div", wl, Ve(s.label), 1)
|
121
|
+
]),
|
122
|
+
g.value.length > 1 ? (i(), j(r(Pe), {
|
123
|
+
key: 0,
|
124
|
+
width: "18",
|
125
|
+
height: "18",
|
126
|
+
class: "text-oc-text-400 drag-el cursor-move",
|
127
|
+
name: "draggable"
|
128
|
+
})) : y("", !0)
|
129
|
+
])) : y("", !0)
|
130
|
+
], 64))), 128))
|
131
|
+
]),
|
132
|
+
_: 1
|
133
|
+
}, 16, ["modelValue"])
|
134
|
+
])
|
135
|
+
])
|
136
|
+
]),
|
137
|
+
default: x(() => [
|
138
|
+
T(r(Ke), {
|
139
|
+
label: "Edit Column",
|
140
|
+
"left-icon": "setting",
|
141
|
+
variant: "secondary"
|
142
|
+
})
|
143
|
+
]),
|
144
|
+
_: 1
|
145
|
+
}, 8, ["modelValue"]));
|
146
|
+
}
|
147
|
+
}, Fl = { class: "relative flex flex-col gap-9" }, Ol = {
|
148
|
+
key: 0,
|
149
|
+
class: "flex items-center px-4 min-h-[52px]"
|
150
|
+
}, Vl = {
|
151
|
+
key: 0,
|
152
|
+
class: "absolute flex items-center gap-5 left-5"
|
153
|
+
}, El = {
|
154
|
+
key: 1,
|
155
|
+
class: "absolute flex gap-3 left-5"
|
156
|
+
}, Cl = {
|
157
|
+
key: 1,
|
158
|
+
class: "flex justify-center w-full gap-5 md:justify-start"
|
159
|
+
}, Dl = {
|
160
|
+
key: 2,
|
161
|
+
class: "items-center hidden md:flex"
|
162
|
+
}, Ql = {
|
163
|
+
__name: "OcDataTable",
|
164
|
+
props: {
|
165
|
+
isLoading: Boolean,
|
166
|
+
id: {
|
167
|
+
type: String,
|
168
|
+
required: !0
|
169
|
+
},
|
170
|
+
options: {
|
171
|
+
type: Object,
|
172
|
+
required: !0
|
173
|
+
},
|
174
|
+
filter: {
|
175
|
+
type: Object,
|
176
|
+
required: !0
|
177
|
+
},
|
178
|
+
selected: {
|
179
|
+
type: Array,
|
180
|
+
required: !1
|
181
|
+
},
|
182
|
+
rowClass: String,
|
183
|
+
rowKey: {
|
184
|
+
type: [String, Function],
|
185
|
+
default: "id"
|
186
|
+
},
|
187
|
+
rowLink: String,
|
188
|
+
localDb: {
|
189
|
+
type: Object,
|
190
|
+
required: !1
|
191
|
+
}
|
192
|
+
},
|
193
|
+
emits: {
|
194
|
+
"update:selected": [],
|
195
|
+
"update:filter": [],
|
196
|
+
"click:row": [],
|
197
|
+
"filter-fields-changed": [],
|
198
|
+
"filter-removed": [],
|
199
|
+
"filter-open": [],
|
200
|
+
"search-query-changed": [],
|
201
|
+
"hover:cell": [],
|
202
|
+
"columns-changed": []
|
203
|
+
},
|
204
|
+
setup(A, { emit: te }) {
|
205
|
+
var pe, fe, ge, ye, be, ke, he, Se, xe, we, $e, Fe;
|
206
|
+
const u = A, w = te, g = O(() => {
|
207
|
+
var e;
|
208
|
+
return (e = u.options) == null ? void 0 : e.cursor;
|
209
|
+
}), h = V(), $ = O(() => {
|
210
|
+
var e;
|
211
|
+
return (e = u.options) == null ? void 0 : e.tableOptions;
|
212
|
+
}), M = O(() => u.localDb !== void 0), {
|
213
|
+
localData: Q,
|
214
|
+
setFilter: K,
|
215
|
+
setSortBy: m,
|
216
|
+
paginationData: s,
|
217
|
+
isLoading: C
|
218
|
+
// sortBy,
|
219
|
+
// toggleSort,
|
220
|
+
// updateOrAddLocalData,
|
221
|
+
} = yl({
|
222
|
+
id: u.id,
|
223
|
+
name: (pe = u.localDb) == null ? void 0 : pe.table_name,
|
224
|
+
localDb: (fe = u.localDb) == null ? void 0 : fe.db,
|
225
|
+
options: (ge = u.localDb) == null ? void 0 : ge.options
|
226
|
+
});
|
227
|
+
ue(() => {
|
228
|
+
var e;
|
229
|
+
return (e = u.options) == null ? void 0 : e.pagination;
|
230
|
+
}, (e) => {
|
231
|
+
s.value = e;
|
232
|
+
}, { deep: !0, immediate: !0 }), M.value && (ue(() => u.filter, () => {
|
233
|
+
K(u.filter);
|
234
|
+
}, { deep: !0, immediate: !0 }), ue(() => u.sortBy, () => {
|
235
|
+
m(u.sortBy);
|
236
|
+
}, { deep: !0, immediate: !0 }));
|
237
|
+
const ee = O(() => {
|
238
|
+
var a;
|
239
|
+
const e = {
|
240
|
+
...$.value,
|
241
|
+
headers: h.value ? h.value.map((n) => {
|
242
|
+
var v, c;
|
243
|
+
return n.class = ((c = (v = $.value) == null ? void 0 : v.headers.find((d) => d.key === n.key)) == null ? void 0 : c.class) ?? "", n;
|
244
|
+
}).filter((n) => n.isActive) : (a = $.value) == null ? void 0 : a.headers.filter((n) => Re(n.key))
|
245
|
+
};
|
246
|
+
return (M.value || Q.value.length > 0) && (e.fields = Q.value), e;
|
247
|
+
}), l = O(() => {
|
248
|
+
var e;
|
249
|
+
return (e = u.options) == null ? void 0 : e.filterOptions;
|
250
|
+
}), le = O(() => {
|
251
|
+
var e;
|
252
|
+
return (e = u.options) == null ? void 0 : e.hidePerPageDropdown;
|
253
|
+
}), oe = O(() => {
|
254
|
+
var e;
|
255
|
+
return ((e = s.value) == null ? void 0 : e.last_page) === 1;
|
256
|
+
}), N = V(!1), D = V(u.filter[(be = (ye = l.value) == null ? void 0 : ye.tabs) == null ? void 0 : be.key]), R = V(u.filter.page), z = V(
|
257
|
+
(he = (ke = l.value) == null ? void 0 : ke.per_page) != null && he.key ? u.filter[(xe = (Se = l.value) == null ? void 0 : Se.per_page) == null ? void 0 : xe.key] : u.filter.per_page
|
258
|
+
), ne = ((Fe = u.filter[($e = (we = l.value) == null ? void 0 : we.search) == null ? void 0 : $e.key]) == null ? void 0 : Fe.trim()) ?? "", U = V(ne ? ne.split(",") : []), de = V(!1), Be = O(
|
259
|
+
() => {
|
260
|
+
var e;
|
261
|
+
return ml((e = u.options) == null ? void 0 : e.perPageOptions);
|
262
|
+
}
|
263
|
+
), Ie = O(() => pl(Be.value, s.value)), qe = O(() => {
|
264
|
+
var e;
|
265
|
+
return ((e = u.selected) == null ? void 0 : e.length) > 0;
|
266
|
+
}), ve = (e) => {
|
267
|
+
!e.trim() || !t.value.selectedSearchOption && U.value.includes(e) || (U.value = [e], F(), w("search-query-changed", e));
|
268
|
+
}, Qe = (e) => {
|
269
|
+
U.value = U.value.filter((a) => a !== e), F();
|
270
|
+
}, J = u.filter;
|
271
|
+
!J && s.value ? J.page = 1 : !J && g && (J.cursor = "");
|
272
|
+
const t = V(J), Ne = O(() => vl(t.value, l.value)), Re = (e) => {
|
273
|
+
var a, n, v, c, d, o;
|
274
|
+
return ((o = (d = (c = (v = t.value) == null ? void 0 : v[(n = (a = l.value) == null ? void 0 : a.columnEdit) == null ? void 0 : n.key]) == null ? void 0 : c.active) == null ? void 0 : d.find((p) => p.key === e)) == null ? void 0 : o.isActive) ?? !0;
|
275
|
+
}, ze = ({ fixedHeaders: e, activeHeaders: a, isOnMount: n }) => {
|
276
|
+
var v, c, d, o, p, S, L, E;
|
277
|
+
if (t.value[(c = (v = l.value) == null ? void 0 : v.columnEdit) == null ? void 0 : c.key] || (t.value[(o = (d = l.value) == null ? void 0 : d.columnEdit) == null ? void 0 : o.key] = {}), t.value[(S = (p = l.value) == null ? void 0 : p.columnEdit) == null ? void 0 : S.key].fixed = e, t.value[(E = (L = l.value) == null ? void 0 : L.columnEdit) == null ? void 0 : E.key].active = a, h.value = [...e, ...a], !n) {
|
278
|
+
const B = nl(e, a);
|
279
|
+
dl(l.value.columnEdit.localStorageKey, B);
|
280
|
+
}
|
281
|
+
w("columns-changed", a);
|
282
|
+
}, Me = () => {
|
283
|
+
var e, a, n, v, c, d;
|
284
|
+
if ((a = (e = l.value) == null ? void 0 : e.columnEdit) != null && a.localStorageKey) {
|
285
|
+
const o = Te(l.value.columnEdit.localStorageKey);
|
286
|
+
if (o) {
|
287
|
+
const { fixed: p, active: S } = Ue(
|
288
|
+
o,
|
289
|
+
$.value.headers,
|
290
|
+
l.value.columnEdit.localStorageKey
|
291
|
+
);
|
292
|
+
t.value[(v = (n = l.value) == null ? void 0 : n.columnEdit) == null ? void 0 : v.key].fixed = p, t.value[(d = (c = l.value) == null ? void 0 : c.columnEdit) == null ? void 0 : d.key].active = S, h.value = [...p, ...S];
|
293
|
+
}
|
294
|
+
}
|
295
|
+
}, Je = (e) => {
|
296
|
+
t.value.selectedSearchOption = e;
|
297
|
+
}, Ze = () => {
|
298
|
+
U.value = [], D.value = "", t.value = cl(t.value, l.value, z.value, D.value), F();
|
299
|
+
}, Ge = () => {
|
300
|
+
F(null, R.value);
|
301
|
+
}, He = () => {
|
302
|
+
gl(u.id, t.value);
|
303
|
+
}, We = () => fl(u.id), ce = V(null), F = (e = null, a = !1, n = "", v = !1, c = !1) => {
|
304
|
+
var o, p, S, L, E, B, Z, G, H, W, X, Y, _;
|
305
|
+
s.value && !a && (R.value = 1), s.value ? t.value.page = R.value : t.value.cursor = n, (o = l.value) != null && o.per_page ? t.value[l.value.per_page.key] = z.value : t.value.per_page = z.value, (p = l.value) != null && p.tabs && c && (t.value[l.value.tabs.key] = D.value), (S = l.value) != null && S.search && ((E = (L = l.value.search) == null ? void 0 : L.options) != null && E.length ? (Object.keys(t.value).forEach((b) => {
|
306
|
+
var I;
|
307
|
+
(I = l.value.search.options) != null && I.map((f) => f.value).includes(b) && delete t.value[b];
|
308
|
+
}), t.value[((B = t.value) == null ? void 0 : B.selectedSearchOption) || ((H = (G = (Z = l.value.search) == null ? void 0 : Z.options) == null ? void 0 : G[0]) == null ? void 0 : H.value) || l.value.search.key] = U.value.join()) : t.value[l.value.search.key] = U.value.join()), e && (N.value = !1, t.value = { ...t.value, ...e }, Object.keys(t.value).forEach((b) => {
|
309
|
+
Array.isArray(t.value[b]) && t.value[b].length === 0 && delete t.value[b];
|
310
|
+
}));
|
311
|
+
let d = (X = (W = l.value) == null ? void 0 : W.tabs) == null ? void 0 : X.key;
|
312
|
+
if (d && D.value !== t.value[d]) {
|
313
|
+
const b = (_ = (Y = l.value.tabs) == null ? void 0 : Y.options) == null ? void 0 : _.find(
|
314
|
+
(I) => {
|
315
|
+
var f, ae;
|
316
|
+
return ((f = I.value) == null ? void 0 : f.toString()) === ((ae = t.value[d]) == null ? void 0 : ae.toString());
|
317
|
+
}
|
318
|
+
);
|
319
|
+
if (b != null && b.value)
|
320
|
+
return D.value = b.value, F(), !1;
|
321
|
+
}
|
322
|
+
He(), clearTimeout(ce.value), ce.value = setTimeout(() => {
|
323
|
+
w("update:filter", t.value, v);
|
324
|
+
}, 100);
|
325
|
+
}, Xe = (e, a) => {
|
326
|
+
(a === l.value.tabs.key || a === "tabs") && (D.value = ""), F(e), w("filter-removed", a);
|
327
|
+
};
|
328
|
+
je(() => {
|
329
|
+
var a, n, v, c, d, o, p;
|
330
|
+
Me();
|
331
|
+
const e = We();
|
332
|
+
e && (t.value = JSON.parse(e), D.value = D.value || ((a = t.value) == null ? void 0 : a.tabs) || ((c = t.value) == null ? void 0 : c[(v = (n = l.value) == null ? void 0 : n.tabs) == null ? void 0 : v.key]), (d = t.value) != null && d.selectedSearchOption && ve(t.value[(o = t.value) == null ? void 0 : o.selectedSearchOption]), R.value = ((p = t.value) == null ? void 0 : p.page) || 1, F(null, !0, t.value.cursor, !0));
|
333
|
+
});
|
334
|
+
const me = O(() => u.isLoading || C.value);
|
335
|
+
return (e, a) => {
|
336
|
+
var n, v, c, d;
|
337
|
+
return i(), k("div", Fl, [
|
338
|
+
$.value ? (i(), j(r(al), {
|
339
|
+
key: 0,
|
340
|
+
selected: A.selected,
|
341
|
+
"row-key": A.rowKey,
|
342
|
+
options: ee.value,
|
343
|
+
"is-loading": me.value,
|
344
|
+
"loading-rows": z.value,
|
345
|
+
"row-class": A.rowClass,
|
346
|
+
"row-link": A.rowLink,
|
347
|
+
"is-sticky": $.value.isSticky,
|
348
|
+
"is-borderless": $.value.isBorderless,
|
349
|
+
"onUpdate:selected": a[8] || (a[8] = (o) => e.$emit("update:selected", o)),
|
350
|
+
"onClick:row": a[9] || (a[9] = (o) => e.$emit("click:row", o)),
|
351
|
+
"onHover:cell": a[10] || (a[10] = (o) => e.$emit("hover:cell", o))
|
352
|
+
}, el({
|
353
|
+
after: x(() => [
|
354
|
+
P(e.$slots, "after")
|
355
|
+
]),
|
356
|
+
empty: x(() => [
|
357
|
+
P(e.$slots, "empty")
|
358
|
+
]),
|
359
|
+
"table-header": x((o) => [
|
360
|
+
P(e.$slots, "table-header", Ee(Ce(o)))
|
361
|
+
]),
|
362
|
+
"table-body": x((o) => [
|
363
|
+
P(e.$slots, "table-body", Ee(Ce(o)))
|
364
|
+
]),
|
365
|
+
_: 2
|
366
|
+
}, [
|
367
|
+
e.$slots.before || (n = l.value) != null && n.search || (v = l.value) != null && v.form || (c = l.value) != null && c.tabs ? {
|
368
|
+
name: "before",
|
369
|
+
fn: x(() => {
|
370
|
+
var o, p, S, L;
|
371
|
+
return [
|
372
|
+
P(e.$slots, "before"),
|
373
|
+
(o = l.value) != null && o.search || (p = l.value) != null && p.form || (S = l.value) != null && S.tabs ? (i(), k("div", Ol, [
|
374
|
+
qe.value ? (i(), k("div", Vl, [
|
375
|
+
P(e.$slots, "bulk-actions", { selectedRows: A.selected })
|
376
|
+
])) : (i(), k("div", El, [
|
377
|
+
(L = l.value) != null && L.tabs ? (i(), j(r(tl), {
|
378
|
+
key: 0,
|
379
|
+
modelValue: D.value,
|
380
|
+
"onUpdate:modelValue": [
|
381
|
+
a[0] || (a[0] = (E) => D.value = E),
|
382
|
+
a[1] || (a[1] = (E) => F(null, !1, "", !1, !0))
|
383
|
+
],
|
384
|
+
"is-disabled": me.value,
|
385
|
+
tabs: l.value.tabs.options,
|
386
|
+
variant: "pills"
|
387
|
+
}, null, 8, ["modelValue", "is-disabled", "tabs"])) : y("", !0)
|
388
|
+
])),
|
389
|
+
P(e.$slots, "filter-options", {}, () => {
|
390
|
+
var E, B, Z, G, H, W, X, Y, _, b, I;
|
391
|
+
return [
|
392
|
+
(E = l.value) != null && E.search || (B = l.value) != null && B.form || (Z = l.value) != null && Z.columnEdit ? (i(), k("div", {
|
393
|
+
key: 0,
|
394
|
+
class: ie([
|
395
|
+
"flex gap-3 absolute ml-auto bg-oc-bg-light right-4 max-w-[calc(100%-24px)]",
|
396
|
+
l.value ? de.value ? "md:w-fit w-full" : "" : "w-full justify-end"
|
397
|
+
])
|
398
|
+
}, [
|
399
|
+
(G = l.value) != null && G.search ? (i(), j(r(ol), {
|
400
|
+
key: 0,
|
401
|
+
"is-search-only": !l.value.tabs || l.value.isSearchOnly,
|
402
|
+
"search-options": ((H = l.value.search) == null ? void 0 : H.options) ?? [],
|
403
|
+
"selected-option": (((W = t.value) == null ? void 0 : W.selectedSearchOption) || ((_ = (Y = (X = l.value.search) == null ? void 0 : X.options) == null ? void 0 : Y[0]) == null ? void 0 : _.value)) ?? "keywords",
|
404
|
+
onAddQuery: ve,
|
405
|
+
onToggle: a[2] || (a[2] = (f) => de.value = f),
|
406
|
+
onChangeSearchKey: Je
|
407
|
+
}, null, 8, ["is-search-only", "search-options", "selected-option"])) : y("", !0),
|
408
|
+
(b = l.value) != null && b.form ? (i(), j(r(Ae), {
|
409
|
+
key: 1,
|
410
|
+
modelValue: N.value,
|
411
|
+
"onUpdate:modelValue": [
|
412
|
+
a[6] || (a[6] = (f) => N.value = f),
|
413
|
+
a[7] || (a[7] = (f) => e.$emit("filter-open", f))
|
414
|
+
],
|
415
|
+
distance: 9,
|
416
|
+
placement: "bottom-end",
|
417
|
+
"is-attach-to-body": ""
|
418
|
+
}, {
|
419
|
+
menu: x(() => [
|
420
|
+
N.value ? (i(), j(r(sl), {
|
421
|
+
key: 0,
|
422
|
+
id: A.id,
|
423
|
+
"json-form": l.value.form ?? [],
|
424
|
+
grid: l.value.grid ?? null,
|
425
|
+
values: u.filter,
|
426
|
+
actions: l.value.actions,
|
427
|
+
onApplyFilter: a[3] || (a[3] = (f) => F(f)),
|
428
|
+
onFilterFieldsChanged: a[4] || (a[4] = (f) => w("filter-fields-changed", f)),
|
429
|
+
onCancel: a[5] || (a[5] = (f) => N.value = !1)
|
430
|
+
}, {
|
431
|
+
default: x(({ errors: f, values: ae, jsonForm: Ye, updateForm: _e }) => [
|
432
|
+
P(e.$slots, "custom-filter-form", {
|
433
|
+
errors: f,
|
434
|
+
values: ae,
|
435
|
+
jsonForm: Ye,
|
436
|
+
updateFilter: _e
|
437
|
+
})
|
438
|
+
]),
|
439
|
+
_: 3
|
440
|
+
}, 8, ["id", "json-form", "grid", "values", "actions"])) : y("", !0)
|
441
|
+
]),
|
442
|
+
default: x(() => [
|
443
|
+
T(r(Ke), {
|
444
|
+
"is-active": N.value,
|
445
|
+
variant: "secondary",
|
446
|
+
"left-icon": "filter"
|
447
|
+
}, null, 8, ["is-active"])
|
448
|
+
]),
|
449
|
+
_: 3
|
450
|
+
}, 8, ["modelValue"])) : y("", !0),
|
451
|
+
l.value.columnEdit ? (i(), j($l, {
|
452
|
+
key: 2,
|
453
|
+
options: t.value.columnEdit,
|
454
|
+
headers: ((I = $.value) == null ? void 0 : I.headers) || [],
|
455
|
+
"local-key": l.value.columnEdit.localStorageKey,
|
456
|
+
onUpdateOrder: ze
|
457
|
+
}, null, 8, ["options", "headers", "local-key"])) : y("", !0)
|
458
|
+
], 2)) : y("", !0)
|
459
|
+
];
|
460
|
+
})
|
461
|
+
])) : y("", !0),
|
462
|
+
T(r(ul), {
|
463
|
+
filters: Ne.value,
|
464
|
+
queries: U.value,
|
465
|
+
class: "border-t border-oc-gray-200",
|
466
|
+
onRemoveQuery: Qe,
|
467
|
+
onRemoveAll: Ze,
|
468
|
+
onRemoveFilter: Xe
|
469
|
+
}, null, 8, ["filters", "queries"])
|
470
|
+
];
|
471
|
+
}),
|
472
|
+
key: "0"
|
473
|
+
} : void 0,
|
474
|
+
re((d = $.value) == null ? void 0 : d.headers, (o, p) => ({
|
475
|
+
name: o.key,
|
476
|
+
fn: x(({ data: S, item: L }) => [
|
477
|
+
P(e.$slots, o.key, {
|
478
|
+
data: S,
|
479
|
+
item: L
|
480
|
+
})
|
481
|
+
])
|
482
|
+
}))
|
483
|
+
]), 1032, ["selected", "row-key", "options", "is-loading", "loading-rows", "row-class", "row-link", "is-sticky", "is-borderless"])) : y("", !0),
|
484
|
+
P(e.$slots, "before-pagination"),
|
485
|
+
r(s) || g.value ? (i(), k("div", {
|
486
|
+
key: 1,
|
487
|
+
class: ie(["flex items-center gap-3", r(s) && r(s).last_page === 1 ? "justify-end" : ""])
|
488
|
+
}, [
|
489
|
+
r(s) && !oe.value ? (i(), j(r(rl), {
|
490
|
+
key: 0,
|
491
|
+
modelValue: R.value,
|
492
|
+
"onUpdate:modelValue": [
|
493
|
+
a[11] || (a[11] = (o) => R.value = o),
|
494
|
+
Ge
|
495
|
+
],
|
496
|
+
class: "justify-center",
|
497
|
+
"max-page": r(s).last_page,
|
498
|
+
strategy: r(s).strategy,
|
499
|
+
"total-visible": "5"
|
500
|
+
}, null, 8, ["modelValue", "max-page", "strategy"])) : y("", !0),
|
501
|
+
g.value ? (i(), k("div", Cl, [
|
502
|
+
T(r(De), {
|
503
|
+
disabled: !g.value.prev,
|
504
|
+
onClick: a[12] || (a[12] = (o) => g.value.prev ? F(null, !1, g.value.prev) : null)
|
505
|
+
}, null, 8, ["disabled"]),
|
506
|
+
T(r(De), {
|
507
|
+
disabled: !g.value.next,
|
508
|
+
"is-next": "",
|
509
|
+
onClick: a[13] || (a[13] = (o) => g.value.next ? F(null, !1, g.value.next) : null)
|
510
|
+
}, null, 8, ["disabled"])
|
511
|
+
])) : y("", !0),
|
512
|
+
le.value ? y("", !0) : (i(), k("div", Dl, [
|
513
|
+
T(r(il), {
|
514
|
+
modelValue: z.value,
|
515
|
+
"onUpdate:modelValue": [
|
516
|
+
a[14] || (a[14] = (o) => z.value = o),
|
517
|
+
a[15] || (a[15] = (o) => F(null))
|
518
|
+
],
|
519
|
+
label: "Item per page",
|
520
|
+
"is-inline-label": "",
|
521
|
+
"popper-options": { placement: "auto" },
|
522
|
+
options: Ie.value
|
523
|
+
}, null, 8, ["modelValue", "options"])
|
524
|
+
]))
|
525
|
+
], 2)) : y("", !0)
|
526
|
+
]);
|
527
|
+
};
|
528
|
+
}
|
529
|
+
};
|
530
|
+
export {
|
531
|
+
Ql as default
|
532
|
+
};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ref as w, createBlock as y, openBlock as c, unref as l, withCtx as r, createElementBlock as b, Fragment as C, renderList as $, normalizeClass as s, createElementVNode as o, createCommentVNode as m, renderSlot as u, toDisplayString as x, createVNode as f } from "vue";
|
2
|
-
import { aI as D, aE as S, az as B } from "./index-
|
2
|
+
import { aI as D, aE as S, az as B } from "./index-BtrJ8Wk_.js";
|
3
3
|
import { _ as g } from "./OcIcon-CBf___w1.js";
|
4
4
|
const M = ["onMouseleave", "onMouseover", "onClick"], L = { class: "flex justify-evenly w-full" }, E = { class: "flex w-full" }, N = { class: "ml-4 flex w-full" }, U = { class: "flex items-center flex-wrap w-full" }, z = ["href"], O = { class: "min-w-[120px]" }, W = { class: "truncate w-[200px]" }, j = { class: "flex items-center ml-4" }, A = { class: "flex w-full" }, T = {
|
5
5
|
__name: "OcDraggableList",
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ref as m, computed as p, createElementBlock as l, openBlock as s, createVNode as f, createBlock as N, createCommentVNode as z, unref as c, withCtx as v, createElementVNode as n, normalizeClass as T, Fragment as V, renderList as k, createTextVNode as C } from "vue";
|
2
|
-
import { az as U, d as J, B as _ } from "./index-
|
2
|
+
import { az as U, d as J, B as _ } from "./index-BtrJ8Wk_.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, createElementBlock as O, openBlock 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-BtrJ8Wk_.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
1
|
import { ref as c, computed as B, createElementBlock as u, openBlock as s, Fragment as x, createElementVNode as i, createCommentVNode as O, normalizeClass as S, createVNode as m, createBlock as v, unref as r, withKeys as K, createSlots as N, withCtx as f, toDisplayString as Q, renderList as z, nextTick as A } from "vue";
|
2
|
-
import { d as D, az as E, aA as F, B as w } from "./index-
|
2
|
+
import { d as D, az as E, aA as F, B as w } from "./index-BtrJ8Wk_.js";
|
3
3
|
import { _ as I } from "./OcIcon-CBf___w1.js";
|
4
4
|
const U = { class: "flex gap-x-4" }, j = { class: "flex gap-x-2 items-center pl-2 text-oc-text-400 font-medium text-sm" }, q = { class: "p-2 flex flex-col" }, J = {
|
5
5
|
__name: "OcFilterSearch",
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { computed as k, createBlock as m, createCommentVNode as x, openBlock as a, unref as o, withCtx as y, createElementVNode as f, createElementBlock as v, createVNode as F, Fragment as b, renderList as p } from "vue";
|
2
|
-
import { M as $, au as c } from "./index-
|
2
|
+
import { M as $, au as c } from "./index-BtrJ8Wk_.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 o, createBlock as v, openBlock as d, unref as r, withCtx as x, createVNode as O } from "vue";
|
2
|
-
import { aB as b } from "./index-
|
3
|
-
import k from "./OcCropper-
|
2
|
+
import { aB as b } from "./index-BtrJ8Wk_.js";
|
3
|
+
import k from "./OcCropper-D7GFhoWz.js";
|
4
4
|
const S = {
|
5
5
|
__name: "OcModalCropper",
|
6
6
|
props: {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ref as n, watch as g, createBlock as m, openBlock as s, unref as o, withCtx as p, createVNode as v, createCommentVNode as y } from "vue";
|
2
|
-
import { az as S, d as h, aJ as D } from "./index-
|
2
|
+
import { az as S, d as h, aJ as D } from "./index-BtrJ8Wk_.js";
|
3
3
|
import c from "dayjs";
|
4
4
|
const w = {
|
5
5
|
__name: "OcTimePicker",
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { computed as l, createElementBlock as o, openBlock as a, normalizeClass as d, createElementVNode as e, createBlock as x, createCommentVNode as u, toDisplayString as r, unref as m, createTextVNode as v, Fragment as T, renderList as k, createVNode as P } from "vue";
|
2
|
-
import { au as _, B as w } from "./index-
|
2
|
+
import { au as _, B as w } from "./index-BtrJ8Wk_.js";
|
3
3
|
import { _ as C } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
4
4
|
import { _ as F } from "./OcIcon-CBf___w1.js";
|
5
5
|
const B = { class: "z-10 flex flex-col gap-4 p-9 relative" }, E = { class: "flex items-center gap-4" }, A = { class: "font-medium text-xl" }, N = { class: "flex gap-3 items-center mb-5" }, S = { class: "flex items-start gap-2" }, V = { class: "text-[24px] font-medium tracking-tighter" }, q = { class: "text-[40px] leading-none font-medium" }, z = { key: 0 }, $ = {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { createElementBlock as a, openBlock as d, createElementVNode as t, createVNode as o, unref as i, toDisplayString as r } from "vue";
|
2
|
-
import { B as n } from "./index-
|
2
|
+
import { B as n } from "./index-BtrJ8Wk_.js";
|
3
3
|
const m = { class: "flex flex-col" }, u = { class: "w-full relative group" }, f = { class: "w-full h-full bg-black/25 absolute top-0 left-0 hidden group-hover:flex rounded-lg" }, v = { class: "w-full px-6 gap-3 m-auto flex" }, b = ["src", "alt"], g = { class: "mt-4 text-md text-center" }, x = {
|
4
4
|
__name: "ThumbnailSection",
|
5
5
|
props: {
|