@orchidui/core 1.6.1-9 → 1.8.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 (80) hide show
  1. package/dist/DataDisplay/CustomerCard/OcCustomerCard.js +1 -1
  2. package/dist/DataDisplay/FloatContent/OcFloatContent.js +1 -1
  3. package/dist/DataDisplay/InfoCard/OcInfoCard.js +1 -1
  4. package/dist/DataDisplay/ListDetail/OcListDetail.js +1 -1
  5. package/dist/DataDisplay/ListItem/OcListItem.js +1 -1
  6. package/dist/DataDisplay/OnboardingListItem/OcOnboardingListItem.js +1 -1
  7. package/dist/DataDisplay/Overview/OcOverview.js +1 -1
  8. package/dist/DataDisplay/Pagination/OcPagination.js +1 -1
  9. package/dist/DataDisplay/Table/OcTable.js +1 -1
  10. package/dist/DataDisplay/TransferSummary/OcTransferSummary.js +1 -1
  11. package/dist/Disclosure/Accordion/OcAccordion.js +1 -1
  12. package/dist/Disclosure/OnboardingAccordion/OnboardingAccordion.js +1 -1
  13. package/dist/Disclosure/Steps/OcSteps.js +1 -1
  14. package/dist/Disclosure/Tabs/Tabs.js +1 -1
  15. package/dist/Disclosure/Variants/OcVariants.js +1 -1
  16. package/dist/Elements/AdditionalContent/OcAdditionalContent.js +1 -1
  17. package/dist/Elements/AuthenticationOption/AuthenticationOption.js +1 -1
  18. package/dist/Elements/Box/OcBox.js +1 -1
  19. package/dist/Elements/EmptyPage/OcEmptyPage.js +1 -1
  20. package/dist/Elements/FeatureOverviewCard/OcFeatureOverviewCard.js +1 -1
  21. package/dist/Elements/Header/OcHeader.js +1 -1
  22. package/dist/Elements/PageTitle/OcPageTitle.js +1 -1
  23. package/dist/Elements/SandboxBanner/OcSandboxBanner.js +1 -1
  24. package/dist/Elements/Sidebar/OcSidebar.js +2 -2
  25. package/dist/Elements/SubSidebar/OcSubSidebar.js +1 -1
  26. package/dist/Elements/VerificationOption/OcVerificationOption.js +1 -1
  27. package/dist/Feedback/Banner/OcBanner.js +1 -1
  28. package/dist/Feedback/Chip/OcChip.js +1 -1
  29. package/dist/Feedback/ShareIcon/OcShareIcon.js +1 -1
  30. package/dist/Feedback/Snackbar/OcSnackbar.js +1 -1
  31. package/dist/Form/BaseInput/OcBaseInput.js +1 -1
  32. package/dist/Form/Button/OcButton.js +1 -1
  33. package/dist/Form/Calendar/OcCalendar.js +1 -1
  34. package/dist/Form/CardInput/OcCardInput.js +1 -1
  35. package/dist/Form/Checkbox/OcCheckbox.js +1 -1
  36. package/dist/Form/CheckboxesGroup/OcCheckboxesGroup.js +1 -1
  37. package/dist/Form/Criteria/OcCriteria.js +1 -1
  38. package/dist/Form/Cropper/OcCropper.js +1 -1
  39. package/dist/Form/DatePicker/OcDatePicker.js +1 -1
  40. package/dist/Form/EmojiPicker/OcEmojiPicker.js +1 -1
  41. package/dist/Form/Input/OcInput.js +1 -1
  42. package/dist/Form/LinkInput/OcLinkInput.js +1 -1
  43. package/dist/Form/MultipleUploadFile/OcMultipleUploadFile.js +1 -1
  44. package/dist/Form/NumberInput/OcNumberInput.js +1 -1
  45. package/dist/Form/PhoneInput/OcPhoneInput.js +1 -1
  46. package/dist/Form/Radio/OcRadio.js +1 -1
  47. package/dist/Form/RadioGroup/OcRadioGroup.js +1 -1
  48. package/dist/Form/RangeInput/OcRangeInput.js +1 -1
  49. package/dist/Form/SectionItem/OcSectionItem.js +1 -1
  50. package/dist/Form/Select/OcSelect.js +1 -1
  51. package/dist/Form/SelectOptions/OcSelectOptions.js +1 -1
  52. package/dist/Form/SingleFileUpload/OcSingleFileUpload.js +1 -1
  53. package/dist/Form/TextArea/OcTextArea.js +1 -1
  54. package/dist/Form/index.js +1 -1
  55. package/dist/FormBuilder/OcFormBuilder.js +1 -1
  56. package/dist/{OcAccountSetupProgress-BreiDI17.js → OcAccountSetupProgress-CR9QkApv.js} +1 -1
  57. package/dist/{OcComplexCalendar-CuYEla-b.js → OcComplexCalendar-BCQqKsk-.js} +1 -1
  58. package/dist/{OcComplexDatePicker-DNpfY4gk.js → OcComplexDatePicker-BLWn07UP.js} +1 -1
  59. package/dist/{OcCropper-CXnDsycK.js → OcCropper-D8vpyb-l.js} +1 -1
  60. package/dist/{OcDataTable-D__V2I6z.js → OcDataTable-D7-keuAo.js} +200 -206
  61. package/dist/{OcDraggableList-CnBKmL4m.js → OcDraggableList-Cg_6v1EQ.js} +1 -1
  62. package/dist/{OcEmojiPicker-DzWYFqZD.js → OcEmojiPicker-Dh9Y40q4.js} +1 -1
  63. package/dist/{OcFilterForm-BJL9rGLn.js → OcFilterForm-svjLU527.js} +1 -1
  64. package/dist/{OcFilterSearch-BkMkx3jj.js → OcFilterSearch-D1Lbpt57.js} +1 -1
  65. package/dist/{OcFilterSearchFor-CrQV0oRO.js → OcFilterSearchFor-DeDD-MIX.js} +1 -1
  66. package/dist/{OcModalCropper-0FAqmsmw.js → OcModalCropper-Ch7Sl3BA.js} +2 -2
  67. package/dist/{OcTimePicker-BzvyFP2b.js → OcTimePicker-CxJ0SL1p.js} +1 -1
  68. package/dist/Overlay/ConfirmationModal/OcConfirmationModal.js +1 -1
  69. package/dist/Overlay/CopyTooltip/OcCopyTooltip.js +1 -1
  70. package/dist/Overlay/Dropdown/OcDropdown.js +1 -1
  71. package/dist/Overlay/Modal/OcModal.js +1 -1
  72. package/dist/Overlay/SupportMenu/OcSupportMenu.js +1 -1
  73. package/dist/Overlay/Tooltip/OcTooltip.js +1 -1
  74. package/dist/Overlay/Whitelist/OcWhiteList.js +1 -1
  75. package/dist/{SubPlanCard-WsWD8oUY.js → SubPlanCard-CIRa6pOo.js} +1 -1
  76. package/dist/{ThumbnailSection-DRPDblt7.js → ThumbnailSection-C75v4AsR.js} +1 -1
  77. package/dist/{ThumbnailTheme-Bwu1kmc3.js → ThumbnailTheme-BcYAsdcZ.js} +1 -1
  78. package/dist/{index-ayex2EdH.js → index-BLure7-i.js} +16 -16
  79. package/dist/index.js +1 -1
  80. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- import { ref as P, onMounted as Ve, openBlock as n, createBlock as B, unref as y, withCtx as F, createElementVNode as G, createElementBlock as $, createVNode as N, mergeProps as ge, Fragment as ee, renderList as ae, normalizeClass as te, toDisplayString as be, createCommentVNode as h, computed as L, watch as Qe, createSlots as Re, renderSlot as U, normalizeProps as ke, guardReactiveProps as he } from "vue";
2
- import { ax as Ee, b as Je, B as Fe, L as ze, Y as _e, aI as Ge, aJ as He, aK as We, I as Xe, J as xe, k as Ze } from "./index-ayex2EdH.js";
1
+ import { ref as L, onMounted as Ve, openBlock as i, createBlock as U, unref as y, withCtx as S, createElementVNode as J, createElementBlock as w, createVNode as M, mergeProps as ge, Fragment as ee, renderList as ae, normalizeClass as te, toDisplayString as be, createCommentVNode as x, computed as D, watch as Qe, createSlots as Re, renderSlot as Y, normalizeProps as ke, guardReactiveProps as xe } from "vue";
2
+ import { ax as Ee, b as Je, B as Fe, L as ze, Y as _e, aI as He, aJ as Ge, aK as We, I as Xe, J as he, k as Ze } from "./index-BLure7-i.js";
3
3
  import le from "dayjs";
4
4
  import { VueDraggableNext as we } from "vue-draggable-next";
5
5
  import { getFromLocalStorage as se, formatHeadersFromLocalStorage as Oe, formatHeadersToLocalStorage as el, setInLocalStorage as $e } from "./DataTable/utils/editColumnsUtils.js";
@@ -27,8 +27,8 @@ const ll = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, al = {
27
27
  }
28
28
  },
29
29
  emits: ["change-active", "onMoved", "update-order"],
30
- setup(j, { emit: Z }) {
31
- const v = Z, O = j, c = P([]), f = P([]), J = P(!1), S = (a = !1) => {
30
+ setup(E, { emit: Z }) {
31
+ const v = Z, F = E, c = L([]), f = L([]), T = L(!1), V = (a = !1) => {
32
32
  f.value = f.value.map((p) => ({
33
33
  ...p,
34
34
  isActive: !0
@@ -44,81 +44,81 @@ const ll = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, al = {
44
44
  animation: 500,
45
45
  forceFallback: !1,
46
46
  move: (a) => a.to.dataset.activeHeaders ? !0 : !!a.draggedContext.futureIndex,
47
- "onUpdate:modelValue": () => S()
47
+ "onUpdate:modelValue": () => V()
48
48
  };
49
49
  return Ve(() => {
50
- const a = se(O.localKey), { fixed: p, active: m } = Oe(a, O.headers, O.localKey);
51
- f.value = p || O.headers.slice(0, 1), c.value = m || O.headers.slice(1).map((x) => {
52
- var V, I, C;
50
+ const a = se(F.localKey), { fixed: p, active: m } = Oe(a, F.headers, F.localKey);
51
+ f.value = p || F.headers.slice(0, 1), c.value = m || F.headers.slice(1).map((h) => {
52
+ var $, B, P;
53
53
  return {
54
- ...x,
55
- isActive: ((C = (I = (V = O.options) == null ? void 0 : V.active) == null ? void 0 : I.find((X) => X.key === x.key)) == null ? void 0 : C.isActive) ?? !0
54
+ ...h,
55
+ isActive: ((P = (B = ($ = F.options) == null ? void 0 : $.active) == null ? void 0 : B.find((X) => X.key === h.key)) == null ? void 0 : P.isActive) ?? !0
56
56
  };
57
- }), S(!0);
58
- }), (a, p) => (n(), B(y(Ee), {
59
- modelValue: J.value,
60
- "onUpdate:modelValue": p[3] || (p[3] = (m) => J.value = m),
57
+ }), V(!0);
58
+ }), (a, p) => (i(), U(y(Ee), {
59
+ modelValue: T.value,
60
+ "onUpdate:modelValue": p[3] || (p[3] = (m) => T.value = m),
61
61
  class: "h-[36px]",
62
62
  "is-attach-to-body": ""
63
63
  }, {
64
- menu: F(() => [
65
- G("div", ll, [
66
- f.value.length ? (n(), $("div", al, [
67
- p[4] || (p[4] = G("span", { class: "text-oc-text-400 font-medium" }, "Fixed columns", -1)),
68
- N(y(we), ge({
64
+ menu: S(() => [
65
+ J("div", ll, [
66
+ f.value.length ? (i(), w("div", al, [
67
+ p[4] || (p[4] = J("span", { class: "text-oc-text-400 font-medium" }, "Fixed columns", -1)),
68
+ M(y(we), ge({
69
69
  key: "key",
70
70
  modelValue: f.value,
71
71
  "onUpdate:modelValue": p[0] || (p[0] = (m) => f.value = m)
72
72
  }, W), {
73
- default: F(() => [
74
- (n(!0), $(ee, null, ae(f.value, (m, x) => (n(), $("div", {
73
+ default: S(() => [
74
+ (i(!0), w(ee, null, ae(f.value, (m, h) => (i(), w("div", {
75
75
  key: m.key,
76
- class: te(["flex items-center justify-between h-[26px]", x ? "" : "is-disabled"])
76
+ class: te(["flex items-center justify-between h-[26px]", h ? "" : "is-disabled"])
77
77
  }, [
78
- G("span", null, be(m.label), 1),
79
- x ? (n(), B(y(Se), {
78
+ J("span", null, be(m.label), 1),
79
+ h ? (i(), U(y(Se), {
80
80
  key: 0,
81
81
  width: "18",
82
82
  height: "18",
83
83
  class: "text-oc-text-400 drag-el cursor-move",
84
84
  name: "draggable"
85
- })) : h("", !0)
85
+ })) : x("", !0)
86
86
  ], 2))), 128))
87
87
  ]),
88
88
  _: 1
89
89
  }, 16, ["modelValue"])
90
- ])) : h("", !0),
91
- G("div", tl, [
92
- p[5] || (p[5] = G("span", { class: "text-oc-text-400 font-medium" }, "Active columns", -1)),
93
- N(y(we), ge({
90
+ ])) : x("", !0),
91
+ J("div", tl, [
92
+ p[5] || (p[5] = J("span", { class: "text-oc-text-400 font-medium" }, "Active columns", -1)),
93
+ M(y(we), ge({
94
94
  key: "key",
95
95
  modelValue: c.value,
96
96
  "onUpdate:modelValue": p[2] || (p[2] = (m) => c.value = m)
97
97
  }, W, { "data-active-headers": "true" }), {
98
- default: F(() => [
99
- (n(!0), $(ee, null, ae(c.value, (m) => (n(), $(ee, {
98
+ default: S(() => [
99
+ (i(!0), w(ee, null, ae(c.value, (m) => (i(), w(ee, {
100
100
  key: m.key
101
101
  }, [
102
- m.key !== "actions" ? (n(), $("div", sl, [
103
- G("div", ol, [
104
- N(y(Je), {
102
+ m.key !== "actions" ? (i(), w("div", sl, [
103
+ J("div", ol, [
104
+ M(y(Je), {
105
105
  modelValue: m.isActive,
106
106
  "onUpdate:modelValue": [
107
- (x) => m.isActive = x,
108
- p[1] || (p[1] = (x) => S())
107
+ (h) => m.isActive = h,
108
+ p[1] || (p[1] = (h) => V())
109
109
  ],
110
110
  class: "!w-fit"
111
111
  }, null, 8, ["modelValue", "onUpdate:modelValue"]),
112
- G("div", ul, be(m.label), 1)
112
+ J("div", ul, be(m.label), 1)
113
113
  ]),
114
- c.value.length > 1 ? (n(), B(y(Se), {
114
+ c.value.length > 1 ? (i(), U(y(Se), {
115
115
  key: 0,
116
116
  width: "18",
117
117
  height: "18",
118
118
  class: "text-oc-text-400 drag-el cursor-move",
119
119
  name: "draggable"
120
- })) : h("", !0)
121
- ])) : h("", !0)
120
+ })) : x("", !0)
121
+ ])) : x("", !0)
122
122
  ], 64))), 128))
123
123
  ]),
124
124
  _: 1
@@ -126,8 +126,8 @@ const ll = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, al = {
126
126
  ])
127
127
  ])
128
128
  ]),
129
- default: F(() => [
130
- N(y(Fe), {
129
+ default: S(() => [
130
+ M(y(Fe), {
131
131
  label: "Edit Column",
132
132
  "left-icon": "setting",
133
133
  variant: "secondary"
@@ -151,7 +151,7 @@ const ll = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, al = {
151
151
  }, fl = {
152
152
  key: 2,
153
153
  class: "hidden md:flex items-center"
154
- }, hl = {
154
+ }, xl = {
155
155
  __name: "OcDataTable",
156
156
  props: {
157
157
  isLoading: Boolean,
@@ -186,41 +186,37 @@ const ll = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, al = {
186
186
  "filter-fields-changed": [],
187
187
  "filter-removed": [],
188
188
  "search-query-changed": [],
189
- "hover:cell": [],
190
- "columns-changed": []
189
+ "hover:cell": []
191
190
  },
192
- setup(j, { emit: Z }) {
191
+ setup(E, { emit: Z }) {
193
192
  var re, ie, ne, de, ve, ce, fe, pe, me;
194
- const v = j, O = Z, c = L(() => {
193
+ const v = E, F = Z, c = D(() => {
195
194
  var l;
196
195
  return (l = v.options) == null ? void 0 : l.pagination;
197
- }), f = L(() => {
196
+ }), f = D(() => {
198
197
  var l;
199
198
  return (l = v.options) == null ? void 0 : l.cursor;
200
- }), J = P(), S = L(() => {
199
+ }), T = L(), V = D(() => {
201
200
  var l;
202
201
  return (l = v.options) == null ? void 0 : l.tableOptions;
203
- }), W = L(() => {
202
+ }), W = D(() => {
204
203
  var l;
205
204
  return {
206
- ...S.value,
207
- headers: J.value ? J.value.map((e) => {
208
- var o, u;
209
- return e.class = ((u = (o = S.value) == null ? void 0 : o.headers.find((r) => r.key === e.key)) == null ? void 0 : u.class) ?? "", e;
210
- }).filter((e) => ue(e.key)) : (l = S.value) == null ? void 0 : l.headers.filter((e) => ue(e.key))
205
+ ...V.value,
206
+ headers: T.value ? T.value.filter((e) => ue(e.key)) : (l = V.value) == null ? void 0 : l.headers.filter((e) => ue(e.key))
211
207
  };
212
- }), a = L(() => {
208
+ }), a = D(() => {
213
209
  var l;
214
210
  return (l = v.options) == null ? void 0 : l.filterOptions;
215
- }), p = L(() => {
211
+ }), p = D(() => {
216
212
  var l;
217
213
  return (l = v.options) == null ? void 0 : l.hidePerPageDropdown;
218
- }), m = L(() => {
214
+ }), m = D(() => {
219
215
  var l;
220
216
  return ((l = c.value) == null ? void 0 : l.last_page) === 1;
221
- }), x = P(!1), V = P(v.filter[(ie = (re = a.value) == null ? void 0 : re.tabs) == null ? void 0 : ie.key]), I = P(v.filter.page), C = P(
217
+ }), h = L(!1), $ = L(v.filter[(ie = (re = a.value) == null ? void 0 : re.tabs) == null ? void 0 : ie.key]), B = L(v.filter.page), P = L(
222
218
  (de = (ne = a.value) == null ? void 0 : ne.per_page) != null && de.key ? v.filter[(ce = (ve = a.value) == null ? void 0 : ve.per_page) == null ? void 0 : ce.key] : v.filter.per_page
223
- ), X = ((me = v.filter[(pe = (fe = a.value) == null ? void 0 : fe.search) == null ? void 0 : pe.key]) == null ? void 0 : me.trim()) ?? "", z = P(X ? X.split(",") : []), oe = P(!1), je = L(
219
+ ), X = ((me = v.filter[(pe = (fe = a.value) == null ? void 0 : fe.search) == null ? void 0 : pe.key]) == null ? void 0 : me.trim()) ?? "", q = L(X ? X.split(",") : []), oe = L(!1), je = D(
224
220
  () => {
225
221
  var l, e;
226
222
  return (e = (l = v.options) == null ? void 0 : l.perPageOptions) == null ? void 0 : e.map(
@@ -230,7 +226,7 @@ const ll = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, al = {
230
226
  })
231
227
  );
232
228
  }
233
- ), Ae = L(() => {
229
+ ), Ae = D(() => {
234
230
  let l = [
235
231
  {
236
232
  label: "10",
@@ -270,71 +266,71 @@ const ll = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, al = {
270
266
  o > 10 && (e = e.filter((u) => u.value <= o));
271
267
  }
272
268
  return [...new Set(e)];
273
- }), De = L(() => {
269
+ }), De = D(() => {
274
270
  var l;
275
271
  return ((l = v.selected) == null ? void 0 : l.length) > 0;
276
272
  }), Le = (l) => {
277
- !l.trim() || z.value.includes(l) || (z.value = [l], A(), O("search-query-changed", l));
273
+ !l.trim() || q.value.includes(l) || (q.value = [l], O(), F("search-query-changed", l));
278
274
  }, Pe = (l) => {
279
- z.value = z.value.filter((e) => e !== l), A();
280
- }, _ = v.filter;
281
- !_ && c ? _.page = 1 : !_ && f && (_.cursor = "");
282
- const t = P(_), Ce = () => {
283
- var e, o, u, r, d, s, g, b, E, w, K, T, q, Q;
284
- z.value = [], V.value = "";
275
+ q.value = q.value.filter((e) => e !== l), O();
276
+ }, Q = v.filter;
277
+ !Q && c ? Q.page = 1 : !Q && f && (Q.cursor = "");
278
+ const t = L(Q), Ce = () => {
279
+ var e, o, u, d, n, s, g, b;
280
+ q.value = [], $.value = "";
285
281
  const l = {};
286
- a.value ? _.page = 1 : _.cursor = "", (o = (e = a.value) == null ? void 0 : e.per_page) != null && o.key ? l[(r = (u = a.value) == null ? void 0 : u.per_page) == null ? void 0 : r.key] = C.value : l.per_page = C.value, (s = (d = a.value) == null ? void 0 : d.tabs) != null && s.key ? l[(b = (g = a.value) == null ? void 0 : g.tabs) == null ? void 0 : b.key] = V.value : l.tabs = V.value, (w = (E = a.value) == null ? void 0 : E.columnEdit) != null && w.key && (l[(T = (K = a.value) == null ? void 0 : K.columnEdit) == null ? void 0 : T.key] = t.value[(Q = (q = a.value) == null ? void 0 : q.columnEdit) == null ? void 0 : Q.key]), t.value = l, A();
282
+ a.value ? Q.page = 1 : Q.cursor = "", (o = (e = a.value) == null ? void 0 : e.per_page) != null && o.key ? l[(d = (u = a.value) == null ? void 0 : u.per_page) == null ? void 0 : d.key] = P.value : l.per_page = P.value, (s = (n = a.value) == null ? void 0 : n.tabs) != null && s.key ? l[(b = (g = a.value) == null ? void 0 : g.tabs) == null ? void 0 : b.key] = $.value : l.tabs = $.value, t.value = l, O();
287
283
  }, Ke = () => {
288
- A(null, I.value);
284
+ O(null, B.value);
289
285
  }, Ye = () => {
290
286
  v.id && $e(v.id, JSON.stringify(t.value));
291
- }, Ue = () => v.id ? se(v.id) : null, A = (l = null, e = !1, o = "") => {
292
- var u, r, d;
293
- c.value && !e && (I.value = 1), c.value ? t.value.page = I.value : t.value.cursor = o, (u = a.value) != null && u.per_page ? t.value[a.value.per_page.key] = C.value : t.value.per_page = C.value, (r = a.value) != null && r.tabs && (t.value[a.value.tabs.key] = V.value), (d = a.value) != null && d.search && (t.value[a.value.search.key] = z.value.join()), l && (x.value = !1, t.value = { ...t.value, ...l }, Object.keys(t.value).forEach((s) => {
287
+ }, Ue = () => v.id ? se(v.id) : null, O = (l = null, e = !1, o = "") => {
288
+ var u, d, n;
289
+ c.value && !e && (B.value = 1), c.value ? t.value.page = B.value : t.value.cursor = o, (u = a.value) != null && u.per_page ? t.value[a.value.per_page.key] = P.value : t.value.per_page = P.value, (d = a.value) != null && d.tabs && (t.value[a.value.tabs.key] = $.value), (n = a.value) != null && n.search && (t.value[a.value.search.key] = q.value.join()), l && (h.value = !1, t.value = { ...t.value, ...l }, Object.keys(t.value).forEach((s) => {
294
290
  Array.isArray(t.value[s]) && t.value[s].length === 0 && delete t.value[s];
295
- })), Ye(), O("update:filter", t.value);
291
+ })), Ye(), F("update:filter", t.value);
296
292
  }, Be = (l, e) => {
297
- (e === a.value.tabs.key || e === "tabs") && (V.value = ""), A(l), O("filter-removed", e);
293
+ (e === a.value.tabs.key || e === "tabs") && ($.value = ""), O(l), F("filter-removed", e);
298
294
  }, Ie = (l) => {
299
295
  let e = [];
300
296
  return l.forEach((o) => {
301
297
  e.push(o.key);
302
298
  }), e;
303
- }, Me = L(() => {
299
+ }, Me = D(() => {
304
300
  if (t.value) {
305
301
  let l = [];
306
302
  return Object.keys(t.value).forEach((e) => {
307
- var d, s, g, b, E, w, K, T, q, Q, H;
308
- let o = (s = (d = a.value) == null ? void 0 : d.tabs) == null ? void 0 : s.key;
309
- const u = (b = (g = a.value) == null ? void 0 : g.search) == null ? void 0 : b.key, r = ((w = (E = a.value) == null ? void 0 : E.per_page) == null ? void 0 : w.key) ?? "per_page";
310
- if ((K = a.value.form) == null || K.find((k) => {
303
+ var n, s, g, b, C, j, R, z, _, H, G;
304
+ let o = (s = (n = a.value) == null ? void 0 : n.tabs) == null ? void 0 : s.key;
305
+ const u = (b = (g = a.value) == null ? void 0 : g.search) == null ? void 0 : b.key, d = ((j = (C = a.value) == null ? void 0 : C.per_page) == null ? void 0 : j.key) ?? "per_page";
306
+ if ((R = a.value.form) == null || R.find((k) => {
311
307
  k.name === o && (o = "");
312
- }), e !== "page" && e !== "cursor" && e !== r && e !== o && e !== u) {
313
- let k = null, i = (T = a.value.form) == null ? void 0 : T.find((M) => {
314
- if (typeof M.name == "object") {
315
- let Y = !1;
316
- return M.name.forEach((R) => {
317
- R.key === e && (Y = !0, k = Ie(M.name));
318
- }), Y;
308
+ }), e !== "page" && e !== "cursor" && e !== d && e !== o && e !== u) {
309
+ let k = null, r = (z = a.value.form) == null ? void 0 : z.find((I) => {
310
+ if (typeof I.name == "object") {
311
+ let K = !1;
312
+ return I.name.forEach((N) => {
313
+ N.key === e && (K = !0, k = Ie(I.name));
314
+ }), K;
319
315
  } else
320
- return M.name === e;
321
- }), D = "";
322
- if (i && t.value[e]) {
323
- if (typeof i.name == "object" ? (q = i.name) == null || q.forEach((Y) => {
324
- D && (D += " - "), D += t.value[Y.key];
325
- }) : D = t.value[e], i.props.options && (D = (i.props.multiple ? t.value[e] : [t.value[e]]).map(
326
- (R) => {
316
+ return I.name === e;
317
+ }), A = "";
318
+ if (r && t.value[e]) {
319
+ if (typeof r.name == "object" ? (_ = r.name) == null || _.forEach((K) => {
320
+ A && (A += " - "), A += t.value[K.key];
321
+ }) : A = t.value[e], r.props.options && (A = (r.props.multiple ? t.value[e] : [t.value[e]]).map(
322
+ (N) => {
327
323
  var ye;
328
- return (ye = i.props.options.find(({ value: qe }) => qe === R)) == null ? void 0 : ye.label;
324
+ return (ye = r.props.options.find(({ value: qe }) => qe === N)) == null ? void 0 : ye.label;
329
325
  }
330
- ).join(", ")), i.type === "RangeInput" && Array.isArray(t.value[e]) && (D = t.value[e][0].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + " - " + t.value[e][1].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")), i.type === "DatePicker")
331
- if (((Q = i == null ? void 0 : i.props) == null ? void 0 : Q.type) === "range" && i.name && i.name[1]) {
332
- const Y = le(t.value[i.name[0].key]).format("MM/DD/YYYY"), R = le(t.value[i.name[1].key]).format("MM/DD/YYYY");
333
- D = Y === R ? Y : Y + " - " + R;
334
- } else D = le(t.value[i.name]).format("MM/DD/YYYY");
335
- let M = `${(H = i == null ? void 0 : i.props) == null ? void 0 : H.label} : ${D}`;
336
- i && i.name && typeof i.name == "object" && l.find((R) => R.name === k[0]) && (M = ""), l.push({
337
- label: M,
326
+ ).join(", ")), r.type === "RangeInput" && Array.isArray(t.value[e]) && (A = t.value[e][0].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + " - " + t.value[e][1].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")), r.type === "DatePicker")
327
+ if (((H = r == null ? void 0 : r.props) == null ? void 0 : H.type) === "range" && r.name && r.name[1]) {
328
+ const K = le(t.value[r.name[0].key]).format("MM/DD/YYYY"), N = le(t.value[r.name[1].key]).format("MM/DD/YYYY");
329
+ A = K === N ? K : K + " - " + N;
330
+ } else A = le(t.value[r.name]).format("MM/DD/YYYY");
331
+ let I = `${(G = r == null ? void 0 : r.props) == null ? void 0 : G.label} : ${A}`;
332
+ r && r.name && typeof r.name == "object" && l.find((N) => N.name === k[0]) && (I = ""), l.push({
333
+ label: I,
338
334
  name: e,
339
335
  multiNames: k
340
336
  });
@@ -344,164 +340,162 @@ const ll = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, al = {
344
340
  }
345
341
  return [];
346
342
  }), ue = (l) => {
347
- var e, o, u, r, d, s;
348
- return ((s = (d = (r = (u = t.value) == null ? void 0 : u[(o = (e = a.value) == null ? void 0 : e.columnEdit) == null ? void 0 : o.key]) == null ? void 0 : r.active) == null ? void 0 : d.find((g) => g.key === l)) == null ? void 0 : s.isActive) ?? !0;
343
+ var e, o, u, d, n, s;
344
+ return ((s = (n = (d = (u = t.value) == null ? void 0 : u[(o = (e = a.value) == null ? void 0 : e.columnEdit) == null ? void 0 : o.key]) == null ? void 0 : d.active) == null ? void 0 : n.find((g) => g.key === l)) == null ? void 0 : s.isActive) ?? !0;
349
345
  }, Ne = ({ fixedHeaders: l, activeHeaders: e, isOnMount: o }) => {
350
- var u, r, d, s, g, b, E, w;
351
- if (t.value[(r = (u = a.value) == null ? void 0 : u.columnEdit) == null ? void 0 : r.key] || (t.value[(s = (d = a.value) == null ? void 0 : d.columnEdit) == null ? void 0 : s.key] = {}), t.value[(b = (g = a.value) == null ? void 0 : g.columnEdit) == null ? void 0 : b.key].fixed = l, t.value[(w = (E = a.value) == null ? void 0 : E.columnEdit) == null ? void 0 : w.key].active = e, J.value = [...l, ...e], !o) {
352
- const K = el(l, e);
353
- $e(a.value.columnEdit.localStorageKey, K);
346
+ var u, d, n, s, g, b, C, j;
347
+ if (t.value[(d = (u = a.value) == null ? void 0 : u.columnEdit) == null ? void 0 : d.key] || (t.value[(s = (n = a.value) == null ? void 0 : n.columnEdit) == null ? void 0 : s.key] = {}), t.value[(b = (g = a.value) == null ? void 0 : g.columnEdit) == null ? void 0 : b.key].fixed = l, t.value[(j = (C = a.value) == null ? void 0 : C.columnEdit) == null ? void 0 : j.key].active = e, T.value = [...l, ...e], !o) {
348
+ const R = el(l, e);
349
+ $e(a.value.columnEdit.localStorageKey, R);
354
350
  }
355
- O("columns-changed", e);
356
351
  }, Te = () => {
357
- var l, e, o, u, r, d;
352
+ var l, e, o, u, d, n;
358
353
  if ((e = (l = a.value) == null ? void 0 : l.columnEdit) != null && e.localStorageKey) {
359
354
  const s = se(a.value.columnEdit.localStorageKey);
360
355
  if (s) {
361
356
  const { fixed: g, active: b } = Oe(
362
357
  s,
363
- S.value.headers,
358
+ V.value.headers,
364
359
  a.value.columnEdit.localStorageKey
365
360
  );
366
- t.value[(u = (o = a.value) == null ? void 0 : o.columnEdit) == null ? void 0 : u.key].fixed = g, t.value[(d = (r = a.value) == null ? void 0 : r.columnEdit) == null ? void 0 : d.key].active = b, J.value = [...g, ...b];
361
+ t.value[(u = (o = a.value) == null ? void 0 : o.columnEdit) == null ? void 0 : u.key].fixed = g, t.value[(n = (d = a.value) == null ? void 0 : d.columnEdit) == null ? void 0 : n.key].active = b, T.value = [...g, ...b];
367
362
  }
368
363
  }
369
364
  };
370
365
  return Qe(
371
366
  () => v.filter,
372
367
  (l) => {
373
- var e, o;
374
- l && ((o = (e = a.value) == null ? void 0 : e.tabs) != null && o.key) && l[a.value.tabs.key] && (V.value = l[a.value.tabs.key]);
368
+ l && l[a.value.tabs.key] && ($.value = l[a.value.tabs.key]);
375
369
  }
376
370
  ), Ve(() => {
377
- var e, o, u, r, d;
371
+ var e, o, u, d, n;
378
372
  Te();
379
373
  const l = Ue();
380
- l && (t.value = JSON.parse(l), V.value = V.value || ((e = t.value) == null ? void 0 : e.tabs) || ((r = t.value) == null ? void 0 : r[(u = (o = a.value) == null ? void 0 : o.tabs) == null ? void 0 : u.key]), I.value = ((d = t.value) == null ? void 0 : d.page) || 1, A(null, !0, t.value.cursor));
374
+ l && (t.value = JSON.parse(l), $.value = $.value || ((e = t.value) == null ? void 0 : e.tabs) || ((d = t.value) == null ? void 0 : d[(u = (o = a.value) == null ? void 0 : o.tabs) == null ? void 0 : u.key]), B.value = ((n = t.value) == null ? void 0 : n.page) || 1, O(null, !0, t.value.cursor));
381
375
  }), (l, e) => {
382
- var o, u, r, d;
383
- return n(), $("div", il, [
384
- S.value ? (n(), B(y(ze), {
376
+ var o, u, d, n;
377
+ return i(), w("div", il, [
378
+ V.value ? (i(), U(y(ze), {
385
379
  key: 0,
386
- selected: j.selected,
387
- "row-key": j.rowKey,
380
+ selected: E.selected,
381
+ "row-key": E.rowKey,
388
382
  options: W.value,
389
- "is-loading": j.isLoading,
390
- "loading-rows": C.value,
391
- "row-class": j.rowClass,
392
- "row-link": j.rowLink,
393
- "is-sticky": S.value.isSticky,
394
- "is-borderless": S.value.isBorderless,
383
+ "is-loading": E.isLoading,
384
+ "loading-rows": P.value,
385
+ "row-class": E.rowClass,
386
+ "row-link": E.rowLink,
387
+ "is-sticky": V.value.isSticky,
388
+ "is-borderless": V.value.isBorderless,
395
389
  "onUpdate:selected": e[7] || (e[7] = (s) => l.$emit("update:selected", s)),
396
390
  "onClick:row": e[8] || (e[8] = (s) => l.$emit("click:row", s)),
397
391
  "onHover:cell": e[9] || (e[9] = (s) => l.$emit("hover:cell", s))
398
392
  }, Re({
399
- after: F(() => [
400
- U(l.$slots, "after")
393
+ after: S(() => [
394
+ Y(l.$slots, "after")
401
395
  ]),
402
- empty: F(() => [
403
- U(l.$slots, "empty")
396
+ empty: S(() => [
397
+ Y(l.$slots, "empty")
404
398
  ]),
405
- "table-header": F((s) => [
406
- U(l.$slots, "table-header", ke(he(s)))
399
+ "table-header": S((s) => [
400
+ Y(l.$slots, "table-header", ke(xe(s)))
407
401
  ]),
408
- "table-body": F((s) => [
409
- U(l.$slots, "table-body", ke(he(s)))
402
+ "table-body": S((s) => [
403
+ Y(l.$slots, "table-body", ke(xe(s)))
410
404
  ]),
411
405
  _: 2
412
406
  }, [
413
- l.$slots.before || (o = a.value) != null && o.search || (u = a.value) != null && u.form || (r = a.value) != null && r.tabs ? {
407
+ l.$slots.before || (o = a.value) != null && o.search || (u = a.value) != null && u.form || (d = a.value) != null && d.tabs ? {
414
408
  name: "before",
415
- fn: F(() => {
416
- var s, g, b, E;
409
+ fn: S(() => {
410
+ var s, g, b, C;
417
411
  return [
418
- U(l.$slots, "before"),
419
- (s = a.value) != null && s.search || (g = a.value) != null && g.form || (b = a.value) != null && b.tabs ? (n(), $("div", nl, [
420
- De.value ? (n(), $("div", dl, [
421
- U(l.$slots, "bulk-actions", { selectedRows: j.selected })
422
- ])) : (n(), $("div", vl, [
423
- (E = a.value) != null && E.tabs ? (n(), B(y(_e), {
412
+ Y(l.$slots, "before"),
413
+ (s = a.value) != null && s.search || (g = a.value) != null && g.form || (b = a.value) != null && b.tabs ? (i(), w("div", nl, [
414
+ De.value ? (i(), w("div", dl, [
415
+ Y(l.$slots, "bulk-actions", { selectedRows: E.selected })
416
+ ])) : (i(), w("div", vl, [
417
+ (C = a.value) != null && C.tabs ? (i(), U(y(_e), {
424
418
  key: 0,
425
- modelValue: V.value,
419
+ modelValue: $.value,
426
420
  "onUpdate:modelValue": [
427
- e[0] || (e[0] = (w) => V.value = w),
428
- e[1] || (e[1] = (w) => A(null))
421
+ e[0] || (e[0] = (j) => $.value = j),
422
+ e[1] || (e[1] = (j) => O(null))
429
423
  ],
430
- "is-disabled": j.isLoading,
424
+ "is-disabled": E.isLoading,
431
425
  tabs: a.value.tabs.options,
432
426
  variant: "pills"
433
- }, null, 8, ["modelValue", "is-disabled", "tabs"])) : h("", !0)
427
+ }, null, 8, ["modelValue", "is-disabled", "tabs"])) : x("", !0)
434
428
  ])),
435
- U(l.$slots, "filter-options", {}, () => {
436
- var w, K, T, q, Q, H;
429
+ Y(l.$slots, "filter-options", {}, () => {
430
+ var j, R, z, _, H, G;
437
431
  return [
438
- (w = a.value) != null && w.search || (K = a.value) != null && K.form || (T = a.value) != null && T.columnEdit ? (n(), $("div", {
432
+ (j = a.value) != null && j.search || (R = a.value) != null && R.form || (z = a.value) != null && z.columnEdit ? (i(), w("div", {
439
433
  key: 0,
440
434
  class: te([
441
435
  "flex gap-3 absolute ml-auto bg-oc-bg-light right-4 max-w-[calc(100%-24px)]",
442
436
  a.value ? oe.value ? "md:w-fit w-full" : "" : "w-full justify-end"
443
437
  ])
444
438
  }, [
445
- (q = a.value) != null && q.search ? (n(), B(y(Ge), {
439
+ (_ = a.value) != null && _.search ? (i(), U(y(He), {
446
440
  key: 0,
447
441
  "is-search-only": !a.value.tabs || a.value.isSearchOnly,
448
442
  onAddQuery: Le,
449
443
  onToggle: e[2] || (e[2] = (k) => oe.value = k)
450
- }, null, 8, ["is-search-only"])) : h("", !0),
451
- (Q = a.value) != null && Q.form ? (n(), B(y(Ee), {
444
+ }, null, 8, ["is-search-only"])) : x("", !0),
445
+ (H = a.value) != null && H.form ? (i(), U(y(Ee), {
452
446
  key: 1,
453
- modelValue: x.value,
454
- "onUpdate:modelValue": e[6] || (e[6] = (k) => x.value = k),
447
+ modelValue: h.value,
448
+ "onUpdate:modelValue": e[6] || (e[6] = (k) => h.value = k),
455
449
  distance: 9,
456
450
  placement: "bottom-end",
457
451
  "is-attach-to-body": ""
458
452
  }, {
459
- menu: F(() => [
460
- x.value ? (n(), B(y(He), {
453
+ menu: S(() => [
454
+ h.value ? (i(), U(y(Ge), {
461
455
  key: 0,
462
- id: j.id,
456
+ id: E.id,
463
457
  "json-form": a.value.form ?? [],
464
458
  grid: a.value.grid ?? null,
465
459
  values: v.filter,
466
460
  actions: a.value.actions,
467
- onApplyFilter: e[3] || (e[3] = (k) => A(k)),
468
- onFilterFieldsChanged: e[4] || (e[4] = (k) => O("filter-fields-changed", k)),
469
- onCancel: e[5] || (e[5] = (k) => x.value = !1)
461
+ onApplyFilter: e[3] || (e[3] = (k) => O(k)),
462
+ onFilterFieldsChanged: e[4] || (e[4] = (k) => F("filter-fields-changed", k)),
463
+ onCancel: e[5] || (e[5] = (k) => h.value = !1)
470
464
  }, {
471
- default: F(({ errors: k, values: i, jsonForm: D, updateForm: M }) => [
472
- U(l.$slots, "custom-filter-form", {
465
+ default: S(({ errors: k, values: r, jsonForm: A, updateForm: I }) => [
466
+ Y(l.$slots, "custom-filter-form", {
473
467
  errors: k,
474
- values: i,
475
- jsonForm: D,
476
- updateFilter: M
468
+ values: r,
469
+ jsonForm: A,
470
+ updateFilter: I
477
471
  })
478
472
  ]),
479
473
  _: 3
480
- }, 8, ["id", "json-form", "grid", "values", "actions"])) : h("", !0)
474
+ }, 8, ["id", "json-form", "grid", "values", "actions"])) : x("", !0)
481
475
  ]),
482
- default: F(() => [
483
- N(y(Fe), {
484
- "is-active": x.value,
476
+ default: S(() => [
477
+ M(y(Fe), {
478
+ "is-active": h.value,
485
479
  variant: "secondary",
486
480
  "left-icon": "filter"
487
481
  }, null, 8, ["is-active"])
488
482
  ]),
489
483
  _: 3
490
- }, 8, ["modelValue"])) : h("", !0),
491
- a.value.columnEdit ? (n(), B(rl, {
484
+ }, 8, ["modelValue"])) : x("", !0),
485
+ a.value.columnEdit ? (i(), U(rl, {
492
486
  key: 2,
493
487
  options: t.value.columnEdit,
494
- headers: ((H = S.value) == null ? void 0 : H.headers) || [],
488
+ headers: ((G = V.value) == null ? void 0 : G.headers) || [],
495
489
  "local-key": a.value.columnEdit.localStorageKey,
496
490
  onUpdateOrder: Ne
497
- }, null, 8, ["options", "headers", "local-key"])) : h("", !0)
498
- ], 2)) : h("", !0)
491
+ }, null, 8, ["options", "headers", "local-key"])) : x("", !0)
492
+ ], 2)) : x("", !0)
499
493
  ];
500
494
  })
501
- ])) : h("", !0),
502
- N(y(We), {
495
+ ])) : x("", !0),
496
+ M(y(We), {
503
497
  filters: Me.value,
504
- queries: z.value,
498
+ queries: q.value,
505
499
  class: "border-t border-oc-gray-200",
506
500
  onRemoveQuery: Pe,
507
501
  onRemoveAll: Ce,
@@ -511,50 +505,50 @@ const ll = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, al = {
511
505
  }),
512
506
  key: "0"
513
507
  } : void 0,
514
- ae((d = S.value) == null ? void 0 : d.headers, (s, g) => ({
508
+ ae((n = V.value) == null ? void 0 : n.headers, (s, g) => ({
515
509
  name: s.key,
516
- fn: F(({ data: b, item: E }) => [
517
- U(l.$slots, s.key, {
510
+ fn: S(({ data: b, item: C }) => [
511
+ Y(l.$slots, s.key, {
518
512
  data: b,
519
- item: E
513
+ item: C
520
514
  })
521
515
  ])
522
516
  }))
523
- ]), 1032, ["selected", "row-key", "options", "is-loading", "loading-rows", "row-class", "row-link", "is-sticky", "is-borderless"])) : h("", !0),
524
- U(l.$slots, "before-pagination"),
525
- c.value || f.value ? (n(), $("div", {
517
+ ]), 1032, ["selected", "row-key", "options", "is-loading", "loading-rows", "row-class", "row-link", "is-sticky", "is-borderless"])) : x("", !0),
518
+ Y(l.$slots, "before-pagination"),
519
+ c.value || f.value ? (i(), w("div", {
526
520
  key: 1,
527
521
  class: te(["flex gap-3 items-center", c.value && c.value.last_page === 1 ? "justify-end" : ""])
528
522
  }, [
529
- c.value && !m.value ? (n(), B(y(Xe), {
523
+ c.value && !m.value ? (i(), U(y(Xe), {
530
524
  key: 0,
531
- modelValue: I.value,
525
+ modelValue: B.value,
532
526
  "onUpdate:modelValue": [
533
- e[10] || (e[10] = (s) => I.value = s),
527
+ e[10] || (e[10] = (s) => B.value = s),
534
528
  Ke
535
529
  ],
536
530
  class: "justify-center",
537
531
  "max-page": c.value.last_page,
538
532
  strategy: c.value.strategy,
539
533
  "total-visible": "5"
540
- }, null, 8, ["modelValue", "max-page", "strategy"])) : h("", !0),
541
- f.value ? (n(), $("div", cl, [
542
- N(y(xe), {
534
+ }, null, 8, ["modelValue", "max-page", "strategy"])) : x("", !0),
535
+ f.value ? (i(), w("div", cl, [
536
+ M(y(he), {
543
537
  disabled: !f.value.prev,
544
- onClick: e[11] || (e[11] = (s) => f.value.prev ? A(null, !1, f.value.prev) : null)
538
+ onClick: e[11] || (e[11] = (s) => f.value.prev ? O(null, !1, f.value.prev) : null)
545
539
  }, null, 8, ["disabled"]),
546
- N(y(xe), {
540
+ M(y(he), {
547
541
  disabled: !f.value.next,
548
542
  "is-next": "",
549
- onClick: e[12] || (e[12] = (s) => f.value.next ? A(null, !1, f.value.next) : null)
543
+ onClick: e[12] || (e[12] = (s) => f.value.next ? O(null, !1, f.value.next) : null)
550
544
  }, null, 8, ["disabled"])
551
- ])) : h("", !0),
552
- p.value ? h("", !0) : (n(), $("div", fl, [
553
- N(y(Ze), {
554
- modelValue: C.value,
545
+ ])) : x("", !0),
546
+ p.value ? x("", !0) : (i(), w("div", fl, [
547
+ M(y(Ze), {
548
+ modelValue: P.value,
555
549
  "onUpdate:modelValue": [
556
- e[13] || (e[13] = (s) => C.value = s),
557
- e[14] || (e[14] = (s) => A(null))
550
+ e[13] || (e[13] = (s) => P.value = s),
551
+ e[14] || (e[14] = (s) => O(null))
558
552
  ],
559
553
  label: "Item per page",
560
554
  "is-inline-label": "",
@@ -562,11 +556,11 @@ const ll = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, al = {
562
556
  options: Ae.value
563
557
  }, null, 8, ["modelValue", "options"])
564
558
  ]))
565
- ], 2)) : h("", !0)
559
+ ], 2)) : x("", !0)
566
560
  ]);
567
561
  };
568
562
  }
569
563
  };
570
564
  export {
571
- hl as default
565
+ xl as default
572
566
  };