@orchidui/core 1.6.1-42 → 1.6.1-44

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 (82) hide show
  1. package/dist/DataDisplay/CustomerCard/OcCustomerCard.js +1 -1
  2. package/dist/DataDisplay/FloatContent/OcFloatContent.js +1 -1
  3. package/dist/DataDisplay/InfoCard/OcInfoCard.js +1 -1
  4. package/dist/DataDisplay/ListDetail/OcListDetail.js +1 -1
  5. package/dist/DataDisplay/ListItem/OcListItem.js +1 -1
  6. package/dist/DataDisplay/OnboardingListItem/OcOnboardingListItem.js +1 -1
  7. package/dist/DataDisplay/Overview/OcOverview.js +1 -1
  8. package/dist/DataDisplay/Pagination/OcPagination.js +1 -1
  9. package/dist/DataDisplay/Table/OcTable.js +1 -1
  10. package/dist/DataDisplay/TransferSummary/OcTransferSummary.js +1 -1
  11. package/dist/Disclosure/Accordion/OcAccordion.js +1 -1
  12. package/dist/Disclosure/OnboardingAccordion/OnboardingAccordion.js +1 -1
  13. package/dist/Disclosure/Steps/OcSteps.js +1 -1
  14. package/dist/Disclosure/Tabs/Tabs.js +1 -1
  15. package/dist/Disclosure/Variants/OcVariants.js +1 -1
  16. package/dist/Elements/AdditionalContent/OcAdditionalContent.js +1 -1
  17. package/dist/Elements/AuthenticationOption/AuthenticationOption.js +1 -1
  18. package/dist/Elements/Box/OcBox.js +1 -1
  19. package/dist/Elements/EmptyPage/OcEmptyPage.js +1 -1
  20. package/dist/Elements/FeatureOverviewCard/OcFeatureOverviewCard.js +1 -1
  21. package/dist/Elements/Header/OcHeader.js +1 -1
  22. package/dist/Elements/PageTitle/OcPageTitle.js +1 -1
  23. package/dist/Elements/SandboxBanner/OcSandboxBanner.js +1 -1
  24. package/dist/Elements/Sidebar/OcSidebar.js +2 -2
  25. package/dist/Elements/SubSidebar/OcSubSidebar.js +1 -1
  26. package/dist/Elements/VerificationOption/OcVerificationOption.js +1 -1
  27. package/dist/Feedback/Banner/OcBanner.js +1 -1
  28. package/dist/Feedback/Chip/OcChip.js +1 -1
  29. package/dist/Feedback/ShareIcon/OcShareIcon.js +1 -1
  30. package/dist/Feedback/Snackbar/OcSnackbar.js +1 -1
  31. package/dist/Form/BaseInput/OcBaseInput.js +1 -1
  32. package/dist/Form/Button/OcButton.js +1 -1
  33. package/dist/Form/Calendar/OcCalendar.js +1 -1
  34. package/dist/Form/CardInput/OcCardInput.js +1 -1
  35. package/dist/Form/Checkbox/OcCheckbox.js +1 -1
  36. package/dist/Form/CheckboxesGroup/OcCheckboxesGroup.js +1 -1
  37. package/dist/Form/Criteria/OcCriteria.js +1 -1
  38. package/dist/Form/Cropper/OcCropper.js +1 -1
  39. package/dist/Form/DatePicker/OcDatePicker.js +1 -1
  40. package/dist/Form/EmojiPicker/OcEmojiPicker.js +1 -1
  41. package/dist/Form/Input/OcInput.js +1 -1
  42. package/dist/Form/LinkInput/OcLinkInput.js +1 -1
  43. package/dist/Form/MultipleUploadFile/OcMultipleUploadFile.js +1 -1
  44. package/dist/Form/NumberInput/OcNumberInput.js +1 -1
  45. package/dist/Form/PhoneInput/OcPhoneInput.js +1 -1
  46. package/dist/Form/Radio/OcRadio.js +1 -1
  47. package/dist/Form/RadioGroup/OcRadioGroup.js +1 -1
  48. package/dist/Form/RangeInput/OcRangeInput.js +1 -1
  49. package/dist/Form/SectionItem/OcSectionItem.js +1 -1
  50. package/dist/Form/Select/OcSelect.js +1 -1
  51. package/dist/Form/SelectOptions/OcSelectOptions.js +1 -1
  52. package/dist/Form/SingleFileUpload/OcSingleFileUpload.js +1 -1
  53. package/dist/Form/Slider/OcSlider.js +1 -1
  54. package/dist/Form/TextArea/OcTextArea.js +1 -1
  55. package/dist/Form/index.js +1 -1
  56. package/dist/FormBuilder/OcFormBuilder.js +1 -1
  57. package/dist/{OcAccountSetupProgress-BEvzpxHA.js → OcAccountSetupProgress-KyF9ZIGq.js} +1 -1
  58. package/dist/{OcComplexCalendar-Cu0OQeUw.js → OcComplexCalendar-CEkiSzK1.js} +1 -1
  59. package/dist/{OcComplexDatePicker-BUF577DX.js → OcComplexDatePicker-BBISOWxr.js} +1 -1
  60. package/dist/{OcCropper-T8qF18Mc.js → OcCropper-Cm6x5fzz.js} +1 -1
  61. package/dist/OcDataTable-D4xfOG_A.js +580 -0
  62. package/dist/{OcDraggableList-DV_G4fLO.js → OcDraggableList-ZuC2FpOj.js} +1 -1
  63. package/dist/{OcEmojiPicker-DEL0bfFQ.js → OcEmojiPicker-Dna6fPz3.js} +1 -1
  64. package/dist/{OcFilterForm-t7vUwm6L.js → OcFilterForm-BGVmDqhk.js} +1 -1
  65. package/dist/{OcFilterSearch-BT1vp6YR.js → OcFilterSearch-Bq4xH5eu.js} +1 -1
  66. package/dist/{OcFilterSearchFor-CLQ_7Ua1.js → OcFilterSearchFor-BGKnKMHd.js} +1 -1
  67. package/dist/{OcModalCropper-79ogwsUB.js → OcModalCropper-Z-b4aIh3.js} +2 -2
  68. package/dist/{OcTimePicker-BAm8ge4F.js → OcTimePicker-BY_8FYtw.js} +1 -1
  69. package/dist/Overlay/ConfirmationModal/OcConfirmationModal.js +1 -1
  70. package/dist/Overlay/CopyTooltip/OcCopyTooltip.js +1 -1
  71. package/dist/Overlay/Dropdown/OcDropdown.js +1 -1
  72. package/dist/Overlay/Modal/OcModal.js +1 -1
  73. package/dist/Overlay/SupportMenu/OcSupportMenu.js +1 -1
  74. package/dist/Overlay/Tooltip/OcTooltip.js +1 -1
  75. package/dist/Overlay/Whitelist/OcWhiteList.js +1 -1
  76. package/dist/{SubPlanCard-BRZs5Axy.js → SubPlanCard-DSY0PnnG.js} +1 -1
  77. package/dist/{ThumbnailSection-5GALP4uk.js → ThumbnailSection-kTGyvMVn.js} +1 -1
  78. package/dist/{ThumbnailTheme-_TbrU6pX.js → ThumbnailTheme-DdXEBj4o.js} +1 -1
  79. package/dist/{index-xtm5MoHG.js → index-DjRSPw5W.js} +8 -8
  80. package/dist/index.js +1 -1
  81. package/package.json +1 -1
  82. package/dist/OcDataTable-CuoH5ZtW.js +0 -570
@@ -0,0 +1,580 @@
1
+ import { ref as U, onMounted as Se, openBlock as n, createBlock as Y, unref as b, withCtx as V, createElementVNode as Z, createElementBlock as $, createVNode as T, mergeProps as be, Fragment as ee, renderList as ae, normalizeClass as te, toDisplayString as ke, createCommentVNode as h, computed as A, createSlots as ze, renderSlot as K, normalizeProps as he, guardReactiveProps as xe } from "vue";
2
+ import { ay as Ve, b as Ze, B as Ee, L as Ge, Z as He, aJ as We, aK as Xe, aL as el, I as ll, J as _e, k as al } from "./index-DjRSPw5W.js";
3
+ import le from "dayjs";
4
+ import { VueDraggableNext as we } from "vue-draggable-next";
5
+ import { getFromLocalStorage as oe, formatHeadersFromLocalStorage as Oe, formatHeadersToLocalStorage as tl, setInLocalStorage as $e } from "./DataTable/utils/editColumnsUtils.js";
6
+ import { _ as Fe } from "./OcIcon-CJgBICxh.js";
7
+ const ol = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, sl = {
8
+ key: 0,
9
+ class: "gap-y-2 flex flex-col border-b pb-3 border-oc-gray-200"
10
+ }, ul = { class: "gap-y-2 flex flex-col" }, rl = {
11
+ key: 0,
12
+ class: "flex items-center bg-white justify-between h-[26px]"
13
+ }, il = { class: "flex items-center w-full gap-x-3" }, nl = { class: "truncate w-full max-w-[160px]" }, dl = {
14
+ __name: "ColumnEdit",
15
+ props: {
16
+ options: {
17
+ type: Object,
18
+ default: () => ({})
19
+ },
20
+ headers: {
21
+ type: Array,
22
+ default: () => []
23
+ },
24
+ localKey: {
25
+ type: String,
26
+ default: ""
27
+ }
28
+ },
29
+ emits: ["change-active", "onMoved", "update-order"],
30
+ setup(P, { emit: X }) {
31
+ const v = X, E = P, c = U([]), m = U([]), R = U(!1), F = (a = !1) => {
32
+ m.value = m.value.map((y) => ({
33
+ ...y,
34
+ isActive: !0
35
+ })), v("update-order", {
36
+ fixedHeaders: m.value,
37
+ activeHeaders: c.value,
38
+ isOnMount: a
39
+ });
40
+ }, H = {
41
+ handle: ".drag-el",
42
+ filter: ".is-disabled",
43
+ group: "headers",
44
+ animation: 500,
45
+ forceFallback: !1,
46
+ move: (a) => a.to.dataset.activeHeaders ? !0 : !!a.draggedContext.futureIndex,
47
+ "onUpdate:modelValue": () => F()
48
+ };
49
+ return Se(() => {
50
+ const a = oe(E.localKey), { fixed: y, active: g } = Oe(a, E.headers, E.localKey);
51
+ m.value = y || E.headers.slice(0, 1), c.value = g || E.headers.slice(1).map((x) => {
52
+ var _, N, D;
53
+ return {
54
+ ...x,
55
+ isActive: ((D = (N = (_ = E.options) == null ? void 0 : _.active) == null ? void 0 : N.find((W) => W.key === x.key)) == null ? void 0 : D.isActive) ?? !0
56
+ };
57
+ }), F(!0);
58
+ }), (a, y) => (n(), Y(b(Ve), {
59
+ modelValue: R.value,
60
+ "onUpdate:modelValue": y[3] || (y[3] = (g) => R.value = g),
61
+ class: "h-[36px]",
62
+ "is-attach-to-body": ""
63
+ }, {
64
+ menu: V(() => [
65
+ Z("div", ol, [
66
+ m.value.length ? (n(), $("div", sl, [
67
+ y[4] || (y[4] = Z("span", { class: "text-oc-text-400 font-medium" }, "Fixed columns", -1)),
68
+ T(b(we), be({
69
+ key: "key",
70
+ modelValue: m.value,
71
+ "onUpdate:modelValue": y[0] || (y[0] = (g) => m.value = g)
72
+ }, H), {
73
+ default: V(() => [
74
+ (n(!0), $(ee, null, ae(m.value, (g, x) => (n(), $("div", {
75
+ key: g.key,
76
+ class: te(["flex items-center justify-between h-[26px]", x ? "" : "is-disabled"])
77
+ }, [
78
+ Z("span", null, ke(g.label), 1),
79
+ x ? (n(), Y(b(Fe), {
80
+ key: 0,
81
+ width: "18",
82
+ height: "18",
83
+ class: "text-oc-text-400 drag-el cursor-move",
84
+ name: "draggable"
85
+ })) : h("", !0)
86
+ ], 2))), 128))
87
+ ]),
88
+ _: 1
89
+ }, 16, ["modelValue"])
90
+ ])) : h("", !0),
91
+ Z("div", ul, [
92
+ y[5] || (y[5] = Z("span", { class: "text-oc-text-400 font-medium" }, "Active columns", -1)),
93
+ T(b(we), be({
94
+ key: "key",
95
+ modelValue: c.value,
96
+ "onUpdate:modelValue": y[2] || (y[2] = (g) => c.value = g)
97
+ }, H, { "data-active-headers": "true" }), {
98
+ default: V(() => [
99
+ (n(!0), $(ee, null, ae(c.value, (g) => (n(), $(ee, {
100
+ key: g.key
101
+ }, [
102
+ g.key !== "actions" ? (n(), $("div", rl, [
103
+ Z("div", il, [
104
+ T(b(Ze), {
105
+ modelValue: g.isActive,
106
+ "onUpdate:modelValue": [
107
+ (x) => g.isActive = x,
108
+ y[1] || (y[1] = (x) => F())
109
+ ],
110
+ class: "!w-fit"
111
+ }, null, 8, ["modelValue", "onUpdate:modelValue"]),
112
+ Z("div", nl, ke(g.label), 1)
113
+ ]),
114
+ c.value.length > 1 ? (n(), Y(b(Fe), {
115
+ key: 0,
116
+ width: "18",
117
+ height: "18",
118
+ class: "text-oc-text-400 drag-el cursor-move",
119
+ name: "draggable"
120
+ })) : h("", !0)
121
+ ])) : h("", !0)
122
+ ], 64))), 128))
123
+ ]),
124
+ _: 1
125
+ }, 16, ["modelValue"])
126
+ ])
127
+ ])
128
+ ]),
129
+ default: V(() => [
130
+ T(b(Ee), {
131
+ label: "Edit Column",
132
+ "left-icon": "setting",
133
+ variant: "secondary"
134
+ })
135
+ ]),
136
+ _: 1
137
+ }, 8, ["modelValue"]));
138
+ }
139
+ }, vl = { class: "relative flex flex-col gap-9" }, cl = {
140
+ key: 0,
141
+ class: "flex items-center px-4 min-h-[52px]"
142
+ }, fl = {
143
+ key: 0,
144
+ class: "absolute flex items-center gap-5 left-5"
145
+ }, pl = {
146
+ key: 1,
147
+ class: "absolute flex gap-3 left-5"
148
+ }, ml = {
149
+ key: 1,
150
+ class: "flex justify-center w-full gap-5 md:justify-start"
151
+ }, yl = {
152
+ key: 2,
153
+ class: "items-center hidden md:flex"
154
+ }, wl = {
155
+ __name: "OcDataTable",
156
+ props: {
157
+ isLoading: Boolean,
158
+ id: {
159
+ type: String,
160
+ required: !0
161
+ },
162
+ options: {
163
+ type: Object,
164
+ required: !0
165
+ },
166
+ filter: {
167
+ type: Object,
168
+ required: !0
169
+ },
170
+ selected: {
171
+ type: Array,
172
+ required: !1
173
+ },
174
+ rowClass: String,
175
+ rowKey: {
176
+ type: String,
177
+ Function,
178
+ default: "id"
179
+ },
180
+ rowLink: String
181
+ },
182
+ emits: {
183
+ "update:selected": [],
184
+ "update:filter": [],
185
+ "click:row": [],
186
+ "filter-fields-changed": [],
187
+ "filter-removed": [],
188
+ "search-query-changed": [],
189
+ "hover:cell": [],
190
+ "columns-changed": []
191
+ },
192
+ setup(P, { emit: X }) {
193
+ var ie, ne, de, ve, ce, fe, pe, me, ye;
194
+ const v = P, E = X, c = A(() => {
195
+ var e;
196
+ return (e = v.options) == null ? void 0 : e.pagination;
197
+ }), m = A(() => {
198
+ var e;
199
+ return (e = v.options) == null ? void 0 : e.cursor;
200
+ }), R = U(), F = A(() => {
201
+ var e;
202
+ return (e = v.options) == null ? void 0 : e.tableOptions;
203
+ }), H = A(() => {
204
+ var e;
205
+ return {
206
+ ...F.value,
207
+ headers: R.value ? R.value.map((l) => {
208
+ var s, u;
209
+ return l.class = ((u = (s = F.value) == null ? void 0 : s.headers.find((r) => r.key === l.key)) == null ? void 0 : u.class) ?? "", l;
210
+ }).filter((l) => ue(l.key)) : (e = F.value) == null ? void 0 : e.headers.filter((l) => ue(l.key))
211
+ };
212
+ }), a = A(() => {
213
+ var e;
214
+ return (e = v.options) == null ? void 0 : e.filterOptions;
215
+ }), y = A(() => {
216
+ var e;
217
+ return (e = v.options) == null ? void 0 : e.hidePerPageDropdown;
218
+ }), g = A(() => {
219
+ var e;
220
+ return ((e = c.value) == null ? void 0 : e.last_page) === 1;
221
+ }), x = U(!1), _ = U(v.filter[(ne = (ie = a.value) == null ? void 0 : ie.tabs) == null ? void 0 : ne.key]), N = U(v.filter.page), D = U(
222
+ (ve = (de = a.value) == null ? void 0 : de.per_page) != null && ve.key ? v.filter[(fe = (ce = a.value) == null ? void 0 : ce.per_page) == null ? void 0 : fe.key] : v.filter.per_page
223
+ ), W = ((ye = v.filter[(me = (pe = a.value) == null ? void 0 : pe.search) == null ? void 0 : me.key]) == null ? void 0 : ye.trim()) ?? "", J = U(W ? W.split(",") : []), se = U(!1), Pe = A(
224
+ () => {
225
+ var e, l;
226
+ return (l = (e = v.options) == null ? void 0 : e.perPageOptions) == null ? void 0 : l.map(
227
+ (s) => ({
228
+ label: `${s}`,
229
+ value: s
230
+ })
231
+ );
232
+ }
233
+ ), je = A(() => {
234
+ let e = [
235
+ {
236
+ label: "10",
237
+ value: 10
238
+ },
239
+ {
240
+ label: "15",
241
+ value: 15
242
+ },
243
+ {
244
+ label: "20",
245
+ value: 20
246
+ },
247
+ {
248
+ label: "25",
249
+ value: 25
250
+ },
251
+ {
252
+ label: "40",
253
+ value: 40
254
+ },
255
+ {
256
+ label: "50",
257
+ value: 50
258
+ },
259
+ {
260
+ label: "75",
261
+ value: 75
262
+ },
263
+ {
264
+ label: "99",
265
+ value: 99
266
+ }
267
+ ], l = Pe.value ?? e;
268
+ if (c.value) {
269
+ const s = c.value.total < 100 ? c.value.total : 100;
270
+ s > 10 && (l = l.filter((u) => u.value <= s));
271
+ }
272
+ return [...new Set(l)];
273
+ }), Ae = A(() => {
274
+ var e;
275
+ return ((e = v.selected) == null ? void 0 : e.length) > 0;
276
+ }), Ue = (e) => {
277
+ !e.trim() || J.value.includes(e) || (J.value = [e], O(), console.log("__add_query"), E("search-query-changed", e));
278
+ }, De = (e) => {
279
+ J.value = J.value.filter((l) => l !== e), O(), console.log("__remove_query");
280
+ }, z = v.filter;
281
+ !z && c ? z.page = 1 : !z && m && (z.cursor = "");
282
+ const t = U(z), Le = () => {
283
+ var l, s, u, r, d, o, f, p, k, S, L, q, M, I;
284
+ J.value = [], _.value = "";
285
+ const e = {};
286
+ a.value ? z.page = 1 : z.cursor = "", (s = (l = a.value) == null ? void 0 : l.per_page) != null && s.key ? e[(r = (u = a.value) == null ? void 0 : u.per_page) == null ? void 0 : r.key] = D.value : e.per_page = D.value, (o = (d = a.value) == null ? void 0 : d.tabs) != null && o.key ? e[(p = (f = a.value) == null ? void 0 : f.tabs) == null ? void 0 : p.key] = _.value : e.tabs = _.value, (S = (k = a.value) == null ? void 0 : k.columnEdit) != null && S.key && (e[(q = (L = a.value) == null ? void 0 : L.columnEdit) == null ? void 0 : q.key] = t.value[(I = (M = a.value) == null ? void 0 : M.columnEdit) == null ? void 0 : I.key]), t.value = e, O(), console.log("__remove_all_query_filter");
287
+ }, Ce = () => {
288
+ console.log("__filter_change_page"), O(null, N.value);
289
+ }, Ke = () => {
290
+ v.id && $e(v.id, JSON.stringify(t.value));
291
+ }, Ye = () => v.id ? oe(v.id) : null, O = (e = null, l = !1, s = "") => {
292
+ var r, d, o, f, p;
293
+ c.value && !l && (N.value = 1), c.value ? t.value.page = N.value : t.value.cursor = s, (r = a.value) != null && r.per_page ? t.value[a.value.per_page.key] = D.value : t.value.per_page = D.value, (d = a.value) != null && d.tabs && (t.value[a.value.tabs.key] = _.value), (o = a.value) != null && o.search && (t.value[a.value.search.key] = J.value.join()), e && (x.value = !1, t.value = { ...t.value, ...e }, Object.keys(t.value).forEach((k) => {
294
+ Array.isArray(t.value[k]) && t.value[k].length === 0 && delete t.value[k];
295
+ }));
296
+ let u = (p = (f = a.value) == null ? void 0 : f.tabs) == null ? void 0 : p.key;
297
+ if (u && _.value !== t.value[u])
298
+ return _.value = t.value[u], O(t.value), console.log("__update_filter_tabs"), !1;
299
+ Ke(), E("update:filter", t.value);
300
+ }, Ne = (e, l) => {
301
+ (l === a.value.tabs.key || l === "tabs") && (_.value = ""), O(e), console.log("__remove_filters"), E("filter-removed", l);
302
+ }, Be = (e) => {
303
+ let l = [];
304
+ return e.forEach((s) => {
305
+ l.push(s.key);
306
+ }), l;
307
+ }, Te = A(() => {
308
+ if (t.value) {
309
+ let e = [];
310
+ return Object.keys(t.value).forEach((l) => {
311
+ var d, o, f, p, k, S, L, q, M, I, G;
312
+ let s = (o = (d = a.value) == null ? void 0 : d.tabs) == null ? void 0 : o.key;
313
+ const u = (p = (f = a.value) == null ? void 0 : f.search) == null ? void 0 : p.key, r = ((S = (k = a.value) == null ? void 0 : k.per_page) == null ? void 0 : S.key) ?? "per_page";
314
+ if ((L = a.value.form) == null || L.find((w) => {
315
+ w.name === s && (s = "");
316
+ }), l !== "page" && l !== "cursor" && l !== r && l !== s && l !== u) {
317
+ let w = null, i = (q = a.value.form) == null ? void 0 : q.find((B) => {
318
+ if (typeof B.name == "object") {
319
+ let C = !1;
320
+ return B.name.forEach((Q) => {
321
+ Q.key === l && (C = !0, w = Be(B.name));
322
+ }), C;
323
+ } else
324
+ return B.name === l;
325
+ }), j = "";
326
+ if (i && t.value[l]) {
327
+ if (typeof i.name == "object" ? (M = i.name) == null || M.forEach((C) => {
328
+ j && (j += " - "), j += t.value[C.key];
329
+ }) : j = t.value[l], i.props.options && (j = (i.props.multiple ? t.value[l] : [t.value[l]]).map(
330
+ (Q) => {
331
+ var ge;
332
+ return (ge = i.props.options.find(({ value: Je }) => Je === Q)) == null ? void 0 : ge.label;
333
+ }
334
+ ).join(", ")), i.type === "RangeInput" && Array.isArray(t.value[l]) && (j = t.value[l][0].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + " - " + t.value[l][1].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")), i.type === "DatePicker")
335
+ if (((I = i == null ? void 0 : i.props) == null ? void 0 : I.type) === "range" && i.name && i.name[1]) {
336
+ const C = le(t.value[i.name[0].key]).format("MM/DD/YYYY"), Q = le(t.value[i.name[1].key]).format("MM/DD/YYYY");
337
+ j = C === Q ? C : C + " - " + Q;
338
+ } else j = le(t.value[i.name]).format("MM/DD/YYYY");
339
+ let B = `${(G = i == null ? void 0 : i.props) == null ? void 0 : G.label} : ${j}`;
340
+ i && i.name && typeof i.name == "object" && e.find((Q) => Q.name === w[0]) && (B = ""), e.push({
341
+ label: B,
342
+ name: l,
343
+ multiNames: w
344
+ });
345
+ }
346
+ }
347
+ }), e;
348
+ }
349
+ return [];
350
+ }), ue = (e) => {
351
+ var l, s, u, r, d, o;
352
+ return ((o = (d = (r = (u = t.value) == null ? void 0 : u[(s = (l = a.value) == null ? void 0 : l.columnEdit) == null ? void 0 : s.key]) == null ? void 0 : r.active) == null ? void 0 : d.find((f) => f.key === e)) == null ? void 0 : o.isActive) ?? !0;
353
+ }, qe = ({ fixedHeaders: e, activeHeaders: l, isOnMount: s }) => {
354
+ var u, r, d, o, f, p, k, S;
355
+ if (t.value[(r = (u = a.value) == null ? void 0 : u.columnEdit) == null ? void 0 : r.key] || (t.value[(o = (d = a.value) == null ? void 0 : d.columnEdit) == null ? void 0 : o.key] = {}), t.value[(p = (f = a.value) == null ? void 0 : f.columnEdit) == null ? void 0 : p.key].fixed = e, t.value[(S = (k = a.value) == null ? void 0 : k.columnEdit) == null ? void 0 : S.key].active = l, R.value = [...e, ...l], !s) {
356
+ const L = tl(e, l);
357
+ $e(a.value.columnEdit.localStorageKey, L);
358
+ }
359
+ E("columns-changed", l);
360
+ }, Me = () => {
361
+ var e, l, s, u, r, d;
362
+ if ((l = (e = a.value) == null ? void 0 : e.columnEdit) != null && l.localStorageKey) {
363
+ const o = oe(a.value.columnEdit.localStorageKey);
364
+ if (o) {
365
+ const { fixed: f, active: p } = Oe(
366
+ o,
367
+ F.value.headers,
368
+ a.value.columnEdit.localStorageKey
369
+ );
370
+ t.value[(u = (s = a.value) == null ? void 0 : s.columnEdit) == null ? void 0 : u.key].fixed = f, t.value[(d = (r = a.value) == null ? void 0 : r.columnEdit) == null ? void 0 : d.key].active = p, R.value = [...f, ...p];
371
+ }
372
+ }
373
+ };
374
+ Se(() => {
375
+ var l, s, u, r, d;
376
+ Me();
377
+ const e = Ye();
378
+ e ? (t.value = JSON.parse(e), _.value = _.value || ((l = t.value) == null ? void 0 : l.tabs) || ((r = t.value) == null ? void 0 : r[(u = (s = a.value) == null ? void 0 : s.tabs) == null ? void 0 : u.key]), N.value = ((d = t.value) == null ? void 0 : d.page) || 1, O(null, !0, t.value.cursor), console.log("__onload_filter_local_storage")) : (O(null), console.log("__onload_datatable"));
379
+ });
380
+ const Ie = () => {
381
+ console.log("__onUpdateFilterTab"), O(null);
382
+ }, Qe = (e) => {
383
+ console.log("__onUpdateFilterForm"), O(e);
384
+ }, Re = () => {
385
+ console.log("__onUpdatePerPage"), O(null);
386
+ }, re = (e) => {
387
+ console.log("__onUpdatePrevNext"), O(null, !1, e);
388
+ };
389
+ return (e, l) => {
390
+ var s, u, r, d;
391
+ return n(), $("div", vl, [
392
+ F.value ? (n(), Y(b(Ge), {
393
+ key: 0,
394
+ selected: P.selected,
395
+ "row-key": P.rowKey,
396
+ options: H.value,
397
+ "is-loading": P.isLoading,
398
+ "loading-rows": D.value,
399
+ "row-class": P.rowClass,
400
+ "row-link": P.rowLink,
401
+ "is-sticky": F.value.isSticky,
402
+ "is-borderless": F.value.isBorderless,
403
+ "onUpdate:selected": l[5] || (l[5] = (o) => e.$emit("update:selected", o)),
404
+ "onClick:row": l[6] || (l[6] = (o) => e.$emit("click:row", o)),
405
+ "onHover:cell": l[7] || (l[7] = (o) => e.$emit("hover:cell", o))
406
+ }, ze({
407
+ after: V(() => [
408
+ K(e.$slots, "after")
409
+ ]),
410
+ empty: V(() => [
411
+ K(e.$slots, "empty")
412
+ ]),
413
+ "table-header": V((o) => [
414
+ K(e.$slots, "table-header", he(xe(o)))
415
+ ]),
416
+ "table-body": V((o) => [
417
+ K(e.$slots, "table-body", he(xe(o)))
418
+ ]),
419
+ _: 2
420
+ }, [
421
+ e.$slots.before || (s = a.value) != null && s.search || (u = a.value) != null && u.form || (r = a.value) != null && r.tabs ? {
422
+ name: "before",
423
+ fn: V(() => {
424
+ var o, f, p, k;
425
+ return [
426
+ K(e.$slots, "before"),
427
+ (o = a.value) != null && o.search || (f = a.value) != null && f.form || (p = a.value) != null && p.tabs ? (n(), $("div", cl, [
428
+ Ae.value ? (n(), $("div", fl, [
429
+ K(e.$slots, "bulk-actions", { selectedRows: P.selected })
430
+ ])) : (n(), $("div", pl, [
431
+ (k = a.value) != null && k.tabs ? (n(), Y(b(He), {
432
+ key: 0,
433
+ modelValue: _.value,
434
+ "onUpdate:modelValue": [
435
+ l[0] || (l[0] = (S) => _.value = S),
436
+ Ie
437
+ ],
438
+ "is-disabled": P.isLoading,
439
+ tabs: a.value.tabs.options,
440
+ variant: "pills"
441
+ }, null, 8, ["modelValue", "is-disabled", "tabs"])) : h("", !0)
442
+ ])),
443
+ K(e.$slots, "filter-options", {}, () => {
444
+ var S, L, q, M, I, G;
445
+ return [
446
+ (S = a.value) != null && S.search || (L = a.value) != null && L.form || (q = a.value) != null && q.columnEdit ? (n(), $("div", {
447
+ key: 0,
448
+ class: te([
449
+ "flex gap-3 absolute ml-auto bg-oc-bg-light right-4 max-w-[calc(100%-24px)]",
450
+ a.value ? se.value ? "md:w-fit w-full" : "" : "w-full justify-end"
451
+ ])
452
+ }, [
453
+ (M = a.value) != null && M.search ? (n(), Y(b(We), {
454
+ key: 0,
455
+ "is-search-only": !a.value.tabs || a.value.isSearchOnly,
456
+ onAddQuery: Ue,
457
+ onToggle: l[1] || (l[1] = (w) => se.value = w)
458
+ }, null, 8, ["is-search-only"])) : h("", !0),
459
+ (I = a.value) != null && I.form ? (n(), Y(b(Ve), {
460
+ key: 1,
461
+ modelValue: x.value,
462
+ "onUpdate:modelValue": l[4] || (l[4] = (w) => x.value = w),
463
+ distance: 9,
464
+ placement: "bottom-end",
465
+ "is-attach-to-body": ""
466
+ }, {
467
+ menu: V(() => [
468
+ x.value ? (n(), Y(b(Xe), {
469
+ key: 0,
470
+ id: P.id,
471
+ "json-form": a.value.form ?? [],
472
+ grid: a.value.grid ?? null,
473
+ values: v.filter,
474
+ actions: a.value.actions,
475
+ onApplyFilter: Qe,
476
+ onFilterFieldsChanged: l[2] || (l[2] = (w) => E("filter-fields-changed", w)),
477
+ onCancel: l[3] || (l[3] = (w) => x.value = !1)
478
+ }, {
479
+ default: V(({ errors: w, values: i, jsonForm: j, updateForm: B }) => [
480
+ K(e.$slots, "custom-filter-form", {
481
+ errors: w,
482
+ values: i,
483
+ jsonForm: j,
484
+ updateFilter: B
485
+ })
486
+ ]),
487
+ _: 3
488
+ }, 8, ["id", "json-form", "grid", "values", "actions"])) : h("", !0)
489
+ ]),
490
+ default: V(() => [
491
+ T(b(Ee), {
492
+ "is-active": x.value,
493
+ variant: "secondary",
494
+ "left-icon": "filter"
495
+ }, null, 8, ["is-active"])
496
+ ]),
497
+ _: 3
498
+ }, 8, ["modelValue"])) : h("", !0),
499
+ a.value.columnEdit ? (n(), Y(dl, {
500
+ key: 2,
501
+ options: t.value.columnEdit,
502
+ headers: ((G = F.value) == null ? void 0 : G.headers) || [],
503
+ "local-key": a.value.columnEdit.localStorageKey,
504
+ onUpdateOrder: qe
505
+ }, null, 8, ["options", "headers", "local-key"])) : h("", !0)
506
+ ], 2)) : h("", !0)
507
+ ];
508
+ })
509
+ ])) : h("", !0),
510
+ T(b(el), {
511
+ filters: Te.value,
512
+ queries: J.value,
513
+ class: "border-t border-oc-gray-200",
514
+ onRemoveQuery: De,
515
+ onRemoveAll: Le,
516
+ onRemoveFilter: Ne
517
+ }, null, 8, ["filters", "queries"])
518
+ ];
519
+ }),
520
+ key: "0"
521
+ } : void 0,
522
+ ae((d = F.value) == null ? void 0 : d.headers, (o, f) => ({
523
+ name: o.key,
524
+ fn: V(({ data: p, item: k }) => [
525
+ K(e.$slots, o.key, {
526
+ data: p,
527
+ item: k
528
+ })
529
+ ])
530
+ }))
531
+ ]), 1032, ["selected", "row-key", "options", "is-loading", "loading-rows", "row-class", "row-link", "is-sticky", "is-borderless"])) : h("", !0),
532
+ K(e.$slots, "before-pagination"),
533
+ c.value || m.value ? (n(), $("div", {
534
+ key: 1,
535
+ class: te(["flex items-center gap-3", c.value && c.value.last_page === 1 ? "justify-end" : ""])
536
+ }, [
537
+ c.value && !g.value ? (n(), Y(b(ll), {
538
+ key: 0,
539
+ modelValue: N.value,
540
+ "onUpdate:modelValue": [
541
+ l[8] || (l[8] = (o) => N.value = o),
542
+ Ce
543
+ ],
544
+ class: "justify-center",
545
+ "max-page": c.value.last_page,
546
+ strategy: c.value.strategy,
547
+ "total-visible": "5"
548
+ }, null, 8, ["modelValue", "max-page", "strategy"])) : h("", !0),
549
+ m.value ? (n(), $("div", ml, [
550
+ T(b(_e), {
551
+ disabled: !m.value.prev,
552
+ onClick: l[9] || (l[9] = (o) => m.value.prev ? re(m.value.prev) : null)
553
+ }, null, 8, ["disabled"]),
554
+ T(b(_e), {
555
+ disabled: !m.value.next,
556
+ "is-next": "",
557
+ onClick: l[10] || (l[10] = (o) => m.value.next ? re(m.value.next) : null)
558
+ }, null, 8, ["disabled"])
559
+ ])) : h("", !0),
560
+ y.value ? h("", !0) : (n(), $("div", yl, [
561
+ T(b(al), {
562
+ modelValue: D.value,
563
+ "onUpdate:modelValue": [
564
+ l[11] || (l[11] = (o) => D.value = o),
565
+ Re
566
+ ],
567
+ label: "Item per page",
568
+ "is-inline-label": "",
569
+ "popper-options": { placement: "auto" },
570
+ options: je.value
571
+ }, null, 8, ["modelValue", "options"])
572
+ ]))
573
+ ], 2)) : h("", !0)
574
+ ]);
575
+ };
576
+ }
577
+ };
578
+ export {
579
+ wl as default
580
+ };
@@ -1,5 +1,5 @@
1
1
  import { ref as w, openBlock as n, createBlock as y, unref as l, withCtx as r, createElementBlock as b, Fragment as C, renderList as D, normalizeClass as s, createElementVNode as o, createCommentVNode as m, renderSlot as u, toDisplayString as k, createVNode as f } from "vue";
2
- import { aH as $, aD as S, ay as B } from "./index-xtm5MoHG.js";
2
+ import { aH as $, aD as S, ay as B } from "./index-DjRSPw5W.js";
3
3
  import { _ as g } from "./OcIcon-CJgBICxh.js";
4
4
  const M = ["onMouseleave", "onMouseover", "onClick"], L = { class: "flex justify-evenly w-full" }, N = { class: "flex w-full" }, U = { class: "ml-4 flex w-full" }, E = { class: "flex items-center flex-wrap w-full" }, H = ["href"], O = { class: "min-w-[120px]" }, W = { class: "truncate w-[200px]" }, j = { class: "flex items-center ml-4" }, z = { class: "flex w-full" }, q = {
5
5
  __name: "OcDraggableList",
@@ -1,5 +1,5 @@
1
1
  import { ref as m, computed as p, openBlock as s, createElementBlock as l, createVNode as f, unref as c, withCtx as v, createElementVNode as n, Fragment as T, renderList as V, normalizeClass as k, createTextVNode as C, createBlock as N, createCommentVNode as z } from "vue";
2
- import { ay as U, e as J, B as b } from "./index-xtm5MoHG.js";
2
+ import { ay as U, e as J, B as b } from "./index-DjRSPw5W.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 c, onMounted as B, openBlock as O, createElementBlock as k, renderSlot as w, createElementVNode as f, createVNode as u, unref as i } from "vue";
2
- import { w as $, B as m } from "./index-xtm5MoHG.js";
2
+ import { w as $, B as m } from "./index-DjRSPw5W.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 o, openBlock as t, createElementBlock as s, Fragment as g, createElementVNode as c, normalizeClass as m, createVNode as x, unref as i, withKeys as S, createBlock as d, createCommentVNode as v, nextTick as w } from "vue";
2
- import { e as O, B as f } from "./index-xtm5MoHG.js";
2
+ import { e as O, B as f } from "./index-DjRSPw5W.js";
3
3
  const B = { class: "flex gap-x-4" }, $ = {
4
4
  __name: "OcFilterSearch",
5
5
  props: {
@@ -1,5 +1,5 @@
1
1
  import { computed as k, openBlock as a, createBlock as m, unref as n, withCtx as x, createElementVNode as f, createElementBlock as v, Fragment as b, renderList as p, createVNode as F, createCommentVNode as $ } from "vue";
2
- import { N as y, at as i } from "./index-xtm5MoHG.js";
2
+ import { N as y, at as i } from "./index-DjRSPw5W.js";
3
3
  const N = { 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 n, openBlock as r, createBlock as f, unref as p, withCtx as g, createVNode as v } from "vue";
2
- import { aA as d } from "./index-xtm5MoHG.js";
3
- import x from "./OcCropper-T8qF18Mc.js";
2
+ import { aA as d } from "./index-DjRSPw5W.js";
3
+ import x from "./OcCropper-Cm6x5fzz.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, openBlock as m, createBlock as s, unref as o, withCtx as p, createCommentVNode as v, createVNode as y } from "vue";
2
- import { ay as S, aI as h, e as D } from "./index-xtm5MoHG.js";
2
+ import { ay as S, aI as h, e as D } from "./index-DjRSPw5W.js";
3
3
  import c from "dayjs";
4
4
  const w = {
5
5
  __name: "OcTimePicker",
@@ -1,4 +1,4 @@
1
- import { aw as r } from "../../index-xtm5MoHG.js";
1
+ import { aw as r } from "../../index-DjRSPw5W.js";
2
2
  export {
3
3
  r as ConfirmationModal
4
4
  };
@@ -1,4 +1,4 @@
1
- import { ax as a } from "../../index-xtm5MoHG.js";
1
+ import { ax as a } from "../../index-DjRSPw5W.js";
2
2
  export {
3
3
  a as CopyTooltip
4
4
  };
@@ -1,4 +1,4 @@
1
- import { ay as r, az as p } from "../../index-xtm5MoHG.js";
1
+ import { ay as r, az as p } from "../../index-DjRSPw5W.js";
2
2
  export {
3
3
  r as Dropdown,
4
4
  p as DropdownItem
@@ -1,4 +1,4 @@
1
- import { aA as d, aB as e } from "../../index-xtm5MoHG.js";
1
+ import { aA as d, aB as e } from "../../index-DjRSPw5W.js";
2
2
  export {
3
3
  d as Modal,
4
4
  e as OcModalPage