@orchidui/core 1.8.1-1 → 1.8.1-100
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 +2 -2
- package/dist/DataDisplay/FloatContent/OcFloatContent.js +1 -1
- package/dist/DataDisplay/HorizontalProgressbar/OcHorizontalProgressbar.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/ProgressBar/OcProgressBar.js +1 -1
- package/dist/DataDisplay/Table/OcTable.js +1 -1
- package/dist/DataDisplay/TransferSummary/OcTransferSummary.js +1 -1
- package/dist/DataTable/useDataTable.js +82 -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/SwitchTabs/OcSwitchTabs.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/Section/OcSection.js +1 -1
- package/dist/Elements/Sidebar/OcSidebar.js +2 -2
- package/dist/Elements/Skeleton/OcSkeleton.js +1 -1
- package/dist/Elements/SubSidebar/OcSubSidebar.js +1 -1
- package/dist/Elements/TopBanner/OcTopBanner.js +4 -0
- package/dist/Elements/VerificationOption/OcVerificationOption.js +2 -2
- 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/Feedback/Tag/OcTag.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 +2 -2
- package/dist/Form/CardInput/OcCardInput.js +1 -1
- package/dist/Form/Checkbox/OcCheckbox.js +2 -2
- 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 +2 -2
- package/dist/Form/MultipleUploadFile/OcMultipleUploadFile.js +1 -1
- package/dist/Form/NumberInput/OcNumberInput.js +1 -1
- package/dist/Form/PhoneInput/OcPhoneInput.js +2 -2
- 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 +2 -2
- package/dist/Form/Select/OcSelect.js +1 -1
- package/dist/Form/SelectOptions/OcSelectOptions.js +2 -2
- package/dist/Form/SingleFileUpload/OcSingleFileUpload.js +1 -1
- package/dist/Form/Slider/OcSlider.js +1 -1
- package/dist/Form/TextArea/OcTextArea.js +2 -2
- package/dist/Form/Toggle/OcToggle.js +1 -1
- package/dist/Form/index.js +8 -8
- package/dist/FormBuilder/OcFormBuilder.js +1 -1
- package/dist/MediaAndIcons/Avatar/OcAvatar.js +1 -1
- package/dist/MediaAndIcons/Icon/OcIcon.js +1 -1
- package/dist/OcAccountSetupProgress-BZrI2z-C.js +54 -0
- package/dist/{OcAvatar-DeVm4Ck5.js → OcAvatar-WGEX8Wio.js} +4 -4
- package/dist/{OcComplexCalendar-BefeAFLc.js → OcComplexCalendar-CrhHAVnT.js} +6 -6
- package/dist/{OcComplexDatePicker-CRLUqCXG.js → OcComplexDatePicker-Cr_6CjYB.js} +5 -5
- package/dist/OcCropper-BMMZRsnp.js +253 -0
- package/dist/OcDataTable-B5QRaoES.js +540 -0
- package/dist/{OcDraggable-CA_BCbpl.js → OcDraggable-DRsp4j4e.js} +5 -4
- package/dist/{OcDraggableList-BgNG1_e0.js → OcDraggableList-Bka23Zj_.js} +50 -47
- package/dist/{OcEmojiPicker-D0Z8w4GK.js → OcEmojiPicker-CjL4Ap4z.js} +17 -15
- package/dist/{OcFilterForm-CxY2ctvp.js → OcFilterForm-IZtn5Vdc.js} +22 -24
- package/dist/OcFilterSearch-Bn7BjQMO.js +112 -0
- package/dist/{OcFilterSearchFor-5XGNMHta.js → OcFilterSearchFor-B0Cyh-PP.js} +27 -21
- package/dist/{OcHorizontalProgressbar.vue_vue_type_script_setup_true_lang-4eVgPDi5.js → OcHorizontalProgressbar.vue_vue_type_script_setup_true_lang-C-8H1oP2.js} +2 -2
- package/dist/{OcIcon-CJgBICxh.js → OcIcon-CBf___w1.js} +10 -9
- package/dist/OcModalCropper-KoaOw5ug.js +52 -0
- package/dist/{OcPopper-D0VfWOBI.js → OcPopper-BSfMaOoF.js} +25 -21
- package/dist/{OcProgressBar-hiyC5XSc.js → OcProgressBar-lyqE5LZd.js} +5 -5
- package/dist/{OcSection-D_vO-DAP.js → OcSection-BjyapRr3.js} +3 -3
- package/dist/{OcSkeleton-CvdpGSQR.js → OcSkeleton-Czw65X0i.js} +2 -2
- package/dist/{OcSwitchTabs-CYp676bj.js → OcSwitchTabs-B7LfmG3z.js} +3 -3
- package/dist/{OcTag.vue_vue_type_script_setup_true_lang-D19lw-8Y.js → OcTag.vue_vue_type_script_setup_true_lang-CzJFcg8l.js} +2 -2
- package/dist/{OcTheme-CWgrJh5Q.js → OcTheme-B6NTNYtz.js} +2 -2
- package/dist/{OcTimePicker-e-YrbMpL.js → OcTimePicker-i88_uGmT.js} +6 -6
- package/dist/{OcTimePopup-CXGhaOev.js → OcTimePopup-CrwbZ_Nx.js} +5 -5
- package/dist/OcToggle-DOfA-DZ8.js +58 -0
- 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/Popper/OcPopper.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-G4HZGA2F.js → SubPlanCard-CmQpq6Jd.js} +10 -10
- package/dist/Theme/OcTheme.js +1 -1
- package/dist/{ThumbnailSection-CF3oGwOn.js → ThumbnailSection-VGh-BSav.js} +3 -3
- package/dist/{ThumbnailTheme-CQiJbCFQ.js → ThumbnailTheme-OomrH2df.js} +9 -6
- package/dist/core.css +1 -0
- package/dist/{index-BvY_DV6x.js → index-DeDsEdk8.js} +3559 -3338
- package/dist/index.js +58 -55
- package/package.json +1 -1
- package/dist/OcAccountSetupProgress-B9dvesNZ.js +0 -46
- package/dist/OcCropper-Rak_EOta.js +0 -229
- package/dist/OcDataTable-C3Qcyzlb.js +0 -578
- package/dist/OcFilterSearch-BvswWfWM.js +0 -69
- package/dist/OcModalCropper-dStrjw5T.js +0 -46
- package/dist/OcToggle-bIJaLDMZ.js +0 -53
- package/dist/style.css +0 -1
@@ -1,4 +1,4 @@
|
|
1
|
-
import { T as l,
|
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-DeDsEdk8.js";
|
2
2
|
export {
|
3
3
|
l as ExpandingHeaderRow,
|
4
4
|
n as ExpandingTable,
|
@@ -0,0 +1,82 @@
|
|
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
|
+
}), g = s(!1);
|
7
|
+
let y = null;
|
8
|
+
const p = async () => {
|
9
|
+
g.value = !0, y && clearTimeout(y), y = 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
|
+
}, g.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: g,
|
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" }], p();
|
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
|
+
syncLocalData: p,
|
71
|
+
// Setters
|
72
|
+
setFilter: (e) => {
|
73
|
+
f.value = { ...e }, p();
|
74
|
+
},
|
75
|
+
setSortBy: (e) => {
|
76
|
+
l.value = { ...e }, p();
|
77
|
+
}
|
78
|
+
};
|
79
|
+
}
|
80
|
+
export {
|
81
|
+
I as useDataTable
|
82
|
+
};
|
@@ -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-DeDsEdk8.js";
|
2
|
+
import { default as n } from "../../OcAccountSetupProgress-BZrI2z-C.js";
|
3
3
|
export {
|
4
4
|
r as AccountSetup,
|
5
5
|
n as AccountSetupProgress,
|