vlite3 1.5.5 → 1.5.6
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 +34 -0
- package/VLiteIconsVite.d.ts +36 -0
- package/components/AppShell/AppShell.vue.d.ts +1 -1
- package/components/AppShell/AppShellLayoutDashboard.vue.js +3 -2
- package/components/AppShell/AppShellLayoutDock.vue.js +3 -2
- package/components/AppShell/AppShellLayoutHeaderShell.vue.js +28 -27
- package/components/AppShell/AppShellLayoutSidebarFirst.vue.js +3 -2
- package/components/AsyncSelect/createAsyncSelect.d.ts +4 -4
- package/components/AsyncSelect/createAsyncSelect.js +3 -2
- package/components/BackButton.vue.d.ts +1 -1
- package/components/CategoryManager/CategoryManager.vue2.js +16 -16
- package/components/CategoryManager/CategoryNode.vue.js +16 -16
- package/components/CategoryMenu/CategoryMenu.vue.js +9 -8
- package/components/Chart/BarChart.vue.d.ts +1 -1
- package/components/Chart/GanttChart.vue.d.ts +1 -1
- package/components/Chart/LineChart.vue.d.ts +1 -1
- package/components/Chart/TimelineChart.vue.d.ts +1 -1
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.js +2 -2
- package/components/ConfirmationModal.vue.d.ts +4 -0
- package/components/ConfirmationModal.vue.js +47 -39
- package/components/DataTable/DataTable.vue.js +319 -294
- package/components/DataTable/DataTableRow.vue.d.ts +2 -0
- package/components/DataTable/DataTableRow.vue.js +2 -2
- package/components/DataTable/DataTableRow.vue2.js +57 -54
- package/components/DataTable/types.d.ts +2 -0
- package/components/DatePicker.vue.js +5 -4
- package/components/Empty/Empty.vue.js +3 -2
- package/components/ExportData/ExportData.vue.d.ts +1 -1
- package/components/Form/Form.vue2.js +44 -43
- package/components/Form/FormField.vue.js +24 -24
- package/components/Heatmap/Heatmap.vue2.js +3 -2
- package/components/Icon.vue.d.ts +3 -2
- package/components/Icon.vue.js +22 -12
- package/components/IconPicker.vue.js +5 -133
- package/components/IconPicker.vue2.js +218 -2
- package/components/ImportData/ImportData.vue.js +3 -2
- package/components/ImportData/ImportStep2.vue.js +3 -2
- package/components/Kanban/KanbanBoard.vue2.js +4 -2
- package/components/List/utils.js +5 -4
- package/components/Masonry/Masonry.vue2.js +14 -13
- package/components/Navbar/Navbar.vue.d.ts +1 -1
- package/components/Price/Price.vue.js +13 -12
- package/components/Rating/Rating.vue.js +2 -2
- package/components/Rating/Rating.vue2.js +41 -41
- package/components/Rating/ReviewSummary.vue.js +20 -20
- package/components/RichTextEditor/RichTextEditor.vue.js +4 -4
- package/components/RichTextEditor/RichTextLinkPopover.vue3.js +2 -2
- package/components/RichTextEditor/RichTextToolbar.vue3.js +2 -2
- package/components/Screen/ScreenFilter.vue.js +7 -5
- package/components/Screen/components/ScreenExportModal.vue.d.ts +2 -2
- package/components/Stats/StatItem.vue.js +3 -2
- package/components/StatusChip/StatusChip.vue.js +6 -5
- package/components/Workbook/Sheet.vue.js +11 -11
- package/core/config.d.ts +28 -0
- package/core/config.js +23 -21
- package/core/index.js +18 -17
- package/icons/IconRegistry.d.ts +38 -0
- package/icons/IconRegistry.js +166 -0
- package/icons/IconTypes.d.ts +37 -0
- package/index.d.ts +2 -0
- package/index.js +473 -457
- package/package.json +15 -3
- package/style.css +1 -1
- package/types/config.type.d.ts +8 -1
- package/utils/functions.js +44 -43
- package/utils/index.d.ts +1 -0
- package/vite.d.ts +6 -0
- package/vite.js +223 -0
- /package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +0 -0
- /package/components/RichTextEditor/{RichTextLinkPopover.vue2.js → RichTextLinkPopover.vue.js} +0 -0
- /package/components/RichTextEditor/{RichTextToolbar.vue2.js → RichTextToolbar.vue.js} +0 -0
package/README.md
CHANGED
|
@@ -146,6 +146,40 @@ app.use(vlite)
|
|
|
146
146
|
app.mount('#app')
|
|
147
147
|
```
|
|
148
148
|
|
|
149
|
+
### Online, Hybrid, and Offline Icons
|
|
150
|
+
|
|
151
|
+
Iconify loading remains online by default, so existing applications do not need
|
|
152
|
+
to change:
|
|
153
|
+
|
|
154
|
+
```ts
|
|
155
|
+
createVLite()
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Applications that cannot make third-party requests can register local
|
|
159
|
+
IconifyJSON data through the same plugin:
|
|
160
|
+
|
|
161
|
+
```ts
|
|
162
|
+
import { icons as lucideIcons } from '@iconify-json/lucide'
|
|
163
|
+
|
|
164
|
+
createVLite({
|
|
165
|
+
icons: {
|
|
166
|
+
mode: 'offline',
|
|
167
|
+
collections: [lucideIcons],
|
|
168
|
+
fallback: 'lucide:circle-help',
|
|
169
|
+
warnOnMissing: true,
|
|
170
|
+
},
|
|
171
|
+
})
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Available modes are `online`, `hybrid` (local first, online fallback), and
|
|
175
|
+
`offline` (local data only, with no Iconify API request for missing names).
|
|
176
|
+
`@iconify/vue@^5` is a peer dependency so registration and rendering share one
|
|
177
|
+
predictable runtime registry.
|
|
178
|
+
|
|
179
|
+
For selected-icon Vite bundles, complete collections, dynamic icon inclusion,
|
|
180
|
+
manual registration, and offline picker behavior, see
|
|
181
|
+
[the Icon guide](./docs/1-Components/Icon.md).
|
|
182
|
+
|
|
149
183
|
### Global Application Scale
|
|
150
184
|
|
|
151
185
|
Use the root-level `scale` option to control the visual density of the complete application:
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Plugin } from 'vite';
|
|
2
|
+
import { VLiteIconMode } from './icons/IconTypes';
|
|
3
|
+
export interface VLiteIconsViteOptions {
|
|
4
|
+
/**
|
|
5
|
+
* Used to select the default unresolved-icon reporting policy.
|
|
6
|
+
* Runtime resolution mode is still configured through createVLite().
|
|
7
|
+
*/
|
|
8
|
+
mode?: VLiteIconMode;
|
|
9
|
+
include?: string | readonly string[];
|
|
10
|
+
/**
|
|
11
|
+
* Explicit dynamic icon IDs that static source scanning cannot discover.
|
|
12
|
+
*/
|
|
13
|
+
icons?: readonly string[];
|
|
14
|
+
/**
|
|
15
|
+
* Complete installed @iconify-json/<prefix> collections to include.
|
|
16
|
+
*/
|
|
17
|
+
collections?: readonly string[];
|
|
18
|
+
/**
|
|
19
|
+
* Scan the installed vlite3 distribution for its statically declared icons.
|
|
20
|
+
* Enabled by default.
|
|
21
|
+
*/
|
|
22
|
+
scanVLite?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Automatically load the generated registration module before HTML entries.
|
|
25
|
+
*/
|
|
26
|
+
autoRegister?: boolean;
|
|
27
|
+
onMissing?: 'error' | 'warn';
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Generate and synchronously register a deterministic local icon bundle.
|
|
31
|
+
*
|
|
32
|
+
* Only installed, version-locked @iconify-json/<prefix> packages are read.
|
|
33
|
+
* This plugin never downloads icon data.
|
|
34
|
+
*/
|
|
35
|
+
export declare function vliteIcons(options?: VLiteIconsViteOptions): Plugin;
|
|
36
|
+
export default vliteIcons;
|
|
@@ -4,8 +4,8 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Ap
|
|
|
4
4
|
}, string, import('vue').PublicProps, Readonly<AppShellProps> & Readonly<{
|
|
5
5
|
"onToggle-mobile"?: () => any;
|
|
6
6
|
}>, {
|
|
7
|
-
class: string;
|
|
8
7
|
height: string;
|
|
8
|
+
class: string;
|
|
9
9
|
border: boolean;
|
|
10
10
|
variant: import('../../types/appshell.type').AppShellVariant;
|
|
11
11
|
floating: boolean;
|
|
@@ -3,6 +3,7 @@ import M from "../SidePanel.vue.js";
|
|
|
3
3
|
import P from "../Navbar/NavbarTabs.vue.js";
|
|
4
4
|
import A from "../Breadcrumb/Breadcrumb.vue.js";
|
|
5
5
|
import "@iconify/vue";
|
|
6
|
+
import "../../icons/IconRegistry.js";
|
|
6
7
|
/* empty css */
|
|
7
8
|
import { APPSHELL_LAYOUT_KEY as D } from "./useAppShell.js";
|
|
8
9
|
const H = { class: "vlite-app-layout flex w-full h-full bg-muted/20 p-0 sm:p-2.5 gap-0 sm:gap-2.5 overflow-hidden" }, O = {
|
|
@@ -20,7 +21,7 @@ const H = { class: "vlite-app-layout flex w-full h-full bg-muted/20 p-0 sm:p-2.5
|
|
|
20
21
|
}, K = {
|
|
21
22
|
key: 0,
|
|
22
23
|
class: "mt-auto"
|
|
23
|
-
},
|
|
24
|
+
}, le = /* @__PURE__ */ R({
|
|
24
25
|
__name: "AppShellLayoutDashboard",
|
|
25
26
|
setup(q) {
|
|
26
27
|
const $ = _(D), {
|
|
@@ -169,5 +170,5 @@ const H = { class: "vlite-app-layout flex w-full h-full bg-muted/20 p-0 sm:p-2.5
|
|
|
169
170
|
}
|
|
170
171
|
});
|
|
171
172
|
export {
|
|
172
|
-
|
|
173
|
+
le as default
|
|
173
174
|
};
|
|
@@ -3,6 +3,7 @@ import L from "../SidePanel.vue.js";
|
|
|
3
3
|
import M from "../Navbar/NavbarTabs.vue.js";
|
|
4
4
|
import P from "../Breadcrumb/Breadcrumb.vue.js";
|
|
5
5
|
import "@iconify/vue";
|
|
6
|
+
import "../../icons/IconRegistry.js";
|
|
6
7
|
/* empty css */
|
|
7
8
|
import { APPSHELL_LAYOUT_KEY as A } from "./useAppShell.js";
|
|
8
9
|
const D = { class: "vlite-app-layout flex w-full h-full bg-background p-0 sm:p-2 gap-0 sm:gap-2 overflow-hidden items-stretch" }, H = {
|
|
@@ -20,7 +21,7 @@ const D = { class: "vlite-app-layout flex w-full h-full bg-background p-0 sm:p-2
|
|
|
20
21
|
}, F = {
|
|
21
22
|
key: 0,
|
|
22
23
|
class: "mt-auto pt-2 border-t border-border px-3 py-2"
|
|
23
|
-
},
|
|
24
|
+
}, se = /* @__PURE__ */ _({
|
|
24
25
|
__name: "AppShellLayoutDock",
|
|
25
26
|
setup(K) {
|
|
26
27
|
const x = R(A), {
|
|
@@ -163,5 +164,5 @@ const D = { class: "vlite-app-layout flex w-full h-full bg-background p-0 sm:p-2
|
|
|
163
164
|
}
|
|
164
165
|
});
|
|
165
166
|
export {
|
|
166
|
-
|
|
167
|
+
se as default
|
|
167
168
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { defineComponent as _, inject as R, openBlock as
|
|
1
|
+
import { defineComponent as _, inject as R, openBlock as a, createElementBlock as o, createVNode as m, Transition as B, unref as e, withCtx as p, withDirectives as y, createElementVNode as t, normalizeClass as b, renderSlot as r, createCommentVNode as i, vShow as w, isRef as k, createSlots as E, createTextVNode as H } from "vue";
|
|
2
2
|
import L from "../SidePanel.vue.js";
|
|
3
3
|
import M from "../Navbar/NavbarTabs.vue.js";
|
|
4
4
|
import P from "../Breadcrumb/Breadcrumb.vue.js";
|
|
5
5
|
import "@iconify/vue";
|
|
6
|
+
import "../../icons/IconRegistry.js";
|
|
6
7
|
/* empty css */
|
|
7
8
|
import { APPSHELL_LAYOUT_KEY as A } from "./useAppShell.js";
|
|
8
9
|
const O = { class: "vlite-app-layout flex w-full h-full bg-background overflow-hidden" }, U = {
|
|
@@ -20,7 +21,7 @@ const O = { class: "vlite-app-layout flex w-full h-full bg-background overflow-h
|
|
|
20
21
|
}, q = {
|
|
21
22
|
key: 0,
|
|
22
23
|
class: "mt-auto"
|
|
23
|
-
},
|
|
24
|
+
}, re = /* @__PURE__ */ _({
|
|
24
25
|
__name: "AppShellLayoutHeaderShell",
|
|
25
26
|
setup(G) {
|
|
26
27
|
const $ = R(A), {
|
|
@@ -32,14 +33,14 @@ const O = { class: "vlite-app-layout flex w-full h-full bg-background overflow-h
|
|
|
32
33
|
pageTitle: T,
|
|
33
34
|
breadcrumbData: f,
|
|
34
35
|
breakpointClasses: u,
|
|
35
|
-
nestedTabsItems:
|
|
36
|
+
nestedTabsItems: v,
|
|
36
37
|
activeNestedTab: c,
|
|
37
38
|
handleNestedTabClick: V,
|
|
38
39
|
mainScrollRef: z,
|
|
39
40
|
layoutMainRef: N,
|
|
40
41
|
sidebarSlideFromClass: g
|
|
41
42
|
} = $;
|
|
42
|
-
return (s, n) => (
|
|
43
|
+
return (s, n) => (a(), o("div", O, [
|
|
43
44
|
m(B, {
|
|
44
45
|
"enter-active-class": "transition-all duration-300 ease-in-out",
|
|
45
46
|
"leave-active-class": "transition-all duration-300 ease-in-out",
|
|
@@ -48,7 +49,7 @@ const O = { class: "vlite-app-layout flex w-full h-full bg-background overflow-h
|
|
|
48
49
|
"leave-from-class": "opacity-100 translate-x-0",
|
|
49
50
|
"leave-to-class": e(g)
|
|
50
51
|
}, {
|
|
51
|
-
default:
|
|
52
|
+
default: p(() => [
|
|
52
53
|
y(t("nav", {
|
|
53
54
|
class: b([
|
|
54
55
|
"shrink-0 h-full flex flex-col bg-background border-e border-border overflow-hidden z-30",
|
|
@@ -58,20 +59,20 @@ const O = { class: "vlite-app-layout flex w-full h-full bg-background overflow-h
|
|
|
58
59
|
role: "navigation",
|
|
59
60
|
"aria-label": "Sidebar"
|
|
60
61
|
}, [
|
|
61
|
-
s.$slots["sidebar-header"] ? (
|
|
62
|
-
|
|
62
|
+
s.$slots["sidebar-header"] ? (a(), o("div", U, [
|
|
63
|
+
r(s.$slots, "sidebar-header")
|
|
63
64
|
])) : i("", !0),
|
|
64
65
|
t("div", {
|
|
65
66
|
class: b(["flex-1 overflow-y-auto overflow-x-hidden scrollbar-thin scrollbar-stable", e(l).contentClass]),
|
|
66
67
|
style: { "will-change": "transform", contain: "layout style" }
|
|
67
68
|
}, [
|
|
68
|
-
|
|
69
|
+
r(s.$slots, "sidebar")
|
|
69
70
|
], 2),
|
|
70
|
-
s.$slots["sidebar-footer"] ? (
|
|
71
|
+
s.$slots["sidebar-footer"] ? (a(), o("div", {
|
|
71
72
|
key: 1,
|
|
72
73
|
class: b(["shrink-0", e(l).rightClass])
|
|
73
74
|
}, [
|
|
74
|
-
|
|
75
|
+
r(s.$slots, "sidebar-footer")
|
|
75
76
|
], 2)) : i("", !0)
|
|
76
77
|
], 2), [
|
|
77
78
|
[w, !e(C)]
|
|
@@ -80,9 +81,9 @@ const O = { class: "vlite-app-layout flex w-full h-full bg-background overflow-h
|
|
|
80
81
|
_: 3
|
|
81
82
|
}, 8, ["enter-from-class", "leave-to-class"]),
|
|
82
83
|
t("div", D, [
|
|
83
|
-
s.$slots.header ? y((
|
|
84
|
+
s.$slots.header ? y((a(), o("header", I, [
|
|
84
85
|
t("div", Y, [
|
|
85
|
-
|
|
86
|
+
r(s.$slots, "header", {
|
|
86
87
|
isOpen: e(d),
|
|
87
88
|
toggle: () => d.value = !e(d),
|
|
88
89
|
sidebarVisible: e(S),
|
|
@@ -94,21 +95,21 @@ const O = { class: "vlite-app-layout flex w-full h-full bg-background overflow-h
|
|
|
94
95
|
], 512)), [
|
|
95
96
|
[w, !e(l).hideHeader]
|
|
96
97
|
]) : i("", !0),
|
|
97
|
-
s.$slots.main ? (
|
|
98
|
+
s.$slots.main ? (a(), o("main", {
|
|
98
99
|
key: 1,
|
|
99
100
|
ref_key: "layoutMainRef",
|
|
100
101
|
ref: N,
|
|
101
102
|
class: "flex-1 overflow-hidden w-full relative flex flex-col min-h-0 bg-background"
|
|
102
103
|
}, [
|
|
103
|
-
e(l).renderNestedTabs && e(
|
|
104
|
+
e(l).renderNestedTabs && e(v).length > 0 ? (a(), o("div", j, [
|
|
104
105
|
m(M, {
|
|
105
106
|
modelValue: e(c),
|
|
106
107
|
"onUpdate:modelValue": n[0] || (n[0] = (h) => k(c) ? c.value = h : null),
|
|
107
108
|
onChange: e(V),
|
|
108
|
-
items: e(
|
|
109
|
+
items: e(v)
|
|
109
110
|
}, null, 8, ["modelValue", "onChange", "items"])
|
|
110
111
|
])) : i("", !0),
|
|
111
|
-
e(l).breadcrumb && e(l).breadcrumbPosition === "main" && e(f).items.value.length > 1 ? (
|
|
112
|
+
e(l).breadcrumb && e(l).breadcrumbPosition === "main" && e(f).items.value.length > 1 ? (a(), o("div", {
|
|
112
113
|
key: 1,
|
|
113
114
|
class: b(["shrink-0 w-full border-b border-border px-6 py-2", e(l).breadcrumbClass])
|
|
114
115
|
}, [
|
|
@@ -125,7 +126,7 @@ const O = { class: "vlite-app-layout flex w-full h-full bg-background overflow-h
|
|
|
125
126
|
style: { "will-change": "transform", contain: "layout style" },
|
|
126
127
|
class: "flex-1 overflow-y-auto w-full relative h-full scrollbar-thin scrollbar-stable"
|
|
127
128
|
}, [
|
|
128
|
-
|
|
129
|
+
r(s.$slots, "main")
|
|
129
130
|
], 512)
|
|
130
131
|
], 512)) : i("", !0)
|
|
131
132
|
]),
|
|
@@ -139,16 +140,16 @@ const O = { class: "vlite-app-layout flex w-full h-full bg-background overflow-h
|
|
|
139
140
|
headerClass: "ps-3! pe-4.5! py-3!",
|
|
140
141
|
bodyClass: "p-0!"
|
|
141
142
|
}, E({
|
|
142
|
-
default:
|
|
143
|
+
default: p(() => [
|
|
143
144
|
t("div", F, [
|
|
144
145
|
t("div", K, [
|
|
145
|
-
|
|
146
|
-
|
|
146
|
+
r(s.$slots, "mobile-sidebar", {}, () => [
|
|
147
|
+
r(s.$slots, "sidebar")
|
|
147
148
|
])
|
|
148
149
|
]),
|
|
149
|
-
s.$slots["mobile-sidebar-footer"] || s.$slots["sidebar-footer"] ? (
|
|
150
|
-
|
|
151
|
-
|
|
150
|
+
s.$slots["mobile-sidebar-footer"] || s.$slots["sidebar-footer"] ? (a(), o("div", q, [
|
|
151
|
+
r(s.$slots, "mobile-sidebar-footer", {}, () => [
|
|
152
|
+
r(s.$slots, "sidebar-footer")
|
|
152
153
|
])
|
|
153
154
|
])) : i("", !0)
|
|
154
155
|
])
|
|
@@ -157,9 +158,9 @@ const O = { class: "vlite-app-layout flex w-full h-full bg-background overflow-h
|
|
|
157
158
|
}, [
|
|
158
159
|
s.$slots["mobile-sidebar-header"] || s.$slots["sidebar-header"] ? {
|
|
159
160
|
name: "header",
|
|
160
|
-
fn:
|
|
161
|
-
|
|
162
|
-
|
|
161
|
+
fn: p(() => [
|
|
162
|
+
r(s.$slots, "mobile-sidebar-header", {}, () => [
|
|
163
|
+
r(s.$slots, "sidebar-header", {}, () => [
|
|
163
164
|
n[2] || (n[2] = H("Brand", -1))
|
|
164
165
|
])
|
|
165
166
|
])
|
|
@@ -171,5 +172,5 @@ const O = { class: "vlite-app-layout flex w-full h-full bg-background overflow-h
|
|
|
171
172
|
}
|
|
172
173
|
});
|
|
173
174
|
export {
|
|
174
|
-
|
|
175
|
+
re as default
|
|
175
176
|
};
|
|
@@ -3,6 +3,7 @@ import P from "../SidePanel.vue.js";
|
|
|
3
3
|
import A from "../Navbar/NavbarTabs.vue.js";
|
|
4
4
|
import H from "../Breadcrumb/Breadcrumb.vue.js";
|
|
5
5
|
import "@iconify/vue";
|
|
6
|
+
import "../../icons/IconRegistry.js";
|
|
6
7
|
/* empty css */
|
|
7
8
|
import { APPSHELL_LAYOUT_KEY as O } from "./useAppShell.js";
|
|
8
9
|
const U = { class: "vlite-app-layout flex w-full h-full bg-body overflow-hidden" }, _ = { class: "flex flex-col flex-1 min-w-0 h-full overflow-hidden" }, D = {
|
|
@@ -17,7 +18,7 @@ const U = { class: "vlite-app-layout flex w-full h-full bg-body overflow-hidden"
|
|
|
17
18
|
}, j = {
|
|
18
19
|
key: 0,
|
|
19
20
|
class: "mt-auto"
|
|
20
|
-
},
|
|
21
|
+
}, se = /* @__PURE__ */ R({
|
|
21
22
|
__name: "AppShellLayoutSidebarFirst",
|
|
22
23
|
setup(K) {
|
|
23
24
|
const $ = B(O), {
|
|
@@ -164,5 +165,5 @@ const U = { class: "vlite-app-layout flex w-full h-full bg-body overflow-hidden"
|
|
|
164
165
|
}
|
|
165
166
|
});
|
|
166
167
|
export {
|
|
167
|
-
|
|
168
|
+
se as default
|
|
168
169
|
};
|
|
@@ -52,10 +52,10 @@ export declare const createAsyncSelect: <T extends {
|
|
|
52
52
|
id?: string | number;
|
|
53
53
|
}>(config: CreateSelectConfig<T>) => import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
54
54
|
value: {
|
|
55
|
-
type: (ObjectConstructor | ArrayConstructor |
|
|
55
|
+
type: (ObjectConstructor | ArrayConstructor | StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
56
56
|
};
|
|
57
57
|
modelValue: {
|
|
58
|
-
type: (ObjectConstructor | ArrayConstructor |
|
|
58
|
+
type: (ObjectConstructor | ArrayConstructor | StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
59
59
|
};
|
|
60
60
|
multiple: {
|
|
61
61
|
type: BooleanConstructor;
|
|
@@ -91,10 +91,10 @@ export declare const createAsyncSelect: <T extends {
|
|
|
91
91
|
};
|
|
92
92
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("onChange" | "change" | "update:modelValue")[], "onChange" | "change" | "update:modelValue", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
93
93
|
value: {
|
|
94
|
-
type: (ObjectConstructor | ArrayConstructor |
|
|
94
|
+
type: (ObjectConstructor | ArrayConstructor | StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
95
95
|
};
|
|
96
96
|
modelValue: {
|
|
97
|
-
type: (ObjectConstructor | ArrayConstructor |
|
|
97
|
+
type: (ObjectConstructor | ArrayConstructor | StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
98
98
|
};
|
|
99
99
|
multiple: {
|
|
100
100
|
type: BooleanConstructor;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineComponent as E, ref as y, computed as i, watch as I, createVNode as d, mergeProps as j, nextTick as H, isVNode as L } from "vue";
|
|
2
2
|
import Q from "../Dropdown/Dropdown.vue.js";
|
|
3
3
|
import "@iconify/vue";
|
|
4
|
+
import "../../icons/IconRegistry.js";
|
|
4
5
|
import "../../core/config.js";
|
|
5
6
|
/* empty css */
|
|
6
7
|
/* empty css */
|
|
@@ -11,7 +12,7 @@ import U from "../Modal.vue.js";
|
|
|
11
12
|
function M(t) {
|
|
12
13
|
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !L(t);
|
|
13
14
|
}
|
|
14
|
-
const
|
|
15
|
+
const le = (t) => /* @__PURE__ */ E({
|
|
15
16
|
name: t.name,
|
|
16
17
|
inheritAttrs: !1,
|
|
17
18
|
props: {
|
|
@@ -214,5 +215,5 @@ const re = (t) => /* @__PURE__ */ E({
|
|
|
214
215
|
}
|
|
215
216
|
});
|
|
216
217
|
export {
|
|
217
|
-
|
|
218
|
+
le as createAsyncSelect
|
|
218
219
|
};
|
|
@@ -15,10 +15,10 @@ export interface BackButtonProps {
|
|
|
15
15
|
fallback?: string;
|
|
16
16
|
}
|
|
17
17
|
declare const _default: import('vue').DefineComponent<BackButtonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BackButtonProps> & Readonly<{}>, {
|
|
18
|
+
fallback: string;
|
|
18
19
|
icon: string;
|
|
19
20
|
class: string;
|
|
20
21
|
size: ButtonSize;
|
|
21
|
-
fallback: string;
|
|
22
22
|
tooltip: string;
|
|
23
23
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLButtonElement>;
|
|
24
24
|
export default _default;
|
|
@@ -19,23 +19,23 @@ import "v-datepicker-lite/style.css";
|
|
|
19
19
|
/* empty css */
|
|
20
20
|
import "@jaames/iro";
|
|
21
21
|
import "@vueuse/core";
|
|
22
|
-
/* empty css
|
|
22
|
+
/* empty css */
|
|
23
23
|
import qe from "../IconPicker.vue.js";
|
|
24
24
|
/* empty css */
|
|
25
25
|
/* empty css */
|
|
26
26
|
/* empty css */
|
|
27
27
|
/* empty css */
|
|
28
|
-
/* empty css
|
|
29
|
-
/* empty css
|
|
28
|
+
/* empty css */
|
|
29
|
+
/* empty css */
|
|
30
30
|
import "../../core/config.js";
|
|
31
31
|
/* empty css */
|
|
32
32
|
/* empty css */
|
|
33
33
|
import { getUniqueId as _ } from "../../utils/functions.js";
|
|
34
34
|
import { buildTreeFromRaw as ze, ensureMeta as w } from "./utils.js";
|
|
35
|
-
const Ue = { class: "flex items-center justify-between mb-6" }, Oe = { class: "text-lg font-bold text-foreground" }, Fe = { class: "text-sm text-muted-foreground mt-0.5" },
|
|
35
|
+
const Ue = { class: "flex items-center justify-between mb-6" }, Oe = { class: "text-lg font-bold text-foreground" }, Fe = { class: "text-sm text-muted-foreground mt-0.5" }, Be = {
|
|
36
36
|
key: 0,
|
|
37
37
|
class: "flex flex-col items-center justify-center py-10 px-4 text-center border border-dashed border-border rounded-xl bg-background"
|
|
38
|
-
},
|
|
38
|
+
}, Je = { class: "w-12 h-12 bg-muted rounded-full flex items-center justify-center mb-4" }, $e = { class: "text-base font-medium text-foreground" }, je = { class: "text-sm text-muted-foreground mt-1 max-w-sm" }, Ge = {
|
|
39
39
|
key: 1,
|
|
40
40
|
class: "w-full tree-wrapper scrollable-container",
|
|
41
41
|
style: { "will-change": "transform", contain: "layout style" }
|
|
@@ -326,7 +326,7 @@ const Ue = { class: "flex items-center justify-between mb-6" }, Oe = { class: "t
|
|
|
326
326
|
if (e.categoryTitlePlaceholder) return e.categoryTitlePlaceholder;
|
|
327
327
|
const t = a("vlite.categoryManager.categoryTitlePlaceholder");
|
|
328
328
|
return t !== "vlite.categoryManager.categoryTitlePlaceholder" ? t : "Category title...";
|
|
329
|
-
}), Te = s(() => e.quickAddTooltipI18n ? a(e.quickAddTooltipI18n) : e.quickAddTooltip ? e.quickAddTooltip : a("vlite.categoryManager.quickAddTooltip") !== "vlite.categoryManager.quickAddTooltip" ? a("vlite.categoryManager.quickAddTooltip") : "Quick Add Subcategory"), he = s(() => e.advancedDetailsTooltipI18n ? a(e.advancedDetailsTooltipI18n) : e.advancedDetailsTooltip ? e.advancedDetailsTooltip : a("vlite.categoryManager.advancedDetailsTooltip") !== "vlite.categoryManager.advancedDetailsTooltip" ? a("vlite.categoryManager.advancedDetailsTooltip") : "Advanced Details"), xe = s(() => e.deleteTooltipI18n ? a(e.deleteTooltipI18n) : e.deleteTooltip ? e.deleteTooltip : a("vlite.categoryManager.deleteTooltip") !== "vlite.categoryManager.deleteTooltip" ? a("vlite.categoryManager.deleteTooltip") : "Delete"),
|
|
329
|
+
}), Te = s(() => e.quickAddTooltipI18n ? a(e.quickAddTooltipI18n) : e.quickAddTooltip ? e.quickAddTooltip : a("vlite.categoryManager.quickAddTooltip") !== "vlite.categoryManager.quickAddTooltip" ? a("vlite.categoryManager.quickAddTooltip") : "Quick Add Subcategory"), he = s(() => e.advancedDetailsTooltipI18n ? a(e.advancedDetailsTooltipI18n) : e.advancedDetailsTooltip ? e.advancedDetailsTooltip : a("vlite.categoryManager.advancedDetailsTooltip") !== "vlite.categoryManager.advancedDetailsTooltip" ? a("vlite.categoryManager.advancedDetailsTooltip") : "Advanced Details"), xe = s(() => e.deleteTooltipI18n ? a(e.deleteTooltipI18n) : e.deleteTooltip ? e.deleteTooltip : a("vlite.categoryManager.deleteTooltip") !== "vlite.categoryManager.deleteTooltip" ? a("vlite.categoryManager.deleteTooltip") : "Delete"), B = s(() => e.saveTooltipI18n ? a(e.saveTooltipI18n) : e.saveTooltip ? e.saveTooltip : a("vlite.categoryManager.saveTooltip") !== "vlite.categoryManager.saveTooltip" ? a("vlite.categoryManager.saveTooltip") : "Save"), J = s(() => e.cancelTooltipI18n ? a(e.cancelTooltipI18n) : e.cancelTooltip ? e.cancelTooltip : a("vlite.categoryManager.cancelTooltip") !== "vlite.categoryManager.cancelTooltip" ? a("vlite.categoryManager.cancelTooltip") : "Cancel");
|
|
330
330
|
Ce("categoryManager", {
|
|
331
331
|
expandedIds: g,
|
|
332
332
|
inlineState: y,
|
|
@@ -344,8 +344,8 @@ const Ue = { class: "flex items-center justify-between mb-6" }, Oe = { class: "t
|
|
|
344
344
|
quickAddTooltipText: Te,
|
|
345
345
|
advancedDetailsTooltipText: he,
|
|
346
346
|
deleteTooltipText: xe,
|
|
347
|
-
saveTooltipText:
|
|
348
|
-
cancelTooltipText:
|
|
347
|
+
saveTooltipText: B,
|
|
348
|
+
cancelTooltipText: J
|
|
349
349
|
});
|
|
350
350
|
const Ie = {
|
|
351
351
|
mounted: (t) => {
|
|
@@ -356,7 +356,7 @@ const Ue = { class: "flex items-center justify-between mb-6" }, Oe = { class: "t
|
|
|
356
356
|
g.value = t;
|
|
357
357
|
}, we = () => {
|
|
358
358
|
g.value = /* @__PURE__ */ new Set();
|
|
359
|
-
},
|
|
359
|
+
}, $ = (...t) => {
|
|
360
360
|
const o = new Set(g.value);
|
|
361
361
|
t.forEach((l) => o.add(l)), g.value = o;
|
|
362
362
|
}, Se = (...t) => {
|
|
@@ -364,12 +364,12 @@ const Ue = { class: "flex items-center justify-between mb-6" }, Oe = { class: "t
|
|
|
364
364
|
t.forEach((l) => o.delete(l)), g.value = o;
|
|
365
365
|
};
|
|
366
366
|
return De(() => {
|
|
367
|
-
e.defaultExpanded && e.defaultExpanded.length > 0 &&
|
|
367
|
+
e.defaultExpanded && e.defaultExpanded.length > 0 && $(...e.defaultExpanded);
|
|
368
368
|
}), L({
|
|
369
369
|
expandedIds: g,
|
|
370
370
|
expandAll: be,
|
|
371
371
|
collapseAll: we,
|
|
372
|
-
expand:
|
|
372
|
+
expand: $,
|
|
373
373
|
collapse: Se
|
|
374
374
|
}), (t, o) => (I(), C("div", {
|
|
375
375
|
class: Ae(["category-manager-container w-full bg-muted/10 rounded-xl border border-border p-4 lg:p-6 relative", { "category-manager--loading": M.loading }])
|
|
@@ -394,14 +394,14 @@ const Ue = { class: "flex items-center justify-between mb-6" }, Oe = { class: "t
|
|
|
394
394
|
}))
|
|
395
395
|
], !0)
|
|
396
396
|
]),
|
|
397
|
-
d.value.length === 0 && y.value.mode !== "add-root" ? (I(), C("div",
|
|
398
|
-
m("div",
|
|
397
|
+
d.value.length === 0 && y.value.mode !== "add-root" ? (I(), C("div", Be, [
|
|
398
|
+
m("div", Je, [
|
|
399
399
|
T(Q, {
|
|
400
400
|
icon: "lucide:folder-tree",
|
|
401
401
|
class: "w-6 h-6 text-muted-foreground"
|
|
402
402
|
})
|
|
403
403
|
]),
|
|
404
|
-
m("h4",
|
|
404
|
+
m("h4", $e, b(de.value), 1),
|
|
405
405
|
m("p", je, b(ce.value), 1),
|
|
406
406
|
M.readonly ? E("", !0) : (I(), G(R, {
|
|
407
407
|
key: 0,
|
|
@@ -447,7 +447,7 @@ const Ue = { class: "flex items-center justify-between mb-6" }, Oe = { class: "t
|
|
|
447
447
|
size: "xs",
|
|
448
448
|
icon: "lucide:check",
|
|
449
449
|
class: "shrink-0 h-7 w-7 px-0",
|
|
450
|
-
title:
|
|
450
|
+
title: B.value,
|
|
451
451
|
onClick: V
|
|
452
452
|
}, null, 8, ["title"]),
|
|
453
453
|
T(R, {
|
|
@@ -455,7 +455,7 @@ const Ue = { class: "flex items-center justify-between mb-6" }, Oe = { class: "t
|
|
|
455
455
|
size: "xs",
|
|
456
456
|
icon: "lucide:x",
|
|
457
457
|
class: "shrink-0 h-7 w-7 px-0",
|
|
458
|
-
title:
|
|
458
|
+
title: J.value,
|
|
459
459
|
onClick: D
|
|
460
460
|
}, null, 8, ["title"])
|
|
461
461
|
])) : E("", !0)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as P, inject as A, computed as g, resolveComponent as F, openBlock as a, createBlock as f, unref as l, withCtx as K, createElementBlock as i, Fragment as R, renderList as L, isMemoSame as O, createElementVNode as y, normalizeClass as u, createVNode as s, createCommentVNode as c, withDirectives as k, withModifiers as q, withKeys as w, vModelText as z, toDisplayString as Q, vShow as G } from "vue";
|
|
2
2
|
import { VueDraggable as H } from "vue-draggable-plus";
|
|
3
3
|
import C from "../Icon.vue.js";
|
|
4
4
|
import m from "../Button.vue.js";
|
|
5
|
-
import
|
|
5
|
+
import _ from "../IconPicker.vue.js";
|
|
6
6
|
const J = { class: "flex items-center gap-px overflow-hidden flex-1" }, W = ["onClick"], X = { class: "flex items-center gap-1.5 overflow-hidden flex-1 w-full" }, Y = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "drag-handle cursor-grab active:cursor-grabbing text-muted hover:text-foreground transition-colors p-0.5 shrink-0"
|
|
@@ -15,7 +15,7 @@ const J = { class: "flex items-center gap-px overflow-hidden flex-1" }, W = ["on
|
|
|
15
15
|
}, le = {
|
|
16
16
|
key: 1,
|
|
17
17
|
class: "flex items-center gap-1.5 py-1.5 px-2 bg-background border border-border shadow-sm rounded-lg w-full mb-1.5"
|
|
18
|
-
}, ne = ["placeholder"], ce = /* @__PURE__ */
|
|
18
|
+
}, ne = ["placeholder"], ce = /* @__PURE__ */ P({
|
|
19
19
|
__name: "CategoryNode",
|
|
20
20
|
props: {
|
|
21
21
|
modelValue: {},
|
|
@@ -23,7 +23,7 @@ const J = { class: "flex items-center gap-px overflow-hidden flex-1" }, W = ["on
|
|
|
23
23
|
},
|
|
24
24
|
emits: ["update:modelValue", "change", "dragEnd"],
|
|
25
25
|
setup(V, { emit: E }) {
|
|
26
|
-
const S = V, p = E, t =
|
|
26
|
+
const S = V, p = E, t = A("categoryManager"), b = g({
|
|
27
27
|
get: () => S.modelValue,
|
|
28
28
|
set: (d) => p("update:modelValue", d)
|
|
29
29
|
}), D = (d, n) => {
|
|
@@ -31,7 +31,7 @@ const J = { class: "flex items-center gap-px overflow-hidden flex-1" }, W = ["on
|
|
|
31
31
|
}, U = () => p("change"), N = (d) => {
|
|
32
32
|
const n = d.item?.dataset?.id;
|
|
33
33
|
n && p("dragEnd", n);
|
|
34
|
-
}, v = g(() => t?.readonly.value || !1), r = g(() => t?.size.value || "md"), M = g(() => r.value === "sm" ? "p-1 md:p-1.5" : r.value === "lg" ? "p-2 md:p-2.5" : "py-1.5 px-2"),
|
|
34
|
+
}, v = g(() => t?.readonly.value || !1), r = g(() => t?.size.value || "md"), M = g(() => r.value === "sm" ? "p-1 md:p-1.5" : r.value === "lg" ? "p-2 md:p-2.5" : "py-1.5 px-2"), I = g(() => {
|
|
35
35
|
const n = S.level === 0 ? "font-semibold" : "font-medium";
|
|
36
36
|
return r.value === "sm" ? `text-xs ${n} text-foreground` : r.value === "lg" ? `-text-fs-1 ${n} text-foreground` : `text-sm ${n} text-foreground`;
|
|
37
37
|
}), h = g(() => r.value === "sm" ? "w-3.5 h-3.5" : r.value === "lg" ? "w-4.5 h-4.5" : "w-4 h-4"), j = {
|
|
@@ -40,7 +40,7 @@ const J = { class: "flex items-center gap-px overflow-hidden flex-1" }, W = ["on
|
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
return (d, n) => {
|
|
43
|
-
const B =
|
|
43
|
+
const B = F("CategoryNode", !0);
|
|
44
44
|
return a(), f(l(H), {
|
|
45
45
|
modelValue: b.value,
|
|
46
46
|
"onUpdate:modelValue": n[11] || (n[11] = (e) => b.value = e),
|
|
@@ -52,9 +52,9 @@ const J = { class: "flex items-center gap-px overflow-hidden flex-1" }, W = ["on
|
|
|
52
52
|
class: "min-h-[2px]",
|
|
53
53
|
onEnd: N
|
|
54
54
|
}, {
|
|
55
|
-
default:
|
|
55
|
+
default: K(() => [
|
|
56
56
|
(a(!0), i(R, null, L(b.value, (e, oe, ae, x) => {
|
|
57
|
-
const
|
|
57
|
+
const T = [
|
|
58
58
|
e.id,
|
|
59
59
|
e.title,
|
|
60
60
|
e.icon,
|
|
@@ -65,7 +65,7 @@ const J = { class: "flex items-center gap-px overflow-hidden flex-1" }, W = ["on
|
|
|
65
65
|
v.value,
|
|
66
66
|
r.value
|
|
67
67
|
];
|
|
68
|
-
if (x && x.key === e.id && O(x,
|
|
68
|
+
if (x && x.key === e.id && O(x, T)) return x;
|
|
69
69
|
const $ = (a(), i("div", {
|
|
70
70
|
key: e.id,
|
|
71
71
|
"data-id": e.id,
|
|
@@ -102,7 +102,7 @@ const J = { class: "flex items-center gap-px overflow-hidden flex-1" }, W = ["on
|
|
|
102
102
|
key: 2,
|
|
103
103
|
icon: e.icon,
|
|
104
104
|
class: u([h.value, "shrink-0 text-muted-foreground"])
|
|
105
|
-
}, null, 8, ["icon", "class"])) : c("", !0) : (a(), f(
|
|
105
|
+
}, null, 8, ["icon", "class"])) : c("", !0) : (a(), f(_, {
|
|
106
106
|
key: 1,
|
|
107
107
|
value: e.icon,
|
|
108
108
|
"btn-props": {
|
|
@@ -118,13 +118,13 @@ const J = { class: "flex items-center gap-px overflow-hidden flex-1" }, W = ["on
|
|
|
118
118
|
}, null, 8, ["value", "btn-props", "onOnSelect"])),
|
|
119
119
|
v.value ? (a(), i("span", {
|
|
120
120
|
key: 4,
|
|
121
|
-
class: u(["truncate",
|
|
121
|
+
class: u(["truncate", I.value])
|
|
122
122
|
}, Q(e.title), 3)) : k((a(), i("input", {
|
|
123
123
|
key: 3,
|
|
124
124
|
"onUpdate:modelValue": (o) => e.title = o,
|
|
125
125
|
class: u([
|
|
126
126
|
"bg-transparent border-0 outline-none focus:ring-0 px-1 py-0.5 -ml-1 transition-colors w-full truncate cursor-text min-w-0 shadow-none caret-primary",
|
|
127
|
-
|
|
127
|
+
I.value
|
|
128
128
|
]),
|
|
129
129
|
placeholder: l(t)?.categoryTitlePlaceholderText.value || "Category title...",
|
|
130
130
|
onChange: (o) => l(t)?.saveItem(e),
|
|
@@ -132,7 +132,7 @@ const J = { class: "flex items-center gap-px overflow-hidden flex-1" }, W = ["on
|
|
|
132
132
|
onClick: n[1] || (n[1] = q(() => {
|
|
133
133
|
}, ["stop"]))
|
|
134
134
|
}, null, 42, Z)), [
|
|
135
|
-
[
|
|
135
|
+
[z, e.title]
|
|
136
136
|
])
|
|
137
137
|
])
|
|
138
138
|
]),
|
|
@@ -174,7 +174,7 @@ const J = { class: "flex items-center gap-px overflow-hidden flex-1" }, W = ["on
|
|
|
174
174
|
onDragEnd: n[2] || (n[2] = (o) => p("dragEnd", o))
|
|
175
175
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "level"])) : c("", !0),
|
|
176
176
|
l(t)?.inlineState.value.mode === "add-child" && l(t).inlineState.value.targetId === e.id ? (a(), i("div", le, [
|
|
177
|
-
s(
|
|
177
|
+
s(_, {
|
|
178
178
|
modelValue: l(t).inlineState.value.icon,
|
|
179
179
|
"onUpdate:modelValue": n[3] || (n[3] = (o) => l(t).inlineState.value.icon = o),
|
|
180
180
|
"btn-props": {
|
|
@@ -194,7 +194,7 @@ const J = { class: "flex items-center gap-px overflow-hidden flex-1" }, W = ["on
|
|
|
194
194
|
]
|
|
195
195
|
}, null, 40, ne), [
|
|
196
196
|
[j],
|
|
197
|
-
[
|
|
197
|
+
[z, l(t).inlineState.value.title]
|
|
198
198
|
]),
|
|
199
199
|
s(m, {
|
|
200
200
|
variant: "primary",
|
|
@@ -217,7 +217,7 @@ const J = { class: "flex items-center gap-px overflow-hidden flex-1" }, W = ["on
|
|
|
217
217
|
[G, l(t)?.expandedIds.value.has(e.id)]
|
|
218
218
|
]) : c("", !0)
|
|
219
219
|
], 8, ["data-id"]));
|
|
220
|
-
return $.memo =
|
|
220
|
+
return $.memo = T, $;
|
|
221
221
|
}, n, 9), 128))
|
|
222
222
|
]),
|
|
223
223
|
_: 1
|