@orchidui/core 1.21.1-1 → 1.21.1-10
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/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/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-8yiwZyM-.js → OcAccountSetupProgress-XIbekhtd.js} +1 -1
- package/dist/{OcComplexCalendar-CddUFr4S.js → OcComplexCalendar-Bt8mSXtc.js} +1 -1
- package/dist/{OcComplexDatePicker-DeReeFic.js → OcComplexDatePicker-D7zpXjdE.js} +1 -1
- package/dist/{OcCropper-BUO8Glob.js → OcCropper-BjSNzRL7.js} +1 -1
- package/dist/{OcDataTable-BSdWcTnO.js → OcDataTable-HU_9HyCj.js} +159 -159
- package/dist/{OcDraggableList-DjmB9Z3T.js → OcDraggableList-BmVGxZV8.js} +1 -1
- package/dist/{OcEmojiPicker-CSxcT_RE.js → OcEmojiPicker-BSqUZY7I.js} +1 -1
- package/dist/{OcFilterForm-DkEwY-fd.js → OcFilterForm-CDycE6if.js} +1 -1
- package/dist/{OcFilterSearch-CXpkvvis.js → OcFilterSearch-CZuzDu6Y.js} +1 -1
- package/dist/{OcFilterSearchFor-KeVAUO_J.js → OcFilterSearchFor-Br5fhk5A.js} +1 -1
- package/dist/{OcModalCropper-DqkKxvh7.js → OcModalCropper-lCGi4Onl.js} +2 -2
- package/dist/{OcTimePicker-BQicJhfh.js → OcTimePicker-OHtUU6b6.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-JRmozM3w.js → SubPlanCard-3qZPN1RA.js} +1 -1
- package/dist/{ThumbnailSection-D62ayDND.js → ThumbnailSection--5jwTIXB.js} +1 -1
- package/dist/{ThumbnailTheme-CIV2-bCV.js → ThumbnailTheme-CmqBAcYn.js} +1 -1
- package/dist/{index-CPyMbjU1.js → index-DOIt49bT.js} +8 -8
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { ref as $, onMounted as
|
|
2
|
-
import { aA as
|
|
3
|
-
import { useDataTable as
|
|
4
|
-
import { VueDraggableNext as
|
|
5
|
-
import { getFromLocalStorage as
|
|
6
|
-
import { _ as
|
|
7
|
-
import { formatFilterDisplay as
|
|
8
|
-
import { formatCustomItemsPerPageOptions as
|
|
1
|
+
import { ref as $, onMounted as Ue, createBlock as L, openBlock as r, unref as i, withCtx as w, createVNode as j, createElementVNode as N, createElementBlock as h, createCommentVNode as y, mergeProps as Ee, Fragment as ie, renderList as ne, normalizeClass as de, toDisplayString as Ce, computed as S, watch as re, nextTick as rl, renderSlot as A, resolveDynamicComponent as nl, createSlots as dl, normalizeProps as Pe, guardReactiveProps as Ae } from "vue";
|
|
2
|
+
import { aA as Te, B as Ke, C as vl, D as cl, L as ml, $ as pl, aL as fl, aM as yl, aN as gl, I as bl, J as Le, j as kl } from "./index-DOIt49bT.js";
|
|
3
|
+
import { useDataTable as hl } from "./DataTable/useDataTable.js";
|
|
4
|
+
import { VueDraggableNext as je } from "vue-draggable-next";
|
|
5
|
+
import { getFromLocalStorage as Ie, formatHeadersFromLocalStorage as qe, formatHeadersToLocalStorage as xl, setInLocalStorage as wl } from "./DataTable/utils/editColumnsUtils.js";
|
|
6
|
+
import { _ as Be } from "./OcIcon-CxreweI4.js";
|
|
7
|
+
import { formatFilterDisplay as Sl, clearAllFilters as $l } from "./DataTable/utils/filterUtils.js";
|
|
8
|
+
import { formatCustomItemsPerPageOptions as Fl, getItemsPerPageOptions as Ol } from "./DataTable/utils/paginationUtils.js";
|
|
9
9
|
import "dayjs";
|
|
10
|
-
const
|
|
10
|
+
const Vl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, Dl = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "gap-y-2 flex flex-col border-b pb-3 border-oc-gray-200"
|
|
13
|
-
},
|
|
13
|
+
}, El = { class: "gap-y-2 flex flex-col" }, Cl = {
|
|
14
14
|
key: 0,
|
|
15
15
|
class: "flex items-center bg-white justify-between h-[26px]"
|
|
16
|
-
},
|
|
16
|
+
}, Pl = { class: "flex items-center w-full gap-x-3" }, Al = { class: "truncate w-full max-w-[160px]" }, Ll = {
|
|
17
17
|
__name: "ColumnEdit",
|
|
18
18
|
props: {
|
|
19
19
|
options: {
|
|
@@ -30,8 +30,8 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
|
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
emits: ["change-active", "onMoved", "update-order"],
|
|
33
|
-
setup(F, { emit:
|
|
34
|
-
const
|
|
33
|
+
setup(F, { emit: te }) {
|
|
34
|
+
const se = te, u = F, g = $([]), d = $([]), T = $(!1), O = {
|
|
35
35
|
handle: ".drag-el",
|
|
36
36
|
filter: ".is-disabled",
|
|
37
37
|
group: "headers",
|
|
@@ -43,42 +43,42 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
|
|
|
43
43
|
d.value = d.value.map((o) => ({
|
|
44
44
|
...o,
|
|
45
45
|
isActive: !0
|
|
46
|
-
})),
|
|
46
|
+
})), se("update-order", {
|
|
47
47
|
fixedHeaders: d.value,
|
|
48
48
|
activeHeaders: g.value,
|
|
49
49
|
isOnMount: E
|
|
50
50
|
});
|
|
51
51
|
};
|
|
52
|
-
return
|
|
53
|
-
const E =
|
|
52
|
+
return Ue(() => {
|
|
53
|
+
const E = Ie(u.localKey), { fixed: o, active: v } = qe(E, u.headers, u.localKey);
|
|
54
54
|
d.value = o || u.headers.slice(0, 1), g.value = v || u.headers.slice(1).map((C) => {
|
|
55
|
-
var ee, le
|
|
55
|
+
var _, ee, le;
|
|
56
56
|
return {
|
|
57
57
|
...C,
|
|
58
|
-
isActive: ((
|
|
58
|
+
isActive: ((le = (ee = (_ = u.options) == null ? void 0 : _.active) == null ? void 0 : ee.find((oe) => oe.key === C.key)) == null ? void 0 : le.isActive) ?? !0
|
|
59
59
|
};
|
|
60
60
|
}), K(!0);
|
|
61
|
-
}), (E, o) => (r(), L(i(
|
|
61
|
+
}), (E, o) => (r(), L(i(Te), {
|
|
62
62
|
modelValue: T.value,
|
|
63
63
|
"onUpdate:modelValue": o[3] || (o[3] = (v) => T.value = v),
|
|
64
64
|
"is-attach-to-body": ""
|
|
65
65
|
}, {
|
|
66
66
|
menu: w(() => [
|
|
67
|
-
N("div",
|
|
68
|
-
d.value.length ? (r(), h("div",
|
|
67
|
+
N("div", Vl, [
|
|
68
|
+
d.value.length ? (r(), h("div", Dl, [
|
|
69
69
|
o[4] || (o[4] = N("span", { class: "text-oc-text-400 font-medium" }, "Fixed columns", -1)),
|
|
70
|
-
j(i(
|
|
70
|
+
j(i(je), Ee({
|
|
71
71
|
key: "key",
|
|
72
72
|
modelValue: d.value,
|
|
73
73
|
"onUpdate:modelValue": o[0] || (o[0] = (v) => d.value = v)
|
|
74
74
|
}, O), {
|
|
75
75
|
default: w(() => [
|
|
76
|
-
(r(!0), h(
|
|
76
|
+
(r(!0), h(ie, null, ne(d.value, (v, C) => (r(), h("div", {
|
|
77
77
|
key: v.key,
|
|
78
|
-
class:
|
|
78
|
+
class: de(["flex items-center justify-between h-[26px]", C ? "" : "is-disabled"])
|
|
79
79
|
}, [
|
|
80
|
-
N("span", null,
|
|
81
|
-
C ? (r(), L(i(
|
|
80
|
+
N("span", null, Ce(v.label), 1),
|
|
81
|
+
C ? (r(), L(i(Be), {
|
|
82
82
|
key: 0,
|
|
83
83
|
width: "18",
|
|
84
84
|
height: "18",
|
|
@@ -90,20 +90,20 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
|
|
|
90
90
|
_: 1
|
|
91
91
|
}, 16, ["modelValue"])
|
|
92
92
|
])) : y("", !0),
|
|
93
|
-
N("div",
|
|
93
|
+
N("div", El, [
|
|
94
94
|
o[5] || (o[5] = N("span", { class: "text-oc-text-400 font-medium" }, "Active columns", -1)),
|
|
95
|
-
j(i(
|
|
95
|
+
j(i(je), Ee({
|
|
96
96
|
key: "key",
|
|
97
97
|
modelValue: g.value,
|
|
98
98
|
"onUpdate:modelValue": o[2] || (o[2] = (v) => g.value = v)
|
|
99
99
|
}, O, { "data-active-headers": "true" }), {
|
|
100
100
|
default: w(() => [
|
|
101
|
-
(r(!0), h(
|
|
101
|
+
(r(!0), h(ie, null, ne(g.value, (v) => (r(), h(ie, {
|
|
102
102
|
key: v.key
|
|
103
103
|
}, [
|
|
104
|
-
v.key !== "actions" ? (r(), h("div",
|
|
105
|
-
N("div",
|
|
106
|
-
j(i(
|
|
104
|
+
v.key !== "actions" ? (r(), h("div", Cl, [
|
|
105
|
+
N("div", Pl, [
|
|
106
|
+
j(i(vl), {
|
|
107
107
|
modelValue: v.isActive,
|
|
108
108
|
"onUpdate:modelValue": [
|
|
109
109
|
(C) => v.isActive = C,
|
|
@@ -111,9 +111,9 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
|
|
|
111
111
|
],
|
|
112
112
|
class: "!w-fit"
|
|
113
113
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
114
|
-
N("div",
|
|
114
|
+
N("div", Al, Ce(v.label), 1)
|
|
115
115
|
]),
|
|
116
|
-
g.value.length > 1 ? (r(), L(i(
|
|
116
|
+
g.value.length > 1 ? (r(), L(i(Be), {
|
|
117
117
|
key: 0,
|
|
118
118
|
width: "18",
|
|
119
119
|
height: "18",
|
|
@@ -129,7 +129,7 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
|
|
|
129
129
|
])
|
|
130
130
|
]),
|
|
131
131
|
default: w(() => [
|
|
132
|
-
j(i(
|
|
132
|
+
j(i(Ke), {
|
|
133
133
|
label: "Edit Column",
|
|
134
134
|
"left-icon": "setting",
|
|
135
135
|
size: "small",
|
|
@@ -140,22 +140,22 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
|
|
|
140
140
|
_: 1
|
|
141
141
|
}, 8, ["modelValue"]));
|
|
142
142
|
}
|
|
143
|
-
},
|
|
143
|
+
}, jl = { class: "relative flex flex-col gap-9" }, Bl = {
|
|
144
144
|
key: 0,
|
|
145
145
|
class: "flex items-center px-4 min-h-[44px]"
|
|
146
|
-
},
|
|
146
|
+
}, Ul = {
|
|
147
147
|
key: 0,
|
|
148
148
|
class: "absolute flex items-center gap-5 left-5"
|
|
149
|
-
},
|
|
149
|
+
}, Tl = {
|
|
150
150
|
key: 1,
|
|
151
151
|
class: "absolute flex gap-3 left-5"
|
|
152
|
-
},
|
|
152
|
+
}, Kl = {
|
|
153
153
|
key: 1,
|
|
154
154
|
class: "flex justify-center w-full gap-5 md:justify-start"
|
|
155
|
-
},
|
|
155
|
+
}, Il = {
|
|
156
156
|
key: 2,
|
|
157
157
|
class: "items-center hidden md:flex"
|
|
158
|
-
},
|
|
158
|
+
}, Xl = {
|
|
159
159
|
__name: "OcDataTable",
|
|
160
160
|
props: {
|
|
161
161
|
isLoading: Boolean,
|
|
@@ -207,9 +207,9 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
|
|
|
207
207
|
"on-table-ready": [],
|
|
208
208
|
"update:sort-by": []
|
|
209
209
|
},
|
|
210
|
-
setup(F, { expose:
|
|
211
|
-
var ye, ge, be, ke, he, xe, we, Se, $e, Fe, Oe, Ve, De
|
|
212
|
-
const u = F, g =
|
|
210
|
+
setup(F, { expose: te, emit: se }) {
|
|
211
|
+
var fe, ye, ge, be, ke, he, xe, we, Se, $e, Fe, Oe, Ve, De;
|
|
212
|
+
const u = F, g = se, d = S(() => {
|
|
213
213
|
var e;
|
|
214
214
|
return (e = u.options) == null ? void 0 : e.cursor;
|
|
215
215
|
}), T = $(), O = S(() => {
|
|
@@ -221,22 +221,22 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
|
|
|
221
221
|
isLoading: v,
|
|
222
222
|
// Methods
|
|
223
223
|
bulkPutLocalData: C,
|
|
224
|
-
bulkDeleteLocalData:
|
|
225
|
-
getLocalDataUpdatedAt:
|
|
226
|
-
getProductIdAndLastUpdatedAt:
|
|
227
|
-
syncLocalData:
|
|
224
|
+
bulkDeleteLocalData: _,
|
|
225
|
+
getLocalDataUpdatedAt: ee,
|
|
226
|
+
getProductIdAndLastUpdatedAt: le,
|
|
227
|
+
syncLocalData: oe,
|
|
228
228
|
sortByData: R,
|
|
229
229
|
// Setters
|
|
230
|
-
setFilter:
|
|
231
|
-
setSortBy:
|
|
232
|
-
} =
|
|
233
|
-
name: ((
|
|
234
|
-
db: ((
|
|
235
|
-
filterableFields: (
|
|
236
|
-
sortableFields: (
|
|
237
|
-
searchableFields: (
|
|
230
|
+
setFilter: Ne,
|
|
231
|
+
setSortBy: Qe
|
|
232
|
+
} = hl({
|
|
233
|
+
name: ((fe = u.localDb) == null ? void 0 : fe.table_name) ?? null,
|
|
234
|
+
db: ((ye = u.localDb) == null ? void 0 : ye.db) ?? null,
|
|
235
|
+
filterableFields: (ge = u.options) == null ? void 0 : ge.filterableFields,
|
|
236
|
+
sortableFields: (be = u.options) == null ? void 0 : be.sortableFields,
|
|
237
|
+
searchableFields: (ke = u.options) == null ? void 0 : ke.searchableFields
|
|
238
238
|
});
|
|
239
|
-
|
|
239
|
+
re(
|
|
240
240
|
() => {
|
|
241
241
|
var e;
|
|
242
242
|
return (e = u.options) == null ? void 0 : e.pagination;
|
|
@@ -246,57 +246,57 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
|
|
|
246
246
|
},
|
|
247
247
|
{ deep: !0, immediate: !0 }
|
|
248
248
|
);
|
|
249
|
-
const
|
|
249
|
+
const ve = S(() => {
|
|
250
250
|
var l, c;
|
|
251
251
|
const e = {
|
|
252
252
|
...O.value,
|
|
253
253
|
headers: T.value ? T.value.map((n) => {
|
|
254
254
|
var f, m;
|
|
255
255
|
return n.class = ((m = (f = O.value) == null ? void 0 : f.headers.find((s) => s.key === n.key)) == null ? void 0 : m.class) ?? "", n;
|
|
256
|
-
}).filter((n) => n.isActive) : (l = O.value) == null ? void 0 : l.headers.filter((n) =>
|
|
256
|
+
}).filter((n) => n.isActive) : (l = O.value) == null ? void 0 : l.headers.filter((n) => Ze(n.key))
|
|
257
257
|
};
|
|
258
258
|
return (c = e.fields) != null && c.length || (e.fields = E.value), e;
|
|
259
259
|
}), a = S(() => {
|
|
260
260
|
var e;
|
|
261
261
|
return (e = u.options) == null ? void 0 : e.filterOptions;
|
|
262
|
-
}),
|
|
262
|
+
}), ze = S(() => {
|
|
263
263
|
var e;
|
|
264
264
|
return (e = u.options) == null ? void 0 : e.hidePerPageDropdown;
|
|
265
|
-
}),
|
|
265
|
+
}), Re = S(() => {
|
|
266
266
|
var e;
|
|
267
267
|
return ((e = o.value) == null ? void 0 : e.last_page) === 1;
|
|
268
|
-
}),
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
(
|
|
272
|
-
),
|
|
268
|
+
}), t = $({
|
|
269
|
+
page: 1
|
|
270
|
+
}), Q = $(!1), B = $(t.value[(xe = (he = a.value) == null ? void 0 : he.tabs) == null ? void 0 : xe.key]), M = $(t.value.page), z = $(
|
|
271
|
+
(Se = (we = a.value) == null ? void 0 : we.per_page) != null && Se.key ? t.value[(Fe = ($e = a.value) == null ? void 0 : $e.per_page) == null ? void 0 : Fe.key] : t.value.per_page
|
|
272
|
+
), ce = ((De = t.value[t.value.selectedSearchOption || ((Ve = (Oe = a.value) == null ? void 0 : Oe.search) == null ? void 0 : Ve.key)]) == null ? void 0 : De.trim()) ?? "", U = $(ce ? ce.split(",") : []), me = $(!1), Me = S(
|
|
273
273
|
() => {
|
|
274
274
|
var e;
|
|
275
|
-
return
|
|
275
|
+
return Fl((e = u.options) == null ? void 0 : e.perPageOptions);
|
|
276
276
|
}
|
|
277
|
-
),
|
|
277
|
+
), Je = S(() => Ol(Me.value, o.value)), Ge = S(() => {
|
|
278
278
|
var e;
|
|
279
279
|
return ((e = u.selected) == null ? void 0 : e.length) > 0;
|
|
280
|
-
}),
|
|
280
|
+
}), We = (e) => {
|
|
281
281
|
!e.trim() || !t.value.selectedSearchOption && U.value.includes(e) || (U.value = [e], V(), g("search-query-changed", e));
|
|
282
|
-
},
|
|
282
|
+
}, Xe = (e) => {
|
|
283
283
|
U.value = U.value.filter((l) => l !== e), V();
|
|
284
|
-
},
|
|
284
|
+
}, Ye = S(() => Sl(t.value, a.value)), Ze = (e) => {
|
|
285
285
|
var l, c, n, f, m, s;
|
|
286
286
|
return ((s = (m = (f = (n = t.value) == null ? void 0 : n[(c = (l = a.value) == null ? void 0 : l.columnEdit) == null ? void 0 : c.key]) == null ? void 0 : f.active) == null ? void 0 : m.find((b) => b.key === e)) == null ? void 0 : s.isActive) ?? !0;
|
|
287
|
-
},
|
|
287
|
+
}, He = ({ fixedHeaders: e, activeHeaders: l, isOnMount: c }) => {
|
|
288
288
|
var n, f, m, s, b, x, P, D;
|
|
289
289
|
if (t.value[(f = (n = a.value) == null ? void 0 : n.columnEdit) == null ? void 0 : f.key] || (t.value[(s = (m = a.value) == null ? void 0 : m.columnEdit) == null ? void 0 : s.key] = {}), t.value[(x = (b = a.value) == null ? void 0 : b.columnEdit) == null ? void 0 : x.key].fixed = e, t.value[(D = (P = a.value) == null ? void 0 : P.columnEdit) == null ? void 0 : D.key].active = l, T.value = [...e, ...l], !c) {
|
|
290
|
-
const I =
|
|
291
|
-
|
|
290
|
+
const I = xl(e, l);
|
|
291
|
+
wl(a.value.columnEdit.localStorageKey, I);
|
|
292
292
|
}
|
|
293
293
|
g("columns-changed", l);
|
|
294
|
-
},
|
|
294
|
+
}, _e = () => {
|
|
295
295
|
var e, l, c, n, f, m;
|
|
296
296
|
if ((l = (e = a.value) == null ? void 0 : e.columnEdit) != null && l.localStorageKey) {
|
|
297
|
-
const s =
|
|
297
|
+
const s = Ie(a.value.columnEdit.localStorageKey);
|
|
298
298
|
if (s) {
|
|
299
|
-
const { fixed: b, active: x } =
|
|
299
|
+
const { fixed: b, active: x } = qe(
|
|
300
300
|
s,
|
|
301
301
|
O.value.headers,
|
|
302
302
|
a.value.columnEdit.localStorageKey
|
|
@@ -304,87 +304,87 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
|
|
|
304
304
|
t.value[(n = (c = a.value) == null ? void 0 : c.columnEdit) == null ? void 0 : n.key].fixed = b, t.value[(m = (f = a.value) == null ? void 0 : f.columnEdit) == null ? void 0 : m.key].active = x, T.value = [...b, ...x];
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
|
-
},
|
|
307
|
+
}, el = (e) => {
|
|
308
308
|
t.value.selectedSearchOption = e;
|
|
309
|
-
},
|
|
310
|
-
U.value = [], B.value = "", t.value =
|
|
309
|
+
}, ll = () => {
|
|
310
|
+
U.value = [], B.value = "", t.value = $l(
|
|
311
311
|
t.value,
|
|
312
312
|
a.value,
|
|
313
313
|
z.value,
|
|
314
314
|
B.value
|
|
315
315
|
), V();
|
|
316
|
-
},
|
|
317
|
-
V(null,
|
|
316
|
+
}, al = () => {
|
|
317
|
+
V(null, M.value);
|
|
318
318
|
}, V = (e = null, l = !1, c = "", n = !1, f = !1) => {
|
|
319
|
-
var s, b, x, P, D, I, G, W, X, Y, Z, H
|
|
320
|
-
o.value && !l && (
|
|
319
|
+
var s, b, x, P, D, I, J, G, W, X, Y, Z, H;
|
|
320
|
+
o.value && !l && (M.value = 1), o.value ? t.value.page = M.value : t.value.cursor = c, (s = a.value) != null && s.per_page ? t.value[a.value.per_page.key] = z.value : t.value.per_page = z.value, (b = a.value) != null && b.tabs && f && (t.value[a.value.tabs.key] = B.value), (x = a.value) != null && x.search && ((D = (P = a.value.search) == null ? void 0 : P.options) != null && D.length ? (Object.keys(t.value).forEach((k) => {
|
|
321
321
|
var q;
|
|
322
322
|
(q = a.value.search.options) != null && q.map((p) => p.value).includes(k) && delete t.value[k];
|
|
323
|
-
}), t.value[((I = t.value) == null ? void 0 : I.selectedSearchOption) || ((
|
|
323
|
+
}), t.value[((I = t.value) == null ? void 0 : I.selectedSearchOption) || ((W = (G = (J = a.value.search) == null ? void 0 : J.options) == null ? void 0 : G[0]) == null ? void 0 : W.value) || a.value.search.key] = U.value.join()) : t.value[a.value.search.key] = U.value.join()), e && (Q.value = !1, t.value = { ...t.value, ...e }, Object.keys(t.value).forEach((k) => {
|
|
324
324
|
Array.isArray(t.value[k]) && t.value[k].length === 0 && delete t.value[k];
|
|
325
325
|
}));
|
|
326
|
-
let m = (
|
|
326
|
+
let m = (Y = (X = a.value) == null ? void 0 : X.tabs) == null ? void 0 : Y.key;
|
|
327
327
|
if (m && B.value !== t.value[m]) {
|
|
328
|
-
const k = (
|
|
328
|
+
const k = (H = (Z = a.value.tabs) == null ? void 0 : Z.options) == null ? void 0 : H.find(
|
|
329
329
|
(q) => {
|
|
330
|
-
var p,
|
|
331
|
-
return ((p = q.value) == null ? void 0 : p.toString()) === ((
|
|
330
|
+
var p, ae;
|
|
331
|
+
return ((p = q.value) == null ? void 0 : p.toString()) === ((ae = t.value[m]) == null ? void 0 : ae.toString());
|
|
332
332
|
}
|
|
333
333
|
);
|
|
334
|
-
|
|
335
|
-
return B.value = k.value, V(), !1;
|
|
334
|
+
k != null && k.value && (B.value = k.value, V());
|
|
336
335
|
}
|
|
337
|
-
|
|
338
|
-
},
|
|
339
|
-
clearTimeout(
|
|
336
|
+
tl(n);
|
|
337
|
+
}, pe = $(null), tl = (e = !1) => {
|
|
338
|
+
clearTimeout(pe.value), pe.value = setTimeout(() => {
|
|
340
339
|
g("update:filter", { ...t.value }, e);
|
|
341
340
|
}, 500);
|
|
342
|
-
},
|
|
341
|
+
}, sl = (e, l) => {
|
|
343
342
|
(l === a.value.tabs.key || l === "tabs") && (B.value = ""), V(e), g("filter-removed", l);
|
|
344
343
|
};
|
|
345
|
-
|
|
346
|
-
|
|
344
|
+
Ue(() => {
|
|
345
|
+
const e = { ...u.filter };
|
|
346
|
+
!e && o.value ? e.page = 1 : !e && d && (e.cursor = ""), t.value = e, _e(), rl(() => {
|
|
347
347
|
g("on-table-ready");
|
|
348
348
|
});
|
|
349
349
|
});
|
|
350
|
-
const
|
|
351
|
-
|
|
350
|
+
const ue = S(() => u.isLoading || v.value);
|
|
351
|
+
te({
|
|
352
352
|
localData: E,
|
|
353
353
|
paginationData: o,
|
|
354
|
-
tableIsLoading:
|
|
354
|
+
tableIsLoading: ue,
|
|
355
355
|
bulkPutLocalData: C,
|
|
356
|
-
bulkDeleteLocalData:
|
|
357
|
-
getLocalDataUpdatedAt:
|
|
358
|
-
getProductIdAndLastUpdatedAt:
|
|
359
|
-
syncLocalData:
|
|
356
|
+
bulkDeleteLocalData: _,
|
|
357
|
+
getLocalDataUpdatedAt: ee,
|
|
358
|
+
getProductIdAndLastUpdatedAt: le,
|
|
359
|
+
syncLocalData: oe,
|
|
360
360
|
sortByData: R
|
|
361
361
|
});
|
|
362
|
-
const
|
|
362
|
+
const ol = ({ key: e, value: l }) => {
|
|
363
363
|
Object.keys(R.value).forEach((c) => {
|
|
364
364
|
c !== e && (R.value[c] = null);
|
|
365
365
|
}), R.value[e] = l, g("update:sort-by", R.value);
|
|
366
366
|
};
|
|
367
|
-
return
|
|
367
|
+
return re(
|
|
368
368
|
() => t.value,
|
|
369
369
|
() => {
|
|
370
|
-
K.value && t.value &&
|
|
370
|
+
K.value && t.value && Ne({ ...t.value });
|
|
371
371
|
},
|
|
372
372
|
{ deep: !0, immediate: !0 }
|
|
373
|
-
),
|
|
373
|
+
), re(
|
|
374
374
|
() => u.sortBy,
|
|
375
375
|
() => {
|
|
376
|
-
K.value && u.sortBy &&
|
|
376
|
+
K.value && u.sortBy && Qe({ ...u.sortBy });
|
|
377
377
|
},
|
|
378
378
|
{ deep: !0, immediate: !0 }
|
|
379
379
|
), (e, l) => {
|
|
380
380
|
var c, n, f, m;
|
|
381
|
-
return r(), h("div",
|
|
382
|
-
|
|
381
|
+
return r(), h("div", jl, [
|
|
382
|
+
ve.value ? (r(), L(nl(F.isNewTable ? i(cl) : i(ml)), {
|
|
383
383
|
key: 0,
|
|
384
384
|
selected: F.selected,
|
|
385
385
|
"row-key": F.rowKey,
|
|
386
|
-
options:
|
|
387
|
-
"is-loading":
|
|
386
|
+
options: ve.value,
|
|
387
|
+
"is-loading": ue.value,
|
|
388
388
|
"loading-rows": z.value,
|
|
389
389
|
"row-class": F.rowClass,
|
|
390
390
|
"row-link": F.rowLink,
|
|
@@ -392,10 +392,10 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
|
|
|
392
392
|
"is-borderless": O.value.isBorderless,
|
|
393
393
|
"sort-by": F.sortBy,
|
|
394
394
|
"onUpdate:selected": l[8] || (l[8] = (s) => e.$emit("update:selected", s)),
|
|
395
|
-
"onUpdate:sortBy":
|
|
395
|
+
"onUpdate:sortBy": ol,
|
|
396
396
|
"onClick:row": l[9] || (l[9] = (s) => e.$emit("click:row", s)),
|
|
397
397
|
"onHover:cell": l[10] || (l[10] = (s) => e.$emit("hover:cell", s))
|
|
398
|
-
},
|
|
398
|
+
}, dl({
|
|
399
399
|
after: w(() => [
|
|
400
400
|
A(e.$slots, "after")
|
|
401
401
|
]),
|
|
@@ -403,10 +403,10 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
|
|
|
403
403
|
A(e.$slots, "empty")
|
|
404
404
|
]),
|
|
405
405
|
"table-header": w((s) => [
|
|
406
|
-
A(e.$slots, "table-header", Ae(
|
|
406
|
+
A(e.$slots, "table-header", Pe(Ae(s)))
|
|
407
407
|
]),
|
|
408
408
|
"table-body": w((s) => [
|
|
409
|
-
A(e.$slots, "table-body", Ae(
|
|
409
|
+
A(e.$slots, "table-body", Pe(Ae(s)))
|
|
410
410
|
]),
|
|
411
411
|
_: 2
|
|
412
412
|
}, [
|
|
@@ -416,42 +416,42 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
|
|
|
416
416
|
var s, b, x, P;
|
|
417
417
|
return [
|
|
418
418
|
A(e.$slots, "before"),
|
|
419
|
-
(s = a.value) != null && s.search || (b = a.value) != null && b.form || (x = a.value) != null && x.tabs ? (r(), h("div",
|
|
420
|
-
|
|
419
|
+
(s = a.value) != null && s.search || (b = a.value) != null && b.form || (x = a.value) != null && x.tabs ? (r(), h("div", Bl, [
|
|
420
|
+
Ge.value ? (r(), h("div", Ul, [
|
|
421
421
|
A(e.$slots, "bulk-actions", { selectedRows: F.selected })
|
|
422
|
-
])) : (r(), h("div",
|
|
423
|
-
(P = a.value) != null && P.tabs ? (r(), L(i(
|
|
422
|
+
])) : (r(), h("div", Tl, [
|
|
423
|
+
(P = a.value) != null && P.tabs ? (r(), L(i(pl), {
|
|
424
424
|
key: 0,
|
|
425
425
|
modelValue: B.value,
|
|
426
426
|
"onUpdate:modelValue": [
|
|
427
427
|
l[0] || (l[0] = (D) => B.value = D),
|
|
428
428
|
l[1] || (l[1] = (D) => V(null, !1, "", !1, !0))
|
|
429
429
|
],
|
|
430
|
-
"is-disabled":
|
|
430
|
+
"is-disabled": ue.value,
|
|
431
431
|
tabs: a.value.tabs.options,
|
|
432
432
|
variant: "pills"
|
|
433
433
|
}, null, 8, ["modelValue", "is-disabled", "tabs"])) : y("", !0)
|
|
434
434
|
])),
|
|
435
435
|
A(e.$slots, "filter-options", {}, () => {
|
|
436
|
-
var D, I, G, W, X, Y, Z, H,
|
|
436
|
+
var D, I, J, G, W, X, Y, Z, H, k, q;
|
|
437
437
|
return [
|
|
438
|
-
(D = a.value) != null && D.search || (I = a.value) != null && I.form || (
|
|
438
|
+
(D = a.value) != null && D.search || (I = a.value) != null && I.form || (J = a.value) != null && J.columnEdit ? (r(), h("div", {
|
|
439
439
|
key: 0,
|
|
440
|
-
class:
|
|
440
|
+
class: de([
|
|
441
441
|
"flex gap-3 absolute ml-auto items-center bg-oc-bg-light right-4 max-w-[calc(100%-24px)]",
|
|
442
|
-
a.value ?
|
|
442
|
+
a.value ? me.value ? "md:w-fit w-full" : "" : "w-full justify-end"
|
|
443
443
|
])
|
|
444
444
|
}, [
|
|
445
|
-
(
|
|
445
|
+
(G = a.value) != null && G.search ? (r(), L(i(fl), {
|
|
446
446
|
key: 0,
|
|
447
447
|
"is-search-only": !a.value.tabs || a.value.isSearchOnly,
|
|
448
|
-
"search-options": ((
|
|
449
|
-
"selected-option": (((
|
|
450
|
-
onAddQuery:
|
|
451
|
-
onToggle: l[2] || (l[2] = (p) =>
|
|
452
|
-
onChangeSearchKey:
|
|
448
|
+
"search-options": ((W = a.value.search) == null ? void 0 : W.options) ?? [],
|
|
449
|
+
"selected-option": (((X = t.value) == null ? void 0 : X.selectedSearchOption) || ((H = (Z = (Y = a.value.search) == null ? void 0 : Y.options) == null ? void 0 : Z[0]) == null ? void 0 : H.value)) ?? "keywords",
|
|
450
|
+
onAddQuery: We,
|
|
451
|
+
onToggle: l[2] || (l[2] = (p) => me.value = p),
|
|
452
|
+
onChangeSearchKey: el
|
|
453
453
|
}, null, 8, ["is-search-only", "search-options", "selected-option"])) : y("", !0),
|
|
454
|
-
(k = a.value) != null && k.form ? (r(), L(i(
|
|
454
|
+
(k = a.value) != null && k.form ? (r(), L(i(Te), {
|
|
455
455
|
key: 1,
|
|
456
456
|
modelValue: Q.value,
|
|
457
457
|
"onUpdate:modelValue": [
|
|
@@ -463,7 +463,7 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
|
|
|
463
463
|
"is-attach-to-body": ""
|
|
464
464
|
}, {
|
|
465
465
|
menu: w(() => [
|
|
466
|
-
Q.value ? (r(), L(i(
|
|
466
|
+
Q.value ? (r(), L(i(yl), {
|
|
467
467
|
key: 0,
|
|
468
468
|
id: F.id,
|
|
469
469
|
"json-form": a.value.form ?? [],
|
|
@@ -474,19 +474,19 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
|
|
|
474
474
|
onFilterFieldsChanged: l[4] || (l[4] = (p) => g("filter-fields-changed", p)),
|
|
475
475
|
onCancel: l[5] || (l[5] = (p) => Q.value = !1)
|
|
476
476
|
}, {
|
|
477
|
-
default: w(({ errors: p, values:
|
|
477
|
+
default: w(({ errors: p, values: ae, jsonForm: ul, updateForm: il }) => [
|
|
478
478
|
A(e.$slots, "custom-filter-form", {
|
|
479
479
|
errors: p,
|
|
480
|
-
values:
|
|
481
|
-
jsonForm:
|
|
482
|
-
updateFilter:
|
|
480
|
+
values: ae,
|
|
481
|
+
jsonForm: ul,
|
|
482
|
+
updateFilter: il
|
|
483
483
|
})
|
|
484
484
|
]),
|
|
485
485
|
_: 3
|
|
486
486
|
}, 8, ["id", "json-form", "grid", "values", "actions"])) : y("", !0)
|
|
487
487
|
]),
|
|
488
488
|
default: w(() => [
|
|
489
|
-
j(i(
|
|
489
|
+
j(i(Ke), {
|
|
490
490
|
"is-active": Q.value,
|
|
491
491
|
variant: "secondary",
|
|
492
492
|
"left-icon": "filter",
|
|
@@ -497,30 +497,30 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
|
|
|
497
497
|
]),
|
|
498
498
|
_: 3
|
|
499
499
|
}, 8, ["modelValue"])) : y("", !0),
|
|
500
|
-
a.value.columnEdit ? (r(), L(
|
|
500
|
+
a.value.columnEdit ? (r(), L(Ll, {
|
|
501
501
|
key: 2,
|
|
502
502
|
options: t.value.columnEdit,
|
|
503
503
|
headers: ((q = O.value) == null ? void 0 : q.headers) || [],
|
|
504
504
|
"local-key": a.value.columnEdit.localStorageKey,
|
|
505
|
-
onUpdateOrder:
|
|
505
|
+
onUpdateOrder: He
|
|
506
506
|
}, null, 8, ["options", "headers", "local-key"])) : y("", !0)
|
|
507
507
|
], 2)) : y("", !0)
|
|
508
508
|
];
|
|
509
509
|
})
|
|
510
510
|
])) : y("", !0),
|
|
511
|
-
j(i(
|
|
512
|
-
filters:
|
|
511
|
+
j(i(gl), {
|
|
512
|
+
filters: Ye.value,
|
|
513
513
|
queries: U.value,
|
|
514
514
|
class: "border-t border-oc-gray-200",
|
|
515
|
-
onRemoveQuery:
|
|
516
|
-
onRemoveAll:
|
|
517
|
-
onRemoveFilter:
|
|
515
|
+
onRemoveQuery: Xe,
|
|
516
|
+
onRemoveAll: ll,
|
|
517
|
+
onRemoveFilter: sl
|
|
518
518
|
}, null, 8, ["filters", "queries"])
|
|
519
519
|
];
|
|
520
520
|
}),
|
|
521
521
|
key: "0"
|
|
522
522
|
} : void 0,
|
|
523
|
-
|
|
523
|
+
ne((m = O.value) == null ? void 0 : m.headers, (s, b) => ({
|
|
524
524
|
name: s.key,
|
|
525
525
|
fn: w(({ data: x, item: P }) => [
|
|
526
526
|
A(e.$slots, s.key, {
|
|
@@ -533,33 +533,33 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
|
|
|
533
533
|
A(e.$slots, "before-pagination"),
|
|
534
534
|
i(o) || d.value ? (r(), h("div", {
|
|
535
535
|
key: 1,
|
|
536
|
-
class:
|
|
536
|
+
class: de(["flex items-center gap-3", i(o) && i(o).last_page === 1 ? "justify-end" : ""])
|
|
537
537
|
}, [
|
|
538
|
-
i(o) && !
|
|
538
|
+
i(o) && !Re.value ? (r(), L(i(bl), {
|
|
539
539
|
key: 0,
|
|
540
|
-
modelValue:
|
|
540
|
+
modelValue: M.value,
|
|
541
541
|
"onUpdate:modelValue": [
|
|
542
|
-
l[11] || (l[11] = (s) =>
|
|
543
|
-
|
|
542
|
+
l[11] || (l[11] = (s) => M.value = s),
|
|
543
|
+
al
|
|
544
544
|
],
|
|
545
545
|
class: "justify-center text-[13px]",
|
|
546
546
|
"max-page": i(o).last_page,
|
|
547
547
|
strategy: i(o).strategy,
|
|
548
548
|
"total-visible": "5"
|
|
549
549
|
}, null, 8, ["modelValue", "max-page", "strategy"])) : y("", !0),
|
|
550
|
-
d.value ? (r(), h("div",
|
|
551
|
-
j(i(
|
|
550
|
+
d.value ? (r(), h("div", Kl, [
|
|
551
|
+
j(i(Le), {
|
|
552
552
|
disabled: !d.value.prev,
|
|
553
553
|
onClick: l[12] || (l[12] = (s) => d.value.prev ? V(null, !1, d.value.prev) : null)
|
|
554
554
|
}, null, 8, ["disabled"]),
|
|
555
|
-
j(i(
|
|
555
|
+
j(i(Le), {
|
|
556
556
|
disabled: !d.value.next,
|
|
557
557
|
"is-next": "",
|
|
558
558
|
onClick: l[13] || (l[13] = (s) => d.value.next ? V(null, !1, d.value.next) : null)
|
|
559
559
|
}, null, 8, ["disabled"])
|
|
560
560
|
])) : y("", !0),
|
|
561
|
-
|
|
562
|
-
j(i(
|
|
561
|
+
ze.value ? y("", !0) : (r(), h("div", Il, [
|
|
562
|
+
j(i(kl), {
|
|
563
563
|
modelValue: z.value,
|
|
564
564
|
"onUpdate:modelValue": [
|
|
565
565
|
l[14] || (l[14] = (s) => z.value = s),
|
|
@@ -568,7 +568,7 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
|
|
|
568
568
|
label: "Item per page",
|
|
569
569
|
"is-inline-label": "",
|
|
570
570
|
"popper-options": { placement: "auto" },
|
|
571
|
-
options:
|
|
571
|
+
options: Je.value,
|
|
572
572
|
"select-text-class": "!text-[13px]"
|
|
573
573
|
}, null, 8, ["modelValue", "options"])
|
|
574
574
|
]))
|
|
@@ -578,5 +578,5 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
|
|
|
578
578
|
}
|
|
579
579
|
};
|
|
580
580
|
export {
|
|
581
|
-
|
|
581
|
+
Xl as default
|
|
582
582
|
};
|