@orchidui/core 1.8.1-114 → 1.8.1-116

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