@orchidui/core 1.2.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-D1rWf4we.js → OcComplexCalendar-wUfD-rjH.js} +1 -1
  59. package/dist/{OcComplexDatePicker-IY65Yb3W.js → OcComplexDatePicker-CN5P5UAb.js} +3 -3
  60. package/dist/{OcCropper-Ozcbc9oS.js → OcCropper-C2G9bMGn.js} +11 -11
  61. package/dist/OcDataTable-CUfaDV_D.js +561 -0
  62. package/dist/{OcDraggableList-BMMa_l-x.js → OcDraggableList-DO6FTc72.js} +8 -8
  63. package/dist/{OcEmojiPicker-BJPcCdTO.js → OcEmojiPicker-C0M7uAji.js} +1 -1
  64. package/dist/{OcFilterForm-BJJiBrBO.js → OcFilterForm-CL1RXUTm.js} +1 -1
  65. package/dist/{OcFilterSearch-DSZHDIEK.js → OcFilterSearch-TPHX4NCL.js} +1 -1
  66. package/dist/{OcFilterSearchFor-DHlpy8VY.js → OcFilterSearchFor-Dff-v6cU.js} +9 -9
  67. package/dist/{OcModalCropper-C8ZOsHYG.js → OcModalCropper-CXUxP0pM.js} +4 -4
  68. package/dist/OcSection-D_vO-DAP.js +26 -0
  69. package/dist/{OcTimePicker-D6NMTvxZ.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-B8Wrl2Om.js → SubPlanCard-DfZmDLFG.js} +1 -1
  78. package/dist/{ThumbnailSection-CYESszhq.js → ThumbnailSection-BSbhWzDC.js} +1 -1
  79. package/dist/{ThumbnailTheme-DxB6mbrd.js → ThumbnailTheme-CX6k7Fi4.js} +14 -14
  80. package/dist/{index-CLrhZuPR.js → index-Cp_g4d58.js} +3362 -3192
  81. package/dist/index.js +122 -114
  82. package/dist/style.css +1 -1
  83. package/package.json +1 -1
  84. package/dist/OcDataTable-qsYLnYTP.js +0 -560
@@ -1,560 +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 h, 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 C, normalizeProps as ke, guardReactiveProps as xe } from "vue";
2
- import { as as Fe, b as Re, B as Ee, L as _e, Y as Je, aD as ze, aE as He, aF as Ge, I as We, J as he, k as Xe } from "./index-CLrhZuPR.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 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(), h("div", ll, [
67
- p[4] || (p[4] = R("span", { class: "text-oc-text-400 font-medium" }, "Fixed columns", -1)),
68
- U(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: $(() => [
74
- (i(!0), h(ee, null, ae(f.value, (m, x) => (i(), h("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(we), 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), h(ee, null, ae(v.value, (m) => (i(), h(ee, {
100
- key: m.key
101
- }, [
102
- m.key !== "actions" ? (i(), h("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
- },
191
- setup(D, { emit: Z }) {
192
- var ue, ie, ne, de, ve, ce, fe, pe, me;
193
- const d = D, F = Z, v = j(() => {
194
- var l;
195
- return (l = d.options) == null ? void 0 : l.pagination;
196
- }), f = j(() => {
197
- var l;
198
- return (l = d.options) == null ? void 0 : l.cursor;
199
- }), I = A(), S = j(() => {
200
- var l;
201
- return (l = d.options) == null ? void 0 : l.tableOptions;
202
- }), W = j(() => {
203
- var l;
204
- return {
205
- ...S.value,
206
- headers: I.value ? I.value.filter((e) => re(e.key)) : (l = S.value) == null ? void 0 : l.headers.filter((e) => re(e.key))
207
- };
208
- }), a = j(() => {
209
- var l;
210
- return (l = d.options) == null ? void 0 : l.filterOptions;
211
- }), p = j(() => {
212
- var l;
213
- return (l = d.options) == null ? void 0 : l.hidePerPageDropdown;
214
- }), m = j(() => {
215
- var l;
216
- return ((l = v.value) == null ? void 0 : l.last_page) === 1;
217
- }), 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(
218
- (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
219
- ), 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(
220
- () => {
221
- var l, e;
222
- return (e = (l = d.options) == null ? void 0 : l.perPageOptions) == null ? void 0 : e.map(
223
- (o) => ({
224
- label: `${o}`,
225
- value: o
226
- })
227
- );
228
- }
229
- ), Ae = j(() => {
230
- let l = [
231
- {
232
- label: "10",
233
- value: 10
234
- },
235
- {
236
- label: "15",
237
- value: 15
238
- },
239
- {
240
- label: "20",
241
- value: 20
242
- },
243
- {
244
- label: "25",
245
- value: 25
246
- },
247
- {
248
- label: "40",
249
- value: 40
250
- },
251
- {
252
- label: "50",
253
- value: 50
254
- },
255
- {
256
- label: "75",
257
- value: 75
258
- },
259
- {
260
- label: "99",
261
- value: 99
262
- }
263
- ], e = je.value ?? l;
264
- if (v.value) {
265
- const o = v.value.total < 100 ? v.value.total : 100;
266
- o > 10 && (e = e.filter((r) => r.value <= o));
267
- }
268
- return [...new Set(e)];
269
- }), De = j(() => {
270
- var l;
271
- return ((l = d.selected) == null ? void 0 : l.length) > 0;
272
- }), Pe = (l) => {
273
- !l.trim() || T.value.includes(l) || (T.value = [l], E(), F("search-query-changed", l));
274
- }, Le = (l) => {
275
- T.value = T.value.filter((e) => e !== l), E();
276
- }, q = d.filter;
277
- !q && v ? q.page = 1 : !q && f && (q.cursor = "");
278
- const s = A(q), Ce = () => {
279
- var e, o, r, n, c, t, g, w;
280
- T.value = [], V.value = "";
281
- const l = {};
282
- 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[(w = (g = a.value) == null ? void 0 : g.tabs) == null ? void 0 : w.key] = V.value : l.tabs = V.value, s.value = l, E();
283
- }, Ke = () => {
284
- E(null, B.value);
285
- }, Ye = () => {
286
- d.id && $e(d.id, JSON.stringify(s.value));
287
- }, Ue = () => d.id ? se(d.id) : null, E = (l = null, e = !1, o = "") => {
288
- var r, n, c;
289
- 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) => {
290
- Array.isArray(s.value[t]) && s.value[t].length === 0 && delete s.value[t];
291
- })), Ye(), F("update:filter", s.value);
292
- }, Be = (l, e) => {
293
- (e === a.value.tabs.key || e === "tabs") && (V.value = ""), E(l), F("filter-removed", e);
294
- }, Me = (l) => {
295
- let e = [];
296
- return l.forEach((o) => {
297
- e.push(o.key);
298
- }), e;
299
- }, Ne = j(() => {
300
- if (s.value) {
301
- let l = [];
302
- return Object.keys(s.value).forEach((e) => {
303
- var c, t, g, w, Q, M, _, J, z, H, G;
304
- let o = (t = (c = a.value) == null ? void 0 : c.tabs) == null ? void 0 : t.key;
305
- const r = (w = (g = a.value) == null ? void 0 : g.search) == null ? void 0 : w.key, n = ((M = (Q = a.value) == null ? void 0 : Q.per_page) == null ? void 0 : M.key) ?? "per_page";
306
- if ((_ = a.value.form) == null || _.find((b) => {
307
- b.name === o && (o = "");
308
- }), e !== "page" && e !== "cursor" && e !== n && e !== o && e !== r) {
309
- let b = null, u = (J = a.value.form) == null ? void 0 : J.find((Y) => {
310
- if (typeof Y.name == "object") {
311
- let L = !1;
312
- return Y.name.forEach((N) => {
313
- N.key === e && (L = !0, b = Me(Y.name));
314
- }), L;
315
- } else
316
- return Y.name === e;
317
- }), O = "";
318
- if (u && s.value[e]) {
319
- if (typeof u.name == "object" ? (z = u.name) == null || z.forEach((L) => {
320
- O && (O += " - "), O += s.value[L.key];
321
- }) : O = s.value[e], u.props.options && (O = (u.props.multiple ? s.value[e] : [s.value[e]]).map(
322
- (N) => {
323
- var ye;
324
- return (ye = u.props.options.find(({ value: qe }) => qe === N)) == null ? void 0 : ye.label;
325
- }
326
- ).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")
327
- if (((H = u == null ? void 0 : u.props) == null ? void 0 : H.type) === "range" && u.name && u.name[1]) {
328
- const L = le(s.value[u.name[0].key]).format("MM/DD/YYYY"), N = le(s.value[u.name[1].key]).format("MM/DD/YYYY");
329
- O = L === N ? L : L + " - " + N;
330
- } else O = le(s.value[u.name]).format("MM/DD/YYYY");
331
- let Y = `${(G = u == null ? void 0 : u.props) == null ? void 0 : G.label} : ${O}`;
332
- u && u.name && typeof u.name == "object" && l.find((N) => N.name === b[0]) && (Y = ""), l.push({
333
- label: Y,
334
- name: e,
335
- multiNames: b
336
- });
337
- }
338
- }
339
- }), l;
340
- }
341
- return [];
342
- }), re = (l) => {
343
- var e, o, r, n, c, t;
344
- 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;
345
- }, Ie = ({ fixedHeaders: l, activeHeaders: e, isOnMount: o }) => {
346
- var r, n, c, t;
347
- 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) {
348
- const g = Ze(l, e);
349
- $e(a.value.columnEdit.localStorageKey, g);
350
- }
351
- }, Te = () => {
352
- var l, e, o, r, n, c;
353
- if ((e = (l = a.value) == null ? void 0 : l.columnEdit) != null && e.localStorageKey) {
354
- const t = se(a.value.columnEdit.localStorageKey);
355
- if (t) {
356
- const { fixed: g, active: w } = Oe(
357
- t,
358
- S.value.headers,
359
- a.value.columnEdit.localStorageKey
360
- );
361
- 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 = w, I.value = [...g, ...w];
362
- }
363
- }
364
- };
365
- return Ve(() => {
366
- var e, o, r, n;
367
- Te();
368
- const l = Ue();
369
- 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());
370
- }), (l, e) => {
371
- var o, r, n, c;
372
- return i(), h("div", ul, [
373
- S.value ? (i(), K(y(_e), {
374
- key: 0,
375
- selected: D.selected,
376
- "row-key": D.rowKey,
377
- options: W.value,
378
- "is-loading": D.isLoading,
379
- "loading-rows": P.value,
380
- "row-class": D.rowClass,
381
- "row-link": D.rowLink,
382
- "is-sticky": S.value.isSticky,
383
- "is-borderless": S.value.isBorderless,
384
- "onUpdate:selected": e[7] || (e[7] = (t) => l.$emit("update:selected", t)),
385
- "onClick:row": e[8] || (e[8] = (t) => l.$emit("click:row", t)),
386
- "onHover:cell": e[9] || (e[9] = (t) => l.$emit("hover:cell", t))
387
- }, Qe({
388
- after: $(() => [
389
- C(l.$slots, "after")
390
- ]),
391
- empty: $(() => [
392
- C(l.$slots, "empty")
393
- ]),
394
- "table-header": $((t) => [
395
- C(l.$slots, "table-header", ke(xe(t)))
396
- ]),
397
- "table-body": $((t) => [
398
- C(l.$slots, "table-body", ke(xe(t)))
399
- ]),
400
- _: 2
401
- }, [
402
- l.$slots.before || (o = a.value) != null && o.search || (r = a.value) != null && r.form || (n = a.value) != null && n.tabs ? {
403
- name: "before",
404
- fn: $(() => {
405
- var t, g, w, Q;
406
- return [
407
- C(l.$slots, "before"),
408
- (t = a.value) != null && t.search || (g = a.value) != null && g.form || (w = a.value) != null && w.tabs ? (i(), h("div", il, [
409
- De.value ? (i(), h("div", nl, [
410
- C(l.$slots, "bulk-actions", { selectedRows: D.selected })
411
- ])) : (i(), h("div", dl, [
412
- (Q = a.value) != null && Q.tabs ? (i(), K(y(Je), {
413
- key: 0,
414
- modelValue: V.value,
415
- "onUpdate:modelValue": [
416
- e[0] || (e[0] = (M) => V.value = M),
417
- e[1] || (e[1] = (M) => E(null))
418
- ],
419
- tabs: a.value.tabs.options,
420
- variant: "pills"
421
- }, null, 8, ["modelValue", "tabs"])) : k("", !0)
422
- ])),
423
- C(l.$slots, "filter-options", {}, () => {
424
- var M, _, J, z, H, G;
425
- return [
426
- (M = a.value) != null && M.search || (_ = a.value) != null && _.form || (J = a.value) != null && J.columnEdit ? (i(), h("div", {
427
- key: 0,
428
- class: te([
429
- "flex gap-3 absolute ml-auto bg-oc-bg-light right-4 max-w-[calc(100%-24px)]",
430
- a.value ? oe.value ? "md:w-fit w-full" : "" : "w-full justify-end"
431
- ])
432
- }, [
433
- (z = a.value) != null && z.search ? (i(), K(y(ze), {
434
- key: 0,
435
- "is-search-only": !a.value.tabs || a.value.isSearchOnly,
436
- onAddQuery: Pe,
437
- onToggle: e[2] || (e[2] = (b) => oe.value = b)
438
- }, null, 8, ["is-search-only"])) : k("", !0),
439
- (H = a.value) != null && H.form ? (i(), K(y(Fe), {
440
- key: 1,
441
- modelValue: x.value,
442
- "onUpdate:modelValue": e[6] || (e[6] = (b) => x.value = b),
443
- distance: 9,
444
- placement: "bottom-end",
445
- "is-attach-to-body": ""
446
- }, {
447
- menu: $(() => [
448
- x.value ? (i(), K(y(He), {
449
- key: 0,
450
- id: D.id,
451
- "json-form": a.value.form ?? [],
452
- grid: a.value.grid ?? null,
453
- values: d.filter,
454
- actions: a.value.actions,
455
- onApplyFilter: e[3] || (e[3] = (b) => E(b)),
456
- onFilterFieldsChanged: e[4] || (e[4] = (b) => F("filter-fields-changed", b)),
457
- onCancel: e[5] || (e[5] = (b) => x.value = !1)
458
- }, {
459
- default: $(({ errors: b, values: u, jsonForm: O, updateForm: Y }) => [
460
- C(l.$slots, "custom-filter-form", {
461
- errors: b,
462
- values: u,
463
- jsonForm: O,
464
- updateFilter: Y
465
- })
466
- ]),
467
- _: 3
468
- }, 8, ["id", "json-form", "grid", "values", "actions"])) : k("", !0)
469
- ]),
470
- default: $(() => [
471
- U(y(Ee), {
472
- "is-active": x.value,
473
- variant: "secondary",
474
- "left-icon": "filter"
475
- }, null, 8, ["is-active"])
476
- ]),
477
- _: 3
478
- }, 8, ["modelValue"])) : k("", !0),
479
- a.value.columnEdit ? (i(), K(rl, {
480
- key: 2,
481
- options: s.value.columnEdit,
482
- headers: ((G = S.value) == null ? void 0 : G.headers) || [],
483
- "local-key": a.value.columnEdit.localStorageKey,
484
- onUpdateOrder: Ie
485
- }, null, 8, ["options", "headers", "local-key"])) : k("", !0)
486
- ], 2)) : k("", !0)
487
- ];
488
- })
489
- ])) : k("", !0),
490
- U(y(Ge), {
491
- filters: Ne.value,
492
- queries: T.value,
493
- class: "border-t border-oc-gray-200",
494
- onRemoveQuery: Le,
495
- onRemoveAll: Ce,
496
- onRemoveFilter: Be
497
- }, null, 8, ["filters", "queries"])
498
- ];
499
- }),
500
- key: "0"
501
- } : void 0,
502
- ae((c = S.value) == null ? void 0 : c.headers, (t, g) => ({
503
- name: t.key,
504
- fn: $(({ data: w, item: Q }) => [
505
- C(l.$slots, t.key, {
506
- data: w,
507
- item: Q
508
- })
509
- ])
510
- }))
511
- ]), 1032, ["selected", "row-key", "options", "is-loading", "loading-rows", "row-class", "row-link", "is-sticky", "is-borderless"])) : k("", !0),
512
- C(l.$slots, "before-pagination"),
513
- v.value || f.value ? (i(), h("div", {
514
- key: 1,
515
- class: te(["flex gap-3 items-center", v.value && v.value.last_page === 1 ? "justify-end" : ""])
516
- }, [
517
- v.value && !m.value ? (i(), K(y(We), {
518
- key: 0,
519
- modelValue: B.value,
520
- "onUpdate:modelValue": [
521
- e[10] || (e[10] = (t) => B.value = t),
522
- Ke
523
- ],
524
- class: "justify-center",
525
- "max-page": v.value.last_page,
526
- strategy: v.value.strategy,
527
- "total-visible": "5"
528
- }, null, 8, ["modelValue", "max-page", "strategy"])) : k("", !0),
529
- f.value ? (i(), h("div", vl, [
530
- U(y(he), {
531
- disabled: !f.value.prev,
532
- onClick: e[11] || (e[11] = (t) => f.value.prev ? E(null, !1, f.value.prev) : null)
533
- }, null, 8, ["disabled"]),
534
- U(y(he), {
535
- disabled: !f.value.next,
536
- "is-next": "",
537
- onClick: e[12] || (e[12] = (t) => f.value.next ? E(null, !1, f.value.next) : null)
538
- }, null, 8, ["disabled"])
539
- ])) : k("", !0),
540
- p.value ? k("", !0) : (i(), h("div", cl, [
541
- U(y(Xe), {
542
- modelValue: P.value,
543
- "onUpdate:modelValue": [
544
- e[13] || (e[13] = (t) => P.value = t),
545
- e[14] || (e[14] = (t) => E(null))
546
- ],
547
- label: "Item per page",
548
- "is-inline-label": "",
549
- "popper-options": { placement: "auto" },
550
- options: Ae.value
551
- }, null, 8, ["modelValue", "options"])
552
- ]))
553
- ], 2)) : k("", !0)
554
- ]);
555
- };
556
- }
557
- };
558
- export {
559
- kl as default
560
- };