@orchidui/core 1.21.1-16 → 1.21.1-18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/dist/DataDisplay/CustomerCard/OcCustomerCard.js +1 -1
  2. package/dist/DataDisplay/FloatContent/OcFloatContent.js +1 -1
  3. package/dist/DataDisplay/InfoCard/OcInfoCard.js +1 -1
  4. package/dist/DataDisplay/ListDetail/OcListDetail.js +1 -1
  5. package/dist/DataDisplay/ListItem/OcListItem.js +1 -1
  6. package/dist/DataDisplay/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-BY6NIJiI.js → OcAccountSetupProgress-DPW3WzMx.js} +1 -1
  60. package/dist/{OcComplexCalendar-Dh5a8aPn.js → OcComplexCalendar-B_NOGCdu.js} +1 -1
  61. package/dist/{OcComplexDatePicker-tPnat-9M.js → OcComplexDatePicker-6bFucWVd.js} +1 -1
  62. package/dist/{OcCropper-CJH8Ll8y.js → OcCropper-DF4Ig9lc.js} +1 -1
  63. package/dist/OcDataTable-Dskcff1R.js +585 -0
  64. package/dist/{OcDraggableList-eH1QzGud.js → OcDraggableList-DamXY5L9.js} +1 -1
  65. package/dist/{OcEmojiPicker-D5dqL0-B.js → OcEmojiPicker-CeXqGPa8.js} +1 -1
  66. package/dist/{OcFilterForm-D970V9NE.js → OcFilterForm-DfbP9FSc.js} +1 -1
  67. package/dist/{OcFilterSearch-FzV8tR2x.js → OcFilterSearch-C7fSagcx.js} +1 -1
  68. package/dist/{OcFilterSearchFor-CQhdSzI0.js → OcFilterSearchFor-ChXphb15.js} +1 -1
  69. package/dist/{OcModalCropper-CrsceUn_.js → OcModalCropper-BSKNNeGR.js} +2 -2
  70. package/dist/{OcTimePicker-B9hlhZ0B.js → OcTimePicker-_EabmAwr.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-C9sv4Ir2.js → SubPlanCard-BOynReDA.js} +1 -1
  79. package/dist/{ThumbnailSection-C63s_QWD.js → ThumbnailSection-Dhyk0Ojd.js} +1 -1
  80. package/dist/{ThumbnailTheme-DTQVnLIE.js → ThumbnailTheme-BDO_3w75.js} +1 -1
  81. package/dist/{index-CwAseLMJ.js → index-Dj4H9HZ7.js} +8 -8
  82. package/dist/index.js +1 -1
  83. package/package.json +1 -1
  84. package/dist/OcDataTable-Cp9f5bPD.js +0 -585
@@ -0,0 +1,585 @@
1
+ import { ref as w, onMounted as Ke, createBlock as L, openBlock as r, unref as i, withCtx as S, createVNode as j, createElementVNode as q, createElementBlock as h, createCommentVNode as f, mergeProps as Pe, Fragment as re, renderList as de, normalizeClass as ve, toDisplayString as Ae, computed as $, watch as ne, nextTick as dl, renderSlot as A, resolveDynamicComponent as vl, createSlots as cl, normalizeProps as Le, guardReactiveProps as je } from "vue";
2
+ import { aA as Ie, B as Ne, C as ml, D as pl, L as fl, $ as yl, aL as gl, aM as bl, aN as kl, I as hl, J as Be, j as xl } from "./index-Dj4H9HZ7.js";
3
+ import { useDataTable as wl } from "./DataTable/useDataTable.js";
4
+ import { VueDraggableNext as Ue } from "vue-draggable-next";
5
+ import { getFromLocalStorage as qe, formatHeadersFromLocalStorage as Qe, formatHeadersToLocalStorage as Sl, setInLocalStorage as $l } from "./DataTable/utils/editColumnsUtils.js";
6
+ import { _ as Te } from "./OcIcon-CxreweI4.js";
7
+ import { formatFilterDisplay as Fl, clearAllFilters as Ol } from "./DataTable/utils/filterUtils.js";
8
+ import { formatCustomItemsPerPageOptions as Vl, getItemsPerPageOptions as Dl } from "./DataTable/utils/paginationUtils.js";
9
+ import "dayjs";
10
+ const El = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, Cl = {
11
+ key: 0,
12
+ class: "gap-y-2 flex flex-col border-b pb-3 border-oc-gray-200"
13
+ }, Pl = { class: "gap-y-2 flex flex-col" }, Al = {
14
+ key: 0,
15
+ class: "flex items-center bg-white justify-between h-[26px]"
16
+ }, Ll = { class: "flex items-center w-full gap-x-3" }, jl = { class: "truncate w-full max-w-[160px]" }, Bl = {
17
+ __name: "ColumnEdit",
18
+ props: {
19
+ options: {
20
+ type: Object,
21
+ default: () => ({})
22
+ },
23
+ headers: {
24
+ type: Array,
25
+ default: () => []
26
+ },
27
+ localKey: {
28
+ type: String,
29
+ default: ""
30
+ }
31
+ },
32
+ emits: ["change-active", "onMoved", "update-order"],
33
+ setup(F, { emit: se }) {
34
+ const oe = se, u = F, g = w([]), d = w([]), T = w(!1), O = {
35
+ handle: ".drag-el",
36
+ filter: ".is-disabled",
37
+ group: "headers",
38
+ animation: 500,
39
+ forceFallback: !1,
40
+ move: (E) => E.to.dataset.activeHeaders ? !0 : !!E.draggedContext.futureIndex,
41
+ "onUpdate:modelValue": () => K()
42
+ }, K = (E = !1) => {
43
+ d.value = d.value.map((o) => ({
44
+ ...o,
45
+ isActive: !0
46
+ })), oe("update-order", {
47
+ fixedHeaders: d.value,
48
+ activeHeaders: g.value,
49
+ isOnMount: E
50
+ });
51
+ };
52
+ return Ke(() => {
53
+ const E = qe(u.localKey), { fixed: o, active: v } = Qe(E, u.headers, u.localKey);
54
+ d.value = o || u.headers.slice(0, 1), g.value = v || u.headers.slice(1).map((C) => {
55
+ var ee, le, ae;
56
+ return {
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
59
+ };
60
+ }), K(!0);
61
+ }), (E, o) => (r(), L(i(Ie), {
62
+ modelValue: T.value,
63
+ "onUpdate:modelValue": o[3] || (o[3] = (v) => T.value = v),
64
+ "is-attach-to-body": ""
65
+ }, {
66
+ menu: S(() => [
67
+ q("div", El, [
68
+ d.value.length ? (r(), h("div", Cl, [
69
+ o[4] || (o[4] = q("span", { class: "text-oc-text-400 font-medium" }, "Fixed columns", -1)),
70
+ j(i(Ue), Pe({
71
+ key: "key",
72
+ modelValue: d.value,
73
+ "onUpdate:modelValue": o[0] || (o[0] = (v) => d.value = v)
74
+ }, O), {
75
+ default: S(() => [
76
+ (r(!0), h(re, null, de(d.value, (v, C) => (r(), h("div", {
77
+ key: v.key,
78
+ class: ve(["flex items-center justify-between h-[26px]", C ? "" : "is-disabled"])
79
+ }, [
80
+ q("span", null, Ae(v.label), 1),
81
+ C ? (r(), L(i(Te), {
82
+ key: 0,
83
+ width: "18",
84
+ height: "18",
85
+ class: "text-oc-text-400 drag-el cursor-move",
86
+ name: "draggable"
87
+ })) : f("", !0)
88
+ ], 2))), 128))
89
+ ]),
90
+ _: 1
91
+ }, 16, ["modelValue"])
92
+ ])) : f("", !0),
93
+ q("div", Pl, [
94
+ o[5] || (o[5] = q("span", { class: "text-oc-text-400 font-medium" }, "Active columns", -1)),
95
+ j(i(Ue), Pe({
96
+ key: "key",
97
+ modelValue: g.value,
98
+ "onUpdate:modelValue": o[2] || (o[2] = (v) => g.value = v)
99
+ }, O, { "data-active-headers": "true" }), {
100
+ default: S(() => [
101
+ (r(!0), h(re, null, de(g.value, (v) => (r(), h(re, {
102
+ key: v.key
103
+ }, [
104
+ v.key !== "actions" ? (r(), h("div", Al, [
105
+ q("div", Ll, [
106
+ j(i(ml), {
107
+ modelValue: v.isActive,
108
+ "onUpdate:modelValue": [
109
+ (C) => v.isActive = C,
110
+ o[1] || (o[1] = (C) => K())
111
+ ],
112
+ class: "!w-fit"
113
+ }, null, 8, ["modelValue", "onUpdate:modelValue"]),
114
+ q("div", jl, Ae(v.label), 1)
115
+ ]),
116
+ g.value.length > 1 ? (r(), L(i(Te), {
117
+ key: 0,
118
+ width: "18",
119
+ height: "18",
120
+ class: "text-oc-text-400 drag-el cursor-move",
121
+ name: "draggable"
122
+ })) : f("", !0)
123
+ ])) : f("", !0)
124
+ ], 64))), 128))
125
+ ]),
126
+ _: 1
127
+ }, 16, ["modelValue"])
128
+ ])
129
+ ])
130
+ ]),
131
+ default: S(() => [
132
+ j(i(Ne), {
133
+ label: "Edit Column",
134
+ "left-icon": "setting",
135
+ size: "small",
136
+ class: "whitespace-nowrap",
137
+ variant: "secondary"
138
+ })
139
+ ]),
140
+ _: 1
141
+ }, 8, ["modelValue"]));
142
+ }
143
+ }, Ul = {
144
+ key: 0,
145
+ class: "relative flex flex-col gap-9"
146
+ }, Tl = {
147
+ key: 0,
148
+ class: "flex items-center px-4 min-h-[44px]"
149
+ }, Kl = {
150
+ key: 0,
151
+ class: "absolute flex items-center gap-5 left-5"
152
+ }, Il = {
153
+ key: 1,
154
+ class: "absolute flex gap-3 left-5"
155
+ }, Nl = {
156
+ key: 1,
157
+ class: "flex justify-center w-full gap-5 md:justify-start"
158
+ }, ql = {
159
+ key: 2,
160
+ class: "items-center hidden md:flex"
161
+ }, Zl = {
162
+ __name: "OcDataTable",
163
+ props: {
164
+ isLoading: Boolean,
165
+ id: {
166
+ type: String,
167
+ required: !0
168
+ },
169
+ options: {
170
+ type: Object,
171
+ required: !0
172
+ },
173
+ filter: {
174
+ type: Object,
175
+ required: !0
176
+ },
177
+ selected: {
178
+ type: Array,
179
+ required: !1
180
+ },
181
+ rowClass: String,
182
+ rowKey: {
183
+ type: [String, Function],
184
+ default: "id"
185
+ },
186
+ rowLink: String,
187
+ localDb: {
188
+ type: Object,
189
+ required: !1
190
+ },
191
+ sortBy: {
192
+ type: Object,
193
+ required: !1
194
+ },
195
+ isNewTable: {
196
+ type: Boolean,
197
+ default: !1
198
+ }
199
+ },
200
+ emits: {
201
+ "update:selected": [],
202
+ "update:filter": [],
203
+ "apply-filter": [],
204
+ "click:row": [],
205
+ "filter-fields-changed": [],
206
+ "filter-removed": [],
207
+ "filter-open": [],
208
+ "search-query-changed": [],
209
+ "hover:cell": [],
210
+ "columns-changed": [],
211
+ "on-table-ready": [],
212
+ "update:sort-by": []
213
+ },
214
+ setup(F, { expose: se, emit: oe }) {
215
+ var ge, be, ke, he, xe, we, Se, $e, Fe, Oe, Ve, De, Ee, Ce;
216
+ const u = F, g = oe, d = $(() => {
217
+ var e;
218
+ return (e = u.options) == null ? void 0 : e.cursor;
219
+ }), T = w(), O = $(() => {
220
+ var e;
221
+ return (e = u.options) == null ? void 0 : e.tableOptions;
222
+ }), K = $(() => u.localDb !== void 0), {
223
+ localData: E,
224
+ paginationData: o,
225
+ isLoading: v,
226
+ // Methods
227
+ bulkPutLocalData: C,
228
+ bulkDeleteLocalData: ee,
229
+ getLocalDataUpdatedAt: le,
230
+ getProductIdAndLastUpdatedAt: ae,
231
+ syncLocalData: ue,
232
+ sortByData: z,
233
+ // Setters
234
+ setFilter: Re,
235
+ setSortBy: ze
236
+ } = wl({
237
+ name: ((ge = u.localDb) == null ? void 0 : ge.table_name) ?? null,
238
+ db: ((be = u.localDb) == null ? void 0 : be.db) ?? null,
239
+ filterableFields: (ke = u.options) == null ? void 0 : ke.filterableFields,
240
+ sortableFields: (he = u.options) == null ? void 0 : he.sortableFields,
241
+ searchableFields: (xe = u.options) == null ? void 0 : xe.searchableFields
242
+ });
243
+ ne(
244
+ () => {
245
+ var e;
246
+ return (e = u.options) == null ? void 0 : e.pagination;
247
+ },
248
+ (e) => {
249
+ K.value || (o.value = e);
250
+ },
251
+ { deep: !0, immediate: !0 }
252
+ );
253
+ const ce = $(() => {
254
+ var l, c;
255
+ const e = {
256
+ ...O.value,
257
+ headers: T.value ? T.value.map((n) => {
258
+ var y, m;
259
+ return n.class = ((m = (y = O.value) == null ? void 0 : y.headers.find((s) => s.key === n.key)) == null ? void 0 : m.class) ?? "", n;
260
+ }).filter((n) => n.isActive) : (l = O.value) == null ? void 0 : l.headers.filter((n) => _e(n.key))
261
+ };
262
+ return (c = e.fields) != null && c.length || (e.fields = E.value), e;
263
+ }), a = $(() => {
264
+ var e;
265
+ return (e = u.options) == null ? void 0 : e.filterOptions;
266
+ }), Je = $(() => {
267
+ var e;
268
+ return (e = u.options) == null ? void 0 : e.hidePerPageDropdown;
269
+ }), Me = $(() => {
270
+ var e;
271
+ return ((e = o.value) == null ? void 0 : e.last_page) === 1;
272
+ }), J = JSON.parse(JSON.stringify({ ...u.filter }));
273
+ !J && o.value ? J.page = 1 : !J && d && (J.cursor = "");
274
+ const t = w(J), Q = w(!1), B = w(t.value[(Se = (we = a.value) == null ? void 0 : we.tabs) == null ? void 0 : Se.key]), M = w(t.value.page), R = w(
275
+ (Fe = ($e = a.value) == null ? void 0 : $e.per_page) != null && Fe.key ? t.value[(Ve = (Oe = a.value) == null ? void 0 : Oe.per_page) == null ? void 0 : Ve.key] : t.value.per_page
276
+ ), me = ((Ce = t.value[t.value.selectedSearchOption || ((Ee = (De = a.value) == null ? void 0 : De.search) == null ? void 0 : Ee.key)]) == null ? void 0 : Ce.trim()) ?? "", U = w(me ? me.split(",") : []), pe = w(!1), Ge = $(
277
+ () => {
278
+ var e;
279
+ return Vl((e = u.options) == null ? void 0 : e.perPageOptions);
280
+ }
281
+ ), We = $(() => Dl(Ge.value, o.value)), Xe = $(() => {
282
+ var e;
283
+ return ((e = u.selected) == null ? void 0 : e.length) > 0;
284
+ }), Ye = (e) => {
285
+ !e.trim() || !t.value.selectedSearchOption && U.value.includes(e) || (U.value = [e], V(), g("search-query-changed", e));
286
+ }, Ze = (e) => {
287
+ U.value = U.value.filter((l) => l !== e), V();
288
+ }, He = $(() => Fl(t.value, a.value)), _e = (e) => {
289
+ var l, c, n, y, m, s;
290
+ return ((s = (m = (y = (n = t.value) == null ? void 0 : n[(c = (l = a.value) == null ? void 0 : l.columnEdit) == null ? void 0 : c.key]) == null ? void 0 : y.active) == null ? void 0 : m.find((b) => b.key === e)) == null ? void 0 : s.isActive) ?? !0;
291
+ }, el = ({ fixedHeaders: e, activeHeaders: l, isOnMount: c }) => {
292
+ var n, y, m, s, b, x, P, D;
293
+ if (t.value[(y = (n = a.value) == null ? void 0 : n.columnEdit) == null ? void 0 : y.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) {
294
+ const I = Sl(e, l);
295
+ $l(a.value.columnEdit.localStorageKey, I);
296
+ }
297
+ g("columns-changed", l);
298
+ }, ll = () => {
299
+ var e, l, c, n, y, m;
300
+ if ((l = (e = a.value) == null ? void 0 : e.columnEdit) != null && l.localStorageKey) {
301
+ const s = qe(a.value.columnEdit.localStorageKey);
302
+ if (s) {
303
+ const { fixed: b, active: x } = Qe(
304
+ s,
305
+ O.value.headers,
306
+ a.value.columnEdit.localStorageKey
307
+ );
308
+ t.value[(n = (c = a.value) == null ? void 0 : c.columnEdit) == null ? void 0 : n.key].fixed = b, t.value[(m = (y = a.value) == null ? void 0 : y.columnEdit) == null ? void 0 : m.key].active = x, T.value = [...b, ...x];
309
+ }
310
+ }
311
+ }, al = (e) => {
312
+ t.value.selectedSearchOption = e;
313
+ }, tl = () => {
314
+ U.value = [], B.value = "", t.value = Ol(
315
+ t.value,
316
+ a.value,
317
+ R.value,
318
+ B.value
319
+ ), V();
320
+ }, sl = () => {
321
+ V(null, M.value);
322
+ }, V = (e = null, l = !1, c = "", n = !1, y = !1) => {
323
+ var s, b, x, P, D, I, G, W, X, Y, Z, H, _;
324
+ 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] = R.value : t.value.per_page = R.value, (b = a.value) != null && b.tabs && y && (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) => {
325
+ var N;
326
+ (N = a.value.search.options) != null && N.map((p) => p.value).includes(k) && delete t.value[k];
327
+ }), 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) => {
328
+ Array.isArray(t.value[k]) && t.value[k].length === 0 && delete t.value[k];
329
+ }));
330
+ let m = (Z = (Y = a.value) == null ? void 0 : Y.tabs) == null ? void 0 : Z.key;
331
+ if (m && B.value !== t.value[m]) {
332
+ const k = (_ = (H = a.value.tabs) == null ? void 0 : H.options) == null ? void 0 : _.find(
333
+ (N) => {
334
+ var p, te;
335
+ return ((p = N.value) == null ? void 0 : p.toString()) === ((te = t.value[m]) == null ? void 0 : te.toString());
336
+ }
337
+ );
338
+ k != null && k.value && (B.value = k.value, V());
339
+ }
340
+ ol(n);
341
+ }, fe = w(null), ol = (e = !1) => {
342
+ clearTimeout(fe.value), fe.value = setTimeout(() => {
343
+ g("update:filter", { ...t.value }, e), g("apply-filter", { ...t.value }, e);
344
+ }, 500);
345
+ }, ul = (e, l) => {
346
+ (l === a.value.tabs.key || l === "tabs") && (B.value = ""), V(e), g("filter-removed", l);
347
+ }, ye = w(!1);
348
+ Ke(() => {
349
+ ll(), dl(() => {
350
+ g("on-table-ready"), ye.value = !0;
351
+ });
352
+ });
353
+ const ie = $(() => u.isLoading || v.value);
354
+ se({
355
+ localData: E,
356
+ paginationData: o,
357
+ tableIsLoading: ie,
358
+ bulkPutLocalData: C,
359
+ bulkDeleteLocalData: ee,
360
+ getLocalDataUpdatedAt: le,
361
+ getProductIdAndLastUpdatedAt: ae,
362
+ syncLocalData: ue,
363
+ sortByData: z
364
+ });
365
+ const il = ({ key: e, value: l }) => {
366
+ Object.keys(z.value).forEach((c) => {
367
+ c !== e && (z.value[c] = null);
368
+ }), z.value[e] = l, g("update:sort-by", z.value);
369
+ };
370
+ return ne(
371
+ () => t.value,
372
+ () => {
373
+ K.value && t.value && Re({ ...t.value });
374
+ },
375
+ { deep: !0, immediate: !0 }
376
+ ), ne(
377
+ () => u.sortBy,
378
+ () => {
379
+ K.value && u.sortBy && ze({ ...u.sortBy });
380
+ },
381
+ { deep: !0, immediate: !0 }
382
+ ), (e, l) => {
383
+ var c, n, y, m;
384
+ return ye.value ? (r(), h("div", Ul, [
385
+ ce.value ? (r(), L(vl(F.isNewTable ? i(pl) : i(fl)), {
386
+ key: 0,
387
+ selected: F.selected,
388
+ "row-key": F.rowKey,
389
+ options: ce.value,
390
+ "is-loading": ie.value,
391
+ "loading-rows": R.value,
392
+ "row-class": F.rowClass,
393
+ "row-link": F.rowLink,
394
+ "is-sticky": O.value.isSticky,
395
+ "is-borderless": O.value.isBorderless,
396
+ "sort-by": F.sortBy,
397
+ "onUpdate:selected": l[8] || (l[8] = (s) => e.$emit("update:selected", s)),
398
+ "onUpdate:sortBy": il,
399
+ "onClick:row": l[9] || (l[9] = (s) => e.$emit("click:row", s)),
400
+ "onHover:cell": l[10] || (l[10] = (s) => e.$emit("hover:cell", s))
401
+ }, cl({
402
+ after: S(() => [
403
+ A(e.$slots, "after")
404
+ ]),
405
+ empty: S(() => [
406
+ A(e.$slots, "empty")
407
+ ]),
408
+ "table-header": S((s) => [
409
+ A(e.$slots, "table-header", Le(je(s)))
410
+ ]),
411
+ "table-body": S((s) => [
412
+ A(e.$slots, "table-body", Le(je(s)))
413
+ ]),
414
+ _: 2
415
+ }, [
416
+ e.$slots.before || (c = a.value) != null && c.search || (n = a.value) != null && n.form || (y = a.value) != null && y.tabs ? {
417
+ name: "before",
418
+ fn: S(() => {
419
+ var s, b, x, P;
420
+ return [
421
+ A(e.$slots, "before"),
422
+ (s = a.value) != null && s.search || (b = a.value) != null && b.form || (x = a.value) != null && x.tabs ? (r(), h("div", Tl, [
423
+ Xe.value ? (r(), h("div", Kl, [
424
+ A(e.$slots, "bulk-actions", { selectedRows: F.selected })
425
+ ])) : (r(), h("div", Il, [
426
+ (P = a.value) != null && P.tabs ? (r(), L(i(yl), {
427
+ key: 0,
428
+ modelValue: B.value,
429
+ "onUpdate:modelValue": [
430
+ l[0] || (l[0] = (D) => B.value = D),
431
+ l[1] || (l[1] = (D) => V(null, !1, "", !1, !0))
432
+ ],
433
+ "is-disabled": ie.value,
434
+ tabs: a.value.tabs.options,
435
+ variant: "pills"
436
+ }, null, 8, ["modelValue", "is-disabled", "tabs"])) : f("", !0)
437
+ ])),
438
+ A(e.$slots, "filter-options", {}, () => {
439
+ var D, I, G, W, X, Y, Z, H, _, k, N;
440
+ return [
441
+ (D = a.value) != null && D.search || (I = a.value) != null && I.form || (G = a.value) != null && G.columnEdit ? (r(), h("div", {
442
+ key: 0,
443
+ class: ve([
444
+ "flex gap-3 absolute ml-auto items-center bg-oc-bg-light right-4 max-w-[calc(100%-24px)]",
445
+ a.value ? pe.value ? "md:w-fit w-full" : "" : "w-full justify-end"
446
+ ])
447
+ }, [
448
+ (W = a.value) != null && W.search ? (r(), L(i(gl), {
449
+ key: 0,
450
+ "is-search-only": !a.value.tabs || a.value.isSearchOnly,
451
+ "search-options": ((X = a.value.search) == null ? void 0 : X.options) ?? [],
452
+ "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",
453
+ onAddQuery: Ye,
454
+ onToggle: l[2] || (l[2] = (p) => pe.value = p),
455
+ onChangeSearchKey: al
456
+ }, null, 8, ["is-search-only", "search-options", "selected-option"])) : f("", !0),
457
+ (k = a.value) != null && k.form ? (r(), L(i(Ie), {
458
+ key: 1,
459
+ modelValue: Q.value,
460
+ "onUpdate:modelValue": [
461
+ l[6] || (l[6] = (p) => Q.value = p),
462
+ l[7] || (l[7] = (p) => e.$emit("filter-open", p))
463
+ ],
464
+ distance: 9,
465
+ placement: "bottom-end",
466
+ "is-attach-to-body": ""
467
+ }, {
468
+ menu: S(() => [
469
+ Q.value ? (r(), L(i(bl), {
470
+ key: 0,
471
+ id: F.id,
472
+ "json-form": a.value.form ?? [],
473
+ grid: a.value.grid ?? null,
474
+ values: t.value,
475
+ actions: a.value.actions,
476
+ onApplyFilter: l[3] || (l[3] = (p) => V(p)),
477
+ onFilterFieldsChanged: l[4] || (l[4] = (p) => g("filter-fields-changed", p)),
478
+ onCancel: l[5] || (l[5] = (p) => Q.value = !1)
479
+ }, {
480
+ default: S(({ errors: p, values: te, jsonForm: rl, updateForm: nl }) => [
481
+ A(e.$slots, "custom-filter-form", {
482
+ errors: p,
483
+ values: te,
484
+ jsonForm: rl,
485
+ updateFilter: nl
486
+ })
487
+ ]),
488
+ _: 3
489
+ }, 8, ["id", "json-form", "grid", "values", "actions"])) : f("", !0)
490
+ ]),
491
+ default: S(() => [
492
+ j(i(Ne), {
493
+ "is-active": Q.value,
494
+ variant: "secondary",
495
+ "left-icon": "filter",
496
+ size: "small",
497
+ class: "w-8",
498
+ "icon-class": "shrink-0"
499
+ }, null, 8, ["is-active"])
500
+ ]),
501
+ _: 3
502
+ }, 8, ["modelValue"])) : f("", !0),
503
+ a.value.columnEdit ? (r(), L(Bl, {
504
+ key: 2,
505
+ options: t.value.columnEdit,
506
+ headers: ((N = O.value) == null ? void 0 : N.headers) || [],
507
+ "local-key": a.value.columnEdit.localStorageKey,
508
+ onUpdateOrder: el
509
+ }, null, 8, ["options", "headers", "local-key"])) : f("", !0)
510
+ ], 2)) : f("", !0)
511
+ ];
512
+ })
513
+ ])) : f("", !0),
514
+ j(i(kl), {
515
+ filters: He.value,
516
+ queries: U.value,
517
+ class: "border-t border-oc-gray-200",
518
+ onRemoveQuery: Ze,
519
+ onRemoveAll: tl,
520
+ onRemoveFilter: ul
521
+ }, null, 8, ["filters", "queries"])
522
+ ];
523
+ }),
524
+ key: "0"
525
+ } : void 0,
526
+ de((m = O.value) == null ? void 0 : m.headers, (s, b) => ({
527
+ name: s.key,
528
+ fn: S(({ data: x, item: P }) => [
529
+ A(e.$slots, s.key, {
530
+ data: x,
531
+ item: P
532
+ })
533
+ ])
534
+ }))
535
+ ]), 1064, ["selected", "row-key", "options", "is-loading", "loading-rows", "row-class", "row-link", "is-sticky", "is-borderless", "sort-by"])) : f("", !0),
536
+ A(e.$slots, "before-pagination"),
537
+ i(o) || d.value ? (r(), h("div", {
538
+ key: 1,
539
+ class: ve(["flex items-center gap-3", i(o) && i(o).last_page === 1 ? "justify-end" : ""])
540
+ }, [
541
+ i(o) && !Me.value ? (r(), L(i(hl), {
542
+ key: 0,
543
+ modelValue: M.value,
544
+ "onUpdate:modelValue": [
545
+ l[11] || (l[11] = (s) => M.value = s),
546
+ sl
547
+ ],
548
+ class: "justify-center text-[13px]",
549
+ "max-page": i(o).last_page,
550
+ strategy: i(o).strategy,
551
+ "total-visible": "5"
552
+ }, null, 8, ["modelValue", "max-page", "strategy"])) : f("", !0),
553
+ d.value ? (r(), h("div", Nl, [
554
+ j(i(Be), {
555
+ disabled: !d.value.prev,
556
+ onClick: l[12] || (l[12] = (s) => d.value.prev ? V(null, !1, d.value.prev) : null)
557
+ }, null, 8, ["disabled"]),
558
+ j(i(Be), {
559
+ disabled: !d.value.next,
560
+ "is-next": "",
561
+ onClick: l[13] || (l[13] = (s) => d.value.next ? V(null, !1, d.value.next) : null)
562
+ }, null, 8, ["disabled"])
563
+ ])) : f("", !0),
564
+ Je.value ? f("", !0) : (r(), h("div", ql, [
565
+ j(i(xl), {
566
+ modelValue: R.value,
567
+ "onUpdate:modelValue": [
568
+ l[14] || (l[14] = (s) => R.value = s),
569
+ l[15] || (l[15] = (s) => V(null))
570
+ ],
571
+ label: "Item per page",
572
+ "is-inline-label": "",
573
+ "popper-options": { placement: "auto" },
574
+ options: We.value,
575
+ "select-text-class": "!text-[13px]"
576
+ }, null, 8, ["modelValue", "options"])
577
+ ]))
578
+ ], 2)) : f("", !0)
579
+ ])) : f("", !0);
580
+ };
581
+ }
582
+ };
583
+ export {
584
+ Zl as default
585
+ };
@@ -1,5 +1,5 @@
1
1
  import { ref as w, createBlock as y, openBlock as c, unref as l, withCtx as r, createElementBlock as b, Fragment as C, renderList as $, normalizeClass as s, createElementVNode as o, createCommentVNode as m, renderSlot as u, toDisplayString as x, createVNode as f } from "vue";
2
- import { aJ as D, aF as S, aA as B } from "./index-CwAseLMJ.js";
2
+ import { aJ as D, aF as S, aA as B } from "./index-Dj4H9HZ7.js";
3
3
  import { _ as g } from "./OcIcon-CxreweI4.js";
4
4
  const M = ["onMouseleave", "onMouseover", "onClick"], L = { class: "flex justify-evenly w-full" }, N = { class: "flex w-full" }, U = { class: "ml-4 flex w-full" }, A = { class: "flex items-center flex-wrap w-full" }, E = ["href"], F = { class: "min-w-[120px]" }, O = { class: "truncate w-[200px]" }, W = { class: "flex items-center ml-4" }, j = { class: "flex w-full" }, T = {
5
5
  __name: "OcDraggableList",
@@ -1,5 +1,5 @@
1
1
  import { ref as m, computed as p, createElementBlock as l, openBlock as s, createVNode as f, createBlock as N, createCommentVNode as z, unref as c, withCtx as v, createElementVNode as n, normalizeClass as T, Fragment as V, renderList as k, createTextVNode as C } from "vue";
2
- import { aA as U, d as A, B as _ } from "./index-CwAseLMJ.js";
2
+ import { aA as U, d as A, B as _ } from "./index-Dj4H9HZ7.js";
3
3
  import { EMOJI_LIST as a, EMOJI_CATEGORIES as J } from "./Form/EmojiPicker/conts/emoji.js";
4
4
  import { _ as P } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  const F = { class: "flex items-center justify-center rounded bg-oc-bg-dark h-[140px] relative w-full z-50" }, G = ["innerHTML"], R = { class: "p-4 w-[340px]" }, q = { class: "bg-oc-bg-dark p-4 rounded flex items-center justify-center" }, K = ["innerHTML"], Q = { class: "pt-3 pb-4" }, W = ["id", "innerHTML", "onClick"], X = {
@@ -1,5 +1,5 @@
1
1
  import { ref as r, computed as u, onMounted as B, createElementBlock as O, openBlock as k, renderSlot as $, createElementVNode as f, createVNode as c, unref as i } from "vue";
2
- import { u as w, B as m } from "./index-CwAseLMJ.js";
2
+ import { u as w, B as m } from "./index-Dj4H9HZ7.js";
3
3
  const C = { class: "flex w-[326px] flex-col gap-y-5" }, A = { class: "max-h-[500px] overflow-y-auto p-5" }, E = { class: "flex gap-x-5 px-5 pb-5" }, N = {
4
4
  __name: "OcFilterForm",
5
5
  props: {
@@ -1,5 +1,5 @@
1
1
  import { ref as u, computed as K, createElementBlock as d, openBlock as s, Fragment as p, createElementVNode as r, createCommentVNode as f, normalizeClass as O, createVNode as m, unref as c, withKeys as N, createSlots as Q, withCtx as h, toDisplayString as A, renderList as D, createBlock as S, nextTick as E } from "vue";
2
- import { d as F, aA as I, aB as U, B as w } from "./index-CwAseLMJ.js";
2
+ import { d as F, aA as I, aB as U, B as w } from "./index-Dj4H9HZ7.js";
3
3
  import { _ as j } from "./OcIcon-CxreweI4.js";
4
4
  const q = { class: "flex gap-x-4" }, L = { class: "flex gap-x-2 items-center pl-2 text-oc-text-400 font-medium text-sm" }, T = { class: "p-2 flex flex-col" }, P = {
5
5
  __name: "OcFilterSearch",
@@ -1,5 +1,5 @@
1
1
  import { computed as k, createBlock as m, createCommentVNode as x, openBlock as a, unref as o, withCtx as y, createElementVNode as f, createElementBlock as v, createVNode as F, Fragment as b, renderList as p } from "vue";
2
- import { O as $, av as c } from "./index-CwAseLMJ.js";
2
+ import { O as $, av as c } from "./index-Dj4H9HZ7.js";
3
3
  const C = { class: "flex gap-1 items-center normal-case flex-wrap" }, O = {
4
4
  __name: "OcFilterSearchFor",
5
5
  props: {
@@ -1,6 +1,6 @@
1
1
  import { ref as o, createBlock as v, openBlock as d, unref as r, withCtx as x, createVNode as C } from "vue";
2
- import { aC as O } from "./index-CwAseLMJ.js";
3
- import b from "./OcCropper-CJH8Ll8y.js";
2
+ import { aC as O } from "./index-Dj4H9HZ7.js";
3
+ import b from "./OcCropper-DF4Ig9lc.js";
4
4
  const h = {
5
5
  __name: "OcModalCropper",
6
6
  props: {
@@ -1,5 +1,5 @@
1
1
  import { ref as n, watch as g, createBlock as m, openBlock as s, unref as o, withCtx as p, createVNode as v, createCommentVNode as y } from "vue";
2
- import { aA as S, d as h, aK as D } from "./index-CwAseLMJ.js";
2
+ import { aA as S, d as h, aK as D } from "./index-Dj4H9HZ7.js";
3
3
  import c from "dayjs";
4
4
  const w = {
5
5
  __name: "OcTimePicker",
@@ -1,4 +1,4 @@
1
- import { ay as r } from "../../index-CwAseLMJ.js";
1
+ import { ay as r } from "../../index-Dj4H9HZ7.js";
2
2
  export {
3
3
  r as ConfirmationModal
4
4
  };
@@ -1,4 +1,4 @@
1
- import { az as a } from "../../index-CwAseLMJ.js";
1
+ import { az as a } from "../../index-Dj4H9HZ7.js";
2
2
  export {
3
3
  a as CopyTooltip
4
4
  };
@@ -1,4 +1,4 @@
1
- import { aA as r, aB as p } from "../../index-CwAseLMJ.js";
1
+ import { aA as r, aB as p } from "../../index-Dj4H9HZ7.js";
2
2
  export {
3
3
  r as Dropdown,
4
4
  p as DropdownItem
@@ -1,4 +1,4 @@
1
- import { aC as d, aD as e } from "../../index-CwAseLMJ.js";
1
+ import { aC as d, aD as e } from "../../index-Dj4H9HZ7.js";
2
2
  export {
3
3
  d as Modal,
4
4
  e as OcModalPage