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