@orchidui/core 1.8.1-120 → 1.8.1-122

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