indicator-ui 0.0.119 → 0.0.121

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,4 @@
1
+ import { DictDeepActionKeyWayType } from "../../types";
2
+ export default function clearDeepValue(dict: {
3
+ [key: string]: any;
4
+ }, keyWays: DictDeepActionKeyWayType[]): any;
@@ -0,0 +1,7 @@
1
+ import { DictDeepActionKeyWayType } from "../../types/DictDeepActionsTypes";
2
+ /**
3
+ * 2 - полностью совпадают
4
+ * 1 - совпадает начало
5
+ * 0 - не совпадают
6
+ * */
7
+ export declare function compKeyWays(a: DictDeepActionKeyWayType, b: DictDeepActionKeyWayType): 0 | 1 | 2;
@@ -1,3 +1,4 @@
1
1
  export { default as isDict } from './isDict';
2
2
  export { default as setDeepValue } from './setDeepValue';
3
3
  export { default as getDeepValue } from './getDeepValue';
4
+ export * from './compKeyWays';
@@ -0,0 +1 @@
1
+ export default function getFileUrl(path?: string): string;
@@ -0,0 +1 @@
1
+ export { default as getFileUrl } from './getFileUrl';
@@ -0,0 +1,3 @@
1
+ export { default as InputFileField } from './ui/InputFileField';
2
+ export * from './types';
3
+ export * from './api';
@@ -0,0 +1,18 @@
1
+ import { FileMetaType } from "./InputFileTypes";
2
+ import React from "react";
3
+ export type FileViewItemClassNameType = {
4
+ fileViewItem?: string;
5
+ main?: string;
6
+ meta?: string;
7
+ name?: string;
8
+ size?: string;
9
+ fileIcon?: string;
10
+ deleteIcon?: string;
11
+ disabled?: string;
12
+ };
13
+ export type FileViewItemPropsType = {
14
+ fileData: FileMetaType;
15
+ disabled?: boolean;
16
+ onDeleteClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
17
+ className?: FileViewItemClassNameType;
18
+ };
@@ -0,0 +1,8 @@
1
+ import { ReactElement, ReactNode } from "react";
2
+ import { InputFilePropsType } from "./InputFileTypes";
3
+ import { InputFieldWrapperPropsType } from "../../../../ui";
4
+ export type InputFileFieldPropsType = InputFieldWrapperPropsType & InputFilePropsType & {
5
+ disabled?: boolean;
6
+ ownerInputWrapper?: ReactNode;
7
+ ownerFileView?: ReactElement<any>;
8
+ };
@@ -0,0 +1,19 @@
1
+ import React from "react";
2
+ export type FileMetaType = {
3
+ original_name?: string;
4
+ path?: string;
5
+ size?: number;
6
+ };
7
+ export type InputFileClassNameType = string;
8
+ export type FileValueType = FileMetaType[];
9
+ export type InputFilePropsType = {
10
+ value?: FileValueType;
11
+ name?: string;
12
+ multiple?: boolean;
13
+ accept?: string;
14
+ onChange?: (files: FileValueType) => void;
15
+ ownerButton?: React.ReactElement<{
16
+ onClick?: React.MouseEventHandler;
17
+ }>;
18
+ className?: InputFileClassNameType;
19
+ };
@@ -0,0 +1,3 @@
1
+ export * from './InputFileTypes';
2
+ export * from './InputFileFieldTypes';
3
+ export * from './FileViewItemTypes';
@@ -0,0 +1,2 @@
1
+ import { FileViewItemPropsType } from "../types";
2
+ export default function FileViewItem({ fileData, onDeleteClick, disabled, className }: FileViewItemPropsType): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { InputFilePropsType } from "../types";
3
+ declare const InputFile: React.ForwardRefExoticComponent<InputFilePropsType & React.RefAttributes<HTMLInputElement>>;
4
+ export default InputFile;
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ declare const InputFileField: React.ForwardRefExoticComponent<import("../../../../ui").InputFieldWrapperPropsType & import("../types").InputFilePropsType & {
3
+ disabled?: boolean;
4
+ ownerInputWrapper?: React.ReactNode;
5
+ ownerFileView?: React.ReactElement<any>;
6
+ } & React.RefAttributes<HTMLInputElement>>;
7
+ export default InputFileField;
@@ -0,0 +1 @@
1
+ export * from './InputFileField';
@@ -12,6 +12,14 @@ export type FormBuilderPropsType<T> = {
12
12
  additionIsErrorFields?: UseIsErrorFieldIsErrorType;
13
13
  formDataDefaultListener?: T;
14
14
  sensitiveErrorSearch?: boolean;
15
+ /**
16
+ * Отчищает форму от полей, не входящих в форму.
17
+ *
18
+ * То есть, если в схеме нет поля с `name === 'test'`, то в форме он его откинет.
19
+ *
20
+ * По умолчанию: `false`.
21
+ * */
22
+ clearForm?: boolean;
15
23
  inputFieldAdditionProps?: InputFieldAdditionPropsType;
16
24
  };
17
25
  export type GetStoreValueType = (key: string) => any;
@@ -2,4 +2,4 @@ import React from "react";
2
2
  import { FormBuilderPropsType } from "../types";
3
3
  export declare function FormBuilder<T extends {
4
4
  [key: string]: any;
5
- }>({ schema, formDataDefault, onChange, onChangeIsError, inputFieldClassName, additionIsErrorFields, onChangeValidateIsError, formDataDefaultListener, inputFieldAdditionProps, sensitiveErrorSearch, }: FormBuilderPropsType<T>): React.JSX.Element;
5
+ }>({ schema, formDataDefault, onChange, onChangeIsError, inputFieldClassName, additionIsErrorFields, onChangeValidateIsError, formDataDefaultListener, inputFieldAdditionProps, sensitiveErrorSearch, clearForm, }: FormBuilderPropsType<T>): React.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "indicator-ui",
3
- "version": "0.0.119",
3
+ "version": "0.0.121",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/types/src/index.d.ts",
6
6
  "style": "dist/index.css",