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