@orchidui/core 1.21.1-0 → 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-BozM5592.js → OcAccountSetupProgress-XIbekhtd.js} +1 -1
- package/dist/{OcComplexCalendar-BcPrl2lw.js → OcComplexCalendar-Bt8mSXtc.js} +1 -1
- package/dist/{OcComplexDatePicker-BoRLa7Ll.js → OcComplexDatePicker-D7zpXjdE.js} +1 -1
- package/dist/{OcCropper-jOPi-vQe.js → OcCropper-BjSNzRL7.js} +1 -1
- package/dist/{OcDataTable-BppeYA6s.js → OcDataTable-HU_9HyCj.js} +158 -157
- package/dist/{OcDraggableList-BcHaiFC2.js → OcDraggableList-BmVGxZV8.js} +1 -1
- package/dist/{OcEmojiPicker-DEswh6Jo.js → OcEmojiPicker-BSqUZY7I.js} +1 -1
- package/dist/{OcFilterForm-CDSUoOdK.js → OcFilterForm-CDycE6if.js} +1 -1
- package/dist/{OcFilterSearch-BC1PfXSv.js → OcFilterSearch-CZuzDu6Y.js} +1 -1
- package/dist/{OcFilterSearchFor-Br2GNcig.js → OcFilterSearchFor-Br5fhk5A.js} +1 -1
- package/dist/{OcModalCropper-D98_QAdQ.js → OcModalCropper-lCGi4Onl.js} +2 -2
- package/dist/{OcTimePicker-RRPqnpCD.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-CvBRz6Lh.js → SubPlanCard-3qZPN1RA.js} +1 -1
- package/dist/{ThumbnailSection-DXnqC_X6.js → ThumbnailSection--5jwTIXB.js} +1 -1
- package/dist/{ThumbnailTheme-C-qBQSdJ.js → ThumbnailTheme-CmqBAcYn.js} +1 -1
- package/dist/{index-BTLnFSoD.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,86 +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
334
|
k != null && k.value && (B.value = k.value, V());
|
|
335
335
|
}
|
|
336
|
-
|
|
337
|
-
},
|
|
338
|
-
clearTimeout(
|
|
336
|
+
tl(n);
|
|
337
|
+
}, pe = $(null), tl = (e = !1) => {
|
|
338
|
+
clearTimeout(pe.value), pe.value = setTimeout(() => {
|
|
339
339
|
g("update:filter", { ...t.value }, e);
|
|
340
340
|
}, 500);
|
|
341
|
-
},
|
|
341
|
+
}, sl = (e, l) => {
|
|
342
342
|
(l === a.value.tabs.key || l === "tabs") && (B.value = ""), V(e), g("filter-removed", l);
|
|
343
343
|
};
|
|
344
|
-
|
|
345
|
-
|
|
344
|
+
Ue(() => {
|
|
345
|
+
const e = { ...u.filter };
|
|
346
|
+
!e && o.value ? e.page = 1 : !e && d && (e.cursor = ""), t.value = e, _e(), rl(() => {
|
|
346
347
|
g("on-table-ready");
|
|
347
348
|
});
|
|
348
349
|
});
|
|
349
|
-
const
|
|
350
|
-
|
|
350
|
+
const ue = S(() => u.isLoading || v.value);
|
|
351
|
+
te({
|
|
351
352
|
localData: E,
|
|
352
353
|
paginationData: o,
|
|
353
|
-
tableIsLoading:
|
|
354
|
+
tableIsLoading: ue,
|
|
354
355
|
bulkPutLocalData: C,
|
|
355
|
-
bulkDeleteLocalData:
|
|
356
|
-
getLocalDataUpdatedAt:
|
|
357
|
-
getProductIdAndLastUpdatedAt:
|
|
358
|
-
syncLocalData:
|
|
356
|
+
bulkDeleteLocalData: _,
|
|
357
|
+
getLocalDataUpdatedAt: ee,
|
|
358
|
+
getProductIdAndLastUpdatedAt: le,
|
|
359
|
+
syncLocalData: oe,
|
|
359
360
|
sortByData: R
|
|
360
361
|
});
|
|
361
|
-
const
|
|
362
|
+
const ol = ({ key: e, value: l }) => {
|
|
362
363
|
Object.keys(R.value).forEach((c) => {
|
|
363
364
|
c !== e && (R.value[c] = null);
|
|
364
365
|
}), R.value[e] = l, g("update:sort-by", R.value);
|
|
365
366
|
};
|
|
366
|
-
return
|
|
367
|
+
return re(
|
|
367
368
|
() => t.value,
|
|
368
369
|
() => {
|
|
369
|
-
K.value && t.value &&
|
|
370
|
+
K.value && t.value && Ne({ ...t.value });
|
|
370
371
|
},
|
|
371
372
|
{ deep: !0, immediate: !0 }
|
|
372
|
-
),
|
|
373
|
+
), re(
|
|
373
374
|
() => u.sortBy,
|
|
374
375
|
() => {
|
|
375
|
-
K.value && u.sortBy &&
|
|
376
|
+
K.value && u.sortBy && Qe({ ...u.sortBy });
|
|
376
377
|
},
|
|
377
378
|
{ deep: !0, immediate: !0 }
|
|
378
379
|
), (e, l) => {
|
|
379
380
|
var c, n, f, m;
|
|
380
|
-
return r(), h("div",
|
|
381
|
-
|
|
381
|
+
return r(), h("div", jl, [
|
|
382
|
+
ve.value ? (r(), L(nl(F.isNewTable ? i(cl) : i(ml)), {
|
|
382
383
|
key: 0,
|
|
383
384
|
selected: F.selected,
|
|
384
385
|
"row-key": F.rowKey,
|
|
385
|
-
options:
|
|
386
|
-
"is-loading":
|
|
386
|
+
options: ve.value,
|
|
387
|
+
"is-loading": ue.value,
|
|
387
388
|
"loading-rows": z.value,
|
|
388
389
|
"row-class": F.rowClass,
|
|
389
390
|
"row-link": F.rowLink,
|
|
@@ -391,10 +392,10 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
|
|
|
391
392
|
"is-borderless": O.value.isBorderless,
|
|
392
393
|
"sort-by": F.sortBy,
|
|
393
394
|
"onUpdate:selected": l[8] || (l[8] = (s) => e.$emit("update:selected", s)),
|
|
394
|
-
"onUpdate:sortBy":
|
|
395
|
+
"onUpdate:sortBy": ol,
|
|
395
396
|
"onClick:row": l[9] || (l[9] = (s) => e.$emit("click:row", s)),
|
|
396
397
|
"onHover:cell": l[10] || (l[10] = (s) => e.$emit("hover:cell", s))
|
|
397
|
-
},
|
|
398
|
+
}, dl({
|
|
398
399
|
after: w(() => [
|
|
399
400
|
A(e.$slots, "after")
|
|
400
401
|
]),
|
|
@@ -402,10 +403,10 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
|
|
|
402
403
|
A(e.$slots, "empty")
|
|
403
404
|
]),
|
|
404
405
|
"table-header": w((s) => [
|
|
405
|
-
A(e.$slots, "table-header", Ae(
|
|
406
|
+
A(e.$slots, "table-header", Pe(Ae(s)))
|
|
406
407
|
]),
|
|
407
408
|
"table-body": w((s) => [
|
|
408
|
-
A(e.$slots, "table-body", Ae(
|
|
409
|
+
A(e.$slots, "table-body", Pe(Ae(s)))
|
|
409
410
|
]),
|
|
410
411
|
_: 2
|
|
411
412
|
}, [
|
|
@@ -415,42 +416,42 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
|
|
|
415
416
|
var s, b, x, P;
|
|
416
417
|
return [
|
|
417
418
|
A(e.$slots, "before"),
|
|
418
|
-
(s = a.value) != null && s.search || (b = a.value) != null && b.form || (x = a.value) != null && x.tabs ? (r(), h("div",
|
|
419
|
-
|
|
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, [
|
|
420
421
|
A(e.$slots, "bulk-actions", { selectedRows: F.selected })
|
|
421
|
-
])) : (r(), h("div",
|
|
422
|
-
(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), {
|
|
423
424
|
key: 0,
|
|
424
425
|
modelValue: B.value,
|
|
425
426
|
"onUpdate:modelValue": [
|
|
426
427
|
l[0] || (l[0] = (D) => B.value = D),
|
|
427
428
|
l[1] || (l[1] = (D) => V(null, !1, "", !1, !0))
|
|
428
429
|
],
|
|
429
|
-
"is-disabled":
|
|
430
|
+
"is-disabled": ue.value,
|
|
430
431
|
tabs: a.value.tabs.options,
|
|
431
432
|
variant: "pills"
|
|
432
433
|
}, null, 8, ["modelValue", "is-disabled", "tabs"])) : y("", !0)
|
|
433
434
|
])),
|
|
434
435
|
A(e.$slots, "filter-options", {}, () => {
|
|
435
|
-
var D, I, G, W, X, Y, Z, H,
|
|
436
|
+
var D, I, J, G, W, X, Y, Z, H, k, q;
|
|
436
437
|
return [
|
|
437
|
-
(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", {
|
|
438
439
|
key: 0,
|
|
439
|
-
class:
|
|
440
|
+
class: de([
|
|
440
441
|
"flex gap-3 absolute ml-auto items-center bg-oc-bg-light right-4 max-w-[calc(100%-24px)]",
|
|
441
|
-
a.value ?
|
|
442
|
+
a.value ? me.value ? "md:w-fit w-full" : "" : "w-full justify-end"
|
|
442
443
|
])
|
|
443
444
|
}, [
|
|
444
|
-
(
|
|
445
|
+
(G = a.value) != null && G.search ? (r(), L(i(fl), {
|
|
445
446
|
key: 0,
|
|
446
447
|
"is-search-only": !a.value.tabs || a.value.isSearchOnly,
|
|
447
|
-
"search-options": ((
|
|
448
|
-
"selected-option": (((
|
|
449
|
-
onAddQuery:
|
|
450
|
-
onToggle: l[2] || (l[2] = (p) =>
|
|
451
|
-
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
|
|
452
453
|
}, null, 8, ["is-search-only", "search-options", "selected-option"])) : y("", !0),
|
|
453
|
-
(k = a.value) != null && k.form ? (r(), L(i(
|
|
454
|
+
(k = a.value) != null && k.form ? (r(), L(i(Te), {
|
|
454
455
|
key: 1,
|
|
455
456
|
modelValue: Q.value,
|
|
456
457
|
"onUpdate:modelValue": [
|
|
@@ -462,7 +463,7 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
|
|
|
462
463
|
"is-attach-to-body": ""
|
|
463
464
|
}, {
|
|
464
465
|
menu: w(() => [
|
|
465
|
-
Q.value ? (r(), L(i(
|
|
466
|
+
Q.value ? (r(), L(i(yl), {
|
|
466
467
|
key: 0,
|
|
467
468
|
id: F.id,
|
|
468
469
|
"json-form": a.value.form ?? [],
|
|
@@ -473,19 +474,19 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
|
|
|
473
474
|
onFilterFieldsChanged: l[4] || (l[4] = (p) => g("filter-fields-changed", p)),
|
|
474
475
|
onCancel: l[5] || (l[5] = (p) => Q.value = !1)
|
|
475
476
|
}, {
|
|
476
|
-
default: w(({ errors: p, values:
|
|
477
|
+
default: w(({ errors: p, values: ae, jsonForm: ul, updateForm: il }) => [
|
|
477
478
|
A(e.$slots, "custom-filter-form", {
|
|
478
479
|
errors: p,
|
|
479
|
-
values:
|
|
480
|
-
jsonForm:
|
|
481
|
-
updateFilter:
|
|
480
|
+
values: ae,
|
|
481
|
+
jsonForm: ul,
|
|
482
|
+
updateFilter: il
|
|
482
483
|
})
|
|
483
484
|
]),
|
|
484
485
|
_: 3
|
|
485
486
|
}, 8, ["id", "json-form", "grid", "values", "actions"])) : y("", !0)
|
|
486
487
|
]),
|
|
487
488
|
default: w(() => [
|
|
488
|
-
j(i(
|
|
489
|
+
j(i(Ke), {
|
|
489
490
|
"is-active": Q.value,
|
|
490
491
|
variant: "secondary",
|
|
491
492
|
"left-icon": "filter",
|
|
@@ -496,30 +497,30 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
|
|
|
496
497
|
]),
|
|
497
498
|
_: 3
|
|
498
499
|
}, 8, ["modelValue"])) : y("", !0),
|
|
499
|
-
a.value.columnEdit ? (r(), L(
|
|
500
|
+
a.value.columnEdit ? (r(), L(Ll, {
|
|
500
501
|
key: 2,
|
|
501
502
|
options: t.value.columnEdit,
|
|
502
503
|
headers: ((q = O.value) == null ? void 0 : q.headers) || [],
|
|
503
504
|
"local-key": a.value.columnEdit.localStorageKey,
|
|
504
|
-
onUpdateOrder:
|
|
505
|
+
onUpdateOrder: He
|
|
505
506
|
}, null, 8, ["options", "headers", "local-key"])) : y("", !0)
|
|
506
507
|
], 2)) : y("", !0)
|
|
507
508
|
];
|
|
508
509
|
})
|
|
509
510
|
])) : y("", !0),
|
|
510
|
-
j(i(
|
|
511
|
-
filters:
|
|
511
|
+
j(i(gl), {
|
|
512
|
+
filters: Ye.value,
|
|
512
513
|
queries: U.value,
|
|
513
514
|
class: "border-t border-oc-gray-200",
|
|
514
|
-
onRemoveQuery:
|
|
515
|
-
onRemoveAll:
|
|
516
|
-
onRemoveFilter:
|
|
515
|
+
onRemoveQuery: Xe,
|
|
516
|
+
onRemoveAll: ll,
|
|
517
|
+
onRemoveFilter: sl
|
|
517
518
|
}, null, 8, ["filters", "queries"])
|
|
518
519
|
];
|
|
519
520
|
}),
|
|
520
521
|
key: "0"
|
|
521
522
|
} : void 0,
|
|
522
|
-
|
|
523
|
+
ne((m = O.value) == null ? void 0 : m.headers, (s, b) => ({
|
|
523
524
|
name: s.key,
|
|
524
525
|
fn: w(({ data: x, item: P }) => [
|
|
525
526
|
A(e.$slots, s.key, {
|
|
@@ -532,33 +533,33 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
|
|
|
532
533
|
A(e.$slots, "before-pagination"),
|
|
533
534
|
i(o) || d.value ? (r(), h("div", {
|
|
534
535
|
key: 1,
|
|
535
|
-
class:
|
|
536
|
+
class: de(["flex items-center gap-3", i(o) && i(o).last_page === 1 ? "justify-end" : ""])
|
|
536
537
|
}, [
|
|
537
|
-
i(o) && !
|
|
538
|
+
i(o) && !Re.value ? (r(), L(i(bl), {
|
|
538
539
|
key: 0,
|
|
539
|
-
modelValue:
|
|
540
|
+
modelValue: M.value,
|
|
540
541
|
"onUpdate:modelValue": [
|
|
541
|
-
l[11] || (l[11] = (s) =>
|
|
542
|
-
|
|
542
|
+
l[11] || (l[11] = (s) => M.value = s),
|
|
543
|
+
al
|
|
543
544
|
],
|
|
544
545
|
class: "justify-center text-[13px]",
|
|
545
546
|
"max-page": i(o).last_page,
|
|
546
547
|
strategy: i(o).strategy,
|
|
547
548
|
"total-visible": "5"
|
|
548
549
|
}, null, 8, ["modelValue", "max-page", "strategy"])) : y("", !0),
|
|
549
|
-
d.value ? (r(), h("div",
|
|
550
|
-
j(i(
|
|
550
|
+
d.value ? (r(), h("div", Kl, [
|
|
551
|
+
j(i(Le), {
|
|
551
552
|
disabled: !d.value.prev,
|
|
552
553
|
onClick: l[12] || (l[12] = (s) => d.value.prev ? V(null, !1, d.value.prev) : null)
|
|
553
554
|
}, null, 8, ["disabled"]),
|
|
554
|
-
j(i(
|
|
555
|
+
j(i(Le), {
|
|
555
556
|
disabled: !d.value.next,
|
|
556
557
|
"is-next": "",
|
|
557
558
|
onClick: l[13] || (l[13] = (s) => d.value.next ? V(null, !1, d.value.next) : null)
|
|
558
559
|
}, null, 8, ["disabled"])
|
|
559
560
|
])) : y("", !0),
|
|
560
|
-
|
|
561
|
-
j(i(
|
|
561
|
+
ze.value ? y("", !0) : (r(), h("div", Il, [
|
|
562
|
+
j(i(kl), {
|
|
562
563
|
modelValue: z.value,
|
|
563
564
|
"onUpdate:modelValue": [
|
|
564
565
|
l[14] || (l[14] = (s) => z.value = s),
|
|
@@ -567,7 +568,7 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
|
|
|
567
568
|
label: "Item per page",
|
|
568
569
|
"is-inline-label": "",
|
|
569
570
|
"popper-options": { placement: "auto" },
|
|
570
|
-
options:
|
|
571
|
+
options: Je.value,
|
|
571
572
|
"select-text-class": "!text-[13px]"
|
|
572
573
|
}, null, 8, ["modelValue", "options"])
|
|
573
574
|
]))
|
|
@@ -577,5 +578,5 @@ const Dl = { class: "p-5 gap-y-4 text-sm flex w-[250px] flex-col" }, El = {
|
|
|
577
578
|
}
|
|
578
579
|
};
|
|
579
580
|
export {
|
|
580
|
-
|
|
581
|
+
Xl as default
|
|
581
582
|
};
|