@orchidui/core 1.3.0 → 1.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.
- package/dist/DataDisplay/CustomerCard/OcCustomerCard.js +1 -1
- package/dist/DataDisplay/FloatContent/OcFloatContent.js +1 -1
- package/dist/DataDisplay/InfoCard/OcInfoCard.js +1 -1
- package/dist/DataDisplay/ListDetail/OcListDetail.js +1 -1
- package/dist/DataDisplay/ListItem/OcListItem.js +1 -1
- package/dist/DataDisplay/OnboardingListItem/OcOnboardingListItem.js +1 -1
- package/dist/DataDisplay/Overview/OcOverview.js +1 -1
- package/dist/DataDisplay/Pagination/OcPagination.js +1 -1
- package/dist/DataDisplay/Table/OcTable.js +1 -1
- package/dist/DataDisplay/TransferSummary/OcTransferSummary.js +1 -1
- package/dist/Disclosure/Accordion/OcAccordion.js +1 -1
- package/dist/Disclosure/OnboardingAccordion/OnboardingAccordion.js +1 -1
- package/dist/Disclosure/Steps/OcSteps.js +1 -1
- package/dist/Disclosure/Tabs/Tabs.js +1 -1
- package/dist/Disclosure/Variants/OcVariants.js +1 -1
- package/dist/Elements/AdditionalContent/OcAdditionalContent.js +1 -1
- package/dist/Elements/AuthenticationOption/AuthenticationOption.js +1 -1
- package/dist/Elements/Box/OcBox.js +1 -1
- package/dist/Elements/EmptyPage/OcEmptyPage.js +1 -1
- package/dist/Elements/FeatureOverviewCard/OcFeatureOverviewCard.js +1 -1
- package/dist/Elements/Header/OcHeader.js +1 -1
- package/dist/Elements/PageTitle/OcPageTitle.js +1 -1
- package/dist/Elements/SandboxBanner/OcSandboxBanner.js +1 -1
- package/dist/Elements/Section/OcSection.js +4 -0
- package/dist/Elements/Sidebar/OcSidebar.js +9 -2
- package/dist/Elements/SubSidebar/OcSubSidebar.js +1 -1
- package/dist/Elements/VerificationOption/OcVerificationOption.js +1 -1
- package/dist/Feedback/Banner/OcBanner.js +1 -1
- package/dist/Feedback/Chip/OcChip.js +1 -1
- package/dist/Feedback/ShareIcon/OcShareIcon.js +1 -1
- package/dist/Feedback/Snackbar/OcSnackbar.js +1 -1
- package/dist/Form/BaseInput/OcBaseInput.js +1 -1
- package/dist/Form/Button/OcButton.js +1 -1
- package/dist/Form/Calendar/OcCalendar.js +1 -1
- package/dist/Form/CardInput/OcCardInput.js +1 -1
- package/dist/Form/Checkbox/OcCheckbox.js +1 -1
- package/dist/Form/CheckboxesGroup/OcCheckboxesGroup.js +1 -1
- package/dist/Form/Criteria/OcCriteria.js +1 -1
- package/dist/Form/Cropper/OcCropper.js +1 -1
- package/dist/Form/DatePicker/OcDatePicker.js +1 -1
- package/dist/Form/EmojiPicker/OcEmojiPicker.js +1 -1
- package/dist/Form/Input/OcInput.js +1 -1
- package/dist/Form/LinkInput/OcLinkInput.js +1 -1
- package/dist/Form/MultipleUploadFile/OcMultipleUploadFile.js +1 -1
- package/dist/Form/NumberInput/OcNumberInput.js +1 -1
- package/dist/Form/PhoneInput/OcPhoneInput.js +1 -1
- package/dist/Form/Radio/OcRadio.js +1 -1
- package/dist/Form/RadioGroup/OcRadioGroup.js +1 -1
- package/dist/Form/RangeInput/OcRangeInput.js +1 -1
- package/dist/Form/SectionItem/OcSectionItem.js +1 -1
- package/dist/Form/Select/OcSelect.js +1 -1
- package/dist/Form/SelectOptions/OcSelectOptions.js +1 -1
- package/dist/Form/SingleFileUpload/OcSingleFileUpload.js +1 -1
- package/dist/Form/TextArea/OcTextArea.js +1 -1
- package/dist/Form/index.js +1 -1
- package/dist/FormBuilder/OcFormBuilder.js +1 -1
- package/dist/OcAccountSetupProgress-gqRg58IF.js +46 -0
- package/dist/{OcComplexCalendar-CsieDc13.js → OcComplexCalendar-wUfD-rjH.js} +1 -1
- package/dist/{OcComplexDatePicker-C1rftM9e.js → OcComplexDatePicker-CN5P5UAb.js} +3 -3
- package/dist/{OcCropper-DEMCCdNv.js → OcCropper-C2G9bMGn.js} +11 -11
- package/dist/OcDataTable-CUfaDV_D.js +561 -0
- package/dist/{OcDraggableList-CNJ0UX7A.js → OcDraggableList-DO6FTc72.js} +8 -8
- package/dist/{OcEmojiPicker-BzgpAvzA.js → OcEmojiPicker-C0M7uAji.js} +1 -1
- package/dist/{OcFilterForm-C6bbxMQz.js → OcFilterForm-CL1RXUTm.js} +1 -1
- package/dist/{OcFilterSearch-VrsqR8K3.js → OcFilterSearch-TPHX4NCL.js} +1 -1
- package/dist/{OcFilterSearchFor-pYQS37xa.js → OcFilterSearchFor-Dff-v6cU.js} +9 -9
- package/dist/{OcModalCropper-BSkm1o9d.js → OcModalCropper-CXUxP0pM.js} +4 -4
- package/dist/OcSection-D_vO-DAP.js +26 -0
- package/dist/{OcTimePicker-CEePomr_.js → OcTimePicker-BTaVEXku.js} +2 -2
- package/dist/Overlay/ConfirmationModal/OcConfirmationModal.js +1 -1
- package/dist/Overlay/CopyTooltip/OcCopyTooltip.js +2 -2
- package/dist/Overlay/Dropdown/OcDropdown.js +1 -1
- package/dist/Overlay/Modal/OcModal.js +1 -1
- package/dist/Overlay/SupportMenu/OcSupportMenu.js +1 -1
- package/dist/Overlay/Tooltip/OcTooltip.js +1 -1
- package/dist/Overlay/Whitelist/OcWhiteList.js +1 -1
- package/dist/{SubPlanCard-okV5TfUX.js → SubPlanCard-DfZmDLFG.js} +1 -1
- package/dist/{ThumbnailSection-ByWHvtKc.js → ThumbnailSection-BSbhWzDC.js} +1 -1
- package/dist/{ThumbnailTheme-DDuGf9g2.js → ThumbnailTheme-CX6k7Fi4.js} +14 -14
- package/dist/{index-DvOKqQeL.js → index-Cp_g4d58.js} +3375 -3229
- package/dist/index.js +122 -114
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/OcDataTable-ChQoZYkz.js +0 -562
@@ -0,0 +1,561 @@
|
|
1
|
+
import { ref as L, onMounted as Ve, openBlock as i, createBlock as U, unref as y, withCtx as $, createElementVNode as J, createElementBlock as w, createVNode as M, mergeProps as ge, Fragment as ee, renderList as ae, normalizeClass as te, toDisplayString as be, createCommentVNode as x, computed as D, createSlots as Qe, renderSlot as Y, normalizeProps as ke, guardReactiveProps as xe } from "vue";
|
2
|
+
import { ax as Ee, b as Re, B as Fe, L as Je, Y as ze, aI as _e, aJ as He, aK as Ge, I as We, J as he, k as Xe } from "./index-Cp_g4d58.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(E, { emit: Z }) {
|
31
|
+
const v = Z, F = E, c = L([]), f = L([]), T = L(!1), S = (a = !1) => {
|
32
|
+
f.value = f.value.map((p) => ({
|
33
|
+
...p,
|
34
|
+
isActive: !0
|
35
|
+
})), v("update-order", {
|
36
|
+
fixedHeaders: f.value,
|
37
|
+
activeHeaders: c.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(F.localKey), { fixed: p, active: m } = Oe(a, F.headers, F.localKey);
|
51
|
+
f.value = p || F.headers.slice(0, 1), c.value = m || F.headers.slice(1).map((h) => {
|
52
|
+
var V, B, P;
|
53
|
+
return {
|
54
|
+
...h,
|
55
|
+
isActive: ((P = (B = (V = F.options) == null ? void 0 : V.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(), U(y(Ee), {
|
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
|
+
J("div", el, [
|
66
|
+
f.value.length ? (i(), w("div", ll, [
|
67
|
+
p[4] || (p[4] = J("span", { class: "text-oc-text-400 font-medium" }, "Fixed columns", -1)),
|
68
|
+
M(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), w(ee, null, ae(f.value, (m, h) => (i(), w("div", {
|
75
|
+
key: m.key,
|
76
|
+
class: te(["flex items-center justify-between h-[26px]", h ? "" : "is-disabled"])
|
77
|
+
}, [
|
78
|
+
J("span", null, be(m.label), 1),
|
79
|
+
h ? (i(), U(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
|
+
})) : x("", !0)
|
86
|
+
], 2))), 128))
|
87
|
+
]),
|
88
|
+
_: 1
|
89
|
+
}, 16, ["modelValue"])
|
90
|
+
])) : x("", !0),
|
91
|
+
J("div", al, [
|
92
|
+
p[5] || (p[5] = J("span", { class: "text-oc-text-400 font-medium" }, "Active columns", -1)),
|
93
|
+
M(y(we), ge({
|
94
|
+
key: "key",
|
95
|
+
modelValue: c.value,
|
96
|
+
"onUpdate:modelValue": p[2] || (p[2] = (m) => c.value = m)
|
97
|
+
}, W, { "data-active-headers": "true" }), {
|
98
|
+
default: $(() => [
|
99
|
+
(i(!0), w(ee, null, ae(c.value, (m) => (i(), w(ee, {
|
100
|
+
key: m.key
|
101
|
+
}, [
|
102
|
+
m.key !== "actions" ? (i(), w("div", tl, [
|
103
|
+
J("div", sl, [
|
104
|
+
M(y(Re), {
|
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
|
+
J("div", ol, be(m.label), 1)
|
113
|
+
]),
|
114
|
+
c.value.length > 1 ? (i(), U(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
|
+
})) : x("", !0)
|
121
|
+
])) : x("", !0)
|
122
|
+
], 64))), 128))
|
123
|
+
]),
|
124
|
+
_: 1
|
125
|
+
}, 16, ["modelValue"])
|
126
|
+
])
|
127
|
+
])
|
128
|
+
]),
|
129
|
+
default: $(() => [
|
130
|
+
M(y(Fe), {
|
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(E, { emit: Z }) {
|
192
|
+
var re, ie, ne, de, ve, ce, fe, pe, me;
|
193
|
+
const v = E, F = Z, c = D(() => {
|
194
|
+
var l;
|
195
|
+
return (l = v.options) == null ? void 0 : l.pagination;
|
196
|
+
}), f = D(() => {
|
197
|
+
var l;
|
198
|
+
return (l = v.options) == null ? void 0 : l.cursor;
|
199
|
+
}), T = L(), S = D(() => {
|
200
|
+
var l;
|
201
|
+
return (l = v.options) == null ? void 0 : l.tableOptions;
|
202
|
+
}), W = D(() => {
|
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 = D(() => {
|
209
|
+
var l;
|
210
|
+
return (l = v.options) == null ? void 0 : l.filterOptions;
|
211
|
+
}), p = D(() => {
|
212
|
+
var l;
|
213
|
+
return (l = v.options) == null ? void 0 : l.hidePerPageDropdown;
|
214
|
+
}), m = D(() => {
|
215
|
+
var l;
|
216
|
+
return ((l = c.value) == null ? void 0 : l.last_page) === 1;
|
217
|
+
}), h = L(!1), V = L(v.filter[(ie = (re = a.value) == null ? void 0 : re.tabs) == null ? void 0 : ie.key]), B = L(v.filter.page), P = L(
|
218
|
+
(de = (ne = a.value) == null ? void 0 : ne.per_page) != null && de.key ? v.filter[(ce = (ve = a.value) == null ? void 0 : ve.per_page) == null ? void 0 : ce.key] : v.filter.per_page
|
219
|
+
), X = ((me = v.filter[(pe = (fe = a.value) == null ? void 0 : fe.search) == null ? void 0 : pe.key]) == null ? void 0 : me.trim()) ?? "", q = L(X ? X.split(",") : []), oe = L(!1), je = D(
|
220
|
+
() => {
|
221
|
+
var l, e;
|
222
|
+
return (e = (l = v.options) == null ? void 0 : l.perPageOptions) == null ? void 0 : e.map(
|
223
|
+
(o) => ({
|
224
|
+
label: `${o}`,
|
225
|
+
value: o
|
226
|
+
})
|
227
|
+
);
|
228
|
+
}
|
229
|
+
), Ae = D(() => {
|
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 (c.value) {
|
265
|
+
const o = c.value.total < 100 ? c.value.total : 100;
|
266
|
+
o > 10 && (e = e.filter((u) => u.value <= o));
|
267
|
+
}
|
268
|
+
return [...new Set(e)];
|
269
|
+
}), De = D(() => {
|
270
|
+
var l;
|
271
|
+
return ((l = v.selected) == null ? void 0 : l.length) > 0;
|
272
|
+
}), Le = (l) => {
|
273
|
+
!l.trim() || q.value.includes(l) || (q.value = [l], O(), F("search-query-changed", l));
|
274
|
+
}, Pe = (l) => {
|
275
|
+
q.value = q.value.filter((e) => e !== l), O();
|
276
|
+
}, Q = v.filter;
|
277
|
+
!Q && c ? Q.page = 1 : !Q && f && (Q.cursor = "");
|
278
|
+
const t = L(Q), Ce = () => {
|
279
|
+
var e, o, u, d, n, s, g, b;
|
280
|
+
q.value = [], V.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[(d = (u = a.value) == null ? void 0 : u.per_page) == null ? void 0 : d.key] = P.value : l.per_page = P.value, (s = (n = a.value) == null ? void 0 : n.tabs) != null && s.key ? l[(b = (g = a.value) == null ? void 0 : g.tabs) == null ? void 0 : b.key] = V.value : l.tabs = V.value, t.value = l, O();
|
283
|
+
}, Ke = () => {
|
284
|
+
O(null, B.value);
|
285
|
+
}, Ye = () => {
|
286
|
+
v.id && $e(v.id, JSON.stringify(t.value));
|
287
|
+
}, Ue = () => v.id ? se(v.id) : null, O = (l = null, e = !1, o = "") => {
|
288
|
+
var u, d, n;
|
289
|
+
c.value && !e && (B.value = 1), c.value ? t.value.page = B.value : t.value.cursor = o, (u = a.value) != null && u.per_page ? t.value[a.value.per_page.key] = P.value : t.value.per_page = P.value, (d = a.value) != null && d.tabs && (t.value[a.value.tabs.key] = V.value), (n = a.value) != null && n.search && (t.value[a.value.search.key] = q.value.join()), l && (h.value = !1, t.value = { ...t.value, ...l }, Object.keys(t.value).forEach((s) => {
|
290
|
+
Array.isArray(t.value[s]) && t.value[s].length === 0 && delete t.value[s];
|
291
|
+
})), Ye(), F("update:filter", t.value);
|
292
|
+
}, Be = (l, e) => {
|
293
|
+
(e === a.value.tabs.key || e === "tabs") && (V.value = ""), O(l), F("filter-removed", e);
|
294
|
+
}, Ie = (l) => {
|
295
|
+
let e = [];
|
296
|
+
return l.forEach((o) => {
|
297
|
+
e.push(o.key);
|
298
|
+
}), e;
|
299
|
+
}, Me = D(() => {
|
300
|
+
if (t.value) {
|
301
|
+
let l = [];
|
302
|
+
return Object.keys(t.value).forEach((e) => {
|
303
|
+
var n, s, g, b, C, j, R, z, _, H, G;
|
304
|
+
let o = (s = (n = a.value) == null ? void 0 : n.tabs) == null ? void 0 : s.key;
|
305
|
+
const u = (b = (g = a.value) == null ? void 0 : g.search) == null ? void 0 : b.key, d = ((j = (C = a.value) == null ? void 0 : C.per_page) == null ? void 0 : j.key) ?? "per_page";
|
306
|
+
if ((R = a.value.form) == null || R.find((k) => {
|
307
|
+
k.name === o && (o = "");
|
308
|
+
}), e !== "page" && e !== "cursor" && e !== d && e !== o && e !== u) {
|
309
|
+
let k = null, r = (z = a.value.form) == null ? void 0 : z.find((I) => {
|
310
|
+
if (typeof I.name == "object") {
|
311
|
+
let K = !1;
|
312
|
+
return I.name.forEach((N) => {
|
313
|
+
N.key === e && (K = !0, k = Ie(I.name));
|
314
|
+
}), K;
|
315
|
+
} else
|
316
|
+
return I.name === e;
|
317
|
+
}), A = "";
|
318
|
+
if (r && t.value[e]) {
|
319
|
+
if (typeof r.name == "object" ? (_ = r.name) == null || _.forEach((K) => {
|
320
|
+
A && (A += " - "), A += t.value[K.key];
|
321
|
+
}) : A = t.value[e], r.props.options && (A = (r.props.multiple ? t.value[e] : [t.value[e]]).map(
|
322
|
+
(N) => {
|
323
|
+
var ye;
|
324
|
+
return (ye = r.props.options.find(({ value: qe }) => qe === N)) == null ? void 0 : ye.label;
|
325
|
+
}
|
326
|
+
).join(", ")), r.type === "RangeInput" && Array.isArray(t.value[e]) && (A = t.value[e][0].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + " - " + t.value[e][1].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")), r.type === "DatePicker")
|
327
|
+
if (((H = r == null ? void 0 : r.props) == null ? void 0 : H.type) === "range" && r.name && r.name[1]) {
|
328
|
+
const K = le(t.value[r.name[0].key]).format("MM/DD/YYYY"), N = le(t.value[r.name[1].key]).format("MM/DD/YYYY");
|
329
|
+
A = K === N ? K : K + " - " + N;
|
330
|
+
} else A = le(t.value[r.name]).format("MM/DD/YYYY");
|
331
|
+
let I = `${(G = r == null ? void 0 : r.props) == null ? void 0 : G.label} : ${A}`;
|
332
|
+
r && r.name && typeof r.name == "object" && l.find((N) => N.name === k[0]) && (I = ""), l.push({
|
333
|
+
label: I,
|
334
|
+
name: e,
|
335
|
+
multiNames: k
|
336
|
+
});
|
337
|
+
}
|
338
|
+
}
|
339
|
+
}), l;
|
340
|
+
}
|
341
|
+
return [];
|
342
|
+
}), ue = (l) => {
|
343
|
+
var e, o, u, d, n, s;
|
344
|
+
return ((s = (n = (d = (u = t.value) == null ? void 0 : u[(o = (e = a.value) == null ? void 0 : e.columnEdit) == null ? void 0 : o.key]) == null ? void 0 : d.active) == null ? void 0 : n.find((g) => g.key === l)) == null ? void 0 : s.isActive) ?? !0;
|
345
|
+
}, Ne = ({ fixedHeaders: l, activeHeaders: e, isOnMount: o }) => {
|
346
|
+
var u, d, n, s, g, b, C, j;
|
347
|
+
if (t.value[(d = (u = a.value) == null ? void 0 : u.columnEdit) == null ? void 0 : d.key] || (t.value[(s = (n = a.value) == null ? void 0 : n.columnEdit) == null ? void 0 : s.key] = {}), t.value[(b = (g = a.value) == null ? void 0 : g.columnEdit) == null ? void 0 : b.key].fixed = l, t.value[(j = (C = a.value) == null ? void 0 : C.columnEdit) == null ? void 0 : j.key].active = e, T.value = [...l, ...e], !o) {
|
348
|
+
const R = Ze(l, e);
|
349
|
+
$e(a.value.columnEdit.localStorageKey, R);
|
350
|
+
}
|
351
|
+
}, Te = () => {
|
352
|
+
var l, e, o, u, d, n;
|
353
|
+
if ((e = (l = a.value) == null ? void 0 : l.columnEdit) != null && e.localStorageKey) {
|
354
|
+
const s = se(a.value.columnEdit.localStorageKey);
|
355
|
+
if (s) {
|
356
|
+
const { fixed: g, active: b } = Oe(
|
357
|
+
s,
|
358
|
+
S.value.headers,
|
359
|
+
a.value.columnEdit.localStorageKey
|
360
|
+
);
|
361
|
+
t.value[(u = (o = a.value) == null ? void 0 : o.columnEdit) == null ? void 0 : u.key].fixed = g, t.value[(n = (d = a.value) == null ? void 0 : d.columnEdit) == null ? void 0 : n.key].active = b, T.value = [...g, ...b];
|
362
|
+
}
|
363
|
+
}
|
364
|
+
};
|
365
|
+
return Ve(() => {
|
366
|
+
var e, o, u, d, n;
|
367
|
+
Te();
|
368
|
+
const l = Ue();
|
369
|
+
l && (t.value = JSON.parse(l), V.value = V.value || ((e = t.value) == null ? void 0 : e.tabs) || ((d = t.value) == null ? void 0 : d[(u = (o = a.value) == null ? void 0 : o.tabs) == null ? void 0 : u.key]), B.value = ((n = t.value) == null ? void 0 : n.page) || 1, O(null, !0, t.value.cursor));
|
370
|
+
}), (l, e) => {
|
371
|
+
var o, u, d, n;
|
372
|
+
return i(), w("div", rl, [
|
373
|
+
S.value ? (i(), U(y(Je), {
|
374
|
+
key: 0,
|
375
|
+
selected: E.selected,
|
376
|
+
"row-key": E.rowKey,
|
377
|
+
options: W.value,
|
378
|
+
"is-loading": E.isLoading,
|
379
|
+
"loading-rows": P.value,
|
380
|
+
"row-class": E.rowClass,
|
381
|
+
"row-link": E.rowLink,
|
382
|
+
"is-sticky": S.value.isSticky,
|
383
|
+
"is-borderless": S.value.isBorderless,
|
384
|
+
"onUpdate:selected": e[7] || (e[7] = (s) => l.$emit("update:selected", s)),
|
385
|
+
"onClick:row": e[8] || (e[8] = (s) => l.$emit("click:row", s)),
|
386
|
+
"onHover:cell": e[9] || (e[9] = (s) => l.$emit("hover:cell", s))
|
387
|
+
}, Qe({
|
388
|
+
after: $(() => [
|
389
|
+
Y(l.$slots, "after")
|
390
|
+
]),
|
391
|
+
empty: $(() => [
|
392
|
+
Y(l.$slots, "empty")
|
393
|
+
]),
|
394
|
+
"table-header": $((s) => [
|
395
|
+
Y(l.$slots, "table-header", ke(xe(s)))
|
396
|
+
]),
|
397
|
+
"table-body": $((s) => [
|
398
|
+
Y(l.$slots, "table-body", ke(xe(s)))
|
399
|
+
]),
|
400
|
+
_: 2
|
401
|
+
}, [
|
402
|
+
l.$slots.before || (o = a.value) != null && o.search || (u = a.value) != null && u.form || (d = a.value) != null && d.tabs ? {
|
403
|
+
name: "before",
|
404
|
+
fn: $(() => {
|
405
|
+
var s, g, b, C;
|
406
|
+
return [
|
407
|
+
Y(l.$slots, "before"),
|
408
|
+
(s = a.value) != null && s.search || (g = a.value) != null && g.form || (b = a.value) != null && b.tabs ? (i(), w("div", il, [
|
409
|
+
De.value ? (i(), w("div", nl, [
|
410
|
+
Y(l.$slots, "bulk-actions", { selectedRows: E.selected })
|
411
|
+
])) : (i(), w("div", dl, [
|
412
|
+
(C = a.value) != null && C.tabs ? (i(), U(y(ze), {
|
413
|
+
key: 0,
|
414
|
+
modelValue: V.value,
|
415
|
+
"onUpdate:modelValue": [
|
416
|
+
e[0] || (e[0] = (j) => V.value = j),
|
417
|
+
e[1] || (e[1] = (j) => O(null))
|
418
|
+
],
|
419
|
+
"is-disabled": E.isLoading,
|
420
|
+
tabs: a.value.tabs.options,
|
421
|
+
variant: "pills"
|
422
|
+
}, null, 8, ["modelValue", "is-disabled", "tabs"])) : x("", !0)
|
423
|
+
])),
|
424
|
+
Y(l.$slots, "filter-options", {}, () => {
|
425
|
+
var j, R, z, _, H, G;
|
426
|
+
return [
|
427
|
+
(j = a.value) != null && j.search || (R = a.value) != null && R.form || (z = a.value) != null && z.columnEdit ? (i(), w("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
|
+
(_ = a.value) != null && _.search ? (i(), U(y(_e), {
|
435
|
+
key: 0,
|
436
|
+
"is-search-only": !a.value.tabs || a.value.isSearchOnly,
|
437
|
+
onAddQuery: Le,
|
438
|
+
onToggle: e[2] || (e[2] = (k) => oe.value = k)
|
439
|
+
}, null, 8, ["is-search-only"])) : x("", !0),
|
440
|
+
(H = a.value) != null && H.form ? (i(), U(y(Ee), {
|
441
|
+
key: 1,
|
442
|
+
modelValue: h.value,
|
443
|
+
"onUpdate:modelValue": e[6] || (e[6] = (k) => h.value = k),
|
444
|
+
distance: 9,
|
445
|
+
placement: "bottom-end",
|
446
|
+
"is-attach-to-body": ""
|
447
|
+
}, {
|
448
|
+
menu: $(() => [
|
449
|
+
h.value ? (i(), U(y(He), {
|
450
|
+
key: 0,
|
451
|
+
id: E.id,
|
452
|
+
"json-form": a.value.form ?? [],
|
453
|
+
grid: a.value.grid ?? null,
|
454
|
+
values: v.filter,
|
455
|
+
actions: a.value.actions,
|
456
|
+
onApplyFilter: e[3] || (e[3] = (k) => O(k)),
|
457
|
+
onFilterFieldsChanged: e[4] || (e[4] = (k) => F("filter-fields-changed", k)),
|
458
|
+
onCancel: e[5] || (e[5] = (k) => h.value = !1)
|
459
|
+
}, {
|
460
|
+
default: $(({ errors: k, values: r, jsonForm: A, updateForm: I }) => [
|
461
|
+
Y(l.$slots, "custom-filter-form", {
|
462
|
+
errors: k,
|
463
|
+
values: r,
|
464
|
+
jsonForm: A,
|
465
|
+
updateFilter: I
|
466
|
+
})
|
467
|
+
]),
|
468
|
+
_: 3
|
469
|
+
}, 8, ["id", "json-form", "grid", "values", "actions"])) : x("", !0)
|
470
|
+
]),
|
471
|
+
default: $(() => [
|
472
|
+
M(y(Fe), {
|
473
|
+
"is-active": h.value,
|
474
|
+
variant: "secondary",
|
475
|
+
"left-icon": "filter"
|
476
|
+
}, null, 8, ["is-active"])
|
477
|
+
]),
|
478
|
+
_: 3
|
479
|
+
}, 8, ["modelValue"])) : x("", !0),
|
480
|
+
a.value.columnEdit ? (i(), U(ul, {
|
481
|
+
key: 2,
|
482
|
+
options: t.value.columnEdit,
|
483
|
+
headers: ((G = S.value) == null ? void 0 : G.headers) || [],
|
484
|
+
"local-key": a.value.columnEdit.localStorageKey,
|
485
|
+
onUpdateOrder: Ne
|
486
|
+
}, null, 8, ["options", "headers", "local-key"])) : x("", !0)
|
487
|
+
], 2)) : x("", !0)
|
488
|
+
];
|
489
|
+
})
|
490
|
+
])) : x("", !0),
|
491
|
+
M(y(Ge), {
|
492
|
+
filters: Me.value,
|
493
|
+
queries: q.value,
|
494
|
+
class: "border-t border-oc-gray-200",
|
495
|
+
onRemoveQuery: Pe,
|
496
|
+
onRemoveAll: Ce,
|
497
|
+
onRemoveFilter: Be
|
498
|
+
}, null, 8, ["filters", "queries"])
|
499
|
+
];
|
500
|
+
}),
|
501
|
+
key: "0"
|
502
|
+
} : void 0,
|
503
|
+
ae((n = S.value) == null ? void 0 : n.headers, (s, g) => ({
|
504
|
+
name: s.key,
|
505
|
+
fn: $(({ data: b, item: C }) => [
|
506
|
+
Y(l.$slots, s.key, {
|
507
|
+
data: b,
|
508
|
+
item: C
|
509
|
+
})
|
510
|
+
])
|
511
|
+
}))
|
512
|
+
]), 1032, ["selected", "row-key", "options", "is-loading", "loading-rows", "row-class", "row-link", "is-sticky", "is-borderless"])) : x("", !0),
|
513
|
+
Y(l.$slots, "before-pagination"),
|
514
|
+
c.value || f.value ? (i(), w("div", {
|
515
|
+
key: 1,
|
516
|
+
class: te(["flex gap-3 items-center", c.value && c.value.last_page === 1 ? "justify-end" : ""])
|
517
|
+
}, [
|
518
|
+
c.value && !m.value ? (i(), U(y(We), {
|
519
|
+
key: 0,
|
520
|
+
modelValue: B.value,
|
521
|
+
"onUpdate:modelValue": [
|
522
|
+
e[10] || (e[10] = (s) => B.value = s),
|
523
|
+
Ke
|
524
|
+
],
|
525
|
+
class: "justify-center",
|
526
|
+
"max-page": c.value.last_page,
|
527
|
+
strategy: c.value.strategy,
|
528
|
+
"total-visible": "5"
|
529
|
+
}, null, 8, ["modelValue", "max-page", "strategy"])) : x("", !0),
|
530
|
+
f.value ? (i(), w("div", vl, [
|
531
|
+
M(y(he), {
|
532
|
+
disabled: !f.value.prev,
|
533
|
+
onClick: e[11] || (e[11] = (s) => f.value.prev ? O(null, !1, f.value.prev) : null)
|
534
|
+
}, null, 8, ["disabled"]),
|
535
|
+
M(y(he), {
|
536
|
+
disabled: !f.value.next,
|
537
|
+
"is-next": "",
|
538
|
+
onClick: e[12] || (e[12] = (s) => f.value.next ? O(null, !1, f.value.next) : null)
|
539
|
+
}, null, 8, ["disabled"])
|
540
|
+
])) : x("", !0),
|
541
|
+
p.value ? x("", !0) : (i(), w("div", cl, [
|
542
|
+
M(y(Xe), {
|
543
|
+
modelValue: P.value,
|
544
|
+
"onUpdate:modelValue": [
|
545
|
+
e[13] || (e[13] = (s) => P.value = s),
|
546
|
+
e[14] || (e[14] = (s) => O(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)) : x("", !0)
|
555
|
+
]);
|
556
|
+
};
|
557
|
+
}
|
558
|
+
};
|
559
|
+
export {
|
560
|
+
kl as default
|
561
|
+
};
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { ref as p, openBlock as c, createBlock as y, unref as t, withCtx as n, createElementBlock as m, Fragment as
|
2
|
-
import {
|
1
|
+
import { ref as p, openBlock as c, createBlock as y, unref as t, withCtx as n, createElementBlock as m, Fragment as C, renderList as K, normalizeClass as s, createElementVNode as o, createCommentVNode as b, renderSlot as u, toDisplayString as k, createVNode as f } from "vue";
|
2
|
+
import { aG as $, aC as M, ax as S } from "./index-Cp_g4d58.js";
|
3
3
|
import { _ as h } from "./OcIcon-CJgBICxh.js";
|
4
|
-
const
|
4
|
+
const B = ["onMouseleave", "onMouseover", "onClick"], L = { class: "flex justify-evenly w-full" }, N = { class: "flex w-full" }, U = { class: "ml-4 flex w-full" }, E = { class: "flex items-center flex-wrap w-full" }, O = ["href"], W = { class: "min-w-[120px]" }, j = { class: "truncate w-[200px]" }, z = { class: "flex items-center ml-4" }, A = { class: "flex w-full" }, T = {
|
5
5
|
__name: "OcDraggableList",
|
6
6
|
props: {
|
7
7
|
modelValue: Array,
|
@@ -42,7 +42,7 @@ const S = ["onMouseleave", "onMouseover", "onClick"], L = { class: "flex justify
|
|
42
42
|
onDetectMove: d[1] || (d[1] = (r) => l.$emit("detectMove", r))
|
43
43
|
}, {
|
44
44
|
default: n(({ list: r }) => [
|
45
|
-
(c(!0), m(
|
45
|
+
(c(!0), m(C, null, K(r, (e, x) => (c(), m("div", {
|
46
46
|
key: e.id,
|
47
47
|
class: s([
|
48
48
|
"group text-oc-text-500 p-4 flex flex-col w-full rounded border border-gray-200 cursor-pointer",
|
@@ -88,7 +88,7 @@ const S = ["onMouseleave", "onMouseover", "onClick"], L = { class: "flex justify
|
|
88
88
|
rel: "noopener noreferrer",
|
89
89
|
class: "w-full flex items-center text-oc-text-300 mt-2"
|
90
90
|
}, [
|
91
|
-
f(t(
|
91
|
+
f(t(M), {
|
92
92
|
distance: "2",
|
93
93
|
position: "bottom-start",
|
94
94
|
"popper-class": "bg-oc-bg-light text-oc-text-500 p-4 rounded"
|
@@ -114,7 +114,7 @@ const S = ["onMouseleave", "onMouseover", "onClick"], L = { class: "flex justify
|
|
114
114
|
o("div", z, [
|
115
115
|
u(l.$slots, "before-action", { item: e }),
|
116
116
|
u(l.$slots, "action", { item: e }, () => [
|
117
|
-
f(t(
|
117
|
+
f(t(S), {
|
118
118
|
modelValue: v.value[e.id],
|
119
119
|
"onUpdate:modelValue": (g) => v.value[e.id] = g,
|
120
120
|
placement: "bottom-end",
|
@@ -147,12 +147,12 @@ const S = ["onMouseleave", "onMouseover", "onClick"], L = { class: "flex justify
|
|
147
147
|
index: x
|
148
148
|
})
|
149
149
|
])
|
150
|
-
], 42,
|
150
|
+
], 42, B))), 128))
|
151
151
|
]),
|
152
152
|
_: 3
|
153
153
|
}, 8, ["model-value"]));
|
154
154
|
}
|
155
155
|
};
|
156
156
|
export {
|
157
|
-
|
157
|
+
T as default
|
158
158
|
};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ref as m, computed as p, openBlock as s, createElementBlock as l, createVNode as f, unref as c, withCtx as v, createElementVNode as n, Fragment as T, renderList as V, normalizeClass as k, createTextVNode as C, createBlock as N, createCommentVNode as z } from "vue";
|
2
|
-
import {
|
2
|
+
import { ax as U, e as J, B as b } from "./index-Cp_g4d58.js";
|
3
3
|
import { EMOJI_LIST as a, EMOJI_CATEGORIES as P } from "./Form/EmojiPicker/conts/emoji.js";
|
4
4
|
import { _ as A } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
5
5
|
const F = { class: "flex items-center justify-center rounded bg-oc-bg-dark h-[140px] relative w-full z-50" }, G = ["innerHTML"], R = { class: "p-4 w-[340px]" }, q = { class: "bg-oc-bg-dark p-4 rounded flex items-center justify-center" }, K = ["innerHTML"], Q = { class: "pt-3 pb-4" }, W = ["id", "innerHTML", "onClick"], X = {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ref as r, computed as c, onMounted as B, openBlock as O, createElementBlock as k, renderSlot as w, createElementVNode as f, createVNode as u, unref as i } from "vue";
|
2
|
-
import { w as $, B as m } from "./index-
|
2
|
+
import { w as $, B as m } from "./index-Cp_g4d58.js";
|
3
3
|
const C = { class: "flex w-[326px] flex-col gap-y-5" }, A = { class: "max-h-[500px] overflow-y-auto p-5" }, E = { class: "flex gap-x-5 px-5 pb-5" }, N = {
|
4
4
|
__name: "OcFilterForm",
|
5
5
|
props: {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ref as o, openBlock as t, createElementBlock as s, Fragment as g, createElementVNode as c, normalizeClass as m, createVNode as x, unref as i, withKeys as S, createBlock as d, createCommentVNode as v, nextTick as w } from "vue";
|
2
|
-
import { e as O, B as f } from "./index-
|
2
|
+
import { e as O, B as f } from "./index-Cp_g4d58.js";
|
3
3
|
const B = { class: "flex gap-x-4" }, $ = {
|
4
4
|
__name: "OcFilterSearch",
|
5
5
|
props: {
|