@cloud-ru/ds-uikit-product-fields-predefined 1.0.8-preview-6d260fa4.0 → 1.0.8-preview-3405f207.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 +2 -4
- package/dist/cjs/components/FieldChat/types.d.ts +1 -1
- package/dist/cjs/components/FieldSelectCreate/useSelectDataStates.js +1 -1
- package/dist/esm/components/FieldChat/types.d.ts +1 -1
- package/dist/esm/components/FieldSelectCreate/useSelectDataStates.js +2 -2
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +13 -13
- package/src/components/FieldChat/types.ts +1 -2
- package/src/components/FieldSelectCreate/useSelectDataStates.tsx +2 -2
package/README.md
CHANGED
|
@@ -642,8 +642,7 @@ export function FieldDescriptionRHFExample() {
|
|
|
642
642
|
| `required` | `boolean` | `false` | Показать знак обязательности `*` |
|
|
643
643
|
| `resizable` | `boolean` | `true` | Можно ли менять высоту мышкой за нижний угол. Игнорируется при `disabled` или `readonly`. |
|
|
644
644
|
| `showClearButton` | `boolean` | `true` | Кнопка очистки (видна при value && !readonly) |
|
|
645
|
-
| `showCopyButton` | `boolean` | `true` | Кнопка копирования (видна при
|
|
646
|
-
| `showCopyButtonInEditMode` | `boolean` | `false` | Показывать кнопку копирования и в обычном (не readonly) режиме — рядом с кнопкой очистки. <br/> Опция только для textarea: в многострочном поле копирование значения осмысленно и при вводе. |
|
|
645
|
+
| `showCopyButton` | `boolean` | `true` | Кнопка копирования (видна при value && !disabled, независимо от readonly) |
|
|
647
646
|
| `showHintIcon` | `boolean` | — | Отображение статус-иконки у подсказки (по умолчанию `true`) |
|
|
648
647
|
| `size` | `"l"` \| `"m"` \| `"s"` | `m` | Размер |
|
|
649
648
|
| `spellCheck` | `boolean` | — | Проверка орфографии |
|
|
@@ -1258,8 +1257,7 @@ export function FieldDescriptionRHFExample() {
|
|
|
1258
1257
|
| `required` | `boolean` | `false` | Показать знак обязательности `*` |
|
|
1259
1258
|
| `resizable` | `boolean` | `true` | Можно ли менять высоту мышкой за нижний угол. Игнорируется при `disabled` или `readonly`. |
|
|
1260
1259
|
| `showClearButton` | `boolean` | `true` | Кнопка очистки (видна при value && !readonly) |
|
|
1261
|
-
| `showCopyButton` | `boolean` | `true` | Кнопка копирования (видна при
|
|
1262
|
-
| `showCopyButtonInEditMode` | `boolean` | `false` | Показывать кнопку копирования и в обычном (не readonly) режиме — рядом с кнопкой очистки. <br/> Опция только для textarea: в многострочном поле копирование значения осмысленно и при вводе. |
|
|
1260
|
+
| `showCopyButton` | `boolean` | `true` | Кнопка копирования (видна при value && !disabled, независимо от readonly) |
|
|
1263
1261
|
| `showHintIcon` | `boolean` | — | Отображение статус-иконки у подсказки (по умолчанию `true`) |
|
|
1264
1262
|
| `size` | `"l"` \| `"m"` \| `"s"` | `m` | Размер |
|
|
1265
1263
|
| `spellCheck` | `boolean` | — | Проверка орфографии |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AttachmentSquareProps } from '@cloud-ru/ds-attachment';
|
|
2
2
|
import { FileUploadProps } from '@cloud-ru/ds-dropzone';
|
|
3
3
|
import { FieldTextAreaProps } from '@cloud-ru/ds-fields';
|
|
4
|
-
export type FieldChatProps = Omit<FieldTextAreaProps, 'placeholder' | 'hint' | 'label' | 'required' | 'size' | 'spellCheck' | 'footer' | 'minRows' | 'maxRows' | 'showCopyButton' | '
|
|
4
|
+
export type FieldChatProps = Omit<FieldTextAreaProps, 'placeholder' | 'hint' | 'label' | 'required' | 'size' | 'spellCheck' | 'footer' | 'minRows' | 'maxRows' | 'showCopyButton' | 'onKeyDown'> & {
|
|
5
5
|
/** Колбек действия при отправке */
|
|
6
6
|
handleSubmit(value: string): void;
|
|
7
7
|
/** Прикрепление файлов */
|
|
@@ -21,7 +21,7 @@ function useSelectDataStates({ entityName, entityIcon, onRefetch }) {
|
|
|
21
21
|
description: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, utils_1.capitalize)(entityName.plural), " ", t('FieldSelectCreate.noResult'), ".", (0, jsx_runtime_1.jsx)("br", {}), t('FieldSelectCreate.changeRequest'), " ", entityName.single.toLocaleLowerCase()] })),
|
|
22
22
|
},
|
|
23
23
|
errorDataState: {
|
|
24
|
-
icon: { icon: system_1.
|
|
24
|
+
icon: { icon: system_1.CrossCircleSVG, appearance: 'neutral' },
|
|
25
25
|
description: `${t('FieldSelectCreate.loadError')} ${entityName.plural.toLocaleLowerCase()}`,
|
|
26
26
|
footer: onRefetch ? ((0, jsx_runtime_1.jsx)(button_1.Button, { view: button_1.VIEW.Tonal, appearance: button_1.APPEARANCE.Neutral, label: t('FieldSelectCreate.refetch'), icon: (0, jsx_runtime_1.jsx)(system_1.UpdateSVG, {}), iconPosition: button_1.ICON_POSITION.After, onClick: onRefetch, "data-test-id": constants_1.TEST_IDS.fieldSelectCreateRetry })) : undefined,
|
|
27
27
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AttachmentSquareProps } from '@cloud-ru/ds-attachment';
|
|
2
2
|
import { FileUploadProps } from '@cloud-ru/ds-dropzone';
|
|
3
3
|
import { FieldTextAreaProps } from '@cloud-ru/ds-fields';
|
|
4
|
-
export type FieldChatProps = Omit<FieldTextAreaProps, 'placeholder' | 'hint' | 'label' | 'required' | 'size' | 'spellCheck' | 'footer' | 'minRows' | 'maxRows' | 'showCopyButton' | '
|
|
4
|
+
export type FieldChatProps = Omit<FieldTextAreaProps, 'placeholder' | 'hint' | 'label' | 'required' | 'size' | 'spellCheck' | 'footer' | 'minRows' | 'maxRows' | 'showCopyButton' | 'onKeyDown'> & {
|
|
5
5
|
/** Колбек действия при отправке */
|
|
6
6
|
handleSubmit(value: string): void;
|
|
7
7
|
/** Прикрепление файлов */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { APPEARANCE, Button, ICON_POSITION, VIEW } from '@cloud-ru/ds-button';
|
|
3
|
-
import {
|
|
3
|
+
import { CrossCircleSVG, SearchSVG, UpdateSVG } from '@cloud-ru/ds-icons/interface/system';
|
|
4
4
|
import { useMemo } from 'react';
|
|
5
5
|
import { TEST_IDS } from '../../constants.js';
|
|
6
6
|
import { fieldsPredefinedLocale } from '../../locale/index.js';
|
|
@@ -18,7 +18,7 @@ export function useSelectDataStates({ entityName, entityIcon, onRefetch }) {
|
|
|
18
18
|
description: (_jsxs(_Fragment, { children: [capitalize(entityName.plural), " ", t('FieldSelectCreate.noResult'), ".", _jsx("br", {}), t('FieldSelectCreate.changeRequest'), " ", entityName.single.toLocaleLowerCase()] })),
|
|
19
19
|
},
|
|
20
20
|
errorDataState: {
|
|
21
|
-
icon: { icon:
|
|
21
|
+
icon: { icon: CrossCircleSVG, appearance: 'neutral' },
|
|
22
22
|
description: `${t('FieldSelectCreate.loadError')} ${entityName.plural.toLocaleLowerCase()}`,
|
|
23
23
|
footer: onRefetch ? (_jsx(Button, { view: VIEW.Tonal, appearance: APPEARANCE.Neutral, label: t('FieldSelectCreate.refetch'), icon: _jsx(UpdateSVG, {}), iconPosition: ICON_POSITION.After, onClick: onRefetch, "data-test-id": TEST_IDS.fieldSelectCreateRetry })) : undefined,
|
|
24
24
|
},
|