isp-ui-kit 0.12.6 → 0.13.0

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.
package/README.md CHANGED
@@ -21,6 +21,21 @@
21
21
  npm install isp-ui-kit
22
22
  ```
23
23
 
24
+ Дополнительные библиотеки, необходимые для работы библиотеки, исходя из peerDependencies:
25
+
26
+ ```bash
27
+ npm install @monaco-editor/react monaco-editor antd react react-dom react-hook-form
28
+ ```
29
+
30
+ ```
31
+ "@monaco-editor/react": "^4.6.0",
32
+ "antd": ">=5.12",
33
+ "monaco-editor": "^0.52.0",
34
+ "react": ">=18",
35
+ "react-dom": ">=18",
36
+ "react-hook-form": "^7.54.0"
37
+ ```
38
+
24
39
  ## Возможные проблемы
25
40
 
26
41
  ### 1. Не подгружаются стили
@@ -0,0 +1,4 @@
1
+ import { FormArrayMapProps } from './form-array-map.type';
2
+ import './form-array-map.scss';
3
+ declare const FormArrayMap: ({ name, control, label, controlClassName, }: FormArrayMapProps) => import("react/jsx-runtime").JSX.Element;
4
+ export default FormArrayMap;
@@ -0,0 +1,7 @@
1
+ import { Control } from 'react-hook-form';
2
+ export interface FormArrayMapProps {
3
+ name: string;
4
+ control: Control<any>;
5
+ label?: string;
6
+ controlClassName: string;
7
+ }
@@ -1,4 +1,4 @@
1
- import { InputProps } from 'antd';
1
+ import { InputNumberProps } from 'antd';
2
2
  import { FieldValues } from 'react-hook-form';
3
3
  import { FormComponentProps } from '../formTypes';
4
- export type FormInputNumberProps<TFormValues extends FieldValues> = FormComponentProps<TFormValues> & InputProps;
4
+ export type FormInputNumberProps<TFormValues extends FieldValues> = FormComponentProps<TFormValues> & InputNumberProps;
@@ -1,5 +1,5 @@
1
1
  import { FieldValues } from 'react-hook-form';
2
2
  import { FormSelectProps } from './form-select.type';
3
3
  import '../form-components.scss';
4
- declare const _default: <T extends FieldValues>({ defaultValue, control, name, label, mode, rules, ...rest }: FormSelectProps<T>) => import("react/jsx-runtime").JSX.Element;
4
+ declare const _default: <T extends FieldValues>({ control, name, label, mode, rules, ...rest }: FormSelectProps<T>) => import("react/jsx-runtime").JSX.Element;
5
5
  export default _default;
@@ -9,3 +9,4 @@ export { default as FormTextArea } from './FormTextArea/FormTextArea';
9
9
  export { default as FormTreeSelect } from './FormTreeSelect/FormTreeSelect';
10
10
  export { default as ConfigForm } from './ConfigForm/ConfigForm';
11
11
  export { default as FormObjectMap } from './FormObjectMap/FormObjectMap';
12
+ export { default as FormArrayMap } from './FormArrayMap/FormArrayMap';
@@ -1,4 +1,4 @@
1
1
  import { ColumnProps } from './column.type';
2
2
  import './column.scss';
3
- declare const Column: <T extends {}>({ title, searchPlaceholder, items, onAddItem, onUpdateItem, onRemoveItem, showRemoveBtn, showUpdateBtn, showAddBtn, selectedItemId, setSelectedItemId, searchValue, onChangeSearchValue, renderItems, isSortByName, }: ColumnProps<T>) => import("react/jsx-runtime").JSX.Element;
3
+ declare const Column: <T extends object>({ title, searchPlaceholder, items, onAddItem, onUpdateItem, onRemoveItem, showRemoveBtn, showUpdateBtn, showAddBtn, selectedItemId, setSelectedItemId, searchValue, onChangeSearchValue, renderItems, isSortByName, }: ColumnProps<T>) => import("react/jsx-runtime").JSX.Element;
4
4
  export default Column;
@@ -1,5 +1,5 @@
1
1
  import { ChangeEvent, ReactElement, ReactNode } from 'react';
2
- export interface ColumnProps<T extends {}> {
2
+ export interface ColumnProps<T extends object> {
3
3
  title?: string;
4
4
  items: ColumnItem<T>[];
5
5
  renderItems: (item: T) => ReactElement;
@@ -0,0 +1,4 @@
1
+ import { ConfigTableProps } from './config-table.type';
2
+ import './config-table.scss';
3
+ declare const ConfigTable: ({ onSearch, onClickBtn, textBtn, placeholderSearch, isAddBtn, isSearch, dataSource, ...rest }: ConfigTableProps) => import("react/jsx-runtime").JSX.Element;
4
+ export default ConfigTable;
@@ -0,0 +1,10 @@
1
+ import { TableProps } from 'antd';
2
+ export type ConfigTableProps = {
3
+ onSearch?: (value: string) => void;
4
+ onClickBtn?: () => void;
5
+ textBtn?: string;
6
+ placeholderSearch?: string;
7
+ dataSource: any[];
8
+ isAddBtn?: boolean;
9
+ isSearch?: boolean;
10
+ } & TableProps;
package/dist/index.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import * as FormComponents from './FormComponents';
2
2
  import * as Layout from './Layout';
3
- import SearchInput from './SearchInput/SearchInput';
3
+ import SearchInput from './components/SearchInput/SearchInput';
4
4
  import useAuth from './hooks/useAuth';
5
5
  import { getConfigProperty } from './utils/configUtils';
6
- import ReactJsonView from './ReactJsonView/js';
6
+ import ReactJsonView from './components/ReactJsonView/js';
7
7
  import { findRouteWithParents } from './utils/layoutMenuUtils';
8
- export { FormComponents, SearchInput, Layout, useAuth, getConfigProperty, ReactJsonView, findRouteWithParents, };
8
+ import ConfigTable from './components/ConfigTable/ConfigTable';
9
+ export { FormComponents, SearchInput, Layout, useAuth, getConfigProperty, ReactJsonView, findRouteWithParents, ConfigTable, };