@visiion/forms-library 1.4.1 → 1.4.3

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.
@@ -2,9 +2,9 @@ import React from "react";
2
2
  export interface IFormField {
3
3
  id: string;
4
4
  name: string;
5
- type: "radio" | "text" | "select" | "textarea" | "checkbox" | "rut" | "address" | "subtitle" | "alert" | "date" | "declaration" | "typography" | "status";
5
+ type: "radio" | "text" | "select" | "textarea" | "checkbox" | "checklist" | "upload" | "rut" | "address" | "subtitle" | "alert" | "date" | "declaration" | "typography" | "status";
6
6
  label: string;
7
- value?: string | number | null;
7
+ value?: string | number | any;
8
8
  options?: Array<{
9
9
  value: string;
10
10
  label: string;
@@ -17,7 +17,11 @@ export interface IFormField {
17
17
  maxLength?: number;
18
18
  className?: string;
19
19
  validate?: boolean;
20
- onSearch?: (value: string | any) => void;
20
+ onSearch?: ({ field, value, formData, }: {
21
+ field?: IFormField;
22
+ value?: string | any;
23
+ formData?: any;
24
+ }) => void;
21
25
  onAddressChange?: (address: any) => void;
22
26
  showMap?: boolean;
23
27
  mapHeight?: string;
@@ -35,6 +39,7 @@ export interface IFormField {
35
39
  export interface IFormConfig {
36
40
  id: string;
37
41
  title: string;
42
+ titleClassName?: string | null;
38
43
  subtitle?: string;
39
44
  description?: string;
40
45
  backStep?: string | null;
@@ -1,15 +1,16 @@
1
1
  export interface Region {
2
2
  id: number;
3
- nombre: string;
4
- codigo?: string;
3
+ Nombre: string;
4
+ Codigo?: number | null;
5
5
  }
6
6
  export interface Comuna {
7
7
  id: number;
8
- nombre: string;
9
- codigo?: string;
8
+ Nombre: string;
9
+ Codigo?: number | null;
10
10
  region_id?: number;
11
11
  }
12
12
  declare class Common {
13
+ static removeAccents(text: string): string;
13
14
  static getRegionByName(regionName: string, regiones: Region[]): number | null;
14
15
  static getComunaByName(comunaName: string, comunas: Comuna[]): number | null;
15
16
  static getRegionIdByComunaId(comunaId: number, comunas: Comuna[]): number | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visiion/forms-library",
3
- "version": "1.4.1",
3
+ "version": "1.4.3",
4
4
  "description": "Librería de componentes de formularios reutilizables",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -37,9 +37,11 @@
37
37
  "dependencies": {
38
38
  "@googlemaps/js-api-loader": "^1.16.6",
39
39
  "@react-google-maps/api": "^2.19.3",
40
+ "@react-pdf/renderer": "^4.3.0",
40
41
  "flowbite-react": "0.10.1",
41
42
  "framer-motion": "^11.3.8",
42
43
  "react-icons": "^5.5.0",
44
+ "react-pdf": "^10.0.1",
43
45
  "yup": "^1.6.1",
44
46
  "zustand": "^5.0.6"
45
47
  },