@orchidui/core 1.10.0 → 1.14.0

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 (94) hide show
  1. package/dist/DataDisplay/CustomerCard/OcCustomerCard.js +2 -2
  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 +2 -2
  34. package/dist/Form/CardInput/OcCardInput.js +1 -1
  35. package/dist/Form/Checkbox/OcCheckbox.js +2 -2
  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 +2 -2
  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 +2 -2
  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 +2 -2
  50. package/dist/Form/Select/OcSelect.js +1 -1
  51. package/dist/Form/SelectOptions/OcSelectOptions.js +2 -2
  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 +2 -2
  55. package/dist/Form/Toggle/OcToggle.js +1 -1
  56. package/dist/Form/index.js +8 -8
  57. package/dist/FormBuilder/OcFormBuilder.js +1 -1
  58. package/dist/MediaAndIcons/Icon/OcIcon.js +1 -1
  59. package/dist/{OcAccountSetupProgress-CaPZ5qXP.js → OcAccountSetupProgress-CdEgdgcY.js} +2 -2
  60. package/dist/{OcComplexCalendar-B4lQwiPh.js → OcComplexCalendar-DBMEhTXr.js} +1 -1
  61. package/dist/{OcComplexDatePicker-BQGEjDww.js → OcComplexDatePicker-YsBpr0Jw.js} +1 -1
  62. package/dist/OcCropper-CvxnbkVg.js +253 -0
  63. package/dist/OcDataTable-DNQHTV5u.js +590 -0
  64. package/dist/{OcDraggable-CA_BCbpl.js → OcDraggable-CZT2mJvO.js} +5 -4
  65. package/dist/{OcDraggableList-DfcT9cdf.js → OcDraggableList-ChywEbvI.js} +2 -2
  66. package/dist/{OcEmojiPicker-C-S5vG0c.js → OcEmojiPicker-B4pvBfIx.js} +1 -1
  67. package/dist/{OcFilterForm-nlTSe35v.js → OcFilterForm-CNG0JY1X.js} +8 -8
  68. package/dist/OcFilterSearch-zfIRpntJ.js +117 -0
  69. package/dist/{OcFilterSearchFor-DHkl2S2H.js → OcFilterSearchFor-Ce2cg7uw.js} +3 -3
  70. package/dist/{OcIcon-CJgBICxh.js → OcIcon-CSpRxnwd.js} +7 -7
  71. package/dist/OcModalCropper-CwFH7lyA.js +52 -0
  72. package/dist/{OcPopper-BgjdqRiw.js → OcPopper-Bc96YXbS.js} +19 -21
  73. package/dist/{OcTimePicker-CP3DKZnI.js → OcTimePicker-Dxqp4zue.js} +1 -1
  74. package/dist/OcToggle-Cp5dJ5LN.js +58 -0
  75. package/dist/Overlay/ConfirmationModal/OcConfirmationModal.js +1 -1
  76. package/dist/Overlay/CopyTooltip/OcCopyTooltip.js +1 -1
  77. package/dist/Overlay/Dropdown/OcDropdown.js +1 -1
  78. package/dist/Overlay/Modal/OcModal.js +1 -1
  79. package/dist/Overlay/Popper/OcPopper.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-B_xqfv9l.js → SubPlanCard-B296VqWh.js} +2 -2
  84. package/dist/{ThumbnailSection-BwPHSKTb.js → ThumbnailSection-Cl94yarQ.js} +1 -1
  85. package/dist/{ThumbnailTheme-CEcfUgY7.js → ThumbnailTheme-CnXoXfVt.js} +2 -2
  86. package/dist/{index-C1jzdcW-.js → index-D8xMbiHG.js} +1847 -1784
  87. package/dist/index.js +4 -4
  88. package/dist/style.css +1 -1
  89. package/package.json +1 -1
  90. package/dist/OcCropper-B2XYrklz.js +0 -229
  91. package/dist/OcDataTable-DVRY1jeJ.js +0 -578
  92. package/dist/OcFilterSearch-DqQV0yEz.js +0 -69
  93. package/dist/OcModalCropper-DyOgFLXP.js +0 -46
  94. package/dist/OcToggle-bIJaLDMZ.js +0 -53
@@ -0,0 +1,590 @@
1
+ import { ref as N, onMounted as Ve, openBlock as d, createBlock as q, unref as x, withCtx as C, createElementVNode as W, createElementBlock as F, createVNode as R, mergeProps as ke, Fragment as ae, renderList as se, normalizeClass as oe, toDisplayString as he, createCommentVNode as $, computed as M, createSlots as Je, renderSlot as T, normalizeProps as xe, guardReactiveProps as Se } from "vue";
2
+ import { ay as Fe, C as ze, B as je, K as He, Z as Ze, aJ as Ge, aK as We, aL as Xe, H as _e, I as we, j as el } from "./index-D8xMbiHG.js";
3
+ import te from "dayjs";
4
+ import { VueDraggableNext as $e } from "vue-draggable-next";
5
+ import { getFromLocalStorage as ue, formatHeadersFromLocalStorage as Ae, formatHeadersToLocalStorage as ll, setInLocalStorage as Oe } from "./DataTable/utils/editColumnsUtils.js";
6
+ import { _ as Ee } from "./OcIcon-CSpRxnwd.js";
7
+ const al = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, tl = {
8
+ key: 0,
9
+ class: "gap-y-2 flex flex-col border-b pb-3 border-oc-gray-200"
10
+ }, sl = { class: "gap-y-2 flex flex-col" }, ol = {
11
+ key: 0,
12
+ class: "flex items-center bg-white justify-between h-[26px]"
13
+ }, ul = { class: "flex items-center w-full gap-x-3" }, rl = { class: "truncate w-full max-w-[160px]" }, il = {
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(L, { emit: ee }) {
31
+ const p = ee, D = L, m = N([]), g = N([]), H = N(!1), j = (a = !1) => {
32
+ g.value = g.value.map((b) => ({
33
+ ...b,
34
+ isActive: !0
35
+ })), p("update-order", {
36
+ fixedHeaders: g.value,
37
+ activeHeaders: m.value,
38
+ isOnMount: a
39
+ });
40
+ }, X = {
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": () => j()
48
+ };
49
+ return Ve(() => {
50
+ const a = ue(D.localKey), { fixed: b, active: k } = Ae(a, D.headers, D.localKey);
51
+ g.value = b || D.headers.slice(0, 1), m.value = k || D.headers.slice(1).map((O) => {
52
+ var V, Q, I;
53
+ return {
54
+ ...O,
55
+ isActive: ((I = (Q = (V = D.options) == null ? void 0 : V.active) == null ? void 0 : Q.find((_) => _.key === O.key)) == null ? void 0 : I.isActive) ?? !0
56
+ };
57
+ }), j(!0);
58
+ }), (a, b) => (d(), q(x(Fe), {
59
+ modelValue: H.value,
60
+ "onUpdate:modelValue": b[3] || (b[3] = (k) => H.value = k),
61
+ class: "h-[36px]",
62
+ "is-attach-to-body": ""
63
+ }, {
64
+ menu: C(() => [
65
+ W("div", al, [
66
+ g.value.length ? (d(), F("div", tl, [
67
+ b[4] || (b[4] = W("span", { class: "text-oc-text-400 font-medium" }, "Fixed columns", -1)),
68
+ R(x($e), ke({
69
+ key: "key",
70
+ modelValue: g.value,
71
+ "onUpdate:modelValue": b[0] || (b[0] = (k) => g.value = k)
72
+ }, X), {
73
+ default: C(() => [
74
+ (d(!0), F(ae, null, se(g.value, (k, O) => (d(), F("div", {
75
+ key: k.key,
76
+ class: oe(["flex items-center justify-between h-[26px]", O ? "" : "is-disabled"])
77
+ }, [
78
+ W("span", null, he(k.label), 1),
79
+ O ? (d(), q(x(Ee), {
80
+ key: 0,
81
+ width: "18",
82
+ height: "18",
83
+ class: "text-oc-text-400 drag-el cursor-move",
84
+ name: "draggable"
85
+ })) : $("", !0)
86
+ ], 2))), 128))
87
+ ]),
88
+ _: 1
89
+ }, 16, ["modelValue"])
90
+ ])) : $("", !0),
91
+ W("div", sl, [
92
+ b[5] || (b[5] = W("span", { class: "text-oc-text-400 font-medium" }, "Active columns", -1)),
93
+ R(x($e), ke({
94
+ key: "key",
95
+ modelValue: m.value,
96
+ "onUpdate:modelValue": b[2] || (b[2] = (k) => m.value = k)
97
+ }, X, { "data-active-headers": "true" }), {
98
+ default: C(() => [
99
+ (d(!0), F(ae, null, se(m.value, (k) => (d(), F(ae, {
100
+ key: k.key
101
+ }, [
102
+ k.key !== "actions" ? (d(), F("div", ol, [
103
+ W("div", ul, [
104
+ R(x(ze), {
105
+ modelValue: k.isActive,
106
+ "onUpdate:modelValue": [
107
+ (O) => k.isActive = O,
108
+ b[1] || (b[1] = (O) => j())
109
+ ],
110
+ class: "!w-fit"
111
+ }, null, 8, ["modelValue", "onUpdate:modelValue"]),
112
+ W("div", rl, he(k.label), 1)
113
+ ]),
114
+ m.value.length > 1 ? (d(), q(x(Ee), {
115
+ key: 0,
116
+ width: "18",
117
+ height: "18",
118
+ class: "text-oc-text-400 drag-el cursor-move",
119
+ name: "draggable"
120
+ })) : $("", !0)
121
+ ])) : $("", !0)
122
+ ], 64))), 128))
123
+ ]),
124
+ _: 1
125
+ }, 16, ["modelValue"])
126
+ ])
127
+ ])
128
+ ]),
129
+ default: C(() => [
130
+ R(x(je), {
131
+ label: "Edit Column",
132
+ "left-icon": "setting",
133
+ variant: "secondary"
134
+ })
135
+ ]),
136
+ _: 1
137
+ }, 8, ["modelValue"]));
138
+ }
139
+ }, nl = { class: "relative flex flex-col gap-9" }, dl = {
140
+ key: 0,
141
+ class: "flex items-center px-4 min-h-[52px]"
142
+ }, vl = {
143
+ key: 0,
144
+ class: "absolute flex items-center gap-5 left-5"
145
+ }, cl = {
146
+ key: 1,
147
+ class: "absolute flex gap-3 left-5"
148
+ }, fl = {
149
+ key: 1,
150
+ class: "flex justify-center w-full gap-5 md:justify-start"
151
+ }, pl = {
152
+ key: 2,
153
+ class: "items-center hidden md:flex"
154
+ }, xl = {
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
+ "filter-open": [],
189
+ "search-query-changed": [],
190
+ "hover:cell": [],
191
+ "columns-changed": []
192
+ },
193
+ setup(L, { emit: ee }) {
194
+ var de, ve, ce, fe, pe, me, ye, ge, be;
195
+ const p = L, D = ee, m = M(() => {
196
+ var l;
197
+ return (l = p.options) == null ? void 0 : l.pagination;
198
+ }), g = M(() => {
199
+ var l;
200
+ return (l = p.options) == null ? void 0 : l.cursor;
201
+ }), H = N(), j = M(() => {
202
+ var l;
203
+ return (l = p.options) == null ? void 0 : l.tableOptions;
204
+ }), X = M(() => {
205
+ var l;
206
+ return {
207
+ ...j.value,
208
+ headers: H.value ? H.value.map((e) => {
209
+ var o, r;
210
+ return e.class = ((r = (o = j.value) == null ? void 0 : o.headers.find((v) => v.key === e.key)) == null ? void 0 : r.class) ?? "", e;
211
+ }).filter((e) => ne(e.key)) : (l = j.value) == null ? void 0 : l.headers.filter((e) => ne(e.key))
212
+ };
213
+ }), a = M(() => {
214
+ var l;
215
+ return (l = p.options) == null ? void 0 : l.filterOptions;
216
+ }), b = M(() => {
217
+ var l;
218
+ return (l = p.options) == null ? void 0 : l.hidePerPageDropdown;
219
+ }), k = M(() => {
220
+ var l;
221
+ return ((l = m.value) == null ? void 0 : l.last_page) === 1;
222
+ }), O = N(!1), V = N(p.filter[(ve = (de = a.value) == null ? void 0 : de.tabs) == null ? void 0 : ve.key]), Q = N(p.filter.page), I = N(
223
+ (fe = (ce = a.value) == null ? void 0 : ce.per_page) != null && fe.key ? p.filter[(me = (pe = a.value) == null ? void 0 : pe.per_page) == null ? void 0 : me.key] : p.filter.per_page
224
+ ), _ = ((be = p.filter[(ge = (ye = a.value) == null ? void 0 : ye.search) == null ? void 0 : ge.key]) == null ? void 0 : be.trim()) ?? "", J = N(_ ? _.split(",") : []), re = N(!1), Ce = M(
225
+ () => {
226
+ var l, e;
227
+ return (e = (l = p.options) == null ? void 0 : l.perPageOptions) == null ? void 0 : e.map(
228
+ (o) => ({
229
+ label: `${o}`,
230
+ value: o
231
+ })
232
+ );
233
+ }
234
+ ), De = M(() => {
235
+ let l = [
236
+ {
237
+ label: "10",
238
+ value: 10
239
+ },
240
+ {
241
+ label: "15",
242
+ value: 15
243
+ },
244
+ {
245
+ label: "20",
246
+ value: 20
247
+ },
248
+ {
249
+ label: "25",
250
+ value: 25
251
+ },
252
+ {
253
+ label: "40",
254
+ value: 40
255
+ },
256
+ {
257
+ label: "50",
258
+ value: 50
259
+ },
260
+ {
261
+ label: "75",
262
+ value: 75
263
+ },
264
+ {
265
+ label: "99",
266
+ value: 99
267
+ }
268
+ ], e = Ce.value ?? l;
269
+ if (m.value) {
270
+ const o = m.value.total < 100 ? m.value.total : 100;
271
+ o > 10 && (e = e.filter((r) => r.value <= o));
272
+ }
273
+ return [...new Set(e)];
274
+ }), Ke = M(() => {
275
+ var l;
276
+ return ((l = p.selected) == null ? void 0 : l.length) > 0;
277
+ }), ie = (l) => {
278
+ !l.trim() || !t.value.selectedSearchOption && J.value.includes(l) || (J.value = [l], K(), D("search-query-changed", l));
279
+ }, Le = (l) => {
280
+ J.value = J.value.filter((e) => e !== l), K();
281
+ }, Z = p.filter;
282
+ !Z && m ? Z.page = 1 : !Z && g && (Z.cursor = "");
283
+ const t = N(Z), Pe = () => {
284
+ var e, o, r, v, n, s, c, y, w, S, A, P, U, Y;
285
+ J.value = [], V.value = "";
286
+ const l = {};
287
+ a.value ? Z.page = 1 : Z.cursor = "", (o = (e = a.value) == null ? void 0 : e.per_page) != null && o.key ? l[(v = (r = a.value) == null ? void 0 : r.per_page) == null ? void 0 : v.key] = I.value : l.per_page = I.value, (s = (n = a.value) == null ? void 0 : n.tabs) != null && s.key ? l[(y = (c = a.value) == null ? void 0 : c.tabs) == null ? void 0 : y.key] = V.value : l.tabs = V.value, (S = (w = a.value) == null ? void 0 : w.columnEdit) != null && S.key && (l[(P = (A = a.value) == null ? void 0 : A.columnEdit) == null ? void 0 : P.key] = t.value[(Y = (U = a.value) == null ? void 0 : U.columnEdit) == null ? void 0 : Y.key]), t.value = l, K();
288
+ }, Ue = () => {
289
+ K(null, Q.value);
290
+ }, Ye = () => {
291
+ p.id && Oe(p.id, JSON.stringify(t.value));
292
+ }, Be = () => p.id ? ue(p.id) : null, K = (l = null, e = !1, o = "", r = !1, v = !1) => {
293
+ var s, c, y, w, S, A, P, U, Y, z, B, u, E;
294
+ m.value && !e && (Q.value = 1), m.value ? t.value.page = Q.value : t.value.cursor = o, (s = a.value) != null && s.per_page ? t.value[a.value.per_page.key] = I.value : t.value.per_page = I.value, (c = a.value) != null && c.tabs && v && (t.value[a.value.tabs.key] = V.value), (y = a.value) != null && y.search && ((S = (w = a.value.search) == null ? void 0 : w.options) != null && S.length ? (Object.keys(t.value).forEach((f) => {
295
+ var h;
296
+ (h = a.value.search.options) != null && h.map((i) => i.value).includes(f) && delete t.value[f];
297
+ }), t.value[((A = t.value) == null ? void 0 : A.selectedSearchOption) || ((Y = (U = (P = a.value.search) == null ? void 0 : P.options) == null ? void 0 : U[0]) == null ? void 0 : Y.value) || a.value.search.key] = J.value.join()) : t.value[a.value.search.key] = J.value.join()), l && (O.value = !1, t.value = { ...t.value, ...l }, Object.keys(t.value).forEach((f) => {
298
+ Array.isArray(t.value[f]) && t.value[f].length === 0 && delete t.value[f];
299
+ }));
300
+ let n = (B = (z = a.value) == null ? void 0 : z.tabs) == null ? void 0 : B.key;
301
+ if (n && V.value !== t.value[n]) {
302
+ const f = (E = (u = a.value.tabs) == null ? void 0 : u.options) == null ? void 0 : E.find(
303
+ (h) => {
304
+ var i, G;
305
+ return ((i = h.value) == null ? void 0 : i.toString()) === ((G = t.value[n]) == null ? void 0 : G.toString());
306
+ }
307
+ );
308
+ if (f != null && f.value)
309
+ return V.value = f.value, K(), !1;
310
+ }
311
+ Ye(), D("update:filter", t.value, r);
312
+ }, Me = (l, e) => {
313
+ (e === a.value.tabs.key || e === "tabs") && (V.value = ""), K(l), D("filter-removed", e);
314
+ }, Ne = (l) => {
315
+ let e = [];
316
+ return l.forEach((o) => {
317
+ e.push(o.key);
318
+ }), e;
319
+ }, Ie = M(() => {
320
+ if (t.value) {
321
+ let l = [];
322
+ return Object.keys(t.value).forEach((e) => {
323
+ var n, s, c, y, w, S, A, P, U, Y, z;
324
+ let o = (s = (n = a.value) == null ? void 0 : n.tabs) == null ? void 0 : s.key;
325
+ const r = (y = (c = a.value) == null ? void 0 : c.search) == null ? void 0 : y.key, v = ((S = (w = a.value) == null ? void 0 : w.per_page) == null ? void 0 : S.key) ?? "per_page";
326
+ if ((A = a.value.form) == null || A.find((B) => {
327
+ B.name === o && (o = "");
328
+ }), e !== "page" && e !== "cursor" && e !== v && e !== o && e !== r) {
329
+ let B = null, u = (P = a.value.form) == null ? void 0 : P.find((f) => {
330
+ if (typeof f.name == "object") {
331
+ let h = !1;
332
+ return f.name.forEach((i) => {
333
+ i.key === e && (h = !0, B = Ne(f.name));
334
+ }), h;
335
+ } else
336
+ return f.name === e;
337
+ }), E = "";
338
+ if (u && t.value[e]) {
339
+ if (typeof u.name == "object" ? (U = u.name) == null || U.forEach((h) => {
340
+ E && (E += " - "), E += t.value[h.key];
341
+ }) : E = t.value[e], u.props.options && (E = (u.props.multiple ? t.value[e] : [t.value[e]]).map(
342
+ (i) => {
343
+ var G;
344
+ return (G = u.props.options.find(({ value: le }) => le === i)) == null ? void 0 : G.label;
345
+ }
346
+ ).join(", ")), u.type === "RangeInput" && Array.isArray(t.value[e]) && (E = t.value[e][0].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + " - " + t.value[e][1].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")), u.type === "DatePicker")
347
+ if (((Y = u == null ? void 0 : u.props) == null ? void 0 : Y.type) === "range" && u.name && u.name[1]) {
348
+ const h = te(t.value[u.name[0].key]).format("MM/DD/YYYY"), i = te(t.value[u.name[1].key]).format("MM/DD/YYYY");
349
+ E = h === i ? h : h + " - " + i;
350
+ } else E = te(t.value[u.name]).format("MM/DD/YYYY");
351
+ let f = `${(z = u == null ? void 0 : u.props) == null ? void 0 : z.label} : ${E}`;
352
+ u && u.name && typeof u.name == "object" && l.find((i) => i.name === B[0]) && (f = ""), l.push({
353
+ label: f,
354
+ name: e,
355
+ multiNames: B
356
+ });
357
+ }
358
+ }
359
+ }), l;
360
+ }
361
+ return [];
362
+ }), ne = (l) => {
363
+ var e, o, r, v, n, s;
364
+ return ((s = (n = (v = (r = t.value) == null ? void 0 : r[(o = (e = a.value) == null ? void 0 : e.columnEdit) == null ? void 0 : o.key]) == null ? void 0 : v.active) == null ? void 0 : n.find((c) => c.key === l)) == null ? void 0 : s.isActive) ?? !0;
365
+ }, Te = ({ fixedHeaders: l, activeHeaders: e, isOnMount: o }) => {
366
+ var r, v, n, s, c, y, w, S;
367
+ if (t.value[(v = (r = a.value) == null ? void 0 : r.columnEdit) == null ? void 0 : v.key] || (t.value[(s = (n = a.value) == null ? void 0 : n.columnEdit) == null ? void 0 : s.key] = {}), t.value[(y = (c = a.value) == null ? void 0 : c.columnEdit) == null ? void 0 : y.key].fixed = l, t.value[(S = (w = a.value) == null ? void 0 : w.columnEdit) == null ? void 0 : S.key].active = e, H.value = [...l, ...e], !o) {
368
+ const A = ll(l, e);
369
+ Oe(a.value.columnEdit.localStorageKey, A);
370
+ }
371
+ D("columns-changed", e);
372
+ }, qe = () => {
373
+ var l, e, o, r, v, n;
374
+ if ((e = (l = a.value) == null ? void 0 : l.columnEdit) != null && e.localStorageKey) {
375
+ const s = ue(a.value.columnEdit.localStorageKey);
376
+ if (s) {
377
+ const { fixed: c, active: y } = Ae(
378
+ s,
379
+ j.value.headers,
380
+ a.value.columnEdit.localStorageKey
381
+ );
382
+ t.value[(r = (o = a.value) == null ? void 0 : o.columnEdit) == null ? void 0 : r.key].fixed = c, t.value[(n = (v = a.value) == null ? void 0 : v.columnEdit) == null ? void 0 : n.key].active = y, H.value = [...c, ...y];
383
+ }
384
+ }
385
+ }, Qe = (l) => {
386
+ t.value.selectedSearchOption = l;
387
+ };
388
+ return Ve(() => {
389
+ var e, o, r, v, n, s, c;
390
+ qe();
391
+ const l = Be();
392
+ l && (t.value = JSON.parse(l), V.value = V.value || ((e = t.value) == null ? void 0 : e.tabs) || ((v = t.value) == null ? void 0 : v[(r = (o = a.value) == null ? void 0 : o.tabs) == null ? void 0 : r.key]), (n = t.value) != null && n.selectedSearchOption && ie(t.value[(s = t.value) == null ? void 0 : s.selectedSearchOption]), Q.value = ((c = t.value) == null ? void 0 : c.page) || 1, K(null, !0, t.value.cursor, !0));
393
+ }), (l, e) => {
394
+ var o, r, v, n;
395
+ return d(), F("div", nl, [
396
+ j.value ? (d(), q(x(He), {
397
+ key: 0,
398
+ selected: L.selected,
399
+ "row-key": L.rowKey,
400
+ options: X.value,
401
+ "is-loading": L.isLoading,
402
+ "loading-rows": I.value,
403
+ "row-class": L.rowClass,
404
+ "row-link": L.rowLink,
405
+ "is-sticky": j.value.isSticky,
406
+ "is-borderless": j.value.isBorderless,
407
+ "onUpdate:selected": e[8] || (e[8] = (s) => l.$emit("update:selected", s)),
408
+ "onClick:row": e[9] || (e[9] = (s) => l.$emit("click:row", s)),
409
+ "onHover:cell": e[10] || (e[10] = (s) => l.$emit("hover:cell", s))
410
+ }, Je({
411
+ after: C(() => [
412
+ T(l.$slots, "after")
413
+ ]),
414
+ empty: C(() => [
415
+ T(l.$slots, "empty")
416
+ ]),
417
+ "table-header": C((s) => [
418
+ T(l.$slots, "table-header", xe(Se(s)))
419
+ ]),
420
+ "table-body": C((s) => [
421
+ T(l.$slots, "table-body", xe(Se(s)))
422
+ ]),
423
+ _: 2
424
+ }, [
425
+ l.$slots.before || (o = a.value) != null && o.search || (r = a.value) != null && r.form || (v = a.value) != null && v.tabs ? {
426
+ name: "before",
427
+ fn: C(() => {
428
+ var s, c, y, w;
429
+ return [
430
+ T(l.$slots, "before"),
431
+ (s = a.value) != null && s.search || (c = a.value) != null && c.form || (y = a.value) != null && y.tabs ? (d(), F("div", dl, [
432
+ Ke.value ? (d(), F("div", vl, [
433
+ T(l.$slots, "bulk-actions", { selectedRows: L.selected })
434
+ ])) : (d(), F("div", cl, [
435
+ (w = a.value) != null && w.tabs ? (d(), q(x(Ze), {
436
+ key: 0,
437
+ modelValue: V.value,
438
+ "onUpdate:modelValue": [
439
+ e[0] || (e[0] = (S) => V.value = S),
440
+ e[1] || (e[1] = (S) => K(null, !1, "", !1, !0))
441
+ ],
442
+ "is-disabled": L.isLoading,
443
+ tabs: a.value.tabs.options,
444
+ variant: "pills"
445
+ }, null, 8, ["modelValue", "is-disabled", "tabs"])) : $("", !0)
446
+ ])),
447
+ T(l.$slots, "filter-options", {}, () => {
448
+ var S, A, P, U, Y, z, B, u, E, f, h;
449
+ return [
450
+ (S = a.value) != null && S.search || (A = a.value) != null && A.form || (P = a.value) != null && P.columnEdit ? (d(), F("div", {
451
+ key: 0,
452
+ class: oe([
453
+ "flex gap-3 absolute ml-auto bg-oc-bg-light right-4 max-w-[calc(100%-24px)]",
454
+ a.value ? re.value ? "md:w-fit w-full" : "" : "w-full justify-end"
455
+ ])
456
+ }, [
457
+ (U = a.value) != null && U.search ? (d(), q(x(Ge), {
458
+ key: 0,
459
+ "is-search-only": !a.value.tabs || a.value.isSearchOnly,
460
+ "search-options": ((Y = a.value.search) == null ? void 0 : Y.options) ?? [],
461
+ "selected-option": (((z = t.value) == null ? void 0 : z.selectedSearchOption) || ((E = (u = (B = a.value.search) == null ? void 0 : B.options) == null ? void 0 : u[0]) == null ? void 0 : E.value)) ?? "keywords",
462
+ onAddQuery: ie,
463
+ onToggle: e[2] || (e[2] = (i) => re.value = i),
464
+ onChangeSearchKey: Qe
465
+ }, null, 8, ["is-search-only", "search-options", "selected-option"])) : $("", !0),
466
+ (f = a.value) != null && f.form ? (d(), q(x(Fe), {
467
+ key: 1,
468
+ modelValue: O.value,
469
+ "onUpdate:modelValue": [
470
+ e[6] || (e[6] = (i) => O.value = i),
471
+ e[7] || (e[7] = (i) => l.$emit("filter-open", i))
472
+ ],
473
+ distance: 9,
474
+ placement: "bottom-end",
475
+ "is-attach-to-body": ""
476
+ }, {
477
+ menu: C(() => [
478
+ O.value ? (d(), q(x(We), {
479
+ key: 0,
480
+ id: L.id,
481
+ "json-form": a.value.form ?? [],
482
+ grid: a.value.grid ?? null,
483
+ values: p.filter,
484
+ actions: a.value.actions,
485
+ onApplyFilter: e[3] || (e[3] = (i) => K(i)),
486
+ onFilterFieldsChanged: e[4] || (e[4] = (i) => D("filter-fields-changed", i)),
487
+ onCancel: e[5] || (e[5] = (i) => O.value = !1)
488
+ }, {
489
+ default: C(({ errors: i, values: G, jsonForm: le, updateForm: Re }) => [
490
+ T(l.$slots, "custom-filter-form", {
491
+ errors: i,
492
+ values: G,
493
+ jsonForm: le,
494
+ updateFilter: Re
495
+ })
496
+ ]),
497
+ _: 3
498
+ }, 8, ["id", "json-form", "grid", "values", "actions"])) : $("", !0)
499
+ ]),
500
+ default: C(() => [
501
+ R(x(je), {
502
+ "is-active": O.value,
503
+ variant: "secondary",
504
+ "left-icon": "filter"
505
+ }, null, 8, ["is-active"])
506
+ ]),
507
+ _: 3
508
+ }, 8, ["modelValue"])) : $("", !0),
509
+ a.value.columnEdit ? (d(), q(il, {
510
+ key: 2,
511
+ options: t.value.columnEdit,
512
+ headers: ((h = j.value) == null ? void 0 : h.headers) || [],
513
+ "local-key": a.value.columnEdit.localStorageKey,
514
+ onUpdateOrder: Te
515
+ }, null, 8, ["options", "headers", "local-key"])) : $("", !0)
516
+ ], 2)) : $("", !0)
517
+ ];
518
+ })
519
+ ])) : $("", !0),
520
+ R(x(Xe), {
521
+ filters: Ie.value,
522
+ queries: J.value,
523
+ class: "border-t border-oc-gray-200",
524
+ onRemoveQuery: Le,
525
+ onRemoveAll: Pe,
526
+ onRemoveFilter: Me
527
+ }, null, 8, ["filters", "queries"])
528
+ ];
529
+ }),
530
+ key: "0"
531
+ } : void 0,
532
+ se((n = j.value) == null ? void 0 : n.headers, (s, c) => ({
533
+ name: s.key,
534
+ fn: C(({ data: y, item: w }) => [
535
+ T(l.$slots, s.key, {
536
+ data: y,
537
+ item: w
538
+ })
539
+ ])
540
+ }))
541
+ ]), 1032, ["selected", "row-key", "options", "is-loading", "loading-rows", "row-class", "row-link", "is-sticky", "is-borderless"])) : $("", !0),
542
+ T(l.$slots, "before-pagination"),
543
+ m.value || g.value ? (d(), F("div", {
544
+ key: 1,
545
+ class: oe(["flex items-center gap-3", m.value && m.value.last_page === 1 ? "justify-end" : ""])
546
+ }, [
547
+ m.value && !k.value ? (d(), q(x(_e), {
548
+ key: 0,
549
+ modelValue: Q.value,
550
+ "onUpdate:modelValue": [
551
+ e[11] || (e[11] = (s) => Q.value = s),
552
+ Ue
553
+ ],
554
+ class: "justify-center",
555
+ "max-page": m.value.last_page,
556
+ strategy: m.value.strategy,
557
+ "total-visible": "5"
558
+ }, null, 8, ["modelValue", "max-page", "strategy"])) : $("", !0),
559
+ g.value ? (d(), F("div", fl, [
560
+ R(x(we), {
561
+ disabled: !g.value.prev,
562
+ onClick: e[12] || (e[12] = (s) => g.value.prev ? K(null, !1, g.value.prev) : null)
563
+ }, null, 8, ["disabled"]),
564
+ R(x(we), {
565
+ disabled: !g.value.next,
566
+ "is-next": "",
567
+ onClick: e[13] || (e[13] = (s) => g.value.next ? K(null, !1, g.value.next) : null)
568
+ }, null, 8, ["disabled"])
569
+ ])) : $("", !0),
570
+ b.value ? $("", !0) : (d(), F("div", pl, [
571
+ R(x(el), {
572
+ modelValue: I.value,
573
+ "onUpdate:modelValue": [
574
+ e[14] || (e[14] = (s) => I.value = s),
575
+ e[15] || (e[15] = (s) => K(null))
576
+ ],
577
+ label: "Item per page",
578
+ "is-inline-label": "",
579
+ "popper-options": { placement: "auto" },
580
+ options: De.value
581
+ }, null, 8, ["modelValue", "options"])
582
+ ]))
583
+ ], 2)) : $("", !0)
584
+ ]);
585
+ };
586
+ }
587
+ };
588
+ export {
589
+ xl as default
590
+ };
@@ -1,4 +1,4 @@
1
- import { computed as s, openBlock as c, createBlock as d, unref as m, withCtx as i, renderSlot as p } from "vue";
1
+ import { computed as c, openBlock as s, createBlock as d, unref as m, withCtx as i, renderSlot as p } from "vue";
2
2
  import { VueDraggableNext as f } from "vue-draggable-next";
3
3
  const h = {
4
4
  __name: "OcDraggable",
@@ -10,17 +10,18 @@ const h = {
10
10
  detectMove: null
11
11
  },
12
12
  setup(a, { emit: l }) {
13
- const n = a, o = l, t = s(() => n.modelValue), r = (e) => {
13
+ const r = a, o = l, t = c(() => r.modelValue), n = (e) => {
14
14
  o("update:modelValue", t.value, e);
15
15
  }, u = (e) => {
16
16
  o("detectMove", e);
17
17
  };
18
- return (e, g) => (c(), d(m(f), {
18
+ return (e, g) => (s(), d(m(f), {
19
19
  handle: ".drag-el",
20
20
  list: t.value,
21
21
  animation: 500,
22
+ "force-fallback": !0,
22
23
  move: u,
23
- onChange: r
24
+ onChange: n
24
25
  }, {
25
26
  default: i(() => [
26
27
  p(e.$slots, "default", { list: t.value })
@@ -1,6 +1,6 @@
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-C1jzdcW-.js";
3
- import { _ as g } from "./OcIcon-CJgBICxh.js";
2
+ import { aH as $, aD as S, ay as B } from "./index-D8xMbiHG.js";
3
+ import { _ as g } from "./OcIcon-CSpRxnwd.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",
6
6
  props: {
@@ -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-C1jzdcW-.js";
2
+ import { ay as U, d as J, B as b } from "./index-D8xMbiHG.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 = {