erp-blocks 1.0.10 → 1.1.1
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/module.json +1 -1
- package/dist/runtime/components/CollapsibleSidebar.vue +2 -4
- package/dist/runtime/components/DataTable.d.vue.ts +4 -1
- package/dist/runtime/components/DataTable.vue +17 -5
- package/dist/runtime/components/DataTable.vue.d.ts +4 -1
- package/dist/runtime/components/FiltersModal.d.vue.ts +13 -6
- package/dist/runtime/components/FiltersModal.vue +29 -23
- package/dist/runtime/components/FiltersModal.vue.d.ts +13 -6
- package/dist/runtime/components/SidebarTrigger.vue +2 -4
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -20,11 +20,9 @@
|
|
|
20
20
|
</template>
|
|
21
21
|
|
|
22
22
|
<script setup>
|
|
23
|
-
import {
|
|
23
|
+
import { useState } from "#app";
|
|
24
24
|
import MainMenu from "./MainMenu.vue";
|
|
25
|
-
const sidebarOpen =
|
|
26
|
-
default: () => true
|
|
27
|
-
});
|
|
25
|
+
const sidebarOpen = useState("sidebarOpen", () => true);
|
|
28
26
|
function closeSidebar() {
|
|
29
27
|
sidebarOpen.value = false;
|
|
30
28
|
}
|
|
@@ -13,7 +13,10 @@ declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_se
|
|
|
13
13
|
}> & import("vue").PublicProps;
|
|
14
14
|
expose: (exposed: {}) => void;
|
|
15
15
|
attrs: any;
|
|
16
|
-
slots: {
|
|
16
|
+
slots: {
|
|
17
|
+
[x: string]: ((props: any) => any) | undefined;
|
|
18
|
+
[x: number]: ((props: any) => any) | undefined;
|
|
19
|
+
};
|
|
17
20
|
emit: (evt: "update:page", value: number | undefined) => void;
|
|
18
21
|
}>) => import("vue").VNode & {
|
|
19
22
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
@@ -16,18 +16,30 @@ const page = defineModel("page", { type: Number });
|
|
|
16
16
|
:data="data"
|
|
17
17
|
:columns="columns"
|
|
18
18
|
class="flex-1 border border-default rounded-lg grow"
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
>
|
|
20
|
+
<template
|
|
21
|
+
v-for="(_, name) in $slots"
|
|
22
|
+
#[name]="slotProps"
|
|
23
|
+
>
|
|
24
|
+
<slot
|
|
25
|
+
:name="name"
|
|
26
|
+
v-bind="slotProps"
|
|
27
|
+
/>
|
|
28
|
+
</template>
|
|
29
|
+
</UTable>
|
|
30
|
+
<div
|
|
31
|
+
v-if="data && totalRows"
|
|
32
|
+
class="flex items-center justify-between"
|
|
33
|
+
>
|
|
21
34
|
<span
|
|
22
|
-
v-if="data && totalRows"
|
|
23
35
|
class="text-base text-dimmed"
|
|
24
36
|
>
|
|
25
|
-
{{ data
|
|
37
|
+
{{ data?.length || itemsPerPage }} of {{ totalRows || itemsPerPage }} rows
|
|
26
38
|
</span>
|
|
27
39
|
<UPagination
|
|
28
40
|
v-model:page="page"
|
|
29
41
|
active-color="neutral"
|
|
30
|
-
:total="totalRows"
|
|
42
|
+
:total="totalRows || itemsPerPage"
|
|
31
43
|
:items-per-page="itemsPerPage"
|
|
32
44
|
/>
|
|
33
45
|
</div>
|
|
@@ -13,7 +13,10 @@ declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_se
|
|
|
13
13
|
}> & import("vue").PublicProps;
|
|
14
14
|
expose: (exposed: {}) => void;
|
|
15
15
|
attrs: any;
|
|
16
|
-
slots: {
|
|
16
|
+
slots: {
|
|
17
|
+
[x: string]: ((props: any) => any) | undefined;
|
|
18
|
+
[x: number]: ((props: any) => any) | undefined;
|
|
19
|
+
};
|
|
17
20
|
emit: (evt: "update:page", value: number | undefined) => void;
|
|
18
21
|
}>) => import("vue").VNode & {
|
|
19
22
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import type { ModalProps } from '@nuxt/ui';
|
|
1
|
+
import type { FormProps, FormSchema, ModalProps } from '@nuxt/ui';
|
|
2
2
|
type __VLS_Props = {
|
|
3
|
+
formProps?: FormProps<FormSchema>;
|
|
3
4
|
modalProps?: ModalProps;
|
|
5
|
+
buttonLabel?: string;
|
|
6
|
+
resetLabel?: string;
|
|
7
|
+
applyButton?: boolean;
|
|
8
|
+
applyLabel?: string;
|
|
4
9
|
};
|
|
5
|
-
declare var
|
|
10
|
+
declare var __VLS_12: {}, __VLS_20: {};
|
|
6
11
|
type __VLS_Slots = {} & {
|
|
7
|
-
trigger?: (props: typeof
|
|
12
|
+
trigger?: (props: typeof __VLS_12) => any;
|
|
8
13
|
} & {
|
|
9
|
-
|
|
10
|
-
} & {
|
|
11
|
-
footer?: (props: typeof __VLS_18) => any;
|
|
14
|
+
fields?: (props: typeof __VLS_20) => any;
|
|
12
15
|
};
|
|
13
16
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
17
|
reset: (...args: any[]) => void;
|
|
@@ -16,6 +19,10 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
16
19
|
onReset?: ((...args: any[]) => any) | undefined;
|
|
17
20
|
}>, {
|
|
18
21
|
modalProps: ModalProps;
|
|
22
|
+
buttonLabel: string;
|
|
23
|
+
resetLabel: string;
|
|
24
|
+
applyButton: boolean;
|
|
25
|
+
applyLabel: string;
|
|
19
26
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
27
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
21
28
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,48 +1,54 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
<UForm v-bind="formProps">
|
|
3
|
+
<UModal v-bind="modalProps">
|
|
4
|
+
<slot name="trigger">
|
|
5
|
+
<UButton
|
|
6
|
+
icon="i-lucide:filter"
|
|
7
|
+
:label="buttonLabel"
|
|
8
|
+
color="neutral"
|
|
9
|
+
variant="solid"
|
|
10
|
+
class="cursor-pointer"
|
|
11
|
+
/>
|
|
12
|
+
</slot>
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
<template #body>
|
|
15
|
+
<div class="space-y-4">
|
|
16
|
+
<slot name="fields" />
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
16
19
|
|
|
17
|
-
|
|
18
|
-
<slot
|
|
19
|
-
name="footer"
|
|
20
|
-
>
|
|
20
|
+
<template #footer>
|
|
21
21
|
<UButton
|
|
22
|
-
label="
|
|
22
|
+
:label="resetLabel"
|
|
23
23
|
color="neutral"
|
|
24
24
|
variant="outline"
|
|
25
25
|
@click="emit('reset')"
|
|
26
26
|
/>
|
|
27
27
|
<UButton
|
|
28
|
+
v-if="applyButton"
|
|
28
29
|
type="submit"
|
|
29
|
-
label="
|
|
30
|
+
:label="applyLabel"
|
|
30
31
|
color="neutral"
|
|
31
32
|
/>
|
|
32
|
-
</
|
|
33
|
-
</
|
|
34
|
-
</
|
|
33
|
+
</template>
|
|
34
|
+
</UModal>
|
|
35
|
+
</UForm>
|
|
35
36
|
</template>
|
|
36
37
|
|
|
37
38
|
<script setup>
|
|
38
39
|
defineProps({
|
|
40
|
+
formProps: { type: Object, required: false },
|
|
39
41
|
modalProps: { type: Object, required: false, default: () => ({
|
|
40
42
|
title: "Filters",
|
|
41
43
|
scrollable: true,
|
|
42
44
|
ui: {
|
|
43
45
|
footer: "justify-end"
|
|
44
46
|
}
|
|
45
|
-
}) }
|
|
47
|
+
}) },
|
|
48
|
+
buttonLabel: { type: String, required: false, default: "Filters" },
|
|
49
|
+
resetLabel: { type: String, required: false, default: "Reset" },
|
|
50
|
+
applyButton: { type: Boolean, required: false, default: true },
|
|
51
|
+
applyLabel: { type: String, required: false, default: "Apply" }
|
|
46
52
|
});
|
|
47
53
|
const emit = defineEmits(["reset"]);
|
|
48
54
|
</script>
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import type { ModalProps } from '@nuxt/ui';
|
|
1
|
+
import type { FormProps, FormSchema, ModalProps } from '@nuxt/ui';
|
|
2
2
|
type __VLS_Props = {
|
|
3
|
+
formProps?: FormProps<FormSchema>;
|
|
3
4
|
modalProps?: ModalProps;
|
|
5
|
+
buttonLabel?: string;
|
|
6
|
+
resetLabel?: string;
|
|
7
|
+
applyButton?: boolean;
|
|
8
|
+
applyLabel?: string;
|
|
4
9
|
};
|
|
5
|
-
declare var
|
|
10
|
+
declare var __VLS_12: {}, __VLS_20: {};
|
|
6
11
|
type __VLS_Slots = {} & {
|
|
7
|
-
trigger?: (props: typeof
|
|
12
|
+
trigger?: (props: typeof __VLS_12) => any;
|
|
8
13
|
} & {
|
|
9
|
-
|
|
10
|
-
} & {
|
|
11
|
-
footer?: (props: typeof __VLS_18) => any;
|
|
14
|
+
fields?: (props: typeof __VLS_20) => any;
|
|
12
15
|
};
|
|
13
16
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
17
|
reset: (...args: any[]) => void;
|
|
@@ -16,6 +19,10 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
16
19
|
onReset?: ((...args: any[]) => any) | undefined;
|
|
17
20
|
}>, {
|
|
18
21
|
modalProps: ModalProps;
|
|
22
|
+
buttonLabel: string;
|
|
23
|
+
resetLabel: string;
|
|
24
|
+
applyButton: boolean;
|
|
25
|
+
applyLabel: string;
|
|
19
26
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
27
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
21
28
|
declare const _default: typeof __VLS_export;
|
|
@@ -13,8 +13,6 @@
|
|
|
13
13
|
</template>
|
|
14
14
|
|
|
15
15
|
<script setup>
|
|
16
|
-
import {
|
|
17
|
-
const sidebarOpen =
|
|
18
|
-
default: () => true
|
|
19
|
-
});
|
|
16
|
+
import { useState } from "#app";
|
|
17
|
+
const sidebarOpen = useState("sidebarOpen", () => true);
|
|
20
18
|
</script>
|