hanbiro-react16-sdk 1.0.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 ADDED
@@ -0,0 +1 @@
1
+ # hanbiro-react16-sdk
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ export interface CustomAiIconProps {
3
+ isGradient?: boolean;
4
+ stroke?: number;
5
+ size?: number;
6
+ }
7
+ declare const CustomAiIcon: React.SFC<CustomAiIconProps>;
8
+ export default CustomAiIcon;
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ interface ListProps {
3
+ items: any[];
4
+ onApply: (params: {
5
+ html: string;
6
+ }) => void;
7
+ getEditorContent?: () => string;
8
+ }
9
+ declare const List: React.SFC<ListProps>;
10
+ export default List;
@@ -0,0 +1,23 @@
1
+ import { LabelValue } from '../../types';
2
+ import * as React from "react";
3
+ interface SettingPopperProps {
4
+ lang: LabelValue | null;
5
+ setLang: (lang: LabelValue | null) => void;
6
+ originalEmail: string;
7
+ setOriginalEmail: (email: string) => void;
8
+ getEditorContent?: () => string;
9
+ }
10
+ interface SettingPopperState {
11
+ open: boolean;
12
+ }
13
+ declare class SettingPopper extends React.Component<SettingPopperProps, SettingPopperState> {
14
+ private containerRef;
15
+ constructor(props: SettingPopperProps);
16
+ componentDidMount(): void;
17
+ componentWillUnmount(): void;
18
+ handleClickOutside: (event: MouseEvent) => void;
19
+ togglePopper: () => void;
20
+ handleLangChange: (e: React.ChangeEvent<HTMLSelectElement>) => void;
21
+ render(): React.JSX.Element;
22
+ }
23
+ export default SettingPopper;
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ interface TypingTextProps {
3
+ data: any;
4
+ style?: React.CSSProperties;
5
+ }
6
+ declare const TypingText: React.SFC<TypingTextProps>;
7
+ export default TypingText;
@@ -0,0 +1,10 @@
1
+ export interface LabelValue {
2
+ label: string;
3
+ value: string;
4
+ }
5
+ export declare const TONE_OPTIONS: LabelValue[];
6
+ export declare const LENGTH_OPTIONS: LabelValue[];
7
+ export interface Lang extends LabelValue {
8
+ extra?: string;
9
+ }
10
+ export declare const LANG_OPTIONS: Lang[];
@@ -0,0 +1,9 @@
1
+ interface Options {
2
+ setContent: (nVal: string) => void;
3
+ setIsLoading: (nVal: boolean) => void;
4
+ setConversationId: (nVal: string) => void;
5
+ signer: any;
6
+ baseUrl: string;
7
+ }
8
+ export declare function callAI(params: any, { setContent, setIsLoading, setConversationId, signer, baseUrl }: Options): Promise<string>;
9
+ export {};
@@ -0,0 +1,37 @@
1
+ import { LabelValue } from '../../types';
2
+ import * as React from "react";
3
+ export interface AIPaneProps {
4
+ getEditorContent?: () => string;
5
+ onApply: (params: {
6
+ html: string;
7
+ }) => void;
8
+ signer?: any;
9
+ baseUrl?: string;
10
+ }
11
+ export interface AIMessage {
12
+ id: string;
13
+ question: string;
14
+ subject: string;
15
+ body: string;
16
+ created_at: number;
17
+ isLoading: boolean;
18
+ }
19
+ interface AIPaneState {
20
+ message: string;
21
+ messages: AIMessage[];
22
+ isSending: boolean;
23
+ lang: LabelValue | null;
24
+ conversationId: string;
25
+ originalEmail: string;
26
+ }
27
+ declare class ChatAIDraft extends React.Component<AIPaneProps, AIPaneState> {
28
+ constructor(props: AIPaneProps);
29
+ setAiContext: (nVal: string) => void;
30
+ handleMessageChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
31
+ handleSubmit: () => Promise<void>;
32
+ handleKeyDown: (event: React.KeyboardEvent<HTMLTextAreaElement>) => void;
33
+ setLang: (lang: LabelValue | null) => void;
34
+ setOriginalEmail: (email: string) => void;
35
+ render(): React.JSX.Element;
36
+ }
37
+ export default ChatAIDraft;
@@ -0,0 +1,2 @@
1
+ export { default as ChatAIDraft } from './ChatAIDraft';
2
+ export * from './ChatAIDraft';
@@ -0,0 +1,4 @@
1
+ import { C as t } from "../index-DuSzMCvF.mjs";
2
+ export {
3
+ t as ChatAIDraft
4
+ };
@@ -0,0 +1 @@
1
+ export * from './components/index'