react-asc 25.0.6 → 25.0.7

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.
@@ -1,11 +1,11 @@
1
1
  import React, { Component } from 'react';
2
- import type { IControls, IFormValues } from './form.interfaces';
2
+ import type { IControls } from './form.interfaces';
3
3
  import type { FormControl } from './form.models';
4
4
  export interface IFormProps {
5
5
  controls: IControls;
6
6
  validateOnBlur?: boolean;
7
- onSubmit?: (values: IFormValues) => void;
8
- onChange?: (values: IFormValues) => void;
7
+ onSubmit?: (values: unknown) => void;
8
+ onChange?: (values: unknown) => void;
9
9
  submitOnEnter?: boolean;
10
10
  }
11
11
  export interface IFormState {
@@ -2,9 +2,6 @@ import type { FormControl } from './form.models';
2
2
  export interface IControls {
3
3
  [key: string]: FormControl;
4
4
  }
5
- export interface IFormValues {
6
- [key: string]: unknown;
7
- }
8
5
  export interface IFormTextAreaOptions {
9
6
  rows: number;
10
7
  resize: boolean;
@@ -1,6 +1,6 @@
1
1
  import type { ReactElement } from 'react';
2
2
  import { SIZE } from '../component.enums';
3
- import type { IControls, IFormValues } from '../Form';
3
+ import type { IControls } from '../Form';
4
4
  import { MODALTYPE } from './modal.enum';
5
5
  import type { IModalButton } from './modal.interfaces';
6
6
  interface IModalProps {
@@ -8,8 +8,8 @@ interface IModalProps {
8
8
  description?: string | ReactElement;
9
9
  formControls?: IControls;
10
10
  modalType?: MODALTYPE;
11
- onOk: (values?: IFormValues) => void;
12
- onChange?: (values?: IFormValues) => void;
11
+ onOk: <T>(values?: T) => void;
12
+ onChange?: <T>(values?: T) => void;
13
13
  onCancel?: () => void;
14
14
  onBackdropClick?: () => void;
15
15
  isDismissable?: boolean;
package/index.es.js CHANGED
@@ -1992,10 +1992,6 @@ class ModalService {
1992
1992
  resolve(values);
1993
1993
  this.hide();
1994
1994
  };
1995
- // TODO - for AutoComplete
1996
- // const handleOnChange = (values?: IFormValues) => {
1997
- // console.info(values);
1998
- // }
1999
1995
  const handleCancel = () => {
2000
1996
  reject();
2001
1997
  this.hide();
package/index.js CHANGED
@@ -2001,10 +2001,6 @@ class ModalService {
2001
2001
  resolve(values);
2002
2002
  this.hide();
2003
2003
  };
2004
- // TODO - for AutoComplete
2005
- // const handleOnChange = (values?: IFormValues) => {
2006
- // console.info(values);
2007
- // }
2008
2004
  const handleCancel = () => {
2009
2005
  reject();
2010
2006
  this.hide();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-asc",
3
- "version": "25.0.6",
3
+ "version": "25.0.7",
4
4
  "description": "handcrafted react components",
5
5
  "main": "index.js",
6
6
  "module": "index.es.js",