denwa-react-shared 1.0.3 → 1.0.4
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/dist/denwa-react-shared.cjs.js +102 -102
- package/dist/denwa-react-shared.es.js +13960 -13370
- package/dist/denwa-react-shared.umd.js +102 -102
- package/dist/entities/session/model/types.d.ts +2 -2
- package/dist/shared/lib/form.d.ts +39 -1
- package/dist/shared/ui/index.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FileType, IAllImages, IFormImage, IServerImageForm, ITempImages, IUploadImage, IUploadStore } from '../types';
|
|
1
|
+
import { FileType, IAllImages, IFormImage, IServerImageForm, ITempImages, IUploadImage, IUploadStore, Languages } from '../types';
|
|
2
2
|
/**
|
|
3
3
|
* @description Преобразует value у инпута в поле маски телефона
|
|
4
4
|
* @param eventValue - исходное значение инпута
|
|
@@ -79,3 +79,41 @@ export declare const createProfileLabel: ({ fullName, phone, email, }: {
|
|
|
79
79
|
phone?: string | null;
|
|
80
80
|
email?: string | null;
|
|
81
81
|
}) => string;
|
|
82
|
+
/**
|
|
83
|
+
* @description Переводит текст поля на с русского на остальные языки
|
|
84
|
+
* @param {string} name - Название поля без языкового кода. К примеру name
|
|
85
|
+
* @param {Languages} lang - Код языка
|
|
86
|
+
* @param {string | undefined} value - Значение, которое было на исходном языке
|
|
87
|
+
* @param translateText - Функция перевода на другой язык
|
|
88
|
+
*/
|
|
89
|
+
export declare const translateField: ({ name, lang, value, translateText, }: {
|
|
90
|
+
name: string;
|
|
91
|
+
lang: Languages;
|
|
92
|
+
value: string | undefined;
|
|
93
|
+
translateText: (text: string, source: Languages, target: Languages) => Promise<{
|
|
94
|
+
status: number;
|
|
95
|
+
data: {
|
|
96
|
+
data: {
|
|
97
|
+
translatedText: string;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
}>;
|
|
101
|
+
}) => Promise<{
|
|
102
|
+
[key: string]: string;
|
|
103
|
+
}[]>;
|
|
104
|
+
/**
|
|
105
|
+
* @description Переводит alt описание картинок
|
|
106
|
+
* @param {IUploadImage[]} data - Массив с объектами с информацией о картинках
|
|
107
|
+
*/
|
|
108
|
+
export declare const translateImagesAlt: ({ data, mainLang, translateText, }: {
|
|
109
|
+
data: IUploadImage[];
|
|
110
|
+
mainLang: Languages;
|
|
111
|
+
translateText: (text: string, source: Languages, target: Languages) => Promise<{
|
|
112
|
+
status: number;
|
|
113
|
+
data: {
|
|
114
|
+
data: {
|
|
115
|
+
translatedText: string;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
}>;
|
|
119
|
+
}) => Promise<IUploadImage[]>;
|
|
@@ -6,6 +6,8 @@ export * from './image-upload';
|
|
|
6
6
|
export * from './input';
|
|
7
7
|
export * from './input-number';
|
|
8
8
|
export * from './layout-card';
|
|
9
|
+
export * from './material-map';
|
|
9
10
|
export * from './readonly-input';
|
|
11
|
+
export * from './search-input';
|
|
10
12
|
export * from './spin';
|
|
11
13
|
export * from './text-editor';
|