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