@orchidui/core 1.6.1-3 → 1.6.1-30
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 +3 -3
- 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 +3 -3
- package/dist/Elements/PageTitle/OcPageTitle.js +2 -2
- 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/VerificationOption/OcVerificationOption.js +2 -2
- 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 +15 -16
- package/dist/FormBuilder/OcFormBuilder.js +1 -1
- package/dist/MediaAndIcons/Avatar/OcAvatar.js +1 -1
- package/dist/{OcAccountSetupProgress-Bi63Xlid.js → OcAccountSetupProgress-CveW_QUJ.js} +1 -1
- package/dist/{OcAvatar-NDXQiZvz.js → OcAvatar-DeVm4Ck5.js} +1 -1
- package/dist/{OcComplexCalendar-BQeeNCdr.js → OcComplexCalendar-Cj30OyFf.js} +1 -1
- package/dist/{OcComplexDatePicker-B2lS6rZn.js → OcComplexDatePicker-CvjiPwxP.js} +3 -3
- package/dist/{OcCropper-Cg5CDu2b.js → OcCropper-BF-16XwD.js} +1 -1
- package/dist/{OcDataTable-BVH2rcPK.js → OcDataTable-1MsXmAgm.js} +204 -193
- package/dist/OcDraggableList-DShpLXoA.js +165 -0
- package/dist/{OcEmojiPicker-CsbqhhEt.js → OcEmojiPicker-DsL4-8jH.js} +1 -1
- package/dist/{OcFilterForm-CT8YeiJr.js → OcFilterForm-0IKj-oQF.js} +1 -1
- package/dist/{OcFilterSearch-XK2GhcoU.js → OcFilterSearch-BS8oU2J7.js} +1 -1
- package/dist/{OcFilterSearchFor-Cc5DpVY8.js → OcFilterSearchFor-MRaJAA_g.js} +1 -1
- package/dist/{OcModalCropper-CWCD6Ykf.js → OcModalCropper-RAuVhoig.js} +4 -4
- package/dist/{OcPopper-C11OgQAj.js → OcPopper-D0VfWOBI.js} +1 -1
- package/dist/{OcTimePicker-M7NAih2t.js → OcTimePicker-CmpqMaI3.js} +2 -2
- 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/Popper/OcPopper.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-TkScY3DE.js → SubPlanCard-Dpllk5G_.js} +1 -1
- package/dist/{ThumbnailSection-Cw-80LD5.js → ThumbnailSection-DnDqnLru.js} +1 -1
- package/dist/{ThumbnailTheme-CgEQiEBF.js → ThumbnailTheme-IwrXmqLZ.js} +14 -14
- package/dist/{index-C1KCO1Bm.js → index-t6CLbwtt.js} +2244 -2068
- package/dist/index.js +54 -55
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/OcDraggableList-BbyZ0eST.js +0 -158
- package/dist/OcSlider-DW9x8eas.js +0 -123
@@ -1,16 +1,16 @@
|
|
1
|
-
import { ref as P, onMounted as Ve, openBlock as
|
2
|
-
import {
|
1
|
+
import { ref as P, onMounted as Ve, openBlock as n, createBlock as B, unref as y, withCtx as F, createElementVNode as Z, createElementBlock as $, createVNode as I, mergeProps as ge, Fragment as ee, renderList as ae, normalizeClass as te, toDisplayString as be, createCommentVNode as h, computed as L, watch as Qe, createSlots as Re, renderSlot as Y, normalizeProps as ke, guardReactiveProps as he } from "vue";
|
2
|
+
import { ay as Ee, b as Je, B as Fe, L as ze, Z as _e, aJ as Ze, aK as Ge, aL as He, I as We, J as xe, k as Xe } from "./index-t6CLbwtt.js";
|
3
3
|
import le from "dayjs";
|
4
4
|
import { VueDraggableNext as we } from "vue-draggable-next";
|
5
|
-
import { getFromLocalStorage as se, formatHeadersFromLocalStorage as Oe, formatHeadersToLocalStorage as
|
5
|
+
import { getFromLocalStorage as se, formatHeadersFromLocalStorage as Oe, formatHeadersToLocalStorage as el, setInLocalStorage as $e } from "./DataTable/utils/editColumnsUtils.js";
|
6
6
|
import { _ as Se } from "./OcIcon-CJgBICxh.js";
|
7
|
-
const
|
7
|
+
const ll = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, al = {
|
8
8
|
key: 0,
|
9
9
|
class: "gap-y-2 flex flex-col border-b pb-3 border-oc-gray-200"
|
10
|
-
},
|
10
|
+
}, tl = { class: "gap-y-2 flex flex-col" }, sl = {
|
11
11
|
key: 0,
|
12
12
|
class: "flex items-center bg-white justify-between h-[26px]"
|
13
|
-
},
|
13
|
+
}, ol = { class: "flex items-center w-full gap-x-3" }, ul = { class: "truncate w-full max-w-[160px]" }, rl = {
|
14
14
|
__name: "ColumnEdit",
|
15
15
|
props: {
|
16
16
|
options: {
|
@@ -27,8 +27,8 @@ const el = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, ll = {
|
|
27
27
|
}
|
28
28
|
},
|
29
29
|
emits: ["change-active", "onMoved", "update-order"],
|
30
|
-
setup(
|
31
|
-
const v =
|
30
|
+
setup(j, { emit: X }) {
|
31
|
+
const v = X, O = j, c = P([]), f = P([]), J = P(!1), S = (a = !1) => {
|
32
32
|
f.value = f.value.map((p) => ({
|
33
33
|
...p,
|
34
34
|
isActive: !0
|
@@ -37,88 +37,88 @@ const el = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, ll = {
|
|
37
37
|
activeHeaders: c.value,
|
38
38
|
isOnMount: a
|
39
39
|
});
|
40
|
-
},
|
40
|
+
}, H = {
|
41
41
|
handle: ".drag-el",
|
42
42
|
filter: ".is-disabled",
|
43
43
|
group: "headers",
|
44
44
|
animation: 500,
|
45
45
|
forceFallback: !1,
|
46
46
|
move: (a) => a.to.dataset.activeHeaders ? !0 : !!a.draggedContext.futureIndex,
|
47
|
-
"onUpdate:modelValue": () =>
|
47
|
+
"onUpdate:modelValue": () => S()
|
48
48
|
};
|
49
49
|
return Ve(() => {
|
50
|
-
const a = se(
|
51
|
-
f.value = p ||
|
52
|
-
var
|
50
|
+
const a = se(O.localKey), { fixed: p, active: m } = Oe(a, O.headers, O.localKey);
|
51
|
+
f.value = p || O.headers.slice(0, 1), c.value = m || O.headers.slice(1).map((x) => {
|
52
|
+
var V, M, C;
|
53
53
|
return {
|
54
|
-
...
|
55
|
-
isActive: ((C = (
|
54
|
+
...x,
|
55
|
+
isActive: ((C = (M = (V = O.options) == null ? void 0 : V.active) == null ? void 0 : M.find((W) => W.key === x.key)) == null ? void 0 : C.isActive) ?? !0
|
56
56
|
};
|
57
|
-
}),
|
58
|
-
}), (a, p) => (
|
57
|
+
}), S(!0);
|
58
|
+
}), (a, p) => (n(), B(y(Ee), {
|
59
59
|
modelValue: J.value,
|
60
60
|
"onUpdate:modelValue": p[3] || (p[3] = (m) => J.value = m),
|
61
61
|
class: "h-[36px]",
|
62
62
|
"is-attach-to-body": ""
|
63
63
|
}, {
|
64
|
-
menu:
|
65
|
-
|
66
|
-
f.value.length ? (
|
67
|
-
p[4] || (p[4] =
|
68
|
-
|
64
|
+
menu: F(() => [
|
65
|
+
Z("div", ll, [
|
66
|
+
f.value.length ? (n(), $("div", al, [
|
67
|
+
p[4] || (p[4] = Z("span", { class: "text-oc-text-400 font-medium" }, "Fixed columns", -1)),
|
68
|
+
I(y(we), ge({
|
69
69
|
key: "key",
|
70
70
|
modelValue: f.value,
|
71
71
|
"onUpdate:modelValue": p[0] || (p[0] = (m) => f.value = m)
|
72
|
-
},
|
73
|
-
default:
|
74
|
-
(
|
72
|
+
}, H), {
|
73
|
+
default: F(() => [
|
74
|
+
(n(!0), $(ee, null, ae(f.value, (m, x) => (n(), $("div", {
|
75
75
|
key: m.key,
|
76
|
-
class: te(["flex items-center justify-between h-[26px]",
|
76
|
+
class: te(["flex items-center justify-between h-[26px]", x ? "" : "is-disabled"])
|
77
77
|
}, [
|
78
|
-
|
79
|
-
|
78
|
+
Z("span", null, be(m.label), 1),
|
79
|
+
x ? (n(), B(y(Se), {
|
80
80
|
key: 0,
|
81
81
|
width: "18",
|
82
82
|
height: "18",
|
83
83
|
class: "text-oc-text-400 drag-el cursor-move",
|
84
84
|
name: "draggable"
|
85
|
-
})) :
|
85
|
+
})) : h("", !0)
|
86
86
|
], 2))), 128))
|
87
87
|
]),
|
88
88
|
_: 1
|
89
89
|
}, 16, ["modelValue"])
|
90
|
-
])) :
|
91
|
-
|
92
|
-
p[5] || (p[5] =
|
93
|
-
|
90
|
+
])) : h("", !0),
|
91
|
+
Z("div", tl, [
|
92
|
+
p[5] || (p[5] = Z("span", { class: "text-oc-text-400 font-medium" }, "Active columns", -1)),
|
93
|
+
I(y(we), ge({
|
94
94
|
key: "key",
|
95
95
|
modelValue: c.value,
|
96
96
|
"onUpdate:modelValue": p[2] || (p[2] = (m) => c.value = m)
|
97
|
-
},
|
98
|
-
default:
|
99
|
-
(
|
97
|
+
}, H, { "data-active-headers": "true" }), {
|
98
|
+
default: F(() => [
|
99
|
+
(n(!0), $(ee, null, ae(c.value, (m) => (n(), $(ee, {
|
100
100
|
key: m.key
|
101
101
|
}, [
|
102
|
-
m.key !== "actions" ? (
|
103
|
-
|
104
|
-
|
102
|
+
m.key !== "actions" ? (n(), $("div", sl, [
|
103
|
+
Z("div", ol, [
|
104
|
+
I(y(Je), {
|
105
105
|
modelValue: m.isActive,
|
106
106
|
"onUpdate:modelValue": [
|
107
|
-
(
|
108
|
-
p[1] || (p[1] = (
|
107
|
+
(x) => m.isActive = x,
|
108
|
+
p[1] || (p[1] = (x) => S())
|
109
109
|
],
|
110
110
|
class: "!w-fit"
|
111
111
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
112
|
-
|
112
|
+
Z("div", ul, be(m.label), 1)
|
113
113
|
]),
|
114
|
-
c.value.length > 1 ? (
|
114
|
+
c.value.length > 1 ? (n(), B(y(Se), {
|
115
115
|
key: 0,
|
116
116
|
width: "18",
|
117
117
|
height: "18",
|
118
118
|
class: "text-oc-text-400 drag-el cursor-move",
|
119
119
|
name: "draggable"
|
120
|
-
})) :
|
121
|
-
])) :
|
120
|
+
})) : h("", !0)
|
121
|
+
])) : h("", !0)
|
122
122
|
], 64))), 128))
|
123
123
|
]),
|
124
124
|
_: 1
|
@@ -126,8 +126,8 @@ const el = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, ll = {
|
|
126
126
|
])
|
127
127
|
])
|
128
128
|
]),
|
129
|
-
default:
|
130
|
-
|
129
|
+
default: F(() => [
|
130
|
+
I(y(Fe), {
|
131
131
|
label: "Edit Column",
|
132
132
|
"left-icon": "setting",
|
133
133
|
variant: "secondary"
|
@@ -136,22 +136,22 @@ const el = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, ll = {
|
|
136
136
|
_: 1
|
137
137
|
}, 8, ["modelValue"]));
|
138
138
|
}
|
139
|
-
},
|
139
|
+
}, il = { class: "flex flex-col gap-9 relative" }, nl = {
|
140
140
|
key: 0,
|
141
141
|
class: "flex items-center px-4 min-h-[52px]"
|
142
|
-
},
|
142
|
+
}, dl = {
|
143
143
|
key: 0,
|
144
144
|
class: "flex gap-5 items-center absolute left-5"
|
145
|
-
},
|
145
|
+
}, vl = {
|
146
146
|
key: 1,
|
147
147
|
class: "flex gap-3 absolute left-5"
|
148
|
-
},
|
148
|
+
}, cl = {
|
149
149
|
key: 1,
|
150
150
|
class: "flex w-full gap-5 md:justify-start justify-center"
|
151
|
-
},
|
151
|
+
}, fl = {
|
152
152
|
key: 2,
|
153
153
|
class: "hidden md:flex items-center"
|
154
|
-
},
|
154
|
+
}, hl = {
|
155
155
|
__name: "OcDataTable",
|
156
156
|
props: {
|
157
157
|
isLoading: Boolean,
|
@@ -186,24 +186,28 @@ const el = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, ll = {
|
|
186
186
|
"filter-fields-changed": [],
|
187
187
|
"filter-removed": [],
|
188
188
|
"search-query-changed": [],
|
189
|
-
"hover:cell": []
|
189
|
+
"hover:cell": [],
|
190
|
+
"columns-changed": []
|
190
191
|
},
|
191
|
-
setup(
|
192
|
+
setup(j, { emit: X }) {
|
192
193
|
var re, ie, ne, de, ve, ce, fe, pe, me;
|
193
|
-
const v =
|
194
|
+
const v = j, O = X, c = L(() => {
|
194
195
|
var l;
|
195
196
|
return (l = v.options) == null ? void 0 : l.pagination;
|
196
197
|
}), f = L(() => {
|
197
198
|
var l;
|
198
199
|
return (l = v.options) == null ? void 0 : l.cursor;
|
199
|
-
}), J = P(),
|
200
|
+
}), J = P(), S = L(() => {
|
200
201
|
var l;
|
201
202
|
return (l = v.options) == null ? void 0 : l.tableOptions;
|
202
|
-
}),
|
203
|
+
}), H = L(() => {
|
203
204
|
var l;
|
204
205
|
return {
|
205
|
-
...
|
206
|
-
headers: J.value ? J.value.
|
206
|
+
...S.value,
|
207
|
+
headers: J.value ? J.value.map((e) => {
|
208
|
+
var o, u;
|
209
|
+
return e.class = ((u = (o = S.value) == null ? void 0 : o.headers.find((r) => r.key === e.key)) == null ? void 0 : u.class) ?? "", e;
|
210
|
+
}).filter((e) => ue(e.key)) : (l = S.value) == null ? void 0 : l.headers.filter((e) => ue(e.key))
|
207
211
|
};
|
208
212
|
}), a = L(() => {
|
209
213
|
var l;
|
@@ -214,9 +218,9 @@ const el = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, ll = {
|
|
214
218
|
}), m = L(() => {
|
215
219
|
var l;
|
216
220
|
return ((l = c.value) == null ? void 0 : l.last_page) === 1;
|
217
|
-
}),
|
221
|
+
}), x = P(!1), V = P(v.filter[(ie = (re = a.value) == null ? void 0 : re.tabs) == null ? void 0 : ie.key]), M = P(v.filter.page), C = P(
|
218
222
|
(de = (ne = a.value) == null ? void 0 : ne.per_page) != null && de.key ? v.filter[(ce = (ve = a.value) == null ? void 0 : ve.per_page) == null ? void 0 : ce.key] : v.filter.per_page
|
219
|
-
),
|
223
|
+
), W = ((me = v.filter[(pe = (fe = a.value) == null ? void 0 : fe.search) == null ? void 0 : pe.key]) == null ? void 0 : me.trim()) ?? "", z = P(W ? W.split(",") : []), oe = P(!1), je = L(
|
220
224
|
() => {
|
221
225
|
var l, e;
|
222
226
|
return (e = (l = v.options) == null ? void 0 : l.perPageOptions) == null ? void 0 : e.map(
|
@@ -270,67 +274,67 @@ const el = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, ll = {
|
|
270
274
|
var l;
|
271
275
|
return ((l = v.selected) == null ? void 0 : l.length) > 0;
|
272
276
|
}), Le = (l) => {
|
273
|
-
!l.trim() || z.value.includes(l) || (z.value = [l], A(),
|
277
|
+
!l.trim() || z.value.includes(l) || (z.value = [l], A(), O("search-query-changed", l));
|
274
278
|
}, Pe = (l) => {
|
275
279
|
z.value = z.value.filter((e) => e !== l), A();
|
276
280
|
}, _ = v.filter;
|
277
281
|
!_ && c ? _.page = 1 : !_ && f && (_.cursor = "");
|
278
282
|
const t = P(_), Ce = () => {
|
279
|
-
var e, o, u,
|
280
|
-
z.value = [],
|
283
|
+
var e, o, u, r, d, s, g, b, E, w, K, T, q, Q;
|
284
|
+
z.value = [], V.value = "";
|
281
285
|
const l = {};
|
282
|
-
a.value ? _.page = 1 : _.cursor = "", (o = (e = a.value) == null ? void 0 : e.per_page) != null && o.key ? l[(
|
286
|
+
a.value ? _.page = 1 : _.cursor = "", (o = (e = a.value) == null ? void 0 : e.per_page) != null && o.key ? l[(r = (u = a.value) == null ? void 0 : u.per_page) == null ? void 0 : r.key] = C.value : l.per_page = C.value, (s = (d = a.value) == null ? void 0 : d.tabs) != null && s.key ? l[(b = (g = a.value) == null ? void 0 : g.tabs) == null ? void 0 : b.key] = V.value : l.tabs = V.value, (w = (E = a.value) == null ? void 0 : E.columnEdit) != null && w.key && (l[(T = (K = a.value) == null ? void 0 : K.columnEdit) == null ? void 0 : T.key] = t.value[(Q = (q = a.value) == null ? void 0 : q.columnEdit) == null ? void 0 : Q.key]), t.value = l, A();
|
283
287
|
}, Ke = () => {
|
284
|
-
A(null,
|
285
|
-
},
|
288
|
+
A(null, M.value);
|
289
|
+
}, Ue = () => {
|
286
290
|
v.id && $e(v.id, JSON.stringify(t.value));
|
287
|
-
},
|
288
|
-
var u,
|
289
|
-
c.value && !e && (
|
291
|
+
}, Ye = () => v.id ? se(v.id) : null, A = (l = null, e = !1, o = "") => {
|
292
|
+
var u, r, d;
|
293
|
+
c.value && !e && (M.value = 1), c.value ? t.value.page = M.value : t.value.cursor = o, (u = a.value) != null && u.per_page ? t.value[a.value.per_page.key] = C.value : t.value.per_page = C.value, (r = a.value) != null && r.tabs && (t.value[a.value.tabs.key] = V.value), (d = a.value) != null && d.search && (t.value[a.value.search.key] = z.value.join()), l && (x.value = !1, t.value = { ...t.value, ...l }, Object.keys(t.value).forEach((s) => {
|
290
294
|
Array.isArray(t.value[s]) && t.value[s].length === 0 && delete t.value[s];
|
291
|
-
})),
|
295
|
+
})), Ue(), O("update:filter", t.value);
|
292
296
|
}, Be = (l, e) => {
|
293
|
-
(e === a.value.tabs.key || e === "tabs") && (
|
294
|
-
},
|
297
|
+
(e === a.value.tabs.key || e === "tabs") && (V.value = ""), A(l), O("filter-removed", e);
|
298
|
+
}, Me = (l) => {
|
295
299
|
let e = [];
|
296
300
|
return l.forEach((o) => {
|
297
301
|
e.push(o.key);
|
298
302
|
}), e;
|
299
|
-
},
|
303
|
+
}, Ne = L(() => {
|
300
304
|
if (t.value) {
|
301
305
|
let l = [];
|
302
306
|
return Object.keys(t.value).forEach((e) => {
|
303
|
-
var
|
304
|
-
let o = (s = (
|
305
|
-
const u = (b = (g = a.value) == null ? void 0 : g.search) == null ? void 0 : b.key,
|
307
|
+
var d, s, g, b, E, w, K, T, q, Q, G;
|
308
|
+
let o = (s = (d = a.value) == null ? void 0 : d.tabs) == null ? void 0 : s.key;
|
309
|
+
const u = (b = (g = a.value) == null ? void 0 : g.search) == null ? void 0 : b.key, r = ((w = (E = a.value) == null ? void 0 : E.per_page) == null ? void 0 : w.key) ?? "per_page";
|
306
310
|
if ((K = a.value.form) == null || K.find((k) => {
|
307
311
|
k.name === o && (o = "");
|
308
|
-
}), e !== "page" && e !== "cursor" && e !==
|
309
|
-
let k = null,
|
310
|
-
if (typeof
|
311
|
-
let
|
312
|
-
return
|
313
|
-
R.key === e && (
|
314
|
-
}),
|
312
|
+
}), e !== "page" && e !== "cursor" && e !== r && e !== o && e !== u) {
|
313
|
+
let k = null, i = (T = a.value.form) == null ? void 0 : T.find((N) => {
|
314
|
+
if (typeof N.name == "object") {
|
315
|
+
let U = !1;
|
316
|
+
return N.name.forEach((R) => {
|
317
|
+
R.key === e && (U = !0, k = Me(N.name));
|
318
|
+
}), U;
|
315
319
|
} else
|
316
|
-
return
|
320
|
+
return N.name === e;
|
317
321
|
}), D = "";
|
318
|
-
if (
|
319
|
-
if (typeof
|
320
|
-
D && (D += " - "), D += t.value[
|
321
|
-
}) : D = t.value[e],
|
322
|
+
if (i && t.value[e]) {
|
323
|
+
if (typeof i.name == "object" ? (q = i.name) == null || q.forEach((U) => {
|
324
|
+
D && (D += " - "), D += t.value[U.key];
|
325
|
+
}) : D = t.value[e], i.props.options && (D = (i.props.multiple ? t.value[e] : [t.value[e]]).map(
|
322
326
|
(R) => {
|
323
327
|
var ye;
|
324
|
-
return (ye =
|
328
|
+
return (ye = i.props.options.find(({ value: qe }) => qe === R)) == null ? void 0 : ye.label;
|
325
329
|
}
|
326
|
-
).join(", ")),
|
327
|
-
if (((Q =
|
328
|
-
const
|
329
|
-
D =
|
330
|
-
} else D = le(t.value[
|
331
|
-
let
|
332
|
-
|
333
|
-
label:
|
330
|
+
).join(", ")), i.type === "RangeInput" && Array.isArray(t.value[e]) && (D = t.value[e][0].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + " - " + t.value[e][1].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")), i.type === "DatePicker")
|
331
|
+
if (((Q = i == null ? void 0 : i.props) == null ? void 0 : Q.type) === "range" && i.name && i.name[1]) {
|
332
|
+
const U = le(t.value[i.name[0].key]).format("MM/DD/YYYY"), R = le(t.value[i.name[1].key]).format("MM/DD/YYYY");
|
333
|
+
D = U === R ? U : U + " - " + R;
|
334
|
+
} else D = le(t.value[i.name]).format("MM/DD/YYYY");
|
335
|
+
let N = `${(G = i == null ? void 0 : i.props) == null ? void 0 : G.label} : ${D}`;
|
336
|
+
i && i.name && typeof i.name == "object" && l.find((R) => R.name === k[0]) && (N = ""), l.push({
|
337
|
+
label: N,
|
334
338
|
name: e,
|
335
339
|
multiNames: k
|
336
340
|
});
|
@@ -340,156 +344,163 @@ const el = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, ll = {
|
|
340
344
|
}
|
341
345
|
return [];
|
342
346
|
}), ue = (l) => {
|
343
|
-
var e, o, u,
|
344
|
-
return ((s = (
|
345
|
-
},
|
346
|
-
var u,
|
347
|
-
if (t.value[(
|
348
|
-
const K =
|
347
|
+
var e, o, u, r, d, s;
|
348
|
+
return ((s = (d = (r = (u = t.value) == null ? void 0 : u[(o = (e = a.value) == null ? void 0 : e.columnEdit) == null ? void 0 : o.key]) == null ? void 0 : r.active) == null ? void 0 : d.find((g) => g.key === l)) == null ? void 0 : s.isActive) ?? !0;
|
349
|
+
}, Ie = ({ fixedHeaders: l, activeHeaders: e, isOnMount: o }) => {
|
350
|
+
var u, r, d, s, g, b, E, w;
|
351
|
+
if (t.value[(r = (u = a.value) == null ? void 0 : u.columnEdit) == null ? void 0 : r.key] || (t.value[(s = (d = a.value) == null ? void 0 : d.columnEdit) == null ? void 0 : s.key] = {}), t.value[(b = (g = a.value) == null ? void 0 : g.columnEdit) == null ? void 0 : b.key].fixed = l, t.value[(w = (E = a.value) == null ? void 0 : E.columnEdit) == null ? void 0 : w.key].active = e, J.value = [...l, ...e], !o) {
|
352
|
+
const K = el(l, e);
|
349
353
|
$e(a.value.columnEdit.localStorageKey, K);
|
350
354
|
}
|
355
|
+
O("columns-changed", e);
|
351
356
|
}, Te = () => {
|
352
|
-
var l, e, o, u,
|
357
|
+
var l, e, o, u, r, d;
|
353
358
|
if ((e = (l = a.value) == null ? void 0 : l.columnEdit) != null && e.localStorageKey) {
|
354
359
|
const s = se(a.value.columnEdit.localStorageKey);
|
355
360
|
if (s) {
|
356
361
|
const { fixed: g, active: b } = Oe(
|
357
362
|
s,
|
358
|
-
|
363
|
+
S.value.headers,
|
359
364
|
a.value.columnEdit.localStorageKey
|
360
365
|
);
|
361
|
-
t.value[(u = (o = a.value) == null ? void 0 : o.columnEdit) == null ? void 0 : u.key].fixed = g, t.value[(
|
366
|
+
t.value[(u = (o = a.value) == null ? void 0 : o.columnEdit) == null ? void 0 : u.key].fixed = g, t.value[(d = (r = a.value) == null ? void 0 : r.columnEdit) == null ? void 0 : d.key].active = b, J.value = [...g, ...b];
|
362
367
|
}
|
363
368
|
}
|
364
369
|
};
|
365
|
-
return
|
366
|
-
|
370
|
+
return Qe(
|
371
|
+
() => v.filter,
|
372
|
+
(l) => {
|
373
|
+
var e, o;
|
374
|
+
l && ((o = (e = a.value) == null ? void 0 : e.tabs) != null && o.key) && l[a.value.tabs.key] && (V.value = l[a.value.tabs.key]);
|
375
|
+
}
|
376
|
+
), Ve(() => {
|
377
|
+
var e, o, u, r, d;
|
367
378
|
Te();
|
368
|
-
const l =
|
369
|
-
l && (t.value = JSON.parse(l),
|
379
|
+
const l = Ye();
|
380
|
+
l && (t.value = JSON.parse(l), V.value = V.value || ((e = t.value) == null ? void 0 : e.tabs) || ((r = t.value) == null ? void 0 : r[(u = (o = a.value) == null ? void 0 : o.tabs) == null ? void 0 : u.key]), M.value = ((d = t.value) == null ? void 0 : d.page) || 1, A(null, !0, t.value.cursor));
|
370
381
|
}), (l, e) => {
|
371
|
-
var o, u,
|
372
|
-
return
|
373
|
-
|
382
|
+
var o, u, r, d;
|
383
|
+
return n(), $("div", il, [
|
384
|
+
S.value ? (n(), B(y(ze), {
|
374
385
|
key: 0,
|
375
|
-
selected:
|
376
|
-
"row-key":
|
377
|
-
options:
|
378
|
-
"is-loading":
|
386
|
+
selected: j.selected,
|
387
|
+
"row-key": j.rowKey,
|
388
|
+
options: H.value,
|
389
|
+
"is-loading": j.isLoading,
|
379
390
|
"loading-rows": C.value,
|
380
|
-
"row-class":
|
381
|
-
"row-link":
|
382
|
-
"is-sticky":
|
383
|
-
"is-borderless":
|
391
|
+
"row-class": j.rowClass,
|
392
|
+
"row-link": j.rowLink,
|
393
|
+
"is-sticky": S.value.isSticky,
|
394
|
+
"is-borderless": S.value.isBorderless,
|
384
395
|
"onUpdate:selected": e[7] || (e[7] = (s) => l.$emit("update:selected", s)),
|
385
396
|
"onClick:row": e[8] || (e[8] = (s) => l.$emit("click:row", s)),
|
386
397
|
"onHover:cell": e[9] || (e[9] = (s) => l.$emit("hover:cell", s))
|
387
|
-
},
|
388
|
-
after:
|
389
|
-
|
398
|
+
}, Re({
|
399
|
+
after: F(() => [
|
400
|
+
Y(l.$slots, "after")
|
390
401
|
]),
|
391
|
-
empty:
|
392
|
-
|
402
|
+
empty: F(() => [
|
403
|
+
Y(l.$slots, "empty")
|
393
404
|
]),
|
394
|
-
"table-header":
|
395
|
-
|
405
|
+
"table-header": F((s) => [
|
406
|
+
Y(l.$slots, "table-header", ke(he(s)))
|
396
407
|
]),
|
397
|
-
"table-body":
|
398
|
-
|
408
|
+
"table-body": F((s) => [
|
409
|
+
Y(l.$slots, "table-body", ke(he(s)))
|
399
410
|
]),
|
400
411
|
_: 2
|
401
412
|
}, [
|
402
|
-
l.$slots.before || (o = a.value) != null && o.search || (u = a.value) != null && u.form || (
|
413
|
+
l.$slots.before || (o = a.value) != null && o.search || (u = a.value) != null && u.form || (r = a.value) != null && r.tabs ? {
|
403
414
|
name: "before",
|
404
|
-
fn:
|
405
|
-
var s, g, b,
|
415
|
+
fn: F(() => {
|
416
|
+
var s, g, b, E;
|
406
417
|
return [
|
407
|
-
|
408
|
-
(s = a.value) != null && s.search || (g = a.value) != null && g.form || (b = a.value) != null && b.tabs ? (
|
409
|
-
De.value ? (
|
410
|
-
|
411
|
-
])) : (
|
412
|
-
(
|
418
|
+
Y(l.$slots, "before"),
|
419
|
+
(s = a.value) != null && s.search || (g = a.value) != null && g.form || (b = a.value) != null && b.tabs ? (n(), $("div", nl, [
|
420
|
+
De.value ? (n(), $("div", dl, [
|
421
|
+
Y(l.$slots, "bulk-actions", { selectedRows: j.selected })
|
422
|
+
])) : (n(), $("div", vl, [
|
423
|
+
(E = a.value) != null && E.tabs ? (n(), B(y(_e), {
|
413
424
|
key: 0,
|
414
|
-
modelValue:
|
425
|
+
modelValue: V.value,
|
415
426
|
"onUpdate:modelValue": [
|
416
|
-
e[0] || (e[0] = (w) =>
|
427
|
+
e[0] || (e[0] = (w) => V.value = w),
|
417
428
|
e[1] || (e[1] = (w) => A(null))
|
418
429
|
],
|
419
|
-
"is-disabled":
|
430
|
+
"is-disabled": j.isLoading,
|
420
431
|
tabs: a.value.tabs.options,
|
421
432
|
variant: "pills"
|
422
|
-
}, null, 8, ["modelValue", "is-disabled", "tabs"])) :
|
433
|
+
}, null, 8, ["modelValue", "is-disabled", "tabs"])) : h("", !0)
|
423
434
|
])),
|
424
|
-
|
435
|
+
Y(l.$slots, "filter-options", {}, () => {
|
425
436
|
var w, K, T, q, Q, G;
|
426
437
|
return [
|
427
|
-
(w = a.value) != null && w.search || (K = a.value) != null && K.form || (T = a.value) != null && T.columnEdit ? (
|
438
|
+
(w = a.value) != null && w.search || (K = a.value) != null && K.form || (T = a.value) != null && T.columnEdit ? (n(), $("div", {
|
428
439
|
key: 0,
|
429
440
|
class: te([
|
430
441
|
"flex gap-3 absolute ml-auto bg-oc-bg-light right-4 max-w-[calc(100%-24px)]",
|
431
442
|
a.value ? oe.value ? "md:w-fit w-full" : "" : "w-full justify-end"
|
432
443
|
])
|
433
444
|
}, [
|
434
|
-
(q = a.value) != null && q.search ? (
|
445
|
+
(q = a.value) != null && q.search ? (n(), B(y(Ze), {
|
435
446
|
key: 0,
|
436
447
|
"is-search-only": !a.value.tabs || a.value.isSearchOnly,
|
437
448
|
onAddQuery: Le,
|
438
449
|
onToggle: e[2] || (e[2] = (k) => oe.value = k)
|
439
|
-
}, null, 8, ["is-search-only"])) :
|
440
|
-
(Q = a.value) != null && Q.form ? (
|
450
|
+
}, null, 8, ["is-search-only"])) : h("", !0),
|
451
|
+
(Q = a.value) != null && Q.form ? (n(), B(y(Ee), {
|
441
452
|
key: 1,
|
442
|
-
modelValue:
|
443
|
-
"onUpdate:modelValue": e[6] || (e[6] = (k) =>
|
453
|
+
modelValue: x.value,
|
454
|
+
"onUpdate:modelValue": e[6] || (e[6] = (k) => x.value = k),
|
444
455
|
distance: 9,
|
445
456
|
placement: "bottom-end",
|
446
457
|
"is-attach-to-body": ""
|
447
458
|
}, {
|
448
|
-
menu:
|
449
|
-
|
459
|
+
menu: F(() => [
|
460
|
+
x.value ? (n(), B(y(Ge), {
|
450
461
|
key: 0,
|
451
|
-
id:
|
462
|
+
id: j.id,
|
452
463
|
"json-form": a.value.form ?? [],
|
453
464
|
grid: a.value.grid ?? null,
|
454
465
|
values: v.filter,
|
455
466
|
actions: a.value.actions,
|
456
467
|
onApplyFilter: e[3] || (e[3] = (k) => A(k)),
|
457
|
-
onFilterFieldsChanged: e[4] || (e[4] = (k) =>
|
458
|
-
onCancel: e[5] || (e[5] = (k) =>
|
468
|
+
onFilterFieldsChanged: e[4] || (e[4] = (k) => O("filter-fields-changed", k)),
|
469
|
+
onCancel: e[5] || (e[5] = (k) => x.value = !1)
|
459
470
|
}, {
|
460
|
-
default:
|
461
|
-
|
471
|
+
default: F(({ errors: k, values: i, jsonForm: D, updateForm: N }) => [
|
472
|
+
Y(l.$slots, "custom-filter-form", {
|
462
473
|
errors: k,
|
463
|
-
values:
|
474
|
+
values: i,
|
464
475
|
jsonForm: D,
|
465
|
-
updateFilter:
|
476
|
+
updateFilter: N
|
466
477
|
})
|
467
478
|
]),
|
468
479
|
_: 3
|
469
|
-
}, 8, ["id", "json-form", "grid", "values", "actions"])) :
|
480
|
+
}, 8, ["id", "json-form", "grid", "values", "actions"])) : h("", !0)
|
470
481
|
]),
|
471
|
-
default:
|
472
|
-
|
473
|
-
"is-active":
|
482
|
+
default: F(() => [
|
483
|
+
I(y(Fe), {
|
484
|
+
"is-active": x.value,
|
474
485
|
variant: "secondary",
|
475
486
|
"left-icon": "filter"
|
476
487
|
}, null, 8, ["is-active"])
|
477
488
|
]),
|
478
489
|
_: 3
|
479
|
-
}, 8, ["modelValue"])) :
|
480
|
-
a.value.columnEdit ? (
|
490
|
+
}, 8, ["modelValue"])) : h("", !0),
|
491
|
+
a.value.columnEdit ? (n(), B(rl, {
|
481
492
|
key: 2,
|
482
493
|
options: t.value.columnEdit,
|
483
|
-
headers: ((G =
|
494
|
+
headers: ((G = S.value) == null ? void 0 : G.headers) || [],
|
484
495
|
"local-key": a.value.columnEdit.localStorageKey,
|
485
|
-
onUpdateOrder:
|
486
|
-
}, null, 8, ["options", "headers", "local-key"])) :
|
487
|
-
], 2)) :
|
496
|
+
onUpdateOrder: Ie
|
497
|
+
}, null, 8, ["options", "headers", "local-key"])) : h("", !0)
|
498
|
+
], 2)) : h("", !0)
|
488
499
|
];
|
489
500
|
})
|
490
|
-
])) :
|
491
|
-
|
492
|
-
filters:
|
501
|
+
])) : h("", !0),
|
502
|
+
I(y(He), {
|
503
|
+
filters: Ne.value,
|
493
504
|
queries: z.value,
|
494
505
|
class: "border-t border-oc-gray-200",
|
495
506
|
onRemoveQuery: Pe,
|
@@ -500,46 +511,46 @@ const el = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, ll = {
|
|
500
511
|
}),
|
501
512
|
key: "0"
|
502
513
|
} : void 0,
|
503
|
-
ae((
|
514
|
+
ae((d = S.value) == null ? void 0 : d.headers, (s, g) => ({
|
504
515
|
name: s.key,
|
505
|
-
fn:
|
506
|
-
|
516
|
+
fn: F(({ data: b, item: E }) => [
|
517
|
+
Y(l.$slots, s.key, {
|
507
518
|
data: b,
|
508
|
-
item:
|
519
|
+
item: E
|
509
520
|
})
|
510
521
|
])
|
511
522
|
}))
|
512
|
-
]), 1032, ["selected", "row-key", "options", "is-loading", "loading-rows", "row-class", "row-link", "is-sticky", "is-borderless"])) :
|
513
|
-
|
514
|
-
c.value || f.value ? (
|
523
|
+
]), 1032, ["selected", "row-key", "options", "is-loading", "loading-rows", "row-class", "row-link", "is-sticky", "is-borderless"])) : h("", !0),
|
524
|
+
Y(l.$slots, "before-pagination"),
|
525
|
+
c.value || f.value ? (n(), $("div", {
|
515
526
|
key: 1,
|
516
527
|
class: te(["flex gap-3 items-center", c.value && c.value.last_page === 1 ? "justify-end" : ""])
|
517
528
|
}, [
|
518
|
-
c.value && !m.value ? (
|
529
|
+
c.value && !m.value ? (n(), B(y(We), {
|
519
530
|
key: 0,
|
520
|
-
modelValue:
|
531
|
+
modelValue: M.value,
|
521
532
|
"onUpdate:modelValue": [
|
522
|
-
e[10] || (e[10] = (s) =>
|
533
|
+
e[10] || (e[10] = (s) => M.value = s),
|
523
534
|
Ke
|
524
535
|
],
|
525
536
|
class: "justify-center",
|
526
537
|
"max-page": c.value.last_page,
|
527
538
|
strategy: c.value.strategy,
|
528
539
|
"total-visible": "5"
|
529
|
-
}, null, 8, ["modelValue", "max-page", "strategy"])) :
|
530
|
-
f.value ? (
|
531
|
-
|
540
|
+
}, null, 8, ["modelValue", "max-page", "strategy"])) : h("", !0),
|
541
|
+
f.value ? (n(), $("div", cl, [
|
542
|
+
I(y(xe), {
|
532
543
|
disabled: !f.value.prev,
|
533
544
|
onClick: e[11] || (e[11] = (s) => f.value.prev ? A(null, !1, f.value.prev) : null)
|
534
545
|
}, null, 8, ["disabled"]),
|
535
|
-
|
546
|
+
I(y(xe), {
|
536
547
|
disabled: !f.value.next,
|
537
548
|
"is-next": "",
|
538
549
|
onClick: e[12] || (e[12] = (s) => f.value.next ? A(null, !1, f.value.next) : null)
|
539
550
|
}, null, 8, ["disabled"])
|
540
|
-
])) :
|
541
|
-
p.value ?
|
542
|
-
|
551
|
+
])) : h("", !0),
|
552
|
+
p.value ? h("", !0) : (n(), $("div", fl, [
|
553
|
+
I(y(Xe), {
|
543
554
|
modelValue: C.value,
|
544
555
|
"onUpdate:modelValue": [
|
545
556
|
e[13] || (e[13] = (s) => C.value = s),
|
@@ -551,11 +562,11 @@ const el = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, ll = {
|
|
551
562
|
options: Ae.value
|
552
563
|
}, null, 8, ["modelValue", "options"])
|
553
564
|
]))
|
554
|
-
], 2)) :
|
565
|
+
], 2)) : h("", !0)
|
555
566
|
]);
|
556
567
|
};
|
557
568
|
}
|
558
569
|
};
|
559
570
|
export {
|
560
|
-
|
571
|
+
hl as default
|
561
572
|
};
|