@orchidui/core 1.6.1-6 → 1.6.1-60

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.
Files changed (89) hide show
  1. package/dist/DataDisplay/CustomerCard/OcCustomerCard.js +1 -1
  2. package/dist/DataDisplay/FloatContent/OcFloatContent.js +1 -1
  3. package/dist/DataDisplay/InfoCard/OcInfoCard.js +1 -1
  4. package/dist/DataDisplay/ListDetail/OcListDetail.js +1 -1
  5. package/dist/DataDisplay/ListItem/OcListItem.js +1 -1
  6. package/dist/DataDisplay/OnboardingListItem/OcOnboardingListItem.js +1 -1
  7. package/dist/DataDisplay/Overview/OcOverview.js +1 -1
  8. package/dist/DataDisplay/Pagination/OcPagination.js +1 -1
  9. package/dist/DataDisplay/Table/OcTable.js +3 -3
  10. package/dist/DataDisplay/TransferSummary/OcTransferSummary.js +1 -1
  11. package/dist/Disclosure/Accordion/OcAccordion.js +1 -1
  12. package/dist/Disclosure/OnboardingAccordion/OnboardingAccordion.js +1 -1
  13. package/dist/Disclosure/Steps/OcSteps.js +1 -1
  14. package/dist/Disclosure/Tabs/Tabs.js +1 -1
  15. package/dist/Disclosure/Variants/OcVariants.js +1 -1
  16. package/dist/Elements/AdditionalContent/OcAdditionalContent.js +1 -1
  17. package/dist/Elements/AuthenticationOption/AuthenticationOption.js +1 -1
  18. package/dist/Elements/Box/OcBox.js +1 -1
  19. package/dist/Elements/EmptyPage/OcEmptyPage.js +1 -1
  20. package/dist/Elements/FeatureOverviewCard/OcFeatureOverviewCard.js +1 -1
  21. package/dist/Elements/Header/OcHeader.js +3 -3
  22. package/dist/Elements/PageTitle/OcPageTitle.js +2 -2
  23. package/dist/Elements/SandboxBanner/OcSandboxBanner.js +1 -1
  24. package/dist/Elements/Sidebar/OcSidebar.js +2 -2
  25. package/dist/Elements/SubSidebar/OcSubSidebar.js +1 -1
  26. package/dist/Elements/VerificationOption/OcVerificationOption.js +2 -2
  27. package/dist/Feedback/Banner/OcBanner.js +1 -1
  28. package/dist/Feedback/Chip/OcChip.js +1 -1
  29. package/dist/Feedback/ShareIcon/OcShareIcon.js +1 -1
  30. package/dist/Feedback/Snackbar/OcSnackbar.js +1 -1
  31. package/dist/Form/BaseInput/OcBaseInput.js +1 -1
  32. package/dist/Form/Button/OcButton.js +1 -1
  33. package/dist/Form/Calendar/OcCalendar.js +1 -1
  34. package/dist/Form/CardInput/OcCardInput.js +1 -1
  35. package/dist/Form/Checkbox/OcCheckbox.js +1 -1
  36. package/dist/Form/CheckboxesGroup/OcCheckboxesGroup.js +1 -1
  37. package/dist/Form/Criteria/OcCriteria.js +1 -1
  38. package/dist/Form/Cropper/OcCropper.js +1 -1
  39. package/dist/Form/DatePicker/OcDatePicker.js +1 -1
  40. package/dist/Form/EmojiPicker/OcEmojiPicker.js +1 -1
  41. package/dist/Form/Input/OcInput.js +1 -1
  42. package/dist/Form/LinkInput/OcLinkInput.js +1 -1
  43. package/dist/Form/MultipleUploadFile/OcMultipleUploadFile.js +1 -1
  44. package/dist/Form/NumberInput/OcNumberInput.js +1 -1
  45. package/dist/Form/PhoneInput/OcPhoneInput.js +1 -1
  46. package/dist/Form/Radio/OcRadio.js +1 -1
  47. package/dist/Form/RadioGroup/OcRadioGroup.js +1 -1
  48. package/dist/Form/RangeInput/OcRangeInput.js +1 -1
  49. package/dist/Form/SectionItem/OcSectionItem.js +1 -1
  50. package/dist/Form/Select/OcSelect.js +1 -1
  51. package/dist/Form/SelectOptions/OcSelectOptions.js +1 -1
  52. package/dist/Form/SingleFileUpload/OcSingleFileUpload.js +1 -1
  53. package/dist/Form/Slider/OcSlider.js +1 -1
  54. package/dist/Form/TextArea/OcTextArea.js +1 -1
  55. package/dist/Form/index.js +15 -16
  56. package/dist/FormBuilder/OcFormBuilder.js +1 -1
  57. package/dist/MediaAndIcons/Avatar/OcAvatar.js +1 -1
  58. package/dist/{OcAccountSetupProgress-BRlNWsJO.js → OcAccountSetupProgress-DLbgWtIl.js} +1 -1
  59. package/dist/{OcAvatar-NDXQiZvz.js → OcAvatar-DeVm4Ck5.js} +1 -1
  60. package/dist/{OcComplexCalendar-B480ptES.js → OcComplexCalendar-DLOb9MOl.js} +1 -1
  61. package/dist/{OcComplexDatePicker-xNk_UqtQ.js → OcComplexDatePicker-BWn9Iu8u.js} +3 -3
  62. package/dist/{OcCropper-CXnxFeRW.js → OcCropper-CG6sl3_a.js} +1 -1
  63. package/dist/OcDataTable-BG2MtioN.js +549 -0
  64. package/dist/OcDraggableList-DOQM8ech.js +165 -0
  65. package/dist/{OcEmojiPicker-DES3wDzc.js → OcEmojiPicker-C2sC0-ZJ.js} +1 -1
  66. package/dist/{OcFilterForm-Dv7Vd6bW.js → OcFilterForm-DNZxeiJw.js} +1 -1
  67. package/dist/{OcFilterSearch-BirJ67oE.js → OcFilterSearch-CHowzC3G.js} +1 -1
  68. package/dist/{OcFilterSearchFor-DPcYD3OH.js → OcFilterSearchFor-a390BkgF.js} +1 -1
  69. package/dist/{OcModalCropper-CZPAlA6C.js → OcModalCropper-kceVfBZn.js} +4 -4
  70. package/dist/{OcPopper-C11OgQAj.js → OcPopper-D0VfWOBI.js} +1 -1
  71. package/dist/{OcTimePicker-B_mrqHyy.js → OcTimePicker-2SQgbo_4.js} +2 -2
  72. package/dist/Overlay/ConfirmationModal/OcConfirmationModal.js +1 -1
  73. package/dist/Overlay/CopyTooltip/OcCopyTooltip.js +1 -1
  74. package/dist/Overlay/Dropdown/OcDropdown.js +1 -1
  75. package/dist/Overlay/Modal/OcModal.js +1 -1
  76. package/dist/Overlay/Popper/OcPopper.js +1 -1
  77. package/dist/Overlay/SupportMenu/OcSupportMenu.js +1 -1
  78. package/dist/Overlay/Tooltip/OcTooltip.js +1 -1
  79. package/dist/Overlay/Whitelist/OcWhiteList.js +1 -1
  80. package/dist/{SubPlanCard-CoP1PU8q.js → SubPlanCard-CoIJRiVu.js} +1 -1
  81. package/dist/{ThumbnailSection-Ddxet2Op.js → ThumbnailSection-CDnGDKDB.js} +1 -1
  82. package/dist/{ThumbnailTheme-BStJB-bg.js → ThumbnailTheme-CV968vS7.js} +14 -14
  83. package/dist/{index-DQOVy14W.js → index-Z96DJVU7.js} +2244 -2068
  84. package/dist/index.js +54 -55
  85. package/dist/style.css +1 -1
  86. package/package.json +1 -1
  87. package/dist/OcDataTable-D6h-IZiv.js +0 -571
  88. package/dist/OcDraggableList-Dzu_JKTz.js +0 -158
  89. package/dist/OcSlider-DW9x8eas.js +0 -123
@@ -0,0 +1,549 @@
1
+ import { ref as S, onMounted as Te, openBlock as i, createBlock as U, unref as m, withCtx as E, createElementVNode as z, createElementBlock as O, createVNode as B, mergeProps as ke, Fragment as H, renderList as le, normalizeClass as ae, toDisplayString as he, createCommentVNode as w, computed as D, createSlots as qe, renderSlot as C, normalizeProps as xe, guardReactiveProps as we } from "vue";
2
+ import { ay as Ee, b as Ie, B as je, L as Qe, Z as Re, aJ as ze, aK as Je, aL as _e, I as Ze, J as $e, k as Ge } from "./index-Z96DJVU7.js";
3
+ import ee from "dayjs";
4
+ import { VueDraggableNext as Ve } from "vue-draggable-next";
5
+ import { _ as Oe } from "./OcIcon-CJgBICxh.js";
6
+ const We = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, Xe = {
7
+ key: 0,
8
+ class: "gap-y-2 flex flex-col border-b pb-3 border-oc-gray-200"
9
+ }, He = { class: "gap-y-2 flex flex-col" }, el = {
10
+ key: 0,
11
+ class: "flex items-center bg-white justify-between h-[26px]"
12
+ }, ll = { class: "flex items-center w-full gap-x-3" }, al = { class: "truncate w-full max-w-[160px]" }, tl = {
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: W }) {
30
+ const f = W, Y = F, v = S([]), p = S([]), a = S(!1), J = () => {
31
+ p.value = p.value.map(($) => ({
32
+ ...$,
33
+ isActive: !0
34
+ })), f("update-order", {
35
+ fixedHeaders: p.value,
36
+ activeHeaders: v.value
37
+ // isOnMount
38
+ });
39
+ }, Z = {
40
+ handle: ".drag-el",
41
+ filter: ".is-disabled",
42
+ group: "headers",
43
+ animation: 500,
44
+ forceFallback: !1,
45
+ move: ($) => $.to.dataset.activeHeaders ? !0 : !!$.draggedContext.futureIndex,
46
+ "onUpdate:modelValue": () => J()
47
+ };
48
+ return Te(() => {
49
+ p.value = Y.headers.slice(0, 1), v.value = Y.headers.slice(1).map(($) => {
50
+ var o, n, k;
51
+ return {
52
+ ...$,
53
+ isActive: ((k = (n = (o = Y.options) == null ? void 0 : o.active) == null ? void 0 : n.find((G) => G.key === $.key)) == null ? void 0 : k.isActive) ?? !0
54
+ };
55
+ }), J();
56
+ }), ($, o) => (i(), U(m(Ee), {
57
+ modelValue: a.value,
58
+ "onUpdate:modelValue": o[3] || (o[3] = (n) => a.value = n),
59
+ class: "h-[36px]",
60
+ "is-attach-to-body": ""
61
+ }, {
62
+ menu: E(() => [
63
+ z("div", We, [
64
+ p.value.length ? (i(), O("div", Xe, [
65
+ o[4] || (o[4] = z("span", { class: "text-oc-text-400 font-medium" }, "Fixed columns", -1)),
66
+ B(m(Ve), ke({
67
+ key: "key",
68
+ modelValue: p.value,
69
+ "onUpdate:modelValue": o[0] || (o[0] = (n) => p.value = n)
70
+ }, Z), {
71
+ default: E(() => [
72
+ (i(!0), O(H, null, le(p.value, (n, k) => (i(), O("div", {
73
+ key: n.key,
74
+ class: ae(["flex items-center justify-between h-[26px]", k ? "" : "is-disabled"])
75
+ }, [
76
+ z("span", null, he(n.label), 1),
77
+ k ? (i(), U(m(Oe), {
78
+ key: 0,
79
+ width: "18",
80
+ height: "18",
81
+ class: "text-oc-text-400 drag-el cursor-move",
82
+ name: "draggable"
83
+ })) : w("", !0)
84
+ ], 2))), 128))
85
+ ]),
86
+ _: 1
87
+ }, 16, ["modelValue"])
88
+ ])) : w("", !0),
89
+ z("div", He, [
90
+ o[5] || (o[5] = z("span", { class: "text-oc-text-400 font-medium" }, "Active columns", -1)),
91
+ B(m(Ve), ke({
92
+ key: "key",
93
+ modelValue: v.value,
94
+ "onUpdate:modelValue": o[2] || (o[2] = (n) => v.value = n)
95
+ }, Z, { "data-active-headers": "true" }), {
96
+ default: E(() => [
97
+ (i(!0), O(H, null, le(v.value, (n) => (i(), O(H, {
98
+ key: n.key
99
+ }, [
100
+ n.key !== "actions" ? (i(), O("div", el, [
101
+ z("div", ll, [
102
+ B(m(Ie), {
103
+ modelValue: n.isActive,
104
+ "onUpdate:modelValue": [
105
+ (k) => n.isActive = k,
106
+ o[1] || (o[1] = (k) => J())
107
+ ],
108
+ class: "!w-fit"
109
+ }, null, 8, ["modelValue", "onUpdate:modelValue"]),
110
+ z("div", al, he(n.label), 1)
111
+ ]),
112
+ v.value.length > 1 ? (i(), U(m(Oe), {
113
+ key: 0,
114
+ width: "18",
115
+ height: "18",
116
+ class: "text-oc-text-400 drag-el cursor-move",
117
+ name: "draggable"
118
+ })) : w("", !0)
119
+ ])) : w("", !0)
120
+ ], 64))), 128))
121
+ ]),
122
+ _: 1
123
+ }, 16, ["modelValue"])
124
+ ])
125
+ ])
126
+ ]),
127
+ default: E(() => [
128
+ B(m(je), {
129
+ label: "Edit Column",
130
+ "left-icon": "setting",
131
+ variant: "secondary"
132
+ })
133
+ ]),
134
+ _: 1
135
+ }, 8, ["modelValue"]));
136
+ }
137
+ }, sl = { class: "relative flex flex-col gap-9" }, ul = {
138
+ key: 0,
139
+ class: "flex items-center px-4 min-h-[52px]"
140
+ }, ol = {
141
+ key: 0,
142
+ class: "absolute flex items-center gap-5 left-5"
143
+ }, rl = {
144
+ key: 1,
145
+ class: "absolute flex gap-3 left-5"
146
+ }, il = {
147
+ key: 1,
148
+ class: "flex justify-center w-full gap-5 md:justify-start"
149
+ }, nl = {
150
+ key: 2,
151
+ class: "items-center hidden md:flex"
152
+ }, ml = {
153
+ __name: "OcDataTable",
154
+ props: {
155
+ isLoading: Boolean,
156
+ id: {
157
+ type: String,
158
+ required: !0
159
+ },
160
+ options: {
161
+ type: Object,
162
+ required: !0
163
+ },
164
+ filter: {
165
+ type: Object,
166
+ required: !0
167
+ },
168
+ columns: {
169
+ type: Object
170
+ },
171
+ selected: {
172
+ type: Array,
173
+ required: !1
174
+ },
175
+ rowClass: String,
176
+ rowKey: {
177
+ type: String,
178
+ Function,
179
+ default: "id"
180
+ },
181
+ rowLink: String
182
+ },
183
+ emits: {
184
+ "update:selected": [],
185
+ "update:filter": [],
186
+ "click:row": [],
187
+ "filter-fields-changed": [],
188
+ "filter-removed": [],
189
+ "search-query-changed": [],
190
+ "hover:cell": [],
191
+ "columns-changed": []
192
+ },
193
+ setup(F, { emit: W }) {
194
+ var ue, oe, re, ie, ne, de, ve, fe, pe, ce, me, ye, ge;
195
+ const f = F, Y = W, v = D(() => {
196
+ var l;
197
+ return (l = f.options) == null ? void 0 : l.pagination;
198
+ }), p = D(() => {
199
+ var l;
200
+ return (l = f.options) == null ? void 0 : l.cursor;
201
+ }), a = D(() => {
202
+ var l;
203
+ return (l = f.options) == null ? void 0 : l.filterOptions;
204
+ }), J = D(() => {
205
+ var l;
206
+ return (l = f.options) == null ? void 0 : l.hidePerPageDropdown;
207
+ }), Z = D(() => {
208
+ var l;
209
+ return ((l = v.value) == null ? void 0 : l.last_page) === 1;
210
+ }), $ = S(!1), o = S(f.filter[(oe = (ue = a.value) == null ? void 0 : ue.tabs) == null ? void 0 : oe.key]), n = S(f.filter.page), k = S(
211
+ (ie = (re = a.value) == null ? void 0 : re.per_page) != null && ie.key ? f.filter[(de = (ne = a.value) == null ? void 0 : ne.per_page) == null ? void 0 : de.key] : f.filter.per_page
212
+ ), G = ((pe = f.filter[(fe = (ve = a.value) == null ? void 0 : ve.search) == null ? void 0 : fe.key]) == null ? void 0 : pe.trim()) ?? "", Q = S(G ? G.split(",") : []), te = S(!1), R = f.filter;
213
+ !R && v ? R.page = f.filter.page ?? 1 : !R && p && (R.cursor = f.filter.cursor ?? "");
214
+ const t = S(R), X = S([
215
+ ...t.value[(me = (ce = a.value) == null ? void 0 : ce.columnEdit) == null ? void 0 : me.key].fixed,
216
+ ...t.value[(ge = (ye = a.value) == null ? void 0 : ye.columnEdit) == null ? void 0 : ge.key].active
217
+ ]), M = D(() => {
218
+ var l;
219
+ return (l = f.options) == null ? void 0 : l.tableOptions;
220
+ }), Fe = D(() => {
221
+ var l;
222
+ return {
223
+ ...M.value,
224
+ headers: X.value ? X.value.map((e) => {
225
+ var u, d;
226
+ return e.class = ((d = (u = M.value) == null ? void 0 : u.headers.find((c) => c.key === e.key)) == null ? void 0 : d.class) ?? "", e;
227
+ }).filter((e) => se(e.key)) : (l = M.value) == null ? void 0 : l.headers.filter((e) => se(e.key))
228
+ };
229
+ }), Ae = D(
230
+ () => {
231
+ var l, e;
232
+ return (e = (l = f.options) == null ? void 0 : l.perPageOptions) == null ? void 0 : e.map(
233
+ (u) => ({
234
+ label: `${u}`,
235
+ value: u
236
+ })
237
+ );
238
+ }
239
+ ), De = D(() => {
240
+ let l = [
241
+ {
242
+ label: "10",
243
+ value: 10
244
+ },
245
+ {
246
+ label: "15",
247
+ value: 15
248
+ },
249
+ {
250
+ label: "20",
251
+ value: 20
252
+ },
253
+ {
254
+ label: "25",
255
+ value: 25
256
+ },
257
+ {
258
+ label: "40",
259
+ value: 40
260
+ },
261
+ {
262
+ label: "50",
263
+ value: 50
264
+ },
265
+ {
266
+ label: "75",
267
+ value: 75
268
+ },
269
+ {
270
+ label: "99",
271
+ value: 99
272
+ }
273
+ ], e = Ae.value ?? l;
274
+ if (v.value) {
275
+ const u = v.value.total < 100 ? v.value.total : 100;
276
+ u > 10 && (e = e.filter((d) => d.value <= u));
277
+ }
278
+ return [...new Set(e)];
279
+ }), Se = D(() => {
280
+ var l;
281
+ return ((l = f.selected) == null ? void 0 : l.length) > 0;
282
+ }), Pe = (l) => {
283
+ !l.trim() || Q.value.includes(l) || (Q.value = [l], j(), Y("search-query-changed", l));
284
+ }, Ce = (l) => {
285
+ Q.value = Q.value.filter((e) => e !== l), j();
286
+ }, Ue = () => {
287
+ var e, u, d, c, y, s, g, h, b, V, K, N, T, q;
288
+ Q.value = [], o.value = "";
289
+ const l = {};
290
+ a.value ? R.page = 1 : R.cursor = "", (u = (e = a.value) == null ? void 0 : e.per_page) != null && u.key ? l[(c = (d = a.value) == null ? void 0 : d.per_page) == null ? void 0 : c.key] = k.value : l.per_page = k.value, (s = (y = a.value) == null ? void 0 : y.tabs) != null && s.key ? l[(h = (g = a.value) == null ? void 0 : g.tabs) == null ? void 0 : h.key] = o.value : l.tabs = o.value, (V = (b = a.value) == null ? void 0 : b.columnEdit) != null && V.key && (l[(N = (K = a.value) == null ? void 0 : K.columnEdit) == null ? void 0 : N.key] = t.value[(q = (T = a.value) == null ? void 0 : T.columnEdit) == null ? void 0 : q.key]), t.value = l, j();
291
+ }, Ye = () => {
292
+ j(null, n.value);
293
+ }, j = (l = null, e = !1, u = "") => {
294
+ var c, y, s, g, h;
295
+ v.value && !e && (n.value = 1), v.value ? t.value.page = n.value : t.value.cursor = u, (c = a.value) != null && c.per_page ? t.value[a.value.per_page.key] = k.value : t.value.per_page = k.value, (y = a.value) != null && y.tabs && (t.value[a.value.tabs.key] = o.value), (s = a.value) != null && s.search && (t.value[a.value.search.key] = Q.value.join()), l && ($.value = !1, t.value = { ...t.value, ...l }, Object.keys(t.value).forEach((b) => {
296
+ Array.isArray(t.value[b]) && t.value[b].length === 0 && delete t.value[b];
297
+ }));
298
+ let d = (h = (g = a.value) == null ? void 0 : g.tabs) == null ? void 0 : h.key;
299
+ if (d && o.value !== t.value[d])
300
+ return o.value = t.value[d], j(t.value), !1;
301
+ Y("update:filter", t.value);
302
+ }, Le = (l, e) => {
303
+ (e === a.value.tabs.key || e === "tabs") && (o.value = ""), j(l), Y("filter-removed", e);
304
+ }, Be = (l) => {
305
+ let e = [];
306
+ return l.forEach((u) => {
307
+ e.push(u.key);
308
+ }), e;
309
+ }, Me = D(() => {
310
+ if (t.value) {
311
+ let l = [];
312
+ return Object.keys(t.value).forEach((e) => {
313
+ var y, s, g, h, b, V, K, N, T, q, _;
314
+ let u = (s = (y = a.value) == null ? void 0 : y.tabs) == null ? void 0 : s.key;
315
+ const d = (h = (g = a.value) == null ? void 0 : g.search) == null ? void 0 : h.key, c = ((V = (b = a.value) == null ? void 0 : b.per_page) == null ? void 0 : V.key) ?? "per_page";
316
+ if ((K = a.value.form) == null || K.find((x) => {
317
+ x.name === u && (u = "");
318
+ }), e !== "page" && e !== "cursor" && e !== c && e !== u && e !== d) {
319
+ let x = null, r = (N = a.value.form) == null ? void 0 : N.find((L) => {
320
+ if (typeof L.name == "object") {
321
+ let P = !1;
322
+ return L.name.forEach((I) => {
323
+ I.key === e && (P = !0, x = Be(L.name));
324
+ }), P;
325
+ } else
326
+ return L.name === e;
327
+ }), A = "";
328
+ if (r && t.value[e]) {
329
+ if (typeof r.name == "object" ? (T = r.name) == null || T.forEach((P) => {
330
+ A && (A += " - "), A += t.value[P.key];
331
+ }) : A = t.value[e], r.props.options && (A = (r.props.multiple ? t.value[e] : [t.value[e]]).map(
332
+ (I) => {
333
+ var be;
334
+ return (be = r.props.options.find(({ value: Ne }) => Ne === I)) == null ? void 0 : be.label;
335
+ }
336
+ ).join(", ")), r.type === "RangeInput" && Array.isArray(t.value[e]) && (A = t.value[e][0].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + " - " + t.value[e][1].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")), r.type === "DatePicker")
337
+ if (((q = r == null ? void 0 : r.props) == null ? void 0 : q.type) === "range" && r.name && r.name[1]) {
338
+ const P = ee(t.value[r.name[0].key]).format("MM/DD/YYYY"), I = ee(t.value[r.name[1].key]).format("MM/DD/YYYY");
339
+ A = P === I ? P : P + " - " + I;
340
+ } else A = ee(t.value[r.name]).format("MM/DD/YYYY");
341
+ let L = `${(_ = r == null ? void 0 : r.props) == null ? void 0 : _.label} : ${A}`;
342
+ r && r.name && typeof r.name == "object" && l.find((I) => I.name === x[0]) && (L = ""), l.push({
343
+ label: L,
344
+ name: e,
345
+ multiNames: x
346
+ });
347
+ }
348
+ }
349
+ }), l;
350
+ }
351
+ return [];
352
+ }), se = (l) => {
353
+ var e, u, d, c, y, s;
354
+ return ((s = (y = (c = (d = t.value) == null ? void 0 : d[(u = (e = a.value) == null ? void 0 : e.columnEdit) == null ? void 0 : u.key]) == null ? void 0 : c.active) == null ? void 0 : y.find((g) => g.key === l)) == null ? void 0 : s.isActive) ?? !0;
355
+ }, Ke = ({ fixedHeaders: l, activeHeaders: e, isOnMount: u }) => {
356
+ var d, c, y, s, g, h, b, V;
357
+ t.value[(c = (d = a.value) == null ? void 0 : d.columnEdit) == null ? void 0 : c.key] || (t.value[(s = (y = a.value) == null ? void 0 : y.columnEdit) == null ? void 0 : s.key] = {}), t.value[(h = (g = a.value) == null ? void 0 : g.columnEdit) == null ? void 0 : h.key].fixed = l, t.value[(V = (b = a.value) == null ? void 0 : b.columnEdit) == null ? void 0 : V.key].active = e, X.value = [...l, ...e], j(), Y("columns-changed", e);
358
+ };
359
+ return (l, e) => {
360
+ var u, d, c, y;
361
+ return i(), O("div", sl, [
362
+ M.value ? (i(), U(m(Qe), {
363
+ key: 0,
364
+ selected: F.selected,
365
+ "row-key": F.rowKey,
366
+ options: Fe.value,
367
+ "is-loading": F.isLoading,
368
+ "loading-rows": k.value,
369
+ "row-class": F.rowClass,
370
+ "row-link": F.rowLink,
371
+ "is-sticky": M.value.isSticky,
372
+ "is-borderless": M.value.isBorderless,
373
+ "onUpdate:selected": e[7] || (e[7] = (s) => l.$emit("update:selected", s)),
374
+ "onClick:row": e[8] || (e[8] = (s) => l.$emit("click:row", s)),
375
+ "onHover:cell": e[9] || (e[9] = (s) => l.$emit("hover:cell", s))
376
+ }, qe({
377
+ after: E(() => [
378
+ C(l.$slots, "after")
379
+ ]),
380
+ empty: E(() => [
381
+ C(l.$slots, "empty")
382
+ ]),
383
+ "table-header": E((s) => [
384
+ C(l.$slots, "table-header", xe(we(s)))
385
+ ]),
386
+ "table-body": E((s) => [
387
+ C(l.$slots, "table-body", xe(we(s)))
388
+ ]),
389
+ _: 2
390
+ }, [
391
+ l.$slots.before || (u = a.value) != null && u.search || (d = a.value) != null && d.form || (c = a.value) != null && c.tabs ? {
392
+ name: "before",
393
+ fn: E(() => {
394
+ var s, g, h, b;
395
+ return [
396
+ C(l.$slots, "before"),
397
+ (s = a.value) != null && s.search || (g = a.value) != null && g.form || (h = a.value) != null && h.tabs ? (i(), O("div", ul, [
398
+ Se.value ? (i(), O("div", ol, [
399
+ C(l.$slots, "bulk-actions", { selectedRows: F.selected })
400
+ ])) : (i(), O("div", rl, [
401
+ (b = a.value) != null && b.tabs ? (i(), U(m(Re), {
402
+ key: 0,
403
+ modelValue: o.value,
404
+ "onUpdate:modelValue": [
405
+ e[0] || (e[0] = (V) => o.value = V),
406
+ e[1] || (e[1] = (V) => j(null))
407
+ ],
408
+ "is-disabled": F.isLoading,
409
+ tabs: a.value.tabs.options,
410
+ variant: "pills"
411
+ }, null, 8, ["modelValue", "is-disabled", "tabs"])) : w("", !0)
412
+ ])),
413
+ C(l.$slots, "filter-options", {}, () => {
414
+ var V, K, N, T, q, _;
415
+ return [
416
+ (V = a.value) != null && V.search || (K = a.value) != null && K.form || (N = a.value) != null && N.columnEdit ? (i(), O("div", {
417
+ key: 0,
418
+ class: ae([
419
+ "flex gap-3 absolute ml-auto bg-oc-bg-light right-4 max-w-[calc(100%-24px)]",
420
+ a.value ? te.value ? "md:w-fit w-full" : "" : "w-full justify-end"
421
+ ])
422
+ }, [
423
+ (T = a.value) != null && T.search ? (i(), U(m(ze), {
424
+ key: 0,
425
+ "is-search-only": !a.value.tabs || a.value.isSearchOnly,
426
+ onAddQuery: Pe,
427
+ onToggle: e[2] || (e[2] = (x) => te.value = x)
428
+ }, null, 8, ["is-search-only"])) : w("", !0),
429
+ (q = a.value) != null && q.form ? (i(), U(m(Ee), {
430
+ key: 1,
431
+ modelValue: $.value,
432
+ "onUpdate:modelValue": e[6] || (e[6] = (x) => $.value = x),
433
+ distance: 9,
434
+ placement: "bottom-end",
435
+ "is-attach-to-body": ""
436
+ }, {
437
+ menu: E(() => [
438
+ $.value ? (i(), U(m(Je), {
439
+ key: 0,
440
+ id: F.id,
441
+ "json-form": a.value.form ?? [],
442
+ grid: a.value.grid ?? null,
443
+ values: f.filter,
444
+ actions: a.value.actions,
445
+ onApplyFilter: e[3] || (e[3] = (x) => j(x)),
446
+ onFilterFieldsChanged: e[4] || (e[4] = (x) => Y("filter-fields-changed", x)),
447
+ onCancel: e[5] || (e[5] = (x) => $.value = !1)
448
+ }, {
449
+ default: E(({ errors: x, values: r, jsonForm: A, updateForm: L }) => [
450
+ C(l.$slots, "custom-filter-form", {
451
+ errors: x,
452
+ values: r,
453
+ jsonForm: A,
454
+ updateFilter: L
455
+ })
456
+ ]),
457
+ _: 3
458
+ }, 8, ["id", "json-form", "grid", "values", "actions"])) : w("", !0)
459
+ ]),
460
+ default: E(() => [
461
+ B(m(je), {
462
+ "is-active": $.value,
463
+ variant: "secondary",
464
+ "left-icon": "filter"
465
+ }, null, 8, ["is-active"])
466
+ ]),
467
+ _: 3
468
+ }, 8, ["modelValue"])) : w("", !0),
469
+ a.value.columnEdit ? (i(), U(tl, {
470
+ key: 2,
471
+ options: t.value.columnEdit,
472
+ headers: ((_ = M.value) == null ? void 0 : _.headers) || [],
473
+ onUpdateOrder: Ke
474
+ }, null, 8, ["options", "headers"])) : w("", !0)
475
+ ], 2)) : w("", !0)
476
+ ];
477
+ })
478
+ ])) : w("", !0),
479
+ B(m(_e), {
480
+ filters: Me.value,
481
+ queries: Q.value,
482
+ class: "border-t border-oc-gray-200",
483
+ onRemoveQuery: Ce,
484
+ onRemoveAll: Ue,
485
+ onRemoveFilter: Le
486
+ }, null, 8, ["filters", "queries"])
487
+ ];
488
+ }),
489
+ key: "0"
490
+ } : void 0,
491
+ le((y = M.value) == null ? void 0 : y.headers, (s, g) => ({
492
+ name: s.key,
493
+ fn: E(({ data: h, item: b }) => [
494
+ C(l.$slots, s.key, {
495
+ data: h,
496
+ item: b
497
+ })
498
+ ])
499
+ }))
500
+ ]), 1032, ["selected", "row-key", "options", "is-loading", "loading-rows", "row-class", "row-link", "is-sticky", "is-borderless"])) : w("", !0),
501
+ C(l.$slots, "before-pagination"),
502
+ v.value || p.value ? (i(), O("div", {
503
+ key: 1,
504
+ class: ae(["flex items-center gap-3", v.value && v.value.last_page === 1 ? "justify-end" : ""])
505
+ }, [
506
+ v.value && !Z.value ? (i(), U(m(Ze), {
507
+ key: 0,
508
+ modelValue: n.value,
509
+ "onUpdate:modelValue": [
510
+ e[10] || (e[10] = (s) => n.value = s),
511
+ Ye
512
+ ],
513
+ class: "justify-center",
514
+ "max-page": v.value.last_page,
515
+ strategy: v.value.strategy,
516
+ "total-visible": "5"
517
+ }, null, 8, ["modelValue", "max-page", "strategy"])) : w("", !0),
518
+ p.value ? (i(), O("div", il, [
519
+ B(m($e), {
520
+ disabled: !p.value.prev,
521
+ onClick: e[11] || (e[11] = (s) => p.value.prev ? j(null, !1, p.value.prev) : null)
522
+ }, null, 8, ["disabled"]),
523
+ B(m($e), {
524
+ disabled: !p.value.next,
525
+ "is-next": "",
526
+ onClick: e[12] || (e[12] = (s) => p.value.next ? j(null, !1, p.value.next) : null)
527
+ }, null, 8, ["disabled"])
528
+ ])) : w("", !0),
529
+ J.value ? w("", !0) : (i(), O("div", nl, [
530
+ B(m(Ge), {
531
+ modelValue: k.value,
532
+ "onUpdate:modelValue": [
533
+ e[13] || (e[13] = (s) => k.value = s),
534
+ e[14] || (e[14] = (s) => j(null))
535
+ ],
536
+ label: "Item per page",
537
+ "is-inline-label": "",
538
+ "popper-options": { placement: "auto" },
539
+ options: De.value
540
+ }, null, 8, ["modelValue", "options"])
541
+ ]))
542
+ ], 2)) : w("", !0)
543
+ ]);
544
+ };
545
+ }
546
+ };
547
+ export {
548
+ ml as default
549
+ };