vlite3 0.4.8 → 0.5.2
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/README.md +201 -100
- package/_virtual/Barcode.js +4 -0
- package/_virtual/CODE128.js +4 -0
- package/_virtual/CODE128A.js +4 -0
- package/_virtual/CODE128B.js +4 -0
- package/_virtual/CODE128C.js +4 -0
- package/_virtual/CODE128_AUTO.js +4 -0
- package/_virtual/CODE93.js +4 -0
- package/_virtual/CODE93FullASCII.js +4 -0
- package/_virtual/EAN.js +4 -0
- package/_virtual/EAN13.js +4 -0
- package/_virtual/EAN2.js +4 -0
- package/_virtual/EAN5.js +4 -0
- package/_virtual/EAN8.js +4 -0
- package/_virtual/ErrorHandler.js +4 -0
- package/_virtual/FileSaver.min.js +5 -0
- package/_virtual/FileSaver.min2.js +4 -0
- package/_virtual/ITF.js +4 -0
- package/_virtual/ITF14.js +4 -0
- package/_virtual/JsBarcode.js +7 -0
- package/_virtual/MSI.js +4 -0
- package/_virtual/MSI10.js +4 -0
- package/_virtual/MSI1010.js +4 -0
- package/_virtual/MSI11.js +4 -0
- package/_virtual/MSI1110.js +4 -0
- package/_virtual/UPC.js +4 -0
- package/_virtual/UPCE.js +4 -0
- package/_virtual/_commonjsHelpers.js +8 -0
- package/_virtual/alignment-pattern.js +4 -0
- package/_virtual/auto.js +4 -0
- package/_virtual/browser.js +7 -0
- package/_virtual/browser2.js +4 -0
- package/_virtual/canvas.js +4 -0
- package/_virtual/canvas2.js +4 -0
- package/_virtual/checksums.js +4 -0
- package/_virtual/constants.js +4 -0
- package/_virtual/constants2.js +4 -0
- package/_virtual/constants3.js +4 -0
- package/_virtual/constants4.js +4 -0
- package/_virtual/defaults.js +4 -0
- package/_virtual/dijkstra.js +4 -0
- package/_virtual/encoder.js +4 -0
- package/_virtual/error-correction-code.js +4 -0
- package/_virtual/error-correction-level.js +4 -0
- package/_virtual/exceptions.js +4 -0
- package/_virtual/finder-pattern.js +4 -0
- package/_virtual/fixOptions.js +4 -0
- package/_virtual/format-info.js +4 -0
- package/_virtual/galois-field.js +4 -0
- package/_virtual/getOptionsFromElement.js +4 -0
- package/_virtual/getRenderProperties.js +4 -0
- package/_virtual/index.js +4 -0
- package/_virtual/index10.js +4 -0
- package/_virtual/index11.js +4 -0
- package/_virtual/index2.js +4 -0
- package/_virtual/index3.js +4 -0
- package/_virtual/index4.js +4 -0
- package/_virtual/index5.js +4 -0
- package/_virtual/index6.js +4 -0
- package/_virtual/index7.js +4 -0
- package/_virtual/index8.js +4 -0
- package/_virtual/index9.js +4 -0
- package/_virtual/linearizeEncodings.js +4 -0
- package/_virtual/mask-pattern.js +4 -0
- package/_virtual/merge.js +4 -0
- package/_virtual/mode.js +4 -0
- package/_virtual/object.js +4 -0
- package/_virtual/optionsFromStrings.js +4 -0
- package/_virtual/papaparse.min.js +7 -0
- package/_virtual/papaparse.min2.js +4 -0
- package/_virtual/polynomial.js +4 -0
- package/_virtual/qrcode.js +4 -0
- package/_virtual/regex.js +4 -0
- package/_virtual/segments.js +4 -0
- package/_virtual/shared.js +4 -0
- package/_virtual/svg-tag.js +4 -0
- package/_virtual/svg.js +4 -0
- package/_virtual/utils.js +4 -0
- package/_virtual/utils2.js +4 -0
- package/_virtual/version-check.js +4 -0
- package/_virtual/version.js +4 -0
- package/components/Accordion/Accordion.vue.d.ts +7 -7
- package/components/Accordion/AccordionItem.vue.d.ts +4 -4
- package/components/Accordion/AccordionTrigger.vue.d.ts +2 -2
- package/components/Alert.vue.d.ts +1 -1
- package/components/Avatar.vue.d.ts +2 -2
- package/components/Avatar.vue.js +2 -2
- package/components/AvatarUploader/AvatarUploader.vue.d.ts +5 -5
- package/components/Badge.vue.d.ts +1 -1
- package/components/Barcode/Barcode.vue.d.ts +22 -0
- package/components/Barcode/Barcode.vue.js +58 -0
- package/components/Barcode/Barcode.vue2.js +4 -0
- package/components/Barcode/index.d.ts +2 -0
- package/components/Barcode/types.d.ts +5 -0
- package/components/Barcode/types.js +15 -0
- package/components/Breadcrumb/Breadcrumb.vue.d.ts +23 -0
- package/components/Breadcrumb/Breadcrumb.vue.js +7 -0
- package/components/Breadcrumb/Breadcrumb.vue2.js +84 -0
- package/components/Breadcrumb/BreadcrumbItem.vue.d.ts +27 -0
- package/components/Breadcrumb/BreadcrumbItem.vue.js +7 -0
- package/components/Breadcrumb/BreadcrumbItem.vue2.js +50 -0
- package/components/Breadcrumb/index.d.ts +3 -0
- package/components/Breadcrumb/types.d.ts +19 -0
- package/components/Button.vue.d.ts +4 -4
- package/components/Button.vue.js +32 -29
- package/components/ButtonGroup.vue.d.ts +1 -1
- package/components/Carousel/Carousel.vue.d.ts +58 -58
- package/components/CheckBox.vue.d.ts +2 -2
- package/components/Chip/Chip.vue.d.ts +3 -3
- package/components/ChoiceBox/ChoiceBox.vue.d.ts +4 -4
- package/components/ColorPicker/ColorPicker.vue.d.ts +3 -3
- package/components/ColorPicker/index.d.ts +1 -0
- package/components/CommandPaletteContent.vue.d.ts +15 -0
- package/components/CommandPaletteContent.vue.js +7 -0
- package/components/CommandPaletteContent.vue2.js +287 -0
- package/components/ConfirmationModal.vue.js +12 -10
- package/components/DataList/DataList.vue.d.ts +2 -2
- package/components/DataTable/DataTable.vue.d.ts +6 -6
- package/components/DataTable/DataTableRow.vue.d.ts +3 -3
- package/components/DatePicker.vue.d.ts +2 -2
- package/components/DatePicker.vue.js +7 -7
- package/components/DateRangePicker.vue.d.ts +29 -0
- package/components/DateRangePicker.vue.js +231 -0
- package/components/DateRangePicker.vue2.js +4 -0
- package/components/Dropdown/Dropdown.vue.d.ts +11 -6
- package/components/Dropdown/Dropdown.vue.js +147 -109
- package/components/Dropdown/DropdownBooleanItem.vue.js +9 -8
- package/components/Dropdown/DropdownGroupedLayout.vue.d.ts +1 -1
- package/components/Dropdown/DropdownGroupedLayout.vue.js +35 -34
- package/components/Dropdown/DropdownItem.vue.js +11 -10
- package/components/Dropdown/DropdownMenu.vue.d.ts +5 -3
- package/components/Dropdown/DropdownMenu.vue.js +114 -111
- package/components/Dropdown/DropdownTrigger.vue.d.ts +2 -0
- package/components/Dropdown/DropdownTrigger.vue.js +9 -7
- package/components/ExportData/ExportData.vue.d.ts +16 -0
- package/components/ExportData/ExportData.vue.js +135 -0
- package/components/ExportData/ExportData.vue2.js +4 -0
- package/components/ExportData/index.d.ts +2 -0
- package/components/ExportData/types.d.ts +17 -0
- package/components/FilePicker/FilePicker.vue.d.ts +5 -5
- package/components/Form/CustomFields.vue.d.ts +6 -6
- package/components/Form/CustomFields.vue.js +1 -1
- package/components/Form/Form.vue.d.ts +4 -5
- package/components/Form/Form.vue.js +2 -2
- package/components/Form/Form.vue2.js +221 -178
- package/components/Form/FormField.vue.d.ts +4 -3
- package/components/Form/FormField.vue.js +70 -62
- package/components/Form/FormFields.vue.d.ts +3 -1
- package/components/Form/FormFields.vue.js +2 -2
- package/components/Form/FormFields.vue2.js +105 -59
- package/components/GoogleLogin.vue.d.ts +2 -2
- package/components/Icon.vue.d.ts +2 -0
- package/components/Icon.vue.js +12 -11
- package/components/ImportData/ImportData.vue.d.ts +31 -0
- package/components/ImportData/ImportData.vue.js +242 -0
- package/components/ImportData/ImportData.vue2.js +4 -0
- package/components/ImportData/ImportStep1.vue.d.ts +23 -0
- package/components/ImportData/ImportStep1.vue.js +162 -0
- package/components/ImportData/ImportStep1.vue2.js +4 -0
- package/components/ImportData/ImportStep2.vue.d.ts +20 -0
- package/components/ImportData/ImportStep2.vue.js +98 -0
- package/components/ImportData/ImportStep2.vue2.js +4 -0
- package/components/ImportData/ImportStep3.vue.d.ts +6 -0
- package/components/ImportData/ImportStep3.vue.js +98 -0
- package/components/ImportData/ImportStep3.vue2.js +4 -0
- package/components/ImportData/ImportStep4.vue.d.ts +6 -0
- package/components/ImportData/ImportStep4.vue.js +139 -0
- package/components/ImportData/ImportStep4.vue2.js +4 -0
- package/components/ImportData/index.d.ts +2 -0
- package/components/ImportData/types.d.ts +51 -0
- package/components/Input.vue.d.ts +9 -9
- package/components/Input.vue.js +137 -120
- package/components/List/List.vue.d.ts +18 -0
- package/components/List/List.vue.js +189 -0
- package/components/List/List.vue2.js +4 -0
- package/components/List/ListFieldRow.vue.d.ts +35 -0
- package/components/List/ListFieldRow.vue.js +119 -0
- package/components/List/ListFieldRow.vue2.js +4 -0
- package/components/List/index.d.ts +4 -0
- package/components/List/types.d.ts +1 -0
- package/components/List/utils.d.ts +9 -0
- package/components/List/utils.js +64 -0
- package/components/Masonry/Masonry.vue.d.ts +2 -2
- package/components/Modal.vue.js +5 -122
- package/components/Modal.vue2.js +133 -2
- package/components/MultiSelect/MultiSelect.vue.d.ts +12 -9
- package/components/MultiSelect/MultiSelect.vue.js +101 -64
- package/components/Navbar/Navbar.vue.d.ts +48 -9
- package/components/Navbar/Navbar.vue.js +418 -146
- package/components/Navbar/NavbarItem.vue.d.ts +2 -2
- package/components/Navbar/NavbarTabs.vue.d.ts +21 -0
- package/components/Navbar/NavbarTabs.vue.js +179 -0
- package/components/Navbar/NavbarTabs.vue3.js +5 -0
- package/components/Navbar/index.d.ts +3 -0
- package/components/NavbarCommandPalette.vue.d.ts +48 -0
- package/components/NumberInput.vue.d.ts +8 -8
- package/components/OTPInput/OTPInput.vue.d.ts +7 -7
- package/components/Pagination/Pagination.vue.d.ts +1 -1
- package/components/PermissionMatrix/PermissionEditor.vue.d.ts +36 -0
- package/components/PermissionMatrix/PermissionEditor.vue.js +323 -0
- package/components/PermissionMatrix/PermissionEditor.vue2.js +4 -0
- package/components/PermissionMatrix/PermissionMatrix.vue.d.ts +15 -0
- package/components/PermissionMatrix/PermissionMatrix.vue.js +7 -0
- package/components/PermissionMatrix/PermissionMatrix.vue2.js +245 -0
- package/components/PermissionMatrix/index.d.ts +3 -0
- package/components/PermissionMatrix/types.d.ts +59 -0
- package/components/PricingPlan/PricingPlan.vue.d.ts +3 -3
- package/components/ProgressBar/ProgressBar.vue.d.ts +3 -3
- package/components/QRCode/QRCode.vue.d.ts +15 -0
- package/components/QRCode/QRCode.vue.js +38 -0
- package/components/QRCode/QRCode.vue2.js +4 -0
- package/components/QRCode/index.d.ts +1 -0
- package/components/Screen/Screen.vue.d.ts +232 -5
- package/components/Screen/Screen.vue.js +423 -271
- package/components/Screen/ScreenFilter.vue.d.ts +2 -2
- package/components/Screen/ScreenFilter.vue.js +9 -9
- package/components/Screen/types.d.ts +12 -0
- package/components/SidePanel.vue.d.ts +2 -2
- package/components/SidebarMenu/SidebarMenu.vue.d.ts +15 -2
- package/components/SidebarMenu/SidebarMenu.vue.js +117 -47
- package/components/SidebarMenu/SidebarMenuItem.vue.d.ts +2 -0
- package/components/SidebarMenu/SidebarMenuItem.vue.js +192 -175
- package/components/SidebarMenu/types.d.ts +32 -5
- package/components/Slider.vue.d.ts +2 -2
- package/components/Spinner/Spinner.vue.d.ts +2 -2
- package/components/Stats/Stats.vue.d.ts +14 -0
- package/components/Stats/Stats.vue.js +307 -0
- package/components/Stats/Stats.vue2.js +4 -0
- package/components/Stats/index.d.ts +2 -0
- package/components/Stats/types.d.ts +32 -0
- package/components/Switch.vue.d.ts +2 -1
- package/components/Switch.vue.js +4 -2
- package/components/Tabes/Tabes.vue.d.ts +3 -3
- package/components/Tabes/Tabes.vue.js +60 -57
- package/components/Tabes/types.d.ts +5 -0
- package/components/Textarea.vue.d.ts +3 -3
- package/components/{Timeline.vue.d.ts → Timeline/Timeline.vue.d.ts} +23 -2
- package/components/Timeline/Timeline.vue.js +92 -0
- package/components/Timeline/TimelineIndicator.vue.d.ts +9 -0
- package/components/Timeline/TimelineIndicator.vue.js +68 -0
- package/components/Timeline/TimelineIndicator.vue2.js +4 -0
- package/components/Timeline/TimelineItem.vue.d.ts +56 -0
- package/components/Timeline/TimelineItem.vue.js +173 -0
- package/components/Timeline/TimelineItem.vue2.js +4 -0
- package/components/Timeline/index.d.ts +3 -0
- package/components/Tooltip.vue.d.ts +2 -2
- package/components/Workbook/Sheet.vue.d.ts +2 -2
- package/components/Workbook/Workbook.vue.d.ts +3 -3
- package/components/index.d.ts +62 -0
- package/composables/useBreadcrumb.d.ts +17 -0
- package/composables/useBreadcrumb.js +27 -0
- package/core/config.d.ts +34 -0
- package/core/config.js +10 -7
- package/core/index.js +15 -8
- package/index.d.ts +55 -44
- package/index.js +243 -200
- package/package.json +12 -2
- package/router.d.ts +2 -0
- package/style.css +7 -5
- package/types/button.d.ts +1 -1
- package/types/config.type.d.ts +35 -0
- package/types/form.type.d.ts +3 -1
- package/types/index.d.ts +2 -1
- package/types/list.type.d.ts +57 -0
- package/types/navbar.type.d.ts +38 -1
- package/types/timeline.type.d.ts +14 -4
- package/components/Timeline.vue.js +0 -160
- /package/components/{Timeline.vue2.js → Timeline/Timeline.vue2.js} +0 -0
|
@@ -4,11 +4,11 @@ type __VLS_Props = {
|
|
|
4
4
|
type?: 'modal' | 'dropdown';
|
|
5
5
|
};
|
|
6
6
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
7
|
-
"update:modelValue": (val: Record<string, any>) => any;
|
|
8
7
|
change: (val: Record<string, any>) => any;
|
|
8
|
+
"update:modelValue": (val: Record<string, any>) => any;
|
|
9
9
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
-
"onUpdate:modelValue"?: (val: Record<string, any>) => any;
|
|
11
10
|
onChange?: (val: Record<string, any>) => any;
|
|
11
|
+
"onUpdate:modelValue"?: (val: Record<string, any>) => any;
|
|
12
12
|
}>, {
|
|
13
13
|
type: "modal" | "dropdown";
|
|
14
14
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as $, ref as
|
|
1
|
+
import { defineComponent as $, ref as M, computed as p, openBlock as o, createBlock as a, withCtx as r, createElementVNode as l, createVNode as n, unref as w, toDisplayString as v, withModifiers as F } from "vue";
|
|
2
2
|
import f from "../Button.vue.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import S from "../Modal.vue.js";
|
|
4
|
+
import j from "../Dropdown/Dropdown.vue.js";
|
|
5
5
|
import h from "../Icon.vue.js";
|
|
6
6
|
import { $t as x } from "../../utils/i18n.js";
|
|
7
7
|
import C from "../Form/Form.vue.js";
|
|
@@ -16,7 +16,7 @@ import "iconify-icon-picker/style.css";
|
|
|
16
16
|
/* empty css */
|
|
17
17
|
/* empty css */
|
|
18
18
|
import "../../core/config.js";
|
|
19
|
-
const
|
|
19
|
+
const z = { class: "" }, B = { class: "py-3 px-3.5 w-[300px] sm:w-[320px] max-h-[85vh] overflow-y-auto bg-card rounded-md border border-border shadow-lg text-left" }, X = /* @__PURE__ */ $({
|
|
20
20
|
__name: "ScreenFilter",
|
|
21
21
|
props: {
|
|
22
22
|
schema: {},
|
|
@@ -25,7 +25,7 @@ const B = { class: "" }, M = { class: "py-3 px-3.5 w-[300px] sm:w-[320px] max-h-
|
|
|
25
25
|
},
|
|
26
26
|
emits: ["update:modelValue", "change"],
|
|
27
27
|
setup(i, { emit: O }) {
|
|
28
|
-
const u = i, m = O, s =
|
|
28
|
+
const u = i, m = O, s = M(!1), d = p(() => u.modelValue ? Object.keys(u.modelValue).filter(
|
|
29
29
|
(e) => u.modelValue[e] !== "" && u.modelValue[e] !== null && u.modelValue[e] !== void 0
|
|
30
30
|
).length : 0), k = (e) => {
|
|
31
31
|
m("update:modelValue", e.values), m("change", e.values), s.value = !1;
|
|
@@ -41,7 +41,7 @@ const B = { class: "" }, M = { class: "py-3 px-3.5 w-[300px] sm:w-[320px] max-h-
|
|
|
41
41
|
const e = x("vlite.screen.filter");
|
|
42
42
|
return e !== "vlite.screen.filter" ? e : "Filter";
|
|
43
43
|
});
|
|
44
|
-
return (e, t) => i.type === "modal" ? (o(), a(
|
|
44
|
+
return (e, t) => i.type === "modal" ? (o(), a(S, {
|
|
45
45
|
key: 0,
|
|
46
46
|
title: g.value,
|
|
47
47
|
show: s.value,
|
|
@@ -104,7 +104,7 @@ const B = { class: "" }, M = { class: "py-3 px-3.5 w-[300px] sm:w-[320px] max-h-
|
|
|
104
104
|
}, 8, ["title"]))
|
|
105
105
|
]),
|
|
106
106
|
default: r(() => [
|
|
107
|
-
l("div",
|
|
107
|
+
l("div", z, [
|
|
108
108
|
n(w(C), {
|
|
109
109
|
schema: i.schema,
|
|
110
110
|
values: i.modelValue,
|
|
@@ -114,7 +114,7 @@ const B = { class: "" }, M = { class: "py-3 px-3.5 w-[300px] sm:w-[320px] max-h-
|
|
|
114
114
|
])
|
|
115
115
|
]),
|
|
116
116
|
_: 1
|
|
117
|
-
}, 8, ["title", "show"])) : (o(), a(w(
|
|
117
|
+
}, 8, ["title", "show"])) : (o(), a(w(j), {
|
|
118
118
|
key: 1,
|
|
119
119
|
isOpen: s.value,
|
|
120
120
|
"onUpdate:isOpen": t[3] || (t[3] = (c) => s.value = c),
|
|
@@ -156,7 +156,7 @@ const B = { class: "" }, M = { class: "py-3 px-3.5 w-[300px] sm:w-[320px] max-h-
|
|
|
156
156
|
}, null, 8, ["title"]))
|
|
157
157
|
]),
|
|
158
158
|
default: r(() => [
|
|
159
|
-
l("div",
|
|
159
|
+
l("div", B, [
|
|
160
160
|
n(w(C), {
|
|
161
161
|
schema: i.schema,
|
|
162
162
|
values: i.modelValue,
|
|
@@ -2,6 +2,8 @@ import { Component } from 'vue';
|
|
|
2
2
|
import { PageInfo, PaginationProps } from '../Pagination';
|
|
3
3
|
import { ButtonVariant } from '../../types';
|
|
4
4
|
import { IForm } from '../Form';
|
|
5
|
+
import { ExportField } from '../ExportData/types';
|
|
6
|
+
import { ImportField } from '../ImportData/types';
|
|
5
7
|
export interface ScreenPaginationProps extends Omit<PaginationProps, 'currentPage' | 'totalPages'> {
|
|
6
8
|
}
|
|
7
9
|
export interface AddBtnConfig {
|
|
@@ -23,6 +25,8 @@ export interface ScreenProps {
|
|
|
23
25
|
titleI18n?: string;
|
|
24
26
|
description?: string;
|
|
25
27
|
descriptionI18n?: string;
|
|
28
|
+
info?: string;
|
|
29
|
+
infoI18n?: string;
|
|
26
30
|
pageInfo?: PageInfo;
|
|
27
31
|
data?: any[];
|
|
28
32
|
loading?: boolean;
|
|
@@ -46,6 +50,14 @@ export interface ScreenProps {
|
|
|
46
50
|
emptyIcon?: string;
|
|
47
51
|
addComponent?: Component | any;
|
|
48
52
|
addBtn?: AddBtnConfig;
|
|
53
|
+
/** Generic properties for Export and Import capabilities */
|
|
54
|
+
exportSchema?: ExportField[] | any[];
|
|
55
|
+
importSchema?: ImportField[] | any[];
|
|
56
|
+
exportProps?: Record<string, any> | boolean;
|
|
57
|
+
importProps?: Record<string, any> | boolean;
|
|
58
|
+
exportMode?: 'frontend' | 'backend';
|
|
59
|
+
importType?: string;
|
|
60
|
+
exportType?: string;
|
|
49
61
|
list?: Component | any;
|
|
50
62
|
table?: Component | any;
|
|
51
63
|
customHeader?: boolean;
|
|
@@ -50,14 +50,14 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
|
|
|
50
50
|
onOnAfterOpen?: () => any;
|
|
51
51
|
onOnAfterClose?: () => any;
|
|
52
52
|
}>, {
|
|
53
|
-
class: string;
|
|
54
53
|
size: SidePanelSize;
|
|
55
|
-
|
|
54
|
+
class: string;
|
|
56
55
|
headerClass: string;
|
|
57
56
|
position: SidePanelPosition;
|
|
58
57
|
show: boolean;
|
|
59
58
|
closeOutside: boolean;
|
|
60
59
|
backdrop: boolean;
|
|
60
|
+
triggerClass: string;
|
|
61
61
|
bodyClass: string;
|
|
62
62
|
footerClass: string;
|
|
63
63
|
hideCloseButton: boolean;
|
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
import { SidebarMenuProps, SidebarMenuItemSchema } from './types';
|
|
2
2
|
declare const _default: import('vue').DefineComponent<SidebarMenuProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SidebarMenuProps> & Readonly<{}>, {
|
|
3
3
|
variant: "default" | "ghost";
|
|
4
|
+
compact: boolean;
|
|
4
5
|
items: SidebarMenuItemSchema[];
|
|
6
|
+
iconSize: string;
|
|
7
|
+
mobileBreakpoint: "sm" | "md" | "lg" | "xl" | "none";
|
|
8
|
+
orientation: "vertical" | "horizontal";
|
|
5
9
|
allowMultiple: boolean;
|
|
6
|
-
|
|
10
|
+
menuOffset: [number, number];
|
|
7
11
|
indentSize: number;
|
|
8
12
|
defaultExpanded: string[];
|
|
9
13
|
showCompactLabels: boolean;
|
|
10
|
-
|
|
14
|
+
renderMode: "tree" | "popover";
|
|
15
|
+
compactIconSize: string;
|
|
16
|
+
labelClass: string;
|
|
17
|
+
compactLabelClass: string;
|
|
18
|
+
itemPadding: string;
|
|
19
|
+
compactItemPadding: string;
|
|
20
|
+
nestedMenuWidth: string;
|
|
21
|
+
nestedMenuMaxHeight: string;
|
|
22
|
+
showTooltip: boolean;
|
|
23
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLElement>;
|
|
11
24
|
export default _default;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRoute as
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as S, inject as I, ref as w, computed as n, watch as h, reactive as E, provide as N, openBlock as g, createElementBlock as y, normalizeClass as L, Fragment as P, renderList as A, createBlock as O } from "vue";
|
|
2
|
+
import { useRoute as F } from "vue-router";
|
|
3
|
+
import { useBreakpoints as W, breakpointsTailwind as H } from "@vueuse/core";
|
|
4
|
+
import D from "./SidebarMenuItem.vue.js";
|
|
4
5
|
/* empty css */
|
|
5
|
-
const
|
|
6
|
-
class: "flex flex-col space-y-1 w-full",
|
|
7
|
-
role: "tree",
|
|
8
|
-
"aria-label": "Sidebar Menu"
|
|
9
|
-
}, W = /* @__PURE__ */ y({
|
|
6
|
+
const J = /* @__PURE__ */ S({
|
|
10
7
|
__name: "SidebarMenu",
|
|
11
8
|
props: {
|
|
12
9
|
items: { default: () => [] },
|
|
@@ -15,64 +12,137 @@ const C = {
|
|
|
15
12
|
variant: { default: "default" },
|
|
16
13
|
defaultExpanded: { default: () => [] },
|
|
17
14
|
compact: { type: Boolean, default: !1 },
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
showCompactLabels: { type: Boolean, default: !1 },
|
|
16
|
+
renderMode: { default: "tree" },
|
|
17
|
+
iconSize: { default: "16px" },
|
|
18
|
+
compactIconSize: { default: "20px" },
|
|
19
|
+
labelClass: { default: "text-sm" },
|
|
20
|
+
compactLabelClass: { default: "text-[11.5px] mt-1" },
|
|
21
|
+
itemPadding: { default: "py-2 px-2" },
|
|
22
|
+
compactItemPadding: { default: "py-2 px-1" },
|
|
23
|
+
nestedMenuWidth: { default: "220px" },
|
|
24
|
+
nestedMenuMaxHeight: { default: "300px" },
|
|
25
|
+
itemClass: {},
|
|
26
|
+
menuOffset: { default: () => [0, 10] },
|
|
27
|
+
orientation: { default: "vertical" },
|
|
28
|
+
mobileBreakpoint: { default: "none" },
|
|
29
|
+
showTooltip: { type: Boolean, default: !0 }
|
|
20
30
|
},
|
|
21
|
-
setup(
|
|
22
|
-
const
|
|
23
|
-
if (i.value ===
|
|
24
|
-
if (
|
|
25
|
-
const
|
|
26
|
-
if (
|
|
31
|
+
setup(m) {
|
|
32
|
+
const d = I("navbar-context", null), t = m, c = F(), T = W(H), u = w([...t.defaultExpanded]), i = w(null), k = n(() => !t.mobileBreakpoint || t.mobileBreakpoint === "none" ? !0 : T.greaterOrEqual(t.mobileBreakpoint).value), v = n(() => k.value && t.orientation || "vertical"), M = (l, s) => {
|
|
33
|
+
if (i.value === l.id) return !0;
|
|
34
|
+
if (l.to) {
|
|
35
|
+
const a = typeof l.to == "string" ? l.to : l.to.path;
|
|
36
|
+
if (a && (s === a || s.startsWith(a) && a !== "/" && a.length > 1))
|
|
27
37
|
return !0;
|
|
28
38
|
}
|
|
29
39
|
return !1;
|
|
30
|
-
},
|
|
31
|
-
let
|
|
32
|
-
for (const
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
40
|
+
}, b = (l, s, a = []) => {
|
|
41
|
+
let r = !1;
|
|
42
|
+
for (const e of l) {
|
|
43
|
+
const o = e.id || (typeof e.to == "string" ? e.to : null) || e.label;
|
|
44
|
+
let f = !1;
|
|
45
|
+
e.children && (f = b(e.children, s, [...a, o]), f && (r = !0));
|
|
46
|
+
const p = M(e, s), z = f && d?.renderNestedTabs?.value && a.length === 0;
|
|
47
|
+
(p || z) && (i.value = o, a.forEach((C) => {
|
|
48
|
+
u.value.includes(C) || u.value.push(C);
|
|
49
|
+
}), r = !0);
|
|
37
50
|
}
|
|
38
|
-
return
|
|
51
|
+
return r;
|
|
52
|
+
}, x = (l) => {
|
|
53
|
+
if (!d?.renderNestedTabs?.value) return;
|
|
54
|
+
const s = t.items.find((a) => i.value === (a.id || a.label || a.to) ? !0 : a.children?.some((e) => i.value === (e.id || e.label || e.to) || e.children && e.children.some(
|
|
55
|
+
(o) => i.value === (o.id || o.label || o.to)
|
|
56
|
+
)) || M(a, l));
|
|
57
|
+
if (s && s.children) {
|
|
58
|
+
const a = s.children.map((e) => ({
|
|
59
|
+
label: e.label,
|
|
60
|
+
labelI18n: e.labelI18n,
|
|
61
|
+
value: e.id || (typeof e.to == "string" ? e.to : null) || e.label,
|
|
62
|
+
icon: e.icon,
|
|
63
|
+
disabled: e.disabled,
|
|
64
|
+
to: e.to,
|
|
65
|
+
href: e.href
|
|
66
|
+
}));
|
|
67
|
+
let r = a[0].value;
|
|
68
|
+
if (i.value) {
|
|
69
|
+
const e = a.find((o) => o.value === i.value);
|
|
70
|
+
if (e)
|
|
71
|
+
r = e.value;
|
|
72
|
+
else {
|
|
73
|
+
const o = s.children.find((f) => f.children?.some(
|
|
74
|
+
(p) => (p.id || p.label || p.to) === i.value
|
|
75
|
+
));
|
|
76
|
+
o && (r = o.id || (typeof o.to == "string" ? o.to : null) || o.label);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
d.setNestedTabs(a, r);
|
|
80
|
+
} else
|
|
81
|
+
t.items.some(
|
|
82
|
+
(r) => r.children?.some((e) => (e.id || e.label || e.to) === i.value)
|
|
83
|
+
) || d.setNestedTabs([], "");
|
|
39
84
|
};
|
|
40
85
|
h(
|
|
41
|
-
() =>
|
|
42
|
-
(
|
|
43
|
-
|
|
86
|
+
() => c?.path,
|
|
87
|
+
(l) => {
|
|
88
|
+
l && (b(t.items, l), x(l));
|
|
44
89
|
},
|
|
45
90
|
{ immediate: !0 }
|
|
46
91
|
), h(
|
|
47
|
-
() =>
|
|
92
|
+
() => t.items,
|
|
48
93
|
() => {
|
|
49
|
-
|
|
94
|
+
c?.path && (b(t.items, c.path), x(c.path));
|
|
50
95
|
},
|
|
51
96
|
{ deep: !0 }
|
|
97
|
+
), h(
|
|
98
|
+
() => i.value,
|
|
99
|
+
() => {
|
|
100
|
+
d?.renderNestedTabs?.value && x(c?.path || "");
|
|
101
|
+
}
|
|
52
102
|
);
|
|
53
|
-
const
|
|
103
|
+
const B = E({
|
|
54
104
|
activeItem: i,
|
|
55
|
-
expandedItems:
|
|
56
|
-
toggleExpand: (
|
|
57
|
-
|
|
105
|
+
expandedItems: u,
|
|
106
|
+
toggleExpand: (l) => {
|
|
107
|
+
u.value.includes(l) ? u.value = u.value.filter((a) => a !== l) : t.allowMultiple ? u.value.push(l) : u.value = [l];
|
|
58
108
|
},
|
|
59
|
-
setActive: (
|
|
60
|
-
i.value =
|
|
109
|
+
setActive: (l) => {
|
|
110
|
+
i.value = l;
|
|
61
111
|
},
|
|
62
|
-
indentSize:
|
|
63
|
-
variant:
|
|
64
|
-
renderMode:
|
|
65
|
-
|
|
66
|
-
|
|
112
|
+
indentSize: n(() => t.indentSize),
|
|
113
|
+
variant: n(() => t.variant),
|
|
114
|
+
renderMode: n(() => t.renderMode || "tree"),
|
|
115
|
+
renderNestedTabs: n(() => !!d?.renderNestedTabs?.value),
|
|
116
|
+
compact: n(() => t.compact),
|
|
117
|
+
showCompactLabels: n(() => t.showCompactLabels),
|
|
118
|
+
iconSize: n(() => t.iconSize),
|
|
119
|
+
compactIconSize: n(() => t.compactIconSize),
|
|
120
|
+
labelClass: n(() => t.labelClass),
|
|
121
|
+
compactLabelClass: n(() => t.compactLabelClass),
|
|
122
|
+
itemPadding: n(() => t.itemPadding),
|
|
123
|
+
compactItemPadding: n(() => t.compactItemPadding),
|
|
124
|
+
nestedMenuWidth: n(() => t.nestedMenuWidth),
|
|
125
|
+
nestedMenuMaxHeight: n(() => t.nestedMenuMaxHeight),
|
|
126
|
+
currentOrientation: v,
|
|
127
|
+
showTooltip: n(() => t.showTooltip)
|
|
67
128
|
});
|
|
68
|
-
return
|
|
69
|
-
(
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
129
|
+
return N("sidebar-menu-ctx", B), (l, s) => (g(), y("nav", {
|
|
130
|
+
class: L(["flex w-full transition-all duration-300", [
|
|
131
|
+
v.value === "horizontal" ? "flex-row flex-wrap gap-2 items-center" : "flex-col",
|
|
132
|
+
v.value === "vertical" && !t.compact ? "space-y-1" : ""
|
|
133
|
+
]]),
|
|
134
|
+
role: "tree",
|
|
135
|
+
"aria-label": "Sidebar Menu"
|
|
136
|
+
}, [
|
|
137
|
+
(g(!0), y(P, null, A(m.items, (a) => (g(), O(D, {
|
|
138
|
+
key: a.id || a.label,
|
|
139
|
+
item: a,
|
|
140
|
+
itemClass: m.itemClass,
|
|
141
|
+
menuOffset: m.menuOffset
|
|
142
|
+
}, null, 8, ["item", "itemClass", "menuOffset"]))), 128))
|
|
143
|
+
], 2));
|
|
74
144
|
}
|
|
75
145
|
});
|
|
76
146
|
export {
|
|
77
|
-
|
|
147
|
+
J as default
|
|
78
148
|
};
|
|
@@ -2,6 +2,8 @@ import { SidebarMenuItemSchema } from './types';
|
|
|
2
2
|
interface Props {
|
|
3
3
|
item: SidebarMenuItemSchema;
|
|
4
4
|
depth?: number;
|
|
5
|
+
menuOffset?: [number, number];
|
|
6
|
+
itemClass?: string;
|
|
5
7
|
}
|
|
6
8
|
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
7
9
|
depth: number;
|