@orchidui/core 1.6.1-43 → 1.6.1-45

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-jDeDTeV9.js → OcAccountSetupProgress-ysKF_moP.js} +1 -1
  58. package/dist/{OcComplexCalendar-C3TLCMzD.js → OcComplexCalendar-DujXG5J0.js} +1 -1
  59. package/dist/{OcComplexDatePicker-YknMQyKz.js → OcComplexDatePicker-cqExJZaD.js} +1 -1
  60. package/dist/{OcCropper-Byc93ZzC.js → OcCropper-B7LfAUMI.js} +1 -1
  61. package/dist/OcDataTable-tOzsAQeQ.js +580 -0
  62. package/dist/{OcDraggableList-Dp_sZK6g.js → OcDraggableList-Cs7cEydt.js} +1 -1
  63. package/dist/{OcEmojiPicker-1Kf0_0cm.js → OcEmojiPicker-DqiHMsfx.js} +1 -1
  64. package/dist/{OcFilterForm-B8ruF973.js → OcFilterForm-D9-T34N0.js} +1 -1
  65. package/dist/{OcFilterSearch-BAqXPUXD.js → OcFilterSearch-BGlqUFme.js} +1 -1
  66. package/dist/{OcFilterSearchFor-CQcp54Tx.js → OcFilterSearchFor-CVWUn1gW.js} +1 -1
  67. package/dist/{OcModalCropper-uwnI6vDS.js → OcModalCropper-BGnrjhoY.js} +2 -2
  68. package/dist/{OcTimePicker-BYCtzMSE.js → OcTimePicker-Ct7pKPHg.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-CavLUkzN.js → SubPlanCard-CBhRbCNj.js} +1 -1
  77. package/dist/{ThumbnailSection-A3yEdqnW.js → ThumbnailSection-BGMo935I.js} +1 -1
  78. package/dist/{ThumbnailTheme-vncn2wto.js → ThumbnailTheme-BqMKV8rC.js} +1 -1
  79. package/dist/{index-CxHQy6ma.js → index-DczBP2kE.js} +8 -8
  80. package/dist/index.js +1 -1
  81. package/package.json +1 -1
  82. package/dist/OcDataTable-D0ZEtZUe.js +0 -570
@@ -1,4 +1,4 @@
1
- import { aC as r } from "../../index-CxHQy6ma.js";
1
+ import { aC as r } from "../../index-DczBP2kE.js";
2
2
  export {
3
3
  r as SupportMenu
4
4
  };
@@ -1,4 +1,4 @@
1
- import { aD as p } from "../../index-CxHQy6ma.js";
1
+ import { aD as p } from "../../index-DczBP2kE.js";
2
2
  export {
3
3
  p as Tooltip
4
4
  };
@@ -1,4 +1,4 @@
1
- import { aE as e } from "../../index-CxHQy6ma.js";
1
+ import { aE as e } from "../../index-DczBP2kE.js";
2
2
  export {
3
3
  e as WhiteList
4
4
  };
@@ -1,5 +1,5 @@
1
1
  import { computed as l, openBlock as a, createElementBlock as o, normalizeClass as d, createElementVNode as e, toDisplayString as r, createBlock as x, unref as u, createCommentVNode as m, createTextVNode as v, Fragment as T, renderList as k, createVNode as P } from "vue";
2
- import { at as _, B as w } from "./index-CxHQy6ma.js";
2
+ import { at as _, B as w } from "./index-DczBP2kE.js";
3
3
  import { _ as C } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  import { _ as F } from "./OcIcon-CJgBICxh.js";
5
5
  const B = { class: "z-10 flex flex-col gap-4 p-9 relative" }, E = { class: "flex items-center gap-4" }, A = { class: "font-medium text-xl" }, N = { class: "flex gap-3 items-center mb-5" }, S = { class: "flex items-start gap-2" }, V = { class: "text-[24px] font-medium tracking-tighter" }, q = { class: "text-[40px] leading-none font-medium" }, z = { key: 0 }, $ = {
@@ -1,5 +1,5 @@
1
1
  import { openBlock as a, createElementBlock as d, createElementVNode as t, createVNode as o, unref as i, toDisplayString as r } from "vue";
2
- import { B as n } from "./index-CxHQy6ma.js";
2
+ import { B as n } from "./index-DczBP2kE.js";
3
3
  const m = { class: "flex flex-col" }, u = { class: "w-full relative group" }, f = { class: "w-full h-full bg-black/25 absolute top-0 left-0 hidden group-hover:flex rounded-lg" }, v = { class: "w-full px-6 gap-3 m-auto flex" }, b = ["src", "alt"], g = { class: "mt-4 text-md text-center" }, x = {
4
4
  __name: "ThumbnailSection",
5
5
  props: {
@@ -1,5 +1,5 @@
1
1
  import { openBlock as i, createElementBlock as s, normalizeClass as f, createElementVNode as l, Fragment as g, createVNode as n, unref as a, createTextVNode as r, toDisplayString as h, createBlock as u, withCtx as c, createCommentVNode as b } from "vue";
2
- import { B as d, at as v } from "./index-CxHQy6ma.js";
2
+ import { B as d, at as v } from "./index-DczBP2kE.js";
3
3
  import { _ as k } from "./OcIcon-CJgBICxh.js";
4
4
  const x = { class: "w-full relative group" }, y = {
5
5
  key: 0,
@@ -10296,16 +10296,16 @@ const Yd = { class: "flex flex-col gap-y-2 w-full" }, Wd = { class: "flex w-full
10296
10296
  }), 128))
10297
10297
  ], 6)) : m("", !0);
10298
10298
  }
10299
- }, mf = re(() => import("./OcDataTable-D0ZEtZUe.js")), ff = re(() => import("./OcFilterSearch-BAqXPUXD.js")), vf = re(() => import("./OcFilterSearchFor-CQcp54Tx.js")), gf = re(() => import("./OcFilterForm-B8ruF973.js")), Ju = re(
10300
- () => import("./OcComplexCalendar-C3TLCMzD.js")
10299
+ }, mf = re(() => import("./OcDataTable-tOzsAQeQ.js")), ff = re(() => import("./OcFilterSearch-BGlqUFme.js")), vf = re(() => import("./OcFilterSearchFor-CVWUn1gW.js")), gf = re(() => import("./OcFilterForm-D9-T34N0.js")), Ju = re(
10300
+ () => import("./OcComplexCalendar-DujXG5J0.js")
10301
10301
  ), pf = re(
10302
- () => import("./OcComplexDatePicker-YknMQyKz.js")
10303
- ), it = re(() => import("./OcModalCropper-uwnI6vDS.js")), yf = re(() => import("./OcCropper-Byc93ZzC.js")), Zu = re(() => import("./OcDraggable-CA_BCbpl.js")), xf = re(() => import("./OcDraggableList-Dp_sZK6g.js")), hf = re(() => import("./OcEmojiPicker-1Kf0_0cm.js")), bf = re(
10304
- () => import("./ThumbnailTheme-vncn2wto.js")
10302
+ () => import("./OcComplexDatePicker-cqExJZaD.js")
10303
+ ), it = re(() => import("./OcModalCropper-BGnrjhoY.js")), yf = re(() => import("./OcCropper-B7LfAUMI.js")), Zu = re(() => import("./OcDraggable-CA_BCbpl.js")), xf = re(() => import("./OcDraggableList-Cs7cEydt.js")), hf = re(() => import("./OcEmojiPicker-DqiHMsfx.js")), bf = re(
10304
+ () => import("./ThumbnailTheme-BqMKV8rC.js")
10305
10305
  ), wf = re(
10306
- () => import("./ThumbnailSection-A3yEdqnW.js")
10307
- ), $f = re(() => import("./SubPlanCard-CavLUkzN.js")), kf = re(() => import("./OcTimePopup-CXGhaOev.js")), Qu = re(() => import("./OcTimePicker-BYCtzMSE.js")), Sf = re(
10308
- () => import("./OcAccountSetupProgress-jDeDTeV9.js")
10306
+ () => import("./ThumbnailSection-BGMo935I.js")
10307
+ ), $f = re(() => import("./SubPlanCard-CBhRbCNj.js")), kf = re(() => import("./OcTimePopup-CXGhaOev.js")), Qu = re(() => import("./OcTimePicker-Ct7pKPHg.js")), Sf = re(
10308
+ () => import("./OcAccountSetupProgress-ysKF_moP.js")
10309
10309
  );
10310
10310
  export {
10311
10311
  Dm as $,
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import "vue";
2
- import { V as r, ak as o, aW as t, a2 as i, a4 as n, as as p, _ as l, a5 as d, B as m, p as u, a as b, b as S, c, at as T, aG as g, aN as C, aw as x, ax as P, d as I, aP as f, C as h, aM as O, q as F, aH as k, aQ as v, ay as B, az as w, aR as A, a6 as H, T as L, M as D, R as M, a7 as _, aK as R, aJ as y, aL as E, x as G, w as N, m as U, a8 as V, ab as j, aa as z, ac as W, y as q, a3 as J, e as K, f as Q, n as X, z as Y, A as Z, D as $, aA as aa, aO as ea, u as sa, v as ra, aB as oa, E as ta, W as ia, l as na, F as pa, G as la, H as da, ae as ma, af as ua, I as ba, K as Sa, $ as ca, g as Ta, J as ga, ag as Ca, h as xa, i as Pa, j as Ia, ah as fa, r as ha, k as Oa, s as Fa, au as ka, am as va, ai as Ba, ap as wa, ao as Aa, al as Ha, an as La, aj as Da, t as Ma, S as _a, av as Ra, Y as ya, X as Ea, a9 as Ga, aU as Na, aq as Ua, aC as Va, ad as ja, L as za, O as Wa, P as qa, N as Ja, Q as Ka, Z as Qa, o as Xa, aT as Ya, aS as Za, aV as $a, aI as ae, aD as ee, U as se, a1 as re, a0 as oe, ar as te, aE as ie } from "./index-CxHQy6ma.js";
2
+ import { V as r, ak as o, aW as t, a2 as i, a4 as n, as as p, _ as l, a5 as d, B as m, p as u, a as b, b as S, c, at as T, aG as g, aN as C, aw as x, ax as P, d as I, aP as f, C as h, aM as O, q as F, aH as k, aQ as v, ay as B, az as w, aR as A, a6 as H, T as L, M as D, R as M, a7 as _, aK as R, aJ as y, aL as E, x as G, w as N, m as U, a8 as V, ab as j, aa as z, ac as W, y as q, a3 as J, e as K, f as Q, n as X, z as Y, A as Z, D as $, aA as aa, aO as ea, u as sa, v as ra, aB as oa, E as ta, W as ia, l as na, F as pa, G as la, H as da, ae as ma, af as ua, I as ba, K as Sa, $ as ca, g as Ta, J as ga, ag as Ca, h as xa, i as Pa, j as Ia, ah as fa, r as ha, k as Oa, s as Fa, au as ka, am as va, ai as Ba, ap as wa, ao as Aa, al as Ha, an as La, aj as Da, t as Ma, S as _a, av as Ra, Y as ya, X as Ea, a9 as Ga, aU as Na, aq as Ua, aC as Va, ad as ja, L as za, O as Wa, P as qa, N as Ja, Q as Ka, Z as Qa, o as Xa, aT as Ya, aS as Za, aV as $a, aI as ae, aD as ee, U as se, a1 as re, a0 as oe, ar as te, aE as ie } from "./index-DczBP2kE.js";
3
3
  import { _ as pe } from "./OcProgressBar-hiyC5XSc.js";
4
4
  import { _ as de } from "./OcHorizontalProgressbar.vue_vue_type_script_setup_true_lang-4eVgPDi5.js";
5
5
  import { _ as ue } from "./OcSwitchTabs-CYp676bj.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orchidui/core",
3
3
  "description": "Orchid UI, Library Vue 3 tailwind css",
4
- "version": "1.6.1-43",
4
+ "version": "1.6.1-45",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "build": "vite build"
@@ -1,570 +0,0 @@
1
- import { ref as P, onMounted as Ve, openBlock as n, createBlock as B, unref as b, withCtx as O, createElementVNode as Z, createElementBlock as V, createVNode as I, mergeProps as ge, Fragment as ee, renderList as ae, normalizeClass as te, toDisplayString as be, createCommentVNode as x, computed as L, createSlots as Qe, renderSlot as Y, normalizeProps as ke, guardReactiveProps as he } from "vue";
2
- import { ay as Ee, b as Re, B as Fe, L as Je, Z as ze, aJ as _e, aK as Ze, aL as Ge, I as He, J as xe, k as We } from "./index-CxHQy6ma.js";
3
- import le from "dayjs";
4
- import { VueDraggableNext as we } from "vue-draggable-next";
5
- import { getFromLocalStorage as se, formatHeadersFromLocalStorage as Oe, formatHeadersToLocalStorage as Xe, setInLocalStorage as $e } from "./DataTable/utils/editColumnsUtils.js";
6
- import { _ as Se } from "./OcIcon-CJgBICxh.js";
7
- const el = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, ll = {
8
- key: 0,
9
- class: "gap-y-2 flex flex-col border-b pb-3 border-oc-gray-200"
10
- }, al = { class: "gap-y-2 flex flex-col" }, tl = {
11
- key: 0,
12
- class: "flex items-center bg-white justify-between h-[26px]"
13
- }, sl = { class: "flex items-center w-full gap-x-3" }, ol = { class: "truncate w-full max-w-[160px]" }, ul = {
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(A, { emit: X }) {
31
- const v = X, j = A, c = P([]), m = P([]), J = P(!1), E = (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": () => E()
48
- };
49
- return Ve(() => {
50
- const a = se(j.localKey), { fixed: y, active: g } = Oe(a, j.headers, j.localKey);
51
- m.value = y || j.headers.slice(0, 1), c.value = g || j.headers.slice(1).map((w) => {
52
- var $, M, C;
53
- return {
54
- ...w,
55
- isActive: ((C = (M = ($ = j.options) == null ? void 0 : $.active) == null ? void 0 : M.find((W) => W.key === w.key)) == null ? void 0 : C.isActive) ?? !0
56
- };
57
- }), E(!0);
58
- }), (a, y) => (n(), B(b(Ee), {
59
- modelValue: J.value,
60
- "onUpdate:modelValue": y[3] || (y[3] = (g) => J.value = g),
61
- class: "h-[36px]",
62
- "is-attach-to-body": ""
63
- }, {
64
- menu: O(() => [
65
- Z("div", el, [
66
- m.value.length ? (n(), V("div", ll, [
67
- y[4] || (y[4] = Z("span", { class: "text-oc-text-400 font-medium" }, "Fixed columns", -1)),
68
- I(b(we), ge({
69
- key: "key",
70
- modelValue: m.value,
71
- "onUpdate:modelValue": y[0] || (y[0] = (g) => m.value = g)
72
- }, H), {
73
- default: O(() => [
74
- (n(!0), V(ee, null, ae(m.value, (g, w) => (n(), V("div", {
75
- key: g.key,
76
- class: te(["flex items-center justify-between h-[26px]", w ? "" : "is-disabled"])
77
- }, [
78
- Z("span", null, be(g.label), 1),
79
- w ? (n(), B(b(Se), {
80
- key: 0,
81
- width: "18",
82
- height: "18",
83
- class: "text-oc-text-400 drag-el cursor-move",
84
- name: "draggable"
85
- })) : x("", !0)
86
- ], 2))), 128))
87
- ]),
88
- _: 1
89
- }, 16, ["modelValue"])
90
- ])) : x("", !0),
91
- Z("div", al, [
92
- y[5] || (y[5] = Z("span", { class: "text-oc-text-400 font-medium" }, "Active columns", -1)),
93
- I(b(we), ge({
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: O(() => [
99
- (n(!0), V(ee, null, ae(c.value, (g) => (n(), V(ee, {
100
- key: g.key
101
- }, [
102
- g.key !== "actions" ? (n(), V("div", tl, [
103
- Z("div", sl, [
104
- I(b(Re), {
105
- modelValue: g.isActive,
106
- "onUpdate:modelValue": [
107
- (w) => g.isActive = w,
108
- y[1] || (y[1] = (w) => E())
109
- ],
110
- class: "!w-fit"
111
- }, null, 8, ["modelValue", "onUpdate:modelValue"]),
112
- Z("div", ol, be(g.label), 1)
113
- ]),
114
- c.value.length > 1 ? (n(), B(b(Se), {
115
- key: 0,
116
- width: "18",
117
- height: "18",
118
- class: "text-oc-text-400 drag-el cursor-move",
119
- name: "draggable"
120
- })) : x("", !0)
121
- ])) : x("", !0)
122
- ], 64))), 128))
123
- ]),
124
- _: 1
125
- }, 16, ["modelValue"])
126
- ])
127
- ])
128
- ]),
129
- default: O(() => [
130
- I(b(Fe), {
131
- label: "Edit Column",
132
- "left-icon": "setting",
133
- variant: "secondary"
134
- })
135
- ]),
136
- _: 1
137
- }, 8, ["modelValue"]));
138
- }
139
- }, rl = { class: "relative flex flex-col gap-9" }, il = {
140
- key: 0,
141
- class: "flex items-center px-4 min-h-[52px]"
142
- }, nl = {
143
- key: 0,
144
- class: "absolute flex items-center gap-5 left-5"
145
- }, dl = {
146
- key: 1,
147
- class: "absolute flex gap-3 left-5"
148
- }, vl = {
149
- key: 1,
150
- class: "flex justify-center w-full gap-5 md:justify-start"
151
- }, cl = {
152
- key: 2,
153
- class: "items-center hidden md:flex"
154
- }, kl = {
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(A, { emit: X }) {
193
- var re, ie, ne, de, ve, ce, fe, pe, me;
194
- const v = A, j = X, c = L(() => {
195
- var l;
196
- return (l = v.options) == null ? void 0 : l.pagination;
197
- }), m = L(() => {
198
- var l;
199
- return (l = v.options) == null ? void 0 : l.cursor;
200
- }), J = P(), E = L(() => {
201
- var l;
202
- return (l = v.options) == null ? void 0 : l.tableOptions;
203
- }), H = L(() => {
204
- var l;
205
- return {
206
- ...E.value,
207
- headers: J.value ? J.value.map((e) => {
208
- var o, u;
209
- return e.class = ((u = (o = E.value) == null ? void 0 : o.headers.find((r) => r.key === e.key)) == null ? void 0 : u.class) ?? "", e;
210
- }).filter((e) => ue(e.key)) : (l = E.value) == null ? void 0 : l.headers.filter((e) => ue(e.key))
211
- };
212
- }), a = L(() => {
213
- var l;
214
- return (l = v.options) == null ? void 0 : l.filterOptions;
215
- }), y = L(() => {
216
- var l;
217
- return (l = v.options) == null ? void 0 : l.hidePerPageDropdown;
218
- }), g = L(() => {
219
- var l;
220
- return ((l = c.value) == null ? void 0 : l.last_page) === 1;
221
- }), w = P(!1), $ = P(v.filter[(ie = (re = a.value) == null ? void 0 : re.tabs) == null ? void 0 : ie.key]), M = P(v.filter.page), C = P(
222
- (de = (ne = a.value) == null ? void 0 : ne.per_page) != null && de.key ? v.filter[(ce = (ve = a.value) == null ? void 0 : ve.per_page) == null ? void 0 : ce.key] : v.filter.per_page
223
- ), W = ((me = v.filter[(pe = (fe = a.value) == null ? void 0 : fe.search) == null ? void 0 : pe.key]) == null ? void 0 : me.trim()) ?? "", z = P(W ? W.split(",") : []), oe = P(!1), je = L(
224
- () => {
225
- var l, e;
226
- return (e = (l = v.options) == null ? void 0 : l.perPageOptions) == null ? void 0 : e.map(
227
- (o) => ({
228
- label: `${o}`,
229
- value: o
230
- })
231
- );
232
- }
233
- ), Ae = L(() => {
234
- let l = [
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
- ], e = je.value ?? l;
268
- if (c.value) {
269
- const o = c.value.total < 100 ? c.value.total : 100;
270
- o > 10 && (e = e.filter((u) => u.value <= o));
271
- }
272
- return [...new Set(e)];
273
- }), De = L(() => {
274
- var l;
275
- return ((l = v.selected) == null ? void 0 : l.length) > 0;
276
- }), Le = (l) => {
277
- !l.trim() || z.value.includes(l) || (z.value = [l], F(), j("search-query-changed", l));
278
- }, Pe = (l) => {
279
- z.value = z.value.filter((e) => e !== l), F();
280
- }, _ = v.filter;
281
- !_ && c ? _.page = 1 : !_ && m && (_.cursor = "");
282
- const t = P(_), Ce = () => {
283
- var e, o, u, r, d, s, f, p, k, S, K, T, q, Q;
284
- z.value = [], $.value = "";
285
- const l = {};
286
- a.value ? _.page = 1 : _.cursor = "", (o = (e = a.value) == null ? void 0 : e.per_page) != null && o.key ? l[(r = (u = a.value) == null ? void 0 : u.per_page) == null ? void 0 : r.key] = C.value : l.per_page = C.value, (s = (d = a.value) == null ? void 0 : d.tabs) != null && s.key ? l[(p = (f = a.value) == null ? void 0 : f.tabs) == null ? void 0 : p.key] = $.value : l.tabs = $.value, (S = (k = a.value) == null ? void 0 : k.columnEdit) != null && S.key && (l[(T = (K = a.value) == null ? void 0 : K.columnEdit) == null ? void 0 : T.key] = t.value[(Q = (q = a.value) == null ? void 0 : q.columnEdit) == null ? void 0 : Q.key]), t.value = l, F();
287
- }, Ke = () => {
288
- F(null, M.value);
289
- }, Ue = () => {
290
- v.id && $e(v.id, JSON.stringify(t.value));
291
- }, Ye = () => v.id ? se(v.id) : null, F = (l = null, e = !1, o = "") => {
292
- var r, d, s, f, p;
293
- c.value && !e && (M.value = 1), c.value ? t.value.page = M.value : t.value.cursor = o, (r = a.value) != null && r.per_page ? t.value[a.value.per_page.key] = C.value : t.value.per_page = C.value, (d = a.value) != null && d.tabs && (t.value[a.value.tabs.key] = $.value), (s = a.value) != null && s.search && (t.value[a.value.search.key] = z.value.join()), l && (w.value = !1, t.value = { ...t.value, ...l }, 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], F(t.value), !1;
299
- Ue(), j("update:filter", t.value);
300
- }, Be = (l, e) => {
301
- (e === a.value.tabs.key || e === "tabs") && ($.value = ""), F(l), j("filter-removed", e);
302
- }, Me = (l) => {
303
- let e = [];
304
- return l.forEach((o) => {
305
- e.push(o.key);
306
- }), e;
307
- }, Ne = L(() => {
308
- if (t.value) {
309
- let l = [];
310
- return Object.keys(t.value).forEach((e) => {
311
- var d, s, f, p, k, S, K, T, q, Q, G;
312
- let o = (s = (d = a.value) == null ? void 0 : d.tabs) == null ? void 0 : s.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 ((K = a.value.form) == null || K.find((h) => {
315
- h.name === o && (o = "");
316
- }), e !== "page" && e !== "cursor" && e !== r && e !== o && e !== u) {
317
- let h = null, i = (T = a.value.form) == null ? void 0 : T.find((N) => {
318
- if (typeof N.name == "object") {
319
- let U = !1;
320
- return N.name.forEach((R) => {
321
- R.key === e && (U = !0, h = Me(N.name));
322
- }), U;
323
- } else
324
- return N.name === e;
325
- }), D = "";
326
- if (i && t.value[e]) {
327
- if (typeof i.name == "object" ? (q = i.name) == null || q.forEach((U) => {
328
- D && (D += " - "), D += t.value[U.key];
329
- }) : D = t.value[e], i.props.options && (D = (i.props.multiple ? t.value[e] : [t.value[e]]).map(
330
- (R) => {
331
- var ye;
332
- return (ye = i.props.options.find(({ value: qe }) => qe === R)) == null ? void 0 : ye.label;
333
- }
334
- ).join(", ")), i.type === "RangeInput" && Array.isArray(t.value[e]) && (D = t.value[e][0].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + " - " + t.value[e][1].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")), i.type === "DatePicker")
335
- if (((Q = i == null ? void 0 : i.props) == null ? void 0 : Q.type) === "range" && i.name && i.name[1]) {
336
- const U = le(t.value[i.name[0].key]).format("MM/DD/YYYY"), R = le(t.value[i.name[1].key]).format("MM/DD/YYYY");
337
- D = U === R ? U : U + " - " + R;
338
- } else D = le(t.value[i.name]).format("MM/DD/YYYY");
339
- let N = `${(G = i == null ? void 0 : i.props) == null ? void 0 : G.label} : ${D}`;
340
- i && i.name && typeof i.name == "object" && l.find((R) => R.name === h[0]) && (N = ""), l.push({
341
- label: N,
342
- name: e,
343
- multiNames: h
344
- });
345
- }
346
- }
347
- }), l;
348
- }
349
- return [];
350
- }), ue = (l) => {
351
- var e, o, u, r, d, s;
352
- return ((s = (d = (r = (u = t.value) == null ? void 0 : u[(o = (e = a.value) == null ? void 0 : e.columnEdit) == null ? void 0 : o.key]) == null ? void 0 : r.active) == null ? void 0 : d.find((f) => f.key === l)) == null ? void 0 : s.isActive) ?? !0;
353
- }, Ie = ({ fixedHeaders: l, activeHeaders: e, isOnMount: o }) => {
354
- var u, r, d, s, f, p, k, S;
355
- if (t.value[(r = (u = a.value) == null ? void 0 : u.columnEdit) == null ? void 0 : r.key] || (t.value[(s = (d = a.value) == null ? void 0 : d.columnEdit) == null ? void 0 : s.key] = {}), t.value[(p = (f = a.value) == null ? void 0 : f.columnEdit) == null ? void 0 : p.key].fixed = l, t.value[(S = (k = a.value) == null ? void 0 : k.columnEdit) == null ? void 0 : S.key].active = e, J.value = [...l, ...e], !o) {
356
- const K = Xe(l, e);
357
- $e(a.value.columnEdit.localStorageKey, K);
358
- }
359
- j("columns-changed", e);
360
- }, Te = () => {
361
- var l, e, o, u, r, d;
362
- if ((e = (l = a.value) == null ? void 0 : l.columnEdit) != null && e.localStorageKey) {
363
- const s = se(a.value.columnEdit.localStorageKey);
364
- if (s) {
365
- const { fixed: f, active: p } = Oe(
366
- s,
367
- E.value.headers,
368
- a.value.columnEdit.localStorageKey
369
- );
370
- t.value[(u = (o = a.value) == null ? void 0 : o.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, J.value = [...f, ...p];
371
- }
372
- }
373
- };
374
- return Ve(() => {
375
- var e, o, u, r, d;
376
- Te();
377
- const l = Ye();
378
- l ? (t.value = JSON.parse(l), $.value = $.value || ((e = t.value) == null ? void 0 : e.tabs) || ((r = t.value) == null ? void 0 : r[(u = (o = a.value) == null ? void 0 : o.tabs) == null ? void 0 : u.key]), M.value = ((d = t.value) == null ? void 0 : d.page) || 1, F(null, !0, t.value.cursor)) : F(null);
379
- }), (l, e) => {
380
- var o, u, r, d;
381
- return n(), V("div", rl, [
382
- E.value ? (n(), B(b(Je), {
383
- key: 0,
384
- selected: A.selected,
385
- "row-key": A.rowKey,
386
- options: H.value,
387
- "is-loading": A.isLoading,
388
- "loading-rows": C.value,
389
- "row-class": A.rowClass,
390
- "row-link": A.rowLink,
391
- "is-sticky": E.value.isSticky,
392
- "is-borderless": E.value.isBorderless,
393
- "onUpdate:selected": e[7] || (e[7] = (s) => l.$emit("update:selected", s)),
394
- "onClick:row": e[8] || (e[8] = (s) => l.$emit("click:row", s)),
395
- "onHover:cell": e[9] || (e[9] = (s) => l.$emit("hover:cell", s))
396
- }, Qe({
397
- after: O(() => [
398
- Y(l.$slots, "after")
399
- ]),
400
- empty: O(() => [
401
- Y(l.$slots, "empty")
402
- ]),
403
- "table-header": O((s) => [
404
- Y(l.$slots, "table-header", ke(he(s)))
405
- ]),
406
- "table-body": O((s) => [
407
- Y(l.$slots, "table-body", ke(he(s)))
408
- ]),
409
- _: 2
410
- }, [
411
- l.$slots.before || (o = a.value) != null && o.search || (u = a.value) != null && u.form || (r = a.value) != null && r.tabs ? {
412
- name: "before",
413
- fn: O(() => {
414
- var s, f, p, k;
415
- return [
416
- Y(l.$slots, "before"),
417
- (s = a.value) != null && s.search || (f = a.value) != null && f.form || (p = a.value) != null && p.tabs ? (n(), V("div", il, [
418
- De.value ? (n(), V("div", nl, [
419
- Y(l.$slots, "bulk-actions", { selectedRows: A.selected })
420
- ])) : (n(), V("div", dl, [
421
- (k = a.value) != null && k.tabs ? (n(), B(b(ze), {
422
- key: 0,
423
- modelValue: $.value,
424
- "onUpdate:modelValue": [
425
- e[0] || (e[0] = (S) => $.value = S),
426
- e[1] || (e[1] = (S) => F(null))
427
- ],
428
- "is-disabled": A.isLoading,
429
- tabs: a.value.tabs.options,
430
- variant: "pills"
431
- }, null, 8, ["modelValue", "is-disabled", "tabs"])) : x("", !0)
432
- ])),
433
- Y(l.$slots, "filter-options", {}, () => {
434
- var S, K, T, q, Q, G;
435
- return [
436
- (S = a.value) != null && S.search || (K = a.value) != null && K.form || (T = a.value) != null && T.columnEdit ? (n(), V("div", {
437
- key: 0,
438
- class: te([
439
- "flex gap-3 absolute ml-auto bg-oc-bg-light right-4 max-w-[calc(100%-24px)]",
440
- a.value ? oe.value ? "md:w-fit w-full" : "" : "w-full justify-end"
441
- ])
442
- }, [
443
- (q = a.value) != null && q.search ? (n(), B(b(_e), {
444
- key: 0,
445
- "is-search-only": !a.value.tabs || a.value.isSearchOnly,
446
- onAddQuery: Le,
447
- onToggle: e[2] || (e[2] = (h) => oe.value = h)
448
- }, null, 8, ["is-search-only"])) : x("", !0),
449
- (Q = a.value) != null && Q.form ? (n(), B(b(Ee), {
450
- key: 1,
451
- modelValue: w.value,
452
- "onUpdate:modelValue": e[6] || (e[6] = (h) => w.value = h),
453
- distance: 9,
454
- placement: "bottom-end",
455
- "is-attach-to-body": ""
456
- }, {
457
- menu: O(() => [
458
- w.value ? (n(), B(b(Ze), {
459
- key: 0,
460
- id: A.id,
461
- "json-form": a.value.form ?? [],
462
- grid: a.value.grid ?? null,
463
- values: v.filter,
464
- actions: a.value.actions,
465
- onApplyFilter: e[3] || (e[3] = (h) => F(h)),
466
- onFilterFieldsChanged: e[4] || (e[4] = (h) => j("filter-fields-changed", h)),
467
- onCancel: e[5] || (e[5] = (h) => w.value = !1)
468
- }, {
469
- default: O(({ errors: h, values: i, jsonForm: D, updateForm: N }) => [
470
- Y(l.$slots, "custom-filter-form", {
471
- errors: h,
472
- values: i,
473
- jsonForm: D,
474
- updateFilter: N
475
- })
476
- ]),
477
- _: 3
478
- }, 8, ["id", "json-form", "grid", "values", "actions"])) : x("", !0)
479
- ]),
480
- default: O(() => [
481
- I(b(Fe), {
482
- "is-active": w.value,
483
- variant: "secondary",
484
- "left-icon": "filter"
485
- }, null, 8, ["is-active"])
486
- ]),
487
- _: 3
488
- }, 8, ["modelValue"])) : x("", !0),
489
- a.value.columnEdit ? (n(), B(ul, {
490
- key: 2,
491
- options: t.value.columnEdit,
492
- headers: ((G = E.value) == null ? void 0 : G.headers) || [],
493
- "local-key": a.value.columnEdit.localStorageKey,
494
- onUpdateOrder: Ie
495
- }, null, 8, ["options", "headers", "local-key"])) : x("", !0)
496
- ], 2)) : x("", !0)
497
- ];
498
- })
499
- ])) : x("", !0),
500
- I(b(Ge), {
501
- filters: Ne.value,
502
- queries: z.value,
503
- class: "border-t border-oc-gray-200",
504
- onRemoveQuery: Pe,
505
- onRemoveAll: Ce,
506
- onRemoveFilter: Be
507
- }, null, 8, ["filters", "queries"])
508
- ];
509
- }),
510
- key: "0"
511
- } : void 0,
512
- ae((d = E.value) == null ? void 0 : d.headers, (s, f) => ({
513
- name: s.key,
514
- fn: O(({ data: p, item: k }) => [
515
- Y(l.$slots, s.key, {
516
- data: p,
517
- item: k
518
- })
519
- ])
520
- }))
521
- ]), 1032, ["selected", "row-key", "options", "is-loading", "loading-rows", "row-class", "row-link", "is-sticky", "is-borderless"])) : x("", !0),
522
- Y(l.$slots, "before-pagination"),
523
- c.value || m.value ? (n(), V("div", {
524
- key: 1,
525
- class: te(["flex items-center gap-3", c.value && c.value.last_page === 1 ? "justify-end" : ""])
526
- }, [
527
- c.value && !g.value ? (n(), B(b(He), {
528
- key: 0,
529
- modelValue: M.value,
530
- "onUpdate:modelValue": [
531
- e[10] || (e[10] = (s) => M.value = s),
532
- Ke
533
- ],
534
- class: "justify-center",
535
- "max-page": c.value.last_page,
536
- strategy: c.value.strategy,
537
- "total-visible": "5"
538
- }, null, 8, ["modelValue", "max-page", "strategy"])) : x("", !0),
539
- m.value ? (n(), V("div", vl, [
540
- I(b(xe), {
541
- disabled: !m.value.prev,
542
- onClick: e[11] || (e[11] = (s) => m.value.prev ? F(null, !1, m.value.prev) : null)
543
- }, null, 8, ["disabled"]),
544
- I(b(xe), {
545
- disabled: !m.value.next,
546
- "is-next": "",
547
- onClick: e[12] || (e[12] = (s) => m.value.next ? F(null, !1, m.value.next) : null)
548
- }, null, 8, ["disabled"])
549
- ])) : x("", !0),
550
- y.value ? x("", !0) : (n(), V("div", cl, [
551
- I(b(We), {
552
- modelValue: C.value,
553
- "onUpdate:modelValue": [
554
- e[13] || (e[13] = (s) => C.value = s),
555
- e[14] || (e[14] = (s) => F(null))
556
- ],
557
- label: "Item per page",
558
- "is-inline-label": "",
559
- "popper-options": { placement: "auto" },
560
- options: Ae.value
561
- }, null, 8, ["modelValue", "options"])
562
- ]))
563
- ], 2)) : x("", !0)
564
- ]);
565
- };
566
- }
567
- };
568
- export {
569
- kl as default
570
- };