@orchidui/core 1.21.1-1 → 1.21.1-10

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/NewTable/OcNewTable.js +1 -1
  7. package/dist/DataDisplay/OnboardingListItem/OcOnboardingListItem.js +1 -1
  8. package/dist/DataDisplay/Overview/OcOverview.js +1 -1
  9. package/dist/DataDisplay/Pagination/OcPagination.js +1 -1
  10. package/dist/DataDisplay/Table/OcTable.js +1 -1
  11. package/dist/DataDisplay/TransferSummary/OcTransferSummary.js +1 -1
  12. package/dist/Disclosure/Accordion/OcAccordion.js +1 -1
  13. package/dist/Disclosure/OnboardingAccordion/OnboardingAccordion.js +1 -1
  14. package/dist/Disclosure/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-8yiwZyM-.js → OcAccountSetupProgress-XIbekhtd.js} +1 -1
  60. package/dist/{OcComplexCalendar-CddUFr4S.js → OcComplexCalendar-Bt8mSXtc.js} +1 -1
  61. package/dist/{OcComplexDatePicker-DeReeFic.js → OcComplexDatePicker-D7zpXjdE.js} +1 -1
  62. package/dist/{OcCropper-BUO8Glob.js → OcCropper-BjSNzRL7.js} +1 -1
  63. package/dist/{OcDataTable-BSdWcTnO.js → OcDataTable-HU_9HyCj.js} +159 -159
  64. package/dist/{OcDraggableList-DjmB9Z3T.js → OcDraggableList-BmVGxZV8.js} +1 -1
  65. package/dist/{OcEmojiPicker-CSxcT_RE.js → OcEmojiPicker-BSqUZY7I.js} +1 -1
  66. package/dist/{OcFilterForm-DkEwY-fd.js → OcFilterForm-CDycE6if.js} +1 -1
  67. package/dist/{OcFilterSearch-CXpkvvis.js → OcFilterSearch-CZuzDu6Y.js} +1 -1
  68. package/dist/{OcFilterSearchFor-KeVAUO_J.js → OcFilterSearchFor-Br5fhk5A.js} +1 -1
  69. package/dist/{OcModalCropper-DqkKxvh7.js → OcModalCropper-lCGi4Onl.js} +2 -2
  70. package/dist/{OcTimePicker-BQicJhfh.js → OcTimePicker-OHtUU6b6.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-JRmozM3w.js → SubPlanCard-3qZPN1RA.js} +1 -1
  79. package/dist/{ThumbnailSection-D62ayDND.js → ThumbnailSection--5jwTIXB.js} +1 -1
  80. package/dist/{ThumbnailTheme-CIV2-bCV.js → ThumbnailTheme-CmqBAcYn.js} +1 -1
  81. package/dist/{index-CPyMbjU1.js → index-DOIt49bT.js} +8 -8
  82. package/dist/index.js +1 -1
  83. package/package.json +1 -1
@@ -1,19 +1,19 @@
1
- import { ref as $, onMounted as Te, createBlock as L, openBlock as r, unref as i, withCtx as w, createVNode as j, createElementVNode as N, createElementBlock as h, createCommentVNode as y, mergeProps as Ce, Fragment as re, renderList as de, normalizeClass as ve, toDisplayString as Pe, computed as S, watch as ne, nextTick as nl, renderSlot as A, resolveDynamicComponent as dl, createSlots as vl, normalizeProps as Ae, guardReactiveProps as Le } from "vue";
2
- import { aA as Ke, B as Ie, C as cl, D as ml, L as pl, $ as fl, aL as yl, aM as gl, aN as bl, I as kl, J as je, j as hl } from "./index-CPyMbjU1.js";
3
- import { useDataTable as xl } from "./DataTable/useDataTable.js";
4
- import { VueDraggableNext as Be } from "vue-draggable-next";
5
- import { getFromLocalStorage as qe, formatHeadersFromLocalStorage as Ne, formatHeadersToLocalStorage as wl, setInLocalStorage as Sl } from "./DataTable/utils/editColumnsUtils.js";
6
- import { _ as Ue } from "./OcIcon-CxreweI4.js";
7
- import { formatFilterDisplay as $l, clearAllFilters as Fl } from "./DataTable/utils/filterUtils.js";
8
- import { formatCustomItemsPerPageOptions as Ol, getItemsPerPageOptions as Vl } from "./DataTable/utils/paginationUtils.js";
1
+ import { ref as $, onMounted as Ue, createBlock as L, openBlock as r, unref as i, withCtx as w, createVNode as j, createElementVNode as N, createElementBlock as h, createCommentVNode as y, mergeProps as Ee, Fragment as ie, renderList as ne, normalizeClass as de, toDisplayString as Ce, computed as S, watch as re, nextTick as rl, renderSlot as A, resolveDynamicComponent as nl, createSlots as dl, normalizeProps as Pe, guardReactiveProps as Ae } from "vue";
2
+ import { aA as Te, B as Ke, C as vl, D as cl, L as ml, $ as pl, aL as fl, aM as yl, aN as gl, I as bl, J as Le, j as kl } from "./index-DOIt49bT.js";
3
+ import { useDataTable as hl } from "./DataTable/useDataTable.js";
4
+ import { VueDraggableNext as je } from "vue-draggable-next";
5
+ import { getFromLocalStorage as Ie, formatHeadersFromLocalStorage as qe, formatHeadersToLocalStorage as xl, setInLocalStorage as wl } from "./DataTable/utils/editColumnsUtils.js";
6
+ import { _ as Be } from "./OcIcon-CxreweI4.js";
7
+ import { formatFilterDisplay as Sl, clearAllFilters as $l } from "./DataTable/utils/filterUtils.js";
8
+ import { formatCustomItemsPerPageOptions as Fl, getItemsPerPageOptions as Ol } from "./DataTable/utils/paginationUtils.js";
9
9
  import "dayjs";
10
- const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
10
+ const Vl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, Dl = {
11
11
  key: 0,
12
12
  class: "gap-y-2 flex flex-col border-b pb-3 border-oc-gray-200"
13
- }, Cl = { class: "gap-y-2 flex flex-col" }, Pl = {
13
+ }, El = { class: "gap-y-2 flex flex-col" }, Cl = {
14
14
  key: 0,
15
15
  class: "flex items-center bg-white justify-between h-[26px]"
16
- }, Al = { class: "flex items-center w-full gap-x-3" }, Ll = { class: "truncate w-full max-w-[160px]" }, jl = {
16
+ }, Pl = { class: "flex items-center w-full gap-x-3" }, Al = { class: "truncate w-full max-w-[160px]" }, Ll = {
17
17
  __name: "ColumnEdit",
18
18
  props: {
19
19
  options: {
@@ -30,8 +30,8 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
30
30
  }
31
31
  },
32
32
  emits: ["change-active", "onMoved", "update-order"],
33
- setup(F, { emit: se }) {
34
- const oe = se, u = F, g = $([]), d = $([]), T = $(!1), O = {
33
+ setup(F, { emit: te }) {
34
+ const se = te, u = F, g = $([]), d = $([]), T = $(!1), O = {
35
35
  handle: ".drag-el",
36
36
  filter: ".is-disabled",
37
37
  group: "headers",
@@ -43,42 +43,42 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
43
43
  d.value = d.value.map((o) => ({
44
44
  ...o,
45
45
  isActive: !0
46
- })), oe("update-order", {
46
+ })), se("update-order", {
47
47
  fixedHeaders: d.value,
48
48
  activeHeaders: g.value,
49
49
  isOnMount: E
50
50
  });
51
51
  };
52
- return Te(() => {
53
- const E = qe(u.localKey), { fixed: o, active: v } = Ne(E, u.headers, u.localKey);
52
+ return Ue(() => {
53
+ const E = Ie(u.localKey), { fixed: o, active: v } = qe(E, u.headers, u.localKey);
54
54
  d.value = o || u.headers.slice(0, 1), g.value = v || u.headers.slice(1).map((C) => {
55
- var ee, le, ae;
55
+ var _, ee, le;
56
56
  return {
57
57
  ...C,
58
- isActive: ((ae = (le = (ee = u.options) == null ? void 0 : ee.active) == null ? void 0 : le.find((ue) => ue.key === C.key)) == null ? void 0 : ae.isActive) ?? !0
58
+ isActive: ((le = (ee = (_ = u.options) == null ? void 0 : _.active) == null ? void 0 : ee.find((oe) => oe.key === C.key)) == null ? void 0 : le.isActive) ?? !0
59
59
  };
60
60
  }), K(!0);
61
- }), (E, o) => (r(), L(i(Ke), {
61
+ }), (E, o) => (r(), L(i(Te), {
62
62
  modelValue: T.value,
63
63
  "onUpdate:modelValue": o[3] || (o[3] = (v) => T.value = v),
64
64
  "is-attach-to-body": ""
65
65
  }, {
66
66
  menu: w(() => [
67
- N("div", Dl, [
68
- d.value.length ? (r(), h("div", El, [
67
+ N("div", Vl, [
68
+ d.value.length ? (r(), h("div", Dl, [
69
69
  o[4] || (o[4] = N("span", { class: "text-oc-text-400 font-medium" }, "Fixed columns", -1)),
70
- j(i(Be), Ce({
70
+ j(i(je), Ee({
71
71
  key: "key",
72
72
  modelValue: d.value,
73
73
  "onUpdate:modelValue": o[0] || (o[0] = (v) => d.value = v)
74
74
  }, O), {
75
75
  default: w(() => [
76
- (r(!0), h(re, null, de(d.value, (v, C) => (r(), h("div", {
76
+ (r(!0), h(ie, null, ne(d.value, (v, C) => (r(), h("div", {
77
77
  key: v.key,
78
- class: ve(["flex items-center justify-between h-[26px]", C ? "" : "is-disabled"])
78
+ class: de(["flex items-center justify-between h-[26px]", C ? "" : "is-disabled"])
79
79
  }, [
80
- N("span", null, Pe(v.label), 1),
81
- C ? (r(), L(i(Ue), {
80
+ N("span", null, Ce(v.label), 1),
81
+ C ? (r(), L(i(Be), {
82
82
  key: 0,
83
83
  width: "18",
84
84
  height: "18",
@@ -90,20 +90,20 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
90
90
  _: 1
91
91
  }, 16, ["modelValue"])
92
92
  ])) : y("", !0),
93
- N("div", Cl, [
93
+ N("div", El, [
94
94
  o[5] || (o[5] = N("span", { class: "text-oc-text-400 font-medium" }, "Active columns", -1)),
95
- j(i(Be), Ce({
95
+ j(i(je), Ee({
96
96
  key: "key",
97
97
  modelValue: g.value,
98
98
  "onUpdate:modelValue": o[2] || (o[2] = (v) => g.value = v)
99
99
  }, O, { "data-active-headers": "true" }), {
100
100
  default: w(() => [
101
- (r(!0), h(re, null, de(g.value, (v) => (r(), h(re, {
101
+ (r(!0), h(ie, null, ne(g.value, (v) => (r(), h(ie, {
102
102
  key: v.key
103
103
  }, [
104
- v.key !== "actions" ? (r(), h("div", Pl, [
105
- N("div", Al, [
106
- j(i(cl), {
104
+ v.key !== "actions" ? (r(), h("div", Cl, [
105
+ N("div", Pl, [
106
+ j(i(vl), {
107
107
  modelValue: v.isActive,
108
108
  "onUpdate:modelValue": [
109
109
  (C) => v.isActive = C,
@@ -111,9 +111,9 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
111
111
  ],
112
112
  class: "!w-fit"
113
113
  }, null, 8, ["modelValue", "onUpdate:modelValue"]),
114
- N("div", Ll, Pe(v.label), 1)
114
+ N("div", Al, Ce(v.label), 1)
115
115
  ]),
116
- g.value.length > 1 ? (r(), L(i(Ue), {
116
+ g.value.length > 1 ? (r(), L(i(Be), {
117
117
  key: 0,
118
118
  width: "18",
119
119
  height: "18",
@@ -129,7 +129,7 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
129
129
  ])
130
130
  ]),
131
131
  default: w(() => [
132
- j(i(Ie), {
132
+ j(i(Ke), {
133
133
  label: "Edit Column",
134
134
  "left-icon": "setting",
135
135
  size: "small",
@@ -140,22 +140,22 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
140
140
  _: 1
141
141
  }, 8, ["modelValue"]));
142
142
  }
143
- }, Bl = { class: "relative flex flex-col gap-9" }, Ul = {
143
+ }, jl = { class: "relative flex flex-col gap-9" }, Bl = {
144
144
  key: 0,
145
145
  class: "flex items-center px-4 min-h-[44px]"
146
- }, Tl = {
146
+ }, Ul = {
147
147
  key: 0,
148
148
  class: "absolute flex items-center gap-5 left-5"
149
- }, Kl = {
149
+ }, Tl = {
150
150
  key: 1,
151
151
  class: "absolute flex gap-3 left-5"
152
- }, Il = {
152
+ }, Kl = {
153
153
  key: 1,
154
154
  class: "flex justify-center w-full gap-5 md:justify-start"
155
- }, ql = {
155
+ }, Il = {
156
156
  key: 2,
157
157
  class: "items-center hidden md:flex"
158
- }, Yl = {
158
+ }, Xl = {
159
159
  __name: "OcDataTable",
160
160
  props: {
161
161
  isLoading: Boolean,
@@ -207,9 +207,9 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
207
207
  "on-table-ready": [],
208
208
  "update:sort-by": []
209
209
  },
210
- setup(F, { expose: se, emit: oe }) {
211
- var ye, ge, be, ke, he, xe, we, Se, $e, Fe, Oe, Ve, De, Ee;
212
- const u = F, g = oe, d = S(() => {
210
+ setup(F, { expose: te, emit: se }) {
211
+ var fe, ye, ge, be, ke, he, xe, we, Se, $e, Fe, Oe, Ve, De;
212
+ const u = F, g = se, d = S(() => {
213
213
  var e;
214
214
  return (e = u.options) == null ? void 0 : e.cursor;
215
215
  }), T = $(), O = S(() => {
@@ -221,22 +221,22 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
221
221
  isLoading: v,
222
222
  // Methods
223
223
  bulkPutLocalData: C,
224
- bulkDeleteLocalData: ee,
225
- getLocalDataUpdatedAt: le,
226
- getProductIdAndLastUpdatedAt: ae,
227
- syncLocalData: ue,
224
+ bulkDeleteLocalData: _,
225
+ getLocalDataUpdatedAt: ee,
226
+ getProductIdAndLastUpdatedAt: le,
227
+ syncLocalData: oe,
228
228
  sortByData: R,
229
229
  // Setters
230
- setFilter: Qe,
231
- setSortBy: ze
232
- } = xl({
233
- name: ((ye = u.localDb) == null ? void 0 : ye.table_name) ?? null,
234
- db: ((ge = u.localDb) == null ? void 0 : ge.db) ?? null,
235
- filterableFields: (be = u.options) == null ? void 0 : be.filterableFields,
236
- sortableFields: (ke = u.options) == null ? void 0 : ke.sortableFields,
237
- searchableFields: (he = u.options) == null ? void 0 : he.searchableFields
230
+ setFilter: Ne,
231
+ setSortBy: Qe
232
+ } = hl({
233
+ name: ((fe = u.localDb) == null ? void 0 : fe.table_name) ?? null,
234
+ db: ((ye = u.localDb) == null ? void 0 : ye.db) ?? null,
235
+ filterableFields: (ge = u.options) == null ? void 0 : ge.filterableFields,
236
+ sortableFields: (be = u.options) == null ? void 0 : be.sortableFields,
237
+ searchableFields: (ke = u.options) == null ? void 0 : ke.searchableFields
238
238
  });
239
- ne(
239
+ re(
240
240
  () => {
241
241
  var e;
242
242
  return (e = u.options) == null ? void 0 : e.pagination;
@@ -246,57 +246,57 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
246
246
  },
247
247
  { deep: !0, immediate: !0 }
248
248
  );
249
- const ce = S(() => {
249
+ const ve = S(() => {
250
250
  var l, c;
251
251
  const e = {
252
252
  ...O.value,
253
253
  headers: T.value ? T.value.map((n) => {
254
254
  var f, m;
255
255
  return n.class = ((m = (f = O.value) == null ? void 0 : f.headers.find((s) => s.key === n.key)) == null ? void 0 : m.class) ?? "", n;
256
- }).filter((n) => n.isActive) : (l = O.value) == null ? void 0 : l.headers.filter((n) => He(n.key))
256
+ }).filter((n) => n.isActive) : (l = O.value) == null ? void 0 : l.headers.filter((n) => Ze(n.key))
257
257
  };
258
258
  return (c = e.fields) != null && c.length || (e.fields = E.value), e;
259
259
  }), a = S(() => {
260
260
  var e;
261
261
  return (e = u.options) == null ? void 0 : e.filterOptions;
262
- }), Re = S(() => {
262
+ }), ze = S(() => {
263
263
  var e;
264
264
  return (e = u.options) == null ? void 0 : e.hidePerPageDropdown;
265
- }), Me = S(() => {
265
+ }), Re = S(() => {
266
266
  var e;
267
267
  return ((e = o.value) == null ? void 0 : e.last_page) === 1;
268
- }), M = { ...u.filter };
269
- !M && o.value ? M.page = 1 : !M && d && (M.cursor = "");
270
- const t = $(M), Q = $(!1), B = $(t.value[(we = (xe = a.value) == null ? void 0 : xe.tabs) == null ? void 0 : we.key]), J = $(t.value.page), z = $(
271
- ($e = (Se = a.value) == null ? void 0 : Se.per_page) != null && $e.key ? t.value[(Oe = (Fe = a.value) == null ? void 0 : Fe.per_page) == null ? void 0 : Oe.key] : t.value.per_page
272
- ), me = ((Ee = t.value[t.value.selectedSearchOption || ((De = (Ve = a.value) == null ? void 0 : Ve.search) == null ? void 0 : De.key)]) == null ? void 0 : Ee.trim()) ?? "", U = $(me ? me.split(",") : []), pe = $(!1), Je = S(
268
+ }), t = $({
269
+ page: 1
270
+ }), Q = $(!1), B = $(t.value[(xe = (he = a.value) == null ? void 0 : he.tabs) == null ? void 0 : xe.key]), M = $(t.value.page), z = $(
271
+ (Se = (we = a.value) == null ? void 0 : we.per_page) != null && Se.key ? t.value[(Fe = ($e = a.value) == null ? void 0 : $e.per_page) == null ? void 0 : Fe.key] : t.value.per_page
272
+ ), ce = ((De = t.value[t.value.selectedSearchOption || ((Ve = (Oe = a.value) == null ? void 0 : Oe.search) == null ? void 0 : Ve.key)]) == null ? void 0 : De.trim()) ?? "", U = $(ce ? ce.split(",") : []), me = $(!1), Me = S(
273
273
  () => {
274
274
  var e;
275
- return Ol((e = u.options) == null ? void 0 : e.perPageOptions);
275
+ return Fl((e = u.options) == null ? void 0 : e.perPageOptions);
276
276
  }
277
- ), Ge = S(() => Vl(Je.value, o.value)), We = S(() => {
277
+ ), Je = S(() => Ol(Me.value, o.value)), Ge = S(() => {
278
278
  var e;
279
279
  return ((e = u.selected) == null ? void 0 : e.length) > 0;
280
- }), Xe = (e) => {
280
+ }), We = (e) => {
281
281
  !e.trim() || !t.value.selectedSearchOption && U.value.includes(e) || (U.value = [e], V(), g("search-query-changed", e));
282
- }, Ye = (e) => {
282
+ }, Xe = (e) => {
283
283
  U.value = U.value.filter((l) => l !== e), V();
284
- }, Ze = S(() => $l(t.value, a.value)), He = (e) => {
284
+ }, Ye = S(() => Sl(t.value, a.value)), Ze = (e) => {
285
285
  var l, c, n, f, m, s;
286
286
  return ((s = (m = (f = (n = t.value) == null ? void 0 : n[(c = (l = a.value) == null ? void 0 : l.columnEdit) == null ? void 0 : c.key]) == null ? void 0 : f.active) == null ? void 0 : m.find((b) => b.key === e)) == null ? void 0 : s.isActive) ?? !0;
287
- }, _e = ({ fixedHeaders: e, activeHeaders: l, isOnMount: c }) => {
287
+ }, He = ({ fixedHeaders: e, activeHeaders: l, isOnMount: c }) => {
288
288
  var n, f, m, s, b, x, P, D;
289
289
  if (t.value[(f = (n = a.value) == null ? void 0 : n.columnEdit) == null ? void 0 : f.key] || (t.value[(s = (m = a.value) == null ? void 0 : m.columnEdit) == null ? void 0 : s.key] = {}), t.value[(x = (b = a.value) == null ? void 0 : b.columnEdit) == null ? void 0 : x.key].fixed = e, t.value[(D = (P = a.value) == null ? void 0 : P.columnEdit) == null ? void 0 : D.key].active = l, T.value = [...e, ...l], !c) {
290
- const I = wl(e, l);
291
- Sl(a.value.columnEdit.localStorageKey, I);
290
+ const I = xl(e, l);
291
+ wl(a.value.columnEdit.localStorageKey, I);
292
292
  }
293
293
  g("columns-changed", l);
294
- }, el = () => {
294
+ }, _e = () => {
295
295
  var e, l, c, n, f, m;
296
296
  if ((l = (e = a.value) == null ? void 0 : e.columnEdit) != null && l.localStorageKey) {
297
- const s = qe(a.value.columnEdit.localStorageKey);
297
+ const s = Ie(a.value.columnEdit.localStorageKey);
298
298
  if (s) {
299
- const { fixed: b, active: x } = Ne(
299
+ const { fixed: b, active: x } = qe(
300
300
  s,
301
301
  O.value.headers,
302
302
  a.value.columnEdit.localStorageKey
@@ -304,87 +304,87 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
304
304
  t.value[(n = (c = a.value) == null ? void 0 : c.columnEdit) == null ? void 0 : n.key].fixed = b, t.value[(m = (f = a.value) == null ? void 0 : f.columnEdit) == null ? void 0 : m.key].active = x, T.value = [...b, ...x];
305
305
  }
306
306
  }
307
- }, ll = (e) => {
307
+ }, el = (e) => {
308
308
  t.value.selectedSearchOption = e;
309
- }, al = () => {
310
- U.value = [], B.value = "", t.value = Fl(
309
+ }, ll = () => {
310
+ U.value = [], B.value = "", t.value = $l(
311
311
  t.value,
312
312
  a.value,
313
313
  z.value,
314
314
  B.value
315
315
  ), V();
316
- }, tl = () => {
317
- V(null, J.value);
316
+ }, al = () => {
317
+ V(null, M.value);
318
318
  }, V = (e = null, l = !1, c = "", n = !1, f = !1) => {
319
- var s, b, x, P, D, I, G, W, X, Y, Z, H, _;
320
- o.value && !l && (J.value = 1), o.value ? t.value.page = J.value : t.value.cursor = c, (s = a.value) != null && s.per_page ? t.value[a.value.per_page.key] = z.value : t.value.per_page = z.value, (b = a.value) != null && b.tabs && f && (t.value[a.value.tabs.key] = B.value), (x = a.value) != null && x.search && ((D = (P = a.value.search) == null ? void 0 : P.options) != null && D.length ? (Object.keys(t.value).forEach((k) => {
319
+ var s, b, x, P, D, I, J, G, W, X, Y, Z, H;
320
+ o.value && !l && (M.value = 1), o.value ? t.value.page = M.value : t.value.cursor = c, (s = a.value) != null && s.per_page ? t.value[a.value.per_page.key] = z.value : t.value.per_page = z.value, (b = a.value) != null && b.tabs && f && (t.value[a.value.tabs.key] = B.value), (x = a.value) != null && x.search && ((D = (P = a.value.search) == null ? void 0 : P.options) != null && D.length ? (Object.keys(t.value).forEach((k) => {
321
321
  var q;
322
322
  (q = a.value.search.options) != null && q.map((p) => p.value).includes(k) && delete t.value[k];
323
- }), t.value[((I = t.value) == null ? void 0 : I.selectedSearchOption) || ((X = (W = (G = a.value.search) == null ? void 0 : G.options) == null ? void 0 : W[0]) == null ? void 0 : X.value) || a.value.search.key] = U.value.join()) : t.value[a.value.search.key] = U.value.join()), e && (Q.value = !1, t.value = { ...t.value, ...e }, Object.keys(t.value).forEach((k) => {
323
+ }), t.value[((I = t.value) == null ? void 0 : I.selectedSearchOption) || ((W = (G = (J = a.value.search) == null ? void 0 : J.options) == null ? void 0 : G[0]) == null ? void 0 : W.value) || a.value.search.key] = U.value.join()) : t.value[a.value.search.key] = U.value.join()), e && (Q.value = !1, t.value = { ...t.value, ...e }, Object.keys(t.value).forEach((k) => {
324
324
  Array.isArray(t.value[k]) && t.value[k].length === 0 && delete t.value[k];
325
325
  }));
326
- let m = (Z = (Y = a.value) == null ? void 0 : Y.tabs) == null ? void 0 : Z.key;
326
+ let m = (Y = (X = a.value) == null ? void 0 : X.tabs) == null ? void 0 : Y.key;
327
327
  if (m && B.value !== t.value[m]) {
328
- const k = (_ = (H = a.value.tabs) == null ? void 0 : H.options) == null ? void 0 : _.find(
328
+ const k = (H = (Z = a.value.tabs) == null ? void 0 : Z.options) == null ? void 0 : H.find(
329
329
  (q) => {
330
- var p, te;
331
- return ((p = q.value) == null ? void 0 : p.toString()) === ((te = t.value[m]) == null ? void 0 : te.toString());
330
+ var p, ae;
331
+ return ((p = q.value) == null ? void 0 : p.toString()) === ((ae = t.value[m]) == null ? void 0 : ae.toString());
332
332
  }
333
333
  );
334
- if (k != null && k.value)
335
- return B.value = k.value, V(), !1;
334
+ k != null && k.value && (B.value = k.value, V());
336
335
  }
337
- sl(n);
338
- }, fe = $(null), sl = (e = !1) => {
339
- clearTimeout(fe.value), fe.value = setTimeout(() => {
336
+ tl(n);
337
+ }, pe = $(null), tl = (e = !1) => {
338
+ clearTimeout(pe.value), pe.value = setTimeout(() => {
340
339
  g("update:filter", { ...t.value }, e);
341
340
  }, 500);
342
- }, ol = (e, l) => {
341
+ }, sl = (e, l) => {
343
342
  (l === a.value.tabs.key || l === "tabs") && (B.value = ""), V(e), g("filter-removed", l);
344
343
  };
345
- Te(() => {
346
- el(), nl(() => {
344
+ Ue(() => {
345
+ const e = { ...u.filter };
346
+ !e && o.value ? e.page = 1 : !e && d && (e.cursor = ""), t.value = e, _e(), rl(() => {
347
347
  g("on-table-ready");
348
348
  });
349
349
  });
350
- const ie = S(() => u.isLoading || v.value);
351
- se({
350
+ const ue = S(() => u.isLoading || v.value);
351
+ te({
352
352
  localData: E,
353
353
  paginationData: o,
354
- tableIsLoading: ie,
354
+ tableIsLoading: ue,
355
355
  bulkPutLocalData: C,
356
- bulkDeleteLocalData: ee,
357
- getLocalDataUpdatedAt: le,
358
- getProductIdAndLastUpdatedAt: ae,
359
- syncLocalData: ue,
356
+ bulkDeleteLocalData: _,
357
+ getLocalDataUpdatedAt: ee,
358
+ getProductIdAndLastUpdatedAt: le,
359
+ syncLocalData: oe,
360
360
  sortByData: R
361
361
  });
362
- const ul = ({ key: e, value: l }) => {
362
+ const ol = ({ key: e, value: l }) => {
363
363
  Object.keys(R.value).forEach((c) => {
364
364
  c !== e && (R.value[c] = null);
365
365
  }), R.value[e] = l, g("update:sort-by", R.value);
366
366
  };
367
- return ne(
367
+ return re(
368
368
  () => t.value,
369
369
  () => {
370
- K.value && t.value && Qe({ ...t.value });
370
+ K.value && t.value && Ne({ ...t.value });
371
371
  },
372
372
  { deep: !0, immediate: !0 }
373
- ), ne(
373
+ ), re(
374
374
  () => u.sortBy,
375
375
  () => {
376
- K.value && u.sortBy && ze({ ...u.sortBy });
376
+ K.value && u.sortBy && Qe({ ...u.sortBy });
377
377
  },
378
378
  { deep: !0, immediate: !0 }
379
379
  ), (e, l) => {
380
380
  var c, n, f, m;
381
- return r(), h("div", Bl, [
382
- ce.value ? (r(), L(dl(F.isNewTable ? i(ml) : i(pl)), {
381
+ return r(), h("div", jl, [
382
+ ve.value ? (r(), L(nl(F.isNewTable ? i(cl) : i(ml)), {
383
383
  key: 0,
384
384
  selected: F.selected,
385
385
  "row-key": F.rowKey,
386
- options: ce.value,
387
- "is-loading": ie.value,
386
+ options: ve.value,
387
+ "is-loading": ue.value,
388
388
  "loading-rows": z.value,
389
389
  "row-class": F.rowClass,
390
390
  "row-link": F.rowLink,
@@ -392,10 +392,10 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
392
392
  "is-borderless": O.value.isBorderless,
393
393
  "sort-by": F.sortBy,
394
394
  "onUpdate:selected": l[8] || (l[8] = (s) => e.$emit("update:selected", s)),
395
- "onUpdate:sortBy": ul,
395
+ "onUpdate:sortBy": ol,
396
396
  "onClick:row": l[9] || (l[9] = (s) => e.$emit("click:row", s)),
397
397
  "onHover:cell": l[10] || (l[10] = (s) => e.$emit("hover:cell", s))
398
- }, vl({
398
+ }, dl({
399
399
  after: w(() => [
400
400
  A(e.$slots, "after")
401
401
  ]),
@@ -403,10 +403,10 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
403
403
  A(e.$slots, "empty")
404
404
  ]),
405
405
  "table-header": w((s) => [
406
- A(e.$slots, "table-header", Ae(Le(s)))
406
+ A(e.$slots, "table-header", Pe(Ae(s)))
407
407
  ]),
408
408
  "table-body": w((s) => [
409
- A(e.$slots, "table-body", Ae(Le(s)))
409
+ A(e.$slots, "table-body", Pe(Ae(s)))
410
410
  ]),
411
411
  _: 2
412
412
  }, [
@@ -416,42 +416,42 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
416
416
  var s, b, x, P;
417
417
  return [
418
418
  A(e.$slots, "before"),
419
- (s = a.value) != null && s.search || (b = a.value) != null && b.form || (x = a.value) != null && x.tabs ? (r(), h("div", Ul, [
420
- We.value ? (r(), h("div", Tl, [
419
+ (s = a.value) != null && s.search || (b = a.value) != null && b.form || (x = a.value) != null && x.tabs ? (r(), h("div", Bl, [
420
+ Ge.value ? (r(), h("div", Ul, [
421
421
  A(e.$slots, "bulk-actions", { selectedRows: F.selected })
422
- ])) : (r(), h("div", Kl, [
423
- (P = a.value) != null && P.tabs ? (r(), L(i(fl), {
422
+ ])) : (r(), h("div", Tl, [
423
+ (P = a.value) != null && P.tabs ? (r(), L(i(pl), {
424
424
  key: 0,
425
425
  modelValue: B.value,
426
426
  "onUpdate:modelValue": [
427
427
  l[0] || (l[0] = (D) => B.value = D),
428
428
  l[1] || (l[1] = (D) => V(null, !1, "", !1, !0))
429
429
  ],
430
- "is-disabled": ie.value,
430
+ "is-disabled": ue.value,
431
431
  tabs: a.value.tabs.options,
432
432
  variant: "pills"
433
433
  }, null, 8, ["modelValue", "is-disabled", "tabs"])) : y("", !0)
434
434
  ])),
435
435
  A(e.$slots, "filter-options", {}, () => {
436
- var D, I, G, W, X, Y, Z, H, _, k, q;
436
+ var D, I, J, G, W, X, Y, Z, H, k, q;
437
437
  return [
438
- (D = a.value) != null && D.search || (I = a.value) != null && I.form || (G = a.value) != null && G.columnEdit ? (r(), h("div", {
438
+ (D = a.value) != null && D.search || (I = a.value) != null && I.form || (J = a.value) != null && J.columnEdit ? (r(), h("div", {
439
439
  key: 0,
440
- class: ve([
440
+ class: de([
441
441
  "flex gap-3 absolute ml-auto items-center bg-oc-bg-light right-4 max-w-[calc(100%-24px)]",
442
- a.value ? pe.value ? "md:w-fit w-full" : "" : "w-full justify-end"
442
+ a.value ? me.value ? "md:w-fit w-full" : "" : "w-full justify-end"
443
443
  ])
444
444
  }, [
445
- (W = a.value) != null && W.search ? (r(), L(i(yl), {
445
+ (G = a.value) != null && G.search ? (r(), L(i(fl), {
446
446
  key: 0,
447
447
  "is-search-only": !a.value.tabs || a.value.isSearchOnly,
448
- "search-options": ((X = a.value.search) == null ? void 0 : X.options) ?? [],
449
- "selected-option": (((Y = t.value) == null ? void 0 : Y.selectedSearchOption) || ((_ = (H = (Z = a.value.search) == null ? void 0 : Z.options) == null ? void 0 : H[0]) == null ? void 0 : _.value)) ?? "keywords",
450
- onAddQuery: Xe,
451
- onToggle: l[2] || (l[2] = (p) => pe.value = p),
452
- onChangeSearchKey: ll
448
+ "search-options": ((W = a.value.search) == null ? void 0 : W.options) ?? [],
449
+ "selected-option": (((X = t.value) == null ? void 0 : X.selectedSearchOption) || ((H = (Z = (Y = a.value.search) == null ? void 0 : Y.options) == null ? void 0 : Z[0]) == null ? void 0 : H.value)) ?? "keywords",
450
+ onAddQuery: We,
451
+ onToggle: l[2] || (l[2] = (p) => me.value = p),
452
+ onChangeSearchKey: el
453
453
  }, null, 8, ["is-search-only", "search-options", "selected-option"])) : y("", !0),
454
- (k = a.value) != null && k.form ? (r(), L(i(Ke), {
454
+ (k = a.value) != null && k.form ? (r(), L(i(Te), {
455
455
  key: 1,
456
456
  modelValue: Q.value,
457
457
  "onUpdate:modelValue": [
@@ -463,7 +463,7 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
463
463
  "is-attach-to-body": ""
464
464
  }, {
465
465
  menu: w(() => [
466
- Q.value ? (r(), L(i(gl), {
466
+ Q.value ? (r(), L(i(yl), {
467
467
  key: 0,
468
468
  id: F.id,
469
469
  "json-form": a.value.form ?? [],
@@ -474,19 +474,19 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
474
474
  onFilterFieldsChanged: l[4] || (l[4] = (p) => g("filter-fields-changed", p)),
475
475
  onCancel: l[5] || (l[5] = (p) => Q.value = !1)
476
476
  }, {
477
- default: w(({ errors: p, values: te, jsonForm: il, updateForm: rl }) => [
477
+ default: w(({ errors: p, values: ae, jsonForm: ul, updateForm: il }) => [
478
478
  A(e.$slots, "custom-filter-form", {
479
479
  errors: p,
480
- values: te,
481
- jsonForm: il,
482
- updateFilter: rl
480
+ values: ae,
481
+ jsonForm: ul,
482
+ updateFilter: il
483
483
  })
484
484
  ]),
485
485
  _: 3
486
486
  }, 8, ["id", "json-form", "grid", "values", "actions"])) : y("", !0)
487
487
  ]),
488
488
  default: w(() => [
489
- j(i(Ie), {
489
+ j(i(Ke), {
490
490
  "is-active": Q.value,
491
491
  variant: "secondary",
492
492
  "left-icon": "filter",
@@ -497,30 +497,30 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
497
497
  ]),
498
498
  _: 3
499
499
  }, 8, ["modelValue"])) : y("", !0),
500
- a.value.columnEdit ? (r(), L(jl, {
500
+ a.value.columnEdit ? (r(), L(Ll, {
501
501
  key: 2,
502
502
  options: t.value.columnEdit,
503
503
  headers: ((q = O.value) == null ? void 0 : q.headers) || [],
504
504
  "local-key": a.value.columnEdit.localStorageKey,
505
- onUpdateOrder: _e
505
+ onUpdateOrder: He
506
506
  }, null, 8, ["options", "headers", "local-key"])) : y("", !0)
507
507
  ], 2)) : y("", !0)
508
508
  ];
509
509
  })
510
510
  ])) : y("", !0),
511
- j(i(bl), {
512
- filters: Ze.value,
511
+ j(i(gl), {
512
+ filters: Ye.value,
513
513
  queries: U.value,
514
514
  class: "border-t border-oc-gray-200",
515
- onRemoveQuery: Ye,
516
- onRemoveAll: al,
517
- onRemoveFilter: ol
515
+ onRemoveQuery: Xe,
516
+ onRemoveAll: ll,
517
+ onRemoveFilter: sl
518
518
  }, null, 8, ["filters", "queries"])
519
519
  ];
520
520
  }),
521
521
  key: "0"
522
522
  } : void 0,
523
- de((m = O.value) == null ? void 0 : m.headers, (s, b) => ({
523
+ ne((m = O.value) == null ? void 0 : m.headers, (s, b) => ({
524
524
  name: s.key,
525
525
  fn: w(({ data: x, item: P }) => [
526
526
  A(e.$slots, s.key, {
@@ -533,33 +533,33 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
533
533
  A(e.$slots, "before-pagination"),
534
534
  i(o) || d.value ? (r(), h("div", {
535
535
  key: 1,
536
- class: ve(["flex items-center gap-3", i(o) && i(o).last_page === 1 ? "justify-end" : ""])
536
+ class: de(["flex items-center gap-3", i(o) && i(o).last_page === 1 ? "justify-end" : ""])
537
537
  }, [
538
- i(o) && !Me.value ? (r(), L(i(kl), {
538
+ i(o) && !Re.value ? (r(), L(i(bl), {
539
539
  key: 0,
540
- modelValue: J.value,
540
+ modelValue: M.value,
541
541
  "onUpdate:modelValue": [
542
- l[11] || (l[11] = (s) => J.value = s),
543
- tl
542
+ l[11] || (l[11] = (s) => M.value = s),
543
+ al
544
544
  ],
545
545
  class: "justify-center text-[13px]",
546
546
  "max-page": i(o).last_page,
547
547
  strategy: i(o).strategy,
548
548
  "total-visible": "5"
549
549
  }, null, 8, ["modelValue", "max-page", "strategy"])) : y("", !0),
550
- d.value ? (r(), h("div", Il, [
551
- j(i(je), {
550
+ d.value ? (r(), h("div", Kl, [
551
+ j(i(Le), {
552
552
  disabled: !d.value.prev,
553
553
  onClick: l[12] || (l[12] = (s) => d.value.prev ? V(null, !1, d.value.prev) : null)
554
554
  }, null, 8, ["disabled"]),
555
- j(i(je), {
555
+ j(i(Le), {
556
556
  disabled: !d.value.next,
557
557
  "is-next": "",
558
558
  onClick: l[13] || (l[13] = (s) => d.value.next ? V(null, !1, d.value.next) : null)
559
559
  }, null, 8, ["disabled"])
560
560
  ])) : y("", !0),
561
- Re.value ? y("", !0) : (r(), h("div", ql, [
562
- j(i(hl), {
561
+ ze.value ? y("", !0) : (r(), h("div", Il, [
562
+ j(i(kl), {
563
563
  modelValue: z.value,
564
564
  "onUpdate:modelValue": [
565
565
  l[14] || (l[14] = (s) => z.value = s),
@@ -568,7 +568,7 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
568
568
  label: "Item per page",
569
569
  "is-inline-label": "",
570
570
  "popper-options": { placement: "auto" },
571
- options: Ge.value,
571
+ options: Je.value,
572
572
  "select-text-class": "!text-[13px]"
573
573
  }, null, 8, ["modelValue", "options"])
574
574
  ]))
@@ -578,5 +578,5 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
578
578
  }
579
579
  };
580
580
  export {
581
- Yl as default
581
+ Xl as default
582
582
  };