@orchidui/core 1.8.1-13 → 1.8.1-130
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 +93 -0
- package/dist/DataTable/utils/filterUtils.js +57 -0
- package/dist/DataTable/utils/paginationUtils.js +26 -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-DVe93N5F.js → OcAccountSetupProgress-zCG-DdjY.js} +4 -4
- package/dist/{OcAvatar-DeVm4Ck5.js → OcAvatar-WGEX8Wio.js} +4 -4
- package/dist/{OcComplexCalendar-_DMBOtyP.js → OcComplexCalendar-C6koM5tD.js} +6 -6
- package/dist/{OcComplexDatePicker-A4TDbWQM.js → OcComplexDatePicker-BShwu8Lo.js} +5 -5
- package/dist/OcCropper-CV7rNbNa.js +253 -0
- package/dist/OcDataTable-CVpVKWnH.js +555 -0
- package/dist/{OcDraggable-CA_BCbpl.js → OcDraggable-DRsp4j4e.js} +5 -4
- package/dist/{OcDraggableList-4U0eI0yh.js → OcDraggableList-BUUu6bu2.js} +50 -47
- package/dist/{OcEmojiPicker-CKSZw3bt.js → OcEmojiPicker-ffb1UkOi.js} +17 -15
- package/dist/{OcFilterForm-DUH1_sM8.js → OcFilterForm-D_Yfxq9s.js} +22 -24
- package/dist/OcFilterSearch-DAOnCwDT.js +112 -0
- package/dist/{OcFilterSearchFor-BbobE0iw.js → OcFilterSearchFor-exHdYEaz.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-mUIjId6c.js +52 -0
- package/dist/{OcPopper-BgjdqRiw.js → OcPopper-BSfMaOoF.js} +26 -25
- 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-CuimDUhN.js → OcTimePicker-BnHQuIIE.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-C0pdZDFH.js → SubPlanCard-CQhm3Ffe.js} +10 -10
- package/dist/Theme/OcTheme.js +1 -1
- package/dist/{ThumbnailSection-DCtZ3L0d.js → ThumbnailSection-C4_YnAkH.js} +3 -3
- package/dist/{ThumbnailTheme-D6DHAV4e.js → ThumbnailTheme-BiofGRB1.js} +9 -6
- package/dist/core.css +1 -0
- package/dist/{index-D56G3Bj-.js → index-sshOSmGz.js} +3133 -2954
- package/dist/index.js +45 -44
- package/package.json +1 -1
- package/dist/OcCropper-Cbzvk6Ph.js +0 -229
- package/dist/OcDataTable-nlEGD3qN.js +0 -578
- package/dist/OcFilterSearch-dI25vfNj.js +0 -69
- package/dist/OcModalCropper-C2YCtiyL.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-sshOSmGz.js";
|
2
2
|
export {
|
3
3
|
l as ExpandingHeaderRow,
|
4
4
|
n as ExpandingTable,
|
@@ -0,0 +1,93 @@
|
|
1
|
+
import { ref as f, computed as v } from "vue";
|
2
|
+
function K(w) {
|
3
|
+
const { name: S, db: r, filterable_fields: L, sortable_fields: C } = w, d = f(S), b = f([]), l = f({}), c = f({
|
4
|
+
page: 1,
|
5
|
+
per_page: 10
|
6
|
+
}), y = f({
|
7
|
+
total: 0,
|
8
|
+
last_page: 1
|
9
|
+
}), g = f(!1);
|
10
|
+
let p = null;
|
11
|
+
const m = v(() => {
|
12
|
+
const t = {}, s = L ?? [];
|
13
|
+
return Object.entries(c.value).forEach(([e, a]) => {
|
14
|
+
s.includes(e) && a !== void 0 && a !== null && a !== "" && (t[e] = a);
|
15
|
+
}), t;
|
16
|
+
}), D = v(() => {
|
17
|
+
const t = {}, s = C ?? [];
|
18
|
+
return Object.entries(l.value).forEach(([e, a]) => {
|
19
|
+
s.includes(e) && a !== void 0 && a !== null && a !== "" && (t[e] = a);
|
20
|
+
}), t;
|
21
|
+
}), _ = async () => {
|
22
|
+
let t = await r.table(d.value).toArray();
|
23
|
+
return m.value && Object.entries(m.value).forEach(([s, e]) => {
|
24
|
+
Array.isArray(e) ? t = t.filter((a) => {
|
25
|
+
var n;
|
26
|
+
const i = ((n = a[s]) == null ? void 0 : n.toString()) ?? "";
|
27
|
+
return e.some(
|
28
|
+
(o) => i.toLowerCase().includes(o.toString().toLowerCase())
|
29
|
+
);
|
30
|
+
}) : typeof e == "string" ? t = t.filter((a) => {
|
31
|
+
var n;
|
32
|
+
return (((n = a[s]) == null ? void 0 : n.toString()) ?? "").toLowerCase().includes(e.toString().toLowerCase());
|
33
|
+
}) : t = t.filter((a) => {
|
34
|
+
var i;
|
35
|
+
return ((i = a[s]) == null ? void 0 : i.toString()) === e.toString();
|
36
|
+
});
|
37
|
+
}), D.value && Object.keys(D.value).length > 0 && Object.entries(D.value).forEach(([s, e]) => {
|
38
|
+
t = t.sort((a, i) => {
|
39
|
+
const n = a[s], o = i[s], h = !isNaN(Date.parse(n)) && !isNaN(Date.parse(o));
|
40
|
+
return typeof n == "number" && typeof o == "number" ? e === "desc" ? o - n : n - o : h ? e === "desc" ? new Date(o) - new Date(n) : new Date(n) - new Date(o) : e === "desc" ? o == null ? void 0 : o.toString().localeCompare(n == null ? void 0 : n.toString()) : n == null ? void 0 : n.toString().localeCompare(o == null ? void 0 : o.toString());
|
41
|
+
});
|
42
|
+
}), t;
|
43
|
+
}, u = async () => {
|
44
|
+
r && (g.value = !0, p && clearTimeout(p), p = setTimeout(async () => {
|
45
|
+
const t = await _(), s = (parseInt(c.value.page) - 1) * parseInt(c.value.per_page), e = parseInt(c.value.per_page), a = t.slice(s, s + e);
|
46
|
+
b.value = a, y.value = {
|
47
|
+
total: t.length,
|
48
|
+
last_page: Math.ceil(t.length / e)
|
49
|
+
}, g.value = !1;
|
50
|
+
}, 500));
|
51
|
+
};
|
52
|
+
return {
|
53
|
+
// State
|
54
|
+
localData: b,
|
55
|
+
sortByData: l,
|
56
|
+
filterData: c,
|
57
|
+
paginationData: y,
|
58
|
+
isLoading: g,
|
59
|
+
// Methods
|
60
|
+
toggleSort: (t) => {
|
61
|
+
const s = l.value.find((e) => e.column === t);
|
62
|
+
s ? s.direction === "asc" ? l.value = { ...l.value, [t]: "desc" } : delete l.value[t] : l.value = { ...l.value, [t]: "asc" }, u();
|
63
|
+
},
|
64
|
+
bulkPutLocalData: async (t) => {
|
65
|
+
r && await r.table(d.value).bulkPut(t), await u();
|
66
|
+
},
|
67
|
+
bulkDeleteLocalData: async (t) => {
|
68
|
+
r && await r.table(d.value).bulkDelete(t), await u();
|
69
|
+
},
|
70
|
+
getLocalDataUpdatedAt: async () => {
|
71
|
+
if (r) {
|
72
|
+
const t = await r.table(d.value).orderBy("updated_at").reverse().limit(1).first();
|
73
|
+
return t == null ? void 0 : t.updated_at;
|
74
|
+
}
|
75
|
+
return null;
|
76
|
+
},
|
77
|
+
getLocalDataIds: async () => {
|
78
|
+
if (r)
|
79
|
+
return await r.table(d.value).toCollection().primaryKeys();
|
80
|
+
},
|
81
|
+
syncLocalData: u,
|
82
|
+
// Setters
|
83
|
+
setFilter: (t) => {
|
84
|
+
c.value = { ...t }, u();
|
85
|
+
},
|
86
|
+
setSortBy: (t) => {
|
87
|
+
l.value = { ...t }, u();
|
88
|
+
}
|
89
|
+
};
|
90
|
+
}
|
91
|
+
export {
|
92
|
+
K as useDataTable
|
93
|
+
};
|
@@ -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
|
+
};
|
@@ -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-sshOSmGz.js";
|
2
|
+
import { default as n } from "../../OcAccountSetupProgress-zCG-DdjY.js";
|
3
3
|
export {
|
4
4
|
r as AccountSetup,
|
5
5
|
n as AccountSetupProgress,
|