@orchidui/core 1.63.0 → 1.65.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/NewTable/OcNewTable.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/OnboardingProduct/OnboardingProductOption.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/Checklist/OcChecklist.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/Sidebar/OcSidebar.js +2 -2
- package/dist/Elements/SubSidebar/OcSubSidebar.js +1 -1
- package/dist/Elements/TopBanner/OcTopBanner.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/Slider/OcSlider.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-BSeavW1Y.js → OcAccountSetupProgress-DWWGuZuO.js} +1 -1
- package/dist/{OcComplexCalendar-DsDd64MS.js → OcComplexCalendar-kuJM_Qzh.js} +1 -1
- package/dist/{OcComplexDatePicker-C4Ku1QwV.js → OcComplexDatePicker-DCu1SsgM.js} +1 -1
- package/dist/{OcCropper-CvZWujRH.js → OcCropper-CUm08wvo.js} +1 -1
- package/dist/OcDataTable-BNlXIHHM.js +556 -0
- package/dist/{OcDraggableList-BEinhnW1.js → OcDraggableList-C7fRtRxi.js} +1 -1
- package/dist/{OcEmojiPicker-CchlRoLg.js → OcEmojiPicker-C-FSiY58.js} +1 -1
- package/dist/{OcFilterForm-CPdwFKoU.js → OcFilterForm-BMTRKICt.js} +1 -1
- package/dist/{OcFilterSearch-B_xAUOO3.js → OcFilterSearch-6kheRz7-.js} +1 -1
- package/dist/{OcFilterSearchFor-p3R6qXmQ.js → OcFilterSearchFor-8ZvMEC_J.js} +1 -1
- package/dist/{OcModalCropper-DdSguEzu.js → OcModalCropper-B7Qd1ARH.js} +2 -2
- package/dist/{OcTimePicker-BH2L7AzX.js → OcTimePicker-DWNgSBdZ.js} +1 -1
- package/dist/Overlay/ConfirmationModal/OcConfirmationModal.js +1 -1
- package/dist/Overlay/CopyTooltip/OcCopyTooltip.js +1 -1
- 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-CiXWze4H.js → SubPlanCard-jxI_DM8E.js} +1 -1
- package/dist/{ThumbnailSection-8fygZFQ0.js → ThumbnailSection-BUErS00O.js} +1 -1
- package/dist/{ThumbnailTheme-BIo5CeFw.js → ThumbnailTheme-DT6JShOI.js} +1 -1
- package/dist/{index-J0YUj-PI.js → index-BM9QWetK.js} +2005 -1986
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/OcDataTable-dfcz_V8y.js +0 -547
|
@@ -0,0 +1,556 @@
|
|
|
1
|
+
import { ref as C, onMounted as Se, createBlock as T, openBlock as o, unref as i, withCtx as p, createVNode as I, createElementVNode as q, createElementBlock as x, createCommentVNode as f, mergeProps as ye, Fragment as ae, renderList as ee, normalizeClass as te, toDisplayString as ge, computed as L, watch as ke, toRaw as Me, nextTick as Ge, renderSlot as E, resolveDynamicComponent as We, createSlots as Xe, normalizeProps as be, guardReactiveProps as he } from "vue";
|
|
2
|
+
import { aC as Oe, B as Ve, C as Ye, D as Ze, L as He, a0 as _e, aN as el, aO as ll, aP as al, I as tl, J as we, j as sl } from "./index-BM9QWetK.js";
|
|
3
|
+
import { V as xe } from "./vue-draggable-next.esm-bundler-QQ8zx__3.js";
|
|
4
|
+
import { getFromLocalStorage as Fe, formatHeadersFromLocalStorage as Ee, formatHeadersToLocalStorage as ol, setInLocalStorage as ul } from "./DataTable/utils/editColumnsUtils.js";
|
|
5
|
+
import { _ as $e } from "./OcIcon-BedshzZm.js";
|
|
6
|
+
import { formatFilterDisplay as il, clearAllFilters as rl } from "./DataTable/utils/filterUtils.js";
|
|
7
|
+
import { formatCustomItemsPerPageOptions as nl, getItemsPerPageOptions as dl } from "./DataTable/utils/paginationUtils.js";
|
|
8
|
+
import "./dayjs.min-7xVZzECu.js";
|
|
9
|
+
const vl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, cl = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "gap-y-2 flex flex-col border-b pb-3 border-oc-gray-200"
|
|
12
|
+
}, ml = { class: "gap-y-2 flex flex-col" }, pl = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "flex items-center bg-white justify-between h-[26px]"
|
|
15
|
+
}, fl = { class: "flex items-center w-full gap-x-3" }, yl = { class: "truncate w-full max-w-[160px]" }, gl = {
|
|
16
|
+
__name: "ColumnEdit",
|
|
17
|
+
props: {
|
|
18
|
+
options: {
|
|
19
|
+
type: Object,
|
|
20
|
+
default: () => ({})
|
|
21
|
+
},
|
|
22
|
+
headers: {
|
|
23
|
+
type: Array,
|
|
24
|
+
default: () => []
|
|
25
|
+
},
|
|
26
|
+
localKey: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: ""
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
emits: ["change-active", "onMoved", "update-order"],
|
|
32
|
+
setup($, { emit: le }) {
|
|
33
|
+
const j = le, g = $, c = C([]), S = C([]), O = C(!1), y = {
|
|
34
|
+
handle: ".drag-el",
|
|
35
|
+
filter: ".is-disabled",
|
|
36
|
+
group: "headers",
|
|
37
|
+
animation: 500,
|
|
38
|
+
forceFallback: !1,
|
|
39
|
+
move: (l) => l.to.dataset.activeHeaders ? !0 : !!l.draggedContext.futureIndex,
|
|
40
|
+
"onUpdate:modelValue": () => J()
|
|
41
|
+
}, J = (l = !1) => {
|
|
42
|
+
S.value = S.value.map((r) => ({
|
|
43
|
+
...r,
|
|
44
|
+
isActive: !0
|
|
45
|
+
})), j("update-order", {
|
|
46
|
+
fixedHeaders: S.value,
|
|
47
|
+
activeHeaders: c.value,
|
|
48
|
+
isOnMount: l
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
return Se(() => {
|
|
52
|
+
const l = Fe(g.localKey), { fixed: r, active: n } = Ee(l, g.headers, g.localKey);
|
|
53
|
+
S.value = r || g.headers.slice(0, 1), c.value = n || g.headers.slice(1).map((k) => {
|
|
54
|
+
var t, U, A;
|
|
55
|
+
return {
|
|
56
|
+
...k,
|
|
57
|
+
isActive: ((A = (U = (t = g.options) == null ? void 0 : t.active) == null ? void 0 : U.find((Q) => Q.key === k.key)) == null ? void 0 : A.isActive) ?? !0
|
|
58
|
+
};
|
|
59
|
+
}), J(!0);
|
|
60
|
+
}), (l, r) => (o(), T(i(Oe), {
|
|
61
|
+
modelValue: O.value,
|
|
62
|
+
"onUpdate:modelValue": r[3] || (r[3] = (n) => O.value = n),
|
|
63
|
+
"is-attach-to-body": ""
|
|
64
|
+
}, {
|
|
65
|
+
menu: p(() => [
|
|
66
|
+
q("div", vl, [
|
|
67
|
+
S.value.length ? (o(), x("div", cl, [
|
|
68
|
+
r[4] || (r[4] = q("span", { class: "text-oc-text-400 font-medium" }, "Fixed columns", -1)),
|
|
69
|
+
I(i(xe), ye({
|
|
70
|
+
key: "key",
|
|
71
|
+
modelValue: S.value,
|
|
72
|
+
"onUpdate:modelValue": r[0] || (r[0] = (n) => S.value = n)
|
|
73
|
+
}, y), {
|
|
74
|
+
default: p(() => [
|
|
75
|
+
(o(!0), x(ae, null, ee(S.value, (n, k) => (o(), x("div", {
|
|
76
|
+
key: n.key,
|
|
77
|
+
class: te(["flex items-center justify-between h-[26px]", k ? "" : "is-disabled"])
|
|
78
|
+
}, [
|
|
79
|
+
q("span", null, ge(n.label), 1),
|
|
80
|
+
k ? (o(), T(i($e), {
|
|
81
|
+
key: 0,
|
|
82
|
+
width: "18",
|
|
83
|
+
height: "18",
|
|
84
|
+
class: "text-oc-text-400 drag-el cursor-move",
|
|
85
|
+
name: "draggable"
|
|
86
|
+
})) : f("", !0)
|
|
87
|
+
], 2))), 128))
|
|
88
|
+
]),
|
|
89
|
+
_: 1
|
|
90
|
+
}, 16, ["modelValue"])
|
|
91
|
+
])) : f("", !0),
|
|
92
|
+
q("div", ml, [
|
|
93
|
+
r[5] || (r[5] = q("span", { class: "text-oc-text-400 font-medium" }, "Active columns", -1)),
|
|
94
|
+
I(i(xe), ye({
|
|
95
|
+
key: "key",
|
|
96
|
+
modelValue: c.value,
|
|
97
|
+
"onUpdate:modelValue": r[2] || (r[2] = (n) => c.value = n)
|
|
98
|
+
}, y, { "data-active-headers": "true" }), {
|
|
99
|
+
default: p(() => [
|
|
100
|
+
(o(!0), x(ae, null, ee(c.value, (n) => (o(), x(ae, {
|
|
101
|
+
key: n.key
|
|
102
|
+
}, [
|
|
103
|
+
n.key !== "actions" ? (o(), x("div", pl, [
|
|
104
|
+
q("div", fl, [
|
|
105
|
+
I(i(Ye), {
|
|
106
|
+
modelValue: n.isActive,
|
|
107
|
+
"onUpdate:modelValue": [
|
|
108
|
+
(k) => n.isActive = k,
|
|
109
|
+
r[1] || (r[1] = (k) => J())
|
|
110
|
+
],
|
|
111
|
+
class: "!w-fit"
|
|
112
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
113
|
+
q("div", yl, ge(n.label), 1)
|
|
114
|
+
]),
|
|
115
|
+
c.value.length > 1 ? (o(), T(i($e), {
|
|
116
|
+
key: 0,
|
|
117
|
+
width: "18",
|
|
118
|
+
height: "18",
|
|
119
|
+
class: "text-oc-text-400 drag-el cursor-move",
|
|
120
|
+
name: "draggable"
|
|
121
|
+
})) : f("", !0)
|
|
122
|
+
])) : f("", !0)
|
|
123
|
+
], 64))), 128))
|
|
124
|
+
]),
|
|
125
|
+
_: 1
|
|
126
|
+
}, 16, ["modelValue"])
|
|
127
|
+
])
|
|
128
|
+
])
|
|
129
|
+
]),
|
|
130
|
+
default: p(() => [
|
|
131
|
+
I(i(Ve), {
|
|
132
|
+
label: "Edit Column",
|
|
133
|
+
"left-icon": "setting",
|
|
134
|
+
size: "small",
|
|
135
|
+
class: "whitespace-nowrap",
|
|
136
|
+
variant: "secondary"
|
|
137
|
+
})
|
|
138
|
+
]),
|
|
139
|
+
_: 1
|
|
140
|
+
}, 8, ["modelValue"]));
|
|
141
|
+
}
|
|
142
|
+
}, kl = { class: "relative flex flex-col gap-9" }, bl = {
|
|
143
|
+
key: 0,
|
|
144
|
+
class: "flex items-center px-4 min-h-[44px]"
|
|
145
|
+
}, hl = {
|
|
146
|
+
key: 0,
|
|
147
|
+
class: "absolute flex items-center gap-5 left-5"
|
|
148
|
+
}, wl = {
|
|
149
|
+
key: 1,
|
|
150
|
+
class: "absolute flex gap-3 left-5"
|
|
151
|
+
}, xl = {
|
|
152
|
+
key: 1,
|
|
153
|
+
class: "flex justify-center w-full gap-5 md:justify-start"
|
|
154
|
+
}, $l = {
|
|
155
|
+
key: 2,
|
|
156
|
+
class: "items-center hidden md:flex"
|
|
157
|
+
}, Al = {
|
|
158
|
+
__name: "OcDataTable",
|
|
159
|
+
props: {
|
|
160
|
+
isLoading: Boolean,
|
|
161
|
+
id: {
|
|
162
|
+
type: String,
|
|
163
|
+
required: !0
|
|
164
|
+
},
|
|
165
|
+
options: {
|
|
166
|
+
type: Object,
|
|
167
|
+
required: !0
|
|
168
|
+
},
|
|
169
|
+
filter: {
|
|
170
|
+
type: Object,
|
|
171
|
+
default: () => ({})
|
|
172
|
+
},
|
|
173
|
+
selected: {
|
|
174
|
+
type: Array,
|
|
175
|
+
required: !1
|
|
176
|
+
},
|
|
177
|
+
rowClass: String,
|
|
178
|
+
rowKey: {
|
|
179
|
+
type: [String, Function],
|
|
180
|
+
default: "id"
|
|
181
|
+
},
|
|
182
|
+
rowLink: String,
|
|
183
|
+
isNewTable: {
|
|
184
|
+
type: Boolean,
|
|
185
|
+
default: !1
|
|
186
|
+
},
|
|
187
|
+
selectedIndex: {
|
|
188
|
+
type: Number,
|
|
189
|
+
default: -1
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
emits: {
|
|
193
|
+
"update:selected": [],
|
|
194
|
+
"update:filter": [],
|
|
195
|
+
"apply-filter": [],
|
|
196
|
+
"click:row": [],
|
|
197
|
+
"filter-fields-changed": [],
|
|
198
|
+
"filter-removed": [],
|
|
199
|
+
"filter-open": [],
|
|
200
|
+
"search-query-changed": [],
|
|
201
|
+
"hover:cell": [],
|
|
202
|
+
"columns-changed": [],
|
|
203
|
+
"on-table-ready": []
|
|
204
|
+
},
|
|
205
|
+
setup($, { emit: le }) {
|
|
206
|
+
var ie, re, ne, de, ve, ce, me, pe, fe;
|
|
207
|
+
const j = $, g = le, c = L(() => {
|
|
208
|
+
var e;
|
|
209
|
+
return (e = j.options) == null ? void 0 : e.cursor;
|
|
210
|
+
}), S = C(), O = L(() => {
|
|
211
|
+
var e;
|
|
212
|
+
return (e = j.options) == null ? void 0 : e.tableOptions;
|
|
213
|
+
}), y = C({
|
|
214
|
+
total: 0,
|
|
215
|
+
last_page: 1
|
|
216
|
+
});
|
|
217
|
+
ke(
|
|
218
|
+
() => {
|
|
219
|
+
var e;
|
|
220
|
+
return (e = j.options) == null ? void 0 : e.pagination;
|
|
221
|
+
},
|
|
222
|
+
(e) => {
|
|
223
|
+
y.value = e;
|
|
224
|
+
},
|
|
225
|
+
{ deep: !0, immediate: !0 }
|
|
226
|
+
);
|
|
227
|
+
const J = L(() => {
|
|
228
|
+
var a;
|
|
229
|
+
return {
|
|
230
|
+
...O.value,
|
|
231
|
+
headers: S.value ? S.value.map((u) => {
|
|
232
|
+
var m, d;
|
|
233
|
+
return u.class = ((d = (m = O.value) == null ? void 0 : m.headers.find((v) => v.key === u.key)) == null ? void 0 : d.class) ?? "", u;
|
|
234
|
+
}).filter((u) => u.isActive) : (a = O.value) == null ? void 0 : a.headers.filter((u) => Le(u.key))
|
|
235
|
+
};
|
|
236
|
+
}), l = L(() => {
|
|
237
|
+
var e;
|
|
238
|
+
return (e = j.options) == null ? void 0 : e.filterOptions;
|
|
239
|
+
}), r = L(() => {
|
|
240
|
+
var e;
|
|
241
|
+
return (e = j.options) == null ? void 0 : e.hidePerPageDropdown;
|
|
242
|
+
}), n = L(() => {
|
|
243
|
+
var e;
|
|
244
|
+
return ((e = y.value) == null ? void 0 : e.last_page) === 1;
|
|
245
|
+
}), k = JSON.parse(JSON.stringify(Me(j.filter)));
|
|
246
|
+
!k && y.value ? k.page = 1 : !k && c && (k.cursor = "");
|
|
247
|
+
const t = C(k);
|
|
248
|
+
ke(
|
|
249
|
+
() => j.filter,
|
|
250
|
+
(e) => {
|
|
251
|
+
t.value = { ...e };
|
|
252
|
+
},
|
|
253
|
+
{ deep: !0 }
|
|
254
|
+
);
|
|
255
|
+
const U = C(!1), A = C(t.value[(re = (ie = l.value) == null ? void 0 : ie.tabs) == null ? void 0 : re.key]), Q = C(t.value.page), M = C(
|
|
256
|
+
(de = (ne = l.value) == null ? void 0 : ne.per_page) != null && de.key ? t.value[(ce = (ve = l.value) == null ? void 0 : ve.per_page) == null ? void 0 : ce.key] : t.value.per_page
|
|
257
|
+
), se = ((fe = t.value[t.value.selectedSearchOption || ((pe = (me = l.value) == null ? void 0 : me.search) == null ? void 0 : pe.key)]) == null ? void 0 : fe.trim()) ?? "", N = C(se ? se.split(",") : []), oe = C(!1), Ce = L(
|
|
258
|
+
() => {
|
|
259
|
+
var e;
|
|
260
|
+
return nl((e = j.options) == null ? void 0 : e.perPageOptions);
|
|
261
|
+
}
|
|
262
|
+
), Pe = L(() => dl(Ce.value, y.value)), je = L(() => {
|
|
263
|
+
var e;
|
|
264
|
+
return ((e = j.selected) == null ? void 0 : e.length) > 0;
|
|
265
|
+
}), Ae = (e) => {
|
|
266
|
+
!e.trim() || !t.value.selectedSearchOption && N.value.includes(e) || (N.value = [e], D(), g("search-query-changed", e));
|
|
267
|
+
}, De = (e) => {
|
|
268
|
+
N.value = N.value.filter((a) => a !== e), D();
|
|
269
|
+
}, Ke = L(() => il(t.value, l.value)), Le = (e) => {
|
|
270
|
+
var a, u, m, d, v, b;
|
|
271
|
+
return ((b = (v = (d = (m = t.value) == null ? void 0 : m[(u = (a = l.value) == null ? void 0 : a.columnEdit) == null ? void 0 : u.key]) == null ? void 0 : d.active) == null ? void 0 : v.find((V) => V.key === e)) == null ? void 0 : b.isActive) ?? !0;
|
|
272
|
+
}, Te = ({ fixedHeaders: e, activeHeaders: a, isOnMount: u }) => {
|
|
273
|
+
var m, d, v, b, V, s, K, h;
|
|
274
|
+
if (t.value[(d = (m = l.value) == null ? void 0 : m.columnEdit) == null ? void 0 : d.key] || (t.value[(b = (v = l.value) == null ? void 0 : v.columnEdit) == null ? void 0 : b.key] = {}), t.value[(s = (V = l.value) == null ? void 0 : V.columnEdit) == null ? void 0 : s.key].fixed = e, t.value[(h = (K = l.value) == null ? void 0 : K.columnEdit) == null ? void 0 : h.key].active = a, S.value = [...e, ...a], !u) {
|
|
275
|
+
const F = ol(e, a);
|
|
276
|
+
ul(l.value.columnEdit.localStorageKey, F);
|
|
277
|
+
}
|
|
278
|
+
g("columns-changed", a);
|
|
279
|
+
}, Ue = () => {
|
|
280
|
+
var e, a, u, m, d, v;
|
|
281
|
+
if ((a = (e = l.value) == null ? void 0 : e.columnEdit) != null && a.localStorageKey) {
|
|
282
|
+
const b = Fe(l.value.columnEdit.localStorageKey);
|
|
283
|
+
if (b) {
|
|
284
|
+
const { fixed: V, active: s } = Ee(
|
|
285
|
+
b,
|
|
286
|
+
O.value.headers,
|
|
287
|
+
l.value.columnEdit.localStorageKey
|
|
288
|
+
);
|
|
289
|
+
t.value[(m = (u = l.value) == null ? void 0 : u.columnEdit) == null ? void 0 : m.key].fixed = V, t.value[(v = (d = l.value) == null ? void 0 : d.columnEdit) == null ? void 0 : v.key].active = s, S.value = [...V, ...s];
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}, Ie = (e) => {
|
|
293
|
+
t.value.selectedSearchOption = e;
|
|
294
|
+
}, Ne = () => {
|
|
295
|
+
N.value = [], A.value = "", t.value = rl(
|
|
296
|
+
t.value,
|
|
297
|
+
l.value,
|
|
298
|
+
M.value,
|
|
299
|
+
A.value
|
|
300
|
+
), D();
|
|
301
|
+
}, Be = () => {
|
|
302
|
+
D(null, Q.value);
|
|
303
|
+
}, D = (e = null, a = !1, u = "", m = !1, d = !1) => {
|
|
304
|
+
var b, V, s, K, h, F, B, G, W, X, Y, Z, H;
|
|
305
|
+
y.value && !a && (Q.value = 1), y.value ? t.value.page = Q.value : t.value.cursor = u, (b = l.value) != null && b.per_page ? t.value[l.value.per_page.key] = M.value : t.value.per_page = M.value, (V = l.value) != null && V.tabs && d && (t.value[l.value.tabs.key] = A.value), (s = l.value) != null && s.search && ((h = (K = l.value.search) == null ? void 0 : K.options) != null && h.length ? (Object.keys(t.value).forEach((w) => {
|
|
306
|
+
var R;
|
|
307
|
+
(R = l.value.search.options) != null && R.map((z) => z.value).includes(w) && delete t.value[w];
|
|
308
|
+
}), t.value[((F = t.value) == null ? void 0 : F.selectedSearchOption) || ((W = (G = (B = l.value.search) == null ? void 0 : B.options) == null ? void 0 : G[0]) == null ? void 0 : W.value) || l.value.search.key] = N.value.join()) : t.value[l.value.search.key] = N.value.join()), e && (U.value = !1, t.value = { ...t.value, ...e }, Object.keys(t.value).forEach((w) => {
|
|
309
|
+
Array.isArray(t.value[w]) && t.value[w].length === 0 && delete t.value[w];
|
|
310
|
+
}));
|
|
311
|
+
let v = (Y = (X = l.value) == null ? void 0 : X.tabs) == null ? void 0 : Y.key;
|
|
312
|
+
if (v && A.value !== t.value[v]) {
|
|
313
|
+
const w = (H = (Z = l.value.tabs) == null ? void 0 : Z.options) == null ? void 0 : H.find(
|
|
314
|
+
(R) => {
|
|
315
|
+
var z, _;
|
|
316
|
+
return ((z = R.value) == null ? void 0 : z.toString()) === ((_ = t.value[v]) == null ? void 0 : _.toString());
|
|
317
|
+
}
|
|
318
|
+
);
|
|
319
|
+
w != null && w.value && (A.value = w.value, d || D(null, !1, "", !1, !0));
|
|
320
|
+
}
|
|
321
|
+
Qe(m);
|
|
322
|
+
}, ue = C(null), Qe = (e = !1) => {
|
|
323
|
+
clearTimeout(ue.value), ue.value = setTimeout(() => {
|
|
324
|
+
g("update:filter", { ...t.value }, e), g("apply-filter", { ...t.value }, e);
|
|
325
|
+
}, 50);
|
|
326
|
+
}, Re = (e, a) => {
|
|
327
|
+
(a === l.value.tabs.key || a === "tabs") && (A.value = ""), D(e), g("filter-removed", a);
|
|
328
|
+
};
|
|
329
|
+
return Se(() => {
|
|
330
|
+
Ue(), Ge(() => {
|
|
331
|
+
g("on-table-ready");
|
|
332
|
+
});
|
|
333
|
+
}), (e, a) => {
|
|
334
|
+
var u, m, d, v, b, V;
|
|
335
|
+
return o(), x("div", kl, [
|
|
336
|
+
J.value ? (o(), T(We($.isNewTable ? i(Ze) : i(He)), {
|
|
337
|
+
key: 0,
|
|
338
|
+
selected: $.selected,
|
|
339
|
+
"row-key": $.rowKey,
|
|
340
|
+
options: J.value,
|
|
341
|
+
"is-loading": $.isLoading,
|
|
342
|
+
"loading-rows": M.value,
|
|
343
|
+
"row-class": $.rowClass,
|
|
344
|
+
"row-link": $.rowLink,
|
|
345
|
+
"selected-index": $.selectedIndex,
|
|
346
|
+
"is-sticky": O.value.isSticky,
|
|
347
|
+
"is-borderless": O.value.isBorderless,
|
|
348
|
+
"onUpdate:selected": a[8] || (a[8] = (s) => e.$emit("update:selected", s)),
|
|
349
|
+
"onClick:row": a[9] || (a[9] = (s) => e.$emit("click:row", s)),
|
|
350
|
+
"onHover:cell": a[10] || (a[10] = (s) => e.$emit("hover:cell", s))
|
|
351
|
+
}, Xe({
|
|
352
|
+
after: p(() => [
|
|
353
|
+
E(e.$slots, "after")
|
|
354
|
+
]),
|
|
355
|
+
empty: p(() => [
|
|
356
|
+
E(e.$slots, "empty")
|
|
357
|
+
]),
|
|
358
|
+
"table-header": p((s) => [
|
|
359
|
+
E(e.$slots, "table-header", be(he(s)))
|
|
360
|
+
]),
|
|
361
|
+
"table-body": p((s) => [
|
|
362
|
+
E(e.$slots, "table-body", be(he(s)))
|
|
363
|
+
]),
|
|
364
|
+
"after-rows": p(() => [
|
|
365
|
+
E(e.$slots, "after-rows")
|
|
366
|
+
]),
|
|
367
|
+
_: 2
|
|
368
|
+
}, [
|
|
369
|
+
e.$slots.before || (u = l.value) != null && u.search || (m = l.value) != null && m.form || (d = l.value) != null && d.tabs ? {
|
|
370
|
+
name: "before",
|
|
371
|
+
fn: p(() => {
|
|
372
|
+
var s, K, h, F;
|
|
373
|
+
return [
|
|
374
|
+
E(e.$slots, "before"),
|
|
375
|
+
(s = l.value) != null && s.search || (K = l.value) != null && K.form || (h = l.value) != null && h.tabs ? (o(), x("div", bl, [
|
|
376
|
+
je.value ? (o(), x("div", hl, [
|
|
377
|
+
E(e.$slots, "bulk-actions", { selectedRows: $.selected })
|
|
378
|
+
])) : (o(), x("div", wl, [
|
|
379
|
+
(F = l.value) != null && F.tabs ? (o(), T(i(_e), {
|
|
380
|
+
key: 0,
|
|
381
|
+
modelValue: A.value,
|
|
382
|
+
"onUpdate:modelValue": [
|
|
383
|
+
a[0] || (a[0] = (B) => A.value = B),
|
|
384
|
+
a[1] || (a[1] = (B) => D(null, !1, "", !1, !0))
|
|
385
|
+
],
|
|
386
|
+
"is-disabled": $.isLoading,
|
|
387
|
+
tabs: l.value.tabs.options,
|
|
388
|
+
variant: "pills"
|
|
389
|
+
}, null, 8, ["modelValue", "is-disabled", "tabs"])) : f("", !0)
|
|
390
|
+
])),
|
|
391
|
+
E(e.$slots, "filter-options", {}, () => {
|
|
392
|
+
var B, G, W, X, Y, Z, H, w, R, z, _;
|
|
393
|
+
return [
|
|
394
|
+
(B = l.value) != null && B.search || (G = l.value) != null && G.form || (W = l.value) != null && W.columnEdit ? (o(), x("div", {
|
|
395
|
+
key: 0,
|
|
396
|
+
class: te([
|
|
397
|
+
"flex gap-3 absolute ml-auto items-center bg-oc-bg-light right-4 max-w-[calc(100%-24px)]",
|
|
398
|
+
l.value ? oe.value ? "md:w-fit w-full" : "" : "w-full justify-end"
|
|
399
|
+
])
|
|
400
|
+
}, [
|
|
401
|
+
(X = l.value) != null && X.search ? (o(), T(i(el), {
|
|
402
|
+
key: 0,
|
|
403
|
+
"is-search-only": !l.value.tabs || l.value.isSearchOnly,
|
|
404
|
+
"search-options": ((Y = l.value.search) == null ? void 0 : Y.options) ?? [],
|
|
405
|
+
"selected-option": (((Z = t.value) == null ? void 0 : Z.selectedSearchOption) || ((R = (w = (H = l.value.search) == null ? void 0 : H.options) == null ? void 0 : w[0]) == null ? void 0 : R.value)) ?? "keywords",
|
|
406
|
+
onAddQuery: Ae,
|
|
407
|
+
onToggle: a[2] || (a[2] = (P) => oe.value = P),
|
|
408
|
+
onChangeSearchKey: Ie
|
|
409
|
+
}, null, 8, ["is-search-only", "search-options", "selected-option"])) : f("", !0),
|
|
410
|
+
(z = l.value) != null && z.form ? (o(), T(i(Oe), {
|
|
411
|
+
key: 1,
|
|
412
|
+
modelValue: U.value,
|
|
413
|
+
"onUpdate:modelValue": [
|
|
414
|
+
a[6] || (a[6] = (P) => U.value = P),
|
|
415
|
+
a[7] || (a[7] = (P) => e.$emit("filter-open", P))
|
|
416
|
+
],
|
|
417
|
+
distance: 9,
|
|
418
|
+
placement: "bottom-end",
|
|
419
|
+
"is-attach-to-body": ""
|
|
420
|
+
}, {
|
|
421
|
+
menu: p(() => [
|
|
422
|
+
U.value ? (o(), T(i(ll), {
|
|
423
|
+
key: 0,
|
|
424
|
+
id: $.id,
|
|
425
|
+
"json-form": l.value.form ?? [],
|
|
426
|
+
grid: l.value.grid ?? null,
|
|
427
|
+
values: t.value,
|
|
428
|
+
actions: l.value.actions,
|
|
429
|
+
onApplyFilter: a[3] || (a[3] = (P) => D(P)),
|
|
430
|
+
onFilterFieldsChanged: a[4] || (a[4] = (P) => g("filter-fields-changed", P)),
|
|
431
|
+
onCancel: a[5] || (a[5] = (P) => U.value = !1)
|
|
432
|
+
}, {
|
|
433
|
+
default: p(({ errors: P, values: ze, jsonForm: qe, updateForm: Je }) => [
|
|
434
|
+
E(e.$slots, "custom-filter-form", {
|
|
435
|
+
errors: P,
|
|
436
|
+
values: ze,
|
|
437
|
+
jsonForm: qe,
|
|
438
|
+
updateFilter: Je
|
|
439
|
+
})
|
|
440
|
+
]),
|
|
441
|
+
_: 3
|
|
442
|
+
}, 8, ["id", "json-form", "grid", "values", "actions"])) : f("", !0)
|
|
443
|
+
]),
|
|
444
|
+
default: p(() => [
|
|
445
|
+
I(i(Ve), {
|
|
446
|
+
"is-active": U.value,
|
|
447
|
+
variant: "secondary",
|
|
448
|
+
"left-icon": "filter",
|
|
449
|
+
size: "small",
|
|
450
|
+
class: "w-8",
|
|
451
|
+
"icon-class": "shrink-0"
|
|
452
|
+
}, null, 8, ["is-active"])
|
|
453
|
+
]),
|
|
454
|
+
_: 3
|
|
455
|
+
}, 8, ["modelValue"])) : f("", !0),
|
|
456
|
+
l.value.columnEdit ? (o(), T(gl, {
|
|
457
|
+
key: 2,
|
|
458
|
+
options: t.value.columnEdit,
|
|
459
|
+
headers: ((_ = O.value) == null ? void 0 : _.headers) || [],
|
|
460
|
+
"local-key": l.value.columnEdit.localStorageKey,
|
|
461
|
+
onUpdateOrder: Te
|
|
462
|
+
}, null, 8, ["options", "headers", "local-key"])) : f("", !0)
|
|
463
|
+
], 2)) : f("", !0)
|
|
464
|
+
];
|
|
465
|
+
})
|
|
466
|
+
])) : f("", !0),
|
|
467
|
+
I(i(al), {
|
|
468
|
+
filters: Ke.value,
|
|
469
|
+
queries: N.value,
|
|
470
|
+
class: "border-t border-oc-gray-200",
|
|
471
|
+
onRemoveQuery: De,
|
|
472
|
+
onRemoveAll: Ne,
|
|
473
|
+
onRemoveFilter: Re
|
|
474
|
+
}, null, 8, ["filters", "queries"])
|
|
475
|
+
];
|
|
476
|
+
}),
|
|
477
|
+
key: "0"
|
|
478
|
+
} : void 0,
|
|
479
|
+
ee((v = O.value) == null ? void 0 : v.headers, (s, K) => ({
|
|
480
|
+
name: s.key,
|
|
481
|
+
fn: p(({ data: h, item: F }) => [
|
|
482
|
+
E(e.$slots, s.key, {
|
|
483
|
+
data: h,
|
|
484
|
+
item: F
|
|
485
|
+
})
|
|
486
|
+
])
|
|
487
|
+
})),
|
|
488
|
+
ee((b = O.value) == null ? void 0 : b.headers, (s, K) => ({
|
|
489
|
+
name: `header-${s.key}-tooltip`,
|
|
490
|
+
fn: p(({ data: h, item: F }) => [
|
|
491
|
+
E(e.$slots, `header-${s.key}-tooltip`, {
|
|
492
|
+
data: h,
|
|
493
|
+
item: F
|
|
494
|
+
})
|
|
495
|
+
])
|
|
496
|
+
})),
|
|
497
|
+
ee((V = O.value) == null ? void 0 : V.headers, (s, K) => ({
|
|
498
|
+
name: `header-${s.key}-left-tooltip`,
|
|
499
|
+
fn: p(({ data: h, item: F }) => [
|
|
500
|
+
E(e.$slots, `header-${s.key}-left-tooltip`, {
|
|
501
|
+
data: h,
|
|
502
|
+
item: F
|
|
503
|
+
})
|
|
504
|
+
])
|
|
505
|
+
}))
|
|
506
|
+
]), 1064, ["selected", "row-key", "options", "is-loading", "loading-rows", "row-class", "row-link", "selected-index", "is-sticky", "is-borderless"])) : f("", !0),
|
|
507
|
+
E(e.$slots, "before-pagination"),
|
|
508
|
+
y.value || c.value ? (o(), x("div", {
|
|
509
|
+
key: 1,
|
|
510
|
+
class: te(["flex items-center gap-3", y.value && y.value.last_page === 1 ? "justify-end" : ""])
|
|
511
|
+
}, [
|
|
512
|
+
y.value && !n.value ? (o(), T(i(tl), {
|
|
513
|
+
key: 0,
|
|
514
|
+
modelValue: Q.value,
|
|
515
|
+
"onUpdate:modelValue": [
|
|
516
|
+
a[11] || (a[11] = (s) => Q.value = s),
|
|
517
|
+
Be
|
|
518
|
+
],
|
|
519
|
+
class: "justify-center text-[13px]",
|
|
520
|
+
"max-page": y.value.last_page,
|
|
521
|
+
strategy: y.value.strategy,
|
|
522
|
+
"total-visible": "5"
|
|
523
|
+
}, null, 8, ["modelValue", "max-page", "strategy"])) : f("", !0),
|
|
524
|
+
c.value ? (o(), x("div", xl, [
|
|
525
|
+
I(i(we), {
|
|
526
|
+
disabled: !c.value.prev,
|
|
527
|
+
onClick: a[12] || (a[12] = (s) => c.value.prev ? D(null, !1, c.value.prev) : null)
|
|
528
|
+
}, null, 8, ["disabled"]),
|
|
529
|
+
I(i(we), {
|
|
530
|
+
disabled: !c.value.next,
|
|
531
|
+
"is-next": "",
|
|
532
|
+
onClick: a[13] || (a[13] = (s) => c.value.next ? D(null, !1, c.value.next) : null)
|
|
533
|
+
}, null, 8, ["disabled"])
|
|
534
|
+
])) : f("", !0),
|
|
535
|
+
r.value ? f("", !0) : (o(), x("div", $l, [
|
|
536
|
+
I(i(sl), {
|
|
537
|
+
modelValue: M.value,
|
|
538
|
+
"onUpdate:modelValue": [
|
|
539
|
+
a[14] || (a[14] = (s) => M.value = s),
|
|
540
|
+
a[15] || (a[15] = (s) => D(null))
|
|
541
|
+
],
|
|
542
|
+
label: "Item per page",
|
|
543
|
+
"is-inline-label": "",
|
|
544
|
+
"popper-options": { placement: "auto" },
|
|
545
|
+
options: Pe.value,
|
|
546
|
+
"select-text-class": "!text-[13px]"
|
|
547
|
+
}, null, 8, ["modelValue", "options"])
|
|
548
|
+
]))
|
|
549
|
+
], 2)) : f("", !0)
|
|
550
|
+
]);
|
|
551
|
+
};
|
|
552
|
+
}
|
|
553
|
+
};
|
|
554
|
+
export {
|
|
555
|
+
Al as default
|
|
556
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref as w, createBlock as y, openBlock as c, unref as l, withCtx as r, createElementBlock as b, Fragment as K, renderList as $, normalizeClass as s, createElementVNode as o, createCommentVNode as m, renderSlot as u, toDisplayString as x, createVNode as f } from "vue";
|
|
2
|
-
import { aL as D, aH as S, aC as B } from "./index-
|
|
2
|
+
import { aL as D, aH as S, aC as B } from "./index-BM9QWetK.js";
|
|
3
3
|
import { _ as g } from "./OcIcon-BedshzZm.js";
|
|
4
4
|
const M = ["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" }, H = ["href"], O = { class: "min-w-[120px]" }, W = { class: "truncate w-[200px]" }, j = { class: "flex items-center ml-4" }, z = { class: "flex w-full" }, q = {
|
|
5
5
|
__name: "OcDraggableList",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref as m, computed as p, createElementBlock as l, openBlock as s, createVNode as f, createBlock as N, createCommentVNode as z, unref as c, withCtx as v, createElementVNode as n, normalizeClass as T, Fragment as V, renderList as C, createTextVNode as k } from "vue";
|
|
2
|
-
import { aC as U, d as J, B as b } from "./index-
|
|
2
|
+
import { aC as U, d as J, B as b } from "./index-BM9QWetK.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 u, onMounted as B, createElementBlock as O, openBlock as k, renderSlot as $, createElementVNode as f, createVNode as c, unref as i } from "vue";
|
|
2
|
-
import { u as w, B as m } from "./index-
|
|
2
|
+
import { u as w, B as m } from "./index-BM9QWetK.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 u, computed as D, createElementBlock as d, openBlock as s, Fragment as p, createElementVNode as r, createCommentVNode as f, normalizeClass as O, createVNode as m, unref as c, withKeys as K, createSlots as N, withCtx as h, toDisplayString as Q, renderList as E, createBlock as S, nextTick as F } from "vue";
|
|
2
|
-
import { d as I, aC as U, aD as j, B as w } from "./index-
|
|
2
|
+
import { d as I, aC as U, aD as j, B as w } from "./index-BM9QWetK.js";
|
|
3
3
|
import { _ as q } from "./OcIcon-BedshzZm.js";
|
|
4
4
|
const A = { class: "flex gap-x-4" }, L = { class: "flex gap-x-2 items-center pl-2 text-oc-text-400 font-medium text-sm" }, T = { class: "p-2 flex flex-col" }, P = {
|
|
5
5
|
__name: "OcFilterSearch",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed as h, createBlock as c, createCommentVNode as k, openBlock as a, unref as o, withCtx as y, createElementVNode as f, createElementBlock as v, createVNode as F, Fragment as p, renderList as b } from "vue";
|
|
2
|
-
import { O as $, ax as m } from "./index-
|
|
2
|
+
import { O as $, ax as m } from "./index-BM9QWetK.js";
|
|
3
3
|
const w = { class: "flex gap-1 items-center normal-case flex-wrap" }, N = {
|
|
4
4
|
__name: "OcFilterSearchFor",
|
|
5
5
|
props: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as o, createBlock as v, openBlock as d, unref as r, withCtx as x, createVNode as O } from "vue";
|
|
2
|
-
import { aE as b } from "./index-
|
|
3
|
-
import k from "./OcCropper-
|
|
2
|
+
import { aE as b } from "./index-BM9QWetK.js";
|
|
3
|
+
import k from "./OcCropper-CUm08wvo.js";
|
|
4
4
|
const h = {
|
|
5
5
|
__name: "OcModalCropper",
|
|
6
6
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref as n, watch as g, createBlock as m, openBlock as s, unref as o, withCtx as p, createVNode as v, createCommentVNode as y } from "vue";
|
|
2
|
-
import { aC as S, d as h, aM as D } from "./index-
|
|
2
|
+
import { aC as S, d as h, aM as D } from "./index-BM9QWetK.js";
|
|
3
3
|
import { d as c } from "./dayjs.min-7xVZzECu.js";
|
|
4
4
|
const w = {
|
|
5
5
|
__name: "OcTimePicker",
|