@orchidui/core 0.5.0 → 0.6.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 (154) 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 +3 -3
  6. package/dist/DataDisplay/OnboardingListItem/OcOnboardingListItem.js +1 -1
  7. package/dist/DataDisplay/Overview/OcOverview.js +4 -5
  8. package/dist/DataDisplay/Pagination/OcPagination.js +1 -1
  9. package/dist/DataDisplay/Table/OcTable.js +4 -4
  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 +3 -3
  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 +2 -2
  17. package/dist/Elements/AuthenticationOption/AuthenticationOption.js +2 -2
  18. package/dist/Elements/Box/OcBox.js +2 -2
  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 +3 -3
  22. package/dist/Elements/PageTitle/OcPageTitle.js +3 -4
  23. package/dist/Elements/SandboxBanner/OcSandboxBanner.js +1 -1
  24. package/dist/Elements/Sidebar/OcSidebar.js +1 -1
  25. package/dist/Elements/Skeleton/OcSkeleton.js +1 -1
  26. package/dist/Elements/SubSidebar/OcSubSidebar.js +1 -1
  27. package/dist/Elements/VerificationOption/OcVerificationOption.js +2 -2
  28. package/dist/Feedback/Banner/OcBanner.js +1 -1
  29. package/dist/Feedback/Chip/OcChip.js +2 -2
  30. package/dist/Feedback/ShareIcon/OcShareIcon.js +2 -2
  31. package/dist/Feedback/Snackbar/OcSnackbar.js +1 -1
  32. package/dist/Form/BaseInput/OcBaseInput.js +1 -1
  33. package/dist/Form/Button/OcButton.js +1 -1
  34. package/dist/Form/Calendar/OcCalendar.js +2 -2
  35. package/dist/Form/CardInput/OcCardInput.js +1 -1
  36. package/dist/Form/Checkbox/OcCheckbox.js +1 -1
  37. package/dist/Form/CheckboxesGroup/OcCheckboxesGroup.js +1 -1
  38. package/dist/Form/Criteria/OcCriteria.js +1 -1
  39. package/dist/Form/Cropper/OcCropper.js +1 -1
  40. package/dist/Form/DatePicker/OcDatePicker.js +1 -1
  41. package/dist/Form/EmojiPicker/OcEmojiPicker.js +2 -2
  42. package/dist/Form/Input/OcInput.js +3 -4
  43. package/dist/Form/LinkInput/OcLinkInput.js +1 -1
  44. package/dist/Form/MultipleUploadFile/OcMultipleUploadFile.js +1 -1
  45. package/dist/Form/NumberInput/OcNumberInput.js +1 -1
  46. package/dist/Form/PhoneInput/OcPhoneInput.js +1 -1
  47. package/dist/Form/Radio/OcRadio.js +1 -1
  48. package/dist/Form/RadioGroup/OcRadioGroup.js +1 -1
  49. package/dist/Form/RangeInput/OcRangeInput.js +1 -1
  50. package/dist/Form/SectionItem/OcSectionItem.js +2 -2
  51. package/dist/Form/Select/OcSelect.js +4 -5
  52. package/dist/Form/SelectOptions/OcSelectOptions.js +2 -2
  53. package/dist/Form/SingleFileUpload/OcSingleFileUpload.js +1 -1
  54. package/dist/Form/Slider/OcSlider.js +1 -1
  55. package/dist/Form/TextArea/OcTextArea.js +2 -2
  56. package/dist/Form/Toggle/OcToggle.js +1 -1
  57. package/dist/Form/index.js +24 -47
  58. package/dist/FormBuilder/OcFormBuilder.js +1 -1
  59. package/dist/{OcComplexCalendar-DXl0ecZ-.js → OcComplexCalendar-Boa7mNFU.js} +18 -25
  60. package/dist/OcComplexDatePicker-BydI4VSR.js +93 -0
  61. package/dist/{OcCropper-31Y_S1Ne.js → OcCropper-7E2i6ayU.js} +38 -49
  62. package/dist/OcDataTable-CsCGrRx7.js +561 -0
  63. package/dist/{OcDraggable-BjhGJmpM.js → OcDraggable-CA_BCbpl.js} +7 -8
  64. package/dist/{Draggable.js → OcDraggableList-BUu5SgoA.js} +39 -50
  65. package/dist/{OcEmojiPicker-BXm-_OGK.js → OcEmojiPicker-DYYK7OB3.js} +28 -38
  66. package/dist/OcFilterForm-7ehuJUMp.js +83 -0
  67. package/dist/OcFilterSearch-B4AZsLBn.js +69 -0
  68. package/dist/OcFilterSearchFor-DfwJG-5N.js +67 -0
  69. package/dist/OcModalCropper-Z4jlnFc5.js +46 -0
  70. package/dist/{OcSkeleton-BdPTmGh0.js → OcSkeleton-CvdpGSQR.js} +2 -3
  71. package/dist/{OcSlider-Bsi-ckbP.js → OcSlider-DW9x8eas.js} +10 -11
  72. package/dist/{OcTimePicker-B61MCi0D.js → OcTimePicker-D9fPU8_m.js} +22 -33
  73. package/dist/{OcTimePopup-zQFKCZLk.js → OcTimePopup-CXGhaOev.js} +2 -3
  74. package/dist/{OcToggle-C0wTjM_Y.js → OcToggle-bIJaLDMZ.js} +5 -6
  75. package/dist/Overlay/ConfirmationModal/OcConfirmationModal.js +1 -1
  76. package/dist/Overlay/CopyTooltip/OcCopyTooltip.js +1 -1
  77. package/dist/Overlay/Dropdown/OcDropdown.js +3 -4
  78. package/dist/Overlay/Modal/OcModal.js +3 -4
  79. package/dist/Overlay/SupportMenu/OcSupportMenu.js +1 -1
  80. package/dist/Overlay/Tooltip/OcTooltip.js +2 -2
  81. package/dist/Overlay/Whitelist/OcWhiteList.js +2 -2
  82. package/dist/SubPlanCard-DHj4RHJZ.js +81 -0
  83. package/dist/ThumbnailSection-CJBS0QXp.js +41 -0
  84. package/dist/ThumbnailTheme-hey6se0g.js +119 -0
  85. package/dist/index-DyVteXE3.js +10028 -0
  86. package/dist/index.js +129 -948
  87. package/dist/style.css +1 -1
  88. package/package.json +1 -16
  89. package/dist/Calendar.js +0 -103
  90. package/dist/Cropper.js +0 -6
  91. package/dist/DatePicker-BLK16hYl.js +0 -263
  92. package/dist/EmojiPicker.js +0 -4
  93. package/dist/Form/TimePicker/OcTimePicker.js +0 -6
  94. package/dist/OcAccordion-DdkNsXvN.js +0 -101
  95. package/dist/OcAccountSetup-BXDjf48o.js +0 -324
  96. package/dist/OcAdditionalContent-BMSysCXu.js +0 -612
  97. package/dist/OcAuthenticationOption.vue_vue_type_script_setup_true_lang-w5Y0ymGN.js +0 -43
  98. package/dist/OcBanner-Cg2WJV6e.js +0 -108
  99. package/dist/OcBox.vue_vue_type_script_setup_true_lang-aB397QRg.js +0 -43
  100. package/dist/OcCardInput-BFE4Xu-S.js +0 -75
  101. package/dist/OcCheckboxesGroup-CLbquUO2.js +0 -94
  102. package/dist/OcChip-B1hm2Qni.js +0 -144
  103. package/dist/OcComplexCalendar.vue_vue_type_style_index_0_lang-CIQPD-6N.js +0 -1006
  104. package/dist/OcConfirmationModal-BfCrRV9r.js +0 -179
  105. package/dist/OcCopyTooltip.vue_vue_type_script_setup_true_lang-S2RAfV_g.js +0 -65
  106. package/dist/OcCriteria-CpIohheZ.js +0 -42
  107. package/dist/OcCustomerCard-DbDOBO03.js +0 -160
  108. package/dist/OcDropdownItem-DAElmzEu.js +0 -57
  109. package/dist/OcEmptyPage-CTwgMzRp.js +0 -155
  110. package/dist/OcExpadingTable.vue_vue_type_script_setup_true_lang-B4HOMDBK.js +0 -815
  111. package/dist/OcFeatureOverviewCard-RVyrWLVW.js +0 -71
  112. package/dist/OcFloatContent-BIKQOxSw.js +0 -142
  113. package/dist/OcFormBuilder-BUpEpDsU.js +0 -177
  114. package/dist/OcGroupOptions-ChGJvTXl.js +0 -16
  115. package/dist/OcInfoCard-DpYUZOMZ.js +0 -81
  116. package/dist/OcInput-tcRxG3Y2.js +0 -227
  117. package/dist/OcInputOption-CncASfNt.js +0 -160
  118. package/dist/OcLinkInput-C2ixk-gk.js +0 -143
  119. package/dist/OcListDetail-6XeME6ko.js +0 -76
  120. package/dist/OcListUrl.vue_vue_type_script_setup_true_lang-7zZdFM8K.js +0 -750
  121. package/dist/OcModal-DdD5VFEN.js +0 -187
  122. package/dist/OcModalCropper-D2OI2iun.js +0 -56
  123. package/dist/OcModalPage-BLVa-kcB.js +0 -86
  124. package/dist/OcMultipleUploadFile-BAmQHshA.js +0 -447
  125. package/dist/OcNumberInput.vue_vue_type_script_setup_true_lang-C4EXUIUe.js +0 -90
  126. package/dist/OcOnboardingListItem.vue_vue_type_script_setup_true_lang-Cr80xmnz.js +0 -81
  127. package/dist/OcOption-DK2FBGq7.js +0 -485
  128. package/dist/OcOverviewIcon-D702Ujka.js +0 -55
  129. package/dist/OcOverviewItem-DNr5tWnt.js +0 -186
  130. package/dist/OcPageTitleRight-DMtJ1qmZ.js +0 -243
  131. package/dist/OcPaginationNumber-IKPorX26.js +0 -172
  132. package/dist/OcPaymentTab-Cna1IAhO.js +0 -170
  133. package/dist/OcPhoneInput-AC6BgQhN.js +0 -432
  134. package/dist/OcPrimaryActions-D5IprKsQ.js +0 -222
  135. package/dist/OcRadio-CRYfNwV9.js +0 -107
  136. package/dist/OcRadioGroup-DgfdWJos.js +0 -76
  137. package/dist/OcRangeInput-C-hoHFhr.js +0 -103
  138. package/dist/OcSandboxBanner.vue_vue_type_script_setup_true_lang-BD0k_8xa.js +0 -37
  139. package/dist/OcSectionItem-BFgxO3se.js +0 -84
  140. package/dist/OcSelectOptions-BQlG_EUA.js +0 -148
  141. package/dist/OcShareIcon-BB-NPq0r.js +0 -53
  142. package/dist/OcSingleFileUpload-B8-e1H5t.js +0 -464
  143. package/dist/OcSnackbar-CKxY1-ej.js +0 -196
  144. package/dist/OcSteps.vue_vue_type_script_setup_true_lang-CXGy8ma_.js +0 -87
  145. package/dist/OcSubSidebar.vue_vue_type_script_setup_true_lang-CNxgU07N.js +0 -60
  146. package/dist/OcSupportMenu.vue_vue_type_script_setup_true_lang-DrjZsWti.js +0 -114
  147. package/dist/OcTabToSelect-BHAz1Niv.js +0 -183
  148. package/dist/OcTextArea-BpV1Bnj_.js +0 -78
  149. package/dist/OcTransferSummary-Bk2GXhrT.js +0 -67
  150. package/dist/OcVariant.vue_vue_type_script_setup_true_lang-CY_82DLc.js +0 -99
  151. package/dist/OcVerificationOption.vue_vue_type_script_setup_true_lang-ChqvNoDe.js +0 -59
  152. package/dist/OcWhiteList.vue_vue_type_script_setup_true_lang-DI9pYU3w.js +0 -64
  153. package/dist/OnboardingAccordion.vue_vue_type_script_setup_true_lang-B0Z7ETmj.js +0 -113
  154. package/dist/StoreDesign.js +0 -240
package/dist/index.js CHANGED
@@ -1,950 +1,131 @@
1
- import { _ as Qe, b as He } from "./OcExpadingTable.vue_vue_type_script_setup_true_lang-B4HOMDBK.js";
2
- import { g as qa, a as za, f as Ga, c as Ja, d as Wa, e as Xa } from "./OcExpadingTable.vue_vue_type_script_setup_true_lang-B4HOMDBK.js";
3
- import { _ as qe, a as ke } from "./OcPaginationNumber-IKPorX26.js";
4
- import { b as el } from "./OcPaginationNumber-IKPorX26.js";
5
- import { _ as ll, a as tl } from "./OcOverviewItem-DNr5tWnt.js";
6
- import { _ as rl } from "./OcOverviewIcon-D702Ujka.js";
7
- import { C as nl } from "./OcCustomerCard-DbDOBO03.js";
8
- import { _ as ul } from "./OcTransferSummary-Bk2GXhrT.js";
9
- import { _ as pl, a as ml } from "./OcListUrl.vue_vue_type_script_setup_true_lang-7zZdFM8K.js";
10
- import { _ as fl } from "./OcListDetail-6XeME6ko.js";
11
- import { _ as yl } from "./OcInfoCard-DpYUZOMZ.js";
12
- import { _ as bl } from "./OcProgressBar-hiyC5XSc.js";
13
- import { _ as kl } from "./OcFloatContent-BIKQOxSw.js";
14
- import { _ as _l } from "./OcHorizontalProgressbar.vue_vue_type_script_setup_true_lang-4eVgPDi5.js";
15
- import { _ as wl } from "./OcOnboardingListItem.vue_vue_type_script_setup_true_lang-Cr80xmnz.js";
16
- import { _ as Ol } from "./OcAccordion-DdkNsXvN.js";
17
- import { _ as Cl } from "./OnboardingAccordion.vue_vue_type_script_setup_true_lang-B0Z7ETmj.js";
18
- import { _ as ze } from "./OcPaymentTab-Cna1IAhO.js";
19
- import { a as jl } from "./OcPaymentTab-Cna1IAhO.js";
20
- import { a as El, _ as Pl } from "./OcSteps.vue_vue_type_script_setup_true_lang-CXGy8ma_.js";
21
- import { a as Il, _ as Dl } from "./OcVariant.vue_vue_type_script_setup_true_lang-CY_82DLc.js";
22
- import { _ as Bl } from "./OcSwitchTabs-CYp676bj.js";
23
- import { O as Rl, _ as Kl, b as Ml, c as Nl, a as Yl, d as Ql } from "./OcTabToSelect-BHAz1Niv.js";
24
- import { _ as ql, P as zl } from "./OcPageTitleRight-DMtJ1qmZ.js";
25
- import { _ as Jl } from "./OcPrimaryActions-D5IprKsQ.js";
26
- import { O as Xl, _ as Zl, a as et } from "./OcAccountSetup-BXDjf48o.js";
27
- import { _ as lt } from "./OcSubSidebar.vue_vue_type_script_setup_true_lang-CNxgU07N.js";
28
- import { _ as ot } from "./OcEmptyPage-CTwgMzRp.js";
29
- import { _ as st, a as nt } from "./OcAdditionalContent-BMSysCXu.js";
30
- import { S as ut } from "./OcSkeleton-BdPTmGh0.js";
31
- import { O as pt } from "./OcFeatureOverviewCard-RVyrWLVW.js";
32
- import { _ as vt } from "./OcSandboxBanner.vue_vue_type_script_setup_true_lang-BD0k_8xa.js";
33
- import { _ as ct } from "./OcBox.vue_vue_type_script_setup_true_lang-aB397QRg.js";
34
- import { _ as gt } from "./OcAuthenticationOption.vue_vue_type_script_setup_true_lang-w5Y0ymGN.js";
35
- import { _ as xt } from "./OcVerificationOption.vue_vue_type_script_setup_true_lang-ChqvNoDe.js";
36
- import { _ as oe } from "./OcChip-B1hm2Qni.js";
37
- import { _ as ht } from "./OcSnackbar-CKxY1-ej.js";
38
- import { O as St } from "./OcBanner-Cg2WJV6e.js";
39
- import { _ as $t } from "./OcShareIcon-BB-NPq0r.js";
40
- import { _ as Ft } from "./OcTag.vue_vue_type_script_setup_true_lang-D19lw-8Y.js";
41
- import { D as Ce, a as Ge, B as J } from "./OcComplexCalendar.vue_vue_type_style_index_0_lang-CIQPD-6N.js";
42
- import { _ as Vt, b as jt, T as At } from "./OcComplexCalendar.vue_vue_type_style_index_0_lang-CIQPD-6N.js";
43
- import { _ as Pt } from "./OcCardInput-BFE4Xu-S.js";
44
- import { _ as It } from "./OcCheckboxesGroup-CLbquUO2.js";
45
- import { _ as Lt } from "./OcCriteria-CpIohheZ.js";
46
- import { _ as Je } from "./OcInput-tcRxG3Y2.js";
47
- import { _ as Ut } from "./OcInputOption-CncASfNt.js";
48
- import { _ as Kt } from "./OcPhoneInput-AC6BgQhN.js";
49
- import { _ as Nt } from "./OcRadio-CRYfNwV9.js";
50
- import { _ as Qt } from "./OcRadioGroup-DgfdWJos.js";
51
- import { _ as qt } from "./OcRangeInput-C-hoHFhr.js";
52
- import { _ as We } from "./OcOption-DK2FBGq7.js";
53
- import { a as Gt } from "./OcOption-DK2FBGq7.js";
54
- import { _ as Wt } from "./OcGroupOptions-ChGJvTXl.js";
55
- import { T as Zt } from "./OcToggle-C0wTjM_Y.js";
56
- import { _ as ao } from "./OcLinkInput-C2ixk-gk.js";
57
- import { _ as to } from "./OcTextArea-BpV1Bnj_.js";
58
- import { _ as ro } from "./DatePicker-BLK16hYl.js";
59
- import { default as no } from "./OcTimePopup-zQFKCZLk.js";
60
- import { _ as uo } from "./OcTimePicker-B61MCi0D.js";
61
- import { S as mo } from "./OcSlider-Bsi-ckbP.js";
62
- import { _ as fo } from "./OcSectionItem-BFgxO3se.js";
63
- import { _ as yo } from "./OcSelectOptions-BQlG_EUA.js";
64
- import { _ as bo } from "./OcSingleFileUpload-B8-e1H5t.js";
65
- import { _ as ko } from "./OcMultipleUploadFile-BAmQHshA.js";
66
- import { _ as _o } from "./OcNumberInput.vue_vue_type_script_setup_true_lang-C4EXUIUe.js";
67
- import { _ as wo } from "./OcAvatar-NDXQiZvz.js";
68
- import { _ as he } from "./OcIcon-CJgBICxh.js";
69
- import { _ as Oo } from "./OcDropdownItem-DAElmzEu.js";
70
- import { _ as Co } from "./OcModal-DdD5VFEN.js";
71
- import { _ as jo } from "./OcModalPage-BLVa-kcB.js";
72
- import { _ as Eo } from "./OcConfirmationModal-BfCrRV9r.js";
73
- import { _ as To } from "./OcPopper-C11OgQAj.js";
74
- import { _ as Do } from "./OcSupportMenu.vue_vue_type_script_setup_true_lang-DrjZsWti.js";
75
- import { _ as Bo } from "./OcCopyTooltip.vue_vue_type_script_setup_true_lang-S2RAfV_g.js";
76
- import { _ as Ro } from "./OcWhiteList.vue_vue_type_script_setup_true_lang-DI9pYU3w.js";
77
- import { _ as Mo } from "./OcTheme-CWgrJh5Q.js";
78
- import { _ as Xe } from "./OcFormBuilder-BUpEpDsU.js";
79
- import { ref as F, onMounted as ne, openBlock as n, createBlock as E, unref as p, withCtx as P, createElementVNode as D, createElementBlock as w, createVNode as T, mergeProps as _e, Fragment as G, renderList as le, normalizeClass as te, toDisplayString as Se, createCommentVNode as $, computed as A, createSlots as Ze, renderSlot as U, normalizeProps as we, guardReactiveProps as $e, withKeys as ea, nextTick as aa } from "vue";
80
- import re from "dayjs";
81
- /* empty css */
82
- import "libphonenumber-js";
83
- /* empty css */
84
- import "v-calendar";
85
- /* empty css */
86
- import "./Cropper.js";
87
- import { VueDraggableNext as Oe } from "vue-draggable-next";
88
- import "@popperjs/core";
89
- import { getFromLocalStorage as se, formatHeadersFromLocalStorage as Ve, formatHeadersToLocalStorage as la, setInLocalStorage as Fe } from "./DataTable/utils/editColumnsUtils.js";
90
- const ta = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, oa = {
91
- key: 0,
92
- class: "gap-y-2 flex flex-col border-b pb-3 border-oc-gray-200"
93
- }, ra = { class: "gap-y-2 flex flex-col" }, sa = {
94
- key: 0,
95
- class: "flex items-center bg-white justify-between h-[26px]"
96
- }, na = { class: "flex items-center w-full gap-x-3" }, ia = { class: "truncate w-full max-w-[160px]" }, ua = {
97
- __name: "ColumnEdit",
98
- props: {
99
- options: {
100
- type: Object,
101
- default: () => ({})
102
- },
103
- headers: {
104
- type: Array,
105
- default: () => []
106
- },
107
- localKey: {
108
- type: String,
109
- default: ""
110
- }
111
- },
112
- emits: ["change-active", "onMoved", "update-order"],
113
- setup(g, { emit: K }) {
114
- const m = K, f = g, o = F([]), v = F([]), c = F(!1), u = (l = !1) => {
115
- v.value = v.value.map((y) => ({
116
- ...y,
117
- isActive: !0
118
- })), m("update-order", {
119
- fixedHeaders: v.value,
120
- activeHeaders: o.value,
121
- isOnMount: l
122
- });
123
- }, s = {
124
- handle: ".drag-el",
125
- filter: ".is-disabled",
126
- group: "headers",
127
- animation: 500,
128
- forceFallback: !1,
129
- move: (l) => l.to.dataset.activeHeaders ? !0 : !!l.draggedContext.futureIndex,
130
- "onUpdate:modelValue": () => u()
131
- };
132
- return ne(() => {
133
- const l = se(f.localKey), { fixed: y, active: _ } = Ve(l, f.headers, f.localKey);
134
- v.value = y || f.headers.slice(0, 1), o.value = _ || f.headers.slice(1).map((O) => {
135
- var d, h, j;
136
- return {
137
- ...O,
138
- isActive: ((j = (h = (d = f.options) == null ? void 0 : d.active) == null ? void 0 : h.find((z) => z.key === O.key)) == null ? void 0 : j.isActive) ?? !0
139
- };
140
- }), u(!0);
141
- }), (l, y) => (n(), E(p(Ce), {
142
- modelValue: c.value,
143
- "onUpdate:modelValue": y[3] || (y[3] = (_) => c.value = _),
144
- class: "h-[36px]",
145
- "is-attach-to-body": ""
146
- }, {
147
- menu: P(() => [
148
- D("div", ta, [
149
- v.value.length ? (n(), w("div", oa, [
150
- y[4] || (y[4] = D("span", { class: "text-oc-text-400 font-medium" }, "Fixed columns", -1)),
151
- T(p(Oe), _e({
152
- key: "key",
153
- modelValue: v.value,
154
- "onUpdate:modelValue": y[0] || (y[0] = (_) => v.value = _)
155
- }, s), {
156
- default: P(() => [
157
- (n(!0), w(G, null, le(v.value, (_, O) => (n(), w("div", {
158
- key: _.key,
159
- class: te(["flex items-center justify-between h-[26px]", O ? "" : "is-disabled"])
160
- }, [
161
- D("span", null, Se(_.label), 1),
162
- O ? (n(), E(p(he), {
163
- key: 0,
164
- width: "18",
165
- height: "18",
166
- class: "text-oc-text-400 drag-el cursor-move",
167
- name: "draggable"
168
- })) : $("", !0)
169
- ], 2))), 128))
170
- ]),
171
- _: 1
172
- }, 16, ["modelValue"])
173
- ])) : $("", !0),
174
- D("div", ra, [
175
- y[5] || (y[5] = D("span", { class: "text-oc-text-400 font-medium" }, "Active columns", -1)),
176
- T(p(Oe), _e({
177
- key: "key",
178
- modelValue: o.value,
179
- "onUpdate:modelValue": y[2] || (y[2] = (_) => o.value = _)
180
- }, s, { "data-active-headers": "true" }), {
181
- default: P(() => [
182
- (n(!0), w(G, null, le(o.value, (_) => (n(), w(G, {
183
- key: _.key
184
- }, [
185
- _.key !== "actions" ? (n(), w("div", sa, [
186
- D("div", na, [
187
- T(p(Ge), {
188
- modelValue: _.isActive,
189
- "onUpdate:modelValue": [
190
- (O) => _.isActive = O,
191
- y[1] || (y[1] = (O) => u())
192
- ],
193
- class: "!w-fit"
194
- }, null, 8, ["modelValue", "onUpdate:modelValue"]),
195
- D("div", ia, Se(_.label), 1)
196
- ]),
197
- o.value.length > 1 ? (n(), E(p(he), {
198
- key: 0,
199
- width: "18",
200
- height: "18",
201
- class: "text-oc-text-400 drag-el cursor-move",
202
- name: "draggable"
203
- })) : $("", !0)
204
- ])) : $("", !0)
205
- ], 64))), 128))
206
- ]),
207
- _: 1
208
- }, 16, ["modelValue"])
209
- ])
210
- ])
211
- ]),
212
- default: P(() => [
213
- T(p(J), {
214
- label: "Edit Column",
215
- "left-icon": "setting",
216
- variant: "secondary"
217
- })
218
- ]),
219
- _: 1
220
- }, 8, ["modelValue"]));
221
- }
222
- }, da = { class: "flex flex-col gap-9 relative" }, pa = {
223
- key: 0,
224
- class: "flex items-center px-4 min-h-[52px]"
225
- }, ma = {
226
- key: 0,
227
- class: "flex gap-5 items-center absolute left-5"
228
- }, va = {
229
- key: 1,
230
- class: "flex gap-3 absolute left-5"
231
- }, fa = {
232
- key: 1,
233
- class: "flex w-full gap-5 md:justify-start justify-center"
234
- }, ca = {
235
- key: 2,
236
- class: "hidden md:flex items-center"
237
- }, Ya = {
238
- __name: "OcDataTable",
239
- props: {
240
- isLoading: Boolean,
241
- id: {
242
- type: String,
243
- required: !0
244
- },
245
- options: {
246
- type: Object,
247
- required: !0
248
- },
249
- filter: {
250
- type: Object,
251
- required: !0
252
- },
253
- selected: {
254
- type: Array,
255
- required: !1
256
- },
257
- rowClass: String,
258
- rowKey: {
259
- type: String,
260
- Function,
261
- default: "id"
262
- },
263
- rowLink: String
264
- },
265
- emits: {
266
- "update:selected": [],
267
- "update:filter": [],
268
- "click:row": [],
269
- "filter-fields-changed": [],
270
- "filter-removed": [],
271
- "search-query-changed": [],
272
- "hover:cell": []
273
- },
274
- setup(g, { emit: K }) {
275
- var de, pe, me, ve, fe, ce, ye, ge, be;
276
- const m = g, f = K, o = A(() => {
277
- var a;
278
- return (a = m.options) == null ? void 0 : a.pagination;
279
- }), v = A(() => {
280
- var a;
281
- return (a = m.options) == null ? void 0 : a.cursor;
282
- }), c = F(), u = A(() => {
283
- var a;
284
- return (a = m.options) == null ? void 0 : a.tableOptions;
285
- }), s = A(() => {
286
- var a;
287
- return {
288
- ...u.value,
289
- headers: c.value ? c.value.filter((e) => ue(e.key)) : (a = u.value) == null ? void 0 : a.headers.filter((e) => ue(e.key))
290
- };
291
- }), l = A(() => {
292
- var a;
293
- return (a = m.options) == null ? void 0 : a.filterOptions;
294
- }), y = A(() => {
295
- var a;
296
- return (a = m.options) == null ? void 0 : a.hidePerPageDropdown;
297
- }), _ = A(() => {
298
- var a;
299
- return ((a = o.value) == null ? void 0 : a.last_page) === 1;
300
- }), O = F(!1), d = F(m.filter[(pe = (de = l.value) == null ? void 0 : de.tabs) == null ? void 0 : pe.key]), h = F(m.filter.page), j = F(
301
- (ve = (me = l.value) == null ? void 0 : me.per_page) != null && ve.key ? m.filter[(ce = (fe = l.value) == null ? void 0 : fe.per_page) == null ? void 0 : ce.key] : m.filter.per_page
302
- ), z = ((be = m.filter[(ge = (ye = l.value) == null ? void 0 : ye.search) == null ? void 0 : ge.key]) == null ? void 0 : be.trim()) ?? "", N = F(z ? z.split(",") : []), ie = F(!1), je = A(
303
- () => {
304
- var a, e;
305
- return (e = (a = m.options) == null ? void 0 : a.perPageOptions) == null ? void 0 : e.map(
306
- (i) => ({
307
- label: `${i}`,
308
- value: i
309
- })
310
- );
311
- }
312
- ), Ae = A(() => {
313
- let a = [
314
- {
315
- label: "10",
316
- value: 10
317
- },
318
- {
319
- label: "15",
320
- value: 15
321
- },
322
- {
323
- label: "20",
324
- value: 20
325
- },
326
- {
327
- label: "25",
328
- value: 25
329
- },
330
- {
331
- label: "40",
332
- value: 40
333
- },
334
- {
335
- label: "50",
336
- value: 50
337
- },
338
- {
339
- label: "75",
340
- value: 75
341
- },
342
- {
343
- label: "99",
344
- value: 99
345
- }
346
- ], e = je.value ?? a;
347
- if (o.value) {
348
- const i = o.value.total < 100 ? o.value.total : 100;
349
- i > 10 && (e = e.filter((b) => b.value <= i));
350
- }
351
- return [...new Set(e)];
352
- }), Ee = A(() => {
353
- var a;
354
- return ((a = m.selected) == null ? void 0 : a.length) > 0;
355
- }), Pe = (a) => {
356
- !a.trim() || N.value.includes(a) || (l.value ? N.value.push(a) : N.value = [a], L(), f("search-query-changed", a));
357
- }, Te = (a) => {
358
- N.value = N.value.filter((e) => e !== a), L();
359
- }, H = m.filter;
360
- !H && o ? H.page = 1 : !H && v && (H.cursor = "");
361
- const r = F(H), Ie = () => {
362
- var e, i, b, k, S, t, C, I;
363
- N.value = [], d.value = "";
364
- const a = {};
365
- l.value ? H.page = 1 : H.cursor = "", (i = (e = l.value) == null ? void 0 : e.per_page) != null && i.key ? a[(k = (b = l.value) == null ? void 0 : b.per_page) == null ? void 0 : k.key] = j.value : a.per_page = j.value, (t = (S = l.value) == null ? void 0 : S.tabs) != null && t.key ? a[(I = (C = l.value) == null ? void 0 : C.tabs) == null ? void 0 : I.key] = d.value : a.tabs = d.value, r.value = a, L();
366
- }, De = () => {
367
- L(null, h.value);
368
- }, Le = () => {
369
- var a, e;
370
- (e = (a = l.value) == null ? void 0 : a.columnEdit) != null && e.localStorageKey && Fe(m.id, JSON.stringify(r.value));
371
- }, Be = () => m.id ? se(m.id) : null, L = (a = null, e = !1, i = "") => {
372
- var b, k, S;
373
- o.value && !e && (h.value = 1), o.value ? r.value.page = h.value : r.value.cursor = i, (b = l.value) != null && b.per_page ? r.value[l.value.per_page.key] = j.value : r.value.per_page = j.value, (k = l.value) != null && k.tabs && (r.value[l.value.tabs.key] = d.value), (S = l.value) != null && S.search && (r.value[l.value.search.key] = N.value.join()), a && (O.value = !1, r.value = { ...r.value, ...a }, Object.keys(r.value).forEach((t) => {
374
- Array.isArray(r.value[t]) && r.value[t].length === 0 && delete r.value[t];
375
- })), Le(), f("update:filter", r.value);
376
- }, Ue = (a, e) => {
377
- L(a), f("filter-removed", e);
378
- }, Re = (a) => {
379
- let e = [];
380
- return a.forEach((i) => {
381
- e.push(i.key);
382
- }), e;
383
- }, Ke = A(() => {
384
- if (r.value) {
385
- let a = [];
386
- return Object.keys(r.value).forEach((e) => {
387
- var S, t, C, I, q, Y, W, X, Z, ee, ae;
388
- let i = (t = (S = l.value) == null ? void 0 : S.tabs) == null ? void 0 : t.key;
389
- const b = (I = (C = l.value) == null ? void 0 : C.search) == null ? void 0 : I.key, k = ((Y = (q = l.value) == null ? void 0 : q.per_page) == null ? void 0 : Y.key) ?? "per_page";
390
- if ((W = l.value.form) == null || W.find((V) => {
391
- V.name === i && (i = "");
392
- }), e !== "page" && e !== "cursor" && e !== k && e !== i && e !== b) {
393
- let V = null, x = (X = l.value.form) == null ? void 0 : X.find((M) => {
394
- if (typeof M.name == "object") {
395
- let R = !1;
396
- return M.name.forEach((Q) => {
397
- Q.key === e && (R = !0, V = Re(M.name));
398
- }), R;
399
- } else
400
- return M.name === e;
401
- }), B = "";
402
- if (x && r.value[e]) {
403
- if (typeof x.name == "object" ? (Z = x.name) == null || Z.forEach((R) => {
404
- B && (B += " - "), B += r.value[R.key];
405
- }) : B = r.value[e], x.props.options && (B = (x.props.multiple ? r.value[e] : [r.value[e]]).map(
406
- (Q) => {
407
- var xe;
408
- return (xe = x.props.options.find(({ value: Ye }) => Ye === Q)) == null ? void 0 : xe.label;
409
- }
410
- ).join(", ")), x.type === "RangeInput" && Array.isArray(r.value[e]) && (B = r.value[e][0].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + " - " + r.value[e][1].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")), x.type === "DatePicker")
411
- if (((ee = x == null ? void 0 : x.props) == null ? void 0 : ee.type) === "range" && x.name && x.name[1]) {
412
- const R = re(r.value[x.name[0].key]).format("MM/DD/YYYY"), Q = re(r.value[x.name[1].key]).format("MM/DD/YYYY");
413
- B = R === Q ? R : R + " - " + Q;
414
- } else B = re(r.value[x.name]).format("MM/DD/YYYY");
415
- let M = `${(ae = x == null ? void 0 : x.props) == null ? void 0 : ae.label} : ${B}`;
416
- x && x.name && typeof x.name == "object" && a.find((Q) => Q.name === V[0]) && (M = ""), a.push({
417
- label: M,
418
- name: e,
419
- multiNames: V
420
- });
421
- }
422
- }
423
- }), a;
424
- }
425
- return [];
426
- }), ue = (a) => {
427
- var e, i, b, k, S, t;
428
- return ((t = (S = (k = (b = r.value) == null ? void 0 : b[(i = (e = l.value) == null ? void 0 : e.columnEdit) == null ? void 0 : i.key]) == null ? void 0 : k.active) == null ? void 0 : S.find((C) => C.key === a)) == null ? void 0 : t.isActive) ?? !0;
429
- }, Me = ({ fixedHeaders: a, activeHeaders: e, isOnMount: i }) => {
430
- var b, k, S, t;
431
- if (r.value[(k = (b = l.value) == null ? void 0 : b.columnEdit) == null ? void 0 : k.key].fixed = a, r.value[(t = (S = l.value) == null ? void 0 : S.columnEdit) == null ? void 0 : t.key].active = e, c.value = [...a, ...e], !i) {
432
- const C = la(a, e);
433
- Fe(l.value.columnEdit.localStorageKey, C);
434
- }
435
- }, Ne = () => {
436
- var a, e, i, b, k, S;
437
- if ((e = (a = l.value) == null ? void 0 : a.columnEdit) != null && e.localStorageKey) {
438
- const t = se(l.value.columnEdit.localStorageKey);
439
- if (t) {
440
- const { fixed: C, active: I } = Ve(
441
- t,
442
- u.value.headers,
443
- l.value.columnEdit.localStorageKey
444
- );
445
- r.value[(b = (i = l.value) == null ? void 0 : i.columnEdit) == null ? void 0 : b.key].fixed = C, r.value[(S = (k = l.value) == null ? void 0 : k.columnEdit) == null ? void 0 : S.key].active = I, c.value = [...C, ...I];
446
- }
447
- }
448
- };
449
- return ne(() => {
450
- var e, i, b, k;
451
- Ne();
452
- const a = Be();
453
- a && (r.value = JSON.parse(a), d.value = d.value || ((e = r.value) == null ? void 0 : e.tabs) || ((k = r.value) == null ? void 0 : k[(b = (i = l.value) == null ? void 0 : i.tabs) == null ? void 0 : b.key]), L());
454
- }), (a, e) => {
455
- var i, b, k, S;
456
- return n(), w("div", da, [
457
- u.value ? (n(), E(p(Qe), {
458
- key: 0,
459
- selected: g.selected,
460
- "row-key": g.rowKey,
461
- options: s.value,
462
- "is-loading": g.isLoading,
463
- "loading-rows": j.value,
464
- "row-class": g.rowClass,
465
- "row-link": g.rowLink,
466
- "is-sticky": u.value.isSticky,
467
- "is-borderless": u.value.isBorderless,
468
- "onUpdate:selected": e[7] || (e[7] = (t) => a.$emit("update:selected", t)),
469
- "onClick:row": e[8] || (e[8] = (t) => a.$emit("click:row", t)),
470
- "onHover:cell": e[9] || (e[9] = (t) => a.$emit("hover:cell", t))
471
- }, Ze({
472
- after: P(() => [
473
- U(a.$slots, "after")
474
- ]),
475
- empty: P(() => [
476
- U(a.$slots, "empty")
477
- ]),
478
- "table-header": P((t) => [
479
- U(a.$slots, "table-header", we($e(t)))
480
- ]),
481
- "table-body": P((t) => [
482
- U(a.$slots, "table-body", we($e(t)))
483
- ]),
484
- _: 2
485
- }, [
486
- a.$slots.before || (i = l.value) != null && i.search || (b = l.value) != null && b.form || (k = l.value) != null && k.tabs ? {
487
- name: "before",
488
- fn: P(() => {
489
- var t, C, I, q;
490
- return [
491
- U(a.$slots, "before"),
492
- (t = l.value) != null && t.search || (C = l.value) != null && C.form || (I = l.value) != null && I.tabs ? (n(), w("div", pa, [
493
- Ee.value ? (n(), w("div", ma, [
494
- U(a.$slots, "bulk-actions", { selectedRows: g.selected })
495
- ])) : (n(), w("div", va, [
496
- (q = l.value) != null && q.tabs ? (n(), E(p(ze), {
497
- key: 0,
498
- modelValue: d.value,
499
- "onUpdate:modelValue": [
500
- e[0] || (e[0] = (Y) => d.value = Y),
501
- e[1] || (e[1] = (Y) => L(null))
502
- ],
503
- tabs: l.value.tabs.options,
504
- variant: "pills"
505
- }, null, 8, ["modelValue", "tabs"])) : $("", !0)
506
- ])),
507
- U(a.$slots, "filter-options", {}, () => {
508
- var Y, W, X, Z, ee, ae;
509
- return [
510
- (Y = l.value) != null && Y.search || (W = l.value) != null && W.form || (X = l.value) != null && X.columnEdit ? (n(), w("div", {
511
- key: 0,
512
- class: te([
513
- "flex gap-3 absolute ml-auto bg-oc-bg-light right-4 max-w-[calc(100%-24px)]",
514
- l.value ? ie.value ? "md:w-fit w-full" : "" : "w-full justify-end"
515
- ])
516
- }, [
517
- (Z = l.value) != null && Z.search ? (n(), E(p(ga), {
518
- key: 0,
519
- "is-search-only": !l.value.tabs || l.value.isSearchOnly,
520
- onAddQuery: Pe,
521
- onToggle: e[2] || (e[2] = (V) => ie.value = V)
522
- }, null, 8, ["is-search-only"])) : $("", !0),
523
- (ee = l.value) != null && ee.form ? (n(), E(p(Ce), {
524
- key: 1,
525
- modelValue: O.value,
526
- "onUpdate:modelValue": e[6] || (e[6] = (V) => O.value = V),
527
- distance: 9,
528
- placement: "bottom-end",
529
- "is-attach-to-body": ""
530
- }, {
531
- menu: P(() => [
532
- O.value ? (n(), E(p(Sa), {
533
- key: 0,
534
- id: g.id,
535
- "json-form": l.value.form ?? [],
536
- grid: l.value.grid ?? null,
537
- values: m.filter,
538
- actions: l.value.actions,
539
- onApplyFilter: e[3] || (e[3] = (V) => L(V)),
540
- onFilterFieldsChanged: e[4] || (e[4] = (V) => f("filter-fields-changed", V)),
541
- onCancel: e[5] || (e[5] = (V) => O.value = !1)
542
- }, {
543
- default: P(({ errors: V, values: x, jsonForm: B, updateForm: M }) => [
544
- U(a.$slots, "custom-filter-form", {
545
- errors: V,
546
- values: x,
547
- jsonForm: B,
548
- updateFilter: M
549
- })
550
- ]),
551
- _: 3
552
- }, 8, ["id", "json-form", "grid", "values", "actions"])) : $("", !0)
553
- ]),
554
- default: P(() => [
555
- T(p(J), {
556
- "is-active": O.value,
557
- variant: "secondary",
558
- "left-icon": "filter"
559
- }, null, 8, ["is-active"])
560
- ]),
561
- _: 3
562
- }, 8, ["modelValue"])) : $("", !0),
563
- l.value.columnEdit ? (n(), E(ua, {
564
- key: 2,
565
- options: r.value.columnEdit,
566
- headers: ((ae = u.value) == null ? void 0 : ae.headers) || [],
567
- "local-key": l.value.columnEdit.localStorageKey,
568
- onUpdateOrder: Me
569
- }, null, 8, ["options", "headers", "local-key"])) : $("", !0)
570
- ], 2)) : $("", !0)
571
- ];
572
- })
573
- ])) : $("", !0),
574
- T(p(xa), {
575
- filters: Ke.value,
576
- queries: N.value,
577
- class: "border-t border-oc-gray-200",
578
- onRemoveQuery: Te,
579
- onRemoveAll: Ie,
580
- onRemoveFilter: Ue
581
- }, null, 8, ["filters", "queries"])
582
- ];
583
- }),
584
- key: "0"
585
- } : void 0,
586
- le((S = u.value) == null ? void 0 : S.headers, (t, C) => ({
587
- name: t.key,
588
- fn: P(({ data: I, item: q }) => [
589
- U(a.$slots, t.key, {
590
- data: I,
591
- item: q
592
- })
593
- ])
594
- }))
595
- ]), 1032, ["selected", "row-key", "options", "is-loading", "loading-rows", "row-class", "row-link", "is-sticky", "is-borderless"])) : $("", !0),
596
- U(a.$slots, "before-pagination"),
597
- o.value || v.value ? (n(), w("div", {
598
- key: 1,
599
- class: te(["flex gap-3 items-center", o.value && o.value.last_page === 1 ? "justify-end" : ""])
600
- }, [
601
- o.value && !_.value ? (n(), E(p(qe), {
602
- key: 0,
603
- modelValue: h.value,
604
- "onUpdate:modelValue": [
605
- e[10] || (e[10] = (t) => h.value = t),
606
- De
607
- ],
608
- class: "justify-center",
609
- "max-page": o.value.last_page,
610
- strategy: o.value.strategy,
611
- "total-visible": "5"
612
- }, null, 8, ["modelValue", "max-page", "strategy"])) : $("", !0),
613
- v.value ? (n(), w("div", fa, [
614
- T(p(ke), {
615
- disabled: !v.value.prev,
616
- onClick: e[11] || (e[11] = (t) => v.value.prev ? L(null, !1, v.value.prev) : null)
617
- }, null, 8, ["disabled"]),
618
- T(p(ke), {
619
- disabled: !v.value.next,
620
- "is-next": "",
621
- onClick: e[12] || (e[12] = (t) => v.value.next ? L(null, !1, v.value.next) : null)
622
- }, null, 8, ["disabled"])
623
- ])) : $("", !0),
624
- y.value ? $("", !0) : (n(), w("div", ca, [
625
- T(p(We), {
626
- modelValue: j.value,
627
- "onUpdate:modelValue": [
628
- e[13] || (e[13] = (t) => j.value = t),
629
- e[14] || (e[14] = (t) => L(null))
630
- ],
631
- label: "Item per page",
632
- "is-inline-label": "",
633
- "popper-options": { placement: "auto" },
634
- options: Ae.value
635
- }, null, 8, ["modelValue", "options"])
636
- ]))
637
- ], 2)) : $("", !0)
638
- ]);
639
- };
640
- }
641
- }, ya = { class: "flex gap-x-4" }, ga = {
642
- __name: "OcFilterSearch",
643
- props: {
644
- isSearchOnly: Boolean
645
- },
646
- emits: {
647
- addQuery: [],
648
- toggle: []
649
- },
650
- setup(g, { emit: K }) {
651
- const m = K, f = F(!1), o = F(""), v = F(), c = async () => {
652
- f.value = !0, m("toggle", f), await aa(), v.value.focus();
653
- };
654
- return (u, s) => (n(), w(G, null, [
655
- D("div", {
656
- class: te(["w-full", f.value || g.isSearchOnly ? "" : "absolute max-w-0 overflow-hidden"])
657
- }, [
658
- D("div", ya, [
659
- T(p(Je), {
660
- ref_key: "searchInput",
661
- ref: v,
662
- modelValue: o.value,
663
- "onUpdate:modelValue": s[0] || (s[0] = (l) => o.value = l),
664
- placeholder: "Search something here",
665
- class: "md:min-w-[310px]",
666
- icon: "search",
667
- onKeyup: s[1] || (s[1] = ea(
668
- () => {
669
- u.$emit("addQuery", o.value), o.value = "";
670
- },
671
- ["enter"]
672
- ))
673
- }, null, 8, ["modelValue"]),
674
- g.isSearchOnly ? (n(), E(p(J), {
675
- key: 0,
676
- label: "Search",
677
- variant: "secondary",
678
- class: "shrink-0",
679
- onClick: s[2] || (s[2] = () => {
680
- u.$emit("addQuery", o.value), o.value = "";
681
- })
682
- })) : (n(), w("span", {
683
- key: 1,
684
- class: "py-3 text-base cursor-pointer flex normal-case items-center font-medium text-oc-text-400",
685
- onClick: s[3] || (s[3] = () => {
686
- f.value = !1, u.$emit("toggle", f.value), o.value = "";
687
- })
688
- }, " Clear "))
689
- ])
690
- ], 2),
691
- g.isSearchOnly ? $("", !0) : (n(), w("div", {
692
- key: 0,
693
- class: te(f.value ? "max-w-0 overflow-hidden" : "")
694
- }, [
695
- f.value ? $("", !0) : (n(), E(p(J), {
696
- key: 0,
697
- variant: "secondary",
698
- "left-icon": "search",
699
- onClick: c
700
- }))
701
- ], 2))
702
- ], 64));
703
- }
704
- }, ba = { class: "flex gap-1 items-center normal-case flex-wrap" }, xa = {
705
- __name: "OcFilterSearchFor",
706
- props: {
707
- filters: Object,
708
- queries: Object
709
- },
710
- emits: {
711
- removeQuery: [],
712
- removeFilter: [],
713
- removeAll: []
714
- },
715
- setup(g, { emit: K }) {
716
- const m = g, f = K, o = A(() => {
717
- var u;
718
- let c = [];
719
- return (u = m.filters) == null || u.forEach((s) => {
720
- if (s.multiNames) {
721
- const l = c.find((y) => y.name === s.multiNames[0]);
722
- l ? l.label = l.label + s.label : c.push(s);
723
- } else
724
- c.push(s);
725
- }), c;
726
- }), v = (c, u) => {
727
- let s = {};
728
- s[c] = "", u ? u.forEach((l) => {
729
- let y = {};
730
- y[l] = "", f("removeFilter", y, l);
731
- }) : f("removeFilter", s, c);
732
- };
733
- return (c, u) => o.value.length > 0 || g.queries.length > 0 ? (n(), E(p(He), {
734
- key: 0,
735
- class: "!w-full !justify-start !bg-oc-bg-light"
736
- }, {
737
- default: P(() => [
738
- D("div", ba, [
739
- u[1] || (u[1] = D("span", { class: "pr-2 text-sm font-medium text-oc-text" }, "Search for:", -1)),
740
- (n(!0), w(G, null, le(g.queries, (s) => (n(), E(p(oe), {
741
- key: s,
742
- variant: "accent-1",
743
- closable: "",
744
- label: s,
745
- onRemove: (l) => c.$emit("removeQuery", s)
746
- }, null, 8, ["label", "onRemove"]))), 128)),
747
- (n(!0), w(G, null, le(o.value, (s) => (n(), E(p(oe), {
748
- key: s.name,
749
- variant: "accent-1",
750
- closable: "",
751
- label: s.label,
752
- onRemove: (l) => v(s.name, s.multiNames)
753
- }, null, 8, ["label", "onRemove"]))), 128)),
754
- T(p(oe), {
755
- variant: "gray",
756
- class: "cursor-pointer",
757
- label: "Clear all",
758
- onClick: u[0] || (u[0] = (s) => c.$emit("removeAll"))
759
- })
760
- ])
761
- ]),
762
- _: 1
763
- })) : $("", !0);
764
- }
765
- }, ka = { class: "flex w-[326px] flex-col gap-y-5" }, ha = { class: "max-h-[500px] overflow-y-auto p-5" }, _a = { class: "flex gap-x-5 px-5 pb-5" }, Sa = {
766
- __name: "OcFilterForm",
767
- props: {
768
- id: {
769
- type: String,
770
- required: !0
771
- },
772
- jsonForm: {
773
- type: Array
774
- },
775
- values: {
776
- type: Object
777
- },
778
- actions: {
779
- type: Object
780
- },
781
- grid: {
782
- type: Object,
783
- default: null
784
- }
785
- },
786
- emits: ["applyFilter", "cancel", "filter-fields-changed"],
787
- setup(g, { emit: K }) {
788
- const m = g, f = K, o = F({}), v = F({}), c = F([]), u = (d) => {
789
- c.value.findIndex((j) => j === d) >= 0 || c.value.push(d);
790
- }, s = (d, h = null) => {
791
- typeof d.name == "object" ? d.name.forEach((j, z) => {
792
- o.value[j.key] = h[z];
793
- }) : o.value[d.name] = h, u(d.name);
794
- }, l = A(() => Object.values(o.value).length > 0), y = A(() => {
795
- var d, h;
796
- return ((h = (d = m.actions) == null ? void 0 : d.applyButton) == null ? void 0 : h.label) || "Apply";
797
- }), _ = A(() => {
798
- var d, h;
799
- return ((h = (d = m.actions) == null ? void 0 : d.cancelButton) == null ? void 0 : h.label) || "Cancel";
800
- });
801
- ne(() => {
802
- o.value = { ...m.values };
803
- });
804
- const O = () => {
805
- f("applyFilter", o.value), f("filter-fields-changed", c.value), c.value = [];
806
- };
807
- return (d, h) => (n(), w("div", ka, [
808
- U(d.$slots, "default", {
809
- errors: v.value,
810
- values: o.value,
811
- jsonForm: g.jsonForm,
812
- updateForm: s
813
- }, () => [
814
- D("div", ha, [
815
- T(p(Xe), {
816
- id: `filter-form-${g.id}`,
817
- class: "grid gap-5",
818
- errors: v.value,
819
- values: o.value,
820
- "json-form": g.jsonForm,
821
- grid: g.grid ?? null,
822
- onOnUpdate: s
823
- }, null, 8, ["id", "errors", "values", "json-form", "grid"])
824
- ])
825
- ]),
826
- D("div", _a, [
827
- T(p(J), {
828
- class: "w-full",
829
- variant: "secondary",
830
- label: _.value,
831
- onClick: h[0] || (h[0] = (j) => d.$emit("cancel"))
832
- }, null, 8, ["label"]),
833
- T(p(J), {
834
- class: "w-full",
835
- "is-disabled": !l.value,
836
- label: y.value,
837
- onClick: O
838
- }, null, 8, ["is-disabled", "label"])
839
- ])
840
- ]));
841
- }
842
- };
1
+ import "vue";
2
+ import { U as r, aj as o, a1 as t, a3 as i, am as n, _ as p, a4 as l, B as d, p as m, a as u, b, c, an as S, aA as T, aH as C, aq as g, ar as x, d as P, aJ as f, C as I, aG as h, q as O, aB as k, aK as v, as as F, at as w, aL as L, a5 as A, S as B, M as D, R as H, a6 as _, aE as M, aD as R, aF as y, x as E, w as G, m as N, a7 as U, aa as V, a9 as j, ab as q, y as z, a2 as J, e as K, f as W, n as Q, z as X, A as Y, D as Z, au as $, aI as aa, u as ea, v as sa, av as ra, E as oa, V as ta, l as ia, F as na, G as pa, H as la, ad as da, ae as ma, I as ua, K as ba, Z as ca, g as Sa, J as Ta, af as Ca, h as ga, i as xa, j as Pa, ag as fa, r as Ia, k as ha, s as Oa, ao as ka, ah as va, ai as Fa, t as wa, ap as La, X as Aa, W as Ba, a8 as Da, aO as Ha, ak as _a, aw as Ma, ac as Ra, L as ya, O as Ea, P as Ga, N as Na, Q as Ua, Y as Va, o as ja, aN as qa, aM as za, aP as Ja, aC as Ka, ax as Wa, T as Qa, a0 as Xa, $ as Ya, al as Za, ay as $a } from "./index-DyVteXE3.js";
3
+ import { _ as ee } from "./OcProgressBar-hiyC5XSc.js";
4
+ import { _ as re } from "./OcHorizontalProgressbar.vue_vue_type_script_setup_true_lang-4eVgPDi5.js";
5
+ import { _ as te } from "./OcSwitchTabs-CYp676bj.js";
6
+ import { S as ne } from "./OcSkeleton-CvdpGSQR.js";
7
+ import { _ as le } from "./OcTag.vue_vue_type_script_setup_true_lang-D19lw-8Y.js";
8
+ import { T as me } from "./OcToggle-bIJaLDMZ.js";
9
+ import { S as be } from "./OcSlider-DW9x8eas.js";
10
+ import { _ as Se } from "./OcAvatar-NDXQiZvz.js";
11
+ import { _ as Ce } from "./OcIcon-CJgBICxh.js";
12
+ import { _ as xe } from "./OcPopper-C11OgQAj.js";
13
+ import { _ as fe } from "./OcTheme-CWgrJh5Q.js";
843
14
  export {
844
- Ol as Accordion,
845
- Xl as AccountSetup,
846
- st as AdditionalContent,
847
- gt as AuthenticationOption,
848
- wo as Avatar,
849
- St as Banner,
850
- Vt as BaseInput,
851
- ct as Box,
852
- J as Button,
853
- jt as Calendar,
854
- Pt as CardInput,
855
- Ge as Checkbox,
856
- It as CheckboxesGroup,
857
- oe as Chip,
858
- Eo as ConfirmationModal,
859
- Bo as CopyTooltip,
860
- Lt as Criteria,
861
- nl as CustomerCard,
862
- Ya as DataTable,
863
- ro as DatePicker,
864
- Ce as Dropdown,
865
- Oo as DropdownItem,
866
- ot as EmptyPage,
867
- qa as ExpandingHeaderRow,
868
- za as ExpandingTable,
869
- Ga as ExpandingTableRow,
870
- pt as FeatureOverviewCard,
871
- Sa as FilterForm,
872
- ga as FilterSearch,
873
- xa as FilterSearchFor,
874
- kl as FloatContent,
875
- Xe as FormBuilder,
876
- Wt as GroupOptions,
877
- Rl as Header,
878
- Kl as HeaderCenter,
879
- Ml as HeaderLeft,
880
- Nl as HeaderRight,
881
- _l as HorizontalProgressbar,
882
- he as Icon,
883
- yl as InfoCard,
884
- nt as InfoCardButton,
885
- Je as Input,
886
- Ut as InputOption,
887
- ao as LinkInput,
888
- fl as ListDetail,
889
- pl as ListItem,
890
- ml as ListUrl,
891
- Co as Modal,
892
- ko as MultipleUploadFile,
893
- _o as NumberInput,
894
- jo as OcModalPage,
895
- wl as OcOnboardingListItem,
896
- Cl as OnboardingAccordion,
897
- Gt as Option,
898
- ll as Overview,
899
- rl as OverviewIcon,
900
- tl as OverviewItem,
901
- ql as PageTitle,
902
- zl as PageTitleRight,
903
- qe as Pagination,
904
- el as PaginationNumber,
905
- jl as PaymentTab,
906
- Kt as PhoneInput,
907
- To as Popper,
908
- ke as PrevNext,
909
- Jl as PrimaryActions,
910
- bl as ProgressBar,
911
- Nt as Radio,
912
- Qt as RadioGroup,
913
- qt as RangeInput,
914
- vt as SandboxBanner,
915
- fo as SectionItem,
916
- We as Select,
917
- yo as SelectOptions,
918
- $t as ShareIcon,
919
- Zl as Sidebar,
920
- et as SidebarSubmenu,
921
- bo as SingleFileUpload,
922
- ut as Skeleton,
923
- mo as Slider,
924
- ht as Snackbar,
925
- El as Step,
926
- Pl as Steps,
927
- Yl as SubHeader,
928
- lt as SubSidebar,
929
- Do as SupportMenu,
930
- Bl as SwitchTabs,
931
- Ql as TabToSelect,
932
- Qe as Table,
933
- Ja as TableCell,
934
- Wa as TableCellContent,
935
- He as TableHeader,
936
- Xa as TableLink,
937
- ze as Tabs,
938
- Ft as Tag,
939
- to as TextArea,
940
- Mo as Theme,
941
- uo as TimePicker,
942
- no as TimePopup,
943
- Zt as Toggle,
944
- At as Tooltip,
945
- ul as TransferSummary,
946
- Il as Variant,
947
- Dl as Variants,
948
- xt as VerificationOption,
949
- Ro as WhiteList
15
+ r as Accordion,
16
+ o as AccountSetup,
17
+ t as AdditionalContent,
18
+ i as AuthenticationOption,
19
+ Se as Avatar,
20
+ n as Banner,
21
+ p as BaseInput,
22
+ l as Box,
23
+ d as Button,
24
+ m as Calendar,
25
+ u as CardInput,
26
+ b as Checkbox,
27
+ c as CheckboxesGroup,
28
+ S as Chip,
29
+ T as ComplexCalendar,
30
+ C as ComplexDatePicker,
31
+ g as ConfirmationModal,
32
+ x as CopyTooltip,
33
+ P as Criteria,
34
+ f as Cropper,
35
+ I as CustomerCard,
36
+ h as DataTable,
37
+ O as DatePicker,
38
+ k as Draggable,
39
+ v as DraggableList,
40
+ F as Dropdown,
41
+ w as DropdownItem,
42
+ L as EmojiPicker,
43
+ A as EmptyPage,
44
+ B as ExpandingHeaderRow,
45
+ D as ExpandingTable,
46
+ H as ExpandingTableRow,
47
+ _ as FeatureOverviewCard,
48
+ M as FilterForm,
49
+ R as FilterSearch,
50
+ y as FilterSearchFor,
51
+ E as FloatContent,
52
+ G as FormBuilder,
53
+ N as GroupOptions,
54
+ U as Header,
55
+ V as HeaderCenter,
56
+ j as HeaderLeft,
57
+ q as HeaderRight,
58
+ re as HorizontalProgressbar,
59
+ Ce as Icon,
60
+ z as InfoCard,
61
+ J as InfoCardButton,
62
+ K as Input,
63
+ W as InputOption,
64
+ Q as LinkInput,
65
+ X as ListDetail,
66
+ Y as ListItem,
67
+ Z as ListUrl,
68
+ $ as Modal,
69
+ aa as ModalCropper,
70
+ ea as MultipleUploadFile,
71
+ sa as NumberInput,
72
+ ra as OcModalPage,
73
+ oa as OcOnboardingListItem,
74
+ ta as OnboardingAccordion,
75
+ ia as Option,
76
+ na as Overview,
77
+ pa as OverviewIcon,
78
+ la as OverviewItem,
79
+ da as PageTitle,
80
+ ma as PageTitleRight,
81
+ ua as Pagination,
82
+ ba as PaginationNumber,
83
+ ca as PaymentTab,
84
+ Sa as PhoneInput,
85
+ xe as Popper,
86
+ Ta as PrevNext,
87
+ Ca as PrimaryActions,
88
+ ee as ProgressBar,
89
+ ga as Radio,
90
+ xa as RadioGroup,
91
+ Pa as RangeInput,
92
+ fa as SandboxBanner,
93
+ Ia as SectionItem,
94
+ ha as Select,
95
+ Oa as SelectOptions,
96
+ ka as ShareIcon,
97
+ va as Sidebar,
98
+ Fa as SidebarSubmenu,
99
+ wa as SingleFileUpload,
100
+ ne as Skeleton,
101
+ be as Slider,
102
+ La as Snackbar,
103
+ Aa as Step,
104
+ Ba as Steps,
105
+ Da as SubHeader,
106
+ Ha as SubPlanCard,
107
+ _a as SubSidebar,
108
+ Ma as SupportMenu,
109
+ te as SwitchTabs,
110
+ Ra as TabToSelect,
111
+ ya as Table,
112
+ Ea as TableCell,
113
+ Ga as TableCellContent,
114
+ Na as TableHeader,
115
+ Ua as TableLink,
116
+ Va as Tabs,
117
+ le as Tag,
118
+ ja as TextArea,
119
+ fe as Theme,
120
+ qa as ThumbnailSection,
121
+ za as ThumbnailTheme,
122
+ Ja as TimePicker,
123
+ Ka as TimePopup,
124
+ me as Toggle,
125
+ Wa as Tooltip,
126
+ Qa as TransferSummary,
127
+ Xa as Variant,
128
+ Ya as Variants,
129
+ Za as VerificationOption,
130
+ $a as WhiteList
950
131
  };