@orchidui/core 1.8.1-96 → 1.8.1-98
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DataDisplay/CustomerCard/OcCustomerCard.js +1 -1
- package/dist/DataDisplay/FloatContent/OcFloatContent.js +1 -1
- package/dist/DataDisplay/InfoCard/OcInfoCard.js +1 -1
- package/dist/DataDisplay/ListDetail/OcListDetail.js +1 -1
- package/dist/DataDisplay/ListItem/OcListItem.js +1 -1
- package/dist/DataDisplay/OnboardingListItem/OcOnboardingListItem.js +1 -1
- package/dist/DataDisplay/Overview/OcOverview.js +1 -1
- package/dist/DataDisplay/Pagination/OcPagination.js +1 -1
- package/dist/DataDisplay/Table/OcTable.js +1 -1
- package/dist/DataDisplay/TransferSummary/OcTransferSummary.js +1 -1
- package/dist/DataTable/useDataTable.js +81 -0
- package/dist/DataTable/utils/filterUtils.js +57 -0
- package/dist/DataTable/utils/paginationUtils.js +26 -0
- package/dist/DataTable/utils/storageUtils.js +11 -0
- 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/Toggle/OcToggle.js +1 -1
- package/dist/Form/index.js +2 -2
- package/dist/FormBuilder/OcFormBuilder.js +1 -1
- package/dist/{OcAccountSetupProgress-fk-PE00m.js → OcAccountSetupProgress-C73sJuwM.js} +1 -1
- package/dist/{OcComplexCalendar-BRRzdqRM.js → OcComplexCalendar-ClFb15rl.js} +1 -1
- package/dist/{OcComplexDatePicker-jXJ8M2gG.js → OcComplexDatePicker-CFhMH5H6.js} +1 -1
- package/dist/{OcCropper-D8_KYwgc.js → OcCropper-CgxtOYSE.js} +1 -1
- package/dist/OcDataTable-DElje0Is.js +540 -0
- package/dist/{OcDraggableList-DrZ8zHi_.js → OcDraggableList-BJH4x4Q8.js} +1 -1
- package/dist/{OcEmojiPicker-C9yhF03q.js → OcEmojiPicker-CAIlTxe3.js} +12 -14
- package/dist/{OcFilterForm-2SH7elEv.js → OcFilterForm-mpS3jm_G.js} +17 -19
- package/dist/{OcFilterSearch-4zBhbcBD.js → OcFilterSearch-SU-xsa_Y.js} +7 -12
- package/dist/{OcFilterSearchFor-Cmmudlpk.js → OcFilterSearchFor-B3xBoh2i.js} +24 -18
- package/dist/{OcModalCropper-B3-W44XM.js → OcModalCropper-D8Dn1hu6.js} +2 -2
- package/dist/{OcTimePicker-DsLVi2Wh.js → OcTimePicker-CylE6k53.js} +1 -1
- package/dist/{OcToggle-ClxJyBZe.js → OcToggle-DOfA-DZ8.js} +10 -15
- 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-CA43U6o6.js → SubPlanCard-CUGjVG9p.js} +1 -1
- package/dist/{ThumbnailSection-BHvgeuIm.js → ThumbnailSection-DDZ4nHvM.js} +1 -1
- package/dist/{ThumbnailTheme-U9LGqEpQ.js → ThumbnailTheme-BPW_bXq7.js} +4 -7
- package/dist/core.css +1 -1
- package/dist/{index-DZXv72gg.js → index-CUSl7Kjq.js} +174 -156
- package/dist/index.js +16 -14
- package/package.json +1 -1
- package/dist/OcDataTable-jrDfU0Ix.js +0 -590
@@ -1,4 +1,4 @@
|
|
1
|
-
import { T as l, L as n, R as s, K as T, O as b, P as d, M as o, Q as i } from "../../index-
|
1
|
+
import { T as l, L as n, R as s, K as T, O as b, P as d, M as o, Q as i } from "../../index-CUSl7Kjq.js";
|
2
2
|
export {
|
3
3
|
l as ExpandingHeaderRow,
|
4
4
|
n as ExpandingTable,
|
@@ -0,0 +1,81 @@
|
|
1
|
+
import { ref as s } from "vue";
|
2
|
+
function I(m) {
|
3
|
+
const { id: L, name: w, localDb: _ } = m, B = s(L), r = s(w), i = s(_), v = s([]), l = s([]), f = s({}), D = s({
|
4
|
+
total: 0,
|
5
|
+
last_page: 0
|
6
|
+
}), p = s(!1);
|
7
|
+
let g = null;
|
8
|
+
const y = async () => {
|
9
|
+
p.value = !0, g && clearTimeout(g), g = setTimeout(async () => {
|
10
|
+
let e = i.value.table(r.value);
|
11
|
+
const t = C();
|
12
|
+
t.filter && Object.entries(t.filter).forEach(([c, o]) => {
|
13
|
+
o && Array.isArray(o) ? e = e.filter((d) => {
|
14
|
+
const u = d[c];
|
15
|
+
return o.some((b) => typeof b == "string" && typeof u == "string" ? u.toLowerCase().includes(b.toLowerCase()) : u === b);
|
16
|
+
}) : o && typeof o == "string" ? e = e.filter((d) => {
|
17
|
+
const u = d[c];
|
18
|
+
return typeof u == "string" && u.toLowerCase().includes(o.toLowerCase());
|
19
|
+
}) : o != null && (e = e.filter((d) => d[c] === o));
|
20
|
+
}), t.sortBy && t.sortBy.length > 0 && t.sortBy.forEach((c) => {
|
21
|
+
e = e.sortBy(c.column), c.direction === "desc" && (e = e.reverse());
|
22
|
+
});
|
23
|
+
const a = await e.toArray();
|
24
|
+
v.value = a;
|
25
|
+
const n = await i.value.table(r.value).count();
|
26
|
+
D.value = {
|
27
|
+
total: n,
|
28
|
+
page: t.page,
|
29
|
+
per_page: t.per_page,
|
30
|
+
last_page: Math.ceil(n / t.per_page)
|
31
|
+
}, p.value = !1;
|
32
|
+
}, 300);
|
33
|
+
}, C = () => {
|
34
|
+
const e = {}, t = ["columnEdit", "page", "per_page"];
|
35
|
+
return Object.entries(f.value).forEach(([a, n]) => {
|
36
|
+
!t.includes(a) && n !== void 0 && n !== null && n !== "" && (e[a] = n);
|
37
|
+
}), {
|
38
|
+
filter: e,
|
39
|
+
sortBy: l.value,
|
40
|
+
page: f.value.page,
|
41
|
+
per_page: f.value.per_page
|
42
|
+
};
|
43
|
+
};
|
44
|
+
return {
|
45
|
+
// State
|
46
|
+
sortBy: l,
|
47
|
+
localData: v,
|
48
|
+
dataTableId: B,
|
49
|
+
dbTablename: r,
|
50
|
+
paginationData: D,
|
51
|
+
isLoading: p,
|
52
|
+
// Methods
|
53
|
+
toggleSort: (e) => {
|
54
|
+
const t = l.value.find((a) => a.column === e);
|
55
|
+
t ? t.direction === "asc" ? l.value = l.value.map(
|
56
|
+
(a) => a.column === e ? { ...a, direction: "desc" } : a
|
57
|
+
) : l.value = l.value.filter((a) => a.column !== e) : l.value = [...l.value, { column: e, direction: "asc" }], y();
|
58
|
+
},
|
59
|
+
bulkPutLocalData: async (e) => {
|
60
|
+
await i.value.table(r.value).bulkPut(e);
|
61
|
+
},
|
62
|
+
bulkDeleteLocalData: async (e) => {
|
63
|
+
await i.value.table(r.value).bulkDelete(e);
|
64
|
+
},
|
65
|
+
getLocalDataUpdatedAt: async () => {
|
66
|
+
const e = await i.value.table(r.value).orderBy("updated_at").reverse().limit(1).first();
|
67
|
+
return e == null ? void 0 : e.updated_at;
|
68
|
+
},
|
69
|
+
getLocalDataIds: async () => await i.value.table(r.value).toCollection().primaryKeys(),
|
70
|
+
// Setters
|
71
|
+
setFilter: (e) => {
|
72
|
+
f.value = { ...e }, y();
|
73
|
+
},
|
74
|
+
setSortBy: (e) => {
|
75
|
+
l.value = { ...e }, y();
|
76
|
+
}
|
77
|
+
};
|
78
|
+
}
|
79
|
+
export {
|
80
|
+
I as useDataTable
|
81
|
+
};
|
@@ -0,0 +1,57 @@
|
|
1
|
+
import S from "dayjs";
|
2
|
+
const V = (c) => {
|
3
|
+
let e = [];
|
4
|
+
return c.forEach((k) => {
|
5
|
+
e.push(k.key);
|
6
|
+
}), e;
|
7
|
+
}, s = (c, e) => {
|
8
|
+
if (!c) return [];
|
9
|
+
let k = [];
|
10
|
+
return Object.keys(c).forEach((a) => {
|
11
|
+
var Y, h, E, M, j, x, I, K;
|
12
|
+
let u = (Y = e == null ? void 0 : e.tabs) == null ? void 0 : Y.key;
|
13
|
+
const _ = (h = e == null ? void 0 : e.search) == null ? void 0 : h.key, F = ((E = e == null ? void 0 : e.per_page) == null ? void 0 : E.key) ?? "per_page";
|
14
|
+
if ((M = e.form) == null || M.find((A) => {
|
15
|
+
A.name === u && (u = "");
|
16
|
+
}), a !== "page" && a !== "cursor" && a !== F && a !== u && a !== _) {
|
17
|
+
let A = null, y = (j = e.form) == null ? void 0 : j.find((b) => {
|
18
|
+
if (typeof b.name == "object") {
|
19
|
+
let d = !1;
|
20
|
+
return b.name.forEach((g) => {
|
21
|
+
g.key === a && (d = !0, A = V(b.name));
|
22
|
+
}), d;
|
23
|
+
} else
|
24
|
+
return b.name === a;
|
25
|
+
}), m = "";
|
26
|
+
if (y && c[a]) {
|
27
|
+
if (typeof y.name == "object" ? (x = y.name) == null || x.forEach((d) => {
|
28
|
+
m && (m += " - "), m += c[d.key];
|
29
|
+
}) : m = c[a], y.props.options && (m = (y.props.multiple ? c[a] : [c[a]]).map(
|
30
|
+
(g) => {
|
31
|
+
var N;
|
32
|
+
return (N = y.props.options.find(({ value: B }) => B === g)) == null ? void 0 : N.label;
|
33
|
+
}
|
34
|
+
).join(", ")), y.type === "RangeInput" && Array.isArray(c[a]) && (m = c[a][0].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + " - " + c[a][1].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")), y.type === "DatePicker")
|
35
|
+
if (((I = y == null ? void 0 : y.props) == null ? void 0 : I.type) === "range" && y.name && y.name[1]) {
|
36
|
+
const d = S(c[y.name[0].key]).format("MM/DD/YYYY"), g = S(c[y.name[1].key]).format("MM/DD/YYYY");
|
37
|
+
m = d === g ? d : d + " - " + g;
|
38
|
+
} else m = S(c[y.name]).format("MM/DD/YYYY");
|
39
|
+
let b = `${(K = y == null ? void 0 : y.props) == null ? void 0 : K.label} : ${m}`;
|
40
|
+
y && y.name && typeof y.name == "object" && k.find((g) => g.name === A[0]) && (b = ""), k.push({
|
41
|
+
label: b,
|
42
|
+
name: a,
|
43
|
+
multiNames: A
|
44
|
+
});
|
45
|
+
}
|
46
|
+
}
|
47
|
+
}), k;
|
48
|
+
}, L = (c, e, k, a) => {
|
49
|
+
var _, F, Y, h, E, M, j;
|
50
|
+
const u = {};
|
51
|
+
return e ? c.page = 1 : c.cursor = "", (_ = e == null ? void 0 : e.per_page) != null && _.key ? u[(F = e == null ? void 0 : e.per_page) == null ? void 0 : F.key] = k : u.per_page = k, (Y = e == null ? void 0 : e.tabs) != null && Y.key ? u[(h = e == null ? void 0 : e.tabs) == null ? void 0 : h.key] = a : u.tabs = a, (E = e == null ? void 0 : e.columnEdit) != null && E.key && (u[(M = e == null ? void 0 : e.columnEdit) == null ? void 0 : M.key] = c[(j = e == null ? void 0 : e.columnEdit) == null ? void 0 : j.key]), u;
|
52
|
+
};
|
53
|
+
export {
|
54
|
+
L as clearAllFilters,
|
55
|
+
s as formatFilterDisplay,
|
56
|
+
V as getFilterFieldNames
|
57
|
+
};
|
@@ -0,0 +1,26 @@
|
|
1
|
+
const v = (l, e) => {
|
2
|
+
let a = l ?? [
|
3
|
+
{ label: "10", value: 10 },
|
4
|
+
{ label: "15", value: 15 },
|
5
|
+
{ label: "20", value: 20 },
|
6
|
+
{ label: "25", value: 25 },
|
7
|
+
{ label: "40", value: 40 },
|
8
|
+
{ label: "50", value: 50 },
|
9
|
+
{ label: "75", value: 75 },
|
10
|
+
{ label: "99", value: 99 }
|
11
|
+
];
|
12
|
+
if (e) {
|
13
|
+
const t = e.total < 100 ? e.total : 100;
|
14
|
+
t > 10 && (a = a.filter((u) => u.value <= t));
|
15
|
+
}
|
16
|
+
return [...new Set(a)];
|
17
|
+
}, b = (l) => l == null ? void 0 : l.map(
|
18
|
+
(e) => ({
|
19
|
+
label: `${e}`,
|
20
|
+
value: e
|
21
|
+
})
|
22
|
+
);
|
23
|
+
export {
|
24
|
+
b as formatCustomItemsPerPageOptions,
|
25
|
+
v as getItemsPerPageOptions
|
26
|
+
};
|
@@ -0,0 +1,11 @@
|
|
1
|
+
const o = (e, t) => {
|
2
|
+
typeof window < "u" && localStorage.setItem(e, t);
|
3
|
+
}, r = (e) => typeof window < "u" ? localStorage.getItem(e) : null, n = (e, t) => {
|
4
|
+
e && o(e, JSON.stringify(t));
|
5
|
+
}, l = (e) => e ? r(e) : null;
|
6
|
+
export {
|
7
|
+
l as getFilterFromLocalStorage,
|
8
|
+
r as getFromLocalStorage,
|
9
|
+
n as saveFilterToLocalStorage,
|
10
|
+
o as setInLocalStorage
|
11
|
+
};
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { ak as r, am as s, ai as u, ap as S, ao as o, al as t, an as d, aj as b } from "../../index-
|
2
|
-
import { default as n } from "../../OcAccountSetupProgress-
|
1
|
+
import { ak as r, am as s, ai as u, ap as S, ao as o, al as t, an as d, aj as b } from "../../index-CUSl7Kjq.js";
|
2
|
+
import { default as n } from "../../OcAccountSetupProgress-C73sJuwM.js";
|
3
3
|
export {
|
4
4
|
r as AccountSetup,
|
5
5
|
n as AccountSetupProgress,
|
package/dist/Form/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
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-
|
2
|
-
import { T as F } from "../OcToggle-
|
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-CUSl7Kjq.js";
|
2
|
+
import { T as F } from "../OcToggle-DOfA-DZ8.js";
|
3
3
|
export {
|
4
4
|
e as BaseInput,
|
5
5
|
t as Button,
|
@@ -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-CUSl7Kjq.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",
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ref as x, createElementBlock as o, openBlock as n, createElementVNode as b, createCommentVNode as i, createVNode as d, Fragment as V, renderList as v, normalizeClass as k, unref as a, toDisplayString as p, mergeProps as m } from "vue";
|
2
2
|
import { DatePicker as B } from "v-calendar";
|
3
3
|
import r from "dayjs";
|
4
|
-
import { B as f } from "./index-
|
4
|
+
import { B as f } from "./index-CUSl7Kjq.js";
|
5
5
|
const C = { class: "flex flex-col p-6 gap-y-7 w-fit shadow-normal rounded" }, h = { class: "flex gap-x-7" }, M = {
|
6
6
|
key: 0,
|
7
7
|
class: "flex flex-col py-2 gap-y-4"
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ref as s, createBlock as d, openBlock as m, unref as t, withCtx as l, createVNode as n } from "vue";
|
2
|
-
import { aG as c, _ as f, az as b, d as p, aH as V } from "./index-
|
2
|
+
import { aG as c, _ as f, az as b, d as p, aH as V } from "./index-CUSl7Kjq.js";
|
3
3
|
import r from "dayjs";
|
4
4
|
const x = {
|
5
5
|
__name: "OcComplexDatePicker",
|