@orchidui/core 1.8.1-105 → 1.8.1-106

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 (83) 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 +42 -44
  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-nx4JMMY1.js → OcAccountSetupProgress-BHZKRi83.js} +1 -1
  60. package/dist/{OcComplexCalendar-S2P-eRjh.js → OcComplexCalendar-DpEmr9kN.js} +1 -1
  61. package/dist/{OcComplexDatePicker-BvSA4Gc1.js → OcComplexDatePicker-BaA7wDaR.js} +1 -1
  62. package/dist/{OcCropper-D_9n7ZnV.js → OcCropper-DI9cu89P.js} +1 -1
  63. package/dist/{OcDataTable-CLQOCfZ9.js → OcDataTable-DB7Q2Frw.js} +186 -191
  64. package/dist/{OcDraggableList-C79_2OiC.js → OcDraggableList-D6Q9aZI0.js} +1 -1
  65. package/dist/{OcEmojiPicker-4377A0OM.js → OcEmojiPicker-B9K3pg5W.js} +1 -1
  66. package/dist/{OcFilterForm-CwWaEOhk.js → OcFilterForm-B4ASDeTk.js} +1 -1
  67. package/dist/{OcFilterSearch-B-6FRP1_.js → OcFilterSearch-SHFmbTuq.js} +1 -1
  68. package/dist/{OcFilterSearchFor-BjVUnvoD.js → OcFilterSearchFor-B1so0yiO.js} +1 -1
  69. package/dist/{OcModalCropper-RtpAQBCF.js → OcModalCropper-C5wArpL9.js} +2 -2
  70. package/dist/{OcTimePicker-CMHEOyc9.js → OcTimePicker-BFCYWz49.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-CVir0jVK.js → SubPlanCard-CP56AtvN.js} +1 -1
  79. package/dist/{ThumbnailSection-DTGEYJUX.js → ThumbnailSection-Ba03sZNp.js} +1 -1
  80. package/dist/{ThumbnailTheme-CX1nXVCH.js → ThumbnailTheme-ChifSN57.js} +1 -1
  81. package/dist/{index-DkNZ3JXO.js → index-SvoT4d-2.js} +8 -8
  82. package/dist/index.js +1 -1
  83. package/package.json +1 -1
@@ -1,20 +1,20 @@
1
- import { ref as x, onMounted as Ae, createBlock as j, openBlock as u, unref as i, withCtx as w, createVNode as T, createElementVNode as N, createElementBlock as h, createCommentVNode as b, mergeProps as Ve, Fragment as ie, renderList as ue, normalizeClass as re, toDisplayString as Ee, computed as E, watch as te, renderSlot as P, createSlots as al, normalizeProps as De, guardReactiveProps as Le } from "vue";
2
- import { az as Ke, B as Te, C as tl, K as ol, Z as sl, aK as il, aL as ul, aM as rl, H as nl, I as Ce, j as dl } from "./index-DkNZ3JXO.js";
1
+ import { ref as x, onMounted as je, 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 Oe, Fragment as ue, renderList as ie, normalizeClass as re, toDisplayString as Ve, computed as E, watch as te, renderSlot as j, createSlots as ll, normalizeProps as Ee, guardReactiveProps as Ce } from "vue";
2
+ import { az as Ae, B as Ke, C as al, K as tl, Z as ol, aK as sl, aL as ul, aM as il, H as rl, I as Le, j as nl } from "./index-SvoT4d-2.js";
3
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 pl, clearAllFilters as ml } 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";
4
+ import { getFromLocalStorage as Te, formatHeadersFromLocalStorage as Ue, formatHeadersToLocalStorage as dl, setInLocalStorage as vl } from "./DataTable/utils/editColumnsUtils.js";
5
+ import { _ as De } from "./OcIcon-CBf___w1.js";
6
+ import { formatFilterDisplay as cl, clearAllFilters as ml } from "./DataTable/utils/filterUtils.js";
7
+ import { formatCustomItemsPerPageOptions as pl, getItemsPerPageOptions as fl } from "./DataTable/utils/paginationUtils.js";
8
+ import { getFilterFromLocalStorage as gl, saveFilterToLocalStorage as yl } from "./DataTable/utils/storageUtils.js";
9
+ import { useDataTable as bl } from "./DataTable/useDataTable.js";
10
10
  import "dayjs";
11
- const hl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, Sl = {
11
+ const kl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, hl = {
12
12
  key: 0,
13
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 = {
14
+ }, Sl = { class: "gap-y-2 flex flex-col" }, xl = {
15
15
  key: 0,
16
16
  class: "flex items-center bg-white justify-between h-[26px]"
17
- }, Ol = { class: "flex items-center w-full gap-x-3" }, $l = { class: "truncate w-full max-w-[160px]" }, Fl = {
17
+ }, wl = { class: "flex items-center w-full gap-x-3" }, $l = { class: "truncate w-full max-w-[160px]" }, Fl = {
18
18
  __name: "ColumnEdit",
19
19
  props: {
20
20
  options: {
@@ -35,56 +35,56 @@ const hl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, Sl = {
35
35
  "onMoved",
36
36
  "update-order"
37
37
  ],
38
- setup(A, { emit: oe }) {
39
- const s = oe, O = A, n = x([]), p = x([]), B = x(!1), $ = {
38
+ setup(K, { emit: oe }) {
39
+ const s = oe, $ = K, n = x([]), m = x([]), B = x(!1), F = {
40
40
  handle: ".drag-el",
41
41
  filter: ".is-disabled",
42
42
  group: "headers",
43
43
  animation: 500,
44
44
  forceFallback: !1,
45
- move: (K) => K.to.dataset.activeHeaders ? !0 : !!K.draggedContext.futureIndex,
45
+ move: (L) => L.to.dataset.activeHeaders ? !0 : !!L.draggedContext.futureIndex,
46
46
  "onUpdate:modelValue": () => I()
47
- }, I = (K = !1) => {
48
- p.value = p.value.map((m) => ({
49
- ...m,
47
+ }, I = (L = !1) => {
48
+ m.value = m.value.map((p) => ({
49
+ ...p,
50
50
  isActive: !0
51
51
  })), s("update-order", {
52
- fixedHeaders: p.value,
52
+ fixedHeaders: m.value,
53
53
  activeHeaders: n.value,
54
- isOnMount: K
54
+ isOnMount: L
55
55
  });
56
56
  };
57
- return Ae(() => {
58
- const K = Ue(O.localKey), { fixed: m, active: f } = Be(K, O.headers, O.localKey);
59
- p.value = m || O.headers.slice(0, 1), n.value = f || O.headers.slice(1).map((F) => {
57
+ return je(() => {
58
+ const L = Te($.localKey), { fixed: p, active: f } = Ue(L, $.headers, $.localKey);
59
+ m.value = p || $.headers.slice(0, 1), n.value = f || $.headers.slice(1).map((O) => {
60
60
  var ee, le, l;
61
61
  return {
62
- ...F,
63
- isActive: ((l = (le = (ee = O.options) == null ? void 0 : ee.active) == null ? void 0 : le.find((se) => se.key === F.key)) == null ? void 0 : l.isActive) ?? !0
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
64
  };
65
65
  }), I(!0);
66
- }), (K, m) => (u(), j(i(Ke), {
66
+ }), (L, p) => (i(), A(u(Ae), {
67
67
  modelValue: B.value,
68
- "onUpdate:modelValue": m[3] || (m[3] = (f) => B.value = f),
68
+ "onUpdate:modelValue": p[3] || (p[3] = (f) => B.value = f),
69
69
  class: "h-[36px]",
70
70
  "is-attach-to-body": ""
71
71
  }, {
72
72
  menu: w(() => [
73
- N("div", hl, [
74
- p.value.length ? (u(), h("div", Sl, [
75
- m[4] || (m[4] = N("span", { class: "text-oc-text-400 font-medium" }, "Fixed columns", -1)),
76
- T(i(Pe), Ve({
73
+ N("div", kl, [
74
+ m.value.length ? (i(), h("div", hl, [
75
+ p[4] || (p[4] = N("span", { class: "text-oc-text-400 font-medium" }, "Fixed columns", -1)),
76
+ T(u(Pe), Oe({
77
77
  key: "key",
78
- modelValue: p.value,
79
- "onUpdate:modelValue": m[0] || (m[0] = (f) => p.value = f)
80
- }, $), {
78
+ modelValue: m.value,
79
+ "onUpdate:modelValue": p[0] || (p[0] = (f) => m.value = f)
80
+ }, F), {
81
81
  default: w(() => [
82
- (u(!0), h(ie, null, ue(p.value, (f, F) => (u(), h("div", {
82
+ (i(!0), h(ue, null, ie(m.value, (f, O) => (i(), h("div", {
83
83
  key: f.key,
84
- class: re(["flex items-center justify-between h-[26px]", F ? "" : "is-disabled"])
84
+ class: re(["flex items-center justify-between h-[26px]", O ? "" : "is-disabled"])
85
85
  }, [
86
- N("span", null, Ee(f.label), 1),
87
- F ? (u(), j(i(je), {
86
+ N("span", null, Ve(f.label), 1),
87
+ O ? (i(), A(u(De), {
88
88
  key: 0,
89
89
  width: "18",
90
90
  height: "18",
@@ -96,30 +96,30 @@ const hl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, Sl = {
96
96
  _: 1
97
97
  }, 16, ["modelValue"])
98
98
  ])) : b("", !0),
99
- N("div", xl, [
100
- m[5] || (m[5] = N("span", { class: "text-oc-text-400 font-medium" }, "Active columns", -1)),
101
- T(i(Pe), Ve({
99
+ N("div", Sl, [
100
+ p[5] || (p[5] = N("span", { class: "text-oc-text-400 font-medium" }, "Active columns", -1)),
101
+ T(u(Pe), Oe({
102
102
  key: "key",
103
103
  modelValue: n.value,
104
- "onUpdate:modelValue": m[2] || (m[2] = (f) => n.value = f)
105
- }, $, { "data-active-headers": "true" }), {
104
+ "onUpdate:modelValue": p[2] || (p[2] = (f) => n.value = f)
105
+ }, F, { "data-active-headers": "true" }), {
106
106
  default: w(() => [
107
- (u(!0), h(ie, null, ue(n.value, (f) => (u(), h(ie, {
107
+ (i(!0), h(ue, null, ie(n.value, (f) => (i(), h(ue, {
108
108
  key: f.key
109
109
  }, [
110
- f.key !== "actions" ? (u(), h("div", wl, [
111
- N("div", Ol, [
112
- T(i(tl), {
110
+ f.key !== "actions" ? (i(), h("div", xl, [
111
+ N("div", wl, [
112
+ T(u(al), {
113
113
  modelValue: f.isActive,
114
114
  "onUpdate:modelValue": [
115
- (F) => f.isActive = F,
116
- m[1] || (m[1] = (F) => I())
115
+ (O) => f.isActive = O,
116
+ p[1] || (p[1] = (O) => I())
117
117
  ],
118
118
  class: "!w-fit"
119
119
  }, null, 8, ["modelValue", "onUpdate:modelValue"]),
120
- N("div", $l, Ee(f.label), 1)
120
+ N("div", $l, Ve(f.label), 1)
121
121
  ]),
122
- n.value.length > 1 ? (u(), j(i(je), {
122
+ n.value.length > 1 ? (i(), A(u(De), {
123
123
  key: 0,
124
124
  width: "18",
125
125
  height: "18",
@@ -135,7 +135,7 @@ const hl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, Sl = {
135
135
  ])
136
136
  ]),
137
137
  default: w(() => [
138
- T(i(Te), {
138
+ T(u(Ke), {
139
139
  label: "Edit Column",
140
140
  "left-icon": "setting",
141
141
  variant: "secondary"
@@ -144,22 +144,22 @@ const hl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, Sl = {
144
144
  _: 1
145
145
  }, 8, ["modelValue"]));
146
146
  }
147
- }, Vl = { class: "relative flex flex-col gap-9" }, El = {
147
+ }, Ol = { class: "relative flex flex-col gap-9" }, Vl = {
148
148
  key: 0,
149
149
  class: "flex items-center px-4 min-h-[52px]"
150
- }, Dl = {
150
+ }, El = {
151
151
  key: 0,
152
152
  class: "absolute flex items-center gap-5 left-5"
153
- }, Ll = {
153
+ }, Cl = {
154
154
  key: 1,
155
155
  class: "absolute flex gap-3 left-5"
156
- }, Cl = {
156
+ }, Ll = {
157
157
  key: 1,
158
158
  class: "flex justify-center w-full gap-5 md:justify-start"
159
159
  }, Pl = {
160
160
  key: 2,
161
161
  class: "items-center hidden md:flex"
162
- }, Rl = {
162
+ }, Nl = {
163
163
  __name: "OcDataTable",
164
164
  props: {
165
165
  isLoading: Boolean,
@@ -185,11 +185,7 @@ const hl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, Sl = {
185
185
  default: "id"
186
186
  },
187
187
  rowLink: String,
188
- isLocalData: {
189
- type: Boolean,
190
- default: !1
191
- },
192
- localDataOptions: {
188
+ localDb: {
193
189
  type: Object,
194
190
  required: !1
195
191
  }
@@ -205,37 +201,36 @@ const hl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, Sl = {
205
201
  "hover:cell": [],
206
202
  "columns-changed": []
207
203
  },
208
- setup(A, { emit: oe }) {
209
- var me, fe, ge, ye, be, ke, he, Se, xe, we, Oe, $e, Fe;
210
- const s = A, O = oe;
211
- let n = x((me = s.options) == null ? void 0 : me.pagination);
212
- const p = E(() => {
204
+ setup(K, { emit: oe }) {
205
+ var pe, fe, ge, ye, be, ke, he, Se, xe, we, $e, Fe;
206
+ const s = K, $ = oe;
207
+ let n = x((pe = s.options) == null ? void 0 : pe.pagination);
208
+ const m = E(() => {
213
209
  var e;
214
210
  return (e = s.options) == null ? void 0 : e.cursor;
215
- }), B = x(), $ = E(() => {
211
+ }), B = x(), F = E(() => {
216
212
  var e;
217
213
  return (e = s.options) == null ? void 0 : e.tableOptions;
218
- }), I = E(() => s.isLocalData && s.localDataOptions), {
219
- localData: K,
220
- setFilter: m,
214
+ }), I = E(() => s.localDb !== void 0), {
215
+ localData: L,
216
+ setFilter: p,
221
217
  setSortBy: f,
222
- paginationData: F,
218
+ paginationData: O,
223
219
  isLoading: ee
224
220
  // sortBy,
225
221
  // toggleSort,
226
222
  // updateOrAddLocalData,
227
- } = kl({
223
+ } = bl({
228
224
  id: s.id,
229
- name: (fe = s.localDataOptions) == null ? void 0 : fe.table_name,
230
- localDb: (ge = s.localDataOptions) == null ? void 0 : ge.db,
231
- options: (ye = s.localDataOptions) == null ? void 0 : ye.options
225
+ name: (fe = s.localDb) == null ? void 0 : fe.table_name,
226
+ localDb: (ge = s.localDb) == null ? void 0 : ge.db
232
227
  });
233
- I.value && (n.value = F.value, te(() => s.filter, () => {
234
- m(s.filter);
228
+ I.value && (n.value = O.value, te(() => s.filter, () => {
229
+ p(s.filter);
235
230
  }, { deep: !0, immediate: !0 }), te(() => s.sortBy, () => {
236
231
  f(s.sortBy);
237
- }, { deep: !0, immediate: !0 }), te(() => F.value, () => {
238
- n.value = F.value;
232
+ }, { deep: !0, immediate: !0 }), te(() => O.value, () => {
233
+ n.value = O.value;
239
234
  }, { deep: !0, immediate: !0 })), te(() => {
240
235
  var e;
241
236
  return (e = s.options) == null ? void 0 : e.pagination;
@@ -245,79 +240,79 @@ const hl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, Sl = {
245
240
  const le = E(() => {
246
241
  var a;
247
242
  const e = {
248
- ...$.value,
243
+ ...F.value,
249
244
  headers: B.value ? B.value.map((r) => {
250
245
  var v, c;
251
- return r.class = ((c = (v = $.value) == null ? void 0 : v.headers.find((d) => d.key === r.key)) == null ? void 0 : c.class) ?? "", r;
252
- }).filter((r) => r.isActive) : (a = $.value) == null ? void 0 : a.headers.filter((r) => Me(r.key))
246
+ return r.class = ((c = (v = F.value) == null ? void 0 : v.headers.find((d) => d.key === r.key)) == null ? void 0 : c.class) ?? "", r;
247
+ }).filter((r) => r.isActive) : (a = F.value) == null ? void 0 : a.headers.filter((r) => ze(r.key))
253
248
  };
254
- return I.value && (e.fields = K.value), e;
249
+ return (I.value || L.value.length > 0) && (e.fields = L.value), e;
255
250
  }), l = E(() => {
256
251
  var e;
257
252
  return (e = s.options) == null ? void 0 : e.filterOptions;
258
253
  }), se = E(() => {
259
254
  var e;
260
255
  return (e = s.options) == null ? void 0 : e.hidePerPageDropdown;
261
- }), Ie = E(() => {
256
+ }), Be = E(() => {
262
257
  var e;
263
258
  return ((e = n.value) == null ? void 0 : e.last_page) === 1;
264
- }), 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(
265
- (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
266
- ), ne = ((Fe = s.filter[($e = (Oe = l.value) == null ? void 0 : Oe.search) == null ? void 0 : $e.key]) == null ? void 0 : Fe.trim()) ?? "", U = x(ne ? ne.split(",") : []), de = x(!1), qe = E(
259
+ }), R = x(!1), P = x(s.filter[(be = (ye = l.value) == null ? void 0 : ye.tabs) == null ? void 0 : be.key]), z = x(s.filter.page), M = x(
260
+ (he = (ke = l.value) == null ? void 0 : ke.per_page) != null && he.key ? s.filter[(xe = (Se = l.value) == null ? void 0 : Se.per_page) == null ? void 0 : xe.key] : s.filter.per_page
261
+ ), ne = ((Fe = s.filter[($e = (we = l.value) == null ? void 0 : we.search) == null ? void 0 : $e.key]) == null ? void 0 : Fe.trim()) ?? "", U = x(ne ? ne.split(",") : []), de = x(!1), Ie = E(
267
262
  () => {
268
263
  var e;
269
- return fl((e = s.options) == null ? void 0 : e.perPageOptions);
264
+ return pl((e = s.options) == null ? void 0 : e.perPageOptions);
270
265
  }
271
- ), Qe = E(() => gl(qe.value, n.value)), Ne = E(() => {
266
+ ), qe = E(() => fl(Ie.value, n.value)), Qe = E(() => {
272
267
  var e;
273
268
  return ((e = s.selected) == null ? void 0 : e.length) > 0;
274
269
  }), ve = (e) => {
275
- !e.trim() || !t.value.selectedSearchOption && U.value.includes(e) || (U.value = [e], V(), O("search-query-changed", e));
276
- }, Re = (e) => {
270
+ !e.trim() || !t.value.selectedSearchOption && U.value.includes(e) || (U.value = [e], V(), $("search-query-changed", e));
271
+ }, Ne = (e) => {
277
272
  U.value = U.value.filter((a) => a !== e), V();
278
273
  }, J = s.filter;
279
- !J && n.value ? J.page = 1 : !J && p && (J.cursor = "");
280
- const t = x(J), ze = E(() => pl(t.value, l.value)), Me = (e) => {
274
+ !J && n.value ? J.page = 1 : !J && m && (J.cursor = "");
275
+ const t = x(J), Re = E(() => cl(t.value, l.value)), ze = (e) => {
281
276
  var a, r, v, c, d, o;
282
277
  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;
283
- }, Je = ({ fixedHeaders: e, activeHeaders: a, isOnMount: r }) => {
284
- var v, c, d, o, g, S, C, D;
285
- 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[(D = (C = l.value) == null ? void 0 : C.columnEdit) == null ? void 0 : D.key].active = a, B.value = [...e, ...a], !r) {
286
- const q = vl(e, a);
287
- cl(l.value.columnEdit.localStorageKey, q);
278
+ }, Me = ({ fixedHeaders: e, activeHeaders: a, isOnMount: r }) => {
279
+ var v, c, d, o, g, S, D, C;
280
+ 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 = (D = l.value) == null ? void 0 : D.columnEdit) == null ? void 0 : C.key].active = a, B.value = [...e, ...a], !r) {
281
+ const q = dl(e, a);
282
+ vl(l.value.columnEdit.localStorageKey, q);
288
283
  }
289
- O("columns-changed", a);
290
- }, Ze = () => {
284
+ $("columns-changed", a);
285
+ }, Je = () => {
291
286
  var e, a, r, v, c, d;
292
287
  if ((a = (e = l.value) == null ? void 0 : e.columnEdit) != null && a.localStorageKey) {
293
- const o = Ue(l.value.columnEdit.localStorageKey);
288
+ const o = Te(l.value.columnEdit.localStorageKey);
294
289
  if (o) {
295
- const { fixed: g, active: S } = Be(
290
+ const { fixed: g, active: S } = Ue(
296
291
  o,
297
- $.value.headers,
292
+ F.value.headers,
298
293
  l.value.columnEdit.localStorageKey
299
294
  );
300
295
  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];
301
296
  }
302
297
  }
303
- }, Ge = (e) => {
298
+ }, Ze = (e) => {
304
299
  t.value.selectedSearchOption = e;
300
+ }, Ge = () => {
301
+ U.value = [], P.value = "", t.value = ml(t.value, l.value, M.value, P.value), V();
305
302
  }, He = () => {
306
- U.value = [], L.value = "", t.value = ml(t.value, l.value, M.value, L.value), V();
307
- }, We = () => {
308
303
  V(null, z.value);
309
- }, Xe = () => {
310
- bl(s.id, t.value);
311
- }, Ye = () => yl(s.id), ce = x(null), V = (e = null, a = !1, r = "", v = !1, c = !1) => {
312
- var o, g, S, C, D, q, Z, G, H, W, X, Y, _;
313
- 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 && ((D = (C = l.value.search) == null ? void 0 : C.options) != null && D.length ? (Object.keys(t.value).forEach((k) => {
304
+ }, We = () => {
305
+ yl(s.id, t.value);
306
+ }, Xe = () => gl(s.id), ce = x(null), V = (e = null, a = !1, r = "", v = !1, c = !1) => {
307
+ var o, g, S, D, C, q, Z, G, H, W, X, Y, _;
308
+ 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] = P.value), (S = l.value) != null && S.search && ((C = (D = l.value.search) == null ? void 0 : D.options) != null && C.length ? (Object.keys(t.value).forEach((k) => {
314
309
  var Q;
315
310
  (Q = l.value.search.options) != null && Q.map((y) => y.value).includes(k) && delete t.value[k];
316
311
  }), 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) => {
317
312
  Array.isArray(t.value[k]) && t.value[k].length === 0 && delete t.value[k];
318
313
  }));
319
314
  let d = (X = (W = l.value) == null ? void 0 : W.tabs) == null ? void 0 : X.key;
320
- if (d && L.value !== t.value[d]) {
315
+ if (d && P.value !== t.value[d]) {
321
316
  const k = (_ = (Y = l.value.tabs) == null ? void 0 : Y.options) == null ? void 0 : _.find(
322
317
  (Q) => {
323
318
  var y, ae;
@@ -325,95 +320,95 @@ const hl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, Sl = {
325
320
  }
326
321
  );
327
322
  if (k != null && k.value)
328
- return L.value = k.value, V(), !1;
323
+ return P.value = k.value, V(), !1;
329
324
  }
330
- Xe(), clearTimeout(ce.value), ce.value = setTimeout(() => {
331
- O("update:filter", t.value, v);
325
+ We(), clearTimeout(ce.value), ce.value = setTimeout(() => {
326
+ $("update:filter", t.value, v);
332
327
  }, 100);
333
- }, _e = (e, a) => {
334
- (a === l.value.tabs.key || a === "tabs") && (L.value = ""), V(e), O("filter-removed", a);
328
+ }, Ye = (e, a) => {
329
+ (a === l.value.tabs.key || a === "tabs") && (P.value = ""), V(e), $("filter-removed", a);
335
330
  };
336
- Ae(() => {
331
+ je(() => {
337
332
  var a, r, v, c, d, o, g;
338
- Ze();
339
- const e = Ye();
340
- 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));
333
+ Je();
334
+ const e = Xe();
335
+ e && (t.value = JSON.parse(e), P.value = P.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));
341
336
  });
342
- const pe = E(() => s.isLoading || ee.value);
337
+ const me = E(() => s.isLoading || ee.value);
343
338
  return (e, a) => {
344
339
  var r, v, c, d;
345
- return u(), h("div", Vl, [
346
- $.value ? (u(), j(i(ol), {
340
+ return i(), h("div", Ol, [
341
+ F.value ? (i(), A(u(tl), {
347
342
  key: 0,
348
- selected: A.selected,
349
- "row-key": A.rowKey,
343
+ selected: K.selected,
344
+ "row-key": K.rowKey,
350
345
  options: le.value,
351
- "is-loading": pe.value,
346
+ "is-loading": me.value,
352
347
  "loading-rows": M.value,
353
- "row-class": A.rowClass,
354
- "row-link": A.rowLink,
355
- "is-sticky": $.value.isSticky,
356
- "is-borderless": $.value.isBorderless,
348
+ "row-class": K.rowClass,
349
+ "row-link": K.rowLink,
350
+ "is-sticky": F.value.isSticky,
351
+ "is-borderless": F.value.isBorderless,
357
352
  "onUpdate:selected": a[8] || (a[8] = (o) => e.$emit("update:selected", o)),
358
353
  "onClick:row": a[9] || (a[9] = (o) => e.$emit("click:row", o)),
359
354
  "onHover:cell": a[10] || (a[10] = (o) => e.$emit("hover:cell", o))
360
- }, al({
355
+ }, ll({
361
356
  after: w(() => [
362
- P(e.$slots, "after")
357
+ j(e.$slots, "after")
363
358
  ]),
364
359
  empty: w(() => [
365
- P(e.$slots, "empty")
360
+ j(e.$slots, "empty")
366
361
  ]),
367
362
  "table-header": w((o) => [
368
- P(e.$slots, "table-header", De(Le(o)))
363
+ j(e.$slots, "table-header", Ee(Ce(o)))
369
364
  ]),
370
365
  "table-body": w((o) => [
371
- P(e.$slots, "table-body", De(Le(o)))
366
+ j(e.$slots, "table-body", Ee(Ce(o)))
372
367
  ]),
373
368
  _: 2
374
369
  }, [
375
370
  e.$slots.before || (r = l.value) != null && r.search || (v = l.value) != null && v.form || (c = l.value) != null && c.tabs ? {
376
371
  name: "before",
377
372
  fn: w(() => {
378
- var o, g, S, C;
373
+ var o, g, S, D;
379
374
  return [
380
- P(e.$slots, "before"),
381
- (o = l.value) != null && o.search || (g = l.value) != null && g.form || (S = l.value) != null && S.tabs ? (u(), h("div", El, [
382
- Ne.value ? (u(), h("div", Dl, [
383
- P(e.$slots, "bulk-actions", { selectedRows: A.selected })
384
- ])) : (u(), h("div", Ll, [
385
- (C = l.value) != null && C.tabs ? (u(), j(i(sl), {
375
+ j(e.$slots, "before"),
376
+ (o = l.value) != null && o.search || (g = l.value) != null && g.form || (S = l.value) != null && S.tabs ? (i(), h("div", Vl, [
377
+ Qe.value ? (i(), h("div", El, [
378
+ j(e.$slots, "bulk-actions", { selectedRows: K.selected })
379
+ ])) : (i(), h("div", Cl, [
380
+ (D = l.value) != null && D.tabs ? (i(), A(u(ol), {
386
381
  key: 0,
387
- modelValue: L.value,
382
+ modelValue: P.value,
388
383
  "onUpdate:modelValue": [
389
- a[0] || (a[0] = (D) => L.value = D),
390
- a[1] || (a[1] = (D) => V(null, !1, "", !1, !0))
384
+ a[0] || (a[0] = (C) => P.value = C),
385
+ a[1] || (a[1] = (C) => V(null, !1, "", !1, !0))
391
386
  ],
392
- "is-disabled": pe.value,
387
+ "is-disabled": me.value,
393
388
  tabs: l.value.tabs.options,
394
389
  variant: "pills"
395
390
  }, null, 8, ["modelValue", "is-disabled", "tabs"])) : b("", !0)
396
391
  ])),
397
- P(e.$slots, "filter-options", {}, () => {
398
- var D, q, Z, G, H, W, X, Y, _, k, Q;
392
+ j(e.$slots, "filter-options", {}, () => {
393
+ var C, q, Z, G, H, W, X, Y, _, k, Q;
399
394
  return [
400
- (D = l.value) != null && D.search || (q = l.value) != null && q.form || (Z = l.value) != null && Z.columnEdit ? (u(), h("div", {
395
+ (C = l.value) != null && C.search || (q = l.value) != null && q.form || (Z = l.value) != null && Z.columnEdit ? (i(), h("div", {
401
396
  key: 0,
402
397
  class: re([
403
398
  "flex gap-3 absolute ml-auto bg-oc-bg-light right-4 max-w-[calc(100%-24px)]",
404
399
  l.value ? de.value ? "md:w-fit w-full" : "" : "w-full justify-end"
405
400
  ])
406
401
  }, [
407
- (G = l.value) != null && G.search ? (u(), j(i(il), {
402
+ (G = l.value) != null && G.search ? (i(), A(u(sl), {
408
403
  key: 0,
409
404
  "is-search-only": !l.value.tabs || l.value.isSearchOnly,
410
405
  "search-options": ((H = l.value.search) == null ? void 0 : H.options) ?? [],
411
406
  "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",
412
407
  onAddQuery: ve,
413
408
  onToggle: a[2] || (a[2] = (y) => de.value = y),
414
- onChangeSearchKey: Ge
409
+ onChangeSearchKey: Ze
415
410
  }, null, 8, ["is-search-only", "search-options", "selected-option"])) : b("", !0),
416
- (k = l.value) != null && k.form ? (u(), j(i(Ke), {
411
+ (k = l.value) != null && k.form ? (i(), A(u(Ae), {
417
412
  key: 1,
418
413
  modelValue: R.value,
419
414
  "onUpdate:modelValue": [
@@ -425,30 +420,30 @@ const hl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, Sl = {
425
420
  "is-attach-to-body": ""
426
421
  }, {
427
422
  menu: w(() => [
428
- R.value ? (u(), j(i(ul), {
423
+ R.value ? (i(), A(u(ul), {
429
424
  key: 0,
430
- id: A.id,
425
+ id: K.id,
431
426
  "json-form": l.value.form ?? [],
432
427
  grid: l.value.grid ?? null,
433
428
  values: s.filter,
434
429
  actions: l.value.actions,
435
430
  onApplyFilter: a[3] || (a[3] = (y) => V(y)),
436
- onFilterFieldsChanged: a[4] || (a[4] = (y) => O("filter-fields-changed", y)),
431
+ onFilterFieldsChanged: a[4] || (a[4] = (y) => $("filter-fields-changed", y)),
437
432
  onCancel: a[5] || (a[5] = (y) => R.value = !1)
438
433
  }, {
439
- default: w(({ errors: y, values: ae, jsonForm: el, updateForm: ll }) => [
440
- P(e.$slots, "custom-filter-form", {
434
+ default: w(({ errors: y, values: ae, jsonForm: _e, updateForm: el }) => [
435
+ j(e.$slots, "custom-filter-form", {
441
436
  errors: y,
442
437
  values: ae,
443
- jsonForm: el,
444
- updateFilter: ll
438
+ jsonForm: _e,
439
+ updateFilter: el
445
440
  })
446
441
  ]),
447
442
  _: 3
448
443
  }, 8, ["id", "json-form", "grid", "values", "actions"])) : b("", !0)
449
444
  ]),
450
445
  default: w(() => [
451
- T(i(Te), {
446
+ T(u(Ke), {
452
447
  "is-active": R.value,
453
448
  variant: "secondary",
454
449
  "left-icon": "filter"
@@ -456,69 +451,69 @@ const hl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, Sl = {
456
451
  ]),
457
452
  _: 3
458
453
  }, 8, ["modelValue"])) : b("", !0),
459
- l.value.columnEdit ? (u(), j(Fl, {
454
+ l.value.columnEdit ? (i(), A(Fl, {
460
455
  key: 2,
461
456
  options: t.value.columnEdit,
462
- headers: ((Q = $.value) == null ? void 0 : Q.headers) || [],
457
+ headers: ((Q = F.value) == null ? void 0 : Q.headers) || [],
463
458
  "local-key": l.value.columnEdit.localStorageKey,
464
- onUpdateOrder: Je
459
+ onUpdateOrder: Me
465
460
  }, null, 8, ["options", "headers", "local-key"])) : b("", !0)
466
461
  ], 2)) : b("", !0)
467
462
  ];
468
463
  })
469
464
  ])) : b("", !0),
470
- T(i(rl), {
471
- filters: ze.value,
465
+ T(u(il), {
466
+ filters: Re.value,
472
467
  queries: U.value,
473
468
  class: "border-t border-oc-gray-200",
474
- onRemoveQuery: Re,
475
- onRemoveAll: He,
476
- onRemoveFilter: _e
469
+ onRemoveQuery: Ne,
470
+ onRemoveAll: Ge,
471
+ onRemoveFilter: Ye
477
472
  }, null, 8, ["filters", "queries"])
478
473
  ];
479
474
  }),
480
475
  key: "0"
481
476
  } : void 0,
482
- ue((d = $.value) == null ? void 0 : d.headers, (o, g) => ({
477
+ ie((d = F.value) == null ? void 0 : d.headers, (o, g) => ({
483
478
  name: o.key,
484
- fn: w(({ data: S, item: C }) => [
485
- P(e.$slots, o.key, {
479
+ fn: w(({ data: S, item: D }) => [
480
+ j(e.$slots, o.key, {
486
481
  data: S,
487
- item: C
482
+ item: D
488
483
  })
489
484
  ])
490
485
  }))
491
486
  ]), 1032, ["selected", "row-key", "options", "is-loading", "loading-rows", "row-class", "row-link", "is-sticky", "is-borderless"])) : b("", !0),
492
- P(e.$slots, "before-pagination"),
493
- i(n) || p.value ? (u(), h("div", {
487
+ j(e.$slots, "before-pagination"),
488
+ u(n) || m.value ? (i(), h("div", {
494
489
  key: 1,
495
- class: re(["flex items-center gap-3", i(n) && i(n).last_page === 1 ? "justify-end" : ""])
490
+ class: re(["flex items-center gap-3", u(n) && u(n).last_page === 1 ? "justify-end" : ""])
496
491
  }, [
497
- i(n) && !Ie.value ? (u(), j(i(nl), {
492
+ u(n) && !Be.value ? (i(), A(u(rl), {
498
493
  key: 0,
499
494
  modelValue: z.value,
500
495
  "onUpdate:modelValue": [
501
496
  a[11] || (a[11] = (o) => z.value = o),
502
- We
497
+ He
503
498
  ],
504
499
  class: "justify-center",
505
- "max-page": i(n).last_page,
506
- strategy: i(n).strategy,
500
+ "max-page": u(n).last_page,
501
+ strategy: u(n).strategy,
507
502
  "total-visible": "5"
508
503
  }, null, 8, ["modelValue", "max-page", "strategy"])) : b("", !0),
509
- p.value ? (u(), h("div", Cl, [
510
- T(i(Ce), {
511
- disabled: !p.value.prev,
512
- onClick: a[12] || (a[12] = (o) => p.value.prev ? V(null, !1, p.value.prev) : null)
504
+ m.value ? (i(), h("div", Ll, [
505
+ T(u(Le), {
506
+ disabled: !m.value.prev,
507
+ onClick: a[12] || (a[12] = (o) => m.value.prev ? V(null, !1, m.value.prev) : null)
513
508
  }, null, 8, ["disabled"]),
514
- T(i(Ce), {
515
- disabled: !p.value.next,
509
+ T(u(Le), {
510
+ disabled: !m.value.next,
516
511
  "is-next": "",
517
- onClick: a[13] || (a[13] = (o) => p.value.next ? V(null, !1, p.value.next) : null)
512
+ onClick: a[13] || (a[13] = (o) => m.value.next ? V(null, !1, m.value.next) : null)
518
513
  }, null, 8, ["disabled"])
519
514
  ])) : b("", !0),
520
- se.value ? b("", !0) : (u(), h("div", Pl, [
521
- T(i(dl), {
515
+ se.value ? b("", !0) : (i(), h("div", Pl, [
516
+ T(u(nl), {
522
517
  modelValue: M.value,
523
518
  "onUpdate:modelValue": [
524
519
  a[14] || (a[14] = (o) => M.value = o),
@@ -527,7 +522,7 @@ const hl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, Sl = {
527
522
  label: "Item per page",
528
523
  "is-inline-label": "",
529
524
  "popper-options": { placement: "auto" },
530
- options: Qe.value
525
+ options: qe.value
531
526
  }, null, 8, ["modelValue", "options"])
532
527
  ]))
533
528
  ], 2)) : b("", !0)
@@ -536,5 +531,5 @@ const hl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, Sl = {
536
531
  }
537
532
  };
538
533
  export {
539
- Rl as default
534
+ Nl as default
540
535
  };