@orchidui/core 1.8.1-96 → 1.8.1-97

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