quickblox-react-ui-kit 0.3.1 → 0.4.0-beta.1
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/CommonTypes/CommonTypes.d.ts +1 -0
- package/dist/Data/source/remote/IRemoteDataSource.d.ts +4 -0
- package/dist/Data/source/remote/RemoteDataSource.d.ts +4 -1
- package/dist/Domain/use_cases/ai/AIAnswerAssistWithSDKUseCase.d.ts +11 -0
- package/dist/Domain/use_cases/ai/AITranslateWithSDKUseCase.d.ts +12 -0
- package/dist/Presentation/Views/Dialog/AIWidgets/UseDefaultAIAssistAnswerWidgetWithSDK.d.ts +3 -0
- package/dist/Presentation/Views/Dialog/AIWidgets/UseDefaultAITranslateWidgetWithSDK.d.ts +3 -0
- package/dist/Presentation/ui-components/TextField/TextField.d.ts +1 -1
- package/dist/index-ui.js +489 -4
- package/dist/index-ui.js.map +1 -1
- package/dist/qb-api-calls/index.d.ts +6 -1
- package/package.json +2 -2
- package/src/CommonTypes/CommonTypes.ts +1 -0
- package/src/Data/DefaultConfigurations.ts +4 -1
- package/src/Data/repository/ConnectionRepository.ts +2 -1
- package/src/Data/source/remote/IRemoteDataSource.ts +17 -0
- package/src/Data/source/remote/RemoteDataSource.ts +22 -0
- package/src/Domain/use_cases/ai/AIAnswerAssistWithSDKUseCase.ts +52 -0
- package/src/Domain/use_cases/ai/AITranslateWithSDKUseCase.ts +107 -0
- package/src/Presentation/Views/Dialog/AIWidgets/UseDefaultAIAssistAnswerWidgetWithSDK.tsx +66 -0
- package/src/Presentation/Views/Dialog/AIWidgets/UseDefaultAITranslateWidgetWithSDK.tsx +70 -0
- package/src/Presentation/layouts/Desktop/QuickBloxUIKitDesktopLayout.tsx +14 -2
- package/src/QBconfig.ts +3 -0
- package/src/package_artan_react_ui.json +91 -0
- package/src/package_original.json +115 -0
- package/src/qb-api-calls/index.ts +48 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AIChatHistory } from 'quickblox';
|
|
1
2
|
import { RemoteDialogDTO } from '../../dto/dialog/RemoteDialogDTO';
|
|
2
3
|
import { RemoteDialogsDTO } from '../../dto/dialog/RemoteDialogsDTO';
|
|
3
4
|
import { RemoteUserDTO } from '../../dto/user/RemoteUserDTO';
|
|
@@ -8,6 +9,7 @@ import { RemoteFileDTO } from '../../dto/file/RemoteFileDTO';
|
|
|
8
9
|
import { Pagination } from '../../../Domain/repository/Pagination';
|
|
9
10
|
import { CallBackFunction } from '../../../Domain/use_cases/base/IUseCase';
|
|
10
11
|
import { NotificationTypes } from '../../../Domain/entity/NotificationTypes';
|
|
12
|
+
import { AIAnswerResponse } from "../../../qb-api-calls";
|
|
11
13
|
export interface IRemoteMessaging<TArg> {
|
|
12
14
|
subscribeOnSystemMessaging(notificationType: NotificationTypes, callback: CallBackFunction<TArg>): void;
|
|
13
15
|
subscribeOnMessaging(callback: CallBackFunction<TArg>): void;
|
|
@@ -34,4 +36,6 @@ export interface IRemoteDataSource extends IRemoteMessaging<RemoteMessageDTO> {
|
|
|
34
36
|
deleteFile(dto: RemoteFileDTO): Promise<void>;
|
|
35
37
|
subscribeToChatConnectionEvents(fileId: string): Promise<void>;
|
|
36
38
|
updateCurrentDialog(dto: RemoteDialogDTO): void;
|
|
39
|
+
createAnswer(text: string, messages: AIChatHistory, smartChatAssistantId: string): Promise<AIAnswerResponse>;
|
|
40
|
+
translate(text: string, languageCode: string, smartChatAssistantId: string): Promise<AIAnswerResponse>;
|
|
37
41
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AIChatHistory } from 'quickblox/quickblox';
|
|
1
2
|
import { RemoteDialogDTO } from '../../dto/dialog/RemoteDialogDTO';
|
|
2
3
|
import { RemoteDialogsDTO } from '../../dto/dialog/RemoteDialogsDTO';
|
|
3
4
|
import { RemoteMessageDTO } from '../../dto/message/RemoteMessageDTO';
|
|
@@ -7,7 +8,7 @@ import { RemoteMessagesDTO } from '../../dto/message/RemoteMessagesDTO';
|
|
|
7
8
|
import { RemoteFileDTO } from '../../dto/file/RemoteFileDTO';
|
|
8
9
|
import { Pagination } from '../../../Domain/repository/Pagination';
|
|
9
10
|
import { IDTOMapper } from './Mapper/IDTOMapper';
|
|
10
|
-
import { QBInitParams } from '../../../qb-api-calls';
|
|
11
|
+
import { AIAnswerResponse, QBInitParams } from '../../../qb-api-calls';
|
|
11
12
|
import { NotificationTypes } from '../../../Domain/entity/NotificationTypes';
|
|
12
13
|
import { SubscriptionPerformer } from '../../../Domain/use_cases/base/Subscribable/SubscriptionPerformer';
|
|
13
14
|
import { CallBackFunction } from '../../../Domain/use_cases/base/IUseCase';
|
|
@@ -44,6 +45,8 @@ export declare class RemoteDataSource implements IRemoteDataSource {
|
|
|
44
45
|
private currentDialog;
|
|
45
46
|
getCurrentDialogDTOMapper(): IDTOMapper;
|
|
46
47
|
constructor();
|
|
48
|
+
createAnswer(text: string, messages: AIChatHistory, smartChatAssistantId: string): Promise<AIAnswerResponse>;
|
|
49
|
+
translate(text: string, languageCode: string, smartChatAssistantId: string): Promise<AIAnswerResponse>;
|
|
47
50
|
updateCurrentDialog(dto: RemoteDialogDTO): Promise<void>;
|
|
48
51
|
setUpMockStorage(): Promise<void>;
|
|
49
52
|
private createUserSession;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IChatMessage } from '../../../Data/source/AISource';
|
|
2
|
+
import { IUseCase } from '../base/IUseCase';
|
|
3
|
+
import { IRemoteDataSource } from '../../../Data/source/remote/IRemoteDataSource';
|
|
4
|
+
export declare class AIAnswerAssistWithSDKUseCase implements IUseCase<void, string> {
|
|
5
|
+
private textToSend;
|
|
6
|
+
private dialogMessages;
|
|
7
|
+
private dataSource;
|
|
8
|
+
private smartChatAssistantId;
|
|
9
|
+
constructor(textToSend: string, dialogMessages: IChatMessage[], dataSource: IRemoteDataSource, smartChatAssistantId: string);
|
|
10
|
+
execute(): Promise<string>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IUseCase } from '../base/IUseCase';
|
|
2
|
+
import { IRemoteDataSource } from '../../../Data/source/remote/IRemoteDataSource';
|
|
3
|
+
export declare class AITranslateWithSDKUseCase implements IUseCase<void, string> {
|
|
4
|
+
private languageCodes;
|
|
5
|
+
private textToSend;
|
|
6
|
+
private language;
|
|
7
|
+
private dataSource;
|
|
8
|
+
private smartChatAssistantId;
|
|
9
|
+
constructor(textToSend: string, language: string, dataSource: IRemoteDataSource, smartChatAssistantId: string);
|
|
10
|
+
getLanguageCode(language: string): string;
|
|
11
|
+
execute(): Promise<string>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { AIMessageWidget } from './AIMessageWidget';
|
|
2
|
+
import { RemoteDataSource } from '../../../../Data/source/remote/RemoteDataSource';
|
|
3
|
+
export default function UseDefaultAIAssistAnswerWidgetWithSDK(dataSource: RemoteDataSource, smartChatAssistantId: string): AIMessageWidget;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { AIMessageWidget } from './AIMessageWidget';
|
|
2
|
+
import { RemoteDataSource } from '../../../../Data/source/remote/RemoteDataSource';
|
|
3
|
+
export default function UseDefaultAITranslateWidgetWithSDK(dataSource: RemoteDataSource, smartChatAssistantId: string): AIMessageWidget;
|
|
@@ -9,5 +9,5 @@ interface TextFieldProps extends Omit<HTMLInputProps, 'onChange'> {
|
|
|
9
9
|
value: string;
|
|
10
10
|
onChange: (value: string) => void;
|
|
11
11
|
}
|
|
12
|
-
declare const TextField: import("react").ForwardRefExoticComponent<Pick<TextFieldProps, "id" | "name" | "size" | "type" | "value" | "children" | "form" | "label" | "slot" | "style" | "title" | "pattern" | "
|
|
12
|
+
declare const TextField: import("react").ForwardRefExoticComponent<Pick<TextFieldProps, "id" | "name" | "size" | "type" | "value" | "children" | "loading" | "form" | "label" | "slot" | "style" | "title" | "pattern" | "width" | "hidden" | "color" | "icon" | "multiple" | "disabled" | "className" | "onClick" | "key" | "height" | "translate" | "onChange" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "enterKeyHint" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "list" | "max" | "maxLength" | "min" | "minLength" | "placeholder" | "readOnly" | "required" | "src" | "step" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
13
13
|
export default TextField;
|