erp-blocks 1.1.0 → 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
CHANGED
|
@@ -34,12 +34,12 @@ const page = defineModel("page", { type: Number });
|
|
|
34
34
|
<span
|
|
35
35
|
class="text-base text-dimmed"
|
|
36
36
|
>
|
|
37
|
-
{{ data?.length }} of {{ totalRows }} rows
|
|
37
|
+
{{ data?.length || itemsPerPage }} of {{ totalRows || itemsPerPage }} rows
|
|
38
38
|
</span>
|
|
39
39
|
<UPagination
|
|
40
40
|
v-model:page="page"
|
|
41
41
|
active-color="neutral"
|
|
42
|
-
:total="totalRows"
|
|
42
|
+
:total="totalRows || itemsPerPage"
|
|
43
43
|
:items-per-page="itemsPerPage"
|
|
44
44
|
/>
|
|
45
45
|
</div>
|
|
@@ -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;
|