@orchidui/core 1.6.1-45 → 1.6.1-50

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