@mdtl/uikit 0.0.36 → 0.0.38

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.
@@ -2,25 +2,7 @@ import { default as React, FC } from 'react';
2
2
  import { TextFieldProps } from '@mui/material/TextField';
3
3
  import { default as Autocomplete } from '@mui/material/Autocomplete';
4
4
  import { SxProps } from '@mui/system';
5
- export type Option = {
6
- label: string;
7
- value: any;
8
- };
9
- export type PayloadType = {
10
- currentPage: number;
11
- itemsPerPage: number;
12
- filters?: {
13
- operation: unknown;
14
- values: string[];
15
- fieldName: string;
16
- }[];
17
- };
18
- type CollectionPageType = {
19
- readonly currentPage: number;
20
- readonly itemsPerPage: number;
21
- readonly totalPages: number;
22
- readonly data: Option[];
23
- };
5
+ import { CollectionPageType, Option, PayloadType } from './interfaces';
24
6
  export interface IAutocompleteSelectProps {
25
7
  multiple?: boolean;
26
8
  creatable?: boolean;
@@ -48,7 +30,7 @@ export interface IAutocompleteSelectProps {
48
30
  * Пропсы для настройки popper
49
31
  */
50
32
  popperProps?: React.ComponentProps<typeof Autocomplete>['slotProps']['popper'];
51
- filterOperation: unknown;
33
+ filterOperation: string | number;
52
34
  itemsPerPage: number;
53
35
  reqCatchHandler: (error: unknown) => void;
54
36
  }
@@ -1,5 +1,5 @@
1
- import { Option } from './AutocompleteSelect';
2
1
  import { FC, MouseEvent } from 'react';
2
+ import { Option } from './interfaces';
3
3
  interface IMoreChipProps {
4
4
  value: Option[];
5
5
  onClick: (e: MouseEvent<HTMLDivElement>) => void;
@@ -1,4 +1,4 @@
1
- import { Option } from './AutocompleteSelect';
1
+ import { Option } from './interfaces';
2
2
  import { FC } from 'react';
3
3
  interface IValueChipProps {
4
4
  value: Option;
@@ -0,0 +1,19 @@
1
+ export type Option = {
2
+ label: string;
3
+ value: any;
4
+ };
5
+ export type PayloadType = {
6
+ currentPage: number;
7
+ itemsPerPage: number;
8
+ filters?: {
9
+ operation: string | number;
10
+ values: string[];
11
+ fieldName: string;
12
+ }[];
13
+ };
14
+ export type CollectionPageType = {
15
+ readonly currentPage: number;
16
+ readonly itemsPerPage: number;
17
+ readonly totalPages: number;
18
+ readonly data: Option[];
19
+ };
@@ -1,4 +1,4 @@
1
- import { Option, PayloadType } from './AutocompleteSelect';
1
+ import { Option, PayloadType } from './interfaces';
2
2
  /**
3
3
  * Если в форме будем хранить label (и отправлять/получать от бэка - так, например, в простоях), используем
4
4
  * эту функцию
package/dist/index.d.ts CHANGED
@@ -19,6 +19,7 @@ export { LoadingIndicator } from './components/LoadingIndicator/LoadingIndicator
19
19
  export { Snackbar } from './components/Snackbar/Snackbar';
20
20
  export { Stepper } from './components/Stepper/Stepper';
21
21
  export { AutocompleteSelect } from './components/AutocompleteSelect/AutocompleteSelect';
22
+ export type { Option } from './components/AutocompleteSelect/interfaces';
22
23
  export * from './components/AutocompleteSelect/utils';
23
24
  export { calculateRightIconsWidth } from './utils/calculateRightIconsWidth';
24
25
  export { generateGuid } from './utils/generateGuid';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mdtl/uikit",
3
- "version": "0.0.36",
3
+ "version": "0.0.38",
4
4
  "type": "module",
5
5
  "main": "./dist/uikit.js",
6
6
  "types": "./dist/index.d.ts",