@orchidui/core 1.64.0 → 1.66.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 (86) 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/NewTable/OcNewTable.js +1 -1
  7. package/dist/DataDisplay/OnboardingListItem/OcOnboardingListItem.js +1 -1
  8. package/dist/DataDisplay/Overview/OcOverview.js +1 -1
  9. package/dist/DataDisplay/Pagination/OcPagination.js +1 -1
  10. package/dist/DataDisplay/Table/OcTable.js +1 -1
  11. package/dist/DataDisplay/TransferSummary/OcTransferSummary.js +1 -1
  12. package/dist/Disclosure/Accordion/OcAccordion.js +1 -1
  13. package/dist/Disclosure/OnboardingAccordion/OnboardingAccordion.js +1 -1
  14. package/dist/Disclosure/OnboardingProduct/OnboardingProductOption.js +1 -1
  15. package/dist/Disclosure/Steps/OcSteps.js +1 -1
  16. package/dist/Disclosure/Tabs/Tabs.js +1 -1
  17. package/dist/Disclosure/Variants/OcVariants.js +1 -1
  18. package/dist/Elements/AdditionalContent/OcAdditionalContent.js +1 -1
  19. package/dist/Elements/AuthenticationOption/AuthenticationOption.js +1 -1
  20. package/dist/Elements/Box/OcBox.js +1 -1
  21. package/dist/Elements/Checklist/OcChecklist.js +1 -1
  22. package/dist/Elements/EmptyPage/OcEmptyPage.js +1 -1
  23. package/dist/Elements/FeatureOverviewCard/OcFeatureOverviewCard.js +1 -1
  24. package/dist/Elements/Header/OcHeader.js +1 -1
  25. package/dist/Elements/PageTitle/OcPageTitle.js +1 -1
  26. package/dist/Elements/SandboxBanner/OcSandboxBanner.js +1 -1
  27. package/dist/Elements/Sidebar/OcSidebar.js +2 -2
  28. package/dist/Elements/SubSidebar/OcSubSidebar.js +1 -1
  29. package/dist/Elements/TopBanner/OcTopBanner.js +1 -1
  30. package/dist/Elements/VerificationOption/OcVerificationOption.js +1 -1
  31. package/dist/Feedback/Banner/OcBanner.js +1 -1
  32. package/dist/Feedback/Chip/OcChip.js +1 -1
  33. package/dist/Feedback/ShareIcon/OcShareIcon.js +1 -1
  34. package/dist/Feedback/Snackbar/OcSnackbar.js +1 -1
  35. package/dist/Form/BaseInput/OcBaseInput.js +1 -1
  36. package/dist/Form/Button/OcButton.js +1 -1
  37. package/dist/Form/Calendar/OcCalendar.js +1 -1
  38. package/dist/Form/CardInput/OcCardInput.js +1 -1
  39. package/dist/Form/Checkbox/OcCheckbox.js +1 -1
  40. package/dist/Form/CheckboxesGroup/OcCheckboxesGroup.js +1 -1
  41. package/dist/Form/Criteria/OcCriteria.js +1 -1
  42. package/dist/Form/Cropper/OcCropper.js +1 -1
  43. package/dist/Form/DatePicker/OcDatePicker.js +1 -1
  44. package/dist/Form/EmojiPicker/OcEmojiPicker.js +1 -1
  45. package/dist/Form/Input/OcInput.js +1 -1
  46. package/dist/Form/LinkInput/OcLinkInput.js +1 -1
  47. package/dist/Form/MultipleUploadFile/OcMultipleUploadFile.js +1 -1
  48. package/dist/Form/NumberInput/OcNumberInput.js +1 -1
  49. package/dist/Form/PhoneInput/OcPhoneInput.js +1 -1
  50. package/dist/Form/Radio/OcRadio.js +1 -1
  51. package/dist/Form/RadioGroup/OcRadioGroup.js +1 -1
  52. package/dist/Form/RangeInput/OcRangeInput.js +1 -1
  53. package/dist/Form/SectionItem/OcSectionItem.js +1 -1
  54. package/dist/Form/Select/OcSelect.js +1 -1
  55. package/dist/Form/SelectOptions/OcSelectOptions.js +1 -1
  56. package/dist/Form/SingleFileUpload/OcSingleFileUpload.js +1 -1
  57. package/dist/Form/Slider/OcSlider.js +1 -1
  58. package/dist/Form/TextArea/OcTextArea.js +1 -1
  59. package/dist/Form/index.js +1 -1
  60. package/dist/FormBuilder/OcFormBuilder.js +1 -1
  61. package/dist/{OcAccountSetupProgress-Bx6buDNN.js → OcAccountSetupProgress-DdUK9oOD.js} +1 -1
  62. package/dist/{OcComplexCalendar-CtkwwLrB.js → OcComplexCalendar-StiofIJU.js} +1 -1
  63. package/dist/{OcComplexDatePicker-BHMNvQZl.js → OcComplexDatePicker-Cfg2yM4N.js} +1 -1
  64. package/dist/{OcCropper-CIwPHNjr.js → OcCropper-DhAbAYd6.js} +1 -1
  65. package/dist/OcDataTable-DEbeRfgR.js +556 -0
  66. package/dist/{OcDraggableList-Cx4KI7gQ.js → OcDraggableList-lV0wH906.js} +1 -1
  67. package/dist/{OcEmojiPicker-C9C1jDCf.js → OcEmojiPicker-C-3jL-rB.js} +1 -1
  68. package/dist/{OcFilterForm-DX1_yOO6.js → OcFilterForm-B0FT0aLA.js} +1 -1
  69. package/dist/{OcFilterSearch-CMJHgNcb.js → OcFilterSearch-CJPUigz7.js} +1 -1
  70. package/dist/{OcFilterSearchFor-CHoPowAN.js → OcFilterSearchFor-vRBVVNhL.js} +1 -1
  71. package/dist/{OcModalCropper-BXPY4wt7.js → OcModalCropper-DOxlQeul.js} +2 -2
  72. package/dist/{OcTimePicker-MyiNLzHx.js → OcTimePicker-DZBmmCEt.js} +1 -1
  73. package/dist/Overlay/ConfirmationModal/OcConfirmationModal.js +1 -1
  74. package/dist/Overlay/CopyTooltip/OcCopyTooltip.js +1 -1
  75. package/dist/Overlay/Dropdown/OcDropdown.js +1 -1
  76. package/dist/Overlay/Modal/OcModal.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-S4HLE7w0.js → SubPlanCard-DkDF-oQh.js} +1 -1
  81. package/dist/{ThumbnailSection-DsHJi0uk.js → ThumbnailSection-YkPh_rI4.js} +1 -1
  82. package/dist/{ThumbnailTheme-TJV70b5O.js → ThumbnailTheme-C1cIXjYU.js} +1 -1
  83. package/dist/{index-CyMlPyIa.js → index-BzWAzT_z.js} +2006 -1987
  84. package/dist/index.js +1 -1
  85. package/package.json +1 -1
  86. package/dist/OcDataTable-BycjTFKw.js +0 -547
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import "vue";
2
- import { W as r, an as o, a_ as t, a4 as n, a6 as i, aw as p, _ as l, a7 as d, B as m, o as u, a as b, C as c, b as S, a8 as T, ax as g, aK as C, aR as x, aA as P, aB as I, c as f, aT as h, v as O, aQ as F, p as k, aL as B, aU as v, aC as w, aD as A, aV as H, a9 as L, U as _, M as D, T as M, aa as R, aO as y, aN as E, aP as N, w as G, u as U, l as V, ab as j, ae as z, ad as W, af as q, x as K, a5 as Q, d as X, e as Y, m as Z, y as J, z as $, A as aa, aE as ea, aS as sa, t as ra, D as oa, N as ta, aF as na, E as ia, X as pa, Y as la, k as da, F as ma, G as ua, H as ba, ah as ca, ai as Sa, I as Ta, K as ga, a1 as Ca, f as xa, J as Pa, aj as Ia, g as fa, h as ha, i as Oa, ak as Fa, q as ka, j as Ba, r as va, ay as wa, ap as Aa, al as Ha, as as La, ar as _a, ao as Da, aq as Ma, am as Ra, s as ya, S as Ea, az as Na, $ as Ga, Z as Ua, ac as Va, aY as ja, at as za, aG as Wa, ag as qa, L as Ka, P as Qa, Q as Xa, O as Ya, R as Za, a0 as Ja, n as $a, aX as ae, aW as ee, aZ as se, aM as re, aH as oe, au as te, V as ne, a3 as ie, a2 as pe, av as le, aI as de } from "./index-CyMlPyIa.js";
2
+ import { W as r, an as o, a_ as t, a4 as n, a6 as i, aw as p, _ as l, a7 as d, B as m, o as u, a as b, C as c, b as S, a8 as T, ax as g, aK as C, aR as x, aA as P, aB as I, c as f, aT as h, v as O, aQ as F, p as k, aL as B, aU as v, aC as w, aD as A, aV as H, a9 as L, U as _, M as D, T as M, aa as R, aO as y, aN as E, aP as N, w as G, u as U, l as V, ab as j, ae as z, ad as W, af as q, x as K, a5 as Q, d as X, e as Y, m as Z, y as J, z as $, A as aa, aE as ea, aS as sa, t as ra, D as oa, N as ta, aF as na, E as ia, X as pa, Y as la, k as da, F as ma, G as ua, H as ba, ah as ca, ai as Sa, I as Ta, K as ga, a1 as Ca, f as xa, J as Pa, aj as Ia, g as fa, h as ha, i as Oa, ak as Fa, q as ka, j as Ba, r as va, ay as wa, ap as Aa, al as Ha, as as La, ar as _a, ao as Da, aq as Ma, am as Ra, s as ya, S as Ea, az as Na, $ as Ga, Z as Ua, ac as Va, aY as ja, at as za, aG as Wa, ag as qa, L as Ka, P as Qa, Q as Xa, O as Ya, R as Za, a0 as Ja, n as $a, aX as ae, aW as ee, aZ as se, aM as re, aH as oe, au as te, V as ne, a3 as ie, a2 as pe, av as le, aI as de } from "./index-BzWAzT_z.js";
3
3
  import { _ as ue } from "./OcProgressBar-lyqE5LZd.js";
4
4
  import { _ as ce } from "./OcHorizontalProgressbar-DapCdBDF.js";
5
5
  import { _ as Te } from "./OcSwitchTabs-B7LfmG3z.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orchidui/core",
3
3
  "description": "Orchid UI, Library Vue 3 tailwind css",
4
- "version": "1.64.0",
4
+ "version": "1.66.0",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "build": "vite build"
@@ -1,547 +0,0 @@
1
- import { ref as V, onMounted as $e, createBlock as T, openBlock as o, unref as i, withCtx as g, createVNode as I, createElementVNode as z, createElementBlock as x, createCommentVNode as p, mergeProps as fe, Fragment as le, renderList as _, normalizeClass as ae, toDisplayString as ye, computed as L, watch as ge, toRaw as Je, nextTick as Me, renderSlot as P, resolveDynamicComponent as Ge, createSlots as We, normalizeProps as ke, guardReactiveProps as be } from "vue";
2
- import { aC as Se, B as Oe, C as Xe, D as Ye, L as Ze, a0 as He, aN as _e, aO as el, aP as ll, I as al, J as he, j as tl } from "./index-CyMlPyIa.js";
3
- import { V as we } from "./vue-draggable-next.esm-bundler-QQ8zx__3.js";
4
- import { getFromLocalStorage as Ve, formatHeadersFromLocalStorage as Fe, formatHeadersToLocalStorage as sl, setInLocalStorage as ol } from "./DataTable/utils/editColumnsUtils.js";
5
- import { _ as xe } from "./OcIcon-BedshzZm.js";
6
- import { formatFilterDisplay as ul, clearAllFilters as il } from "./DataTable/utils/filterUtils.js";
7
- import { formatCustomItemsPerPageOptions as rl, getItemsPerPageOptions as nl } from "./DataTable/utils/paginationUtils.js";
8
- import "./dayjs.min-7xVZzECu.js";
9
- const dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, vl = {
10
- key: 0,
11
- class: "gap-y-2 flex flex-col border-b pb-3 border-oc-gray-200"
12
- }, cl = { class: "gap-y-2 flex flex-col" }, ml = {
13
- key: 0,
14
- class: "flex items-center bg-white justify-between h-[26px]"
15
- }, pl = { class: "flex items-center w-full gap-x-3" }, fl = { class: "truncate w-full max-w-[160px]" }, yl = {
16
- __name: "ColumnEdit",
17
- props: {
18
- options: {
19
- type: Object,
20
- default: () => ({})
21
- },
22
- headers: {
23
- type: Array,
24
- default: () => []
25
- },
26
- localKey: {
27
- type: String,
28
- default: ""
29
- }
30
- },
31
- emits: ["change-active", "onMoved", "update-order"],
32
- setup($, { emit: ee }) {
33
- const j = ee, k = $, c = V([]), S = V([]), F = V(!1), f = {
34
- handle: ".drag-el",
35
- filter: ".is-disabled",
36
- group: "headers",
37
- animation: 500,
38
- forceFallback: !1,
39
- move: (l) => l.to.dataset.activeHeaders ? !0 : !!l.draggedContext.futureIndex,
40
- "onUpdate:modelValue": () => q()
41
- }, q = (l = !1) => {
42
- S.value = S.value.map((r) => ({
43
- ...r,
44
- isActive: !0
45
- })), j("update-order", {
46
- fixedHeaders: S.value,
47
- activeHeaders: c.value,
48
- isOnMount: l
49
- });
50
- };
51
- return $e(() => {
52
- const l = Ve(k.localKey), { fixed: r, active: n } = Fe(l, k.headers, k.localKey);
53
- S.value = r || k.headers.slice(0, 1), c.value = n || k.headers.slice(1).map((b) => {
54
- var t, U, A;
55
- return {
56
- ...b,
57
- isActive: ((A = (U = (t = k.options) == null ? void 0 : t.active) == null ? void 0 : U.find((B) => B.key === b.key)) == null ? void 0 : A.isActive) ?? !0
58
- };
59
- }), q(!0);
60
- }), (l, r) => (o(), T(i(Se), {
61
- modelValue: F.value,
62
- "onUpdate:modelValue": r[3] || (r[3] = (n) => F.value = n),
63
- "is-attach-to-body": ""
64
- }, {
65
- menu: g(() => [
66
- z("div", dl, [
67
- S.value.length ? (o(), x("div", vl, [
68
- r[4] || (r[4] = z("span", { class: "text-oc-text-400 font-medium" }, "Fixed columns", -1)),
69
- I(i(we), fe({
70
- key: "key",
71
- modelValue: S.value,
72
- "onUpdate:modelValue": r[0] || (r[0] = (n) => S.value = n)
73
- }, f), {
74
- default: g(() => [
75
- (o(!0), x(le, null, _(S.value, (n, b) => (o(), x("div", {
76
- key: n.key,
77
- class: ae(["flex items-center justify-between h-[26px]", b ? "" : "is-disabled"])
78
- }, [
79
- z("span", null, ye(n.label), 1),
80
- b ? (o(), T(i(xe), {
81
- key: 0,
82
- width: "18",
83
- height: "18",
84
- class: "text-oc-text-400 drag-el cursor-move",
85
- name: "draggable"
86
- })) : p("", !0)
87
- ], 2))), 128))
88
- ]),
89
- _: 1
90
- }, 16, ["modelValue"])
91
- ])) : p("", !0),
92
- z("div", cl, [
93
- r[5] || (r[5] = z("span", { class: "text-oc-text-400 font-medium" }, "Active columns", -1)),
94
- I(i(we), fe({
95
- key: "key",
96
- modelValue: c.value,
97
- "onUpdate:modelValue": r[2] || (r[2] = (n) => c.value = n)
98
- }, f, { "data-active-headers": "true" }), {
99
- default: g(() => [
100
- (o(!0), x(le, null, _(c.value, (n) => (o(), x(le, {
101
- key: n.key
102
- }, [
103
- n.key !== "actions" ? (o(), x("div", ml, [
104
- z("div", pl, [
105
- I(i(Xe), {
106
- modelValue: n.isActive,
107
- "onUpdate:modelValue": [
108
- (b) => n.isActive = b,
109
- r[1] || (r[1] = (b) => q())
110
- ],
111
- class: "!w-fit"
112
- }, null, 8, ["modelValue", "onUpdate:modelValue"]),
113
- z("div", fl, ye(n.label), 1)
114
- ]),
115
- c.value.length > 1 ? (o(), T(i(xe), {
116
- key: 0,
117
- width: "18",
118
- height: "18",
119
- class: "text-oc-text-400 drag-el cursor-move",
120
- name: "draggable"
121
- })) : p("", !0)
122
- ])) : p("", !0)
123
- ], 64))), 128))
124
- ]),
125
- _: 1
126
- }, 16, ["modelValue"])
127
- ])
128
- ])
129
- ]),
130
- default: g(() => [
131
- I(i(Oe), {
132
- label: "Edit Column",
133
- "left-icon": "setting",
134
- size: "small",
135
- class: "whitespace-nowrap",
136
- variant: "secondary"
137
- })
138
- ]),
139
- _: 1
140
- }, 8, ["modelValue"]));
141
- }
142
- }, gl = { class: "relative flex flex-col gap-9" }, kl = {
143
- key: 0,
144
- class: "flex items-center px-4 min-h-[44px]"
145
- }, bl = {
146
- key: 0,
147
- class: "absolute flex items-center gap-5 left-5"
148
- }, hl = {
149
- key: 1,
150
- class: "absolute flex gap-3 left-5"
151
- }, wl = {
152
- key: 1,
153
- class: "flex justify-center w-full gap-5 md:justify-start"
154
- }, xl = {
155
- key: 2,
156
- class: "items-center hidden md:flex"
157
- }, jl = {
158
- __name: "OcDataTable",
159
- props: {
160
- isLoading: Boolean,
161
- id: {
162
- type: String,
163
- required: !0
164
- },
165
- options: {
166
- type: Object,
167
- required: !0
168
- },
169
- filter: {
170
- type: Object,
171
- default: () => ({})
172
- },
173
- selected: {
174
- type: Array,
175
- required: !1
176
- },
177
- rowClass: String,
178
- rowKey: {
179
- type: [String, Function],
180
- default: "id"
181
- },
182
- rowLink: String,
183
- isNewTable: {
184
- type: Boolean,
185
- default: !1
186
- },
187
- selectedIndex: {
188
- type: Number,
189
- default: -1
190
- }
191
- },
192
- emits: {
193
- "update:selected": [],
194
- "update:filter": [],
195
- "apply-filter": [],
196
- "click:row": [],
197
- "filter-fields-changed": [],
198
- "filter-removed": [],
199
- "filter-open": [],
200
- "search-query-changed": [],
201
- "hover:cell": [],
202
- "columns-changed": [],
203
- "on-table-ready": []
204
- },
205
- setup($, { emit: ee }) {
206
- var ue, ie, re, ne, de, ve, ce, me, pe;
207
- const j = $, k = ee, c = L(() => {
208
- var e;
209
- return (e = j.options) == null ? void 0 : e.cursor;
210
- }), S = V(), F = L(() => {
211
- var e;
212
- return (e = j.options) == null ? void 0 : e.tableOptions;
213
- }), f = V({
214
- total: 0,
215
- last_page: 1
216
- });
217
- ge(
218
- () => {
219
- var e;
220
- return (e = j.options) == null ? void 0 : e.pagination;
221
- },
222
- (e) => {
223
- f.value = e;
224
- },
225
- { deep: !0, immediate: !0 }
226
- );
227
- const q = L(() => {
228
- var a;
229
- return {
230
- ...F.value,
231
- headers: S.value ? S.value.map((u) => {
232
- var m, d;
233
- return u.class = ((d = (m = F.value) == null ? void 0 : m.headers.find((v) => v.key === u.key)) == null ? void 0 : d.class) ?? "", u;
234
- }).filter((u) => u.isActive) : (a = F.value) == null ? void 0 : a.headers.filter((u) => Ke(u.key))
235
- };
236
- }), l = L(() => {
237
- var e;
238
- return (e = j.options) == null ? void 0 : e.filterOptions;
239
- }), r = L(() => {
240
- var e;
241
- return (e = j.options) == null ? void 0 : e.hidePerPageDropdown;
242
- }), n = L(() => {
243
- var e;
244
- return ((e = f.value) == null ? void 0 : e.last_page) === 1;
245
- }), b = JSON.parse(JSON.stringify(Je(j.filter)));
246
- !b && f.value ? b.page = 1 : !b && c && (b.cursor = "");
247
- const t = V(b);
248
- ge(
249
- () => j.filter,
250
- (e) => {
251
- t.value = { ...e };
252
- },
253
- { deep: !0 }
254
- );
255
- const U = V(!1), A = V(t.value[(ie = (ue = l.value) == null ? void 0 : ue.tabs) == null ? void 0 : ie.key]), B = V(t.value.page), J = V(
256
- (ne = (re = l.value) == null ? void 0 : re.per_page) != null && ne.key ? t.value[(ve = (de = l.value) == null ? void 0 : de.per_page) == null ? void 0 : ve.key] : t.value.per_page
257
- ), te = ((pe = t.value[t.value.selectedSearchOption || ((me = (ce = l.value) == null ? void 0 : ce.search) == null ? void 0 : me.key)]) == null ? void 0 : pe.trim()) ?? "", N = V(te ? te.split(",") : []), se = V(!1), Ee = L(
258
- () => {
259
- var e;
260
- return rl((e = j.options) == null ? void 0 : e.perPageOptions);
261
- }
262
- ), Ce = L(() => nl(Ee.value, f.value)), Pe = L(() => {
263
- var e;
264
- return ((e = j.selected) == null ? void 0 : e.length) > 0;
265
- }), je = (e) => {
266
- !e.trim() || !t.value.selectedSearchOption && N.value.includes(e) || (N.value = [e], D(), k("search-query-changed", e));
267
- }, Ae = (e) => {
268
- N.value = N.value.filter((a) => a !== e), D();
269
- }, De = L(() => ul(t.value, l.value)), Ke = (e) => {
270
- var a, u, m, d, v, h;
271
- return ((h = (v = (d = (m = t.value) == null ? void 0 : m[(u = (a = l.value) == null ? void 0 : a.columnEdit) == null ? void 0 : u.key]) == null ? void 0 : d.active) == null ? void 0 : v.find((s) => s.key === e)) == null ? void 0 : h.isActive) ?? !0;
272
- }, Le = ({ fixedHeaders: e, activeHeaders: a, isOnMount: u }) => {
273
- var m, d, v, h, s, O, E, C;
274
- if (t.value[(d = (m = l.value) == null ? void 0 : m.columnEdit) == null ? void 0 : d.key] || (t.value[(h = (v = l.value) == null ? void 0 : v.columnEdit) == null ? void 0 : h.key] = {}), t.value[(O = (s = l.value) == null ? void 0 : s.columnEdit) == null ? void 0 : O.key].fixed = e, t.value[(C = (E = l.value) == null ? void 0 : E.columnEdit) == null ? void 0 : C.key].active = a, S.value = [...e, ...a], !u) {
275
- const K = sl(e, a);
276
- ol(l.value.columnEdit.localStorageKey, K);
277
- }
278
- k("columns-changed", a);
279
- }, Te = () => {
280
- var e, a, u, m, d, v;
281
- if ((a = (e = l.value) == null ? void 0 : e.columnEdit) != null && a.localStorageKey) {
282
- const h = Ve(l.value.columnEdit.localStorageKey);
283
- if (h) {
284
- const { fixed: s, active: O } = Fe(
285
- h,
286
- F.value.headers,
287
- l.value.columnEdit.localStorageKey
288
- );
289
- t.value[(m = (u = l.value) == null ? void 0 : u.columnEdit) == null ? void 0 : m.key].fixed = s, t.value[(v = (d = l.value) == null ? void 0 : d.columnEdit) == null ? void 0 : v.key].active = O, S.value = [...s, ...O];
290
- }
291
- }
292
- }, Ue = (e) => {
293
- t.value.selectedSearchOption = e;
294
- }, Ie = () => {
295
- N.value = [], A.value = "", t.value = il(
296
- t.value,
297
- l.value,
298
- J.value,
299
- A.value
300
- ), D();
301
- }, Ne = () => {
302
- D(null, B.value);
303
- }, D = (e = null, a = !1, u = "", m = !1, d = !1) => {
304
- var h, s, O, E, C, K, M, G, W, X, Y, Z, H;
305
- f.value && !a && (B.value = 1), f.value ? t.value.page = B.value : t.value.cursor = u, (h = l.value) != null && h.per_page ? t.value[l.value.per_page.key] = J.value : t.value.per_page = J.value, (s = l.value) != null && s.tabs && d && (t.value[l.value.tabs.key] = A.value), (O = l.value) != null && O.search && ((C = (E = l.value.search) == null ? void 0 : E.options) != null && C.length ? (Object.keys(t.value).forEach((w) => {
306
- var Q;
307
- (Q = l.value.search.options) != null && Q.map((R) => R.value).includes(w) && delete t.value[w];
308
- }), t.value[((K = t.value) == null ? void 0 : K.selectedSearchOption) || ((W = (G = (M = l.value.search) == null ? void 0 : M.options) == null ? void 0 : G[0]) == null ? void 0 : W.value) || l.value.search.key] = N.value.join()) : t.value[l.value.search.key] = N.value.join()), e && (U.value = !1, t.value = { ...t.value, ...e }, Object.keys(t.value).forEach((w) => {
309
- Array.isArray(t.value[w]) && t.value[w].length === 0 && delete t.value[w];
310
- }));
311
- let v = (Y = (X = l.value) == null ? void 0 : X.tabs) == null ? void 0 : Y.key;
312
- if (v && A.value !== t.value[v]) {
313
- const w = (H = (Z = l.value.tabs) == null ? void 0 : Z.options) == null ? void 0 : H.find(
314
- (Q) => {
315
- var R, y;
316
- return ((R = Q.value) == null ? void 0 : R.toString()) === ((y = t.value[v]) == null ? void 0 : y.toString());
317
- }
318
- );
319
- w != null && w.value && (A.value = w.value, d || D(null, !1, "", !1, !0));
320
- }
321
- Be(m);
322
- }, oe = V(null), Be = (e = !1) => {
323
- clearTimeout(oe.value), oe.value = setTimeout(() => {
324
- k("update:filter", { ...t.value }, e), k("apply-filter", { ...t.value }, e);
325
- }, 50);
326
- }, Qe = (e, a) => {
327
- (a === l.value.tabs.key || a === "tabs") && (A.value = ""), D(e), k("filter-removed", a);
328
- };
329
- return $e(() => {
330
- Te(), Me(() => {
331
- k("on-table-ready");
332
- });
333
- }), (e, a) => {
334
- var u, m, d, v, h;
335
- return o(), x("div", gl, [
336
- q.value ? (o(), T(Ge($.isNewTable ? i(Ye) : i(Ze)), {
337
- key: 0,
338
- selected: $.selected,
339
- "row-key": $.rowKey,
340
- options: q.value,
341
- "is-loading": $.isLoading,
342
- "loading-rows": J.value,
343
- "row-class": $.rowClass,
344
- "row-link": $.rowLink,
345
- "selected-index": $.selectedIndex,
346
- "is-sticky": F.value.isSticky,
347
- "is-borderless": F.value.isBorderless,
348
- "onUpdate:selected": a[8] || (a[8] = (s) => e.$emit("update:selected", s)),
349
- "onClick:row": a[9] || (a[9] = (s) => e.$emit("click:row", s)),
350
- "onHover:cell": a[10] || (a[10] = (s) => e.$emit("hover:cell", s))
351
- }, We({
352
- after: g(() => [
353
- P(e.$slots, "after")
354
- ]),
355
- empty: g(() => [
356
- P(e.$slots, "empty")
357
- ]),
358
- "table-header": g((s) => [
359
- P(e.$slots, "table-header", ke(be(s)))
360
- ]),
361
- "table-body": g((s) => [
362
- P(e.$slots, "table-body", ke(be(s)))
363
- ]),
364
- "after-rows": g(() => [
365
- P(e.$slots, "after-rows")
366
- ]),
367
- _: 2
368
- }, [
369
- e.$slots.before || (u = l.value) != null && u.search || (m = l.value) != null && m.form || (d = l.value) != null && d.tabs ? {
370
- name: "before",
371
- fn: g(() => {
372
- var s, O, E, C;
373
- return [
374
- P(e.$slots, "before"),
375
- (s = l.value) != null && s.search || (O = l.value) != null && O.form || (E = l.value) != null && E.tabs ? (o(), x("div", kl, [
376
- Pe.value ? (o(), x("div", bl, [
377
- P(e.$slots, "bulk-actions", { selectedRows: $.selected })
378
- ])) : (o(), x("div", hl, [
379
- (C = l.value) != null && C.tabs ? (o(), T(i(He), {
380
- key: 0,
381
- modelValue: A.value,
382
- "onUpdate:modelValue": [
383
- a[0] || (a[0] = (K) => A.value = K),
384
- a[1] || (a[1] = (K) => D(null, !1, "", !1, !0))
385
- ],
386
- "is-disabled": $.isLoading,
387
- tabs: l.value.tabs.options,
388
- variant: "pills"
389
- }, null, 8, ["modelValue", "is-disabled", "tabs"])) : p("", !0)
390
- ])),
391
- P(e.$slots, "filter-options", {}, () => {
392
- var K, M, G, W, X, Y, Z, H, w, Q, R;
393
- return [
394
- (K = l.value) != null && K.search || (M = l.value) != null && M.form || (G = l.value) != null && G.columnEdit ? (o(), x("div", {
395
- key: 0,
396
- class: ae([
397
- "flex gap-3 absolute ml-auto items-center bg-oc-bg-light right-4 max-w-[calc(100%-24px)]",
398
- l.value ? se.value ? "md:w-fit w-full" : "" : "w-full justify-end"
399
- ])
400
- }, [
401
- (W = l.value) != null && W.search ? (o(), T(i(_e), {
402
- key: 0,
403
- "is-search-only": !l.value.tabs || l.value.isSearchOnly,
404
- "search-options": ((X = l.value.search) == null ? void 0 : X.options) ?? [],
405
- "selected-option": (((Y = t.value) == null ? void 0 : Y.selectedSearchOption) || ((w = (H = (Z = l.value.search) == null ? void 0 : Z.options) == null ? void 0 : H[0]) == null ? void 0 : w.value)) ?? "keywords",
406
- onAddQuery: je,
407
- onToggle: a[2] || (a[2] = (y) => se.value = y),
408
- onChangeSearchKey: Ue
409
- }, null, 8, ["is-search-only", "search-options", "selected-option"])) : p("", !0),
410
- (Q = l.value) != null && Q.form ? (o(), T(i(Se), {
411
- key: 1,
412
- modelValue: U.value,
413
- "onUpdate:modelValue": [
414
- a[6] || (a[6] = (y) => U.value = y),
415
- a[7] || (a[7] = (y) => e.$emit("filter-open", y))
416
- ],
417
- distance: 9,
418
- placement: "bottom-end",
419
- "is-attach-to-body": ""
420
- }, {
421
- menu: g(() => [
422
- U.value ? (o(), T(i(el), {
423
- key: 0,
424
- id: $.id,
425
- "json-form": l.value.form ?? [],
426
- grid: l.value.grid ?? null,
427
- values: t.value,
428
- actions: l.value.actions,
429
- onApplyFilter: a[3] || (a[3] = (y) => D(y)),
430
- onFilterFieldsChanged: a[4] || (a[4] = (y) => k("filter-fields-changed", y)),
431
- onCancel: a[5] || (a[5] = (y) => U.value = !1)
432
- }, {
433
- default: g(({ errors: y, values: Re, jsonForm: ze, updateForm: qe }) => [
434
- P(e.$slots, "custom-filter-form", {
435
- errors: y,
436
- values: Re,
437
- jsonForm: ze,
438
- updateFilter: qe
439
- })
440
- ]),
441
- _: 3
442
- }, 8, ["id", "json-form", "grid", "values", "actions"])) : p("", !0)
443
- ]),
444
- default: g(() => [
445
- I(i(Oe), {
446
- "is-active": U.value,
447
- variant: "secondary",
448
- "left-icon": "filter",
449
- size: "small",
450
- class: "w-8",
451
- "icon-class": "shrink-0"
452
- }, null, 8, ["is-active"])
453
- ]),
454
- _: 3
455
- }, 8, ["modelValue"])) : p("", !0),
456
- l.value.columnEdit ? (o(), T(yl, {
457
- key: 2,
458
- options: t.value.columnEdit,
459
- headers: ((R = F.value) == null ? void 0 : R.headers) || [],
460
- "local-key": l.value.columnEdit.localStorageKey,
461
- onUpdateOrder: Le
462
- }, null, 8, ["options", "headers", "local-key"])) : p("", !0)
463
- ], 2)) : p("", !0)
464
- ];
465
- })
466
- ])) : p("", !0),
467
- I(i(ll), {
468
- filters: De.value,
469
- queries: N.value,
470
- class: "border-t border-oc-gray-200",
471
- onRemoveQuery: Ae,
472
- onRemoveAll: Ie,
473
- onRemoveFilter: Qe
474
- }, null, 8, ["filters", "queries"])
475
- ];
476
- }),
477
- key: "0"
478
- } : void 0,
479
- _((v = F.value) == null ? void 0 : v.headers, (s, O) => ({
480
- name: s.key,
481
- fn: g(({ data: E, item: C }) => [
482
- P(e.$slots, s.key, {
483
- data: E,
484
- item: C
485
- })
486
- ])
487
- })),
488
- _((h = F.value) == null ? void 0 : h.headers, (s, O) => ({
489
- name: `header-${s.key}-tooltip`,
490
- fn: g(({ data: E, item: C }) => [
491
- P(e.$slots, `header-${s.key}-tooltip`, {
492
- data: E,
493
- item: C
494
- })
495
- ])
496
- }))
497
- ]), 1064, ["selected", "row-key", "options", "is-loading", "loading-rows", "row-class", "row-link", "selected-index", "is-sticky", "is-borderless"])) : p("", !0),
498
- P(e.$slots, "before-pagination"),
499
- f.value || c.value ? (o(), x("div", {
500
- key: 1,
501
- class: ae(["flex items-center gap-3", f.value && f.value.last_page === 1 ? "justify-end" : ""])
502
- }, [
503
- f.value && !n.value ? (o(), T(i(al), {
504
- key: 0,
505
- modelValue: B.value,
506
- "onUpdate:modelValue": [
507
- a[11] || (a[11] = (s) => B.value = s),
508
- Ne
509
- ],
510
- class: "justify-center text-[13px]",
511
- "max-page": f.value.last_page,
512
- strategy: f.value.strategy,
513
- "total-visible": "5"
514
- }, null, 8, ["modelValue", "max-page", "strategy"])) : p("", !0),
515
- c.value ? (o(), x("div", wl, [
516
- I(i(he), {
517
- disabled: !c.value.prev,
518
- onClick: a[12] || (a[12] = (s) => c.value.prev ? D(null, !1, c.value.prev) : null)
519
- }, null, 8, ["disabled"]),
520
- I(i(he), {
521
- disabled: !c.value.next,
522
- "is-next": "",
523
- onClick: a[13] || (a[13] = (s) => c.value.next ? D(null, !1, c.value.next) : null)
524
- }, null, 8, ["disabled"])
525
- ])) : p("", !0),
526
- r.value ? p("", !0) : (o(), x("div", xl, [
527
- I(i(tl), {
528
- modelValue: J.value,
529
- "onUpdate:modelValue": [
530
- a[14] || (a[14] = (s) => J.value = s),
531
- a[15] || (a[15] = (s) => D(null))
532
- ],
533
- label: "Item per page",
534
- "is-inline-label": "",
535
- "popper-options": { placement: "auto" },
536
- options: Ce.value,
537
- "select-text-class": "!text-[13px]"
538
- }, null, 8, ["modelValue", "options"])
539
- ]))
540
- ], 2)) : p("", !0)
541
- ]);
542
- };
543
- }
544
- };
545
- export {
546
- jl as default
547
- };