@astral/ui 4.0.0-alpha.28 → 4.0.0-alpha.29

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.
Files changed (83) hide show
  1. package/components/Checkbox/Checkbox.js +1 -1
  2. package/components/Checkbox/constants.d.ts +3 -0
  3. package/components/Checkbox/constants.js +3 -0
  4. package/components/Checkbox/index.d.ts +1 -1
  5. package/components/Checkbox/index.js +1 -1
  6. package/components/Checkbox/styles.js +25 -25
  7. package/components/ScrollWrapper/ScrollWrapper.d.ts +7 -0
  8. package/components/ScrollWrapper/ScrollWrapper.js +3 -0
  9. package/components/ScrollWrapper/index.d.ts +1 -0
  10. package/components/ScrollWrapper/index.js +1 -0
  11. package/components/ScrollWrapper/styles.d.ts +7 -0
  12. package/components/ScrollWrapper/styles.js +7 -0
  13. package/components/Tree/MultipleTreeList/TreeItem/styles.js +16 -2
  14. package/components/Tree/MultipleTreeList/styles.d.ts +0 -6
  15. package/components/Tree/MultipleTreeList/styles.js +0 -3
  16. package/components/Tree/TreeItem/constants.d.ts +1 -0
  17. package/components/Tree/TreeItem/constants.js +2 -1
  18. package/components/Tree/TreeItem/styles.d.ts +0 -4
  19. package/components/Tree/TreeItem/styles.js +15 -8
  20. package/components/TreeAutocomplete/Input/Input.js +7 -5
  21. package/components/TreeAutocomplete/Input/constants.d.ts +1 -0
  22. package/components/TreeAutocomplete/Input/constants.js +1 -0
  23. package/components/TreeAutocomplete/Input/styles.d.ts +3 -10
  24. package/components/TreeAutocomplete/Input/styles.js +3 -18
  25. package/components/TreeAutocomplete/OptionsModal/ErrorMessage/ErrorMessage.js +1 -1
  26. package/components/TreeAutocomplete/OptionsModal/OptionsModal.js +2 -1
  27. package/components/TreeAutocomplete/OptionsModal/styles.js +3 -6
  28. package/components/TreeAutocomplete/TreeAutocomplete.d.ts +1 -57
  29. package/components/TreeAutocomplete/types.d.ts +56 -0
  30. package/components/TreeAutocomplete/useLogic/useLogic.d.ts +1 -1
  31. package/components/TreeLikeAutocomplete/Input/Input.js +5 -5
  32. package/components/TreeLikeAutocomplete/Input/styles.d.ts +1 -25
  33. package/components/TreeLikeAutocomplete/Input/styles.js +7 -20
  34. package/components/TreeLikeAutocomplete/OptionsModal/ErrorMessage/ErrorMessage.js +1 -1
  35. package/components/TreeLikeAutocomplete/OptionsModal/OptionsModal.js +2 -1
  36. package/components/TreeLikeAutocomplete/OptionsModal/styles.js +2 -6
  37. package/components/TreeLikeAutocomplete/TreeLikeAutocomplete.d.ts +1 -62
  38. package/components/TreeLikeAutocomplete/types.d.ts +61 -1
  39. package/components/TreeLikeAutocomplete/useLogic/useLogic.d.ts +2 -2
  40. package/node/components/Checkbox/Checkbox.js +1 -1
  41. package/node/components/Checkbox/constants.d.ts +3 -0
  42. package/node/components/Checkbox/constants.js +4 -1
  43. package/node/components/Checkbox/index.d.ts +1 -1
  44. package/node/components/Checkbox/index.js +3 -1
  45. package/node/components/Checkbox/styles.js +24 -24
  46. package/node/components/ScrollWrapper/ScrollWrapper.d.ts +7 -0
  47. package/node/components/ScrollWrapper/ScrollWrapper.js +7 -0
  48. package/node/components/ScrollWrapper/index.d.ts +1 -0
  49. package/node/components/ScrollWrapper/index.js +17 -0
  50. package/node/components/ScrollWrapper/styles.d.ts +7 -0
  51. package/node/components/ScrollWrapper/styles.js +10 -0
  52. package/node/components/Tree/MultipleTreeList/TreeItem/styles.js +15 -1
  53. package/node/components/Tree/MultipleTreeList/styles.d.ts +0 -6
  54. package/node/components/Tree/MultipleTreeList/styles.js +1 -4
  55. package/node/components/Tree/TreeItem/constants.d.ts +1 -0
  56. package/node/components/Tree/TreeItem/constants.js +2 -1
  57. package/node/components/Tree/TreeItem/styles.d.ts +0 -4
  58. package/node/components/Tree/TreeItem/styles.js +15 -8
  59. package/node/components/TreeAutocomplete/Input/Input.js +4 -2
  60. package/node/components/TreeAutocomplete/Input/constants.d.ts +1 -0
  61. package/node/components/TreeAutocomplete/Input/constants.js +4 -0
  62. package/node/components/TreeAutocomplete/Input/styles.d.ts +3 -10
  63. package/node/components/TreeAutocomplete/Input/styles.js +4 -19
  64. package/node/components/TreeAutocomplete/OptionsModal/ErrorMessage/ErrorMessage.js +1 -1
  65. package/node/components/TreeAutocomplete/OptionsModal/OptionsModal.js +2 -1
  66. package/node/components/TreeAutocomplete/OptionsModal/styles.js +3 -6
  67. package/node/components/TreeAutocomplete/TreeAutocomplete.d.ts +1 -57
  68. package/node/components/TreeAutocomplete/types.d.ts +56 -0
  69. package/node/components/TreeAutocomplete/useLogic/useLogic.d.ts +1 -1
  70. package/node/components/TreeLikeAutocomplete/Input/Input.js +3 -3
  71. package/node/components/TreeLikeAutocomplete/Input/styles.d.ts +1 -25
  72. package/node/components/TreeLikeAutocomplete/Input/styles.js +8 -21
  73. package/node/components/TreeLikeAutocomplete/OptionsModal/ErrorMessage/ErrorMessage.js +1 -1
  74. package/node/components/TreeLikeAutocomplete/OptionsModal/OptionsModal.js +2 -1
  75. package/node/components/TreeLikeAutocomplete/OptionsModal/styles.js +2 -6
  76. package/node/components/TreeLikeAutocomplete/TreeLikeAutocomplete.d.ts +1 -62
  77. package/node/components/TreeLikeAutocomplete/types.d.ts +61 -1
  78. package/node/components/TreeLikeAutocomplete/useLogic/useLogic.d.ts +2 -2
  79. package/package.json +1 -1
  80. package/components/TreeLikeList/faker.d.ts +0 -8
  81. package/components/TreeLikeList/faker.js +0 -17
  82. package/node/components/TreeLikeList/faker.d.ts +0 -8
  83. package/node/components/TreeLikeList/faker.js +0 -21
@@ -1,16 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Note = exports.Label = exports.LabelWrapper = exports.List = exports.ChevronIcon = exports.CollapseButton = exports.ItemContent = exports.Item = void 0;
3
+ exports.Note = exports.Label = exports.LabelWrapper = exports.ChevronIcon = exports.CollapseButton = exports.ItemContent = exports.Item = void 0;
4
4
  const material_1 = require("@mui/material");
5
5
  const icons_1 = require("../../../icons");
6
+ const Button_1 = require("../../Button");
6
7
  const Description_1 = require("../../Description");
7
8
  const IconButton_1 = require("../../IconButton");
8
9
  const OverflowTypography_1 = require("../../OverflowTypography");
9
10
  const styles_1 = require("../../styles");
10
- const mixins_1 = require("../../styles/mixins");
11
11
  const Typography_1 = require("../../Typography");
12
12
  const constants_1 = require("./constants");
13
- const getBackgroundColorOnHover = (theme, isSelected, isDisabled) => {
13
+ const getBackgroundColor = (theme, isSelected, isDisabled) => {
14
14
  if (isDisabled) {
15
15
  return 'transparent';
16
16
  }
@@ -61,11 +61,11 @@ exports.ItemContent = (0, styles_1.styled)('div', {
61
61
  })};
62
62
 
63
63
  &:hover {
64
- background-color: ${({ theme, $isSelected, $isDisabled }) => getBackgroundColorOnHover(theme, $isSelected, $isDisabled)};
64
+ background-color: ${({ theme, $isSelected, $isDisabled }) => getBackgroundColor(theme, $isSelected, $isDisabled)};
65
65
  }
66
66
 
67
67
  &:focus {
68
- background-color: ${({ theme }) => theme.palette.background.elementHover};
68
+ background-color: ${({ theme, $isSelected, $isDisabled }) => getBackgroundColor(theme, $isSelected, $isDisabled)};
69
69
  border: 0;
70
70
  outline: 0;
71
71
  }
@@ -82,6 +82,16 @@ exports.CollapseButton = (0, styles_1.styled)(IconButton_1.IconButton, {
82
82
 
83
83
  color: ${({ theme, $isNotBlockingExpandList }) => $isNotBlockingExpandList ? theme.palette.text.primary : 'inherit'};
84
84
 
85
+ &.${Button_1.buttonClasses.root} .${material_1.svgIconClasses.root}, &.${Button_1.buttonClasses.root} {
86
+ width: 24px;
87
+ height: 24px;
88
+
89
+ ${({ theme }) => theme.breakpoints.down('sm')} {
90
+ width: 24px;
91
+ height: 24px;
92
+ }
93
+ }
94
+
85
95
  &:hover {
86
96
  background-color: ${({ theme }) => theme.palette.grey[300]};
87
97
  }
@@ -96,9 +106,6 @@ exports.ChevronIcon = (0, styles_1.styled)(icons_1.ChevronROutlineMd, {
96
106
  duration: theme.transitions.duration.short,
97
107
  })};
98
108
  `;
99
- exports.List = styles_1.styled.ul `
100
- ${mixins_1.listContainer};
101
- `;
102
109
  exports.LabelWrapper = (0, styles_1.styled)('div', {
103
110
  shouldForwardProp: (prop) => prop !== '$level',
104
111
  }) `
@@ -15,12 +15,14 @@ exports.Input = void 0;
15
15
  const jsx_runtime_1 = require("react/jsx-runtime");
16
16
  const react_1 = require("react");
17
17
  const icons_1 = require("../../../icons");
18
+ const IconButton_1 = require("../../IconButton");
18
19
  const TextField_1 = require("../../TextField");
20
+ const constants_1 = require("./constants");
19
21
  const styles_1 = require("./styles");
20
22
  const useLogic_1 = require("./useLogic");
21
- const ClearButton = ({ disabled, onClick }) => ((0, jsx_runtime_1.jsx)(styles_1.StyledIconButton, { variant: "text", disabled: disabled, onClick: onClick, children: (0, jsx_runtime_1.jsx)(icons_1.CircleErrorFillSm, {}) }));
23
+ const ClearButton = ({ disabled, onClick }) => ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { variant: "text", color: "grey", disabled: disabled, onClick: onClick, title: constants_1.CLEAR_TEXT, "aria-label": constants_1.CLEAR_TEXT, children: (0, jsx_runtime_1.jsx)(icons_1.CrossOutlineMd, {}) }));
22
24
  exports.Input = (0, react_1.forwardRef)((props, forwardedRef) => {
23
25
  const { inputRef, isVisibleClearButton, handleClearAll } = (0, useLogic_1.useLogic)(props);
24
26
  const { disabled, onChange } = props, restProps = __rest(props, ["disabled", "onChange"]);
25
- return ((0, jsx_runtime_1.jsx)(TextField_1.TextField, Object.assign({}, restProps, { ref: forwardedRef, inputRef: inputRef, disabled: disabled, inputProps: { readOnly: true }, endAdornment: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isVisibleClearButton && ((0, jsx_runtime_1.jsx)(ClearButton, { disabled: disabled, onClick: handleClearAll })), (0, jsx_runtime_1.jsx)(icons_1.ChevronDOutlineMd, {})] }) })));
27
+ return ((0, jsx_runtime_1.jsx)(TextField_1.TextField, Object.assign({}, restProps, { ref: forwardedRef, inputRef: inputRef, disabled: disabled, inputProps: { readOnly: true }, endAdornment: (0, jsx_runtime_1.jsxs)(styles_1.IconWrapper, { children: [isVisibleClearButton && ((0, jsx_runtime_1.jsx)(ClearButton, { disabled: disabled, onClick: handleClearAll })), (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { variant: "text", color: "grey", disabled: disabled, children: (0, jsx_runtime_1.jsx)(icons_1.DownOutlineMd, {}) })] }) })));
26
28
  });
@@ -0,0 +1 @@
1
+ export declare const CLEAR_TEXT = "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C";
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CLEAR_TEXT = void 0;
4
+ exports.CLEAR_TEXT = 'Очистить';
@@ -1,12 +1,5 @@
1
1
  /// <reference types="react" />
2
- export declare const StyledIconButton: import("@emotion/styled").StyledComponent<Omit<import("../..").WithoutEmotionSpecific<import("@mui/material").ButtonProps>, "color" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "variant"> & {
3
- variant?: "link" | "outlined" | "text" | "contained" | "light" | undefined;
4
- loading?: boolean | undefined;
5
- color?: "grey" | "primary" | "error" | "warning" | "success" | undefined;
6
- component?: import("react").ElementType | undefined;
7
- selected?: boolean | undefined;
8
- } & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
9
- ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
10
- }, ""> & import("react").RefAttributes<HTMLButtonElement> & {
2
+ export declare const IconWrapper: import("@emotion/styled").StyledComponent<{
11
3
  theme?: import("@emotion/react").Theme | undefined;
12
- }, {}, {}>;
4
+ as?: import("react").ElementType<any> | undefined;
5
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -1,23 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StyledIconButton = void 0;
4
- const IconButton_1 = require("../../IconButton");
3
+ exports.IconWrapper = void 0;
5
4
  const styles_1 = require("../../styles");
6
- exports.StyledIconButton = (0, styles_1.styled)(IconButton_1.IconButton) `
7
- background-color: transparent;
8
-
9
- svg {
10
- width: 16px;
11
- height: 16px;
12
-
13
- fill: ${({ theme }) => theme.palette.grey['500']};
14
- }
15
-
16
- &:hover {
17
- background-color: transparent;
18
-
19
- svg {
20
- fill: ${({ theme }) => theme.palette.grey['700']};
21
- }
22
- }
5
+ exports.IconWrapper = styles_1.styled.div `
6
+ display: flex;
7
+ gap: ${({ theme }) => theme.spacing(1)};
23
8
  `;
@@ -6,5 +6,5 @@ const Button_1 = require("../../../Button");
6
6
  const Typography_1 = require("../../../Typography");
7
7
  const styles_1 = require("./styles");
8
8
  const DEFAULT_ERROR_MSG = 'Не удалось загрузить данные';
9
- const ErrorMessage = ({ loadingErrorMsg = DEFAULT_ERROR_MSG, onRetry, }) => ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { children: [(0, jsx_runtime_1.jsx)(Typography_1.Typography, { color: "textSecondary", children: loadingErrorMsg }), onRetry && (0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: onRetry, children: "\u041F\u043E\u043F\u0440\u043E\u0431\u043E\u0432\u0430\u0442\u044C \u0441\u043D\u043E\u0432\u0430" })] }));
9
+ const ErrorMessage = ({ loadingErrorMsg = DEFAULT_ERROR_MSG, onRetry, }) => ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { children: [(0, jsx_runtime_1.jsx)(Typography_1.Typography, { color: "grey", children: loadingErrorMsg }), onRetry && ((0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: onRetry, variant: "light", color: "grey", children: "\u041F\u043E\u043F\u0440\u043E\u0431\u043E\u0432\u0430\u0442\u044C \u0441\u043D\u043E\u0432\u0430" }))] }));
10
10
  exports.ErrorMessage = ErrorMessage;
@@ -16,6 +16,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
16
16
  const Button_1 = require("../../Button");
17
17
  const Dialog_1 = require("../../Dialog");
18
18
  const DialogActions_1 = require("../../DialogActions");
19
+ const ScrollWrapper_1 = require("../../ScrollWrapper");
19
20
  const SearchField_1 = require("../../SearchField");
20
21
  const Tree_1 = require("../../Tree");
21
22
  const ErrorMessage_1 = require("./ErrorMessage");
@@ -38,6 +39,6 @@ const OptionsModal = (props) => {
38
39
  }
39
40
  return (0, jsx_runtime_1.jsx)(Tree_1.TreeList, Object.assign({}, treeProps, treeListProps));
40
41
  };
41
- return ((0, jsx_runtime_1.jsxs)(Dialog_1.Dialog, Object.assign({}, externalDialogProps, { disableRestoreFocus: true, open: isOpen }, modalProps, { children: [(0, jsx_runtime_1.jsxs)(styles_1.StyledDialogContent, { children: [(0, jsx_runtime_1.jsx)(SearchField_1.SearchField, Object.assign({ fullWidth: true }, searchFieldProps)), (0, jsx_runtime_1.jsx)(styles_1.TreeListWrapper, { children: renderComponent() })] }), (0, jsx_runtime_1.jsxs)(DialogActions_1.DialogActions, { children: [(0, jsx_runtime_1.jsx)(Button_1.Button, Object.assign({ variant: "text" }, cancelButtonProps, { children: "\u041E\u0442\u043C\u0435\u043D\u0430" })), (0, jsx_runtime_1.jsx)(Button_1.Button, Object.assign({}, confirmButtonProps, { children: "\u0412\u044B\u0431\u0440\u0430\u0442\u044C" }))] })] })));
42
+ return ((0, jsx_runtime_1.jsxs)(Dialog_1.Dialog, Object.assign({}, externalDialogProps, { disableRestoreFocus: true, open: isOpen }, modalProps, { children: [(0, jsx_runtime_1.jsxs)(styles_1.StyledDialogContent, { children: [(0, jsx_runtime_1.jsx)(SearchField_1.SearchField, Object.assign({ fullWidth: true }, searchFieldProps)), (0, jsx_runtime_1.jsx)(ScrollWrapper_1.ScrollWrapper, { children: (0, jsx_runtime_1.jsx)(styles_1.TreeListWrapper, { children: renderComponent() }) })] }), (0, jsx_runtime_1.jsxs)(DialogActions_1.DialogActions, { children: [(0, jsx_runtime_1.jsx)(Button_1.Button, Object.assign({ variant: "text" }, cancelButtonProps, { children: "\u041E\u0442\u043C\u0435\u043D\u0430" })), (0, jsx_runtime_1.jsx)(Button_1.Button, Object.assign({}, confirmButtonProps, { children: "\u0412\u044B\u0431\u0440\u0430\u0442\u044C" }))] })] })));
42
43
  };
43
44
  exports.OptionsModal = OptionsModal;
@@ -7,17 +7,14 @@ exports.StyledDialogContent = (0, styles_1.styled)(DialogContent_1.DialogContent
7
7
  display: grid;
8
8
  grid-template-columns: 100%;
9
9
  grid-template-rows: max-content 1fr;
10
- gap: ${({ theme }) => theme.spacing(5)};
10
+ gap: ${({ theme }) => theme.spacing(4)};
11
11
 
12
12
  width: 500px;
13
13
  height: 500px;
14
+ padding-bottom: ${({ theme }) => theme.spacing(4)};
14
15
  `;
15
16
  exports.TreeListWrapper = styles_1.styled.div `
16
17
  overflow: auto;
17
18
 
18
- padding: ${({ theme }) => theme.spacing(2, 0)};
19
-
20
- background-color: ${({ theme }) => theme.palette.background.element};
21
- border: 2px solid ${({ theme }) => theme.palette.grey[300]};
22
- border-radius: 3px;
19
+ height: 100%;
23
20
  `;
@@ -1,59 +1,3 @@
1
1
  /// <reference types="react" />
2
- import { type DialogProps } from '../Dialog';
3
- import { type TextFieldProps } from '../TextField';
4
- import { type TreeListData, type TreeListProps } from '../Tree';
5
- import type { TreeAutocompleteValue } from './types';
6
- export type TreeAutocompleteTreeProps = Pick<TreeListProps, 'disabledItems' | 'renderItem'>;
7
- export type TreeAutocompleteProps = {
8
- /**
9
- * Выбранное значения
10
- */
11
- value?: TreeAutocompleteValue;
12
- /**
13
- * Опции, которые необходимо отобразить в виде дерева.
14
- */
15
- options: TreeListData[];
16
- /**
17
- * Если true, поля будут недоступны для взаимодействия
18
- */
19
- isDisabled?: boolean;
20
- /**
21
- * Если true, поля будут подсвечены, как содержащие ошибку
22
- */
23
- isError?: boolean;
24
- /**
25
- * Флаг загрузки options
26
- * Если true, вместо дерева options будет отображен лоадер
27
- */
28
- isLoading?: boolean;
29
- /**
30
- * Флаг ошибки загрузки options
31
- * Если true, вместо дерева options будет отображен плейсхолдер с ошибкой
32
- */
33
- isLoadingError?: boolean;
34
- /**
35
- * Текст ошибки при загрузке данных
36
- */
37
- loadingErrorMsg?: string;
38
- /**
39
- * Предназначен для конфигурации всплывающего окна
40
- */
41
- dialogProps: Omit<DialogProps, 'open' | 'onClose'>;
42
- /**
43
- * Предназначен для конфигурации дерева опций
44
- */
45
- treeProps?: TreeAutocompleteTreeProps;
46
- /**
47
- * Функция обработки нажатия на кнопку "Повторить запрос"
48
- */
49
- onRetry?: () => void;
50
- /**
51
- * Функция для поиска элементов по дереву, если не определено, то будет использован встроенный поиск
52
- */
53
- filterOptions?: (node: TreeListData, searchValue: string) => boolean;
54
- /**
55
- * Функция, которая запускается при выборе item
56
- */
57
- onChange?: (newValue: TreeAutocompleteValue | undefined) => void;
58
- } & Omit<TextFieldProps, 'autoComplete' | 'defaultValue' | 'select' | 'error' | 'disabled' | 'multiline' | 'rows' | 'maxRows' | 'minRows' | 'SelectProps' | 'endAdornment' | 'onChange'>;
2
+ import type { TreeAutocompleteProps } from './types';
59
3
  export declare const TreeAutocomplete: import("react").ForwardRefExoticComponent<Omit<TreeAutocompleteProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -1 +1,57 @@
1
+ import type { DialogProps } from '../Dialog';
2
+ import type { TextFieldProps } from '../TextField';
3
+ import type { TreeListData, TreeListProps } from '../Tree';
1
4
  export type TreeAutocompleteValue = string;
5
+ export type TreeAutocompleteTreeProps = Pick<TreeListProps, 'disabledItems' | 'renderItem'>;
6
+ export type TreeAutocompleteProps = {
7
+ /**
8
+ * Выбранное значения
9
+ */
10
+ value?: TreeAutocompleteValue;
11
+ /**
12
+ * Опции, которые необходимо отобразить в виде дерева.
13
+ */
14
+ options: TreeListData[];
15
+ /**
16
+ * Если true, поля будут недоступны для взаимодействия
17
+ */
18
+ isDisabled?: boolean;
19
+ /**
20
+ * Если true, поля будут подсвечены, как содержащие ошибку
21
+ */
22
+ isError?: boolean;
23
+ /**
24
+ * Флаг загрузки options
25
+ * Если true, вместо дерева options будет отображен лоадер
26
+ */
27
+ isLoading?: boolean;
28
+ /**
29
+ * Флаг ошибки загрузки options
30
+ * Если true, вместо дерева options будет отображен плейсхолдер с ошибкой
31
+ */
32
+ isLoadingError?: boolean;
33
+ /**
34
+ * Текст ошибки при загрузке данных
35
+ */
36
+ loadingErrorMsg?: string;
37
+ /**
38
+ * Предназначен для конфигурации всплывающего окна
39
+ */
40
+ dialogProps: Omit<DialogProps, 'open' | 'onClose'>;
41
+ /**
42
+ * Предназначен для конфигурации дерева опций
43
+ */
44
+ treeProps?: TreeAutocompleteTreeProps;
45
+ /**
46
+ * Функция обработки нажатия на кнопку "Повторить запрос"
47
+ */
48
+ onRetry?: () => void;
49
+ /**
50
+ * Функция для поиска элементов по дереву, если не определено, то будет использован встроенный поиск
51
+ */
52
+ filterOptions?: (node: TreeListData, searchValue: string) => boolean;
53
+ /**
54
+ * Функция, которая запускается при выборе item
55
+ */
56
+ onChange?: (newValue: TreeAutocompleteValue | undefined) => void;
57
+ } & Omit<TextFieldProps, 'autoComplete' | 'defaultValue' | 'select' | 'error' | 'disabled' | 'multiline' | 'rows' | 'maxRows' | 'minRows' | 'SelectProps' | 'endAdornment' | 'onChange'>;
@@ -1,5 +1,5 @@
1
1
  import { type FocusEvent, type KeyboardEvent, type SyntheticEvent } from 'react';
2
- import { type TreeAutocompleteProps } from '../TreeAutocomplete';
2
+ import type { TreeAutocompleteProps } from '../types';
3
3
  type UseLogicProps = TreeAutocompleteProps;
4
4
  export declare const useLogic: ({ value, options, onBlur }: UseLogicProps) => {
5
5
  inputProps: {
@@ -15,13 +15,13 @@ exports.Input = void 0;
15
15
  const jsx_runtime_1 = require("react/jsx-runtime");
16
16
  const react_1 = require("react");
17
17
  const icons_1 = require("../../../icons");
18
- const Loader_1 = require("../../Loader");
18
+ const IconButton_1 = require("../../IconButton");
19
19
  const constants_1 = require("./constants");
20
20
  const styles_1 = require("./styles");
21
21
  const useLogic_1 = require("./useLogic");
22
- const ClearButton = ({ disabled, onClick }) => ((0, jsx_runtime_1.jsx)(styles_1.StyledIconButton, { variant: "text", disabled: disabled, title: constants_1.CLEAR_TEXT, "aria-label": constants_1.CLEAR_TEXT, onClick: onClick, children: (0, jsx_runtime_1.jsx)(styles_1.StyledCircleErrorFillSm, {}) }));
22
+ const ClearButton = ({ disabled, onClick }) => ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { variant: "text", color: "grey", disabled: disabled, title: constants_1.CLEAR_TEXT, "aria-label": constants_1.CLEAR_TEXT, onClick: onClick, children: (0, jsx_runtime_1.jsx)(icons_1.CrossOutlineMd, {}) }));
23
23
  exports.Input = (0, react_1.forwardRef)((props, forwardedRef) => {
24
24
  const { textFieldProps, isVisibleTagsList, isVisibleClearButton, handleChange, handleClearAll, } = (0, useLogic_1.useLogic)(props);
25
25
  const { value, valueToRender, disabled, isLoading, onChange, onClick } = props, restProps = __rest(props, ["value", "valueToRender", "disabled", "isLoading", "onChange", "onClick"]);
26
- return ((0, jsx_runtime_1.jsx)(styles_1.StyledTextField, Object.assign({}, restProps, { ref: forwardedRef, disabled: disabled, inputProps: { readOnly: true }, startAdornment: isVisibleTagsList && ((0, jsx_runtime_1.jsx)(styles_1.StyledTagsList, { data: valueToRender, keyId: "id", isDisabled: disabled, getOptionLabel: (option) => option.label, onClick: onClick, onChange: handleChange })), endAdornment: (0, jsx_runtime_1.jsxs)(styles_1.EndAdornmentWrapper, { children: [isLoading && (0, jsx_runtime_1.jsx)(Loader_1.Loader, {}), isVisibleClearButton && ((0, jsx_runtime_1.jsx)(ClearButton, { disabled: disabled, onClick: handleClearAll })), (0, jsx_runtime_1.jsx)(styles_1.StyledIconButton, { variant: "text", disabled: disabled, children: (0, jsx_runtime_1.jsx)(icons_1.ChevronDOutlineMd, {}) })] }), onClick: onClick }, textFieldProps)));
26
+ return ((0, jsx_runtime_1.jsx)(styles_1.StyledTextField, Object.assign({}, restProps, { ref: forwardedRef, disabled: disabled, inputProps: { readOnly: true }, startAdornment: isVisibleTagsList && ((0, jsx_runtime_1.jsx)(styles_1.StyledTagsList, { data: valueToRender, keyId: "id", isDisabled: disabled, getOptionLabel: (option) => option.label, onClick: onClick, onChange: handleChange })), endAdornment: (0, jsx_runtime_1.jsxs)(styles_1.EndAdornmentWrapper, { children: [isLoading && (0, jsx_runtime_1.jsx)(styles_1.StyledLoader, {}), isVisibleClearButton && ((0, jsx_runtime_1.jsx)(ClearButton, { disabled: disabled, onClick: handleClearAll })), (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { variant: "text", color: "grey", disabled: disabled, children: (0, jsx_runtime_1.jsx)(icons_1.DownOutlineMd, {}) })] }), onClick: onClick }, textFieldProps)));
27
27
  });
@@ -9,30 +9,6 @@ export declare const EndAdornmentWrapper: import("@emotion/styled").StyledCompon
9
9
  theme?: import("@emotion/react").Theme | undefined;
10
10
  as?: import("react").ElementType<any> | undefined;
11
11
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
12
- export declare const StyledIconButton: import("@emotion/styled").StyledComponent<Omit<import("../..").WithoutEmotionSpecific<import("@mui/material").ButtonProps>, "color" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "variant"> & {
13
- variant?: "link" | "outlined" | "text" | "contained" | "light" | undefined;
14
- loading?: boolean | undefined;
15
- color?: "grey" | "primary" | "error" | "warning" | "success" | undefined;
16
- component?: import("react").ElementType | undefined;
17
- selected?: boolean | undefined;
18
- } & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
19
- ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
20
- }, ""> & import("react").RefAttributes<HTMLButtonElement> & {
21
- theme?: import("@emotion/react").Theme | undefined;
22
- }, {}, {}>;
23
- export declare const StyledCircleErrorFillSm: import("@emotion/styled").StyledComponent<{
24
- children?: import("react").ReactNode;
25
- classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
26
- color?: import("@mui/types").OverridableStringUnion<"action" | "inherit" | "info" | "primary" | "secondary" | "error" | "warning" | "success" | "disabled", import("@mui/material").SvgIconPropsColorOverrides> | undefined;
27
- fontSize?: import("@mui/types").OverridableStringUnion<"small" | "inherit" | "medium" | "large", import("@mui/material").SvgIconPropsSizeOverrides> | undefined;
28
- htmlColor?: string | undefined;
29
- inheritViewBox?: boolean | undefined;
30
- shapeRendering?: string | undefined;
31
- sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
32
- titleAccess?: string | undefined;
33
- viewBox?: string | undefined;
34
- } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").SVGProps<SVGSVGElement>, "ref"> & {
35
- ref?: ((instance: SVGSVGElement | null) => void) | import("react").RefObject<SVGSVGElement> | null | undefined;
36
- }, "color" | "fontSize" | "shapeRendering" | "children" | "sx" | keyof import("@mui/material/OverridableComponent").CommonProps | "htmlColor" | "inheritViewBox" | "titleAccess" | "viewBox"> & {
12
+ export declare const StyledLoader: import("@emotion/styled").StyledComponent<import("../../Loader").LoaderProps & {
37
13
  theme?: import("@emotion/react").Theme | undefined;
38
14
  }, {}, {}>;
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StyledCircleErrorFillSm = exports.StyledIconButton = exports.EndAdornmentWrapper = exports.StyledTagsList = exports.StyledTextField = void 0;
3
+ exports.StyledLoader = exports.EndAdornmentWrapper = exports.StyledTagsList = exports.StyledTextField = void 0;
4
4
  const material_1 = require("@mui/material");
5
- const icons_1 = require("../../../icons");
6
- const IconButton_1 = require("../../IconButton");
5
+ const Loader_1 = require("../../Loader");
7
6
  const styles_1 = require("../../styles");
8
7
  const TagsList_1 = require("../../TagsList");
9
8
  const TextField_1 = require("../../TextField");
@@ -17,9 +16,8 @@ const hiddenInputClass = (0, styles_1.css) `
17
16
  exports.StyledTextField = (0, styles_1.styled)(TextField_1.TextField, {
18
17
  shouldForwardProp: (prop) => !['$isHidden'].includes(prop),
19
18
  }) `
20
- min-width: 400px;
21
-
22
19
  .${material_1.inputBaseClasses.root} {
20
+ height: 40px;
23
21
  padding-top: ${({ theme }) => theme.spacing(1)};
24
22
  padding-bottom: ${({ theme }) => theme.spacing(1)};
25
23
  }
@@ -38,24 +36,13 @@ exports.StyledTagsList = (0, styles_1.styled)(TagsList_1.TagsList) `
38
36
  `;
39
37
  exports.EndAdornmentWrapper = styles_1.styled.div `
40
38
  display: flex;
39
+ gap: ${({ theme }) => theme.spacing(1)};
41
40
  align-items: center;
42
41
 
43
42
  margin-left: auto;
43
+ padding-left: ${({ theme }) => theme.spacing(1)};
44
44
  `;
45
- exports.StyledIconButton = (0, styles_1.styled)(IconButton_1.IconButton) `
46
- background-color: transparent;
47
-
48
- &:hover {
49
- background-color: transparent;
50
-
51
- svg {
52
- fill: ${({ theme }) => theme.palette.grey['700']};
53
- }
54
- }
55
- `;
56
- exports.StyledCircleErrorFillSm = (0, styles_1.styled)(icons_1.CircleErrorFillSm) `
57
- width: 16px;
58
- height: 16px;
59
-
60
- fill: ${({ theme }) => theme.palette.grey['500']};
45
+ exports.StyledLoader = (0, styles_1.styled)(Loader_1.Loader) `
46
+ width: 20px;
47
+ height: 20px;
61
48
  `;
@@ -6,5 +6,5 @@ const Button_1 = require("../../../Button");
6
6
  const Typography_1 = require("../../../Typography");
7
7
  const styles_1 = require("./styles");
8
8
  const DEFAULT_ERROR_MSG = 'Не удалось загрузить данные';
9
- const ErrorMessage = ({ loadingErrorMsg = DEFAULT_ERROR_MSG, onRetry, }) => ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { children: [(0, jsx_runtime_1.jsx)(Typography_1.Typography, { color: "textSecondary", children: loadingErrorMsg }), onRetry && (0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: onRetry, children: "\u041F\u043E\u043F\u0440\u043E\u0431\u043E\u0432\u0430\u0442\u044C \u0441\u043D\u043E\u0432\u0430" })] }));
9
+ const ErrorMessage = ({ loadingErrorMsg = DEFAULT_ERROR_MSG, onRetry, }) => ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { children: [(0, jsx_runtime_1.jsx)(Typography_1.Typography, { color: "grey", children: loadingErrorMsg }), onRetry && ((0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: onRetry, variant: "light", color: "grey", children: "\u041F\u043E\u043F\u0440\u043E\u0431\u043E\u0432\u0430\u0442\u044C \u0441\u043D\u043E\u0432\u0430" }))] }));
10
10
  exports.ErrorMessage = ErrorMessage;
@@ -16,6 +16,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
16
16
  const Button_1 = require("../../Button");
17
17
  const Dialog_1 = require("../../Dialog");
18
18
  const DialogActions_1 = require("../../DialogActions");
19
+ const ScrollWrapper_1 = require("../../ScrollWrapper");
19
20
  const SearchField_1 = require("../../SearchField");
20
21
  const TreeLikeList_1 = require("../../TreeLikeList");
21
22
  const ErrorMessage_1 = require("./ErrorMessage");
@@ -38,6 +39,6 @@ const OptionsModal = (props) => {
38
39
  }
39
40
  return ((0, jsx_runtime_1.jsx)(TreeLikeList_1.TreeLikeList, Object.assign({ isConfirmChildrenSelection: isConfirmChildrenSelection }, treeProps, treeLikeListProps)));
40
41
  };
41
- return ((0, jsx_runtime_1.jsxs)(Dialog_1.Dialog, Object.assign({}, externalDialogProps, { disableRestoreFocus: true, open: isOpen }, modalProps, { children: [(0, jsx_runtime_1.jsxs)(styles_1.StyledDialogContent, { children: [(0, jsx_runtime_1.jsx)(SearchField_1.SearchField, Object.assign({ fullWidth: true }, searchFieldProps)), (0, jsx_runtime_1.jsx)(styles_1.TreeListWrapper, { children: renderComponent() })] }), (0, jsx_runtime_1.jsxs)(DialogActions_1.DialogActions, { children: [(0, jsx_runtime_1.jsx)(Button_1.Button, Object.assign({ variant: "text" }, cancelButtonProps, { children: "\u041E\u0442\u043C\u0435\u043D\u0430" })), (0, jsx_runtime_1.jsx)(Button_1.Button, Object.assign({}, confirmButtonProps, { children: "\u0412\u044B\u0431\u0440\u0430\u0442\u044C" }))] })] })));
42
+ return ((0, jsx_runtime_1.jsxs)(Dialog_1.Dialog, Object.assign({}, externalDialogProps, { disableRestoreFocus: true, open: isOpen }, modalProps, { children: [(0, jsx_runtime_1.jsxs)(styles_1.StyledDialogContent, { children: [(0, jsx_runtime_1.jsx)(SearchField_1.SearchField, Object.assign({ fullWidth: true }, searchFieldProps)), (0, jsx_runtime_1.jsx)(ScrollWrapper_1.ScrollWrapper, { children: (0, jsx_runtime_1.jsx)(styles_1.TreeListWrapper, { children: renderComponent() }) })] }), (0, jsx_runtime_1.jsxs)(DialogActions_1.DialogActions, { children: [(0, jsx_runtime_1.jsx)(Button_1.Button, Object.assign({ variant: "text" }, cancelButtonProps, { children: "\u041E\u0442\u043C\u0435\u043D\u0430" })), (0, jsx_runtime_1.jsx)(Button_1.Button, Object.assign({}, confirmButtonProps, { children: "\u0412\u044B\u0431\u0440\u0430\u0442\u044C" }))] })] })));
42
43
  };
43
44
  exports.OptionsModal = OptionsModal;
@@ -7,7 +7,7 @@ exports.StyledDialogContent = (0, styles_1.styled)(DialogContent_1.DialogContent
7
7
  display: grid;
8
8
  grid-template-columns: 100%;
9
9
  grid-template-rows: max-content 1fr;
10
- gap: ${({ theme }) => theme.spacing(5)};
10
+ gap: ${({ theme }) => theme.spacing(4)};
11
11
 
12
12
  width: 100%;
13
13
  height: 500px;
@@ -16,9 +16,5 @@ exports.TreeListWrapper = styles_1.styled.div `
16
16
  overflow: auto;
17
17
 
18
18
  min-width: 500px;
19
- padding: ${({ theme }) => theme.spacing(2, 0)};
20
-
21
- background-color: ${({ theme }) => theme.palette.background.element};
22
- border: 2px solid ${({ theme }) => theme.palette.grey[300]};
23
- border-radius: 3px;
19
+ height: 100%;
24
20
  `;
@@ -1,64 +1,3 @@
1
1
  /// <reference types="react" />
2
- import { type DialogProps } from '../Dialog';
3
- import { type TextFieldProps } from '../TextField';
4
- import { type TreeListData, type TreeListProps } from '../Tree';
5
- import type { TreeLikeAutocompleteValue, TreeLikeListAutocompleteData } from './types';
6
- export type TreeLikeAutocompleteTreeProps = Pick<TreeListProps, 'disabledItems' | 'renderItem'>;
7
- export type TreeLikeAutocompleteProps = {
8
- /**
9
- * Выбранное значения
10
- */
11
- value?: TreeLikeAutocompleteValue;
12
- /**
13
- * Опции, которые необходимо отобразить в виде дерева.
14
- */
15
- options: TreeLikeListAutocompleteData[];
16
- /**
17
- * Если true, при выборе родителя будет возможность выбора дочерних элементов
18
- * @default true
19
- */
20
- isConfirmChildrenSelection?: boolean;
21
- /**
22
- * Если true, поля будут недоступны для взаимодействия
23
- */
24
- isDisabled?: boolean;
25
- /**
26
- * Если true, поля будут подсвечены, как содержащие ошибку
27
- */
28
- isError?: boolean;
29
- /**
30
- * Флаг загрузки options
31
- * Если true, вместо дерева options будет отображен лоадер
32
- */
33
- isLoading?: boolean;
34
- /**
35
- * Флаг ошибки загрузки options
36
- * Если true, вместо дерева options будет отображен плейсхолдер с ошибкой
37
- */
38
- isLoadingError?: boolean;
39
- /**
40
- * Текст ошибки при загрузке данных
41
- */
42
- loadingErrorMsg?: string;
43
- /**
44
- * Предназначен для конфигурации всплывающего окна
45
- */
46
- dialogProps: Omit<DialogProps, 'open' | 'onClose'>;
47
- /**
48
- * Предназначен для конфигурации дерева опций
49
- */
50
- treeProps?: TreeLikeAutocompleteTreeProps;
51
- /**
52
- * Функция обработки нажатия на кнопку "Повторить запрос"
53
- */
54
- onRetry?: () => void;
55
- /**
56
- * Функция для поиска элементов по дереву, если не определено, то будет использован встроенный поиск
57
- */
58
- filterOptions?: (node: TreeListData, searchValue: string) => boolean;
59
- /**
60
- * Функция, которая запускается при выборе item
61
- */
62
- onChange?: (newValue: TreeLikeAutocompleteValue | undefined) => void;
63
- } & Omit<TextFieldProps, 'autoComplete' | 'defaultValue' | 'select' | 'error' | 'disabled' | 'multiline' | 'rows' | 'maxRows' | 'minRows' | 'SelectProps' | 'endAdornment' | 'onChange'>;
2
+ import type { TreeLikeAutocompleteProps } from './types';
64
3
  export declare const TreeLikeAutocomplete: import("react").ForwardRefExoticComponent<Omit<TreeLikeAutocompleteProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,4 +1,6 @@
1
- import { type TreeListData } from '../Tree';
1
+ import type { DialogProps } from '../Dialog';
2
+ import type { TextFieldProps } from '../TextField';
3
+ import { type TreeListData, type TreeListProps } from '../Tree';
2
4
  export type TreeLikeAutocompleteValue = string[];
3
5
  export type TreeLikeListAutocompleteData = Omit<TreeListData, 'label' | 'children'> & {
4
6
  /**
@@ -10,3 +12,61 @@ export type TreeLikeListAutocompleteData = Omit<TreeListData, 'label' | 'childre
10
12
  */
11
13
  children?: TreeLikeListAutocompleteData[];
12
14
  };
15
+ export type TreeLikeAutocompleteTreeProps = Pick<TreeListProps, 'disabledItems' | 'renderItem'>;
16
+ export type TreeLikeAutocompleteProps = {
17
+ /**
18
+ * Выбранное значения
19
+ */
20
+ value?: TreeLikeAutocompleteValue;
21
+ /**
22
+ * Опции, которые необходимо отобразить в виде дерева.
23
+ */
24
+ options: TreeLikeListAutocompleteData[];
25
+ /**
26
+ * Если true, при выборе родителя будет возможность выбора дочерних элементов
27
+ * @default true
28
+ */
29
+ isConfirmChildrenSelection?: boolean;
30
+ /**
31
+ * Если true, поля будут недоступны для взаимодействия
32
+ */
33
+ isDisabled?: boolean;
34
+ /**
35
+ * Если true, поля будут подсвечены, как содержащие ошибку
36
+ */
37
+ isError?: boolean;
38
+ /**
39
+ * Флаг загрузки options
40
+ * Если true, вместо дерева options будет отображен лоадер
41
+ */
42
+ isLoading?: boolean;
43
+ /**
44
+ * Флаг ошибки загрузки options
45
+ * Если true, вместо дерева options будет отображен плейсхолдер с ошибкой
46
+ */
47
+ isLoadingError?: boolean;
48
+ /**
49
+ * Текст ошибки при загрузке данных
50
+ */
51
+ loadingErrorMsg?: string;
52
+ /**
53
+ * Предназначен для конфигурации всплывающего окна
54
+ */
55
+ dialogProps: Omit<DialogProps, 'open' | 'onClose'>;
56
+ /**
57
+ * Предназначен для конфигурации дерева опций
58
+ */
59
+ treeProps?: TreeLikeAutocompleteTreeProps;
60
+ /**
61
+ * Функция обработки нажатия на кнопку "Повторить запрос"
62
+ */
63
+ onRetry?: () => void;
64
+ /**
65
+ * Функция для поиска элементов по дереву, если не определено, то будет использован встроенный поиск
66
+ */
67
+ filterOptions?: (node: TreeListData, searchValue: string) => boolean;
68
+ /**
69
+ * Функция, которая запускается при выборе item
70
+ */
71
+ onChange?: (newValue: TreeLikeAutocompleteValue | undefined) => void;
72
+ } & Omit<TextFieldProps, 'autoComplete' | 'defaultValue' | 'select' | 'error' | 'disabled' | 'multiline' | 'rows' | 'maxRows' | 'minRows' | 'SelectProps' | 'endAdornment' | 'onChange'>;
@@ -1,9 +1,9 @@
1
1
  import { type FocusEvent, type KeyboardEvent, type SyntheticEvent } from 'react';
2
- import { type TreeLikeAutocompleteProps } from '../TreeLikeAutocomplete';
2
+ import type { TreeLikeAutocompleteProps } from '../types';
3
3
  type UseLogicProps = TreeLikeAutocompleteProps;
4
4
  export declare const useLogic: ({ value, options, onBlur }: UseLogicProps) => {
5
5
  inputProps: {
6
- valueToRender: import("..").TreeLikeListAutocompleteData[] | undefined;
6
+ valueToRender: import("../types").TreeLikeListAutocompleteData[] | undefined;
7
7
  onBlur: (event: FocusEvent<HTMLInputElement>) => void;
8
8
  onClick: () => void;
9
9
  onKeyDown: (event: KeyboardEvent<HTMLDivElement>) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astral/ui",
3
- "version": "4.0.0-alpha.28",
3
+ "version": "4.0.0-alpha.29",
4
4
  "browser": "./index.js",
5
5
  "main": "./node/index.js",
6
6
  "dependencies": {