@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
@@ -1,5 +1,5 @@
|
|
1
1
|
import { createElementBlock as s, openBlock as i, normalizeClass as f, createElementVNode as l, Fragment as g, createVNode as n, unref as a, createTextVNode as r, toDisplayString as h, createBlock as u, createCommentVNode as b, withCtx as c } from "vue";
|
2
|
-
import { B as d, au as v } from "./index-
|
2
|
+
import { B as d, au as v } from "./index-BtrJ8Wk_.js";
|
3
3
|
import { _ as k } from "./OcIcon-CBf___w1.js";
|
4
4
|
const x = { class: "w-full relative group" }, y = {
|
5
5
|
key: 0,
|
@@ -10516,16 +10516,16 @@ const pc = { class: "flex flex-col gap-y-2 w-full" }, yc = {
|
|
10516
10516
|
}), 128))
|
10517
10517
|
], 6)) : u("", !0);
|
10518
10518
|
}
|
10519
|
-
}, qf = de(() => import("./OcDataTable-
|
10520
|
-
() => import("./OcComplexCalendar-
|
10519
|
+
}, qf = de(() => import("./OcDataTable-YUm4ppk9.js")), Hf = de(() => import("./OcFilterSearch-BlMXCzOr.js")), Yf = de(() => import("./OcFilterSearchFor-C9-lxT4W.js")), Wf = de(() => import("./OcFilterForm-MWslQjtt.js")), Cm = de(
|
10520
|
+
() => import("./OcComplexCalendar-NB-nixtt.js")
|
10521
10521
|
), Kf = de(
|
10522
|
-
() => import("./OcComplexDatePicker-
|
10523
|
-
), dt = de(() => import("./OcModalCropper-
|
10524
|
-
() => import("./ThumbnailTheme-
|
10522
|
+
() => import("./OcComplexDatePicker-CCZNKVjC.js")
|
10523
|
+
), dt = de(() => import("./OcModalCropper-DKhsnxRF.js")), Gf = de(() => import("./OcCropper-D7GFhoWz.js")), Bm = de(() => import("./OcDraggable-DRsp4j4e.js")), Xf = de(() => import("./OcDraggableList-BTxRKiVF.js")), Jf = de(() => import("./OcEmojiPicker-D6nfctf9.js")), Zf = de(
|
10524
|
+
() => import("./ThumbnailTheme-UBdrnl_Z.js")
|
10525
10525
|
), Qf = de(
|
10526
|
-
() => import("./ThumbnailSection-
|
10527
|
-
), _f = de(() => import("./SubPlanCard-
|
10528
|
-
() => import("./OcAccountSetupProgress-
|
10526
|
+
() => import("./ThumbnailSection-SmaP6Acx.js")
|
10527
|
+
), _f = de(() => import("./SubPlanCard-CvHxRfDv.js")), ev = de(() => import("./OcTimePopup-CrwbZ_Nx.js")), Om = de(() => import("./OcTimePicker-DDf4hJM7.js")), tv = de(
|
10528
|
+
() => import("./OcAccountSetupProgress-DdwbNh_j.js")
|
10529
10529
|
);
|
10530
10530
|
export {
|
10531
10531
|
rf as $,
|
package/dist/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import "vue";
|
2
|
-
import { V as r, ak as o, aX as t, a2 as n, a4 as i, at as p, _ as l, a5 as d, B as m, o as u, a as b, C as S, b as c, au as T, aH as g, aO as C, ax as x, ay as P, c as f, aQ as I, v as h, aN as O, p as F, aI as B, aR as k, az as v, aA as w, aS as A, a6 as D, T as H, L, R as M, a7 as _, aL as R, aK as y, aM as E, w as N, u as U, l as V, a8 as G, ab as j, aa as z, ac as W, x as q, a3 as J, d as K, e as Q, m as X, y as Y, z as Z, A as $, aB as aa, aP as ea, t as sa, N as ra, aC as oa, D as ta, W as na, k as ia, E as pa, F as la, G as da, ae as ma, af as ua, H as ba, J as Sa, $ as ca, f as Ta, I as ga, ag as Ca, g as xa, h as Pa, i as fa, ah as Ia, q as ha, j as Oa, r as Fa, av as Ba, am as ka, ai as va, ap as wa, ao as Aa, al as Da, an as Ha, aj as La, s as Ma, S as _a, aw as Ra, Y as ya, X as Ea, a9 as Na, aV as Ua, aq as Va, aD as Ga, ad as ja, K as za, O as Wa, P as qa, M as Ja, Q as Ka, Z as Qa, n as Xa, aU as Ya, aT as Za, aW as $a, aJ as ae, aE as ee, ar as se, U as re, a1 as oe, a0 as te, as as ne, aF as ie } from "./index-
|
2
|
+
import { V as r, ak as o, aX as t, a2 as n, a4 as i, at as p, _ as l, a5 as d, B as m, o as u, a as b, C as S, b as c, au as T, aH as g, aO as C, ax as x, ay as P, c as f, aQ as I, v as h, aN as O, p as F, aI as B, aR as k, az as v, aA as w, aS as A, a6 as D, T as H, L, R as M, a7 as _, aL as R, aK as y, aM as E, w as N, u as U, l as V, a8 as G, ab as j, aa as z, ac as W, x as q, a3 as J, d as K, e as Q, m as X, y as Y, z as Z, A as $, aB as aa, aP as ea, t as sa, N as ra, aC as oa, D as ta, W as na, k as ia, E as pa, F as la, G as da, ae as ma, af as ua, H as ba, J as Sa, $ as ca, f as Ta, I as ga, ag as Ca, g as xa, h as Pa, i as fa, ah as Ia, q as ha, j as Oa, r as Fa, av as Ba, am as ka, ai as va, ap as wa, ao as Aa, al as Da, an as Ha, aj as La, s as Ma, S as _a, aw as Ra, Y as ya, X as Ea, a9 as Na, aV as Ua, aq as Va, aD as Ga, ad as ja, K as za, O as Wa, P as qa, M as Ja, Q as Ka, Z as Qa, n as Xa, aU as Ya, aT as Za, aW as $a, aJ as ae, aE as ee, ar as se, U as re, a1 as oe, a0 as te, as as ne, aF as ie } from "./index-BtrJ8Wk_.js";
|
3
3
|
import { _ as le } from "./OcProgressBar-lyqE5LZd.js";
|
4
4
|
import { _ as me } from "./OcHorizontalProgressbar.vue_vue_type_script_setup_true_lang-C-8H1oP2.js";
|
5
5
|
import { _ as be } from "./OcSwitchTabs-B7LfmG3z.js";
|
package/package.json
CHANGED
@@ -1,535 +0,0 @@
|
|
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
|
-
import { VueDraggableNext as Pe } from "vue-draggable-next";
|
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
|
-
import "dayjs";
|
11
|
-
const kl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, hl = {
|
12
|
-
key: 0,
|
13
|
-
class: "gap-y-2 flex flex-col border-b pb-3 border-oc-gray-200"
|
14
|
-
}, Sl = { class: "gap-y-2 flex flex-col" }, xl = {
|
15
|
-
key: 0,
|
16
|
-
class: "flex items-center bg-white justify-between h-[26px]"
|
17
|
-
}, wl = { class: "flex items-center w-full gap-x-3" }, $l = { class: "truncate w-full max-w-[160px]" }, Fl = {
|
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(K, { emit: oe }) {
|
39
|
-
const s = oe, $ = K, n = x([]), m = x([]), B = x(!1), F = {
|
40
|
-
handle: ".drag-el",
|
41
|
-
filter: ".is-disabled",
|
42
|
-
group: "headers",
|
43
|
-
animation: 500,
|
44
|
-
forceFallback: !1,
|
45
|
-
move: (L) => L.to.dataset.activeHeaders ? !0 : !!L.draggedContext.futureIndex,
|
46
|
-
"onUpdate:modelValue": () => I()
|
47
|
-
}, I = (L = !1) => {
|
48
|
-
m.value = m.value.map((p) => ({
|
49
|
-
...p,
|
50
|
-
isActive: !0
|
51
|
-
})), s("update-order", {
|
52
|
-
fixedHeaders: m.value,
|
53
|
-
activeHeaders: n.value,
|
54
|
-
isOnMount: L
|
55
|
-
});
|
56
|
-
};
|
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
|
-
var ee, le, l;
|
61
|
-
return {
|
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
|
-
};
|
65
|
-
}), I(!0);
|
66
|
-
}), (L, p) => (i(), A(u(Ae), {
|
67
|
-
modelValue: B.value,
|
68
|
-
"onUpdate:modelValue": p[3] || (p[3] = (f) => B.value = f),
|
69
|
-
class: "h-[36px]",
|
70
|
-
"is-attach-to-body": ""
|
71
|
-
}, {
|
72
|
-
menu: w(() => [
|
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
|
-
key: "key",
|
78
|
-
modelValue: m.value,
|
79
|
-
"onUpdate:modelValue": p[0] || (p[0] = (f) => m.value = f)
|
80
|
-
}, F), {
|
81
|
-
default: w(() => [
|
82
|
-
(i(!0), h(ue, null, ie(m.value, (f, O) => (i(), h("div", {
|
83
|
-
key: f.key,
|
84
|
-
class: re(["flex items-center justify-between h-[26px]", O ? "" : "is-disabled"])
|
85
|
-
}, [
|
86
|
-
N("span", null, Ve(f.label), 1),
|
87
|
-
O ? (i(), A(u(De), {
|
88
|
-
key: 0,
|
89
|
-
width: "18",
|
90
|
-
height: "18",
|
91
|
-
class: "text-oc-text-400 drag-el cursor-move",
|
92
|
-
name: "draggable"
|
93
|
-
})) : b("", !0)
|
94
|
-
], 2))), 128))
|
95
|
-
]),
|
96
|
-
_: 1
|
97
|
-
}, 16, ["modelValue"])
|
98
|
-
])) : b("", !0),
|
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
|
-
key: "key",
|
103
|
-
modelValue: n.value,
|
104
|
-
"onUpdate:modelValue": p[2] || (p[2] = (f) => n.value = f)
|
105
|
-
}, F, { "data-active-headers": "true" }), {
|
106
|
-
default: w(() => [
|
107
|
-
(i(!0), h(ue, null, ie(n.value, (f) => (i(), h(ue, {
|
108
|
-
key: f.key
|
109
|
-
}, [
|
110
|
-
f.key !== "actions" ? (i(), h("div", xl, [
|
111
|
-
N("div", wl, [
|
112
|
-
T(u(al), {
|
113
|
-
modelValue: f.isActive,
|
114
|
-
"onUpdate:modelValue": [
|
115
|
-
(O) => f.isActive = O,
|
116
|
-
p[1] || (p[1] = (O) => I())
|
117
|
-
],
|
118
|
-
class: "!w-fit"
|
119
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
120
|
-
N("div", $l, Ve(f.label), 1)
|
121
|
-
]),
|
122
|
-
n.value.length > 1 ? (i(), A(u(De), {
|
123
|
-
key: 0,
|
124
|
-
width: "18",
|
125
|
-
height: "18",
|
126
|
-
class: "text-oc-text-400 drag-el cursor-move",
|
127
|
-
name: "draggable"
|
128
|
-
})) : b("", !0)
|
129
|
-
])) : b("", !0)
|
130
|
-
], 64))), 128))
|
131
|
-
]),
|
132
|
-
_: 1
|
133
|
-
}, 16, ["modelValue"])
|
134
|
-
])
|
135
|
-
])
|
136
|
-
]),
|
137
|
-
default: w(() => [
|
138
|
-
T(u(Ke), {
|
139
|
-
label: "Edit Column",
|
140
|
-
"left-icon": "setting",
|
141
|
-
variant: "secondary"
|
142
|
-
})
|
143
|
-
]),
|
144
|
-
_: 1
|
145
|
-
}, 8, ["modelValue"]));
|
146
|
-
}
|
147
|
-
}, Ol = { class: "relative flex flex-col gap-9" }, Vl = {
|
148
|
-
key: 0,
|
149
|
-
class: "flex items-center px-4 min-h-[52px]"
|
150
|
-
}, El = {
|
151
|
-
key: 0,
|
152
|
-
class: "absolute flex items-center gap-5 left-5"
|
153
|
-
}, Cl = {
|
154
|
-
key: 1,
|
155
|
-
class: "absolute flex gap-3 left-5"
|
156
|
-
}, Ll = {
|
157
|
-
key: 1,
|
158
|
-
class: "flex justify-center w-full gap-5 md:justify-start"
|
159
|
-
}, Pl = {
|
160
|
-
key: 2,
|
161
|
-
class: "items-center hidden md:flex"
|
162
|
-
}, Nl = {
|
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(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(() => {
|
209
|
-
var e;
|
210
|
-
return (e = s.options) == null ? void 0 : e.cursor;
|
211
|
-
}), B = x(), F = E(() => {
|
212
|
-
var e;
|
213
|
-
return (e = s.options) == null ? void 0 : e.tableOptions;
|
214
|
-
}), I = E(() => s.localDb !== void 0), {
|
215
|
-
localData: L,
|
216
|
-
setFilter: p,
|
217
|
-
setSortBy: f,
|
218
|
-
paginationData: O,
|
219
|
-
isLoading: ee
|
220
|
-
// sortBy,
|
221
|
-
// toggleSort,
|
222
|
-
// updateOrAddLocalData,
|
223
|
-
} = bl({
|
224
|
-
id: s.id,
|
225
|
-
name: (fe = s.localDb) == null ? void 0 : fe.table_name,
|
226
|
-
localDb: (ge = s.localDb) == null ? void 0 : ge.db
|
227
|
-
});
|
228
|
-
I.value && (n.value = O.value, te(() => s.filter, () => {
|
229
|
-
p(s.filter);
|
230
|
-
}, { deep: !0, immediate: !0 }), te(() => s.sortBy, () => {
|
231
|
-
f(s.sortBy);
|
232
|
-
}, { deep: !0, immediate: !0 }), te(() => O.value, () => {
|
233
|
-
n.value = O.value;
|
234
|
-
}, { deep: !0, immediate: !0 })), te(() => {
|
235
|
-
var e;
|
236
|
-
return (e = s.options) == null ? void 0 : e.pagination;
|
237
|
-
}, (e) => {
|
238
|
-
I.value || (n.value = e);
|
239
|
-
}, { deep: !0 });
|
240
|
-
const le = E(() => {
|
241
|
-
var a;
|
242
|
-
const e = {
|
243
|
-
...F.value,
|
244
|
-
headers: B.value ? B.value.map((r) => {
|
245
|
-
var v, c;
|
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))
|
248
|
-
};
|
249
|
-
return (I.value || L.value.length > 0) && (e.fields = L.value), e;
|
250
|
-
}), l = E(() => {
|
251
|
-
var e;
|
252
|
-
return (e = s.options) == null ? void 0 : e.filterOptions;
|
253
|
-
}), se = E(() => {
|
254
|
-
var e;
|
255
|
-
return (e = s.options) == null ? void 0 : e.hidePerPageDropdown;
|
256
|
-
}), Be = E(() => {
|
257
|
-
var e;
|
258
|
-
return ((e = n.value) == null ? void 0 : e.last_page) === 1;
|
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(
|
262
|
-
() => {
|
263
|
-
var e;
|
264
|
-
return pl((e = s.options) == null ? void 0 : e.perPageOptions);
|
265
|
-
}
|
266
|
-
), qe = E(() => fl(Ie.value, n.value)), Qe = E(() => {
|
267
|
-
var e;
|
268
|
-
return ((e = s.selected) == null ? void 0 : e.length) > 0;
|
269
|
-
}), ve = (e) => {
|
270
|
-
!e.trim() || !t.value.selectedSearchOption && U.value.includes(e) || (U.value = [e], V(), $("search-query-changed", e));
|
271
|
-
}, Ne = (e) => {
|
272
|
-
U.value = U.value.filter((a) => a !== e), V();
|
273
|
-
}, J = s.filter;
|
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) => {
|
276
|
-
var a, r, v, c, d, o;
|
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;
|
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);
|
283
|
-
}
|
284
|
-
$("columns-changed", a);
|
285
|
-
}, Je = () => {
|
286
|
-
var e, a, r, v, c, d;
|
287
|
-
if ((a = (e = l.value) == null ? void 0 : e.columnEdit) != null && a.localStorageKey) {
|
288
|
-
const o = Te(l.value.columnEdit.localStorageKey);
|
289
|
-
if (o) {
|
290
|
-
const { fixed: g, active: S } = Ue(
|
291
|
-
o,
|
292
|
-
F.value.headers,
|
293
|
-
l.value.columnEdit.localStorageKey
|
294
|
-
);
|
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];
|
296
|
-
}
|
297
|
-
}
|
298
|
-
}, Ze = (e) => {
|
299
|
-
t.value.selectedSearchOption = e;
|
300
|
-
}, Ge = () => {
|
301
|
-
U.value = [], P.value = "", t.value = ml(t.value, l.value, M.value, P.value), V();
|
302
|
-
}, He = () => {
|
303
|
-
V(null, z.value);
|
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) => {
|
309
|
-
var Q;
|
310
|
-
(Q = l.value.search.options) != null && Q.map((y) => y.value).includes(k) && delete t.value[k];
|
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) => {
|
312
|
-
Array.isArray(t.value[k]) && t.value[k].length === 0 && delete t.value[k];
|
313
|
-
}));
|
314
|
-
let d = (X = (W = l.value) == null ? void 0 : W.tabs) == null ? void 0 : X.key;
|
315
|
-
if (d && P.value !== t.value[d]) {
|
316
|
-
const k = (_ = (Y = l.value.tabs) == null ? void 0 : Y.options) == null ? void 0 : _.find(
|
317
|
-
(Q) => {
|
318
|
-
var y, ae;
|
319
|
-
return ((y = Q.value) == null ? void 0 : y.toString()) === ((ae = t.value[d]) == null ? void 0 : ae.toString());
|
320
|
-
}
|
321
|
-
);
|
322
|
-
if (k != null && k.value)
|
323
|
-
return P.value = k.value, V(), !1;
|
324
|
-
}
|
325
|
-
We(), clearTimeout(ce.value), ce.value = setTimeout(() => {
|
326
|
-
$("update:filter", t.value, v);
|
327
|
-
}, 100);
|
328
|
-
}, Ye = (e, a) => {
|
329
|
-
(a === l.value.tabs.key || a === "tabs") && (P.value = ""), V(e), $("filter-removed", a);
|
330
|
-
};
|
331
|
-
je(() => {
|
332
|
-
var a, r, v, c, d, o, g;
|
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));
|
336
|
-
});
|
337
|
-
const me = E(() => s.isLoading || ee.value);
|
338
|
-
return (e, a) => {
|
339
|
-
var r, v, c, d;
|
340
|
-
return i(), h("div", Ol, [
|
341
|
-
F.value ? (i(), A(u(tl), {
|
342
|
-
key: 0,
|
343
|
-
selected: K.selected,
|
344
|
-
"row-key": K.rowKey,
|
345
|
-
options: le.value,
|
346
|
-
"is-loading": me.value,
|
347
|
-
"loading-rows": M.value,
|
348
|
-
"row-class": K.rowClass,
|
349
|
-
"row-link": K.rowLink,
|
350
|
-
"is-sticky": F.value.isSticky,
|
351
|
-
"is-borderless": F.value.isBorderless,
|
352
|
-
"onUpdate:selected": a[8] || (a[8] = (o) => e.$emit("update:selected", o)),
|
353
|
-
"onClick:row": a[9] || (a[9] = (o) => e.$emit("click:row", o)),
|
354
|
-
"onHover:cell": a[10] || (a[10] = (o) => e.$emit("hover:cell", o))
|
355
|
-
}, ll({
|
356
|
-
after: w(() => [
|
357
|
-
j(e.$slots, "after")
|
358
|
-
]),
|
359
|
-
empty: w(() => [
|
360
|
-
j(e.$slots, "empty")
|
361
|
-
]),
|
362
|
-
"table-header": w((o) => [
|
363
|
-
j(e.$slots, "table-header", Ee(Ce(o)))
|
364
|
-
]),
|
365
|
-
"table-body": w((o) => [
|
366
|
-
j(e.$slots, "table-body", Ee(Ce(o)))
|
367
|
-
]),
|
368
|
-
_: 2
|
369
|
-
}, [
|
370
|
-
e.$slots.before || (r = l.value) != null && r.search || (v = l.value) != null && v.form || (c = l.value) != null && c.tabs ? {
|
371
|
-
name: "before",
|
372
|
-
fn: w(() => {
|
373
|
-
var o, g, S, D;
|
374
|
-
return [
|
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), {
|
381
|
-
key: 0,
|
382
|
-
modelValue: P.value,
|
383
|
-
"onUpdate:modelValue": [
|
384
|
-
a[0] || (a[0] = (C) => P.value = C),
|
385
|
-
a[1] || (a[1] = (C) => V(null, !1, "", !1, !0))
|
386
|
-
],
|
387
|
-
"is-disabled": me.value,
|
388
|
-
tabs: l.value.tabs.options,
|
389
|
-
variant: "pills"
|
390
|
-
}, null, 8, ["modelValue", "is-disabled", "tabs"])) : b("", !0)
|
391
|
-
])),
|
392
|
-
j(e.$slots, "filter-options", {}, () => {
|
393
|
-
var C, q, Z, G, H, W, X, Y, _, k, Q;
|
394
|
-
return [
|
395
|
-
(C = l.value) != null && C.search || (q = l.value) != null && q.form || (Z = l.value) != null && Z.columnEdit ? (i(), h("div", {
|
396
|
-
key: 0,
|
397
|
-
class: re([
|
398
|
-
"flex gap-3 absolute ml-auto bg-oc-bg-light right-4 max-w-[calc(100%-24px)]",
|
399
|
-
l.value ? de.value ? "md:w-fit w-full" : "" : "w-full justify-end"
|
400
|
-
])
|
401
|
-
}, [
|
402
|
-
(G = l.value) != null && G.search ? (i(), A(u(sl), {
|
403
|
-
key: 0,
|
404
|
-
"is-search-only": !l.value.tabs || l.value.isSearchOnly,
|
405
|
-
"search-options": ((H = l.value.search) == null ? void 0 : H.options) ?? [],
|
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",
|
407
|
-
onAddQuery: ve,
|
408
|
-
onToggle: a[2] || (a[2] = (y) => de.value = y),
|
409
|
-
onChangeSearchKey: Ze
|
410
|
-
}, null, 8, ["is-search-only", "search-options", "selected-option"])) : b("", !0),
|
411
|
-
(k = l.value) != null && k.form ? (i(), A(u(Ae), {
|
412
|
-
key: 1,
|
413
|
-
modelValue: R.value,
|
414
|
-
"onUpdate:modelValue": [
|
415
|
-
a[6] || (a[6] = (y) => R.value = y),
|
416
|
-
a[7] || (a[7] = (y) => e.$emit("filter-open", y))
|
417
|
-
],
|
418
|
-
distance: 9,
|
419
|
-
placement: "bottom-end",
|
420
|
-
"is-attach-to-body": ""
|
421
|
-
}, {
|
422
|
-
menu: w(() => [
|
423
|
-
R.value ? (i(), A(u(ul), {
|
424
|
-
key: 0,
|
425
|
-
id: K.id,
|
426
|
-
"json-form": l.value.form ?? [],
|
427
|
-
grid: l.value.grid ?? null,
|
428
|
-
values: s.filter,
|
429
|
-
actions: l.value.actions,
|
430
|
-
onApplyFilter: a[3] || (a[3] = (y) => V(y)),
|
431
|
-
onFilterFieldsChanged: a[4] || (a[4] = (y) => $("filter-fields-changed", y)),
|
432
|
-
onCancel: a[5] || (a[5] = (y) => R.value = !1)
|
433
|
-
}, {
|
434
|
-
default: w(({ errors: y, values: ae, jsonForm: _e, updateForm: el }) => [
|
435
|
-
j(e.$slots, "custom-filter-form", {
|
436
|
-
errors: y,
|
437
|
-
values: ae,
|
438
|
-
jsonForm: _e,
|
439
|
-
updateFilter: el
|
440
|
-
})
|
441
|
-
]),
|
442
|
-
_: 3
|
443
|
-
}, 8, ["id", "json-form", "grid", "values", "actions"])) : b("", !0)
|
444
|
-
]),
|
445
|
-
default: w(() => [
|
446
|
-
T(u(Ke), {
|
447
|
-
"is-active": R.value,
|
448
|
-
variant: "secondary",
|
449
|
-
"left-icon": "filter"
|
450
|
-
}, null, 8, ["is-active"])
|
451
|
-
]),
|
452
|
-
_: 3
|
453
|
-
}, 8, ["modelValue"])) : b("", !0),
|
454
|
-
l.value.columnEdit ? (i(), A(Fl, {
|
455
|
-
key: 2,
|
456
|
-
options: t.value.columnEdit,
|
457
|
-
headers: ((Q = F.value) == null ? void 0 : Q.headers) || [],
|
458
|
-
"local-key": l.value.columnEdit.localStorageKey,
|
459
|
-
onUpdateOrder: Me
|
460
|
-
}, null, 8, ["options", "headers", "local-key"])) : b("", !0)
|
461
|
-
], 2)) : b("", !0)
|
462
|
-
];
|
463
|
-
})
|
464
|
-
])) : b("", !0),
|
465
|
-
T(u(il), {
|
466
|
-
filters: Re.value,
|
467
|
-
queries: U.value,
|
468
|
-
class: "border-t border-oc-gray-200",
|
469
|
-
onRemoveQuery: Ne,
|
470
|
-
onRemoveAll: Ge,
|
471
|
-
onRemoveFilter: Ye
|
472
|
-
}, null, 8, ["filters", "queries"])
|
473
|
-
];
|
474
|
-
}),
|
475
|
-
key: "0"
|
476
|
-
} : void 0,
|
477
|
-
ie((d = F.value) == null ? void 0 : d.headers, (o, g) => ({
|
478
|
-
name: o.key,
|
479
|
-
fn: w(({ data: S, item: D }) => [
|
480
|
-
j(e.$slots, o.key, {
|
481
|
-
data: S,
|
482
|
-
item: D
|
483
|
-
})
|
484
|
-
])
|
485
|
-
}))
|
486
|
-
]), 1032, ["selected", "row-key", "options", "is-loading", "loading-rows", "row-class", "row-link", "is-sticky", "is-borderless"])) : b("", !0),
|
487
|
-
j(e.$slots, "before-pagination"),
|
488
|
-
u(n) || m.value ? (i(), h("div", {
|
489
|
-
key: 1,
|
490
|
-
class: re(["flex items-center gap-3", u(n) && u(n).last_page === 1 ? "justify-end" : ""])
|
491
|
-
}, [
|
492
|
-
u(n) && !Be.value ? (i(), A(u(rl), {
|
493
|
-
key: 0,
|
494
|
-
modelValue: z.value,
|
495
|
-
"onUpdate:modelValue": [
|
496
|
-
a[11] || (a[11] = (o) => z.value = o),
|
497
|
-
He
|
498
|
-
],
|
499
|
-
class: "justify-center",
|
500
|
-
"max-page": u(n).last_page,
|
501
|
-
strategy: u(n).strategy,
|
502
|
-
"total-visible": "5"
|
503
|
-
}, null, 8, ["modelValue", "max-page", "strategy"])) : b("", !0),
|
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)
|
508
|
-
}, null, 8, ["disabled"]),
|
509
|
-
T(u(Le), {
|
510
|
-
disabled: !m.value.next,
|
511
|
-
"is-next": "",
|
512
|
-
onClick: a[13] || (a[13] = (o) => m.value.next ? V(null, !1, m.value.next) : null)
|
513
|
-
}, null, 8, ["disabled"])
|
514
|
-
])) : b("", !0),
|
515
|
-
se.value ? b("", !0) : (i(), h("div", Pl, [
|
516
|
-
T(u(nl), {
|
517
|
-
modelValue: M.value,
|
518
|
-
"onUpdate:modelValue": [
|
519
|
-
a[14] || (a[14] = (o) => M.value = o),
|
520
|
-
a[15] || (a[15] = (o) => V(null))
|
521
|
-
],
|
522
|
-
label: "Item per page",
|
523
|
-
"is-inline-label": "",
|
524
|
-
"popper-options": { placement: "auto" },
|
525
|
-
options: qe.value
|
526
|
-
}, null, 8, ["modelValue", "options"])
|
527
|
-
]))
|
528
|
-
], 2)) : b("", !0)
|
529
|
-
]);
|
530
|
-
};
|
531
|
-
}
|
532
|
-
};
|
533
|
-
export {
|
534
|
-
Nl as default
|
535
|
-
};
|