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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "erp-blocks",
3
3
  "configKey": "erp",
4
- "version": "1.1.0",
4
+ "version": "1.1.1",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -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 __VLS_7: {}, __VLS_15: {}, __VLS_18: {};
10
+ declare var __VLS_12: {}, __VLS_20: {};
6
11
  type __VLS_Slots = {} & {
7
- trigger?: (props: typeof __VLS_7) => any;
12
+ trigger?: (props: typeof __VLS_12) => any;
8
13
  } & {
9
- body?: (props: typeof __VLS_15) => any;
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
- <UModal v-bind="modalProps">
3
- <slot name="trigger">
4
- <UButton
5
- icon="i-lucide:filter"
6
- label="Filters"
7
- color="neutral"
8
- variant="solid"
9
- class="cursor-pointer"
10
- />
11
- </slot>
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
- <template #body>
14
- <slot name="body" />
15
- </template>
14
+ <template #body>
15
+ <div class="space-y-4">
16
+ <slot name="fields" />
17
+ </div>
18
+ </template>
16
19
 
17
- <template #footer>
18
- <slot
19
- name="footer"
20
- >
20
+ <template #footer>
21
21
  <UButton
22
- label="Reset"
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="Apply"
30
+ :label="applyLabel"
30
31
  color="neutral"
31
32
  />
32
- </slot>
33
- </template>
34
- </UModal>
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 __VLS_7: {}, __VLS_15: {}, __VLS_18: {};
10
+ declare var __VLS_12: {}, __VLS_20: {};
6
11
  type __VLS_Slots = {} & {
7
- trigger?: (props: typeof __VLS_7) => any;
12
+ trigger?: (props: typeof __VLS_12) => any;
8
13
  } & {
9
- body?: (props: typeof __VLS_15) => any;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "erp-blocks",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Ready-to-use UI layouts and components designed as ERP system elements ",
5
5
  "repository": {
6
6
  "type": "git",