@orchidui/core 1.20.1-13 → 1.20.1-16
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/DataTable/useDataTable.js +61 -53
- 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-zvsbyxxR.js → OcAccountSetupProgress-Blquk8FF.js} +1 -1
- package/dist/{OcComplexCalendar-C4zPiDvL.js → OcComplexCalendar-CRTXheSm.js} +1 -1
- package/dist/{OcComplexDatePicker-DINyrmYJ.js → OcComplexDatePicker-yPE47xDW.js} +1 -1
- package/dist/{OcCropper-s1rbXEtj.js → OcCropper-vsswb_yC.js} +1 -1
- package/dist/{OcDataTable-Lu6mek15.js → OcDataTable-DTw8-TG4.js} +64 -64
- package/dist/{OcDraggableList-DJ1rYiWe.js → OcDraggableList-C4rF2IOY.js} +1 -1
- package/dist/{OcEmojiPicker-BEpfwfjR.js → OcEmojiPicker-DeQ2FGiV.js} +1 -1
- package/dist/{OcFilterForm-BPbJvxPi.js → OcFilterForm-BIlAjAkp.js} +1 -1
- package/dist/{OcFilterSearch-CmpSMrxs.js → OcFilterSearch-bnEe1aJ3.js} +1 -1
- package/dist/{OcFilterSearchFor-Cyz2Q5O2.js → OcFilterSearchFor-XrceqUlt.js} +1 -1
- package/dist/{OcModalCropper-IkoTcOwk.js → OcModalCropper-DN2JKPzJ.js} +2 -2
- package/dist/{OcTimePicker-CjRTSJHa.js → OcTimePicker-G9fPdCCd.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-BGBnWbc0.js → SubPlanCard-DRuW8ITP.js} +1 -1
- package/dist/{ThumbnailSection-lbu-wHp_.js → ThumbnailSection-kSwN2UFU.js} +1 -1
- package/dist/{ThumbnailTheme-Cvm8eC4j.js → ThumbnailTheme-D90hNNO1.js} +1 -1
- package/dist/{index-CyQOM2dV.js → index-CZrx8CAS.js} +8 -8
- package/dist/index.js +1 -1
- package/package.json +1 -1
@@ -1,4 +1,4 @@
|
|
1
|
-
import { U as l, M as n, T as s, L as T, P as b, Q as d, O as o, R as i } from "../../index-
|
1
|
+
import { U as l, M as n, T as s, L as T, P as b, Q as d, O as o, R as i } from "../../index-CZrx8CAS.js";
|
2
2
|
export {
|
3
3
|
l as ExpandingHeaderRow,
|
4
4
|
n as ExpandingTable,
|
@@ -1,78 +1,79 @@
|
|
1
|
-
import { ref as
|
2
|
-
function V(
|
3
|
-
const { name: k, db:
|
1
|
+
import { ref as g, computed as v } from "vue";
|
2
|
+
function V(A) {
|
3
|
+
const { name: k, db: i, filterableFields: E, sortableFields: O, searchableFields: u } = A, f = g(k), S = g([]), y = g({}), p = g({
|
4
4
|
page: 1,
|
5
5
|
per_page: 10
|
6
|
-
}),
|
6
|
+
}), _ = g({
|
7
7
|
total: 0,
|
8
8
|
last_page: 1
|
9
|
-
}), h =
|
9
|
+
}), h = g(!1);
|
10
10
|
let D = null;
|
11
11
|
const m = v(() => {
|
12
|
-
const t = {}
|
13
|
-
|
14
|
-
|
12
|
+
const t = {};
|
13
|
+
let r = E ?? [];
|
14
|
+
return u != null && u.length && (r = [...r, ...u, "keywords"]), Object.entries(p.value).forEach(([s, e]) => {
|
15
|
+
r.includes(s) && e !== void 0 && e !== null && e !== "" && (t[s] = e);
|
15
16
|
}), t;
|
16
17
|
}), b = v(() => {
|
17
|
-
const t = {},
|
18
|
+
const t = {}, r = O ?? [];
|
18
19
|
return Object.entries(y.value).forEach(([s, e]) => {
|
19
|
-
|
20
|
+
r.includes(s) && e !== void 0 && e !== null && e !== "" && (t[s] = e);
|
20
21
|
}), t;
|
21
|
-
}),
|
22
|
-
var
|
23
|
-
let t = await
|
22
|
+
}), I = async () => {
|
23
|
+
var r;
|
24
|
+
let t = await i.table(f.value).toArray();
|
24
25
|
return m.value && Object.entries(m.value).forEach(([s, e]) => {
|
25
26
|
if (Array.isArray(e))
|
26
|
-
t = t.filter((
|
27
|
+
t = t.filter((c) => {
|
27
28
|
var o;
|
28
|
-
const a = ((o =
|
29
|
-
return e.some((
|
29
|
+
const a = ((o = c[s]) == null ? void 0 : o.toString()) ?? "";
|
30
|
+
return e.some((n) => a.toLowerCase().includes(n.toString().toLowerCase()));
|
30
31
|
});
|
31
32
|
else if (typeof e == "string")
|
32
33
|
if (s === "keywords") {
|
33
|
-
const
|
34
|
-
if (
|
34
|
+
const c = e.trim().split(/\s+/).filter((a) => a.length > 0);
|
35
|
+
if (c.length > 1)
|
35
36
|
t = t.map((a) => {
|
36
|
-
let o = 0,
|
37
|
-
return
|
38
|
-
const
|
39
|
-
|
40
|
-
var
|
41
|
-
const L = (((
|
42
|
-
L.includes(
|
37
|
+
let o = 0, n = 0;
|
38
|
+
return c.forEach((l) => {
|
39
|
+
const d = l.toLowerCase();
|
40
|
+
u == null || u.forEach((T) => {
|
41
|
+
var C;
|
42
|
+
const L = (((C = a[T]) == null ? void 0 : C.toString()) ?? "").toLowerCase();
|
43
|
+
L.includes(d) && (o += 1, n += 1, L === d ? o += 2 : new RegExp(`\\b${d}\\b`).test(L) && (o += 1));
|
43
44
|
});
|
44
|
-
}),
|
45
|
+
}), n > 0 ? { ...a, _searchScore: o, _matchCount: n } : null;
|
45
46
|
}).filter((a) => a !== null), t.sort((a, o) => o._searchScore !== a._searchScore ? o._searchScore - a._searchScore : o._matchCount - a._matchCount), t = t.map((a) => {
|
46
|
-
const { _searchScore: o, _matchCount:
|
47
|
-
return
|
47
|
+
const { _searchScore: o, _matchCount: n, ...l } = a;
|
48
|
+
return l;
|
48
49
|
});
|
49
50
|
else {
|
50
51
|
const a = e.toLowerCase();
|
51
|
-
t = t.filter((o) =>
|
52
|
-
var
|
53
|
-
return (((
|
52
|
+
t = t.filter((o) => u == null ? void 0 : u.some((n) => {
|
53
|
+
var d;
|
54
|
+
return (((d = o[n]) == null ? void 0 : d.toString()) ?? "").toLowerCase().includes(a);
|
54
55
|
}));
|
55
56
|
}
|
56
57
|
} else
|
57
|
-
t = t.filter((
|
58
|
+
t = t.filter((c) => {
|
58
59
|
var o;
|
59
|
-
return (((o =
|
60
|
+
return (((o = c[s]) == null ? void 0 : o.toString()) ?? "").toLowerCase().includes(e.toString().toLowerCase());
|
60
61
|
});
|
61
62
|
else
|
62
|
-
t = t.filter((
|
63
|
+
t = t.filter((c) => {
|
63
64
|
var a;
|
64
|
-
return ((a =
|
65
|
+
return ((a = c[s]) == null ? void 0 : a.toString()) === e.toString();
|
65
66
|
});
|
66
|
-
}), b.value && Object.keys(b.value).length > 0 && ((
|
67
|
+
}), b.value && Object.keys(b.value).length > 0 && ((r = m.value) != null && r.keywords && typeof m.value.keywords == "string" && m.value.keywords.trim().split(/\s+/).filter((e) => e.length > 0).length > 1 || Object.entries(b.value).forEach(([e, c]) => {
|
67
68
|
t = t.sort((a, o) => {
|
68
|
-
const
|
69
|
-
return typeof
|
69
|
+
const n = a[e], l = o[e], d = !isNaN(Date.parse(n)) && !isNaN(Date.parse(l));
|
70
|
+
return typeof n == "number" && typeof l == "number" ? c === "desc" ? l - n : n - l : d ? c === "desc" ? new Date(l) - new Date(n) : new Date(n) - new Date(l) : c === "desc" ? l == null ? void 0 : l.toString().localeCompare(n == null ? void 0 : n.toString()) : n == null ? void 0 : n.toString().localeCompare(l == null ? void 0 : l.toString());
|
70
71
|
});
|
71
72
|
})), t;
|
72
73
|
}, w = async () => {
|
73
|
-
|
74
|
-
const t = await
|
75
|
-
S.value = e,
|
74
|
+
i && (h.value = !0, D && clearTimeout(D), D = setTimeout(async () => {
|
75
|
+
const t = await I(), r = (parseInt(p.value.page) - 1) * parseInt(p.value.per_page), s = parseInt(p.value.per_page), e = t.slice(r, r + s);
|
76
|
+
S.value = e, _.value = {
|
76
77
|
total: t.length,
|
77
78
|
last_page: Math.ceil(t.length / s)
|
78
79
|
}, h.value = !1;
|
@@ -82,37 +83,44 @@ function V(E) {
|
|
82
83
|
// State
|
83
84
|
localData: S,
|
84
85
|
sortByData: y,
|
85
|
-
filterData:
|
86
|
-
paginationData:
|
86
|
+
filterData: p,
|
87
|
+
paginationData: _,
|
87
88
|
isLoading: h,
|
88
89
|
// Methods
|
89
90
|
bulkPutLocalData: async (t) => {
|
90
|
-
|
91
|
+
if (i) {
|
92
|
+
const r = t.map((s) => s.id).filter((s) => s !== void 0);
|
93
|
+
r.length > 0 && await i.table(f.value).bulkDelete(r), await i.table(f.value).bulkAdd(t);
|
94
|
+
}
|
95
|
+
await w();
|
91
96
|
},
|
92
97
|
bulkDeleteLocalData: async (t) => {
|
93
|
-
|
98
|
+
i && await i.table(f.value).bulkDelete(t), await w();
|
94
99
|
},
|
95
100
|
getLocalDataUpdatedAt: async () => {
|
96
|
-
if (!
|
101
|
+
if (!i || typeof i.table != "function")
|
97
102
|
return null;
|
98
103
|
try {
|
99
|
-
const t =
|
104
|
+
const t = i.table(f.value);
|
100
105
|
if (!t)
|
101
106
|
return null;
|
102
|
-
const
|
103
|
-
return (
|
107
|
+
const r = await t.orderBy("updated_at").reverse().limit(1).first();
|
108
|
+
return (r == null ? void 0 : r.updated_at) || null;
|
104
109
|
} catch (t) {
|
105
110
|
return console.error("Error getting last updated timestamp:", t), null;
|
106
111
|
}
|
107
112
|
},
|
108
|
-
|
109
|
-
if (
|
110
|
-
return await
|
113
|
+
getProductIdAndLastUpdatedAt: async () => {
|
114
|
+
if (i)
|
115
|
+
return (await i.table(f.value).toCollection().toArray()).map((r) => ({
|
116
|
+
id: r.id,
|
117
|
+
updated_at: r.updated_at
|
118
|
+
}));
|
111
119
|
},
|
112
120
|
syncLocalData: w,
|
113
121
|
// Setters
|
114
122
|
setFilter: (t) => {
|
115
|
-
|
123
|
+
p.value = { ...t }, w();
|
116
124
|
},
|
117
125
|
setSortBy: (t) => {
|
118
126
|
y.value = { ...t }, w();
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { al as r, an as s, aj as u, aq as S, ap as o, am as t, ao as d, ak as b } from "../../index-
|
2
|
-
import { default as i } from "../../OcAccountSetupProgress-
|
1
|
+
import { al as r, an as s, aj as u, aq as S, ap as o, am as t, ao as d, ak as b } from "../../index-CZrx8CAS.js";
|
2
|
+
import { default as i } from "../../OcAccountSetupProgress-Blquk8FF.js";
|
3
3
|
export {
|
4
4
|
r as AccountSetup,
|
5
5
|
i as AccountSetupProgress,
|
package/dist/Form/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as e, B as t, o, a as p, C as n, b as i, c as r, p as u, l, d as I, e as d, m as c, t as C, N as S, k as g, f as k, g as m, h as x, i as b, q as h, j as O, r as f, s as B, S as G, n as R } from "../index-
|
1
|
+
import { _ as e, B as t, o, a as p, C as n, b as i, c as r, p as u, l, d as I, e as d, m as c, t as C, N as S, k as g, f as k, g as m, h as x, i as b, q as h, j as O, r as f, s as B, S as G, n as R } from "../index-CZrx8CAS.js";
|
2
2
|
import { T as F } from "../OcToggle-DOfA-DZ8.js";
|
3
3
|
export {
|
4
4
|
e as BaseInput,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { createElementBlock as r, openBlock as n, createElementVNode as e, createVNode as o, createTextVNode as d, unref as l, toDisplayString as a, normalizeStyle as u } from "vue";
|
2
|
-
import "./index-
|
2
|
+
import "./index-CZrx8CAS.js";
|
3
3
|
import { _ as c } from "./OcIcon-CBf___w1.js";
|
4
4
|
const x = { class: "border relative z-10 border-oc-gray-200 shadow-normal bg-white rounded p-2 flex flex-col gap-y-2" }, p = { class: "py-2 px-3 gap-x-3 flex items-center" }, f = { class: "text-base flex-1 font-medium flex items-center gap-x-2" }, m = { class: "px-3 pb-3 flex flex-col gap-y-3" }, h = { class: "relative bg-oc-accent-1-50 rounded-full h-2" }, _ = { class: "flex items-center gap-x-3" }, g = { class: "text-sm text-oc-text-400" }, N = {
|
5
5
|
__name: "OcAccountSetupProgress",
|