@orchidui/core 1.8.1-126 → 1.8.1-127

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