@elcrm/form 0.0.43 → 0.0.44

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,3 +1,9 @@
1
+ import { TInput } from './type';
2
+ type TDate = TInput & {
3
+ max?: Date;
4
+ min?: Date;
5
+ icon?: () => JSX.Element;
6
+ };
1
7
  /**
2
8
  * DateField component
3
9
  *
@@ -8,4 +14,5 @@
8
14
  * @param {string} [className] - css class
9
15
  * @param {string} [placeholder] - placeholder
10
16
  */
11
- export default function ({ title, error, edit, active, className, placeholder, max, min, onValue, icon, name, value, after, }: any): import("react/jsx-runtime").JSX.Element;
17
+ export default function ({ title, error, edit, active, className, placeholder, max, min, onValue, icon, name, value, after, }: TDate): import("react/jsx-runtime").JSX.Element;
18
+ export {};
@@ -1,26 +1,4 @@
1
- interface Input {
2
- value?: string;
3
- onValue?: Function;
4
- onSave?: Function;
5
- name?: string;
6
- placeholder?: string;
7
- title?: string;
8
- label?: string;
9
- error?: string;
10
- hide?: boolean;
11
- edit?: boolean;
12
- active?: Boolean;
13
- after?: any;
14
- before?: any;
15
- show?: Boolean;
16
- view?: string;
17
- id?: string;
18
- className?: string;
19
- isCopy?: boolean;
20
- maxLength?: number;
21
- isReload?: boolean;
22
- spellCheck?: boolean;
23
- }
1
+ import { TInput } from './type';
24
2
  /**
25
3
  * StringField component
26
4
  *
@@ -46,5 +24,4 @@ interface Input {
46
24
  * @param {boolean} [isReload] - Нужно ли обновлять данные при изменении.
47
25
  * @param {boolean} [spellCheck] - Включить проверку орфографии.
48
26
  */
49
- export default function ({ value, onValue, name, placeholder, title, label, show, hide, edit, active, maxLength, onSave, className, spellCheck, isCopy, isReload, }: Input): import("react/jsx-runtime").JSX.Element | "";
50
- export {};
27
+ export default function ({ value, onValue, name, placeholder, title, label, show, hide, edit, active, maxLength, onSave, className, spellCheck, isCopy, isReload, }: TInput): import("react/jsx-runtime").JSX.Element | "";
@@ -0,0 +1,6 @@
1
+ import { TInput } from './type';
2
+ type TNumeric = TInput & {
3
+ max?: number;
4
+ };
5
+ export default function Number({ onValue, onSave, active, max, edit, title, error, show, hide, value, placeholder, className, maxLength, name, after, before, view, }: TNumeric): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,21 @@
1
+ import { TInput } from './type';
2
+ /**
3
+ * PhoneField component
4
+ *
5
+ * @param {string} [value] - значение
6
+ * @param {function} [onValue] - callback на изменение
7
+ * @param {function} [onSave] - callback на save
8
+ * @param {string} [name] - имя
9
+ * @param {string} [placeholder] - placeholder
10
+ * @param {string} [title] - заголовок
11
+ * @param {string} [label] - заголовок (альтернативное title)
12
+ * @param {string} [error] - ошибка
13
+ * @param {boolean} [hide] - скрыть
14
+ * @param {boolean} [edit] - редактировать
15
+ * @param {boolean} [active] - активность
16
+ * @param {string} [after] - контент после
17
+ * @param {boolean} [show] - отображать
18
+ * @param {string} [view] - тип view
19
+ * @param {string} [className] - css class
20
+ */
21
+ export default function ({ value, onValue, onSave, name, placeholder, title, label, error, hide, edit, active, after, show, view, className, }: TInput): import("react/jsx-runtime").JSX.Element;
@@ -1,23 +1,4 @@
1
- type Input = {
2
- value?: string;
3
- onValue?: Function;
4
- onSave?: Function;
5
- name?: string;
6
- placeholder?: string;
7
- title?: string;
8
- label?: string;
9
- error?: string;
10
- hide?: boolean;
11
- edit?: boolean;
12
- active?: Boolean;
13
- after?: any;
14
- show?: Boolean;
15
- view?: string;
16
- id?: string;
17
- className?: string;
18
- isCopy?: boolean;
19
- maxLength?: number;
20
- };
1
+ import { TInput } from './type';
21
2
  /**
22
3
  * TextareaField component
23
4
  *
@@ -39,5 +20,4 @@ type Input = {
39
20
  * @param {boolean} [isCopy] - разрешить копирование
40
21
  * @return {ReactElement} - поле ввода
41
22
  */
42
- export default function ({ value, onValue, name, placeholder, title, label, hide, edit, active, after, show, maxLength, onSave, className, isCopy, }: Input): import("react/jsx-runtime").JSX.Element | "";
43
- export {};
23
+ export default function ({ value, onValue, name, placeholder, title, label, hide, edit, active, after, show, maxLength, onSave, className, isCopy, }: TInput): import("react/jsx-runtime").JSX.Element | "";
@@ -1,22 +1,23 @@
1
- type Data = {
1
+ export type TInput = {
2
2
  value?: string;
3
3
  onValue?: Function;
4
4
  onSave?: Function;
5
5
  name?: string;
6
6
  placeholder?: string;
7
7
  title?: string;
8
- max?: number;
8
+ label?: string;
9
9
  error?: string;
10
10
  hide?: boolean;
11
- edit?: Boolean;
11
+ edit?: boolean;
12
12
  active?: Boolean;
13
13
  after?: any;
14
14
  before?: any;
15
15
  show?: Boolean;
16
16
  view?: string;
17
+ id?: string;
17
18
  className?: string;
18
- item?: string;
19
+ isCopy?: boolean;
19
20
  maxLength?: number;
21
+ isReload?: boolean;
22
+ spellCheck?: boolean;
20
23
  };
21
- export default function Number({ onValue, onSave, active, max, edit, title, error, show, hide, value, placeholder, className, maxLength, name, after, before, view, }: Data): import("react/jsx-runtime").JSX.Element;
22
- export {};
@@ -2,11 +2,11 @@ export { default as Progress } from './Progress';
2
2
  export { default as Mask } from './Mask';
3
3
  export { default as Month } from './Month';
4
4
  export { default as Money } from './Money';
5
- export { default as StringField } from './Input';
6
- export { default as NumberField } from './Numeric';
7
- export { default as DateField } from './Date';
8
- export { default as TextareaField } from './Textarea';
9
- export { default as PhoneField } from './Phone';
5
+ export { default as DateField } from './fields/Date';
6
+ export { default as TextareaField } from './fields/Textarea';
7
+ export { default as PhoneField } from './fields/Phone';
8
+ export { default as StringField } from './fields/Input';
9
+ export { default as NumberField } from './fields/Numeric';
10
10
  export { default as OptionsField } from './Options';
11
11
  export { default as SelectField } from './Select';
12
12
  export { default as ModalField } from './Modal';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elcrm/form",
3
- "version": "0.0.43",
3
+ "version": "0.0.44",
4
4
  "description": "plugin for elCRM",
5
5
  "type": "module",
6
6
  "author": "MaSkal <dev@elcrm.online>",
@@ -1,18 +0,0 @@
1
- interface Input {
2
- value?: string;
3
- onValue?: Function;
4
- onSave?: Function;
5
- name?: string;
6
- placeholder?: string;
7
- title?: string;
8
- error?: string;
9
- hide?: boolean;
10
- edit?: boolean;
11
- show?: boolean;
12
- active?: boolean;
13
- after?: string;
14
- view?: string;
15
- className?: string;
16
- }
17
- export default function ({ value, onValue, onSave, name, placeholder, title, error, hide, edit, active, after, show, view, className, }: Input): import("react/jsx-runtime").JSX.Element;
18
- export {};