@orchidui/core 1.3.0 → 1.5.0

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 (84) 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/Section/OcSection.js +4 -0
  25. package/dist/Elements/Sidebar/OcSidebar.js +9 -2
  26. package/dist/Elements/SubSidebar/OcSubSidebar.js +1 -1
  27. package/dist/Elements/VerificationOption/OcVerificationOption.js +1 -1
  28. package/dist/Feedback/Banner/OcBanner.js +1 -1
  29. package/dist/Feedback/Chip/OcChip.js +1 -1
  30. package/dist/Feedback/ShareIcon/OcShareIcon.js +1 -1
  31. package/dist/Feedback/Snackbar/OcSnackbar.js +1 -1
  32. package/dist/Form/BaseInput/OcBaseInput.js +1 -1
  33. package/dist/Form/Button/OcButton.js +1 -1
  34. package/dist/Form/Calendar/OcCalendar.js +1 -1
  35. package/dist/Form/CardInput/OcCardInput.js +1 -1
  36. package/dist/Form/Checkbox/OcCheckbox.js +1 -1
  37. package/dist/Form/CheckboxesGroup/OcCheckboxesGroup.js +1 -1
  38. package/dist/Form/Criteria/OcCriteria.js +1 -1
  39. package/dist/Form/Cropper/OcCropper.js +1 -1
  40. package/dist/Form/DatePicker/OcDatePicker.js +1 -1
  41. package/dist/Form/EmojiPicker/OcEmojiPicker.js +1 -1
  42. package/dist/Form/Input/OcInput.js +1 -1
  43. package/dist/Form/LinkInput/OcLinkInput.js +1 -1
  44. package/dist/Form/MultipleUploadFile/OcMultipleUploadFile.js +1 -1
  45. package/dist/Form/NumberInput/OcNumberInput.js +1 -1
  46. package/dist/Form/PhoneInput/OcPhoneInput.js +1 -1
  47. package/dist/Form/Radio/OcRadio.js +1 -1
  48. package/dist/Form/RadioGroup/OcRadioGroup.js +1 -1
  49. package/dist/Form/RangeInput/OcRangeInput.js +1 -1
  50. package/dist/Form/SectionItem/OcSectionItem.js +1 -1
  51. package/dist/Form/Select/OcSelect.js +1 -1
  52. package/dist/Form/SelectOptions/OcSelectOptions.js +1 -1
  53. package/dist/Form/SingleFileUpload/OcSingleFileUpload.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-gqRg58IF.js +46 -0
  58. package/dist/{OcComplexCalendar-CsieDc13.js → OcComplexCalendar-wUfD-rjH.js} +1 -1
  59. package/dist/{OcComplexDatePicker-C1rftM9e.js → OcComplexDatePicker-CN5P5UAb.js} +3 -3
  60. package/dist/{OcCropper-DEMCCdNv.js → OcCropper-C2G9bMGn.js} +11 -11
  61. package/dist/OcDataTable-CUfaDV_D.js +561 -0
  62. package/dist/{OcDraggableList-CNJ0UX7A.js → OcDraggableList-DO6FTc72.js} +8 -8
  63. package/dist/{OcEmojiPicker-BzgpAvzA.js → OcEmojiPicker-C0M7uAji.js} +1 -1
  64. package/dist/{OcFilterForm-C6bbxMQz.js → OcFilterForm-CL1RXUTm.js} +1 -1
  65. package/dist/{OcFilterSearch-VrsqR8K3.js → OcFilterSearch-TPHX4NCL.js} +1 -1
  66. package/dist/{OcFilterSearchFor-pYQS37xa.js → OcFilterSearchFor-Dff-v6cU.js} +9 -9
  67. package/dist/{OcModalCropper-BSkm1o9d.js → OcModalCropper-CXUxP0pM.js} +4 -4
  68. package/dist/OcSection-D_vO-DAP.js +26 -0
  69. package/dist/{OcTimePicker-CEePomr_.js → OcTimePicker-BTaVEXku.js} +2 -2
  70. package/dist/Overlay/ConfirmationModal/OcConfirmationModal.js +1 -1
  71. package/dist/Overlay/CopyTooltip/OcCopyTooltip.js +2 -2
  72. package/dist/Overlay/Dropdown/OcDropdown.js +1 -1
  73. package/dist/Overlay/Modal/OcModal.js +1 -1
  74. package/dist/Overlay/SupportMenu/OcSupportMenu.js +1 -1
  75. package/dist/Overlay/Tooltip/OcTooltip.js +1 -1
  76. package/dist/Overlay/Whitelist/OcWhiteList.js +1 -1
  77. package/dist/{SubPlanCard-okV5TfUX.js → SubPlanCard-DfZmDLFG.js} +1 -1
  78. package/dist/{ThumbnailSection-ByWHvtKc.js → ThumbnailSection-BSbhWzDC.js} +1 -1
  79. package/dist/{ThumbnailTheme-DDuGf9g2.js → ThumbnailTheme-CX6k7Fi4.js} +14 -14
  80. package/dist/{index-DvOKqQeL.js → index-Cp_g4d58.js} +3375 -3229
  81. package/dist/index.js +122 -114
  82. package/dist/style.css +1 -1
  83. package/package.json +1 -1
  84. package/dist/OcDataTable-ChQoZYkz.js +0 -562
@@ -1,562 +0,0 @@
1
- import { ref as A, onMounted as Ve, openBlock as i, createBlock as K, unref as y, withCtx as $, createElementVNode as R, createElementBlock as w, createVNode as U, mergeProps as ge, Fragment as ee, renderList as ae, normalizeClass as te, toDisplayString as be, createCommentVNode as k, computed as j, createSlots as Qe, renderSlot as L, normalizeProps as ke, guardReactiveProps as xe } from "vue";
2
- import { as as Fe, b as Re, B as Ee, L as Je, Y as ze, aD as He, aE as _e, aF as Ge, I as We, J as we, k as Xe } from "./index-DvOKqQeL.js";
3
- import le from "dayjs";
4
- import { VueDraggableNext as he } from "vue-draggable-next";
5
- import { getFromLocalStorage as se, formatHeadersFromLocalStorage as Oe, formatHeadersToLocalStorage as Ze, 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]" }, 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(D, { emit: Z }) {
31
- const d = Z, F = D, v = A([]), f = A([]), I = A(!1), S = (a = !1) => {
32
- f.value = f.value.map((p) => ({
33
- ...p,
34
- isActive: !0
35
- })), d("update-order", {
36
- fixedHeaders: f.value,
37
- activeHeaders: v.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(F.localKey), { fixed: p, active: m } = Oe(a, F.headers, F.localKey);
51
- f.value = p || F.headers.slice(0, 1), v.value = m || F.headers.slice(1).map((x) => {
52
- var V, B, P;
53
- return {
54
- ...x,
55
- isActive: ((P = (B = (V = F.options) == null ? void 0 : V.active) == null ? void 0 : B.find((X) => X.key === x.key)) == null ? void 0 : P.isActive) ?? !0
56
- };
57
- }), S(!0);
58
- }), (a, p) => (i(), K(y(Fe), {
59
- modelValue: I.value,
60
- "onUpdate:modelValue": p[3] || (p[3] = (m) => I.value = m),
61
- class: "h-[36px]",
62
- "is-attach-to-body": ""
63
- }, {
64
- menu: $(() => [
65
- R("div", el, [
66
- f.value.length ? (i(), w("div", ll, [
67
- p[4] || (p[4] = R("span", { class: "text-oc-text-400 font-medium" }, "Fixed columns", -1)),
68
- U(y(he), ge({
69
- key: "key",
70
- modelValue: f.value,
71
- "onUpdate:modelValue": p[0] || (p[0] = (m) => f.value = m)
72
- }, W), {
73
- default: $(() => [
74
- (i(!0), w(ee, null, ae(f.value, (m, x) => (i(), w("div", {
75
- key: m.key,
76
- class: te(["flex items-center justify-between h-[26px]", x ? "" : "is-disabled"])
77
- }, [
78
- R("span", null, be(m.label), 1),
79
- x ? (i(), K(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
- })) : k("", !0)
86
- ], 2))), 128))
87
- ]),
88
- _: 1
89
- }, 16, ["modelValue"])
90
- ])) : k("", !0),
91
- R("div", al, [
92
- p[5] || (p[5] = R("span", { class: "text-oc-text-400 font-medium" }, "Active columns", -1)),
93
- U(y(he), ge({
94
- key: "key",
95
- modelValue: v.value,
96
- "onUpdate:modelValue": p[2] || (p[2] = (m) => v.value = m)
97
- }, W, { "data-active-headers": "true" }), {
98
- default: $(() => [
99
- (i(!0), w(ee, null, ae(v.value, (m) => (i(), w(ee, {
100
- key: m.key
101
- }, [
102
- m.key !== "actions" ? (i(), w("div", tl, [
103
- R("div", sl, [
104
- U(y(Re), {
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
- R("div", ol, be(m.label), 1)
113
- ]),
114
- v.value.length > 1 ? (i(), K(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
- })) : k("", !0)
121
- ])) : k("", !0)
122
- ], 64))), 128))
123
- ]),
124
- _: 1
125
- }, 16, ["modelValue"])
126
- ])
127
- ])
128
- ]),
129
- default: $(() => [
130
- U(y(Ee), {
131
- label: "Edit Column",
132
- "left-icon": "setting",
133
- variant: "secondary"
134
- })
135
- ]),
136
- _: 1
137
- }, 8, ["modelValue"]));
138
- }
139
- }, ul = { class: "flex flex-col gap-9 relative" }, il = {
140
- key: 0,
141
- class: "flex items-center px-4 min-h-[52px]"
142
- }, nl = {
143
- key: 0,
144
- class: "flex gap-5 items-center absolute left-5"
145
- }, dl = {
146
- key: 1,
147
- class: "flex gap-3 absolute left-5"
148
- }, vl = {
149
- key: 1,
150
- class: "flex w-full gap-5 md:justify-start justify-center"
151
- }, cl = {
152
- key: 2,
153
- class: "hidden md:flex items-center"
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
- "click:row-meta": []
191
- },
192
- setup(D, { emit: Z }) {
193
- var ue, ie, ne, de, ve, ce, fe, pe, me;
194
- const d = D, F = Z, v = j(() => {
195
- var l;
196
- return (l = d.options) == null ? void 0 : l.pagination;
197
- }), f = j(() => {
198
- var l;
199
- return (l = d.options) == null ? void 0 : l.cursor;
200
- }), I = A(), S = j(() => {
201
- var l;
202
- return (l = d.options) == null ? void 0 : l.tableOptions;
203
- }), W = j(() => {
204
- var l;
205
- return {
206
- ...S.value,
207
- headers: I.value ? I.value.filter((e) => re(e.key)) : (l = S.value) == null ? void 0 : l.headers.filter((e) => re(e.key))
208
- };
209
- }), a = j(() => {
210
- var l;
211
- return (l = d.options) == null ? void 0 : l.filterOptions;
212
- }), p = j(() => {
213
- var l;
214
- return (l = d.options) == null ? void 0 : l.hidePerPageDropdown;
215
- }), m = j(() => {
216
- var l;
217
- return ((l = v.value) == null ? void 0 : l.last_page) === 1;
218
- }), x = A(!1), V = A(d.filter[(ie = (ue = a.value) == null ? void 0 : ue.tabs) == null ? void 0 : ie.key]), B = A(d.filter.page), P = A(
219
- (de = (ne = a.value) == null ? void 0 : ne.per_page) != null && de.key ? d.filter[(ce = (ve = a.value) == null ? void 0 : ve.per_page) == null ? void 0 : ce.key] : d.filter.per_page
220
- ), X = ((me = d.filter[(pe = (fe = a.value) == null ? void 0 : fe.search) == null ? void 0 : pe.key]) == null ? void 0 : me.trim()) ?? "", T = A(X ? X.split(",") : []), oe = A(!1), je = j(
221
- () => {
222
- var l, e;
223
- return (e = (l = d.options) == null ? void 0 : l.perPageOptions) == null ? void 0 : e.map(
224
- (o) => ({
225
- label: `${o}`,
226
- value: o
227
- })
228
- );
229
- }
230
- ), Ae = j(() => {
231
- let l = [
232
- {
233
- label: "10",
234
- value: 10
235
- },
236
- {
237
- label: "15",
238
- value: 15
239
- },
240
- {
241
- label: "20",
242
- value: 20
243
- },
244
- {
245
- label: "25",
246
- value: 25
247
- },
248
- {
249
- label: "40",
250
- value: 40
251
- },
252
- {
253
- label: "50",
254
- value: 50
255
- },
256
- {
257
- label: "75",
258
- value: 75
259
- },
260
- {
261
- label: "99",
262
- value: 99
263
- }
264
- ], e = je.value ?? l;
265
- if (v.value) {
266
- const o = v.value.total < 100 ? v.value.total : 100;
267
- o > 10 && (e = e.filter((r) => r.value <= o));
268
- }
269
- return [...new Set(e)];
270
- }), De = j(() => {
271
- var l;
272
- return ((l = d.selected) == null ? void 0 : l.length) > 0;
273
- }), Pe = (l) => {
274
- !l.trim() || T.value.includes(l) || (T.value = [l], E(), F("search-query-changed", l));
275
- }, Ce = (l) => {
276
- T.value = T.value.filter((e) => e !== l), E();
277
- }, q = d.filter;
278
- !q && v ? q.page = 1 : !q && f && (q.cursor = "");
279
- const s = A(q), Le = () => {
280
- var e, o, r, n, c, t, g, h;
281
- T.value = [], V.value = "";
282
- const l = {};
283
- a.value ? q.page = 1 : q.cursor = "", (o = (e = a.value) == null ? void 0 : e.per_page) != null && o.key ? l[(n = (r = a.value) == null ? void 0 : r.per_page) == null ? void 0 : n.key] = P.value : l.per_page = P.value, (t = (c = a.value) == null ? void 0 : c.tabs) != null && t.key ? l[(h = (g = a.value) == null ? void 0 : g.tabs) == null ? void 0 : h.key] = V.value : l.tabs = V.value, s.value = l, E();
284
- }, Ke = () => {
285
- E(null, B.value);
286
- }, Ye = () => {
287
- d.id && $e(d.id, JSON.stringify(s.value));
288
- }, Ue = () => d.id ? se(d.id) : null, E = (l = null, e = !1, o = "") => {
289
- var r, n, c;
290
- v.value && !e && (B.value = 1), v.value ? s.value.page = B.value : s.value.cursor = o, (r = a.value) != null && r.per_page ? s.value[a.value.per_page.key] = P.value : s.value.per_page = P.value, (n = a.value) != null && n.tabs && (s.value[a.value.tabs.key] = V.value), (c = a.value) != null && c.search && (s.value[a.value.search.key] = T.value.join()), l && (x.value = !1, s.value = { ...s.value, ...l }, Object.keys(s.value).forEach((t) => {
291
- Array.isArray(s.value[t]) && s.value[t].length === 0 && delete s.value[t];
292
- })), Ye(), F("update:filter", s.value);
293
- }, Be = (l, e) => {
294
- (e === a.value.tabs.key || e === "tabs") && (V.value = ""), E(l), F("filter-removed", e);
295
- }, Me = (l) => {
296
- let e = [];
297
- return l.forEach((o) => {
298
- e.push(o.key);
299
- }), e;
300
- }, Ne = j(() => {
301
- if (s.value) {
302
- let l = [];
303
- return Object.keys(s.value).forEach((e) => {
304
- var c, t, g, h, Q, M, J, z, H, _, G;
305
- let o = (t = (c = a.value) == null ? void 0 : c.tabs) == null ? void 0 : t.key;
306
- const r = (h = (g = a.value) == null ? void 0 : g.search) == null ? void 0 : h.key, n = ((M = (Q = a.value) == null ? void 0 : Q.per_page) == null ? void 0 : M.key) ?? "per_page";
307
- if ((J = a.value.form) == null || J.find((b) => {
308
- b.name === o && (o = "");
309
- }), e !== "page" && e !== "cursor" && e !== n && e !== o && e !== r) {
310
- let b = null, u = (z = a.value.form) == null ? void 0 : z.find((Y) => {
311
- if (typeof Y.name == "object") {
312
- let C = !1;
313
- return Y.name.forEach((N) => {
314
- N.key === e && (C = !0, b = Me(Y.name));
315
- }), C;
316
- } else
317
- return Y.name === e;
318
- }), O = "";
319
- if (u && s.value[e]) {
320
- if (typeof u.name == "object" ? (H = u.name) == null || H.forEach((C) => {
321
- O && (O += " - "), O += s.value[C.key];
322
- }) : O = s.value[e], u.props.options && (O = (u.props.multiple ? s.value[e] : [s.value[e]]).map(
323
- (N) => {
324
- var ye;
325
- return (ye = u.props.options.find(({ value: qe }) => qe === N)) == null ? void 0 : ye.label;
326
- }
327
- ).join(", ")), u.type === "RangeInput" && Array.isArray(s.value[e]) && (O = s.value[e][0].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + " - " + s.value[e][1].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")), u.type === "DatePicker")
328
- if (((_ = u == null ? void 0 : u.props) == null ? void 0 : _.type) === "range" && u.name && u.name[1]) {
329
- const C = le(s.value[u.name[0].key]).format("MM/DD/YYYY"), N = le(s.value[u.name[1].key]).format("MM/DD/YYYY");
330
- O = C === N ? C : C + " - " + N;
331
- } else O = le(s.value[u.name]).format("MM/DD/YYYY");
332
- let Y = `${(G = u == null ? void 0 : u.props) == null ? void 0 : G.label} : ${O}`;
333
- u && u.name && typeof u.name == "object" && l.find((N) => N.name === b[0]) && (Y = ""), l.push({
334
- label: Y,
335
- name: e,
336
- multiNames: b
337
- });
338
- }
339
- }
340
- }), l;
341
- }
342
- return [];
343
- }), re = (l) => {
344
- var e, o, r, n, c, t;
345
- return ((t = (c = (n = (r = s.value) == null ? void 0 : r[(o = (e = a.value) == null ? void 0 : e.columnEdit) == null ? void 0 : o.key]) == null ? void 0 : n.active) == null ? void 0 : c.find((g) => g.key === l)) == null ? void 0 : t.isActive) ?? !0;
346
- }, Ie = ({ fixedHeaders: l, activeHeaders: e, isOnMount: o }) => {
347
- var r, n, c, t;
348
- if (s.value[(n = (r = a.value) == null ? void 0 : r.columnEdit) == null ? void 0 : n.key].fixed = l, s.value[(t = (c = a.value) == null ? void 0 : c.columnEdit) == null ? void 0 : t.key].active = e, I.value = [...l, ...e], !o) {
349
- const g = Ze(l, e);
350
- $e(a.value.columnEdit.localStorageKey, g);
351
- }
352
- }, Te = () => {
353
- var l, e, o, r, n, c;
354
- if ((e = (l = a.value) == null ? void 0 : l.columnEdit) != null && e.localStorageKey) {
355
- const t = se(a.value.columnEdit.localStorageKey);
356
- if (t) {
357
- const { fixed: g, active: h } = Oe(
358
- t,
359
- S.value.headers,
360
- a.value.columnEdit.localStorageKey
361
- );
362
- s.value[(r = (o = a.value) == null ? void 0 : o.columnEdit) == null ? void 0 : r.key].fixed = g, s.value[(c = (n = a.value) == null ? void 0 : n.columnEdit) == null ? void 0 : c.key].active = h, I.value = [...g, ...h];
363
- }
364
- }
365
- };
366
- return Ve(() => {
367
- var e, o, r, n;
368
- Te();
369
- const l = Ue();
370
- l && (s.value = JSON.parse(l), V.value = V.value || ((e = s.value) == null ? void 0 : e.tabs) || ((n = s.value) == null ? void 0 : n[(r = (o = a.value) == null ? void 0 : o.tabs) == null ? void 0 : r.key]), E());
371
- }), (l, e) => {
372
- var o, r, n, c;
373
- return i(), w("div", ul, [
374
- S.value ? (i(), K(y(Je), {
375
- key: 0,
376
- selected: D.selected,
377
- "row-key": D.rowKey,
378
- options: W.value,
379
- "is-loading": D.isLoading,
380
- "loading-rows": P.value,
381
- "row-class": D.rowClass,
382
- "row-link": D.rowLink,
383
- "is-sticky": S.value.isSticky,
384
- "is-borderless": S.value.isBorderless,
385
- "onUpdate:selected": e[7] || (e[7] = (t) => l.$emit("update:selected", t)),
386
- "onClick:row": e[8] || (e[8] = (t) => l.$emit("click:row", t)),
387
- "onClick:rowMeta": e[9] || (e[9] = (t) => l.$emit("click:row-meta", t)),
388
- "onHover:cell": e[10] || (e[10] = (t) => l.$emit("hover:cell", t))
389
- }, Qe({
390
- after: $(() => [
391
- L(l.$slots, "after")
392
- ]),
393
- empty: $(() => [
394
- L(l.$slots, "empty")
395
- ]),
396
- "table-header": $((t) => [
397
- L(l.$slots, "table-header", ke(xe(t)))
398
- ]),
399
- "table-body": $((t) => [
400
- L(l.$slots, "table-body", ke(xe(t)))
401
- ]),
402
- _: 2
403
- }, [
404
- l.$slots.before || (o = a.value) != null && o.search || (r = a.value) != null && r.form || (n = a.value) != null && n.tabs ? {
405
- name: "before",
406
- fn: $(() => {
407
- var t, g, h, Q;
408
- return [
409
- L(l.$slots, "before"),
410
- (t = a.value) != null && t.search || (g = a.value) != null && g.form || (h = a.value) != null && h.tabs ? (i(), w("div", il, [
411
- De.value ? (i(), w("div", nl, [
412
- L(l.$slots, "bulk-actions", { selectedRows: D.selected })
413
- ])) : (i(), w("div", dl, [
414
- (Q = a.value) != null && Q.tabs ? (i(), K(y(ze), {
415
- key: 0,
416
- modelValue: V.value,
417
- "onUpdate:modelValue": [
418
- e[0] || (e[0] = (M) => V.value = M),
419
- e[1] || (e[1] = (M) => E(null))
420
- ],
421
- tabs: a.value.tabs.options,
422
- variant: "pills"
423
- }, null, 8, ["modelValue", "tabs"])) : k("", !0)
424
- ])),
425
- L(l.$slots, "filter-options", {}, () => {
426
- var M, J, z, H, _, G;
427
- return [
428
- (M = a.value) != null && M.search || (J = a.value) != null && J.form || (z = a.value) != null && z.columnEdit ? (i(), w("div", {
429
- key: 0,
430
- class: te([
431
- "flex gap-3 absolute ml-auto bg-oc-bg-light right-4 max-w-[calc(100%-24px)]",
432
- a.value ? oe.value ? "md:w-fit w-full" : "" : "w-full justify-end"
433
- ])
434
- }, [
435
- (H = a.value) != null && H.search ? (i(), K(y(He), {
436
- key: 0,
437
- "is-search-only": !a.value.tabs || a.value.isSearchOnly,
438
- onAddQuery: Pe,
439
- onToggle: e[2] || (e[2] = (b) => oe.value = b)
440
- }, null, 8, ["is-search-only"])) : k("", !0),
441
- (_ = a.value) != null && _.form ? (i(), K(y(Fe), {
442
- key: 1,
443
- modelValue: x.value,
444
- "onUpdate:modelValue": e[6] || (e[6] = (b) => x.value = b),
445
- distance: 9,
446
- placement: "bottom-end",
447
- "is-attach-to-body": ""
448
- }, {
449
- menu: $(() => [
450
- x.value ? (i(), K(y(_e), {
451
- key: 0,
452
- id: D.id,
453
- "json-form": a.value.form ?? [],
454
- grid: a.value.grid ?? null,
455
- values: d.filter,
456
- actions: a.value.actions,
457
- onApplyFilter: e[3] || (e[3] = (b) => E(b)),
458
- onFilterFieldsChanged: e[4] || (e[4] = (b) => F("filter-fields-changed", b)),
459
- onCancel: e[5] || (e[5] = (b) => x.value = !1)
460
- }, {
461
- default: $(({ errors: b, values: u, jsonForm: O, updateForm: Y }) => [
462
- L(l.$slots, "custom-filter-form", {
463
- errors: b,
464
- values: u,
465
- jsonForm: O,
466
- updateFilter: Y
467
- })
468
- ]),
469
- _: 3
470
- }, 8, ["id", "json-form", "grid", "values", "actions"])) : k("", !0)
471
- ]),
472
- default: $(() => [
473
- U(y(Ee), {
474
- "is-active": x.value,
475
- variant: "secondary",
476
- "left-icon": "filter"
477
- }, null, 8, ["is-active"])
478
- ]),
479
- _: 3
480
- }, 8, ["modelValue"])) : k("", !0),
481
- a.value.columnEdit ? (i(), K(rl, {
482
- key: 2,
483
- options: s.value.columnEdit,
484
- headers: ((G = S.value) == null ? void 0 : G.headers) || [],
485
- "local-key": a.value.columnEdit.localStorageKey,
486
- onUpdateOrder: Ie
487
- }, null, 8, ["options", "headers", "local-key"])) : k("", !0)
488
- ], 2)) : k("", !0)
489
- ];
490
- })
491
- ])) : k("", !0),
492
- U(y(Ge), {
493
- filters: Ne.value,
494
- queries: T.value,
495
- class: "border-t border-oc-gray-200",
496
- onRemoveQuery: Ce,
497
- onRemoveAll: Le,
498
- onRemoveFilter: Be
499
- }, null, 8, ["filters", "queries"])
500
- ];
501
- }),
502
- key: "0"
503
- } : void 0,
504
- ae((c = S.value) == null ? void 0 : c.headers, (t, g) => ({
505
- name: t.key,
506
- fn: $(({ data: h, item: Q }) => [
507
- L(l.$slots, t.key, {
508
- data: h,
509
- item: Q
510
- })
511
- ])
512
- }))
513
- ]), 1032, ["selected", "row-key", "options", "is-loading", "loading-rows", "row-class", "row-link", "is-sticky", "is-borderless"])) : k("", !0),
514
- L(l.$slots, "before-pagination"),
515
- v.value || f.value ? (i(), w("div", {
516
- key: 1,
517
- class: te(["flex gap-3 items-center", v.value && v.value.last_page === 1 ? "justify-end" : ""])
518
- }, [
519
- v.value && !m.value ? (i(), K(y(We), {
520
- key: 0,
521
- modelValue: B.value,
522
- "onUpdate:modelValue": [
523
- e[11] || (e[11] = (t) => B.value = t),
524
- Ke
525
- ],
526
- class: "justify-center",
527
- "max-page": v.value.last_page,
528
- strategy: v.value.strategy,
529
- "total-visible": "5"
530
- }, null, 8, ["modelValue", "max-page", "strategy"])) : k("", !0),
531
- f.value ? (i(), w("div", vl, [
532
- U(y(we), {
533
- disabled: !f.value.prev,
534
- onClick: e[12] || (e[12] = (t) => f.value.prev ? E(null, !1, f.value.prev) : null)
535
- }, null, 8, ["disabled"]),
536
- U(y(we), {
537
- disabled: !f.value.next,
538
- "is-next": "",
539
- onClick: e[13] || (e[13] = (t) => f.value.next ? E(null, !1, f.value.next) : null)
540
- }, null, 8, ["disabled"])
541
- ])) : k("", !0),
542
- p.value ? k("", !0) : (i(), w("div", cl, [
543
- U(y(Xe), {
544
- modelValue: P.value,
545
- "onUpdate:modelValue": [
546
- e[14] || (e[14] = (t) => P.value = t),
547
- e[15] || (e[15] = (t) => E(null))
548
- ],
549
- label: "Item per page",
550
- "is-inline-label": "",
551
- "popper-options": { placement: "auto" },
552
- options: Ae.value
553
- }, null, 8, ["modelValue", "options"])
554
- ]))
555
- ], 2)) : k("", !0)
556
- ]);
557
- };
558
- }
559
- };
560
- export {
561
- kl as default
562
- };