@orchidui/core 1.8.1-123 → 1.8.1-126

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/Disclosure/Accordion/OcAccordion.js +1 -1
  12. package/dist/Disclosure/OnboardingAccordion/OnboardingAccordion.js +1 -1
  13. package/dist/Disclosure/Steps/OcSteps.js +1 -1
  14. package/dist/Disclosure/Tabs/Tabs.js +1 -1
  15. package/dist/Disclosure/Variants/OcVariants.js +1 -1
  16. package/dist/Elements/AdditionalContent/OcAdditionalContent.js +1 -1
  17. package/dist/Elements/AuthenticationOption/AuthenticationOption.js +1 -1
  18. package/dist/Elements/Box/OcBox.js +1 -1
  19. package/dist/Elements/EmptyPage/OcEmptyPage.js +1 -1
  20. package/dist/Elements/FeatureOverviewCard/OcFeatureOverviewCard.js +1 -1
  21. package/dist/Elements/Header/OcHeader.js +1 -1
  22. package/dist/Elements/PageTitle/OcPageTitle.js +1 -1
  23. package/dist/Elements/SandboxBanner/OcSandboxBanner.js +1 -1
  24. package/dist/Elements/Sidebar/OcSidebar.js +2 -2
  25. package/dist/Elements/SubSidebar/OcSubSidebar.js +1 -1
  26. package/dist/Elements/TopBanner/OcTopBanner.js +1 -1
  27. package/dist/Elements/VerificationOption/OcVerificationOption.js +1 -1
  28. package/dist/Feedback/Banner/OcBanner.js +1 -1
  29. package/dist/Feedback/Chip/OcChip.js +1 -1
  30. package/dist/Feedback/ShareIcon/OcShareIcon.js +1 -1
  31. package/dist/Feedback/Snackbar/OcSnackbar.js +1 -1
  32. package/dist/Form/BaseInput/OcBaseInput.js +1 -1
  33. package/dist/Form/Button/OcButton.js +1 -1
  34. package/dist/Form/Calendar/OcCalendar.js +1 -1
  35. package/dist/Form/CardInput/OcCardInput.js +1 -1
  36. package/dist/Form/Checkbox/OcCheckbox.js +1 -1
  37. package/dist/Form/CheckboxesGroup/OcCheckboxesGroup.js +1 -1
  38. package/dist/Form/Criteria/OcCriteria.js +1 -1
  39. package/dist/Form/Cropper/OcCropper.js +1 -1
  40. package/dist/Form/DatePicker/OcDatePicker.js +1 -1
  41. package/dist/Form/EmojiPicker/OcEmojiPicker.js +1 -1
  42. package/dist/Form/Input/OcInput.js +1 -1
  43. package/dist/Form/LinkInput/OcLinkInput.js +1 -1
  44. package/dist/Form/MultipleUploadFile/OcMultipleUploadFile.js +1 -1
  45. package/dist/Form/NumberInput/OcNumberInput.js +1 -1
  46. package/dist/Form/PhoneInput/OcPhoneInput.js +1 -1
  47. package/dist/Form/Radio/OcRadio.js +1 -1
  48. package/dist/Form/RadioGroup/OcRadioGroup.js +1 -1
  49. package/dist/Form/RangeInput/OcRangeInput.js +1 -1
  50. package/dist/Form/SectionItem/OcSectionItem.js +1 -1
  51. package/dist/Form/Select/OcSelect.js +1 -1
  52. package/dist/Form/SelectOptions/OcSelectOptions.js +1 -1
  53. package/dist/Form/SingleFileUpload/OcSingleFileUpload.js +1 -1
  54. package/dist/Form/Slider/OcSlider.js +1 -1
  55. package/dist/Form/TextArea/OcTextArea.js +1 -1
  56. package/dist/Form/index.js +1 -1
  57. package/dist/FormBuilder/OcFormBuilder.js +1 -1
  58. package/dist/{OcAccountSetupProgress-D48JsFoN.js → OcAccountSetupProgress-B8tR1mDq.js} +1 -1
  59. package/dist/{OcComplexCalendar-Bpz_E3x5.js → OcComplexCalendar-DBx25a5-.js} +1 -1
  60. package/dist/{OcComplexDatePicker-VrfzzlYs.js → OcComplexDatePicker-CRf6MxOX.js} +1 -1
  61. package/dist/{OcCropper-CCf97Pam.js → OcCropper-D1hXuCbl.js} +1 -1
  62. package/dist/OcDataTable-Ba2vClWe.js +545 -0
  63. package/dist/{OcDraggableList-BC7Fe18o.js → OcDraggableList-Bri7Yu2u.js} +1 -1
  64. package/dist/{OcEmojiPicker-C0k4r440.js → OcEmojiPicker-BgTqBYCH.js} +1 -1
  65. package/dist/{OcFilterForm-Btc9rP4W.js → OcFilterForm-DlHESBlu.js} +1 -1
  66. package/dist/{OcFilterSearch-D6Oh4Vbd.js → OcFilterSearch-B02WMHub.js} +1 -1
  67. package/dist/{OcFilterSearchFor-CknteDrO.js → OcFilterSearchFor-B1Pil-K3.js} +1 -1
  68. package/dist/{OcModalCropper-BRNZvi4Y.js → OcModalCropper-B8cE2SqY.js} +2 -2
  69. package/dist/{OcTimePicker-DECsVh0p.js → OcTimePicker-CvHr6hRx.js} +1 -1
  70. package/dist/Overlay/ConfirmationModal/OcConfirmationModal.js +1 -1
  71. package/dist/Overlay/CopyTooltip/OcCopyTooltip.js +1 -1
  72. package/dist/Overlay/Dropdown/OcDropdown.js +1 -1
  73. package/dist/Overlay/Modal/OcModal.js +1 -1
  74. package/dist/Overlay/SupportMenu/OcSupportMenu.js +1 -1
  75. package/dist/Overlay/Tooltip/OcTooltip.js +1 -1
  76. package/dist/Overlay/Whitelist/OcWhiteList.js +1 -1
  77. package/dist/{SubPlanCard-JktUvdQq.js → SubPlanCard-vq-CzZj9.js} +1 -1
  78. package/dist/{ThumbnailSection-Z9lFGL_L.js → ThumbnailSection-O8OoYcHD.js} +1 -1
  79. package/dist/{ThumbnailTheme-CH0h_y_S.js → ThumbnailTheme-DlrWURkb.js} +1 -1
  80. package/dist/{index-yXxch8P2.js → index-BuPthmbI.js} +816 -808
  81. package/dist/index.js +1 -1
  82. package/package.json +1 -1
  83. package/dist/DataTable/utils/storageUtils.js +0 -11
  84. package/dist/OcDataTable-BOOcW2gH.js +0 -551
@@ -0,0 +1,545 @@
1
+ import { ref as $, onMounted as Ae, createBlock as P, openBlock as r, unref as i, withCtx as w, createVNode as A, createElementVNode as Q, createElementBlock as k, createCommentVNode as y, mergeProps as De, Fragment as ie, renderList as ne, normalizeClass as de, toDisplayString as Fe, computed as S, watch as re, renderSlot as C, createSlots as sl, normalizeProps as Ee, guardReactiveProps as Ce } from "vue";
2
+ import { az as Ke, B as Be, C as ul, K as il, Z as rl, aK as nl, aL as dl, aM as vl, H as cl, I as Pe, j as ml } from "./index-BuPthmbI.js";
3
+ import { useDataTable as pl } from "./DataTable/useDataTable.js";
4
+ import { VueDraggableNext as Le } from "vue-draggable-next";
5
+ import { getFromLocalStorage as Ue, formatHeadersFromLocalStorage as Ie, formatHeadersToLocalStorage as fl, setInLocalStorage as yl } from "./DataTable/utils/editColumnsUtils.js";
6
+ import { _ as je } from "./OcIcon-CBf___w1.js";
7
+ import { formatFilterDisplay as gl, clearAllFilters as bl } from "./DataTable/utils/filterUtils.js";
8
+ import { formatCustomItemsPerPageOptions as kl, getItemsPerPageOptions as hl } from "./DataTable/utils/paginationUtils.js";
9
+ import "dayjs";
10
+ const xl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, wl = {
11
+ key: 0,
12
+ class: "gap-y-2 flex flex-col border-b pb-3 border-oc-gray-200"
13
+ }, Sl = { class: "gap-y-2 flex flex-col" }, $l = {
14
+ key: 0,
15
+ class: "flex items-center bg-white justify-between h-[26px]"
16
+ }, Ol = { class: "flex items-center w-full gap-x-3" }, Vl = { class: "truncate w-full max-w-[160px]" }, Dl = {
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(L, { emit: te }) {
38
+ const oe = te, s = L, h = $([]), d = $([]), U = $(!1), O = {
39
+ handle: ".drag-el",
40
+ filter: ".is-disabled",
41
+ group: "headers",
42
+ animation: 500,
43
+ forceFallback: !1,
44
+ move: (j) => j.to.dataset.activeHeaders ? !0 : !!j.draggedContext.futureIndex,
45
+ "onUpdate:modelValue": () => I()
46
+ }, I = (j = !1) => {
47
+ d.value = d.value.map((u) => ({
48
+ ...u,
49
+ isActive: !0
50
+ })), oe("update-order", {
51
+ fixedHeaders: d.value,
52
+ activeHeaders: h.value,
53
+ isOnMount: j
54
+ });
55
+ };
56
+ return Ae(() => {
57
+ const j = Ue(s.localKey), { fixed: u, active: v } = Ie(j, s.headers, s.localKey);
58
+ d.value = u || s.headers.slice(0, 1), h.value = v || s.headers.slice(1).map((F) => {
59
+ var _, ee, le;
60
+ return {
61
+ ...F,
62
+ isActive: ((le = (ee = (_ = s.options) == null ? void 0 : _.active) == null ? void 0 : ee.find((se) => se.key === F.key)) == null ? void 0 : le.isActive) ?? !0
63
+ };
64
+ }), I(!0);
65
+ }), (j, u) => (r(), P(i(Ke), {
66
+ modelValue: U.value,
67
+ "onUpdate:modelValue": u[3] || (u[3] = (v) => U.value = v),
68
+ class: "h-[36px]",
69
+ "is-attach-to-body": ""
70
+ }, {
71
+ menu: w(() => [
72
+ Q("div", xl, [
73
+ d.value.length ? (r(), k("div", wl, [
74
+ u[4] || (u[4] = Q("span", { class: "text-oc-text-400 font-medium" }, "Fixed columns", -1)),
75
+ A(i(Le), De({
76
+ key: "key",
77
+ modelValue: d.value,
78
+ "onUpdate:modelValue": u[0] || (u[0] = (v) => d.value = v)
79
+ }, O), {
80
+ default: w(() => [
81
+ (r(!0), k(ie, null, ne(d.value, (v, F) => (r(), k("div", {
82
+ key: v.key,
83
+ class: de(["flex items-center justify-between h-[26px]", F ? "" : "is-disabled"])
84
+ }, [
85
+ Q("span", null, Fe(v.label), 1),
86
+ F ? (r(), P(i(je), {
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", Sl, [
99
+ u[5] || (u[5] = Q("span", { class: "text-oc-text-400 font-medium" }, "Active columns", -1)),
100
+ A(i(Le), De({
101
+ key: "key",
102
+ modelValue: h.value,
103
+ "onUpdate:modelValue": u[2] || (u[2] = (v) => h.value = v)
104
+ }, O, { "data-active-headers": "true" }), {
105
+ default: w(() => [
106
+ (r(!0), k(ie, null, ne(h.value, (v) => (r(), k(ie, {
107
+ key: v.key
108
+ }, [
109
+ v.key !== "actions" ? (r(), k("div", $l, [
110
+ Q("div", Ol, [
111
+ A(i(ul), {
112
+ modelValue: v.isActive,
113
+ "onUpdate:modelValue": [
114
+ (F) => v.isActive = F,
115
+ u[1] || (u[1] = (F) => I())
116
+ ],
117
+ class: "!w-fit"
118
+ }, null, 8, ["modelValue", "onUpdate:modelValue"]),
119
+ Q("div", Vl, Fe(v.label), 1)
120
+ ]),
121
+ h.value.length > 1 ? (r(), P(i(je), {
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(i(Be), {
138
+ label: "Edit Column",
139
+ "left-icon": "setting",
140
+ variant: "secondary"
141
+ })
142
+ ]),
143
+ _: 1
144
+ }, 8, ["modelValue"]));
145
+ }
146
+ }, Fl = { class: "relative flex flex-col gap-9" }, El = {
147
+ key: 0,
148
+ class: "flex items-center px-4 min-h-[52px]"
149
+ }, Cl = {
150
+ key: 0,
151
+ class: "absolute flex items-center gap-5 left-5"
152
+ }, Pl = {
153
+ key: 1,
154
+ class: "absolute flex gap-3 left-5"
155
+ }, Ll = {
156
+ key: 1,
157
+ class: "flex justify-center w-full gap-5 md:justify-start"
158
+ }, jl = {
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
+ },
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
+ },
208
+ setup(L, { expose: te, emit: oe }) {
209
+ var fe, ye, ge, be, ke, he, xe, we, Se, $e, Oe, Ve;
210
+ const s = L, h = oe, d = S(() => {
211
+ var e;
212
+ return (e = s.options) == null ? void 0 : e.cursor;
213
+ }), U = $(), O = S(() => {
214
+ var e;
215
+ return (e = s.options) == null ? void 0 : e.tableOptions;
216
+ }), I = S(() => s.localDb !== void 0), {
217
+ localData: j,
218
+ paginationData: u,
219
+ isLoading: v,
220
+ // Methods
221
+ bulkPutLocalData: F,
222
+ bulkDeleteLocalData: _,
223
+ getLocalDataUpdatedAt: ee,
224
+ getLocalDataIds: le,
225
+ syncLocalData: se,
226
+ sortByData: Te,
227
+ // toggleSort,
228
+ // Setters
229
+ setFilter: qe,
230
+ setSortBy: Qe
231
+ } = pl({
232
+ name: (fe = s.localDb) == null ? void 0 : fe.table_name,
233
+ localDb: (ye = s.localDb) == null ? void 0 : ye.db,
234
+ options: (ge = s.localDb) == null ? void 0 : ge.options
235
+ });
236
+ re(() => {
237
+ var e;
238
+ return (e = s.options) == null ? void 0 : e.pagination;
239
+ }, (e) => {
240
+ I.value || (u.value = e);
241
+ }, { deep: !0, immediate: !0 }), I.value && (re(() => s.filter, () => {
242
+ s.filter && qe(s.filter);
243
+ }, { deep: !0, immediate: !0 }), re(() => s.sortBy, () => {
244
+ s.sortBy && Qe(s.sortBy);
245
+ }, { deep: !0, immediate: !0 }));
246
+ const ve = S(() => {
247
+ var l;
248
+ const e = {
249
+ ...O.value,
250
+ headers: U.value ? U.value.map((n) => {
251
+ var p, f;
252
+ return n.class = ((f = (p = O.value) == null ? void 0 : p.headers.find((c) => c.key === n.key)) == null ? void 0 : f.class) ?? "", n;
253
+ }).filter((n) => n.isActive) : (l = O.value) == null ? void 0 : l.headers.filter((n) => We(n.key))
254
+ };
255
+ return I.value && (e.fields = j.value), e;
256
+ }), a = S(() => {
257
+ var e;
258
+ return (e = s.options) == null ? void 0 : e.filterOptions;
259
+ }), Re = S(() => {
260
+ var e;
261
+ return (e = s.options) == null ? void 0 : e.hidePerPageDropdown;
262
+ }), ze = S(() => {
263
+ var e;
264
+ return ((e = u.value) == null ? void 0 : e.last_page) === 1;
265
+ }), R = $(!1), K = $(s.filter[(ke = (be = a.value) == null ? void 0 : be.tabs) == null ? void 0 : ke.key]), N = $(s.filter.page), z = $(
266
+ (xe = (he = a.value) == null ? void 0 : he.per_page) != null && xe.key ? s.filter[(Se = (we = a.value) == null ? void 0 : we.per_page) == null ? void 0 : Se.key] : s.filter.per_page
267
+ ), ce = ((Ve = s.filter[(Oe = ($e = a.value) == null ? void 0 : $e.search) == null ? void 0 : Oe.key]) == null ? void 0 : Ve.trim()) ?? "", B = $(ce ? ce.split(",") : []), me = $(!1), Ne = S(
268
+ () => {
269
+ var e;
270
+ return kl((e = s.options) == null ? void 0 : e.perPageOptions);
271
+ }
272
+ ), Me = S(() => hl(Ne.value, u.value)), Ze = S(() => {
273
+ var e;
274
+ return ((e = s.selected) == null ? void 0 : e.length) > 0;
275
+ }), Ge = (e) => {
276
+ !e.trim() || !o.value.selectedSearchOption && B.value.includes(e) || (B.value = [e], V(), h("search-query-changed", e));
277
+ }, He = (e) => {
278
+ B.value = B.value.filter((l) => l !== e), V();
279
+ }, M = s.filter;
280
+ !M && u.value ? M.page = 1 : !M && d && (M.cursor = "");
281
+ const o = $(M), Je = S(() => gl(o.value, a.value)), We = (e) => {
282
+ var l, n, p, f, c, t;
283
+ return ((t = (c = (f = (p = o.value) == null ? void 0 : p[(n = (l = a.value) == null ? void 0 : l.columnEdit) == null ? void 0 : n.key]) == null ? void 0 : f.active) == null ? void 0 : c.find((g) => g.key === e)) == null ? void 0 : t.isActive) ?? !0;
284
+ }, Xe = ({ fixedHeaders: e, activeHeaders: l, isOnMount: n }) => {
285
+ var p, f, c, t, g, x, E, D;
286
+ if (o.value[(f = (p = a.value) == null ? void 0 : p.columnEdit) == null ? void 0 : f.key] || (o.value[(t = (c = a.value) == null ? void 0 : c.columnEdit) == null ? void 0 : t.key] = {}), o.value[(x = (g = a.value) == null ? void 0 : g.columnEdit) == null ? void 0 : x.key].fixed = e, o.value[(D = (E = a.value) == null ? void 0 : E.columnEdit) == null ? void 0 : D.key].active = l, U.value = [...e, ...l], !n) {
287
+ const T = fl(e, l);
288
+ yl(a.value.columnEdit.localStorageKey, T);
289
+ }
290
+ h("columns-changed", l);
291
+ }, Ye = () => {
292
+ var e, l, n, p, f, c;
293
+ if ((l = (e = a.value) == null ? void 0 : e.columnEdit) != null && l.localStorageKey) {
294
+ const t = Ue(a.value.columnEdit.localStorageKey);
295
+ if (t) {
296
+ const { fixed: g, active: x } = Ie(
297
+ t,
298
+ O.value.headers,
299
+ a.value.columnEdit.localStorageKey
300
+ );
301
+ o.value[(p = (n = a.value) == null ? void 0 : n.columnEdit) == null ? void 0 : p.key].fixed = g, o.value[(c = (f = a.value) == null ? void 0 : f.columnEdit) == null ? void 0 : c.key].active = x, U.value = [...g, ...x];
302
+ }
303
+ }
304
+ }, _e = (e) => {
305
+ o.value.selectedSearchOption = e;
306
+ }, el = () => {
307
+ B.value = [], K.value = "", o.value = bl(o.value, a.value, z.value, K.value), V();
308
+ }, ll = () => {
309
+ V(null, N.value);
310
+ }, pe = $(null), V = (e = null, l = !1, n = "", p = !1, f = !1) => {
311
+ var t, g, x, E, D, T, Z, G, H, J, W, X, Y;
312
+ u.value && !l && (N.value = 1), u.value ? o.value.page = N.value : o.value.cursor = n, (t = a.value) != null && t.per_page ? o.value[a.value.per_page.key] = z.value : o.value.per_page = z.value, (g = a.value) != null && g.tabs && f && (o.value[a.value.tabs.key] = K.value), (x = a.value) != null && x.search && ((D = (E = a.value.search) == null ? void 0 : E.options) != null && D.length ? (Object.keys(o.value).forEach((b) => {
313
+ var q;
314
+ (q = a.value.search.options) != null && q.map((m) => m.value).includes(b) && delete o.value[b];
315
+ }), o.value[((T = o.value) == null ? void 0 : T.selectedSearchOption) || ((H = (G = (Z = a.value.search) == null ? void 0 : Z.options) == null ? void 0 : G[0]) == null ? void 0 : H.value) || a.value.search.key] = B.value.join()) : o.value[a.value.search.key] = B.value.join()), e && (R.value = !1, o.value = { ...o.value, ...e }, Object.keys(o.value).forEach((b) => {
316
+ Array.isArray(o.value[b]) && o.value[b].length === 0 && delete o.value[b];
317
+ }));
318
+ let c = (W = (J = a.value) == null ? void 0 : J.tabs) == null ? void 0 : W.key;
319
+ if (c && K.value !== o.value[c]) {
320
+ const b = (Y = (X = a.value.tabs) == null ? void 0 : X.options) == null ? void 0 : Y.find(
321
+ (q) => {
322
+ var m, ae;
323
+ return ((m = q.value) == null ? void 0 : m.toString()) === ((ae = o.value[c]) == null ? void 0 : ae.toString());
324
+ }
325
+ );
326
+ if (b != null && b.value)
327
+ return K.value = b.value, V(), !1;
328
+ }
329
+ clearTimeout(pe.value), pe.value = setTimeout(() => {
330
+ h("update:filter", o.value, p);
331
+ }, 100);
332
+ }, al = (e, l) => {
333
+ (l === a.value.tabs.key || l === "tabs") && (K.value = ""), V(e), h("filter-removed", l);
334
+ };
335
+ Ae(() => {
336
+ Ye(), h("on-table-ready");
337
+ });
338
+ const ue = S(() => s.isLoading || v.value);
339
+ return te({
340
+ paginationData: u,
341
+ tableIsLoading: ue,
342
+ bulkPutLocalData: F,
343
+ bulkDeleteLocalData: _,
344
+ getLocalDataUpdatedAt: ee,
345
+ getLocalDataIds: le,
346
+ syncLocalData: se,
347
+ sortByData: Te
348
+ }), (e, l) => {
349
+ var n, p, f, c;
350
+ return r(), k("div", Fl, [
351
+ ve.value ? (r(), P(i(il), {
352
+ key: 0,
353
+ selected: L.selected,
354
+ "row-key": L.rowKey,
355
+ options: ve.value,
356
+ "is-loading": ue.value,
357
+ "loading-rows": z.value,
358
+ "row-class": L.rowClass,
359
+ "row-link": L.rowLink,
360
+ "is-sticky": O.value.isSticky,
361
+ "is-borderless": O.value.isBorderless,
362
+ "onUpdate:selected": l[8] || (l[8] = (t) => e.$emit("update:selected", t)),
363
+ "onClick:row": l[9] || (l[9] = (t) => e.$emit("click:row", t)),
364
+ "onHover:cell": l[10] || (l[10] = (t) => e.$emit("hover:cell", t))
365
+ }, sl({
366
+ after: w(() => [
367
+ C(e.$slots, "after")
368
+ ]),
369
+ empty: w(() => [
370
+ C(e.$slots, "empty")
371
+ ]),
372
+ "table-header": w((t) => [
373
+ C(e.$slots, "table-header", Ee(Ce(t)))
374
+ ]),
375
+ "table-body": w((t) => [
376
+ C(e.$slots, "table-body", Ee(Ce(t)))
377
+ ]),
378
+ _: 2
379
+ }, [
380
+ e.$slots.before || (n = a.value) != null && n.search || (p = a.value) != null && p.form || (f = a.value) != null && f.tabs ? {
381
+ name: "before",
382
+ fn: w(() => {
383
+ var t, g, x, E;
384
+ return [
385
+ C(e.$slots, "before"),
386
+ (t = a.value) != null && t.search || (g = a.value) != null && g.form || (x = a.value) != null && x.tabs ? (r(), k("div", El, [
387
+ Ze.value ? (r(), k("div", Cl, [
388
+ C(e.$slots, "bulk-actions", { selectedRows: L.selected })
389
+ ])) : (r(), k("div", Pl, [
390
+ (E = a.value) != null && E.tabs ? (r(), P(i(rl), {
391
+ key: 0,
392
+ modelValue: K.value,
393
+ "onUpdate:modelValue": [
394
+ l[0] || (l[0] = (D) => K.value = D),
395
+ l[1] || (l[1] = (D) => V(null, !1, "", !1, !0))
396
+ ],
397
+ "is-disabled": ue.value,
398
+ tabs: a.value.tabs.options,
399
+ variant: "pills"
400
+ }, null, 8, ["modelValue", "is-disabled", "tabs"])) : y("", !0)
401
+ ])),
402
+ C(e.$slots, "filter-options", {}, () => {
403
+ var D, T, Z, G, H, J, W, X, Y, b, q;
404
+ return [
405
+ (D = a.value) != null && D.search || (T = a.value) != null && T.form || (Z = a.value) != null && Z.columnEdit ? (r(), k("div", {
406
+ key: 0,
407
+ class: de([
408
+ "flex gap-3 absolute ml-auto bg-oc-bg-light right-4 max-w-[calc(100%-24px)]",
409
+ a.value ? me.value ? "md:w-fit w-full" : "" : "w-full justify-end"
410
+ ])
411
+ }, [
412
+ (G = a.value) != null && G.search ? (r(), P(i(nl), {
413
+ key: 0,
414
+ "is-search-only": !a.value.tabs || a.value.isSearchOnly,
415
+ "search-options": ((H = a.value.search) == null ? void 0 : H.options) ?? [],
416
+ "selected-option": (((J = o.value) == null ? void 0 : J.selectedSearchOption) || ((Y = (X = (W = a.value.search) == null ? void 0 : W.options) == null ? void 0 : X[0]) == null ? void 0 : Y.value)) ?? "keywords",
417
+ onAddQuery: Ge,
418
+ onToggle: l[2] || (l[2] = (m) => me.value = m),
419
+ onChangeSearchKey: _e
420
+ }, null, 8, ["is-search-only", "search-options", "selected-option"])) : y("", !0),
421
+ (b = a.value) != null && b.form ? (r(), P(i(Ke), {
422
+ key: 1,
423
+ modelValue: R.value,
424
+ "onUpdate:modelValue": [
425
+ l[6] || (l[6] = (m) => R.value = m),
426
+ l[7] || (l[7] = (m) => e.$emit("filter-open", m))
427
+ ],
428
+ distance: 9,
429
+ placement: "bottom-end",
430
+ "is-attach-to-body": ""
431
+ }, {
432
+ menu: w(() => [
433
+ R.value ? (r(), P(i(dl), {
434
+ key: 0,
435
+ id: L.id,
436
+ "json-form": a.value.form ?? [],
437
+ grid: a.value.grid ?? null,
438
+ values: s.filter,
439
+ actions: a.value.actions,
440
+ onApplyFilter: l[3] || (l[3] = (m) => V(m)),
441
+ onFilterFieldsChanged: l[4] || (l[4] = (m) => h("filter-fields-changed", m)),
442
+ onCancel: l[5] || (l[5] = (m) => R.value = !1)
443
+ }, {
444
+ default: w(({ errors: m, values: ae, jsonForm: tl, updateForm: ol }) => [
445
+ C(e.$slots, "custom-filter-form", {
446
+ errors: m,
447
+ values: ae,
448
+ jsonForm: tl,
449
+ updateFilter: ol
450
+ })
451
+ ]),
452
+ _: 3
453
+ }, 8, ["id", "json-form", "grid", "values", "actions"])) : y("", !0)
454
+ ]),
455
+ default: w(() => [
456
+ A(i(Be), {
457
+ "is-active": R.value,
458
+ variant: "secondary",
459
+ "left-icon": "filter"
460
+ }, null, 8, ["is-active"])
461
+ ]),
462
+ _: 3
463
+ }, 8, ["modelValue"])) : y("", !0),
464
+ a.value.columnEdit ? (r(), P(Dl, {
465
+ key: 2,
466
+ options: o.value.columnEdit,
467
+ headers: ((q = O.value) == null ? void 0 : q.headers) || [],
468
+ "local-key": a.value.columnEdit.localStorageKey,
469
+ onUpdateOrder: Xe
470
+ }, null, 8, ["options", "headers", "local-key"])) : y("", !0)
471
+ ], 2)) : y("", !0)
472
+ ];
473
+ })
474
+ ])) : y("", !0),
475
+ A(i(vl), {
476
+ filters: Je.value,
477
+ queries: B.value,
478
+ class: "border-t border-oc-gray-200",
479
+ onRemoveQuery: He,
480
+ onRemoveAll: el,
481
+ onRemoveFilter: al
482
+ }, null, 8, ["filters", "queries"])
483
+ ];
484
+ }),
485
+ key: "0"
486
+ } : void 0,
487
+ ne((c = O.value) == null ? void 0 : c.headers, (t, g) => ({
488
+ name: t.key,
489
+ fn: w(({ data: x, item: E }) => [
490
+ C(e.$slots, t.key, {
491
+ data: x,
492
+ item: E
493
+ })
494
+ ])
495
+ }))
496
+ ]), 1032, ["selected", "row-key", "options", "is-loading", "loading-rows", "row-class", "row-link", "is-sticky", "is-borderless"])) : y("", !0),
497
+ C(e.$slots, "before-pagination"),
498
+ i(u) || d.value ? (r(), k("div", {
499
+ key: 1,
500
+ class: de(["flex items-center gap-3", i(u) && i(u).last_page === 1 ? "justify-end" : ""])
501
+ }, [
502
+ i(u) && !ze.value ? (r(), P(i(cl), {
503
+ key: 0,
504
+ modelValue: N.value,
505
+ "onUpdate:modelValue": [
506
+ l[11] || (l[11] = (t) => N.value = t),
507
+ ll
508
+ ],
509
+ class: "justify-center",
510
+ "max-page": i(u).last_page,
511
+ strategy: i(u).strategy,
512
+ "total-visible": "5"
513
+ }, null, 8, ["modelValue", "max-page", "strategy"])) : y("", !0),
514
+ d.value ? (r(), k("div", Ll, [
515
+ A(i(Pe), {
516
+ disabled: !d.value.prev,
517
+ onClick: l[12] || (l[12] = (t) => d.value.prev ? V(null, !1, d.value.prev) : null)
518
+ }, null, 8, ["disabled"]),
519
+ A(i(Pe), {
520
+ disabled: !d.value.next,
521
+ "is-next": "",
522
+ onClick: l[13] || (l[13] = (t) => d.value.next ? V(null, !1, d.value.next) : null)
523
+ }, null, 8, ["disabled"])
524
+ ])) : y("", !0),
525
+ Re.value ? y("", !0) : (r(), k("div", jl, [
526
+ A(i(ml), {
527
+ modelValue: z.value,
528
+ "onUpdate:modelValue": [
529
+ l[14] || (l[14] = (t) => z.value = t),
530
+ l[15] || (l[15] = (t) => V(null))
531
+ ],
532
+ label: "Item per page",
533
+ "is-inline-label": "",
534
+ "popper-options": { placement: "auto" },
535
+ options: Me.value
536
+ }, null, 8, ["modelValue", "options"])
537
+ ]))
538
+ ], 2)) : y("", !0)
539
+ ]);
540
+ };
541
+ }
542
+ };
543
+ export {
544
+ zl as default
545
+ };
@@ -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-yXxch8P2.js";
2
+ import { aI as D, aE as S, az as B } from "./index-BuPthmbI.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-yXxch8P2.js";
2
+ import { az as U, d as J, B as _ } from "./index-BuPthmbI.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-yXxch8P2.js";
2
+ import { u as w, B as m } from "./index-BuPthmbI.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-yXxch8P2.js";
2
+ import { d as D, az as E, aA as F, B as w } from "./index-BuPthmbI.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-yXxch8P2.js";
2
+ import { M as $, au as c } from "./index-BuPthmbI.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-yXxch8P2.js";
3
- import k from "./OcCropper-CCf97Pam.js";
2
+ import { aB as b } from "./index-BuPthmbI.js";
3
+ import k from "./OcCropper-D1hXuCbl.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-yXxch8P2.js";
2
+ import { az as S, d as h, aJ as D } from "./index-BuPthmbI.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-yXxch8P2.js";
1
+ import { ax as r } from "../../index-BuPthmbI.js";
2
2
  export {
3
3
  r as ConfirmationModal
4
4
  };
@@ -1,4 +1,4 @@
1
- import { ay as a } from "../../index-yXxch8P2.js";
1
+ import { ay as a } from "../../index-BuPthmbI.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-yXxch8P2.js";
1
+ import { az as r, aA as p } from "../../index-BuPthmbI.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-yXxch8P2.js";
1
+ import { aB as d, aC as e } from "../../index-BuPthmbI.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-yXxch8P2.js";
1
+ import { aD as r } from "../../index-BuPthmbI.js";
2
2
  export {
3
3
  r as SupportMenu
4
4
  };
@@ -1,4 +1,4 @@
1
- import { aE as p } from "../../index-yXxch8P2.js";
1
+ import { aE as p } from "../../index-BuPthmbI.js";
2
2
  export {
3
3
  p as Tooltip
4
4
  };
@@ -1,4 +1,4 @@
1
- import { aF as e } from "../../index-yXxch8P2.js";
1
+ import { aF as e } from "../../index-BuPthmbI.js";
2
2
  export {
3
3
  e as WhiteList
4
4
  };
@@ -1,5 +1,5 @@
1
1
  import { computed as l, createElementBlock as o, openBlock as a, normalizeClass as d, createElementVNode as e, createBlock as x, createCommentVNode as u, toDisplayString as r, unref as m, createTextVNode as v, Fragment as T, renderList as k, createVNode as P } from "vue";
2
- import { au as _, B as w } from "./index-yXxch8P2.js";
2
+ import { au as _, B as w } from "./index-BuPthmbI.js";
3
3
  import { _ as C } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  import { _ as F } from "./OcIcon-CBf___w1.js";
5
5
  const B = { class: "z-10 flex flex-col gap-4 p-9 relative" }, E = { class: "flex items-center gap-4" }, A = { class: "font-medium text-xl" }, N = { class: "flex gap-3 items-center mb-5" }, S = { class: "flex items-start gap-2" }, V = { class: "text-[24px] font-medium tracking-tighter" }, q = { class: "text-[40px] leading-none font-medium" }, z = { key: 0 }, $ = {