@inploi/plugin-chatbot 3.6.5 → 3.8.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/cdn/index.js +28 -32
- package/dist/chatbot.d.ts +2 -2
- package/dist/chatbot.dom.d.ts +1 -2
- package/dist/chatbot.state.d.ts +7 -7
- package/dist/chatbot.utils.d.ts +10 -5
- package/dist/{index-b130eeef.js → index-b616116f.js} +493 -3429
- package/dist/{index-ebce8046.cjs → index-efb34443.cjs} +493 -3429
- package/dist/interpreter.d.ts +1 -1
- package/dist/{job-application-content-bacb82b9.cjs → job-application-content-8b7e62bb.cjs} +215 -114
- package/dist/{job-application-content-f45a3311.js → job-application-content-b9799966.js} +215 -114
- package/dist/plugin-chatbot.cjs +1 -1
- package/dist/plugin-chatbot.js +1 -1
- package/package.json +6 -4
package/dist/chatbot.d.ts
CHANGED
|
@@ -12,11 +12,11 @@ export declare const chatbotPlugin: ({ _internal_domManager: dom, theme, }: {
|
|
|
12
12
|
hue: number;
|
|
13
13
|
/** Chroma multiplier. Values between 0 and 1.5 work best. */
|
|
14
14
|
chroma?: number;
|
|
15
|
+
mode: 'light' | 'dark';
|
|
15
16
|
};
|
|
16
17
|
/** @deprecated For internal usage only */
|
|
17
18
|
_internal_domManager?: {
|
|
18
|
-
getOrCreateChatbotElement: () =>
|
|
19
|
-
addStyle: (css: string, id: string) => void;
|
|
19
|
+
getOrCreateChatbotElement: () => HTMLElement;
|
|
20
20
|
} | undefined;
|
|
21
21
|
}) => ({ apiClient, logger, analytics }: {
|
|
22
22
|
apiClient: import("@inploi/sdk").ApiClient;
|
package/dist/chatbot.dom.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export declare const createChatbotDomManager: () => {
|
|
2
|
-
getOrCreateChatbotElement: () =>
|
|
3
|
-
addStyle: (css: string, id: string) => void;
|
|
2
|
+
getOrCreateChatbotElement: () => HTMLElement;
|
|
4
3
|
};
|
|
5
4
|
export type ChatbotDomManager = ReturnType<typeof createChatbotDomManager>;
|
package/dist/chatbot.state.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Signal } from '@preact/signals';
|
|
2
2
|
import { JobApplication } from './chatbot.api';
|
|
3
3
|
import { DistributivePick } from './chatbot.utils';
|
|
4
|
-
import { ChatInput } from './
|
|
5
|
-
import { ChatbotInput } from './
|
|
4
|
+
import { ChatInput } from './components/chat-input/chat-input';
|
|
5
|
+
import { ChatbotInput } from './components/chat-input/chat-input';
|
|
6
6
|
export declare const getCacheKey: (application: JobApplication) => string;
|
|
7
7
|
export type ViewState = 'maximised' | 'minimised';
|
|
8
8
|
export declare const viewState: Signal<ViewState>;
|
|
@@ -32,14 +32,14 @@ export declare const application: {
|
|
|
32
32
|
current$: Signal<CurrentApplication>;
|
|
33
33
|
start: (application: JobApplication) => Promise<void>;
|
|
34
34
|
cancel: () => void;
|
|
35
|
-
markAsFinished: () =>
|
|
36
|
-
setCurrentNodeId: (currentNodeId: string) =>
|
|
35
|
+
markAsFinished: () => void;
|
|
36
|
+
setCurrentNodeId: (currentNodeId: string) => void;
|
|
37
37
|
restart: () => void;
|
|
38
|
-
addMessage: (message: ChatMessage, groupId?: string) =>
|
|
38
|
+
addMessage: (message: ChatMessage, groupId?: string) => void;
|
|
39
39
|
/** Removes from the last message backwards, all the messages that have the groupId passed, until it reaches one that doesn't */
|
|
40
40
|
removeLastGroupMessagesById: (groupId: string) => void;
|
|
41
|
-
setSubmission: (fieldKey: string, submission: ApplicationSubmission) =>
|
|
42
|
-
setInput: (input: ChatInput | undefined) =>
|
|
41
|
+
setSubmission: (fieldKey: string, submission: ApplicationSubmission | null) => void;
|
|
42
|
+
setInput: (input: ChatInput | undefined) => void;
|
|
43
43
|
};
|
|
44
44
|
export type MessageAuthor = 'bot' | 'user';
|
|
45
45
|
type SystemMessage = {
|
package/dist/chatbot.utils.d.ts
CHANGED
|
@@ -62,6 +62,7 @@ export declare const getHeadOrThrow: (nodes: FlowNode[]) => {
|
|
|
62
62
|
question: string;
|
|
63
63
|
trueLabel: string;
|
|
64
64
|
falseLabel: string;
|
|
65
|
+
optional: boolean;
|
|
65
66
|
};
|
|
66
67
|
type: "question-boolean";
|
|
67
68
|
isHead?: boolean | undefined;
|
|
@@ -71,6 +72,7 @@ export declare const getHeadOrThrow: (nodes: FlowNode[]) => {
|
|
|
71
72
|
data: {
|
|
72
73
|
key: string;
|
|
73
74
|
question: string;
|
|
75
|
+
optional: boolean;
|
|
74
76
|
format: "text" | "url" | "email" | "phone";
|
|
75
77
|
placeholder?: string | undefined;
|
|
76
78
|
};
|
|
@@ -82,6 +84,7 @@ export declare const getHeadOrThrow: (nodes: FlowNode[]) => {
|
|
|
82
84
|
data: {
|
|
83
85
|
key: string;
|
|
84
86
|
question: string;
|
|
87
|
+
optional: boolean;
|
|
85
88
|
placeholder?: string | undefined;
|
|
86
89
|
decimalCases?: number | undefined;
|
|
87
90
|
min?: number | undefined;
|
|
@@ -110,6 +113,7 @@ export declare const getHeadOrThrow: (nodes: FlowNode[]) => {
|
|
|
110
113
|
data: {
|
|
111
114
|
key: string;
|
|
112
115
|
question: string;
|
|
116
|
+
optional: boolean;
|
|
113
117
|
extensions: string[];
|
|
114
118
|
multiple?: boolean | undefined;
|
|
115
119
|
maxSizeKb?: number | undefined;
|
|
@@ -130,6 +134,7 @@ export declare const getHeadOrThrow: (nodes: FlowNode[]) => {
|
|
|
130
134
|
country: string;
|
|
131
135
|
};
|
|
132
136
|
question: string;
|
|
137
|
+
optional: boolean;
|
|
133
138
|
placeholder?: string | undefined;
|
|
134
139
|
};
|
|
135
140
|
type: "question-address";
|
|
@@ -155,14 +160,14 @@ export declare const getHeadOrThrow: (nodes: FlowNode[]) => {
|
|
|
155
160
|
isHead?: boolean | undefined;
|
|
156
161
|
nextId?: string | undefined;
|
|
157
162
|
};
|
|
158
|
-
export declare const getApplicationSubmissionsPayload: (submissions: KeyToSubmissionMap) => Record<string, string | string[] | import("./
|
|
159
|
-
export declare const isSubmissionOfType: <T extends "boolean" | "text" | "multiple-choice" | "file">(type: T) => (submission?: ApplicationSubmission) => submission is Extract<Pick<import("./
|
|
163
|
+
export declare const getApplicationSubmissionsPayload: (submissions: KeyToSubmissionMap) => Record<string, string | string[] | import("./components/chat-input/chat-input.file").FileToUpload[] | null>;
|
|
164
|
+
export declare const isSubmissionOfType: <T extends "boolean" | "text" | "multiple-choice" | "file">(type: T) => (submission?: ApplicationSubmission) => submission is Extract<Pick<import("./components/chat-input/chat-input.text").TextPayload, "value" | "type">, {
|
|
160
165
|
type: T;
|
|
161
|
-
}> | Extract<Pick<import("./
|
|
166
|
+
}> | Extract<Pick<import("./components/chat-input/chat-input.multiple-choice").MultipleChoicePayload, "value" | "type">, {
|
|
162
167
|
type: T;
|
|
163
|
-
}> | Extract<Pick<import("./
|
|
168
|
+
}> | Extract<Pick<import("./components/chat-input/chat-input.boolean").BooleanChoicePayload, "value" | "type">, {
|
|
164
169
|
type: T;
|
|
165
|
-
}> | Extract<Pick<import("./
|
|
170
|
+
}> | Extract<Pick<import("./components/chat-input/chat-input.file").FilePayload, "value" | "type">, {
|
|
166
171
|
type: T;
|
|
167
172
|
}>;
|
|
168
173
|
export declare function gzip(string: string): string | Promise<string>;
|