@orchidui/core 1.8.1-39 → 1.8.1-40

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