dynamic-modal 1.0.0 → 1.0.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.
@@ -0,0 +1 @@
1
+
@@ -1,3 +1,4 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
1
2
  import { IModalConfigLoader } from '../src/interfaces/modal'
2
3
  import { IOption } from '../src/interfaces/option'
3
4
 
@@ -6,7 +7,7 @@ type IncomingProps = {
6
7
 
7
8
  //Define function to receive selected element and formData (if you need to use) make read or select operations and build
8
9
  //next select array of elements
9
- optionReadAction : (typeId: string, formData: never) => Promise<Array<IOption>>
10
+ optionReadAction : (typeId: string, formData: any) => Promise<Array<IOption>>
10
11
  }
11
12
 
12
13
  type ResultProps = Omit<IncomingProps,'optionReadAction'|'typeList'> & Record<'typeId'|'optionId', string>
@@ -0,0 +1 @@
1
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dynamic-modal",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "The dynamic-modal is a solution of creation differents modals into project using a json configuration file",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,3 +1,4 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
1
2
  import { CSSProperties } from 'react'
2
3
  import { IMakeSelect } from './make-select'
3
4
  import { IMakeInput } from './make-field'
@@ -18,7 +19,7 @@ export type IFormField = IMakeSelect | IMakeInput | IMakeTextarea | IMakeToggle
18
19
  export type IModalRenderCondition = Record<string, Array<string | number>>
19
20
 
20
21
  export type IModalLiveDataCondition = {
21
- action: (data: string, ...args: never[]) => Promise<Array<IOption>>;
22
+ action: (data: string, ...args: any[]) => Promise<Array<IOption>>;
22
23
  condition: string
23
24
  }
24
25
 
@@ -27,7 +28,7 @@ export interface IModalConfigProps {
27
28
  title: string
28
29
  action: {
29
30
  name: string
30
- action?: (data: never) => void
31
+ action?: (data: any) => void
31
32
  hide?: boolean
32
33
  }
33
34
  cancel?: {
@@ -41,7 +42,7 @@ export interface IModalConfigProps {
41
42
  minHeightBody?: string | number
42
43
  }
43
44
 
44
- export type IModalConfigLoader<T = never, D = never> = (props: T, action: (modalResult: D) => void) => IModalConfigProps
45
+ export type IModalConfigLoader<T = any, D = any> = (props: T, action: (modalResult: D) => void) => IModalConfigProps
45
46
 
46
47
  export interface IModal {
47
48
  open: boolean;