una-nuxt-module 2.1.33 → 2.1.35

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,6 +1,6 @@
1
1
  {
2
2
  "name": "una-nuxt-module",
3
- "version": "2.1.33",
3
+ "version": "2.1.35",
4
4
  "configKey": "unaxt",
5
5
  "compatibility": {
6
6
  "nuxt": ">=4.0.0"
package/dist/module.mjs CHANGED
@@ -173,7 +173,7 @@ function addTemplates() {
173
173
  }
174
174
 
175
175
  const name = "una-nuxt-module";
176
- const version = "2.1.33";
176
+ const version = "2.1.35";
177
177
 
178
178
  const module = defineNuxtModule({
179
179
  meta: {
@@ -314,7 +314,7 @@ const module = defineNuxtModule({
314
314
  }
315
315
  try {
316
316
  logger.box(bold(`${name} - ${version}`));
317
- logger.start(bold("Inicio del registro del m\xF3dulo"));
317
+ logger.start(bold("Registro del m\xF3dulo iniciado..."));
318
318
  setupAutoImports();
319
319
  await setupTailwindPlugin();
320
320
  setupI18n();
@@ -4,7 +4,7 @@ type __VLS_Props = StepperItemProps & {
4
4
  class?: HTMLAttributes["class"];
5
5
  };
6
6
  declare var __VLS_7: {
7
- state: "active" | "inactive" | "completed";
7
+ state: "inactive" | "active" | "completed";
8
8
  };
9
9
  type __VLS_Slots = {} & {
10
10
  default?: (props: typeof __VLS_7) => any;
@@ -4,7 +4,7 @@ type __VLS_Props = StepperItemProps & {
4
4
  class?: HTMLAttributes["class"];
5
5
  };
6
6
  declare var __VLS_7: {
7
- state: "active" | "inactive" | "completed";
7
+ state: "inactive" | "active" | "completed";
8
8
  };
9
9
  type __VLS_Slots = {} & {
10
10
  default?: (props: typeof __VLS_7) => any;
@@ -1,15 +1,15 @@
1
1
  import { type Ref } from "vue";
2
- import { type IItemsPerPage } from "../types/index.js";
2
+ import { type TItemsPerPage } from "../types/index.js";
3
3
  interface IUsePaginationParams {
4
4
  page: Ref<number>;
5
- itemsPerPage: Ref<IItemsPerPage>;
5
+ itemsPerPage: Ref<TItemsPerPage>;
6
6
  totalPages: Ref<number>;
7
7
  totalElements: Ref<number>;
8
8
  }
9
9
  export declare const usePagination: (params: IUsePaginationParams) => {
10
10
  pagination: import("vue").ComputedRef<{
11
11
  page: number;
12
- size: number;
12
+ size: TItemsPerPage;
13
13
  }>;
14
14
  resetPagination: () => void;
15
15
  updatePagination: (params: {
@@ -5,7 +5,7 @@ export const usePagination = (params) => {
5
5
  const pagination = computed(() => {
6
6
  return {
7
7
  page: page.value - 1,
8
- size: itemsPerPage.value.value
8
+ size: itemsPerPage.value
9
9
  };
10
10
  });
11
11
  function resetPagination() {
@@ -1,4 +1,4 @@
1
- import type { IItemsPerPage } from "../types/index.js";
1
+ import type { TItemsPerPage } from "../types/index.js";
2
2
  /**
3
3
  * Número de la primer página en la paginación.
4
4
  */
@@ -6,8 +6,8 @@ export declare const PAGINATION_FIRST_PAGE = 1;
6
6
  /**
7
7
  * Paginación por defecto.
8
8
  */
9
- export declare const DEFAULT_ITEMS_PER_PAGE: IItemsPerPage;
9
+ export declare const DEFAULT_ITEMS_PER_PAGE: TItemsPerPage;
10
10
  /**
11
11
  * Opciones de paginación.
12
12
  */
13
- export declare const PAGINATION_OPTIONS: IItemsPerPage[];
13
+ export declare const PAGINATION_OPTIONS: TItemsPerPage[];
@@ -1,8 +1,3 @@
1
1
  export const PAGINATION_FIRST_PAGE = 1;
2
- export const DEFAULT_ITEMS_PER_PAGE = { title: "10", value: 10 };
3
- export const PAGINATION_OPTIONS = [
4
- { title: "10", value: 10 },
5
- { title: "20", value: 20 },
6
- { title: "50", value: 50 },
7
- { title: "Todos", value: 0 }
8
- ];
2
+ export const DEFAULT_ITEMS_PER_PAGE = 10;
3
+ export const PAGINATION_OPTIONS = [10, 20, 50];
@@ -225,7 +225,7 @@ export interface ITableState {
225
225
  /** Página actual de la tabla */
226
226
  page: number;
227
227
  /** Elementos por página */
228
- itemsPerPage: IItemsPerPage;
228
+ itemsPerPage: TItemsPerPage;
229
229
  /** Total de páginas */
230
230
  totalPages: number;
231
231
  /** Total de elementos */
@@ -325,26 +325,11 @@ export interface IHasAuthorizationInResourceParams {
325
325
  authorization: TAuthorization;
326
326
  }
327
327
  /**
328
- * Interfaz para las opciones del componente ComboBox.
328
+ * Tipo para las opciones de paginación.
329
329
  *
330
- * @interface IComboBoxOption
331
- *
332
- * @property {number} - *value* - Valor o ID
333
- * @property {string} - *title* - Título o texto a mostrar
330
+ * @type TItemsPerPage
334
331
  */
335
- export interface IComboBoxOption {
336
- /** Valor o ID */
337
- value: number;
338
- /** Título o texto a mostrar */
339
- title: string;
340
- }
341
- /**
342
- * Interfaz para las opciones de paginación.
343
- *
344
- * @interface IItemsPerPage
345
- */
346
- export interface IItemsPerPage extends IComboBoxOption {
347
- }
332
+ export type TItemsPerPage = 10 | 20 | 50;
348
333
  /**
349
334
  * Interfaz para las opciones del menú de navegación.
350
335
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "una-nuxt-module",
3
- "version": "2.1.33",
3
+ "version": "2.1.35",
4
4
  "description": "Módulo Nuxt para desarrollo CGI",
5
5
  "repository": {
6
6
  "type": "git",
@@ -52,6 +52,7 @@
52
52
  "release:minor": "npm run test && npm run prepack && changelogen --release --minor && npm publish && git push --follow-tags",
53
53
  "release:patch": "npm run test && npm run prepack && changelogen --release --patch && npm publish && git push --follow-tags",
54
54
  "lint": "eslint .",
55
+ "lint:fix": "eslint . --fix",
55
56
  "test": "vitest run",
56
57
  "test:watch": "vitest watch",
57
58
  "test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"