vlite3 0.3.2 → 0.3.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/components/AvatarUploader/AvatarUploader.vue.d.ts +2 -2
- package/components/AvatarUploader/AvatarUploader.vue.js +53 -36
- package/components/DataList/DataList.vue.d.ts +49 -0
- package/components/DataList/DataList.vue.js +120 -0
- package/components/DataList/DataList.vue2.js +4 -0
- package/components/DataList/index.d.ts +2 -0
- package/components/DataList/types.d.ts +17 -0
- package/components/DataTable/DataTable.vue.d.ts +1 -3
- package/components/DataTable/DataTable.vue.js +142 -133
- package/components/DataTable/types.d.ts +3 -10
- package/components/FilePicker/FilePicker.vue.d.ts +1 -0
- package/components/FilePicker/FilePicker.vue.js +159 -139
- package/components/Form/FormField.vue.js +53 -50
- package/components/Form/composables/useForm.js +80 -63
- package/components/Form/types.d.ts +4 -3
- package/components/Pagination/Pagination.vue.d.ts +4 -16
- package/components/Pagination/Pagination.vue.js +36 -36
- package/components/Pagination/index.d.ts +19 -0
- package/components/Screen/Screen.vue.d.ts +68 -0
- package/components/Screen/Screen.vue.js +370 -0
- package/components/Screen/Screen.vue2.js +4 -0
- package/components/Screen/ScreenFilter.vue.d.ts +15 -0
- package/components/Screen/ScreenFilter.vue.js +147 -0
- package/components/Screen/ScreenFilter.vue2.js +4 -0
- package/components/Screen/index.d.ts +3 -0
- package/components/Screen/types.d.ts +52 -0
- package/index.d.ts +2 -0
- package/index.js +36 -30
- package/package.json +1 -1
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { defineComponent as x, ref as V, computed as F, openBlock as i, createBlock as s, withCtx as r, createElementVNode as a, createVNode as n, unref as v, toDisplayString as w, withModifiers as k } from "vue";
|
|
2
|
+
import p from "../Button.vue.js";
|
|
3
|
+
import C from "../Modal.vue.js";
|
|
4
|
+
import O from "../Dropdown/Dropdown.vue.js";
|
|
5
|
+
import f from "../Icon.vue.js";
|
|
6
|
+
import b from "../Form/Form.vue.js";
|
|
7
|
+
/* empty css */
|
|
8
|
+
import "v-datepicker-lite";
|
|
9
|
+
import "v-datepicker-lite/style.css";
|
|
10
|
+
import "@jaames/iro";
|
|
11
|
+
import "@vueuse/core";
|
|
12
|
+
/* empty css */
|
|
13
|
+
import "iconify-icon-picker";
|
|
14
|
+
import "iconify-icon-picker/style.css";
|
|
15
|
+
/* empty css */
|
|
16
|
+
/* empty css */
|
|
17
|
+
import "../../core/config.js";
|
|
18
|
+
const $ = { class: "p-4" }, S = { class: "p-4 w-[300px] sm:w-[320px] max-h-[85vh] overflow-y-auto bg-card rounded-md border border-border shadow-lg text-left" }, P = /* @__PURE__ */ x({
|
|
19
|
+
__name: "ScreenFilter",
|
|
20
|
+
props: {
|
|
21
|
+
schema: {},
|
|
22
|
+
modelValue: {},
|
|
23
|
+
type: { default: "modal" }
|
|
24
|
+
},
|
|
25
|
+
emits: ["update:modelValue", "change"],
|
|
26
|
+
setup(o, { emit: y }) {
|
|
27
|
+
const m = o, c = y, t = V(!1), d = F(() => m.modelValue ? Object.keys(m.modelValue).filter(
|
|
28
|
+
(l) => m.modelValue[l] !== "" && m.modelValue[l] !== null && m.modelValue[l] !== void 0
|
|
29
|
+
).length : 0), h = (l) => {
|
|
30
|
+
c("update:modelValue", l.values), c("change", l.values), t.value = !1;
|
|
31
|
+
}, g = () => {
|
|
32
|
+
c("update:modelValue", {}), c("change", {});
|
|
33
|
+
};
|
|
34
|
+
return (l, e) => o.type === "modal" ? (i(), s(C, {
|
|
35
|
+
key: 0,
|
|
36
|
+
title: "Filters",
|
|
37
|
+
show: t.value,
|
|
38
|
+
"onUpdate:show": e[2] || (e[2] = (u) => t.value = u),
|
|
39
|
+
"max-width": "sm:max-w-md"
|
|
40
|
+
}, {
|
|
41
|
+
trigger: r(() => [
|
|
42
|
+
d.value > 0 ? (i(), s(p, {
|
|
43
|
+
key: 0,
|
|
44
|
+
variant: "secondary",
|
|
45
|
+
class: "flex items-center gap-1.5 pl-3 pr-1.5 shrink-0",
|
|
46
|
+
onClick: e[0] || (e[0] = (u) => t.value = !0)
|
|
47
|
+
}, {
|
|
48
|
+
default: r(() => [
|
|
49
|
+
n(f, {
|
|
50
|
+
icon: "ci:filter",
|
|
51
|
+
class: "w-4 h-4"
|
|
52
|
+
}),
|
|
53
|
+
a("span", null, "Filters (" + w(d.value) + ")", 1),
|
|
54
|
+
a("div", {
|
|
55
|
+
onClick: k(g, ["stop"]),
|
|
56
|
+
class: "ml-1 p-1 hover:bg-black/10 dark:hover:bg-white/10 rounded-full transition-colors cursor-pointer"
|
|
57
|
+
}, [
|
|
58
|
+
n(f, {
|
|
59
|
+
icon: "lucide:x",
|
|
60
|
+
class: "w-4 h-4"
|
|
61
|
+
})
|
|
62
|
+
])
|
|
63
|
+
]),
|
|
64
|
+
_: 1
|
|
65
|
+
})) : (i(), s(p, {
|
|
66
|
+
key: 1,
|
|
67
|
+
variant: "outline",
|
|
68
|
+
icon: "hugeicons:filter-add",
|
|
69
|
+
onClick: e[1] || (e[1] = (u) => t.value = !0),
|
|
70
|
+
title: "Filter",
|
|
71
|
+
size: "lg",
|
|
72
|
+
class: "shrink-0 h-9! w-9!"
|
|
73
|
+
}))
|
|
74
|
+
]),
|
|
75
|
+
default: r(() => [
|
|
76
|
+
a("div", $, [
|
|
77
|
+
n(v(b), {
|
|
78
|
+
schema: o.schema,
|
|
79
|
+
values: o.modelValue,
|
|
80
|
+
"submit-text": "Apply Filters",
|
|
81
|
+
onOnSubmit: h
|
|
82
|
+
}, null, 8, ["schema", "values"])
|
|
83
|
+
])
|
|
84
|
+
]),
|
|
85
|
+
_: 1
|
|
86
|
+
}, 8, ["show"])) : (i(), s(v(O), {
|
|
87
|
+
key: 1,
|
|
88
|
+
isOpen: t.value,
|
|
89
|
+
"onUpdate:isOpen": e[3] || (e[3] = (u) => t.value = u),
|
|
90
|
+
"close-on-select": !1,
|
|
91
|
+
position: "bottom-end",
|
|
92
|
+
class: "w-auto"
|
|
93
|
+
}, {
|
|
94
|
+
trigger: r(() => [
|
|
95
|
+
d.value > 0 ? (i(), s(p, {
|
|
96
|
+
key: 0,
|
|
97
|
+
variant: "secondary",
|
|
98
|
+
class: "flex items-center gap-1.5 pl-3 pr-1.5 shrink-0",
|
|
99
|
+
style: { "pointer-events": "auto" }
|
|
100
|
+
}, {
|
|
101
|
+
default: r(() => [
|
|
102
|
+
n(f, {
|
|
103
|
+
icon: "ci:filter",
|
|
104
|
+
class: "w-4 h-4"
|
|
105
|
+
}),
|
|
106
|
+
a("span", null, "Filters (" + w(d.value) + ")", 1),
|
|
107
|
+
a("div", {
|
|
108
|
+
onClick: k(g, ["stop"]),
|
|
109
|
+
class: "ml-1 p-1 hover:bg-black/10 dark:hover:bg-white/10 rounded-full transition-colors cursor-pointer"
|
|
110
|
+
}, [
|
|
111
|
+
n(f, {
|
|
112
|
+
icon: "lucide:x",
|
|
113
|
+
class: "w-4 h-4"
|
|
114
|
+
})
|
|
115
|
+
])
|
|
116
|
+
]),
|
|
117
|
+
_: 1
|
|
118
|
+
})) : (i(), s(p, {
|
|
119
|
+
key: 1,
|
|
120
|
+
variant: "outline",
|
|
121
|
+
icon: "hugeicons:filter-add",
|
|
122
|
+
title: "Filter",
|
|
123
|
+
size: "lg",
|
|
124
|
+
class: "shrink-0 h-9! w-9!"
|
|
125
|
+
}))
|
|
126
|
+
]),
|
|
127
|
+
default: r(() => [
|
|
128
|
+
a("div", S, [
|
|
129
|
+
n(v(b), {
|
|
130
|
+
schema: o.schema,
|
|
131
|
+
values: o.modelValue,
|
|
132
|
+
"submit-text": "Apply Filters",
|
|
133
|
+
"submit-props": {
|
|
134
|
+
size: "sm",
|
|
135
|
+
class: "w-full"
|
|
136
|
+
},
|
|
137
|
+
onOnSubmit: h
|
|
138
|
+
}, null, 8, ["schema", "values"])
|
|
139
|
+
])
|
|
140
|
+
]),
|
|
141
|
+
_: 1
|
|
142
|
+
}, 8, ["isOpen"]));
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
export {
|
|
146
|
+
P as default
|
|
147
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
import { PageInfo, PaginationProps } from '../Pagination';
|
|
3
|
+
import { ButtonVariant } from '../../types';
|
|
4
|
+
import { IForm } from '../Form';
|
|
5
|
+
export interface ScreenPaginationProps extends Omit<PaginationProps, 'currentPage' | 'totalPages'> {
|
|
6
|
+
}
|
|
7
|
+
export interface AddBtnConfig {
|
|
8
|
+
label?: string;
|
|
9
|
+
icon?: string;
|
|
10
|
+
variant?: ButtonVariant;
|
|
11
|
+
to?: string | Record<string, any>;
|
|
12
|
+
href?: string;
|
|
13
|
+
target?: string;
|
|
14
|
+
onClick?: () => void;
|
|
15
|
+
modal?: Component | any;
|
|
16
|
+
modalProps?: Record<string, any>;
|
|
17
|
+
buttonProps?: Record<string, any>;
|
|
18
|
+
}
|
|
19
|
+
export interface ScreenProps {
|
|
20
|
+
title?: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
pageInfo?: PageInfo;
|
|
23
|
+
data?: any[];
|
|
24
|
+
loading?: boolean;
|
|
25
|
+
refetch?: (payload: {
|
|
26
|
+
pageinfo: {
|
|
27
|
+
page: number;
|
|
28
|
+
limit: number;
|
|
29
|
+
};
|
|
30
|
+
pagination: {
|
|
31
|
+
page: number;
|
|
32
|
+
limit: number;
|
|
33
|
+
};
|
|
34
|
+
search: string;
|
|
35
|
+
filter: Record<string, any>;
|
|
36
|
+
}) => void;
|
|
37
|
+
paginationProps?: ScreenPaginationProps;
|
|
38
|
+
emptyTitle?: string;
|
|
39
|
+
emptyDescription?: string;
|
|
40
|
+
emptyIcon?: string;
|
|
41
|
+
addComponent?: Component | any;
|
|
42
|
+
addBtn?: AddBtnConfig;
|
|
43
|
+
list?: Component | any;
|
|
44
|
+
table?: Component | any;
|
|
45
|
+
customHeader?: boolean;
|
|
46
|
+
canSearch?: boolean;
|
|
47
|
+
canAdd?: boolean;
|
|
48
|
+
pagination?: boolean;
|
|
49
|
+
filterSchema?: IForm[];
|
|
50
|
+
filterType?: 'modal' | 'dropdown';
|
|
51
|
+
showRefresh?: boolean;
|
|
52
|
+
}
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -6,10 +6,10 @@ import { default as u } from "./components/Accordion/AccordionContent.vue.js";
|
|
|
6
6
|
import { default as i } from "./components/Alert.vue.js";
|
|
7
7
|
import { default as c } from "./components/Avatar.vue.js";
|
|
8
8
|
import { default as g } from "./components/AvatarUploader/AvatarUploader.vue.js";
|
|
9
|
-
import { default as
|
|
9
|
+
import { default as b } from "./components/Badge.vue.js";
|
|
10
10
|
import { default as P } from "./components/Button.vue.js";
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as
|
|
11
|
+
import { default as h } from "./components/ButtonGroup.vue.js";
|
|
12
|
+
import { default as A } from "./components/Carousel/Carousel.vue.js";
|
|
13
13
|
import { default as D } from "./components/CheckBox.vue.js";
|
|
14
14
|
import { default as y } from "./components/Chip/Chip.vue.js";
|
|
15
15
|
import { default as k } from "./components/ChoiceBox/ChoiceBox.vue.js";
|
|
@@ -33,10 +33,10 @@ import { default as ue } from "./components/Form/Form.vue.js";
|
|
|
33
33
|
import { default as ie } from "./components/Form/FormField.vue.js";
|
|
34
34
|
import { default as ce } from "./components/Form/FormFields.vue.js";
|
|
35
35
|
import { default as ge } from "./components/Form/CustomFields.vue.js";
|
|
36
|
-
import { useForm as
|
|
36
|
+
import { useForm as be } from "./components/Form/composables/useForm.js";
|
|
37
37
|
import { useFileUpload as Pe } from "./components/Form/composables/useFileUpload.js";
|
|
38
|
-
import { default as
|
|
39
|
-
import { default as
|
|
38
|
+
import { default as he } from "./components/Heatmap/Heatmap.vue.js";
|
|
39
|
+
import { default as Ae } from "./components/Icon.vue.js";
|
|
40
40
|
import { default as De } from "./components/IconPicker.vue.js";
|
|
41
41
|
import { default as ye } from "./components/Input.vue.js";
|
|
42
42
|
import { default as ke } from "./components/Kanban/Kanban.vue.js";
|
|
@@ -60,11 +60,11 @@ import { default as xo } from "./components/SidePanel.vue.js";
|
|
|
60
60
|
import { default as no } from "./components/SidebarMenu/SidebarMenu.vue.js";
|
|
61
61
|
import { default as To } from "./components/SidebarMenu/SidebarMenuItem.vue.js";
|
|
62
62
|
/* empty css */
|
|
63
|
-
import { default as
|
|
63
|
+
import { default as So } from "./components/Slider.vue.js";
|
|
64
64
|
import { default as Io } from "./components/Spinner/Spinner.vue.js";
|
|
65
|
-
import { default as
|
|
66
|
-
import { default as
|
|
67
|
-
import { default as
|
|
65
|
+
import { default as Fo } from "./components/Switch.vue.js";
|
|
66
|
+
import { default as vo } from "./components/Tabes/Tabes.vue.js";
|
|
67
|
+
import { default as Co } from "./components/Textarea.vue.js";
|
|
68
68
|
import { default as wo } from "./components/ThemeToggle.vue.js";
|
|
69
69
|
import { default as No } from "./components/Timeline.vue.js";
|
|
70
70
|
import { default as Bo } from "./components/ToastNotification.vue.js";
|
|
@@ -79,10 +79,13 @@ import { useAdvancedKeyStroke as er, useKeyStroke as or } from "./composables/us
|
|
|
79
79
|
import { vScrollReveal as tr } from "./directives/vScrollReveal.js";
|
|
80
80
|
import { createVLite as fr } from "./core/index.js";
|
|
81
81
|
import { deepMerge as mr } from "./utils/object.js";
|
|
82
|
-
import { camelCase as dr, capitalize as sr, copyToClipboard as ur, debounce as xr, delay as ir, downloadFile as nr, flattenArray as cr, formatCurrency as Tr, getUniqueId as gr, isAppleDevice as
|
|
83
|
-
import { lazySearch as
|
|
82
|
+
import { camelCase as dr, capitalize as sr, copyToClipboard as ur, debounce as xr, delay as ir, downloadFile as nr, flattenArray as cr, formatCurrency as Tr, getUniqueId as gr, isAppleDevice as Sr, isEmpty as br, randomNumber as Ir, removeExtraProperties as Pr, slugify as Fr, throttle as hr, truncate as vr } from "./utils/functions.js";
|
|
83
|
+
import { lazySearch as Cr, resetSearchIndex as Dr, search as wr } from "./utils/search.util.js";
|
|
84
84
|
import { env as Nr } from "./utils/env.js";
|
|
85
|
-
import {
|
|
85
|
+
import { default as Br } from "./components/DataList/DataList.vue.js";
|
|
86
|
+
import { default as Kr } from "./components/Screen/Screen.vue.js";
|
|
87
|
+
import { default as Gr } from "./components/Screen/ScreenFilter.vue.js";
|
|
88
|
+
import { useVLiteConfig as Er } from "./core/config.js";
|
|
86
89
|
export {
|
|
87
90
|
f as Accordion,
|
|
88
91
|
u as AccordionContent,
|
|
@@ -91,16 +94,17 @@ export {
|
|
|
91
94
|
i as Alert,
|
|
92
95
|
c as Avatar,
|
|
93
96
|
g as AvatarUploader,
|
|
94
|
-
|
|
97
|
+
b as Badge,
|
|
95
98
|
P as Button,
|
|
96
|
-
|
|
97
|
-
|
|
99
|
+
h as ButtonGroup,
|
|
100
|
+
A as Carousel,
|
|
98
101
|
D as CheckBox,
|
|
99
102
|
y as Chip,
|
|
100
103
|
k as ChoiceBox,
|
|
101
104
|
M as ColorPicker,
|
|
102
105
|
L as ConfirmationModal,
|
|
103
106
|
ge as CustomFields,
|
|
107
|
+
Br as DataList,
|
|
104
108
|
O as DataTable,
|
|
105
109
|
z as DataTableHeader,
|
|
106
110
|
V as DataTableRow,
|
|
@@ -117,8 +121,8 @@ export {
|
|
|
117
121
|
ce as FormFields,
|
|
118
122
|
Uo as GoogleLogin,
|
|
119
123
|
t as GoogleSignInPlugin,
|
|
120
|
-
|
|
121
|
-
|
|
124
|
+
he as Heatmap,
|
|
125
|
+
Ae as Icon,
|
|
122
126
|
De as IconPicker,
|
|
123
127
|
ye as Input,
|
|
124
128
|
ke as Kanban,
|
|
@@ -138,15 +142,17 @@ export {
|
|
|
138
142
|
mo as PricingPlan,
|
|
139
143
|
so as PricingPlanItem,
|
|
140
144
|
Ho as ProgressBar,
|
|
145
|
+
Kr as Screen,
|
|
146
|
+
Gr as ScreenFilter,
|
|
141
147
|
Eo as Sheet,
|
|
142
148
|
xo as SidePanel,
|
|
143
149
|
no as SidebarMenu,
|
|
144
150
|
To as SidebarMenuItem,
|
|
145
|
-
|
|
151
|
+
So as Slider,
|
|
146
152
|
Io as Spinner,
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
153
|
+
Fo as Switch,
|
|
154
|
+
vo as Tabes,
|
|
155
|
+
Co as Textarea,
|
|
150
156
|
wo as ThemeToggle,
|
|
151
157
|
No as Timeline,
|
|
152
158
|
Bo as ToastNotification,
|
|
@@ -165,9 +171,9 @@ export {
|
|
|
165
171
|
cr as flattenArray,
|
|
166
172
|
Tr as formatCurrency,
|
|
167
173
|
gr as getUniqueId,
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
174
|
+
Sr as isAppleDevice,
|
|
175
|
+
br as isEmpty,
|
|
176
|
+
Cr as lazySearch,
|
|
171
177
|
Wo as pauseTimers,
|
|
172
178
|
Ir as randomNumber,
|
|
173
179
|
Pr as removeExtraProperties,
|
|
@@ -176,20 +182,20 @@ export {
|
|
|
176
182
|
_o as resumeTimers,
|
|
177
183
|
wr as search,
|
|
178
184
|
jo as showToast,
|
|
179
|
-
|
|
180
|
-
|
|
185
|
+
Fr as slugify,
|
|
186
|
+
hr as throttle,
|
|
181
187
|
Jo as toast,
|
|
182
|
-
|
|
188
|
+
vr as truncate,
|
|
183
189
|
er as useAdvancedKeyStroke,
|
|
184
190
|
oe as useDropdownIds,
|
|
185
191
|
$ as useDropdownSelection,
|
|
186
192
|
Pe as useFileUpload,
|
|
187
|
-
|
|
193
|
+
be as useForm,
|
|
188
194
|
Le as useKanbanBoard,
|
|
189
195
|
or as useKeyStroke,
|
|
190
196
|
Qo as useNotifications,
|
|
191
197
|
Zo as useTheme,
|
|
192
198
|
de as useTreeSelection,
|
|
193
|
-
|
|
199
|
+
Er as useVLiteConfig,
|
|
194
200
|
tr as vScrollReveal
|
|
195
201
|
};
|