@orchidui/core 1.8.1-83 → 1.8.1-87
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/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-DbMUMhSg.js → OcAccountSetupProgress-g7V1kvOf.js} +1 -1
- package/dist/{OcComplexCalendar-iMwD4b9p.js → OcComplexCalendar-CWPFV545.js} +1 -1
- package/dist/{OcComplexDatePicker-i6g9gCH7.js → OcComplexDatePicker-DXg8PEZz.js} +1 -1
- package/dist/{OcCropper-BAviL9N9.js → OcCropper-BfXmon8i.js} +1 -1
- package/dist/OcDataTable-CsQHegQT.js +590 -0
- package/dist/{OcDraggableList-B7iaQav7.js → OcDraggableList-BMlc5DDP.js} +36 -36
- package/dist/{OcEmojiPicker-CNijB700.js → OcEmojiPicker-vNLeufFJ.js} +1 -1
- package/dist/{OcFilterForm-BmGEU6mb.js → OcFilterForm-DxNgWEC9.js} +1 -1
- package/dist/{OcFilterSearch-CQl7NSzY.js → OcFilterSearch-D1gAk_Ea.js} +1 -1
- package/dist/{OcFilterSearchFor-BL4PHk8s.js → OcFilterSearchFor-CKrNeOon.js} +1 -1
- package/dist/{OcModalCropper-BnTsIV2b.js → OcModalCropper-DOSQE3NJ.js} +2 -2
- package/dist/{OcTimePicker-oTfoRatl.js → OcTimePicker-Cjo8eKGB.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-DztLt1rw.js → SubPlanCard-BTqSr2AX.js} +1 -1
- package/dist/{ThumbnailSection-Btl4Irom.js → ThumbnailSection-DvanWXUV.js} +1 -1
- package/dist/{ThumbnailTheme-Ct4HtqZG.js → ThumbnailTheme-Cb9Ya2ZK.js} +1 -1
- package/dist/{index-DVnVG4hx.js → index-DkumyhAj.js} +2876 -3002
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/ColumnEdit-D13znC3v.js +0 -141
- package/dist/OcDataTable-dEi3E20T.js +0 -456
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,
|
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-DkumyhAj.js";
|
3
3
|
import { _ as le } from "./OcProgressBar-hiyC5XSc.js";
|
4
4
|
import { _ as me } from "./OcHorizontalProgressbar.vue_vue_type_script_setup_true_lang-4eVgPDi5.js";
|
5
5
|
import { _ as be } from "./OcSwitchTabs-CYp676bj.js";
|
package/package.json
CHANGED
@@ -1,141 +0,0 @@
|
|
1
|
-
import { ref as v, onMounted as S, openBlock as l, createBlock as x, unref as r, withCtx as m, createElementVNode as d, createElementBlock as i, createVNode as c, mergeProps as w, Fragment as g, renderList as _, normalizeClass as j, toDisplayString as C, createCommentVNode as p } from "vue";
|
2
|
-
import { az as D, C as K, B as L } from "./index-DVnVG4hx.js";
|
3
|
-
import { VueDraggableNext as A } from "vue-draggable-next";
|
4
|
-
import { getFromLocalStorage as O, formatHeadersFromLocalStorage as z } from "./DataTable/utils/editColumnsUtils.js";
|
5
|
-
import { _ as E } from "./OcIcon-CSpRxnwd.js";
|
6
|
-
const M = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, $ = {
|
7
|
-
key: 0,
|
8
|
-
class: "gap-y-2 flex flex-col border-b pb-3 border-oc-gray-200"
|
9
|
-
}, H = { class: "gap-y-2 flex flex-col" }, I = {
|
10
|
-
key: 0,
|
11
|
-
class: "flex items-center bg-white justify-between h-[26px]"
|
12
|
-
}, P = { class: "flex items-center w-full gap-x-3" }, q = { class: "truncate w-full max-w-[160px]" }, W = {
|
13
|
-
__name: "ColumnEdit",
|
14
|
-
props: {
|
15
|
-
options: {
|
16
|
-
type: Object,
|
17
|
-
default: () => ({})
|
18
|
-
},
|
19
|
-
headers: {
|
20
|
-
type: Array,
|
21
|
-
default: () => []
|
22
|
-
},
|
23
|
-
localKey: {
|
24
|
-
type: String,
|
25
|
-
default: ""
|
26
|
-
}
|
27
|
-
},
|
28
|
-
emits: ["change-active", "onMoved", "update-order"],
|
29
|
-
setup(F, { emit: U }) {
|
30
|
-
const B = U, n = F, u = v([]), a = v([]), y = v(!1), f = (s = !1) => {
|
31
|
-
a.value = a.value.map((e) => ({
|
32
|
-
...e,
|
33
|
-
isActive: !0
|
34
|
-
})), B("update-order", {
|
35
|
-
fixedHeaders: a.value,
|
36
|
-
activeHeaders: u.value,
|
37
|
-
isOnMount: s
|
38
|
-
});
|
39
|
-
}, k = {
|
40
|
-
handle: ".drag-el",
|
41
|
-
filter: ".is-disabled",
|
42
|
-
group: "headers",
|
43
|
-
animation: 500,
|
44
|
-
forceFallback: !1,
|
45
|
-
move: (s) => s.to.dataset.activeHeaders ? !0 : !!s.draggedContext.futureIndex,
|
46
|
-
"onUpdate:modelValue": () => f()
|
47
|
-
};
|
48
|
-
return S(() => {
|
49
|
-
const s = O(n.localKey), { fixed: e, active: t } = z(s, n.headers, n.localKey);
|
50
|
-
a.value = e || n.headers.slice(0, 1), u.value = t || n.headers.slice(1).map((o) => {
|
51
|
-
var b, V, h;
|
52
|
-
return {
|
53
|
-
...o,
|
54
|
-
isActive: ((h = (V = (b = n.options) == null ? void 0 : b.active) == null ? void 0 : V.find((N) => N.key === o.key)) == null ? void 0 : h.isActive) ?? !0
|
55
|
-
};
|
56
|
-
}), f(!0);
|
57
|
-
}), (s, e) => (l(), x(r(D), {
|
58
|
-
modelValue: y.value,
|
59
|
-
"onUpdate:modelValue": e[3] || (e[3] = (t) => y.value = t),
|
60
|
-
class: "h-[36px]",
|
61
|
-
"is-attach-to-body": ""
|
62
|
-
}, {
|
63
|
-
menu: m(() => [
|
64
|
-
d("div", M, [
|
65
|
-
a.value.length ? (l(), i("div", $, [
|
66
|
-
e[4] || (e[4] = d("span", { class: "text-oc-text-400 font-medium" }, "Fixed columns", -1)),
|
67
|
-
c(r(A), w({
|
68
|
-
key: "key",
|
69
|
-
modelValue: a.value,
|
70
|
-
"onUpdate:modelValue": e[0] || (e[0] = (t) => a.value = t)
|
71
|
-
}, k), {
|
72
|
-
default: m(() => [
|
73
|
-
(l(!0), i(g, null, _(a.value, (t, o) => (l(), i("div", {
|
74
|
-
key: t.key,
|
75
|
-
class: j(["flex items-center justify-between h-[26px]", o ? "" : "is-disabled"])
|
76
|
-
}, [
|
77
|
-
d("span", null, C(t.label), 1),
|
78
|
-
o ? (l(), x(r(E), {
|
79
|
-
key: 0,
|
80
|
-
width: "18",
|
81
|
-
height: "18",
|
82
|
-
class: "text-oc-text-400 drag-el cursor-move",
|
83
|
-
name: "draggable"
|
84
|
-
})) : p("", !0)
|
85
|
-
], 2))), 128))
|
86
|
-
]),
|
87
|
-
_: 1
|
88
|
-
}, 16, ["modelValue"])
|
89
|
-
])) : p("", !0),
|
90
|
-
d("div", H, [
|
91
|
-
e[5] || (e[5] = d("span", { class: "text-oc-text-400 font-medium" }, "Active columns", -1)),
|
92
|
-
c(r(A), w({
|
93
|
-
key: "key",
|
94
|
-
modelValue: u.value,
|
95
|
-
"onUpdate:modelValue": e[2] || (e[2] = (t) => u.value = t)
|
96
|
-
}, k, { "data-active-headers": "true" }), {
|
97
|
-
default: m(() => [
|
98
|
-
(l(!0), i(g, null, _(u.value, (t) => (l(), i(g, {
|
99
|
-
key: t.key
|
100
|
-
}, [
|
101
|
-
t.key !== "actions" ? (l(), i("div", I, [
|
102
|
-
d("div", P, [
|
103
|
-
c(r(K), {
|
104
|
-
modelValue: t.isActive,
|
105
|
-
"onUpdate:modelValue": [
|
106
|
-
(o) => t.isActive = o,
|
107
|
-
e[1] || (e[1] = (o) => f())
|
108
|
-
],
|
109
|
-
class: "!w-fit"
|
110
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
111
|
-
d("div", q, C(t.label), 1)
|
112
|
-
]),
|
113
|
-
u.value.length > 1 ? (l(), x(r(E), {
|
114
|
-
key: 0,
|
115
|
-
width: "18",
|
116
|
-
height: "18",
|
117
|
-
class: "text-oc-text-400 drag-el cursor-move",
|
118
|
-
name: "draggable"
|
119
|
-
})) : p("", !0)
|
120
|
-
])) : p("", !0)
|
121
|
-
], 64))), 128))
|
122
|
-
]),
|
123
|
-
_: 1
|
124
|
-
}, 16, ["modelValue"])
|
125
|
-
])
|
126
|
-
])
|
127
|
-
]),
|
128
|
-
default: m(() => [
|
129
|
-
c(r(L), {
|
130
|
-
label: "Edit Column",
|
131
|
-
"left-icon": "setting",
|
132
|
-
variant: "secondary"
|
133
|
-
})
|
134
|
-
]),
|
135
|
-
_: 1
|
136
|
-
}, 8, ["modelValue"]));
|
137
|
-
}
|
138
|
-
};
|
139
|
-
export {
|
140
|
-
W as default
|
141
|
-
};
|
@@ -1,456 +0,0 @@
|
|
1
|
-
import { defineAsyncComponent as Ye, computed as D, ref as M, onMounted as Be, openBlock as k, createElementBlock as I, createBlock as Q, unref as O, createSlots as Me, withCtx as x, renderSlot as P, normalizeProps as ne, guardReactiveProps as ve, createCommentVNode as E, normalizeClass as de, createVNode as J, renderList as Ie } from "vue";
|
2
|
-
import { K as Ne, Z as Te, aJ as qe, az as Qe, aK as Re, B as Ue, aL as ze, H as Je, I as ce, j as He } from "./index-DVnVG4hx.js";
|
3
|
-
import G from "dayjs";
|
4
|
-
import { getFromLocalStorage as fe, formatHeadersToLocalStorage as Ze, setInLocalStorage as pe, formatHeadersFromLocalStorage as Ge } from "./DataTable/utils/editColumnsUtils.js";
|
5
|
-
const We = { class: "relative flex flex-col gap-9" }, Xe = {
|
6
|
-
key: 0,
|
7
|
-
class: "flex items-center px-4 min-h-[52px]"
|
8
|
-
}, _e = {
|
9
|
-
key: 0,
|
10
|
-
class: "absolute flex items-center gap-5 left-5"
|
11
|
-
}, el = {
|
12
|
-
key: 1,
|
13
|
-
class: "absolute flex gap-3 left-5"
|
14
|
-
}, ll = {
|
15
|
-
key: 1,
|
16
|
-
class: "flex justify-center w-full gap-5 md:justify-start"
|
17
|
-
}, al = {
|
18
|
-
key: 2,
|
19
|
-
class: "items-center hidden md:flex"
|
20
|
-
}, rl = {
|
21
|
-
__name: "OcDataTable",
|
22
|
-
props: {
|
23
|
-
isLoading: Boolean,
|
24
|
-
id: {
|
25
|
-
type: String,
|
26
|
-
required: !0
|
27
|
-
},
|
28
|
-
options: {
|
29
|
-
type: Object,
|
30
|
-
required: !0
|
31
|
-
},
|
32
|
-
filter: {
|
33
|
-
type: Object,
|
34
|
-
required: !0
|
35
|
-
},
|
36
|
-
selected: {
|
37
|
-
type: Array,
|
38
|
-
required: !1
|
39
|
-
},
|
40
|
-
rowClass: String,
|
41
|
-
rowKey: {
|
42
|
-
type: String,
|
43
|
-
Function,
|
44
|
-
default: "id"
|
45
|
-
},
|
46
|
-
rowLink: String
|
47
|
-
},
|
48
|
-
emits: {
|
49
|
-
"update:selected": [],
|
50
|
-
"update:filter": [],
|
51
|
-
"click:row": [],
|
52
|
-
"filter-fields-changed": [],
|
53
|
-
"filter-removed": [],
|
54
|
-
"filter-open": [],
|
55
|
-
"search-query-changed": [],
|
56
|
-
"hover:cell": [],
|
57
|
-
"columns-changed": []
|
58
|
-
},
|
59
|
-
setup(V, { emit: me }) {
|
60
|
-
var ee, le, ae, te, oe, se, ue, re, ie;
|
61
|
-
const ye = Ye(() => import("./ColumnEdit-D13znC3v.js")), p = V, z = me, h = D(() => {
|
62
|
-
var l;
|
63
|
-
return (l = p.options) == null ? void 0 : l.pagination;
|
64
|
-
}), K = D(() => {
|
65
|
-
var l;
|
66
|
-
return (l = p.options) == null ? void 0 : l.cursor;
|
67
|
-
}), H = M(), C = D(() => {
|
68
|
-
var l;
|
69
|
-
return (l = p.options) == null ? void 0 : l.tableOptions;
|
70
|
-
}), ge = D(() => {
|
71
|
-
var l;
|
72
|
-
return {
|
73
|
-
...C.value,
|
74
|
-
headers: H.value ? H.value.map((e) => {
|
75
|
-
var s, r;
|
76
|
-
return e.class = ((r = (s = C.value) == null ? void 0 : s.headers.find((v) => v.key === e.key)) == null ? void 0 : r.class) ?? "", e;
|
77
|
-
}).filter((e) => e.isActive) : (l = C.value) == null ? void 0 : l.headers.filter((e) => Pe(e.key))
|
78
|
-
};
|
79
|
-
}), a = D(() => {
|
80
|
-
var l;
|
81
|
-
return (l = p.options) == null ? void 0 : l.filterOptions;
|
82
|
-
}), be = D(() => {
|
83
|
-
var l;
|
84
|
-
return (l = p.options) == null ? void 0 : l.hidePerPageDropdown;
|
85
|
-
}), ke = D(() => {
|
86
|
-
var l;
|
87
|
-
return ((l = h.value) == null ? void 0 : l.last_page) === 1;
|
88
|
-
}), R = M(!1), $ = M(p.filter[(le = (ee = a.value) == null ? void 0 : ee.tabs) == null ? void 0 : le.key]), U = M(p.filter.page), N = M(
|
89
|
-
(te = (ae = a.value) == null ? void 0 : ae.per_page) != null && te.key ? p.filter[(se = (oe = a.value) == null ? void 0 : oe.per_page) == null ? void 0 : se.key] : p.filter.per_page
|
90
|
-
), W = ((ie = p.filter[(re = (ue = a.value) == null ? void 0 : ue.search) == null ? void 0 : re.key]) == null ? void 0 : ie.trim()) ?? "", Y = M(W ? W.split(",") : []), X = M(!1), he = D(
|
91
|
-
() => {
|
92
|
-
var l, e;
|
93
|
-
return (e = (l = p.options) == null ? void 0 : l.perPageOptions) == null ? void 0 : e.map(
|
94
|
-
(s) => ({
|
95
|
-
label: `${s}`,
|
96
|
-
value: s
|
97
|
-
})
|
98
|
-
);
|
99
|
-
}
|
100
|
-
), Se = D(() => {
|
101
|
-
let l = [
|
102
|
-
{
|
103
|
-
label: "10",
|
104
|
-
value: 10
|
105
|
-
},
|
106
|
-
{
|
107
|
-
label: "15",
|
108
|
-
value: 15
|
109
|
-
},
|
110
|
-
{
|
111
|
-
label: "20",
|
112
|
-
value: 20
|
113
|
-
},
|
114
|
-
{
|
115
|
-
label: "25",
|
116
|
-
value: 25
|
117
|
-
},
|
118
|
-
{
|
119
|
-
label: "40",
|
120
|
-
value: 40
|
121
|
-
},
|
122
|
-
{
|
123
|
-
label: "50",
|
124
|
-
value: 50
|
125
|
-
},
|
126
|
-
{
|
127
|
-
label: "75",
|
128
|
-
value: 75
|
129
|
-
},
|
130
|
-
{
|
131
|
-
label: "99",
|
132
|
-
value: 99
|
133
|
-
}
|
134
|
-
], e = he.value ?? l;
|
135
|
-
if (h.value) {
|
136
|
-
const s = h.value.total < 100 ? h.value.total : 100;
|
137
|
-
s > 10 && (e = e.filter((r) => r.value <= s));
|
138
|
-
}
|
139
|
-
return [...new Set(e)];
|
140
|
-
}), we = D(() => {
|
141
|
-
var l;
|
142
|
-
return ((l = p.selected) == null ? void 0 : l.length) > 0;
|
143
|
-
}), _ = (l) => {
|
144
|
-
!l.trim() || !t.value.selectedSearchOption && Y.value.includes(l) || (Y.value = [l], w(), z("search-query-changed", l));
|
145
|
-
}, Oe = (l) => {
|
146
|
-
Y.value = Y.value.filter((e) => e !== l), w();
|
147
|
-
}, T = p.filter;
|
148
|
-
!T && h ? T.page = 1 : !T && K && (T.cursor = "");
|
149
|
-
const t = M(T), Ee = () => {
|
150
|
-
var e, s, r, v, n, o, d, f, g, y, S, F, j, L;
|
151
|
-
Y.value = [], $.value = "";
|
152
|
-
const l = {};
|
153
|
-
a.value ? T.page = 1 : T.cursor = "", (s = (e = a.value) == null ? void 0 : e.per_page) != null && s.key ? l[(v = (r = a.value) == null ? void 0 : r.per_page) == null ? void 0 : v.key] = N.value : l.per_page = N.value, (o = (n = a.value) == null ? void 0 : n.tabs) != null && o.key ? l[(f = (d = a.value) == null ? void 0 : d.tabs) == null ? void 0 : f.key] = $.value : l.tabs = $.value, (y = (g = a.value) == null ? void 0 : g.columnEdit) != null && y.key && (l[(F = (S = a.value) == null ? void 0 : S.columnEdit) == null ? void 0 : F.key] = t.value[(L = (j = a.value) == null ? void 0 : j.columnEdit) == null ? void 0 : L.key]), t.value = l, w();
|
154
|
-
}, $e = () => {
|
155
|
-
w(null, U.value);
|
156
|
-
}, Fe = () => {
|
157
|
-
p.id && pe(p.id, JSON.stringify(t.value));
|
158
|
-
}, je = () => p.id ? fe(p.id) : null, w = (l = null, e = !1, s = "", r = !1, v = !1) => {
|
159
|
-
var o, d, f, g, y, S, F, j, L, B, A, u, b;
|
160
|
-
h.value && !e && (U.value = 1), h.value ? t.value.page = U.value : t.value.cursor = s, (o = a.value) != null && o.per_page ? t.value[a.value.per_page.key] = N.value : t.value.per_page = N.value, (d = a.value) != null && d.tabs && v && (t.value[a.value.tabs.key] = $.value), (f = a.value) != null && f.search && ((y = (g = a.value.search) == null ? void 0 : g.options) != null && y.length ? (Object.keys(t.value).forEach((c) => {
|
161
|
-
var m;
|
162
|
-
(m = a.value.search.options) != null && m.map((i) => i.value).includes(c) && delete t.value[c];
|
163
|
-
}), t.value[((S = t.value) == null ? void 0 : S.selectedSearchOption) || ((L = (j = (F = a.value.search) == null ? void 0 : F.options) == null ? void 0 : j[0]) == null ? void 0 : L.value) || a.value.search.key] = Y.value.join()) : t.value[a.value.search.key] = Y.value.join()), l && (R.value = !1, t.value = { ...t.value, ...l }, Object.keys(t.value).forEach((c) => {
|
164
|
-
Array.isArray(t.value[c]) && t.value[c].length === 0 && delete t.value[c];
|
165
|
-
}));
|
166
|
-
let n = (A = (B = a.value) == null ? void 0 : B.tabs) == null ? void 0 : A.key;
|
167
|
-
if (n && $.value !== t.value[n]) {
|
168
|
-
const c = (b = (u = a.value.tabs) == null ? void 0 : u.options) == null ? void 0 : b.find(
|
169
|
-
(m) => {
|
170
|
-
var i, q;
|
171
|
-
return ((i = m.value) == null ? void 0 : i.toString()) === ((q = t.value[n]) == null ? void 0 : q.toString());
|
172
|
-
}
|
173
|
-
);
|
174
|
-
if (c != null && c.value)
|
175
|
-
return $.value = c.value, w(), !1;
|
176
|
-
}
|
177
|
-
Fe(), z("update:filter", t.value, r);
|
178
|
-
}, Le = (l, e) => {
|
179
|
-
(e === a.value.tabs.key || e === "tabs") && ($.value = ""), w(l), z("filter-removed", e);
|
180
|
-
}, Ae = (l) => {
|
181
|
-
let e = [];
|
182
|
-
return l.forEach((s) => {
|
183
|
-
e.push(s.key);
|
184
|
-
}), e;
|
185
|
-
}, De = D(() => {
|
186
|
-
if (t.value) {
|
187
|
-
let l = [];
|
188
|
-
return Object.keys(t.value).forEach((e) => {
|
189
|
-
var n, o, d, f, g, y, S, F, j, L, B;
|
190
|
-
let s = (o = (n = a.value) == null ? void 0 : n.tabs) == null ? void 0 : o.key;
|
191
|
-
const r = (f = (d = a.value) == null ? void 0 : d.search) == null ? void 0 : f.key, v = ((y = (g = a.value) == null ? void 0 : g.per_page) == null ? void 0 : y.key) ?? "per_page";
|
192
|
-
if ((S = a.value.form) == null || S.find((A) => {
|
193
|
-
A.name === s && (s = "");
|
194
|
-
}), e !== "page" && e !== "cursor" && e !== v && e !== s && e !== r) {
|
195
|
-
let A = null, u = (F = a.value.form) == null ? void 0 : F.find((c) => {
|
196
|
-
if (typeof c.name == "object") {
|
197
|
-
let m = !1;
|
198
|
-
return c.name.forEach((i) => {
|
199
|
-
i.key === e && (m = !0, A = Ae(c.name));
|
200
|
-
}), m;
|
201
|
-
} else
|
202
|
-
return c.name === e;
|
203
|
-
}), b = "";
|
204
|
-
if (u && t.value[e]) {
|
205
|
-
if (typeof u.name == "object" ? (j = u.name) == null || j.forEach((m) => {
|
206
|
-
b && (b += " - "), b += t.value[m.key];
|
207
|
-
}) : b = t.value[e], u.props.options && (b = (u.props.multiple ? t.value[e] : [t.value[e]]).map(
|
208
|
-
(i) => {
|
209
|
-
var q;
|
210
|
-
return (q = u.props.options.find(({ value: Z }) => Z === i)) == null ? void 0 : q.label;
|
211
|
-
}
|
212
|
-
).join(", ")), u.type === "RangeInput" && Array.isArray(t.value[e]) && (b = t.value[e][0].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + " - " + t.value[e][1].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")), u.type === "DatePicker")
|
213
|
-
if (((L = u == null ? void 0 : u.props) == null ? void 0 : L.type) === "range" && u.name && u.name[1]) {
|
214
|
-
const m = G(t.value[u.name[0].key]).format("MM/DD/YYYY"), i = G(t.value[u.name[1].key]).format("MM/DD/YYYY");
|
215
|
-
b = m === i ? m : m + " - " + i;
|
216
|
-
} else b = G(t.value[u.name]).format("MM/DD/YYYY");
|
217
|
-
let c = `${(B = u == null ? void 0 : u.props) == null ? void 0 : B.label} : ${b}`;
|
218
|
-
u && u.name && typeof u.name == "object" && l.find((i) => i.name === A[0]) && (c = ""), l.push({
|
219
|
-
label: c,
|
220
|
-
name: e,
|
221
|
-
multiNames: A
|
222
|
-
});
|
223
|
-
}
|
224
|
-
}
|
225
|
-
}), l;
|
226
|
-
}
|
227
|
-
return [];
|
228
|
-
}), Pe = (l) => {
|
229
|
-
var e, s, r, v, n, o;
|
230
|
-
return ((o = (n = (v = (r = t.value) == null ? void 0 : r[(s = (e = a.value) == null ? void 0 : e.columnEdit) == null ? void 0 : s.key]) == null ? void 0 : v.active) == null ? void 0 : n.find((d) => d.key === l)) == null ? void 0 : o.isActive) ?? !0;
|
231
|
-
}, Ve = ({ fixedHeaders: l, activeHeaders: e, isOnMount: s }) => {
|
232
|
-
var r, v, n, o, d, f, g, y;
|
233
|
-
if (t.value[(v = (r = a.value) == null ? void 0 : r.columnEdit) == null ? void 0 : v.key] || (t.value[(o = (n = a.value) == null ? void 0 : n.columnEdit) == null ? void 0 : o.key] = {}), t.value[(f = (d = a.value) == null ? void 0 : d.columnEdit) == null ? void 0 : f.key].fixed = l, t.value[(y = (g = a.value) == null ? void 0 : g.columnEdit) == null ? void 0 : y.key].active = e, H.value = [...l, ...e], !s) {
|
234
|
-
const S = Ze(l, e);
|
235
|
-
pe(a.value.columnEdit.localStorageKey, S);
|
236
|
-
}
|
237
|
-
z("columns-changed", e);
|
238
|
-
}, Ke = () => {
|
239
|
-
var l, e, s, r, v, n;
|
240
|
-
if ((e = (l = a.value) == null ? void 0 : l.columnEdit) != null && e.localStorageKey) {
|
241
|
-
const o = fe(a.value.columnEdit.localStorageKey);
|
242
|
-
if (o) {
|
243
|
-
const { fixed: d, active: f } = Ge(
|
244
|
-
o,
|
245
|
-
C.value.headers,
|
246
|
-
a.value.columnEdit.localStorageKey
|
247
|
-
);
|
248
|
-
t.value[(r = (s = a.value) == null ? void 0 : s.columnEdit) == null ? void 0 : r.key].fixed = d, t.value[(n = (v = a.value) == null ? void 0 : v.columnEdit) == null ? void 0 : n.key].active = f, H.value = [...d, ...f];
|
249
|
-
}
|
250
|
-
}
|
251
|
-
}, Ce = (l) => {
|
252
|
-
t.value.selectedSearchOption = l;
|
253
|
-
};
|
254
|
-
return Be(() => {
|
255
|
-
var e, s, r, v, n, o, d;
|
256
|
-
Ke();
|
257
|
-
const l = je();
|
258
|
-
l && (t.value = JSON.parse(l), $.value = $.value || ((e = t.value) == null ? void 0 : e.tabs) || ((v = t.value) == null ? void 0 : v[(r = (s = a.value) == null ? void 0 : s.tabs) == null ? void 0 : r.key]), (n = t.value) != null && n.selectedSearchOption && _(t.value[(o = t.value) == null ? void 0 : o.selectedSearchOption]), U.value = ((d = t.value) == null ? void 0 : d.page) || 1, w(null, !0, t.value.cursor, !0));
|
259
|
-
}), (l, e) => {
|
260
|
-
var s, r, v, n;
|
261
|
-
return k(), I("div", We, [
|
262
|
-
C.value ? (k(), Q(O(Ne), {
|
263
|
-
key: 0,
|
264
|
-
selected: V.selected,
|
265
|
-
"row-key": V.rowKey,
|
266
|
-
options: ge.value,
|
267
|
-
"is-loading": V.isLoading,
|
268
|
-
"loading-rows": N.value,
|
269
|
-
"row-class": V.rowClass,
|
270
|
-
"row-link": V.rowLink,
|
271
|
-
"is-sticky": C.value.isSticky,
|
272
|
-
"is-borderless": C.value.isBorderless,
|
273
|
-
"onUpdate:selected": e[8] || (e[8] = (o) => l.$emit("update:selected", o)),
|
274
|
-
"onClick:row": e[9] || (e[9] = (o) => l.$emit("click:row", o)),
|
275
|
-
"onHover:cell": e[10] || (e[10] = (o) => l.$emit("hover:cell", o))
|
276
|
-
}, Me({
|
277
|
-
after: x(() => [
|
278
|
-
P(l.$slots, "after")
|
279
|
-
]),
|
280
|
-
empty: x(() => [
|
281
|
-
P(l.$slots, "empty")
|
282
|
-
]),
|
283
|
-
"table-header": x((o) => [
|
284
|
-
P(l.$slots, "table-header", ne(ve(o)))
|
285
|
-
]),
|
286
|
-
"table-body": x((o) => [
|
287
|
-
P(l.$slots, "table-body", ne(ve(o)))
|
288
|
-
]),
|
289
|
-
_: 2
|
290
|
-
}, [
|
291
|
-
l.$slots.before || (s = a.value) != null && s.search || (r = a.value) != null && r.form || (v = a.value) != null && v.tabs ? {
|
292
|
-
name: "before",
|
293
|
-
fn: x(() => {
|
294
|
-
var o, d, f, g;
|
295
|
-
return [
|
296
|
-
P(l.$slots, "before"),
|
297
|
-
(o = a.value) != null && o.search || (d = a.value) != null && d.form || (f = a.value) != null && f.tabs ? (k(), I("div", Xe, [
|
298
|
-
we.value ? (k(), I("div", _e, [
|
299
|
-
P(l.$slots, "bulk-actions", { selectedRows: V.selected })
|
300
|
-
])) : (k(), I("div", el, [
|
301
|
-
(g = a.value) != null && g.tabs ? (k(), Q(O(Te), {
|
302
|
-
key: 0,
|
303
|
-
modelValue: $.value,
|
304
|
-
"onUpdate:modelValue": [
|
305
|
-
e[0] || (e[0] = (y) => $.value = y),
|
306
|
-
e[1] || (e[1] = (y) => w(null, !1, "", !1, !0))
|
307
|
-
],
|
308
|
-
"is-disabled": V.isLoading,
|
309
|
-
tabs: a.value.tabs.options,
|
310
|
-
variant: "pills"
|
311
|
-
}, null, 8, ["modelValue", "is-disabled", "tabs"])) : E("", !0)
|
312
|
-
])),
|
313
|
-
P(l.$slots, "filter-options", {}, () => {
|
314
|
-
var y, S, F, j, L, B, A, u, b, c, m;
|
315
|
-
return [
|
316
|
-
(y = a.value) != null && y.search || (S = a.value) != null && S.form || (F = a.value) != null && F.columnEdit ? (k(), I("div", {
|
317
|
-
key: 0,
|
318
|
-
class: de([
|
319
|
-
"flex gap-3 absolute ml-auto bg-oc-bg-light right-4 max-w-[calc(100%-24px)]",
|
320
|
-
a.value ? X.value ? "md:w-fit w-full" : "" : "w-full justify-end"
|
321
|
-
])
|
322
|
-
}, [
|
323
|
-
(j = a.value) != null && j.search ? (k(), Q(O(qe), {
|
324
|
-
key: 0,
|
325
|
-
"is-search-only": !a.value.tabs || a.value.isSearchOnly,
|
326
|
-
"search-options": ((L = a.value.search) == null ? void 0 : L.options) ?? [],
|
327
|
-
"selected-option": (((B = t.value) == null ? void 0 : B.selectedSearchOption) || ((b = (u = (A = a.value.search) == null ? void 0 : A.options) == null ? void 0 : u[0]) == null ? void 0 : b.value)) ?? "keywords",
|
328
|
-
onAddQuery: _,
|
329
|
-
onToggle: e[2] || (e[2] = (i) => X.value = i),
|
330
|
-
onChangeSearchKey: Ce
|
331
|
-
}, null, 8, ["is-search-only", "search-options", "selected-option"])) : E("", !0),
|
332
|
-
(c = a.value) != null && c.form ? (k(), Q(O(Qe), {
|
333
|
-
key: 1,
|
334
|
-
modelValue: R.value,
|
335
|
-
"onUpdate:modelValue": [
|
336
|
-
e[6] || (e[6] = (i) => R.value = i),
|
337
|
-
e[7] || (e[7] = (i) => l.$emit("filter-open", i))
|
338
|
-
],
|
339
|
-
distance: 9,
|
340
|
-
placement: "bottom-end",
|
341
|
-
"is-attach-to-body": ""
|
342
|
-
}, {
|
343
|
-
menu: x(() => [
|
344
|
-
R.value ? (k(), Q(O(Re), {
|
345
|
-
key: 0,
|
346
|
-
id: V.id,
|
347
|
-
"json-form": a.value.form ?? [],
|
348
|
-
grid: a.value.grid ?? null,
|
349
|
-
values: p.filter,
|
350
|
-
actions: a.value.actions,
|
351
|
-
onApplyFilter: e[3] || (e[3] = (i) => w(i)),
|
352
|
-
onFilterFieldsChanged: e[4] || (e[4] = (i) => z("filter-fields-changed", i)),
|
353
|
-
onCancel: e[5] || (e[5] = (i) => R.value = !1)
|
354
|
-
}, {
|
355
|
-
default: x(({ errors: i, values: q, jsonForm: Z, updateForm: xe }) => [
|
356
|
-
P(l.$slots, "custom-filter-form", {
|
357
|
-
errors: i,
|
358
|
-
values: q,
|
359
|
-
jsonForm: Z,
|
360
|
-
updateFilter: xe
|
361
|
-
})
|
362
|
-
]),
|
363
|
-
_: 3
|
364
|
-
}, 8, ["id", "json-form", "grid", "values", "actions"])) : E("", !0)
|
365
|
-
]),
|
366
|
-
default: x(() => [
|
367
|
-
J(O(Ue), {
|
368
|
-
"is-active": R.value,
|
369
|
-
variant: "secondary",
|
370
|
-
"left-icon": "filter"
|
371
|
-
}, null, 8, ["is-active"])
|
372
|
-
]),
|
373
|
-
_: 3
|
374
|
-
}, 8, ["modelValue"])) : E("", !0),
|
375
|
-
a.value.columnEdit ? (k(), Q(O(ye), {
|
376
|
-
key: 2,
|
377
|
-
options: t.value.columnEdit,
|
378
|
-
headers: ((m = C.value) == null ? void 0 : m.headers) || [],
|
379
|
-
"local-key": a.value.columnEdit.localStorageKey,
|
380
|
-
onUpdateOrder: Ve
|
381
|
-
}, null, 8, ["options", "headers", "local-key"])) : E("", !0)
|
382
|
-
], 2)) : E("", !0)
|
383
|
-
];
|
384
|
-
})
|
385
|
-
])) : E("", !0),
|
386
|
-
J(O(ze), {
|
387
|
-
filters: De.value,
|
388
|
-
queries: Y.value,
|
389
|
-
class: "border-t border-oc-gray-200",
|
390
|
-
onRemoveQuery: Oe,
|
391
|
-
onRemoveAll: Ee,
|
392
|
-
onRemoveFilter: Le
|
393
|
-
}, null, 8, ["filters", "queries"])
|
394
|
-
];
|
395
|
-
}),
|
396
|
-
key: "0"
|
397
|
-
} : void 0,
|
398
|
-
Ie((n = C.value) == null ? void 0 : n.headers, (o, d) => ({
|
399
|
-
name: o.key,
|
400
|
-
fn: x(({ data: f, item: g }) => [
|
401
|
-
P(l.$slots, o.key, {
|
402
|
-
data: f,
|
403
|
-
item: g
|
404
|
-
})
|
405
|
-
])
|
406
|
-
}))
|
407
|
-
]), 1032, ["selected", "row-key", "options", "is-loading", "loading-rows", "row-class", "row-link", "is-sticky", "is-borderless"])) : E("", !0),
|
408
|
-
P(l.$slots, "before-pagination"),
|
409
|
-
h.value || K.value ? (k(), I("div", {
|
410
|
-
key: 1,
|
411
|
-
class: de(["flex items-center gap-3", h.value && h.value.last_page === 1 ? "justify-end" : ""])
|
412
|
-
}, [
|
413
|
-
h.value && !ke.value ? (k(), Q(O(Je), {
|
414
|
-
key: 0,
|
415
|
-
modelValue: U.value,
|
416
|
-
"onUpdate:modelValue": [
|
417
|
-
e[11] || (e[11] = (o) => U.value = o),
|
418
|
-
$e
|
419
|
-
],
|
420
|
-
class: "justify-center",
|
421
|
-
"max-page": h.value.last_page,
|
422
|
-
strategy: h.value.strategy,
|
423
|
-
"total-visible": "5"
|
424
|
-
}, null, 8, ["modelValue", "max-page", "strategy"])) : E("", !0),
|
425
|
-
K.value ? (k(), I("div", ll, [
|
426
|
-
J(O(ce), {
|
427
|
-
disabled: !K.value.prev,
|
428
|
-
onClick: e[12] || (e[12] = (o) => K.value.prev ? w(null, !1, K.value.prev) : null)
|
429
|
-
}, null, 8, ["disabled"]),
|
430
|
-
J(O(ce), {
|
431
|
-
disabled: !K.value.next,
|
432
|
-
"is-next": "",
|
433
|
-
onClick: e[13] || (e[13] = (o) => K.value.next ? w(null, !1, K.value.next) : null)
|
434
|
-
}, null, 8, ["disabled"])
|
435
|
-
])) : E("", !0),
|
436
|
-
be.value ? E("", !0) : (k(), I("div", al, [
|
437
|
-
J(O(He), {
|
438
|
-
modelValue: N.value,
|
439
|
-
"onUpdate:modelValue": [
|
440
|
-
e[14] || (e[14] = (o) => N.value = o),
|
441
|
-
e[15] || (e[15] = (o) => w(null))
|
442
|
-
],
|
443
|
-
label: "Item per page",
|
444
|
-
"is-inline-label": "",
|
445
|
-
"popper-options": { placement: "auto" },
|
446
|
-
options: Se.value
|
447
|
-
}, null, 8, ["modelValue", "options"])
|
448
|
-
]))
|
449
|
-
], 2)) : E("", !0)
|
450
|
-
]);
|
451
|
-
};
|
452
|
-
}
|
453
|
-
};
|
454
|
-
export {
|
455
|
-
rl as default
|
456
|
-
};
|