@orchidui/core 1.6.1-4 → 1.6.1-41

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