@orchidui/core 1.8.1-96 → 1.8.1-98

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-C73sJuwM.js} +1 -1
  64. package/dist/{OcComplexCalendar-BRRzdqRM.js → OcComplexCalendar-ClFb15rl.js} +1 -1
  65. package/dist/{OcComplexDatePicker-jXJ8M2gG.js → OcComplexDatePicker-CFhMH5H6.js} +1 -1
  66. package/dist/{OcCropper-D8_KYwgc.js → OcCropper-CgxtOYSE.js} +1 -1
  67. package/dist/OcDataTable-DElje0Is.js +540 -0
  68. package/dist/{OcDraggableList-DrZ8zHi_.js → OcDraggableList-BJH4x4Q8.js} +1 -1
  69. package/dist/{OcEmojiPicker-C9yhF03q.js → OcEmojiPicker-CAIlTxe3.js} +12 -14
  70. package/dist/{OcFilterForm-2SH7elEv.js → OcFilterForm-mpS3jm_G.js} +17 -19
  71. package/dist/{OcFilterSearch-4zBhbcBD.js → OcFilterSearch-SU-xsa_Y.js} +7 -12
  72. package/dist/{OcFilterSearchFor-Cmmudlpk.js → OcFilterSearchFor-B3xBoh2i.js} +24 -18
  73. package/dist/{OcModalCropper-B3-W44XM.js → OcModalCropper-D8Dn1hu6.js} +2 -2
  74. package/dist/{OcTimePicker-DsLVi2Wh.js → OcTimePicker-CylE6k53.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-CUGjVG9p.js} +1 -1
  84. package/dist/{ThumbnailSection-BHvgeuIm.js → ThumbnailSection-DDZ4nHvM.js} +1 -1
  85. package/dist/{ThumbnailTheme-U9LGqEpQ.js → ThumbnailTheme-BPW_bXq7.js} +4 -7
  86. package/dist/core.css +1 -1
  87. package/dist/{index-DZXv72gg.js → index-CUSl7Kjq.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-CUSl7Kjq.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,540 @@
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 N, createElementBlock as h, createCommentVNode as b, mergeProps as Ve, Fragment as ue, renderList as ie, normalizeClass as re, toDisplayString as Ee, computed as V, watch as te, 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-CUSl7Kjq.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 gl, getItemsPerPageOptions as yl } 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: oe }) {
39
+ const s = oe, 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": () => I()
47
+ }, I = (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((se) => se.key === E.key)) == null ? void 0 : l.isActive) ?? !0
64
+ };
65
+ }), I(!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
+ N("div", hl, [
74
+ f.value.length ? (i(), h("div", Sl, [
75
+ v[4] || (v[4] = N("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(ue, 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
+ N("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
+ N("div", xl, [
100
+ v[5] || (v[5] = N("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(ue, null, ie(n.value, (c) => (i(), h(ue, {
108
+ key: c.key
109
+ }, [
110
+ c.key !== "actions" ? (i(), h("div", wl, [
111
+ N("div", Ol, [
112
+ T(u(tl), {
113
+ modelValue: c.isActive,
114
+ "onUpdate:modelValue": [
115
+ (E) => c.isActive = E,
116
+ v[1] || (v[1] = (E) => I())
117
+ ],
118
+ class: "!w-fit"
119
+ }, null, 8, ["modelValue", "onUpdate:modelValue"]),
120
+ N("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: oe }) {
209
+ var me, fe, ge, ye, be, ke, he, Se, xe, we, Oe, $e, Fe;
210
+ const s = A, O = oe;
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
+ }), I = 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: (ge = s.localDataOptions) == null ? void 0 : ge.db,
231
+ options: (ye = s.localDataOptions) == null ? void 0 : ye.options
232
+ });
233
+ I.value && (n.value = E.value, te(() => s.filter, (e) => {
234
+ v(e);
235
+ }, { deep: !0 }), te(() => s.sortBy, (e) => {
236
+ c(e);
237
+ }, { deep: !0 }), te(() => E.value, (e) => {
238
+ n.value = e;
239
+ }, { deep: !0 }), v(s.filter), c(s.sortBy)), te(() => {
240
+ var e;
241
+ return (e = s.options) == null ? void 0 : e.pagination;
242
+ }, (e) => {
243
+ I.value || (n.value = e);
244
+ }, { deep: !0 });
245
+ const le = V(() => {
246
+ var a;
247
+ const e = {
248
+ ...$.value,
249
+ headers: B.value ? B.value.map((r) => {
250
+ var p, m;
251
+ return r.class = ((m = (p = $.value) == null ? void 0 : p.headers.find((d) => d.key === r.key)) == null ? void 0 : m.class) ?? "", r;
252
+ }).filter((r) => r.isActive) : (a = $.value) == null ? void 0 : a.headers.filter((r) => Me(r.key))
253
+ };
254
+ return I.value && (e.fields = K.value), e;
255
+ }), l = V(() => {
256
+ var e;
257
+ return (e = s.options) == null ? void 0 : e.filterOptions;
258
+ }), se = V(() => {
259
+ var e;
260
+ return (e = s.options) == null ? void 0 : e.hidePerPageDropdown;
261
+ }), Ie = V(() => {
262
+ var e;
263
+ return ((e = n.value) == null ? void 0 : e.last_page) === 1;
264
+ }), 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(
265
+ (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
266
+ ), 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(
267
+ () => {
268
+ var e;
269
+ return gl((e = s.options) == null ? void 0 : e.perPageOptions);
270
+ }
271
+ ), Qe = V(() => yl(qe.value, n.value)), Ne = V(() => {
272
+ var e;
273
+ return ((e = s.selected) == null ? void 0 : e.length) > 0;
274
+ }), ve = (e) => {
275
+ !e.trim() || !t.value.selectedSearchOption && U.value.includes(e) || (U.value = [e], F(), O("search-query-changed", e));
276
+ }, Re = (e) => {
277
+ U.value = U.value.filter((a) => a !== e), F();
278
+ }, J = s.filter;
279
+ !J && n.value ? J.page = 1 : !J && f && (J.cursor = "");
280
+ const t = x(J), ze = V(() => ml(t.value, l.value)), Me = (e) => {
281
+ var a, r, p, m, d, o;
282
+ 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((g) => g.key === e)) == null ? void 0 : o.isActive) ?? !0;
283
+ }, Je = ({ fixedHeaders: e, activeHeaders: a, isOnMount: r }) => {
284
+ var p, m, d, o, g, S, C, D;
285
+ 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 = (g = l.value) == null ? void 0 : g.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) {
286
+ const q = vl(e, a);
287
+ cl(l.value.columnEdit.localStorageKey, q);
288
+ }
289
+ O("columns-changed", a);
290
+ }, Ze = () => {
291
+ var e, a, r, p, m, d;
292
+ if ((a = (e = l.value) == null ? void 0 : e.columnEdit) != null && a.localStorageKey) {
293
+ const o = Ue(l.value.columnEdit.localStorageKey);
294
+ if (o) {
295
+ const { fixed: g, active: S } = Be(
296
+ o,
297
+ $.value.headers,
298
+ l.value.columnEdit.localStorageKey
299
+ );
300
+ t.value[(p = (r = l.value) == null ? void 0 : r.columnEdit) == null ? void 0 : p.key].fixed = g, t.value[(d = (m = l.value) == null ? void 0 : m.columnEdit) == null ? void 0 : d.key].active = S, B.value = [...g, ...S];
301
+ }
302
+ }
303
+ }, Ge = (e) => {
304
+ t.value.selectedSearchOption = e;
305
+ }, He = () => {
306
+ U.value = [], L.value = "", t.value = fl(t.value, l.value, M.value, L.value), F();
307
+ }, We = () => {
308
+ F(null, z.value);
309
+ }, Xe = () => {
310
+ kl(s.id, t.value);
311
+ }, Ye = () => bl(s.id), ce = x(null), F = (e = null, a = !1, r = "", p = !1, m = !1) => {
312
+ var o, g, S, C, D, q, Z, G, H, W, X, Y, _;
313
+ 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, (g = l.value) != null && g.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) => {
314
+ var Q;
315
+ (Q = l.value.search.options) != null && Q.map((y) => y.value).includes(k) && delete t.value[k];
316
+ }), t.value[((q = t.value) == null ? void 0 : q.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) => {
317
+ Array.isArray(t.value[k]) && t.value[k].length === 0 && delete t.value[k];
318
+ }));
319
+ let d = (X = (W = l.value) == null ? void 0 : W.tabs) == null ? void 0 : X.key;
320
+ if (d && L.value !== t.value[d]) {
321
+ const k = (_ = (Y = l.value.tabs) == null ? void 0 : Y.options) == null ? void 0 : _.find(
322
+ (Q) => {
323
+ var y, ae;
324
+ return ((y = Q.value) == null ? void 0 : y.toString()) === ((ae = t.value[d]) == null ? void 0 : ae.toString());
325
+ }
326
+ );
327
+ if (k != null && k.value)
328
+ return L.value = k.value, F(), !1;
329
+ }
330
+ Xe(), clearTimeout(ce.value), ce.value = setTimeout(() => {
331
+ O("update:filter", t.value, p);
332
+ }, 100);
333
+ }, _e = (e, a) => {
334
+ (a === l.value.tabs.key || a === "tabs") && (L.value = ""), F(e), O("filter-removed", a);
335
+ };
336
+ Ae(() => {
337
+ var a, r, p, m, d, o, g;
338
+ Ze();
339
+ const e = Ye();
340
+ 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 = ((g = t.value) == null ? void 0 : g.page) || 1, F(null, !0, t.value.cursor, !0));
341
+ });
342
+ const pe = V(() => s.isLoading || ee.value);
343
+ return (e, a) => {
344
+ var r, p, m, d;
345
+ return i(), h("div", Vl, [
346
+ $.value ? (i(), j(u(ol), {
347
+ key: 0,
348
+ selected: A.selected,
349
+ "row-key": A.rowKey,
350
+ options: le.value,
351
+ "is-loading": pe.value,
352
+ "loading-rows": M.value,
353
+ "row-class": A.rowClass,
354
+ "row-link": A.rowLink,
355
+ "is-sticky": $.value.isSticky,
356
+ "is-borderless": $.value.isBorderless,
357
+ "onUpdate:selected": a[8] || (a[8] = (o) => e.$emit("update:selected", o)),
358
+ "onClick:row": a[9] || (a[9] = (o) => e.$emit("click:row", o)),
359
+ "onHover:cell": a[10] || (a[10] = (o) => e.$emit("hover:cell", o))
360
+ }, al({
361
+ after: w(() => [
362
+ P(e.$slots, "after")
363
+ ]),
364
+ empty: w(() => [
365
+ P(e.$slots, "empty")
366
+ ]),
367
+ "table-header": w((o) => [
368
+ P(e.$slots, "table-header", De(Le(o)))
369
+ ]),
370
+ "table-body": w((o) => [
371
+ P(e.$slots, "table-body", De(Le(o)))
372
+ ]),
373
+ _: 2
374
+ }, [
375
+ e.$slots.before || (r = l.value) != null && r.search || (p = l.value) != null && p.form || (m = l.value) != null && m.tabs ? {
376
+ name: "before",
377
+ fn: w(() => {
378
+ var o, g, S, C;
379
+ return [
380
+ P(e.$slots, "before"),
381
+ (o = l.value) != null && o.search || (g = l.value) != null && g.form || (S = l.value) != null && S.tabs ? (i(), h("div", El, [
382
+ Ne.value ? (i(), h("div", Dl, [
383
+ P(e.$slots, "bulk-actions", { selectedRows: A.selected })
384
+ ])) : (i(), h("div", Ll, [
385
+ (C = l.value) != null && C.tabs ? (i(), j(u(sl), {
386
+ key: 0,
387
+ modelValue: L.value,
388
+ "onUpdate:modelValue": [
389
+ a[0] || (a[0] = (D) => L.value = D),
390
+ a[1] || (a[1] = (D) => F(null, !1, "", !1, !0))
391
+ ],
392
+ "is-disabled": pe.value,
393
+ tabs: l.value.tabs.options,
394
+ variant: "pills"
395
+ }, null, 8, ["modelValue", "is-disabled", "tabs"])) : b("", !0)
396
+ ])),
397
+ P(e.$slots, "filter-options", {}, () => {
398
+ var D, q, Z, G, H, W, X, Y, _, k, Q;
399
+ return [
400
+ (D = l.value) != null && D.search || (q = l.value) != null && q.form || (Z = l.value) != null && Z.columnEdit ? (i(), h("div", {
401
+ key: 0,
402
+ class: re([
403
+ "flex gap-3 absolute ml-auto bg-oc-bg-light right-4 max-w-[calc(100%-24px)]",
404
+ l.value ? de.value ? "md:w-fit w-full" : "" : "w-full justify-end"
405
+ ])
406
+ }, [
407
+ (G = l.value) != null && G.search ? (i(), j(u(ul), {
408
+ key: 0,
409
+ "is-search-only": !l.value.tabs || l.value.isSearchOnly,
410
+ "search-options": ((H = l.value.search) == null ? void 0 : H.options) ?? [],
411
+ "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",
412
+ onAddQuery: ve,
413
+ onToggle: a[2] || (a[2] = (y) => de.value = y),
414
+ onChangeSearchKey: Ge
415
+ }, null, 8, ["is-search-only", "search-options", "selected-option"])) : b("", !0),
416
+ (k = l.value) != null && k.form ? (i(), j(u(Ke), {
417
+ key: 1,
418
+ modelValue: R.value,
419
+ "onUpdate:modelValue": [
420
+ a[6] || (a[6] = (y) => R.value = y),
421
+ a[7] || (a[7] = (y) => e.$emit("filter-open", y))
422
+ ],
423
+ distance: 9,
424
+ placement: "bottom-end",
425
+ "is-attach-to-body": ""
426
+ }, {
427
+ menu: w(() => [
428
+ R.value ? (i(), j(u(il), {
429
+ key: 0,
430
+ id: A.id,
431
+ "json-form": l.value.form ?? [],
432
+ grid: l.value.grid ?? null,
433
+ values: s.filter,
434
+ actions: l.value.actions,
435
+ onApplyFilter: a[3] || (a[3] = (y) => F(y)),
436
+ onFilterFieldsChanged: a[4] || (a[4] = (y) => O("filter-fields-changed", y)),
437
+ onCancel: a[5] || (a[5] = (y) => R.value = !1)
438
+ }, {
439
+ default: w(({ errors: y, values: ae, jsonForm: el, updateForm: ll }) => [
440
+ P(e.$slots, "custom-filter-form", {
441
+ errors: y,
442
+ values: ae,
443
+ jsonForm: el,
444
+ updateFilter: ll
445
+ })
446
+ ]),
447
+ _: 3
448
+ }, 8, ["id", "json-form", "grid", "values", "actions"])) : b("", !0)
449
+ ]),
450
+ default: w(() => [
451
+ T(u(Te), {
452
+ "is-active": R.value,
453
+ variant: "secondary",
454
+ "left-icon": "filter"
455
+ }, null, 8, ["is-active"])
456
+ ]),
457
+ _: 3
458
+ }, 8, ["modelValue"])) : b("", !0),
459
+ l.value.columnEdit ? (i(), j(Fl, {
460
+ key: 2,
461
+ options: t.value.columnEdit,
462
+ headers: ((Q = $.value) == null ? void 0 : Q.headers) || [],
463
+ "local-key": l.value.columnEdit.localStorageKey,
464
+ onUpdateOrder: Je
465
+ }, null, 8, ["options", "headers", "local-key"])) : b("", !0)
466
+ ], 2)) : b("", !0)
467
+ ];
468
+ })
469
+ ])) : b("", !0),
470
+ T(u(rl), {
471
+ filters: ze.value,
472
+ queries: U.value,
473
+ class: "border-t border-oc-gray-200",
474
+ onRemoveQuery: Re,
475
+ onRemoveAll: He,
476
+ onRemoveFilter: _e
477
+ }, null, 8, ["filters", "queries"])
478
+ ];
479
+ }),
480
+ key: "0"
481
+ } : void 0,
482
+ ie((d = $.value) == null ? void 0 : d.headers, (o, g) => ({
483
+ name: o.key,
484
+ fn: w(({ data: S, item: C }) => [
485
+ P(e.$slots, o.key, {
486
+ data: S,
487
+ item: C
488
+ })
489
+ ])
490
+ }))
491
+ ]), 1032, ["selected", "row-key", "options", "is-loading", "loading-rows", "row-class", "row-link", "is-sticky", "is-borderless"])) : b("", !0),
492
+ P(e.$slots, "before-pagination"),
493
+ u(n) || f.value ? (i(), h("div", {
494
+ key: 1,
495
+ class: re(["flex items-center gap-3", u(n) && u(n).last_page === 1 ? "justify-end" : ""])
496
+ }, [
497
+ u(n) && !Ie.value ? (i(), j(u(nl), {
498
+ key: 0,
499
+ modelValue: z.value,
500
+ "onUpdate:modelValue": [
501
+ a[11] || (a[11] = (o) => z.value = o),
502
+ We
503
+ ],
504
+ class: "justify-center",
505
+ "max-page": u(n).last_page,
506
+ strategy: u(n).strategy,
507
+ "total-visible": "5"
508
+ }, null, 8, ["modelValue", "max-page", "strategy"])) : b("", !0),
509
+ f.value ? (i(), h("div", Cl, [
510
+ T(u(Ce), {
511
+ disabled: !f.value.prev,
512
+ onClick: a[12] || (a[12] = (o) => f.value.prev ? F(null, !1, f.value.prev) : null)
513
+ }, null, 8, ["disabled"]),
514
+ T(u(Ce), {
515
+ disabled: !f.value.next,
516
+ "is-next": "",
517
+ onClick: a[13] || (a[13] = (o) => f.value.next ? F(null, !1, f.value.next) : null)
518
+ }, null, 8, ["disabled"])
519
+ ])) : b("", !0),
520
+ se.value ? b("", !0) : (i(), h("div", Pl, [
521
+ T(u(dl), {
522
+ modelValue: M.value,
523
+ "onUpdate:modelValue": [
524
+ a[14] || (a[14] = (o) => M.value = o),
525
+ a[15] || (a[15] = (o) => F(null))
526
+ ],
527
+ label: "Item per page",
528
+ "is-inline-label": "",
529
+ "popper-options": { placement: "auto" },
530
+ options: Qe.value
531
+ }, null, 8, ["modelValue", "options"])
532
+ ]))
533
+ ], 2)) : b("", !0)
534
+ ]);
535
+ };
536
+ }
537
+ };
538
+ export {
539
+ Rl as default
540
+ };
@@ -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-CUSl7Kjq.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-CUSl7Kjq.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",