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