@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
@@ -1,571 +0,0 @@
1
- import { ref as P, onMounted as Ve, openBlock as n, createBlock as B, unref as y, withCtx as F, createElementVNode as G, createElementBlock as $, createVNode as N, 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 U, normalizeProps as ke, guardReactiveProps as he } from "vue";
2
- import { ax as Ee, b as Je, B as Fe, L as ze, Y as _e, aI as Ge, aJ as He, aK as We, I as Xe, J as xe, k as Ze } from "./index-DQOVy14W.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 el, setInLocalStorage as $e } from "./DataTable/utils/editColumnsUtils.js";
6
- import { _ as Se } from "./OcIcon-CJgBICxh.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(j, { emit: Z }) {
31
- const v = Z, O = j, c = P([]), f = P([]), J = P(!1), S = (a = !1) => {
32
- f.value = f.value.map((p) => ({
33
- ...p,
34
- isActive: !0
35
- })), v("update-order", {
36
- fixedHeaders: f.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": () => S()
48
- };
49
- return Ve(() => {
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, I, C;
53
- return {
54
- ...x,
55
- isActive: ((C = (I = (V = O.options) == null ? void 0 : V.active) == null ? void 0 : I.find((X) => X.key === x.key)) == null ? void 0 : C.isActive) ?? !0
56
- };
57
- }), S(!0);
58
- }), (a, p) => (n(), B(y(Ee), {
59
- modelValue: J.value,
60
- "onUpdate:modelValue": p[3] || (p[3] = (m) => J.value = m),
61
- class: "h-[36px]",
62
- "is-attach-to-body": ""
63
- }, {
64
- menu: F(() => [
65
- G("div", ll, [
66
- f.value.length ? (n(), $("div", al, [
67
- p[4] || (p[4] = G("span", { class: "text-oc-text-400 font-medium" }, "Fixed columns", -1)),
68
- N(y(we), ge({
69
- key: "key",
70
- modelValue: f.value,
71
- "onUpdate:modelValue": p[0] || (p[0] = (m) => f.value = m)
72
- }, W), {
73
- default: F(() => [
74
- (n(!0), $(ee, null, ae(f.value, (m, x) => (n(), $("div", {
75
- key: m.key,
76
- class: te(["flex items-center justify-between h-[26px]", x ? "" : "is-disabled"])
77
- }, [
78
- G("span", null, be(m.label), 1),
79
- x ? (n(), B(y(Se), {
80
- key: 0,
81
- width: "18",
82
- height: "18",
83
- class: "text-oc-text-400 drag-el cursor-move",
84
- name: "draggable"
85
- })) : h("", !0)
86
- ], 2))), 128))
87
- ]),
88
- _: 1
89
- }, 16, ["modelValue"])
90
- ])) : h("", !0),
91
- G("div", tl, [
92
- p[5] || (p[5] = G("span", { class: "text-oc-text-400 font-medium" }, "Active columns", -1)),
93
- N(y(we), ge({
94
- key: "key",
95
- modelValue: c.value,
96
- "onUpdate:modelValue": p[2] || (p[2] = (m) => c.value = m)
97
- }, W, { "data-active-headers": "true" }), {
98
- default: F(() => [
99
- (n(!0), $(ee, null, ae(c.value, (m) => (n(), $(ee, {
100
- key: m.key
101
- }, [
102
- m.key !== "actions" ? (n(), $("div", sl, [
103
- G("div", ol, [
104
- N(y(Je), {
105
- modelValue: m.isActive,
106
- "onUpdate:modelValue": [
107
- (x) => m.isActive = x,
108
- p[1] || (p[1] = (x) => S())
109
- ],
110
- class: "!w-fit"
111
- }, null, 8, ["modelValue", "onUpdate:modelValue"]),
112
- G("div", ul, be(m.label), 1)
113
- ]),
114
- c.value.length > 1 ? (n(), B(y(Se), {
115
- key: 0,
116
- width: "18",
117
- height: "18",
118
- class: "text-oc-text-400 drag-el cursor-move",
119
- name: "draggable"
120
- })) : h("", !0)
121
- ])) : h("", !0)
122
- ], 64))), 128))
123
- ]),
124
- _: 1
125
- }, 16, ["modelValue"])
126
- ])
127
- ])
128
- ]),
129
- default: F(() => [
130
- N(y(Fe), {
131
- label: "Edit Column",
132
- "left-icon": "setting",
133
- variant: "secondary"
134
- })
135
- ]),
136
- _: 1
137
- }, 8, ["modelValue"]));
138
- }
139
- }, il = { class: "flex flex-col gap-9 relative" }, nl = {
140
- key: 0,
141
- class: "flex items-center px-4 min-h-[52px]"
142
- }, dl = {
143
- key: 0,
144
- class: "flex gap-5 items-center absolute left-5"
145
- }, vl = {
146
- key: 1,
147
- class: "flex gap-3 absolute left-5"
148
- }, cl = {
149
- key: 1,
150
- class: "flex w-full gap-5 md:justify-start justify-center"
151
- }, fl = {
152
- key: 2,
153
- class: "hidden md:flex items-center"
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(j, { emit: Z }) {
193
- var re, ie, ne, de, ve, ce, fe, pe, me;
194
- const v = j, O = Z, c = L(() => {
195
- var l;
196
- return (l = v.options) == null ? void 0 : l.pagination;
197
- }), f = L(() => {
198
- var l;
199
- return (l = v.options) == null ? void 0 : l.cursor;
200
- }), J = P(), S = L(() => {
201
- var l;
202
- return (l = v.options) == null ? void 0 : l.tableOptions;
203
- }), W = L(() => {
204
- var l;
205
- return {
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))
211
- };
212
- }), a = L(() => {
213
- var l;
214
- return (l = v.options) == null ? void 0 : l.filterOptions;
215
- }), p = L(() => {
216
- var l;
217
- return (l = v.options) == null ? void 0 : l.hidePerPageDropdown;
218
- }), m = L(() => {
219
- var l;
220
- return ((l = c.value) == null ? void 0 : l.last_page) === 1;
221
- }), x = P(!1), V = P(v.filter[(ie = (re = a.value) == null ? void 0 : re.tabs) == null ? void 0 : ie.key]), I = P(v.filter.page), C = P(
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 = P(X ? X.split(",") : []), oe = P(!1), je = L(
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 = L(() => {
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((u) => u.value <= o));
271
- }
272
- return [...new Set(e)];
273
- }), De = L(() => {
274
- var l;
275
- return ((l = v.selected) == null ? void 0 : l.length) > 0;
276
- }), Le = (l) => {
277
- !l.trim() || z.value.includes(l) || (z.value = [l], A(), O("search-query-changed", l));
278
- }, Pe = (l) => {
279
- z.value = z.value.filter((e) => e !== l), A();
280
- }, _ = v.filter;
281
- !_ && c ? _.page = 1 : !_ && f && (_.cursor = "");
282
- const t = P(_), Ce = () => {
283
- var e, o, u, r, d, s, g, b, E, w, K, T, q, Q;
284
- z.value = [], V.value = "";
285
- const 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();
287
- }, Ke = () => {
288
- A(null, I.value);
289
- }, Ye = () => {
290
- v.id && $e(v.id, JSON.stringify(t.value));
291
- }, Ue = () => v.id ? se(v.id) : null, A = (l = null, e = !1, o = "") => {
292
- var u, r, d;
293
- c.value && !e && (I.value = 1), c.value ? t.value.page = I.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) => {
294
- Array.isArray(t.value[s]) && t.value[s].length === 0 && delete t.value[s];
295
- })), Ye(), O("update:filter", t.value);
296
- }, Be = (l, e) => {
297
- (e === a.value.tabs.key || e === "tabs") && (V.value = ""), A(l), O("filter-removed", e);
298
- }, Ie = (l) => {
299
- let e = [];
300
- return l.forEach((o) => {
301
- e.push(o.key);
302
- }), e;
303
- }, Me = L(() => {
304
- if (t.value) {
305
- let l = [];
306
- return Object.keys(t.value).forEach((e) => {
307
- var d, s, g, b, E, w, K, T, q, Q, H;
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";
310
- if ((K = a.value.form) == null || K.find((k) => {
311
- k.name === o && (o = "");
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((M) => {
314
- if (typeof M.name == "object") {
315
- let Y = !1;
316
- return M.name.forEach((R) => {
317
- R.key === e && (Y = !0, k = Ie(M.name));
318
- }), Y;
319
- } else
320
- return M.name === e;
321
- }), D = "";
322
- if (i && t.value[e]) {
323
- if (typeof i.name == "object" ? (q = i.name) == null || q.forEach((Y) => {
324
- D && (D += " - "), D += t.value[Y.key];
325
- }) : D = t.value[e], i.props.options && (D = (i.props.multiple ? t.value[e] : [t.value[e]]).map(
326
- (R) => {
327
- var ye;
328
- return (ye = i.props.options.find(({ value: qe }) => qe === R)) == null ? void 0 : ye.label;
329
- }
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 Y = 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 = Y === R ? Y : Y + " - " + R;
334
- } else D = le(t.value[i.name]).format("MM/DD/YYYY");
335
- let M = `${(H = i == null ? void 0 : i.props) == null ? void 0 : H.label} : ${D}`;
336
- i && i.name && typeof i.name == "object" && l.find((R) => R.name === k[0]) && (M = ""), l.push({
337
- label: M,
338
- name: e,
339
- multiNames: k
340
- });
341
- }
342
- }
343
- }), l;
344
- }
345
- return [];
346
- }), ue = (l) => {
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
- }, Ne = ({ 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);
353
- $e(a.value.columnEdit.localStorageKey, K);
354
- }
355
- O("columns-changed", e);
356
- }, Te = () => {
357
- var l, e, o, u, r, d;
358
- if ((e = (l = a.value) == null ? void 0 : l.columnEdit) != null && e.localStorageKey) {
359
- const s = se(a.value.columnEdit.localStorageKey);
360
- if (s) {
361
- const { fixed: g, active: b } = Oe(
362
- s,
363
- S.value.headers,
364
- a.value.columnEdit.localStorageKey
365
- );
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];
367
- }
368
- }
369
- };
370
- return Qe(
371
- () => v.filter,
372
- (l) => {
373
- l && l[a.value.tabs.key] && (V.value = l[a.value.tabs.key]);
374
- }
375
- ), Ve(() => {
376
- var e, o, u, r, d;
377
- Te();
378
- const l = Ue();
379
- 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]), I.value = ((d = t.value) == null ? void 0 : d.page) || 1, A(null, !0, t.value.cursor));
380
- }), (l, e) => {
381
- var o, u, r, d;
382
- return n(), $("div", il, [
383
- S.value ? (n(), B(y(ze), {
384
- key: 0,
385
- selected: j.selected,
386
- "row-key": j.rowKey,
387
- options: W.value,
388
- "is-loading": j.isLoading,
389
- "loading-rows": C.value,
390
- "row-class": j.rowClass,
391
- "row-link": j.rowLink,
392
- "is-sticky": S.value.isSticky,
393
- "is-borderless": S.value.isBorderless,
394
- "onUpdate:selected": e[7] || (e[7] = (s) => l.$emit("update:selected", s)),
395
- "onClick:row": e[8] || (e[8] = (s) => l.$emit("click:row", s)),
396
- "onHover:cell": e[9] || (e[9] = (s) => l.$emit("hover:cell", s))
397
- }, Re({
398
- after: F(() => [
399
- U(l.$slots, "after")
400
- ]),
401
- empty: F(() => [
402
- U(l.$slots, "empty")
403
- ]),
404
- "table-header": F((s) => [
405
- U(l.$slots, "table-header", ke(he(s)))
406
- ]),
407
- "table-body": F((s) => [
408
- U(l.$slots, "table-body", ke(he(s)))
409
- ]),
410
- _: 2
411
- }, [
412
- l.$slots.before || (o = a.value) != null && o.search || (u = a.value) != null && u.form || (r = a.value) != null && r.tabs ? {
413
- name: "before",
414
- fn: F(() => {
415
- var s, g, b, E;
416
- return [
417
- U(l.$slots, "before"),
418
- (s = a.value) != null && s.search || (g = a.value) != null && g.form || (b = a.value) != null && b.tabs ? (n(), $("div", nl, [
419
- De.value ? (n(), $("div", dl, [
420
- U(l.$slots, "bulk-actions", { selectedRows: j.selected })
421
- ])) : (n(), $("div", vl, [
422
- (E = a.value) != null && E.tabs ? (n(), B(y(_e), {
423
- key: 0,
424
- modelValue: V.value,
425
- "onUpdate:modelValue": [
426
- e[0] || (e[0] = (w) => V.value = w),
427
- e[1] || (e[1] = (w) => A(null))
428
- ],
429
- "is-disabled": j.isLoading,
430
- tabs: a.value.tabs.options,
431
- variant: "pills"
432
- }, null, 8, ["modelValue", "is-disabled", "tabs"])) : h("", !0)
433
- ])),
434
- U(l.$slots, "filter-options", {}, () => {
435
- var w, K, T, q, Q, H;
436
- return [
437
- (w = a.value) != null && w.search || (K = a.value) != null && K.form || (T = a.value) != null && T.columnEdit ? (n(), $("div", {
438
- key: 0,
439
- class: te([
440
- "flex gap-3 absolute ml-auto bg-oc-bg-light right-4 max-w-[calc(100%-24px)]",
441
- a.value ? oe.value ? "md:w-fit w-full" : "" : "w-full justify-end"
442
- ])
443
- }, [
444
- (q = a.value) != null && q.search ? (n(), B(y(Ge), {
445
- key: 0,
446
- "is-search-only": !a.value.tabs || a.value.isSearchOnly,
447
- onAddQuery: Le,
448
- onToggle: e[2] || (e[2] = (k) => oe.value = k)
449
- }, null, 8, ["is-search-only"])) : h("", !0),
450
- (Q = a.value) != null && Q.form ? (n(), B(y(Ee), {
451
- key: 1,
452
- modelValue: x.value,
453
- "onUpdate:modelValue": e[6] || (e[6] = (k) => x.value = k),
454
- distance: 9,
455
- placement: "bottom-end",
456
- "is-attach-to-body": ""
457
- }, {
458
- menu: F(() => [
459
- x.value ? (n(), B(y(He), {
460
- key: 0,
461
- id: j.id,
462
- "json-form": a.value.form ?? [],
463
- grid: a.value.grid ?? null,
464
- values: v.filter,
465
- actions: a.value.actions,
466
- onApplyFilter: e[3] || (e[3] = (k) => A(k)),
467
- onFilterFieldsChanged: e[4] || (e[4] = (k) => O("filter-fields-changed", k)),
468
- onCancel: e[5] || (e[5] = (k) => x.value = !1)
469
- }, {
470
- default: F(({ errors: k, values: i, jsonForm: D, updateForm: M }) => [
471
- U(l.$slots, "custom-filter-form", {
472
- errors: k,
473
- values: i,
474
- jsonForm: D,
475
- updateFilter: M
476
- })
477
- ]),
478
- _: 3
479
- }, 8, ["id", "json-form", "grid", "values", "actions"])) : h("", !0)
480
- ]),
481
- default: F(() => [
482
- N(y(Fe), {
483
- "is-active": x.value,
484
- variant: "secondary",
485
- "left-icon": "filter"
486
- }, null, 8, ["is-active"])
487
- ]),
488
- _: 3
489
- }, 8, ["modelValue"])) : h("", !0),
490
- a.value.columnEdit ? (n(), B(rl, {
491
- key: 2,
492
- options: t.value.columnEdit,
493
- headers: ((H = S.value) == null ? void 0 : H.headers) || [],
494
- "local-key": a.value.columnEdit.localStorageKey,
495
- onUpdateOrder: Ne
496
- }, null, 8, ["options", "headers", "local-key"])) : h("", !0)
497
- ], 2)) : h("", !0)
498
- ];
499
- })
500
- ])) : h("", !0),
501
- N(y(We), {
502
- filters: Me.value,
503
- queries: z.value,
504
- class: "border-t border-oc-gray-200",
505
- onRemoveQuery: Pe,
506
- onRemoveAll: Ce,
507
- onRemoveFilter: Be
508
- }, null, 8, ["filters", "queries"])
509
- ];
510
- }),
511
- key: "0"
512
- } : void 0,
513
- ae((d = S.value) == null ? void 0 : d.headers, (s, g) => ({
514
- name: s.key,
515
- fn: F(({ data: b, item: E }) => [
516
- U(l.$slots, s.key, {
517
- data: b,
518
- item: E
519
- })
520
- ])
521
- }))
522
- ]), 1032, ["selected", "row-key", "options", "is-loading", "loading-rows", "row-class", "row-link", "is-sticky", "is-borderless"])) : h("", !0),
523
- U(l.$slots, "before-pagination"),
524
- c.value || f.value ? (n(), $("div", {
525
- key: 1,
526
- class: te(["flex gap-3 items-center", c.value && c.value.last_page === 1 ? "justify-end" : ""])
527
- }, [
528
- c.value && !m.value ? (n(), B(y(Xe), {
529
- key: 0,
530
- modelValue: I.value,
531
- "onUpdate:modelValue": [
532
- e[10] || (e[10] = (s) => I.value = s),
533
- Ke
534
- ],
535
- class: "justify-center",
536
- "max-page": c.value.last_page,
537
- strategy: c.value.strategy,
538
- "total-visible": "5"
539
- }, null, 8, ["modelValue", "max-page", "strategy"])) : h("", !0),
540
- f.value ? (n(), $("div", cl, [
541
- N(y(xe), {
542
- disabled: !f.value.prev,
543
- onClick: e[11] || (e[11] = (s) => f.value.prev ? A(null, !1, f.value.prev) : null)
544
- }, null, 8, ["disabled"]),
545
- N(y(xe), {
546
- disabled: !f.value.next,
547
- "is-next": "",
548
- onClick: e[12] || (e[12] = (s) => f.value.next ? A(null, !1, f.value.next) : null)
549
- }, null, 8, ["disabled"])
550
- ])) : h("", !0),
551
- p.value ? h("", !0) : (n(), $("div", fl, [
552
- N(y(Ze), {
553
- modelValue: C.value,
554
- "onUpdate:modelValue": [
555
- e[13] || (e[13] = (s) => C.value = s),
556
- e[14] || (e[14] = (s) => A(null))
557
- ],
558
- label: "Item per page",
559
- "is-inline-label": "",
560
- "popper-options": { placement: "auto" },
561
- options: Ae.value
562
- }, null, 8, ["modelValue", "options"])
563
- ]))
564
- ], 2)) : h("", !0)
565
- ]);
566
- };
567
- }
568
- };
569
- export {
570
- hl as default
571
- };