@orchidui/core 1.98.0 → 1.100.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 (90) hide show
  1. package/dist/DataDisplay/AccountVerificationContent/OcAccountVerificationContent.js +1 -1
  2. package/dist/DataDisplay/CustomerCard/OcCustomerCard.js +1 -1
  3. package/dist/DataDisplay/FloatContent/OcFloatContent.js +1 -1
  4. package/dist/DataDisplay/InfoCard/OcInfoCard.js +1 -1
  5. package/dist/DataDisplay/ListDetail/OcListDetail.js +1 -1
  6. package/dist/DataDisplay/ListItem/OcListItem.js +1 -1
  7. package/dist/DataDisplay/NewTable/OcNewTable.js +1 -1
  8. package/dist/DataDisplay/OnboardingListItem/OcOnboardingListItem.js +1 -1
  9. package/dist/DataDisplay/OnboardingRecap/OcOnboardingRecap.js +1 -1
  10. package/dist/DataDisplay/Overview/OcOverview.js +1 -1
  11. package/dist/DataDisplay/Pagination/OcPagination.js +1 -1
  12. package/dist/DataDisplay/RowItemData/OcRowItemData.js +1 -1
  13. package/dist/DataDisplay/Table/OcTable.js +1 -1
  14. package/dist/DataDisplay/TransferSummary/OcTransferSummary.js +1 -1
  15. package/dist/Disclosure/Accordion/OcAccordion.js +1 -1
  16. package/dist/Disclosure/OnboardingAccordion/OnboardingAccordion.js +1 -1
  17. package/dist/Disclosure/OnboardingProduct/OnboardingProductOption.js +1 -1
  18. package/dist/Disclosure/Steps/OcSteps.js +1 -1
  19. package/dist/Disclosure/Tabs/Tabs.js +1 -1
  20. package/dist/Disclosure/Variants/OcVariants.js +1 -1
  21. package/dist/Elements/AdditionalContent/OcAdditionalContent.js +1 -1
  22. package/dist/Elements/AuthenticationOption/AuthenticationOption.js +1 -1
  23. package/dist/Elements/Box/OcBox.js +1 -1
  24. package/dist/Elements/Checklist/OcChecklist.js +1 -1
  25. package/dist/Elements/EmptyPage/OcEmptyPage.js +1 -1
  26. package/dist/Elements/FeatureOverviewCard/OcFeatureOverviewCard.js +1 -1
  27. package/dist/Elements/Header/OcHeader.js +1 -1
  28. package/dist/Elements/PageTitle/OcPageTitle.js +1 -1
  29. package/dist/Elements/SandboxBanner/OcSandboxBanner.js +1 -1
  30. package/dist/Elements/Sidebar/OcSidebar.js +2 -2
  31. package/dist/Elements/SubSidebar/OcSubSidebar.js +1 -1
  32. package/dist/Elements/TopBanner/OcTopBanner.js +1 -1
  33. package/dist/Elements/VerificationOption/OcVerificationOption.js +1 -1
  34. package/dist/Feedback/Banner/OcBanner.js +1 -1
  35. package/dist/Feedback/Chip/OcChip.js +1 -1
  36. package/dist/Feedback/ShareIcon/OcShareIcon.js +1 -1
  37. package/dist/Feedback/Snackbar/OcSnackbar.js +1 -1
  38. package/dist/Form/BaseInput/OcBaseInput.js +1 -1
  39. package/dist/Form/Button/OcButton.js +1 -1
  40. package/dist/Form/Calendar/OcCalendar.js +1 -1
  41. package/dist/Form/CardInput/OcCardInput.js +1 -1
  42. package/dist/Form/Checkbox/OcCheckbox.js +1 -1
  43. package/dist/Form/CheckboxesGroup/OcCheckboxesGroup.js +1 -1
  44. package/dist/Form/Criteria/OcCriteria.js +1 -1
  45. package/dist/Form/Cropper/OcCropper.js +1 -1
  46. package/dist/Form/DatePicker/OcDatePicker.js +1 -1
  47. package/dist/Form/EmojiPicker/OcEmojiPicker.js +1 -1
  48. package/dist/Form/Input/OcInput.js +1 -1
  49. package/dist/Form/LinkInput/OcLinkInput.js +1 -1
  50. package/dist/Form/MultipleUploadFile/OcMultipleUploadFile.js +1 -1
  51. package/dist/Form/NumberInput/OcNumberInput.js +1 -1
  52. package/dist/Form/PhoneInput/OcPhoneInput.js +1 -1
  53. package/dist/Form/Radio/OcRadio.js +1 -1
  54. package/dist/Form/RadioGroup/OcRadioGroup.js +1 -1
  55. package/dist/Form/RangeInput/OcRangeInput.js +1 -1
  56. package/dist/Form/SectionItem/OcSectionItem.js +1 -1
  57. package/dist/Form/Select/OcSelect.js +1 -1
  58. package/dist/Form/SelectOptions/OcSelectOptions.js +1 -1
  59. package/dist/Form/SingleFileUpload/OcSingleFileUpload.js +1 -1
  60. package/dist/Form/Slider/OcSlider.js +1 -1
  61. package/dist/Form/TextArea/OcTextArea.js +1 -1
  62. package/dist/Form/index.js +1 -1
  63. package/dist/FormBuilder/OcFormBuilder.js +1 -1
  64. package/dist/{OcAccountSetupProgress-BoLET4GT.js → OcAccountSetupProgress-fTA45QKt.js} +1 -1
  65. package/dist/{OcComplexCalendar-D8wu2vLW.js → OcComplexCalendar-BwFQNEAh.js} +1 -1
  66. package/dist/{OcComplexDatePicker-BsHedj3D.js → OcComplexDatePicker-BZXRwTqC.js} +1 -1
  67. package/dist/{OcCropper-DnjqTglb.js → OcCropper-m-TxiHsp.js} +1 -1
  68. package/dist/OcDataTable-DPwZCrNW.js +640 -0
  69. package/dist/{OcDraggableList-GdjnUSzp.js → OcDraggableList-C7Gr4QKY.js} +1 -1
  70. package/dist/{OcEmojiPicker-6ofHBLOi.js → OcEmojiPicker-DFv9K_sW.js} +1 -1
  71. package/dist/{OcFilterForm-DSuc0a2A.js → OcFilterForm-B6DDioJ5.js} +1 -1
  72. package/dist/{OcFilterSearch-BWPyxAUb.js → OcFilterSearch-DgstuIRK.js} +1 -1
  73. package/dist/{OcFilterSearchFor-DhTPL0hB.js → OcFilterSearchFor-CRBFdflB.js} +1 -1
  74. package/dist/{OcModalCropper-Bj1x2-3a.js → OcModalCropper-BOtA6wdE.js} +2 -2
  75. package/dist/OcSort-CdCqVYLU.js +98 -0
  76. package/dist/{OcTimePicker-CWxOAR8m.js → OcTimePicker-C4MNrXpI.js} +1 -1
  77. package/dist/Overlay/ConfirmationModal/OcConfirmationModal.js +1 -1
  78. package/dist/Overlay/CopyTooltip/OcCopyTooltip.js +1 -1
  79. package/dist/Overlay/Dropdown/OcDropdown.js +1 -1
  80. package/dist/Overlay/Modal/OcModal.js +1 -1
  81. package/dist/Overlay/SupportMenu/OcSupportMenu.js +1 -1
  82. package/dist/Overlay/Tooltip/OcTooltip.js +1 -1
  83. package/dist/Overlay/Whitelist/OcWhiteList.js +1 -1
  84. package/dist/{SubPlanCard-B2SKufjG.js → SubPlanCard-E8zL9B-D.js} +1 -1
  85. package/dist/{ThumbnailSection-DLGxDFCH.js → ThumbnailSection-Dnd2K49p.js} +1 -1
  86. package/dist/{ThumbnailTheme-BtIZA-dK.js → ThumbnailTheme-D2ur0y7U.js} +1 -1
  87. package/dist/{index-DjJgcNHc.js → index-I7kkCShO.js} +3208 -3181
  88. package/dist/index.js +49 -48
  89. package/package.json +3 -3
  90. package/dist/OcDataTable-C8vKFXfq.js +0 -621
@@ -0,0 +1,640 @@
1
+ import { ref as C, onMounted as Ce, createBlock as D, openBlock as o, unref as r, withCtx as y, createVNode as N, createElementVNode as q, createElementBlock as $, createCommentVNode as p, mergeProps as we, Fragment as ie, renderList as se, normalizeClass as re, toDisplayString as xe, computed as L, watch as $e, toRaw as Ze, nextTick as He, renderSlot as E, resolveDynamicComponent as _e, createSlots as el, normalizeProps as Se, guardReactiveProps as Oe } from "vue";
2
+ import { aG as Pe, B as Ae, C as ll, E as al, Q as tl, a4 as sl, aR as ol, aS as ul, aT as il, aU as rl, K as nl, L as Ve, j as dl } from "./index-I7kkCShO.js";
3
+ import { V as Fe } from "./vue-draggable-next.esm-bundler-QQ8zx__3.js";
4
+ import { getFromLocalStorage as je, formatHeadersFromLocalStorage as Ke, formatHeadersToLocalStorage as vl, setInLocalStorage as cl } from "./DataTable/utils/editColumnsUtils.js";
5
+ import { _ as Ee } from "./OcIcon-CUKFUeB7.js";
6
+ import { formatFilterDisplay as ml, clearAllFilters as pl } from "./DataTable/utils/filterUtils.js";
7
+ import { formatCustomItemsPerPageOptions as fl, getItemsPerPageOptions as yl } from "./DataTable/utils/paginationUtils.js";
8
+ import "./dayjs.min-7xVZzECu.js";
9
+ const gl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, bl = {
10
+ key: 0,
11
+ class: "gap-y-2 flex flex-col border-b pb-3 border-oc-gray-200"
12
+ }, kl = { class: "gap-y-2 flex flex-col" }, hl = {
13
+ key: 0,
14
+ class: "flex items-center bg-white justify-between h-[26px]"
15
+ }, wl = { class: "flex items-center w-full gap-x-3" }, xl = { class: "truncate w-full max-w-[160px]" }, $l = {
16
+ __name: "ColumnEdit",
17
+ props: {
18
+ /** Initial active/visible state overrides for columns. Keyed by column key. */
19
+ options: {
20
+ type: Object,
21
+ default: () => ({})
22
+ },
23
+ /** Full list of column header objects — each with `key`, `label`, and optional `isActive`. */
24
+ headers: {
25
+ type: Array,
26
+ default: () => []
27
+ },
28
+ /** localStorage key used to persist the column order and visibility across sessions. */
29
+ localKey: {
30
+ type: String,
31
+ default: ""
32
+ }
33
+ },
34
+ emits: {
35
+ /** A column's active state was toggled. Payload: column header object. */
36
+ "change-active": [],
37
+ /** A column was reordered via drag. Payload: move event. */
38
+ onMoved: [],
39
+ /** Column order or visibility changed. Payload: `{ fixedHeaders, activeHeaders, isOnMount }`. */
40
+ "update-order": []
41
+ },
42
+ setup(k, { emit: ue }) {
43
+ const j = ue, h = k, f = C([]), S = C([]), O = C(!1), g = {
44
+ handle: ".drag-el",
45
+ filter: ".is-disabled",
46
+ group: "headers",
47
+ animation: 500,
48
+ forceFallback: !1,
49
+ move: (l) => l.to.dataset.activeHeaders ? !0 : !!l.draggedContext.futureIndex,
50
+ "onUpdate:modelValue": () => J()
51
+ }, J = (l = !1) => {
52
+ S.value = S.value.map((d) => ({
53
+ ...d,
54
+ isActive: !0
55
+ })), j("update-order", {
56
+ fixedHeaders: S.value,
57
+ activeHeaders: f.value,
58
+ isOnMount: l
59
+ });
60
+ };
61
+ return Ce(() => {
62
+ const l = je(h.localKey), { fixed: d, active: v } = Ke(l, h.headers, h.localKey);
63
+ S.value = d || h.headers.slice(0, 1), f.value = v || h.headers.slice(1).map((b) => {
64
+ var t, I, P;
65
+ return {
66
+ ...b,
67
+ isActive: ((P = (I = (t = h.options) == null ? void 0 : t.active) == null ? void 0 : I.find((Q) => Q.key === b.key)) == null ? void 0 : P.isActive) ?? !0
68
+ };
69
+ }), J(!0);
70
+ }), (l, d) => (o(), D(r(Pe), {
71
+ modelValue: O.value,
72
+ "onUpdate:modelValue": d[3] || (d[3] = (v) => O.value = v),
73
+ "is-attach-to-body": ""
74
+ }, {
75
+ menu: y(() => [
76
+ q("div", gl, [
77
+ S.value.length ? (o(), $("div", bl, [
78
+ d[4] || (d[4] = q("span", { class: "text-oc-text-400 font-medium" }, "Fixed columns", -1)),
79
+ N(r(Fe), we({
80
+ key: "key",
81
+ modelValue: S.value,
82
+ "onUpdate:modelValue": d[0] || (d[0] = (v) => S.value = v)
83
+ }, g), {
84
+ default: y(() => [
85
+ (o(!0), $(ie, null, se(S.value, (v, b) => (o(), $("div", {
86
+ key: v.key,
87
+ class: re(["flex items-center justify-between h-[26px]", b ? "" : "is-disabled"])
88
+ }, [
89
+ q("span", null, xe(v.label), 1),
90
+ b ? (o(), D(r(Ee), {
91
+ key: 0,
92
+ width: "18",
93
+ height: "18",
94
+ class: "text-oc-text-400 drag-el cursor-move",
95
+ name: "draggable"
96
+ })) : p("", !0)
97
+ ], 2))), 128))
98
+ ]),
99
+ _: 1
100
+ }, 16, ["modelValue"])
101
+ ])) : p("", !0),
102
+ q("div", kl, [
103
+ d[5] || (d[5] = q("span", { class: "text-oc-text-400 font-medium" }, "Active columns", -1)),
104
+ N(r(Fe), we({
105
+ key: "key",
106
+ modelValue: f.value,
107
+ "onUpdate:modelValue": d[2] || (d[2] = (v) => f.value = v)
108
+ }, g, { "data-active-headers": "true" }), {
109
+ default: y(() => [
110
+ (o(!0), $(ie, null, se(f.value, (v) => (o(), $(ie, {
111
+ key: v.key
112
+ }, [
113
+ v.key !== "actions" ? (o(), $("div", hl, [
114
+ q("div", wl, [
115
+ N(r(ll), {
116
+ modelValue: v.isActive,
117
+ "onUpdate:modelValue": [
118
+ (b) => v.isActive = b,
119
+ d[1] || (d[1] = (b) => J())
120
+ ],
121
+ class: "!w-fit"
122
+ }, null, 8, ["modelValue", "onUpdate:modelValue"]),
123
+ q("div", xl, xe(v.label), 1)
124
+ ]),
125
+ f.value.length > 1 ? (o(), D(r(Ee), {
126
+ key: 0,
127
+ width: "18",
128
+ height: "18",
129
+ class: "text-oc-text-400 drag-el cursor-move",
130
+ name: "draggable"
131
+ })) : p("", !0)
132
+ ])) : p("", !0)
133
+ ], 64))), 128))
134
+ ]),
135
+ _: 1
136
+ }, 16, ["modelValue"])
137
+ ])
138
+ ])
139
+ ]),
140
+ default: y(() => [
141
+ N(r(Ae), {
142
+ label: "Edit Column",
143
+ "left-icon": "setting",
144
+ size: "small",
145
+ class: "whitespace-nowrap",
146
+ variant: "secondary"
147
+ })
148
+ ]),
149
+ _: 1
150
+ }, 8, ["modelValue"]));
151
+ }
152
+ }, Sl = { class: "relative flex flex-col gap-9" }, Ol = {
153
+ key: 0,
154
+ class: "flex items-center px-4 min-h-[44px]"
155
+ }, Vl = {
156
+ key: 0,
157
+ class: "absolute flex items-center gap-5 left-5"
158
+ }, Fl = {
159
+ key: 1,
160
+ class: "absolute flex gap-3 left-5"
161
+ }, El = {
162
+ key: 1,
163
+ class: "flex justify-center w-full gap-5 md:justify-start"
164
+ }, Cl = {
165
+ key: 2,
166
+ class: "items-center hidden md:flex"
167
+ }, Il = {
168
+ __name: "OcDataTable",
169
+ props: {
170
+ /** Show skeleton loading rows while data is being fetched. */
171
+ isLoading: Boolean,
172
+ /**
173
+ * Unique ID for this table instance. Used as a localStorage namespace when columnEdit is enabled.
174
+ */
175
+ id: {
176
+ type: String,
177
+ required: !0
178
+ },
179
+ /**
180
+ * Full configuration object for the table.
181
+ *
182
+ * `tableOptions` — table structure:
183
+ * - `headers` — array of `{ key, label, variant?, class?, isCopy?, stickyLeft?, stickyRight?, chipOptions?, disableClickRow? }`
184
+ * - `fields` — array of row data objects keyed to header keys
185
+ * - `isSelectable` — show row checkboxes
186
+ * - `isCursorPointer` — cursor:pointer on rows
187
+ * - `isSticky` — horizontal scroll with sticky first column
188
+ * - `isBorderless` — remove outer border
189
+ *
190
+ * `filterOptions` (optional) — filter toolbar config:
191
+ * - `search` — `{ key, options? }` enables search bar
192
+ * - `form` — FormBuilder jsonForm array rendered in the filter dropdown
193
+ * - `sort` — `{ key, options }` renders the Sort control; `key` is the filterData key holding `{ field, direction }`, `options` is the `{ label, value }` field list
194
+ * - `tabs` — `{ key, options }` tab bar above the table
195
+ * - `per_page` — `{ key }` controls which filter key holds items-per-page
196
+ * - `columnEdit` — `{ key, localStorageKey }` enables column show/hide editor
197
+ *
198
+ * `pagination` — `{ total, last_page }` for numbered pagination; omit for cursor mode.
199
+ * `cursor` — `{ prev, next }` cursor strings for cursor-based navigation.
200
+ * `perPageOptions` — custom per-page dropdown options.
201
+ * `hidePerPageDropdown` — hide the per-page selector.
202
+ */
203
+ options: {
204
+ type: Object,
205
+ required: !0
206
+ },
207
+ /**
208
+ * Current filter state object (v-model:filter). Includes page, per_page, search query, tab value, etc.
209
+ * The component emits `update:filter` whenever filters change.
210
+ */
211
+ filter: {
212
+ type: Object,
213
+ default: () => ({})
214
+ },
215
+ /** Currently selected rows array (v-model:selected). Each item is a row data object from fields. */
216
+ selected: {
217
+ type: Array,
218
+ required: !1
219
+ },
220
+ /** CSS class or function `(row, index) => string` applied to each data row element. */
221
+ rowClass: String,
222
+ /**
223
+ * Field name or function used to uniquely identify each row.
224
+ * If a string, `row[rowKey]` is used. If a function, receives the row and returns a key.
225
+ */
226
+ rowKey: {
227
+ type: [String, Function],
228
+ default: "id"
229
+ },
230
+ /** Field name in each row data object containing the URL to navigate to on row click. */
231
+ rowLink: String,
232
+ /** Use the new table design (NewTable component) instead of the classic Table. */
233
+ isNewTable: {
234
+ type: Boolean,
235
+ default: !1
236
+ },
237
+ /** Highlight a specific row by index (0-based). Set -1 to clear. */
238
+ selectedIndex: {
239
+ type: Number,
240
+ default: -1
241
+ },
242
+ /**
243
+ * Rows that cannot be selected (NewTable only). Array of row data objects,
244
+ * matched against each row by `rowKey`. Their selection checkbox is hidden
245
+ * and they are excluded from the select-all action.
246
+ */
247
+ disabledRows: {
248
+ type: Array,
249
+ default: () => []
250
+ }
251
+ },
252
+ emits: {
253
+ /** Selected rows changed. Payload: array of selected row objects (v-model:selected). */
254
+ "update:selected": [],
255
+ /** Filter state changed. Payload: current filter object (v-model:filter). */
256
+ "update:filter": [],
257
+ /** Emitted alongside update:filter after every filter action. Payload: current filter object. */
258
+ "apply-filter": [],
259
+ /** A row cell was clicked. Payload: `{ field, header }`. */
260
+ "click:row": [],
261
+ /** A filter form field value changed. Payload: `{ form, value }`. */
262
+ "filter-fields-changed": [],
263
+ /** A filter tag was dismissed. Payload: the removed filter field key. */
264
+ "filter-removed": [],
265
+ /** Filter dropdown opened or closed. Payload: boolean. */
266
+ "filter-open": [],
267
+ /** Search query was submitted or cleared. Payload: query string. */
268
+ "search-query-changed": [],
269
+ /** A table cell was hovered. Payload: `{ item, key }`. */
270
+ "hover:cell": [],
271
+ /** Column visibility or order changed via the column editor. Payload: active headers array. */
272
+ "columns-changed": [],
273
+ /** Table has mounted and column order is initialized. */
274
+ "on-table-ready": []
275
+ },
276
+ setup(k, { emit: ue }) {
277
+ var ce, me, pe, fe, ye, ge, be, ke, he;
278
+ const j = k, h = ue, f = L(() => {
279
+ var e;
280
+ return (e = j.options) == null ? void 0 : e.cursor;
281
+ }), S = C(), O = L(() => {
282
+ var e;
283
+ return (e = j.options) == null ? void 0 : e.tableOptions;
284
+ }), g = C({
285
+ total: 0,
286
+ last_page: 1
287
+ });
288
+ $e(
289
+ () => {
290
+ var e;
291
+ return (e = j.options) == null ? void 0 : e.pagination;
292
+ },
293
+ (e) => {
294
+ g.value = e;
295
+ },
296
+ { deep: !0, immediate: !0 }
297
+ );
298
+ const J = L(() => {
299
+ var a;
300
+ return {
301
+ ...O.value,
302
+ headers: S.value ? S.value.map((u) => {
303
+ var n, i;
304
+ return u.class = ((i = (n = O.value) == null ? void 0 : n.headers.find((c) => c.key === u.key)) == null ? void 0 : i.class) ?? "", u;
305
+ }).filter((u) => u.isActive) : (a = O.value) == null ? void 0 : a.headers.filter((u) => Re(u.key))
306
+ };
307
+ }), l = L(() => {
308
+ var e;
309
+ return (e = j.options) == null ? void 0 : e.filterOptions;
310
+ }), d = L(() => {
311
+ var e;
312
+ return (e = j.options) == null ? void 0 : e.hidePerPageDropdown;
313
+ }), v = L(() => {
314
+ var e;
315
+ return ((e = g.value) == null ? void 0 : e.last_page) === 1;
316
+ }), b = JSON.parse(JSON.stringify(Ze(j.filter)));
317
+ !b && g.value ? b.page = 1 : !b && f && (b.cursor = "");
318
+ const t = C(b);
319
+ $e(
320
+ () => j.filter,
321
+ (e) => {
322
+ t.value = { ...e };
323
+ },
324
+ { deep: !0 }
325
+ );
326
+ const I = C(!1), P = C(t.value[(me = (ce = l.value) == null ? void 0 : ce.tabs) == null ? void 0 : me.key]), Q = C(t.value.page), G = C(
327
+ (fe = (pe = l.value) == null ? void 0 : pe.per_page) != null && fe.key ? t.value[(ge = (ye = l.value) == null ? void 0 : ye.per_page) == null ? void 0 : ge.key] : t.value.per_page
328
+ ), ne = ((he = t.value[t.value.selectedSearchOption || ((ke = (be = l.value) == null ? void 0 : be.search) == null ? void 0 : ke.key)]) == null ? void 0 : he.trim()) ?? "", R = C(ne ? ne.split(",") : []), de = C(!1), Ue = L(
329
+ () => {
330
+ var e;
331
+ return fl((e = j.options) == null ? void 0 : e.perPageOptions);
332
+ }
333
+ ), Te = L(() => yl(Ue.value, g.value)), De = L(() => {
334
+ var e;
335
+ return ((e = j.selected) == null ? void 0 : e.length) > 0;
336
+ }), Le = (e) => {
337
+ !e.trim() || !t.value.selectedSearchOption && R.value.includes(e) || (R.value = [e], A(), h("search-query-changed", e));
338
+ }, Ie = (e) => {
339
+ R.value = R.value.filter((a) => a !== e), A();
340
+ }, Ne = L(() => ml(t.value, l.value)), Re = (e) => {
341
+ var a, u, n, i, c, w;
342
+ return ((w = (c = (i = (n = t.value) == null ? void 0 : n[(u = (a = l.value) == null ? void 0 : a.columnEdit) == null ? void 0 : u.key]) == null ? void 0 : i.active) == null ? void 0 : c.find((V) => V.key === e)) == null ? void 0 : w.isActive) ?? !0;
343
+ }, Be = ({ fixedHeaders: e, activeHeaders: a, isOnMount: u }) => {
344
+ var n, i, c, w, V, K, s, U;
345
+ if (t.value[(i = (n = l.value) == null ? void 0 : n.columnEdit) == null ? void 0 : i.key] || (t.value[(w = (c = l.value) == null ? void 0 : c.columnEdit) == null ? void 0 : w.key] = {}), t.value[(K = (V = l.value) == null ? void 0 : V.columnEdit) == null ? void 0 : K.key].fixed = e, t.value[(U = (s = l.value) == null ? void 0 : s.columnEdit) == null ? void 0 : U.key].active = a, S.value = [...e, ...a], !u) {
346
+ const F = vl(e, a);
347
+ cl(l.value.columnEdit.localStorageKey, F);
348
+ }
349
+ h("columns-changed", a);
350
+ }, Qe = () => {
351
+ var e, a, u, n, i, c;
352
+ if ((a = (e = l.value) == null ? void 0 : e.columnEdit) != null && a.localStorageKey) {
353
+ const w = je(l.value.columnEdit.localStorageKey);
354
+ if (w) {
355
+ const { fixed: V, active: K } = Ke(
356
+ w,
357
+ O.value.headers,
358
+ l.value.columnEdit.localStorageKey
359
+ );
360
+ t.value[(n = (u = l.value) == null ? void 0 : u.columnEdit) == null ? void 0 : n.key].fixed = V, t.value[(c = (i = l.value) == null ? void 0 : i.columnEdit) == null ? void 0 : c.key].active = K, S.value = [...V, ...K];
361
+ }
362
+ }
363
+ }, ze = (e) => {
364
+ t.value.selectedSearchOption = e;
365
+ }, qe = () => {
366
+ var a, u, n, i;
367
+ R.value = [], P.value = "";
368
+ const e = (u = (a = l.value) == null ? void 0 : a.tabs) != null && u.filter_name ? b[(i = (n = l.value) == null ? void 0 : n.tabs) == null ? void 0 : i.key] : P.value;
369
+ t.value = pl(
370
+ t.value,
371
+ l.value,
372
+ G.value,
373
+ e
374
+ ), A();
375
+ }, Je = () => {
376
+ A(null, Q.value);
377
+ }, A = (e = null, a = !1, u = "", n = !1, i = !1) => {
378
+ var w, V, K, s, U, F, T, M, B, W, X, Y, Z, H, _, ee, le, ae, te;
379
+ g.value && !a && (Q.value = 1), g.value ? t.value.page = Q.value : t.value.cursor = u, (w = l.value) != null && w.per_page ? t.value[l.value.per_page.key] = G.value : t.value.per_page = G.value, (V = l.value) != null && V.tabs && i && (t.value[l.value.tabs.key] = P.value), (s = (K = l.value) == null ? void 0 : K.tabs) != null && s.filter_name && (i ? t.value[(F = (U = l.value) == null ? void 0 : U.tabs) == null ? void 0 : F.filter_name] = null : e && (P.value = null)), (T = l.value) != null && T.search && ((B = (M = l.value.search) == null ? void 0 : M.options) != null && B.length ? (Object.keys(t.value).forEach((x) => {
380
+ var z;
381
+ (z = l.value.search.options) != null && z.map((m) => m.value).includes(x) && delete t.value[x];
382
+ }), t.value[((W = t.value) == null ? void 0 : W.selectedSearchOption) || ((Z = (Y = (X = l.value.search) == null ? void 0 : X.options) == null ? void 0 : Y[0]) == null ? void 0 : Z.value) || l.value.search.key] = R.value.join()) : t.value[l.value.search.key] = R.value.join()), e && (I.value = !1, t.value = { ...t.value, ...e }, Object.keys(t.value).forEach((x) => {
383
+ Array.isArray(t.value[x]) && t.value[x].length === 0 && delete t.value[x];
384
+ }));
385
+ let c = (_ = (H = l.value) == null ? void 0 : H.tabs) == null ? void 0 : _.key;
386
+ if (c && P.value !== t.value[c] && !((le = (ee = l.value) == null ? void 0 : ee.tabs) != null && le.filter_name)) {
387
+ const x = (te = (ae = l.value.tabs) == null ? void 0 : ae.options) == null ? void 0 : te.find(
388
+ (z) => {
389
+ var m, oe;
390
+ return ((m = z.value) == null ? void 0 : m.toString()) === ((oe = t.value[c]) == null ? void 0 : oe.toString());
391
+ }
392
+ );
393
+ x != null && x.value && (P.value = x.value, i || A(null, !1, "", !1, !0));
394
+ }
395
+ Me(n);
396
+ }, Ge = (e) => {
397
+ t.value[l.value.sort.key] = e, A();
398
+ }, ve = C(null), Me = (e = !1) => {
399
+ clearTimeout(ve.value), ve.value = setTimeout(() => {
400
+ h("update:filter", { ...t.value }, e), h("apply-filter", { ...t.value }, e);
401
+ }, 50);
402
+ }, We = (e, a) => {
403
+ (a === l.value.tabs.key || a === "tabs") && (P.value = ""), A(e), h("filter-removed", a);
404
+ };
405
+ return Ce(() => {
406
+ Qe(), He(() => {
407
+ h("on-table-ready");
408
+ });
409
+ }), (e, a) => {
410
+ var u, n, i, c, w, V, K;
411
+ return o(), $("div", Sl, [
412
+ J.value ? (o(), D(_e(k.isNewTable ? r(al) : r(tl)), {
413
+ key: 0,
414
+ selected: k.selected,
415
+ "row-key": k.rowKey,
416
+ options: J.value,
417
+ "is-loading": k.isLoading,
418
+ "loading-rows": G.value,
419
+ "row-class": k.rowClass,
420
+ "row-link": k.rowLink,
421
+ "selected-index": k.selectedIndex,
422
+ "disabled-rows": k.disabledRows,
423
+ "is-sticky": O.value.isSticky,
424
+ "is-borderless": O.value.isBorderless,
425
+ "onUpdate:selected": a[8] || (a[8] = (s) => e.$emit("update:selected", s)),
426
+ "onClick:row": a[9] || (a[9] = (s) => e.$emit("click:row", s)),
427
+ "onHover:cell": a[10] || (a[10] = (s) => e.$emit("hover:cell", s))
428
+ }, el({
429
+ after: y(() => [
430
+ E(e.$slots, "after")
431
+ ]),
432
+ empty: y(() => [
433
+ E(e.$slots, "empty")
434
+ ]),
435
+ "table-header": y((s) => [
436
+ E(e.$slots, "table-header", Se(Oe(s)))
437
+ ]),
438
+ "table-body": y((s) => [
439
+ E(e.$slots, "table-body", Se(Oe(s)))
440
+ ]),
441
+ "after-rows": y(() => [
442
+ E(e.$slots, "after-rows")
443
+ ]),
444
+ _: 2
445
+ }, [
446
+ e.$slots.before || (u = l.value) != null && u.search || (n = l.value) != null && n.form || (i = l.value) != null && i.tabs || (c = l.value) != null && c.sort ? {
447
+ name: "before",
448
+ fn: y(() => {
449
+ var s, U, F, T, M;
450
+ return [
451
+ E(e.$slots, "before"),
452
+ (s = l.value) != null && s.search || (U = l.value) != null && U.form || (F = l.value) != null && F.tabs || (T = l.value) != null && T.sort ? (o(), $("div", Ol, [
453
+ De.value ? (o(), $("div", Vl, [
454
+ E(e.$slots, "bulk-actions", { selectedRows: k.selected })
455
+ ])) : (o(), $("div", Fl, [
456
+ (M = l.value) != null && M.tabs ? (o(), D(r(sl), {
457
+ key: 0,
458
+ modelValue: P.value,
459
+ "onUpdate:modelValue": [
460
+ a[0] || (a[0] = (B) => P.value = B),
461
+ a[1] || (a[1] = (B) => A(null, !1, "", !1, !0))
462
+ ],
463
+ "is-disabled": k.isLoading,
464
+ tabs: l.value.tabs.options,
465
+ variant: "pills"
466
+ }, null, 8, ["modelValue", "is-disabled", "tabs"])) : p("", !0)
467
+ ])),
468
+ E(e.$slots, "filter-options", {}, () => {
469
+ var B, W, X, Y, Z, H, _, ee, le, ae, te, x, z;
470
+ return [
471
+ (B = l.value) != null && B.search || (W = l.value) != null && W.form || (X = l.value) != null && X.sort || (Y = l.value) != null && Y.columnEdit ? (o(), $("div", {
472
+ key: 0,
473
+ class: re([
474
+ "flex gap-3 absolute ml-auto items-center bg-oc-bg-light right-4 max-w-[calc(100%-24px)]",
475
+ l.value ? de.value ? "md:w-fit w-full" : "" : "w-full justify-end"
476
+ ])
477
+ }, [
478
+ (Z = l.value) != null && Z.search ? (o(), D(r(ol), {
479
+ key: 0,
480
+ "is-search-only": !l.value.tabs || l.value.isSearchOnly,
481
+ "search-options": ((H = l.value.search) == null ? void 0 : H.options) ?? [],
482
+ "selected-option": (((_ = t.value) == null ? void 0 : _.selectedSearchOption) || ((ae = (le = (ee = l.value.search) == null ? void 0 : ee.options) == null ? void 0 : le[0]) == null ? void 0 : ae.value)) ?? "keywords",
483
+ onAddQuery: Le,
484
+ onToggle: a[2] || (a[2] = (m) => de.value = m),
485
+ onChangeSearchKey: ze
486
+ }, null, 8, ["is-search-only", "search-options", "selected-option"])) : p("", !0),
487
+ (te = l.value) != null && te.form ? (o(), D(r(Pe), {
488
+ key: 1,
489
+ modelValue: I.value,
490
+ "onUpdate:modelValue": [
491
+ a[6] || (a[6] = (m) => I.value = m),
492
+ a[7] || (a[7] = (m) => e.$emit("filter-open", m))
493
+ ],
494
+ distance: 9,
495
+ placement: "bottom-end",
496
+ "is-attach-to-body": "",
497
+ "max-menu-height": 500
498
+ }, {
499
+ menu: y(() => [
500
+ I.value ? (o(), D(r(ul), {
501
+ key: 0,
502
+ id: k.id,
503
+ "json-form": l.value.form ?? [],
504
+ grid: l.value.grid ?? null,
505
+ values: t.value,
506
+ actions: l.value.actions,
507
+ onApplyFilter: a[3] || (a[3] = (m) => A(m)),
508
+ onFilterFieldsChanged: a[4] || (a[4] = (m) => h("filter-fields-changed", m)),
509
+ onCancel: a[5] || (a[5] = (m) => I.value = !1)
510
+ }, {
511
+ default: y(({ errors: m, values: oe, jsonForm: Xe, updateForm: Ye }) => [
512
+ E(e.$slots, "custom-filter-form", {
513
+ errors: m,
514
+ values: oe,
515
+ jsonForm: Xe,
516
+ updateFilter: Ye
517
+ })
518
+ ]),
519
+ _: 3
520
+ }, 8, ["id", "json-form", "grid", "values", "actions"])) : p("", !0)
521
+ ]),
522
+ default: y(() => [
523
+ N(r(Ae), {
524
+ "is-active": I.value,
525
+ variant: "secondary",
526
+ "left-icon": "filter",
527
+ size: "small",
528
+ class: "w-8",
529
+ "icon-class": "shrink-0"
530
+ }, null, 8, ["is-active"])
531
+ ]),
532
+ _: 3
533
+ }, 8, ["modelValue"])) : p("", !0),
534
+ (x = l.value) != null && x.sort ? (o(), D(r(il), {
535
+ key: 2,
536
+ "sort-options": l.value.sort.options ?? [],
537
+ "model-value": t.value[l.value.sort.key],
538
+ "onUpdate:modelValue": Ge
539
+ }, null, 8, ["sort-options", "model-value"])) : p("", !0),
540
+ l.value.columnEdit ? (o(), D($l, {
541
+ key: 3,
542
+ options: t.value.columnEdit,
543
+ headers: ((z = O.value) == null ? void 0 : z.headers) || [],
544
+ "local-key": l.value.columnEdit.localStorageKey,
545
+ onUpdateOrder: Be
546
+ }, null, 8, ["options", "headers", "local-key"])) : p("", !0)
547
+ ], 2)) : p("", !0)
548
+ ];
549
+ })
550
+ ])) : p("", !0),
551
+ N(r(rl), {
552
+ filters: Ne.value,
553
+ queries: R.value,
554
+ class: "border-t border-oc-gray-200",
555
+ onRemoveQuery: Ie,
556
+ onRemoveAll: qe,
557
+ onRemoveFilter: We
558
+ }, null, 8, ["filters", "queries"])
559
+ ];
560
+ }),
561
+ key: "0"
562
+ } : void 0,
563
+ se((w = O.value) == null ? void 0 : w.headers, (s, U) => ({
564
+ name: s.key,
565
+ fn: y(({ data: F, item: T }) => [
566
+ E(e.$slots, s.key, {
567
+ data: F,
568
+ item: T
569
+ })
570
+ ])
571
+ })),
572
+ se((V = O.value) == null ? void 0 : V.headers, (s, U) => ({
573
+ name: `header-${s.key}-tooltip`,
574
+ fn: y(({ data: F, item: T }) => [
575
+ E(e.$slots, `header-${s.key}-tooltip`, {
576
+ data: F,
577
+ item: T
578
+ })
579
+ ])
580
+ })),
581
+ se((K = O.value) == null ? void 0 : K.headers, (s, U) => ({
582
+ name: `header-${s.key}-left-tooltip`,
583
+ fn: y(({ data: F, item: T }) => [
584
+ E(e.$slots, `header-${s.key}-left-tooltip`, {
585
+ data: F,
586
+ item: T
587
+ })
588
+ ])
589
+ }))
590
+ ]), 1064, ["selected", "row-key", "options", "is-loading", "loading-rows", "row-class", "row-link", "selected-index", "disabled-rows", "is-sticky", "is-borderless"])) : p("", !0),
591
+ E(e.$slots, "before-pagination"),
592
+ g.value || f.value ? (o(), $("div", {
593
+ key: 1,
594
+ class: re(["flex items-center gap-3", g.value && g.value.last_page === 1 ? "justify-end" : ""])
595
+ }, [
596
+ g.value && !v.value ? (o(), D(r(nl), {
597
+ key: 0,
598
+ modelValue: Q.value,
599
+ "onUpdate:modelValue": [
600
+ a[11] || (a[11] = (s) => Q.value = s),
601
+ Je
602
+ ],
603
+ class: "justify-center text-[13px]",
604
+ "max-page": g.value.last_page,
605
+ strategy: g.value.strategy,
606
+ "total-visible": "5"
607
+ }, null, 8, ["modelValue", "max-page", "strategy"])) : p("", !0),
608
+ f.value ? (o(), $("div", El, [
609
+ N(r(Ve), {
610
+ disabled: !f.value.prev,
611
+ onClick: a[12] || (a[12] = (s) => f.value.prev ? A(null, !1, f.value.prev) : null)
612
+ }, null, 8, ["disabled"]),
613
+ N(r(Ve), {
614
+ disabled: !f.value.next,
615
+ "is-next": "",
616
+ onClick: a[13] || (a[13] = (s) => f.value.next ? A(null, !1, f.value.next) : null)
617
+ }, null, 8, ["disabled"])
618
+ ])) : p("", !0),
619
+ d.value ? p("", !0) : (o(), $("div", Cl, [
620
+ N(r(dl), {
621
+ modelValue: G.value,
622
+ "onUpdate:modelValue": [
623
+ a[14] || (a[14] = (s) => G.value = s),
624
+ a[15] || (a[15] = (s) => A(null))
625
+ ],
626
+ label: "Item per page",
627
+ "is-inline-label": "",
628
+ "popper-options": { placement: "auto" },
629
+ options: Te.value,
630
+ "select-text-class": "!text-[13px]"
631
+ }, null, 8, ["modelValue", "options"])
632
+ ]))
633
+ ], 2)) : p("", !0)
634
+ ]);
635
+ };
636
+ }
637
+ };
638
+ export {
639
+ Il as default
640
+ };
@@ -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 { aP as D, aL as S, aG as B } from "./index-DjJgcNHc.js";
2
+ import { aP as D, aL as S, aG as B } from "./index-I7kkCShO.js";
3
3
  import { _ as g } from "./OcIcon-CUKFUeB7.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" }, O = ["href"], W = { class: "min-w-[120px]" }, j = { class: "truncate w-[200px]" }, z = { class: "flex items-center ml-4" }, A = { class: "flex w-full" }, P = {
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 { aG as U, d as G, B as b } from "./index-DjJgcNHc.js";
2
+ import { aG as U, d as G, B as b } from "./index-I7kkCShO.js";
3
3
  import { EMOJI_LIST as a, EMOJI_CATEGORIES as J } from "./Form/EmojiPicker/conts/emoji.js";
4
4
  import { _ as P } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  const A = { class: "flex items-center justify-center rounded bg-oc-bg-dark h-[140px] relative w-full z-50" }, F = ["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, createElementBlock as k, openBlock as O, renderSlot as $, createElementVNode as f, createVNode as u, unref as i } from "vue";
2
- import { t as C, B as m } from "./index-DjJgcNHc.js";
2
+ import { t as C, B as m } from "./index-I7kkCShO.js";
3
3
  const w = { class: "flex w-[326px] flex-col" }, A = { class: "p-5" }, E = { class: "sticky bottom-0 flex gap-x-5 bg-oc-bg-light px-5 pb-5 pt-3" }, N = {
4
4
  __name: "OcFilterForm",
5
5
  props: {
@@ -1,5 +1,5 @@
1
1
  import { ref as u, computed as K, createElementBlock as d, openBlock as s, Fragment as p, createElementVNode as r, createCommentVNode as f, normalizeClass as O, createVNode as m, unref as c, withKeys as N, createSlots as Q, withCtx as h, toDisplayString as D, renderList as E, createBlock as S, nextTick as F } from "vue";
2
- import { d as I, aG as U, aH as j, B as w } from "./index-DjJgcNHc.js";
2
+ import { d as I, aG as U, aH as j, B as w } from "./index-I7kkCShO.js";
3
3
  import { _ as q } from "./OcIcon-CUKFUeB7.js";
4
4
  const A = { class: "flex gap-x-4" }, G = { class: "flex gap-x-2 items-center pl-2 text-oc-text-400 font-medium text-sm" }, H = { class: "p-2 flex flex-col" }, P = {
5
5
  __name: "OcFilterSearch",