@inploi/plugin-chatbot 14.17.3 → 14.18.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.
Files changed (96) hide show
  1. package/README.md +10 -1
  2. package/cdn/index.js +34 -6
  3. package/cdn/style.css +1 -1
  4. package/dist/chatbot-body-DjE1hhPI.js +4309 -0
  5. package/dist/chatbot-body-Y8XV3f3-.cjs +5 -0
  6. package/dist/common.geo-transport-CJGUJXTA-BsgnqoTX.js +41 -0
  7. package/dist/common.geo-transport-CJGUJXTA-DQyNyTXw.cjs +1 -0
  8. package/dist/index-C8Gr0Ijn.js +3198 -0
  9. package/dist/index-DSa7ZKqt.cjs +21 -0
  10. package/dist/index.d.cts +547 -0
  11. package/dist/index.d.ts +547 -2
  12. package/dist/plugin-chatbot.cjs +1 -1
  13. package/dist/plugin-chatbot.js +2 -3
  14. package/dist/style.css +1 -1
  15. package/package.json +18 -13
  16. package/dist/accessible-labels.test.d.ts +0 -1
  17. package/dist/chatbot-body-2942441d.cjs +0 -5
  18. package/dist/chatbot-body-73450740.js +0 -4523
  19. package/dist/chatbot.analytics.d.ts +0 -37
  20. package/dist/chatbot.analytics.test.d.ts +0 -1
  21. package/dist/chatbot.api.d.ts +0 -26
  22. package/dist/chatbot.constants.d.ts +0 -2
  23. package/dist/chatbot.context.test.d.ts +0 -1
  24. package/dist/chatbot.d.ts +0 -104
  25. package/dist/chatbot.dom.d.ts +0 -5
  26. package/dist/chatbot.idb.d.ts +0 -73
  27. package/dist/chatbot.lifecycle.test.d.ts +0 -1
  28. package/dist/chatbot.resume.d.ts +0 -15
  29. package/dist/chatbot.resume.test.d.ts +0 -1
  30. package/dist/chatbot.state.d.ts +0 -78
  31. package/dist/chatbot.state.test.d.ts +0 -1
  32. package/dist/chatbot.storage.test.d.ts +0 -1
  33. package/dist/chatbot.utils.d.ts +0 -8
  34. package/dist/components/chat-bubble.d.ts +0 -11
  35. package/dist/components/chat-error.d.ts +0 -3
  36. package/dist/components/chat-input/chat-input.address-countries.test.d.ts +0 -1
  37. package/dist/components/chat-input/chat-input.address.d.ts +0 -5
  38. package/dist/components/chat-input/chat-input.address.test.d.ts +0 -1
  39. package/dist/components/chat-input/chat-input.boolean.d.ts +0 -11
  40. package/dist/components/chat-input/chat-input.constants.d.ts +0 -1
  41. package/dist/components/chat-input/chat-input.d.ts +0 -12
  42. package/dist/components/chat-input/chat-input.file.d.ts +0 -8
  43. package/dist/components/chat-input/chat-input.file.test.d.ts +0 -1
  44. package/dist/components/chat-input/chat-input.multiple-choice.d.ts +0 -4
  45. package/dist/components/chat-input/chat-input.multiple-choice.test.d.ts +0 -1
  46. package/dist/components/chat-input/chat-input.number.d.ts +0 -4
  47. package/dist/components/chat-input/chat-input.phone-number.d.ts +0 -4
  48. package/dist/components/chat-input/chat-input.submit.d.ts +0 -4
  49. package/dist/components/chat-input/chat-input.submit.test.d.ts +0 -1
  50. package/dist/components/chat-input/chat-input.text.d.ts +0 -5
  51. package/dist/components/chat-input/chat-input.text.test.d.ts +0 -1
  52. package/dist/components/chat-input/input-style.d.ts +0 -3
  53. package/dist/components/chat-loading.d.ts +0 -1
  54. package/dist/components/chatbot-body.d.ts +0 -12
  55. package/dist/components/chatbot-body.lifecycle.test.d.ts +0 -1
  56. package/dist/components/chatbot.d.ts +0 -17
  57. package/dist/components/conversation.d.ts +0 -8
  58. package/dist/components/correction.test.d.ts +0 -1
  59. package/dist/components/input-error.d.ts +0 -5
  60. package/dist/components/job-alerts-offer.d.ts +0 -13
  61. package/dist/components/job-alerts-offer.test.d.ts +0 -1
  62. package/dist/components/job-alerts-privacy-line.test.d.ts +0 -1
  63. package/dist/components/loading-indicator.d.ts +0 -3
  64. package/dist/components/message.link.d.ts +0 -5
  65. package/dist/components/palette-debugger.d.ts +0 -1
  66. package/dist/components/send-button.d.ts +0 -3
  67. package/dist/components/skip-button.d.ts +0 -3
  68. package/dist/components/status-bar.d.ts +0 -22
  69. package/dist/components/status-bar.test.d.ts +0 -1
  70. package/dist/components/transition.d.ts +0 -1
  71. package/dist/components/typing-indicator.d.ts +0 -3
  72. package/dist/components/useChatService.d.ts +0 -17
  73. package/dist/components/useChatService.test.d.ts +0 -1
  74. package/dist/components/useFocus.d.ts +0 -1
  75. package/dist/i18n.d.ts +0 -776
  76. package/dist/index-0685e04a.cjs +0 -5
  77. package/dist/index-8df73cbc.js +0 -3530
  78. package/dist/index.cdn.d.ts +0 -9
  79. package/dist/index.dev.d.ts +0 -8
  80. package/dist/interpreter.test.d.ts +0 -1
  81. package/dist/md.d.ts +0 -1
  82. package/dist/md.test.d.ts +0 -1
  83. package/dist/mocks/browser.d.ts +0 -1
  84. package/dist/mocks/flows.mocks.d.ts +0 -77
  85. package/dist/mocks/handlers.d.ts +0 -14
  86. package/dist/mocks/mocks.utils.d.ts +0 -5
  87. package/dist/mocks/pre-apply.mock.d.ts +0 -296
  88. package/dist/phone.test.d.ts +0 -1
  89. package/dist/progress.d.ts +0 -12
  90. package/dist/progress.test.d.ts +0 -1
  91. package/dist/rpc.d.ts +0 -1
  92. package/dist/style/theme.d.ts +0 -3
  93. package/dist/style/theme.utils.d.ts +0 -6
  94. package/dist/style/tokens.d.ts +0 -86
  95. package/dist/widget-version.d.ts +0 -7
  96. package/dist/widget-version.test.d.ts +0 -1
@@ -1,37 +0,0 @@
1
- import { AnalyticsService } from '@inploi/sdk';
2
- import { StartedFlow } from './chatbot.state';
3
-
4
- type ChatbotFunnelEvent = 'FLOW_START' | 'FLOW_INTERACT';
5
- export declare const logChatbotFunnelEvent: (analytics: Pick<AnalyticsService, "log">, flow: StartedFlow, event: ChatbotFunnelEvent) => Promise<import('@inploi/core/common').ResponseObj<{
6
- anonymous_id: string | null;
7
- session_id: string | null;
8
- candidate_id: string | null;
9
- event: import('@inploi/sdk').AnalyticsLogEvent;
10
- sent_at: string;
11
- context: {
12
- library: {
13
- name: "inploi-sdk";
14
- version: string;
15
- };
16
- page: {
17
- href: string;
18
- referrer: string;
19
- title: string;
20
- };
21
- };
22
- properties: {
23
- job: {
24
- id: string;
25
- id_type: "internal" | "external";
26
- } | undefined;
27
- } & {
28
- flow_id: string;
29
- flow_version: number;
30
- flow_session_id: string;
31
- flow_build: number;
32
- } & {
33
- flow_type?: import('@inploi/sdk').FlowType;
34
- };
35
- custom_properties?: Record<string, unknown>;
36
- }>>;
37
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,26 +0,0 @@
1
- import { FlowNode } from '@inploi/core/flows';
2
-
3
- export { FlowByIdPayloadSchema, FlowByJobPayloadSchema, FlowSchema } from '@inploi/flows/endpoints';
4
- export type { Flow } from '@inploi/flows/endpoints';
5
- export type FlowPayload = {
6
- flow: {
7
- id: string;
8
- version: number;
9
- nodes: FlowNode[];
10
- };
11
- };
12
- export type JobApplication = {
13
- job: {
14
- id: string;
15
- title: string;
16
- };
17
- company: {
18
- name: string;
19
- logo?: string;
20
- };
21
- flow: {
22
- id: string;
23
- version: number;
24
- nodes: FlowNode[];
25
- };
26
- };
@@ -1,2 +0,0 @@
1
- export declare const CHATBOT_WIDGET_ID = "inploi-chatbot";
2
- export declare const CHATBOT_SELECTOR = "[data-widget='inploi-chatbot']";
@@ -1 +0,0 @@
1
- export {};
package/dist/chatbot.d.ts DELETED
@@ -1,104 +0,0 @@
1
- import { FeedbackPlugin, FeedbackPluginParams, feedbackPlugin } from '@inploi/plugin-feedback';
2
- import { Flow } from './chatbot.api';
3
- import { ChatbotDomManager } from './chatbot.dom';
4
- import { ChatbotTranslationTerms } from './i18n';
5
-
6
- type RemoveInternal<T extends object> = {
7
- [P in keyof T as string extends P ? never : P extends `_${string}` ? never : P]: T[P];
8
- };
9
- export type ChatbotTheme = {
10
- /** Rotation for the hue. Between 0 and 360. */
11
- hue: number;
12
- /** Chroma multiplier. Values between 0 and 1.5 work best. */
13
- chroma?: number;
14
- mode: 'light' | 'dark';
15
- };
16
- export type ChatbotFeedback = {
17
- plugin: FeedbackPlugin | Promise<{
18
- feedbackPlugin: typeof feedbackPlugin;
19
- }>;
20
- params?: Pick<FeedbackPluginParams, 'terms'>;
21
- };
22
- type InternalChatbotPluginParams = {
23
- theme: ChatbotTheme;
24
- feedback?: ChatbotFeedback;
25
- terms?: ChatbotTranslationTerms;
26
- /** Offer email alerts after a submitted application reports that the role closed. */
27
- jobAlerts?: boolean;
28
- /** @deprecated For internal usage only */
29
- _internal_domManager?: ChatbotDomManager;
30
- };
31
- export type ChatbotPlugin = typeof chatbotPlugin;
32
- export type ChatbotPluginParams = RemoveInternal<InternalChatbotPluginParams>;
33
- export type Chatbot = ReturnType<ReturnType<ChatbotPlugin>>;
34
- export type OpenChatbotParams = {
35
- /** Overrides the plugin's job-alert offer for this application. */
36
- jobAlerts?: boolean;
37
- /** The application flow to be interpreted */
38
- flow: Flow;
39
- /** Specify the cache keys for restoring this flow from local state.
40
- * This will be appended *in addition* to the flow id and version passed to `flow` property.
41
- * @example [job.id] if you want the flows to be unique per job.
42
- */
43
- flowKeys: string[];
44
- analytics?: {
45
- /** Data to be forwarded to analytics events as custom properties. */
46
- customProperties?: Record<string, unknown>;
47
- };
48
- /** Job context returned by the API; host context wins at every leaf. */
49
- jobContext?: Record<string, unknown>;
50
- /** Host context to be used by nodes internally and to identify saved drafts. */
51
- context?: Record<string, unknown>;
52
- /** Title to display in the status bar */
53
- title: string;
54
- /** Who sends the job alerts the closed-role offer sets up: the api's company name, which their emails come from. */
55
- employer?: string;
56
- job?: {
57
- id: string;
58
- /** Whether the job id is an internal (inploi) or external.
59
- * Use `external` if unsure */
60
- id_type: 'internal' | 'external';
61
- };
62
- /** Coordinates used to order address suggestions by proximity */
63
- locationOrigin?: {
64
- lat?: number;
65
- lng?: number;
66
- };
67
- };
68
- export type FetchFlowByJobIdAdditionalProperties = Partial<OpenChatbotParams & {
69
- /** What type of id to use. Defaults to `ats` */
70
- idType: 'inploi' | 'ats';
71
- }>;
72
- export type FetchFlowByIdAdditionalProperties = Partial<OpenChatbotParams>;
73
- export declare const chatbotPlugin: ({ _internal_domManager: dom, theme, terms, feedback, jobAlerts, }: InternalChatbotPluginParams) => ({ apiClient, rpcClient, logger, analytics, publishableKey, env }: {
74
- apiClient: import('@inploi/sdk').ApiClient;
75
- rpcClient: import('@inploi/sdk').InploiRpcClient;
76
- logger: import('@inploi/sdk').Logger;
77
- analytics: import('@inploi/sdk').AnalyticsService;
78
- publishableKey?: string;
79
- env?: import('@inploi/sdk').InploiSdkEnvironment;
80
- }) => {
81
- /** Optionally eagerly renders the interface ahead of needing the chatbot. */
82
- prepare: () => Promise<void>;
83
- /** Fetches a flow by job ID.
84
- * @param jobId - The job ID to fetch the flow for. This is the job ID according to the **ATS**, and not the inploi job ID.
85
- */
86
- fetchFlowByJobId: (jobId: string, additionalProperties?: FetchFlowByJobIdAdditionalProperties) => Promise<OpenChatbotParams>;
87
- fetchFlowById: (flowId: string, additionalProperties?: FetchFlowByIdAdditionalProperties) => Promise<OpenChatbotParams>;
88
- open: (params: OpenChatbotParams | Promise<OpenChatbotParams>) => Promise<void>;
89
- /**
90
- * Whether this browser holds an application in progress that `open(params)` would load: the same saved state
91
- * under the same key, unfinished, with an answer, including one whose submit started. The candidate loader
92
- * keeps such a candidate on this chatbot rather than move them mid-application (PROD-7342).
93
- */
94
- hasApplicationInProgress: (params: OpenChatbotParams) => Promise<boolean>;
95
- /**
96
- * Whether this browser holds an application in progress for any job: the candidate loader's question when it
97
- * cannot load this page's flow to ask `hasApplicationInProgress` (CF-06). Without the flow's nodes, any saved
98
- * answer counts.
99
- */
100
- hasAnyApplicationInProgress: () => Promise<boolean>;
101
- close: () => Promise<void>;
102
- destroy: () => void;
103
- };
104
- export {};
@@ -1,5 +0,0 @@
1
- export declare const createChatbotDomManager: () => {
2
- getChatbotElement: () => HTMLDivElement | null;
3
- getOrCreateChatbotElement: () => HTMLDivElement;
4
- };
5
- export type ChatbotDomManager = ReturnType<typeof createChatbotDomManager>;
@@ -1,73 +0,0 @@
1
- import { ApplicationRecovery, ChatInput, ChatMessage, KeyToSubmissionMap, SubmitCooldown, SubmitRedirect } from '@inploi/flows/engine';
2
- import { DBSchema } from 'idb';
3
- import { Flow } from './chatbot.api';
4
- import { StartedFlow } from './chatbot.state';
5
-
6
- interface ChatbotDb extends DBSchema {
7
- state: {
8
- key: string;
9
- value: {
10
- currentInput: ChatInput | null;
11
- nodeHistory: string[];
12
- startedWriteNodeIds?: string[];
13
- failedAttemptAt?: Record<string, number>;
14
- unconfirmedAttemptKeys?: string[];
15
- submitCooldown?: SubmitCooldown;
16
- submitRedirects?: Record<string, SubmitRedirect>;
17
- applicationRecovery?: ApplicationRecovery;
18
- flowSessionId: string;
19
- isFinished: boolean;
20
- hasInteracted?: boolean;
21
- messages: (ChatMessage & {
22
- groupId?: string;
23
- })[];
24
- sequence: number;
25
- submissions: KeyToSubmissionMap;
26
- };
27
- };
28
- }
29
- type StoredState = ChatbotDb['state']['value'];
30
- /** IndexedDB stores a structured clone, so drop a link's click handler (FLOW_REDIRECT analytics): a function cannot be cloned. */
31
- export declare const toStorable: (data: StoredState) => StoredState;
32
- export declare const idb: {
33
- getStateData: (flow: Flow, flowKeys: string[], context: Record<string, unknown>) => Promise<{
34
- currentInput: ChatInput | null;
35
- nodeHistory: string[];
36
- startedWriteNodeIds?: string[];
37
- failedAttemptAt?: Record<string, number>;
38
- unconfirmedAttemptKeys?: string[];
39
- submitCooldown?: SubmitCooldown;
40
- submitRedirects?: Record<string, SubmitRedirect>;
41
- applicationRecovery?: ApplicationRecovery;
42
- flowSessionId: string;
43
- isFinished: boolean;
44
- hasInteracted?: boolean;
45
- messages: (ChatMessage & {
46
- groupId?: string;
47
- })[];
48
- sequence: number;
49
- submissions: KeyToSubmissionMap;
50
- } | undefined>;
51
- /** Every application saved in this browser, whatever its job or flow. */
52
- getAllStateData: () => Promise<{
53
- currentInput: ChatInput | null;
54
- nodeHistory: string[];
55
- startedWriteNodeIds?: string[];
56
- failedAttemptAt?: Record<string, number>;
57
- unconfirmedAttemptKeys?: string[];
58
- submitCooldown?: SubmitCooldown;
59
- submitRedirects?: Record<string, SubmitRedirect>;
60
- applicationRecovery?: ApplicationRecovery;
61
- flowSessionId: string;
62
- isFinished: boolean;
63
- hasInteracted?: boolean;
64
- messages: (ChatMessage & {
65
- groupId?: string;
66
- })[];
67
- sequence: number;
68
- submissions: KeyToSubmissionMap;
69
- }[] | never[]>;
70
- setStateData: (params: StartedFlow) => void;
71
- flushStateData: () => Promise<unknown>;
72
- };
73
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,15 +0,0 @@
1
- import { ChatService } from '@inploi/flows/engine';
2
- import { TFunction } from './i18n';
3
-
4
- /** The resume prompt's messages share this group, so they can be removed once answered or when left behind. */
5
- export declare const RESUME_PROMPT_GROUP_ID = "resume-prompt";
6
- /**
7
- * Asks a candidate who came back to a saved, unsubmitted application whether to continue it or start again
8
- * (PROD-7338). A bot message, announced by the conversation's live region, then two buttons, the first focused. The
9
- * prompt is removed once answered, so it never builds up in the saved conversation. Resolves `true` to continue.
10
- */
11
- export declare const askToResume: ({ chatService, t, signal, }: {
12
- chatService: Pick<ChatService, "send" | "input">;
13
- t: TFunction;
14
- signal: AbortSignal;
15
- }) => Promise<boolean>;
@@ -1 +0,0 @@
1
- export {};
@@ -1,78 +0,0 @@
1
- import { ApplicationRecovery, ChatInput, ChatMessage, FlowStateData, FlowSubmission } from '@inploi/flows/engine';
2
- import { OpenChatbotParams } from '.';
3
- import { Flow } from './chatbot.api';
4
- import { ChatbotFlowProgress } from './progress';
5
-
6
- export declare const getCacheKey: (flow: Pick<StartedFlow, "flowKeys" | "id" | "version" | "build" | "context" | "hostContext">) => string;
7
- export type StartedFlow = Flow & {
8
- jobAlerts?: boolean;
9
- flowKeys: string[];
10
- title: string;
11
- data: FlowStateData;
12
- startedAt: Date;
13
- context: Record<string, unknown>;
14
- /** Original host context for draft keys when interpretation includes served job context. */
15
- hostContext?: Record<string, unknown>;
16
- job: OpenChatbotParams['job'];
17
- employer?: OpenChatbotParams['employer'];
18
- locationOrigin: OpenChatbotParams['locationOrigin'];
19
- nodeIdToProgress: Record<string, ChatbotFlowProgress>;
20
- analytics: OpenChatbotParams['analytics'];
21
- /**
22
- * The candidate came back to a saved, unsubmitted application and has not yet chosen to continue it or start again
23
- * (PROD-7338). Memory only, never in browser storage: asked on the first open after the page loads, not on a reopen.
24
- */
25
- offerResume?: boolean;
26
- };
27
- /**
28
- * A saved application worth asking about when the candidate comes back: the candidate answered something, it is not finished, and no
29
- * submit has started. A started write may have landed or succeeded, and its own guard already says so. Caches from
30
- * before the write barrier existed count a visited submit node as started, as the interpreter does.
31
- */
32
- export declare const hasUnfinishedApplication: ({ data, nodes }: Pick<StartedFlow, "data" | "nodes">) => boolean;
33
- /**
34
- * A saved application still in the chatbot's hands: not finished, and the candidate answered something or a submit
35
- * started (all questions may have been optional). Unlike the resume prompt's test, a started, pending or unknown
36
- * submit counts, because only the chatbot holds its write barrier and recovery state (PROD-7342: such an application
37
- * finishes in the chatbot).
38
- */
39
- export declare const hasApplicationInProgress: ({ data, nodes }: Pick<StartedFlow, "data" | "nodes">) => boolean;
40
- type CurrentFlow = {
41
- state: 'idle';
42
- flow?: never;
43
- } | {
44
- state: 'loading';
45
- flow?: never;
46
- } | {
47
- state: 'loaded';
48
- flow: StartedFlow;
49
- } | {
50
- state: 'closed';
51
- flow?: never;
52
- }
53
- /** The reason is logged; the candidate sees only the translated heading. */
54
- | {
55
- state: 'error';
56
- flow?: never;
57
- };
58
- export declare const store: {
59
- current$: import('@preact/signals').Signal<CurrentFlow>;
60
- viewState$: import('@preact/signals').Signal<"closed" | "maximised" | "minimised">;
61
- prepareFlow: ({ jobAlerts, flow, context, jobContext, flowKeys, title, analytics, job, employer, locationOrigin, }: OpenChatbotParams) => Promise<StartedFlow>;
62
- commitFlow: (flow: StartedFlow) => void;
63
- /** The candidate chose to continue or start again, so this page does not ask about this application again. */
64
- settleResume: (flow: StartedFlow) => void;
65
- cancelCurrentFlow: () => void;
66
- markAsFinished: () => void;
67
- markAsInteracted: () => void;
68
- setCurrentNodeId: (currentNodeId: string) => void;
69
- setApplicationRecovery: (applicationRecovery?: ApplicationRecovery) => Promise<void>;
70
- restart: () => void;
71
- addMessage: (message: ChatMessage, groupId?: string) => void;
72
- /** Removes messages from nodeId, all the messages that have the groupId passed, until it reaches one that doesn't */
73
- removeMessagesSentByNodeIds: (nodeIds: string[]) => void;
74
- setSubmission: (fieldKey: string, submission: FlowSubmission | null) => void;
75
- setInput: (input: ChatInput | undefined) => void;
76
- persistWriteBarrier: (flow: StartedFlow) => Promise<void>;
77
- };
78
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,8 +0,0 @@
1
- import { FlowStateData, FlowSubmission } from '@inploi/flows/engine';
2
-
3
- export declare const isSubmissionOfType: <T extends FlowSubmission["type"]>(type: T) => (submission?: FlowSubmission) => submission is Extract<FlowSubmission, {
4
- type: T;
5
- }>;
6
- export declare function gzip(string: string): string | Promise<string>;
7
- export declare const initialiseFlowStateData: () => FlowStateData;
8
- export declare const getFormSubmitter: (e: Event) => HTMLButtonElement | HTMLInputElement;
@@ -1,11 +0,0 @@
1
- import { VariantProps } from 'class-variance-authority';
2
- import { ComponentProps } from '../../node_modules/preact/compat';
3
-
4
- declare const chatBubbleVariants: (props?: ({
5
- side?: "left" | "right" | null | undefined;
6
- animate?: boolean | null | undefined;
7
- } & import('class-variance-authority/types').ClassProp) | undefined) => string;
8
- type ChatBubbleVariants = VariantProps<typeof chatBubbleVariants>;
9
- type ChatBubbleProps = ComponentProps<'p'> & ChatBubbleVariants;
10
- export declare const ChatBubble: ({ children, className, animate, side, ...props }: ChatBubbleProps) => import("preact").JSX.Element;
11
- export {};
@@ -1,3 +0,0 @@
1
- export declare const ChatError: ({ heading }: {
2
- heading: "error_heading" | "flow_closed";
3
- }) => import("preact").JSX.Element;
@@ -1,5 +0,0 @@
1
- import { AddressInputPayload } from '@inploi/flows/engine';
2
- import { JSX } from 'preact';
3
- import { ChatInputProps } from './chat-input';
4
-
5
- export declare const ChatInputAddress: ({ input, onSubmitSuccess, logger, analytics, rpcClient, }: ChatInputProps<AddressInputPayload>) => JSX.Element;
@@ -1,11 +0,0 @@
1
- import { BooleanChoicePayload } from '@inploi/flows/engine';
2
- import { ChatInputProps } from './chat-input';
3
-
4
- export declare const booleanButtonListClass = "flex items-center flex-wrap gap-2 p-2.5";
5
- export declare const booleanButtonListItemClass = "min-w-0 max-w-full flex-auto";
6
- export declare const BooleanOption: import('preact').FunctionalComponent<Omit<import("preact").JSX.HTMLAttributes<HTMLButtonElement> & {
7
- label: string;
8
- }, "ref"> & {
9
- ref?: import('preact').Ref<HTMLButtonElement> | undefined;
10
- }>;
11
- export declare const ChatInputBoolean: ({ input, onSubmitSuccess }: ChatInputProps<BooleanChoicePayload>) => import("preact").JSX.Element;
@@ -1 +0,0 @@
1
- export { countries } from '@inploi/flows/countries';
@@ -1,12 +0,0 @@
1
- import { ChatbotInput, FlowSubmission } from '@inploi/flows/engine';
2
- import { AnalyticsService, InploiRpcClient, Logger } from '@inploi/sdk';
3
-
4
- export type SubmitSuccessFn = (submission: FlowSubmission | null) => void;
5
- export type ChatInputProps<T extends ChatbotInput> = {
6
- onSubmitSuccess: (value: T['submission']) => void;
7
- input: Omit<T, 'submission'>;
8
- logger: Logger;
9
- analytics: Pick<AnalyticsService, 'log'>;
10
- rpcClient?: InploiRpcClient;
11
- };
12
- export declare const ChatInput: ({ logger, analytics, rpcClient, }: Pick<ChatInputProps<ChatbotInput>, "logger" | "analytics" | "rpcClient">) => import("preact").JSX.Element;
@@ -1,8 +0,0 @@
1
- import { FilePayload, FileToUpload } from '@inploi/flows/engine';
2
- import { ComponentProps } from 'preact';
3
- import { ChatInputProps } from './chat-input';
4
-
5
- export declare const FileThumbnail: ({ file, class: className, ...props }: ComponentProps<"div"> & {
6
- file: Pick<FileToUpload, "name" | "sizeKb">;
7
- }) => import("preact").JSX.Element;
8
- export declare const ChatInputFile: ({ input, onSubmitSuccess, analytics }: ChatInputProps<FilePayload>) => import("preact").JSX.Element;
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- import { MultipleChoicePayload } from '@inploi/flows/engine';
2
- import { ChatInputProps } from './chat-input';
3
-
4
- export declare const ChatInputMultipleChoice: ({ input, onSubmitSuccess }: ChatInputProps<MultipleChoicePayload>) => import("preact").JSX.Element;
@@ -1,4 +0,0 @@
1
- import { NumberPayload } from '@inploi/flows/engine';
2
- import { ChatInputProps } from './chat-input';
3
-
4
- export declare const ChatInputNumber: ({ input, onSubmitSuccess }: ChatInputProps<NumberPayload>) => import("preact").JSX.Element;
@@ -1,4 +0,0 @@
1
- import { PhonePayload } from '@inploi/flows/engine';
2
- import { ChatInputProps } from './chat-input';
3
-
4
- export declare const ChatInputPhoneNumber: ({ input, onSubmitSuccess }: ChatInputProps<PhonePayload>) => import("preact").JSX.Element;
@@ -1,4 +0,0 @@
1
- import { SubmitPayload } from '@inploi/flows/engine';
2
- import { ChatInputProps } from './chat-input';
3
-
4
- export declare const ChatInputSubmit: ({ input, onSubmitSuccess }: ChatInputProps<SubmitPayload>) => import("preact").JSX.Element;
@@ -1,5 +0,0 @@
1
- import { TextPayload } from '@inploi/flows/engine';
2
- import { JSX } from 'preact';
3
- import { ChatInputProps } from './chat-input';
4
-
5
- export declare const ChatInputText: ({ input, onSubmitSuccess }: ChatInputProps<TextPayload>) => JSX.Element;
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- export declare const chatInputClass: (props?: ({
2
- optional?: boolean | null | undefined;
3
- } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -1 +0,0 @@
1
- export declare const ChatLoading: () => import("preact").JSX.Element;
@@ -1,12 +0,0 @@
1
- import { AnalyticsService, ApiClient, Logger, InploiRpcClient, TalentBankClient } from '@inploi/sdk';
2
-
3
- type ChatbotBodyProps = {
4
- env?: string;
5
- rpcClient?: InploiRpcClient;
6
- apiClient: ApiClient;
7
- logger: Logger;
8
- analytics: AnalyticsService;
9
- talentBankClient?: TalentBankClient;
10
- };
11
- export declare const ChatbotBody: ({ logger, apiClient, rpcClient, analytics, talentBankClient, env }: ChatbotBodyProps) => import("preact").JSX.Element;
12
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,17 +0,0 @@
1
- import { AnalyticsService, ApiClient, Logger, InploiRpcClient, TalentBankClient } from '@inploi/sdk';
2
- import { ReadonlySignal } from '@preact/signals';
3
- import { ChatbotPluginParams } from '..';
4
-
5
- type ChatbotProps = {
6
- env?: string;
7
- rpcClient?: InploiRpcClient;
8
- apiClient: ApiClient;
9
- logger: Logger;
10
- analytics: AnalyticsService;
11
- talentBankClient?: TalentBankClient;
12
- params: ChatbotPluginParams;
13
- /** The feedback plugin has drawn its faces in the header. */
14
- feedbackReady: ReadonlySignal<boolean>;
15
- };
16
- export declare const Chatbot: ({ env, logger, apiClient, rpcClient, analytics, talentBankClient, params, feedbackReady, }: ChatbotProps) => import("preact").JSX.Element;
17
- export {};
@@ -1,8 +0,0 @@
1
- import { InploiRpcClient } from '@inploi/sdk';
2
- import { VNode } from 'preact';
3
-
4
- export declare const Conversation: ({ env, lastSentMessageFooter, rpcClient, }: {
5
- env?: string;
6
- lastSentMessageFooter: VNode | null;
7
- rpcClient?: InploiRpcClient;
8
- }) => import("preact").JSX.Element;
@@ -1 +0,0 @@
1
- export {};
@@ -1,5 +0,0 @@
1
- export declare const InputError: ({ error }: {
2
- error?: {
3
- message?: string;
4
- };
5
- }) => import("preact").JSX.Element | null;
@@ -1,13 +0,0 @@
1
- import { InploiRpcClient } from '@inploi/sdk';
2
- import { StartedFlow } from '../chatbot.state';
3
- import { TFunction } from '../i18n';
4
-
5
- /**
6
- * Names the employer as the sender, unless the host translated the neutral line but not the named one: then the host's
7
- * own words stay rather than switching the page to English mid-offer.
8
- */
9
- export declare const privacyLine: (t: TFunction, employer: string | undefined) => string;
10
- export declare const JobAlertsOffer: ({ flow, rpcClient }: {
11
- flow: StartedFlow;
12
- rpcClient: InploiRpcClient;
13
- }) => import("preact").JSX.Element | null;
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- import { ComponentProps } from 'preact';
2
-
3
- export declare const LoadingIndicator: (props: ComponentProps<"svg">) => import("preact").JSX.Element;
@@ -1,5 +0,0 @@
1
- import { LinkMessage as LinkMessageProps } from '@inploi/flows/engine';
2
-
3
- export declare const LinkMessage: ({ message }: {
4
- message: LinkMessageProps;
5
- }) => import("preact").JSX.Element;
@@ -1 +0,0 @@
1
- export declare const PaletteDebugger: () => import("preact").JSX.Element;
@@ -1,3 +0,0 @@
1
- import { ComponentProps } from 'preact';
2
-
3
- export declare const SendButton: ({ class: className, ...props }: ComponentProps<"button">) => import("preact").JSX.Element;
@@ -1,3 +0,0 @@
1
- import { ComponentProps } from 'preact';
2
-
3
- export declare const SkipButton: ({ class: className, ...props }: ComponentProps<"button">) => import("preact").JSX.Element;
@@ -1,22 +0,0 @@
1
- import { AnalyticsService } from '@inploi/sdk';
2
- import { ReadonlySignal } from '@preact/signals';
3
- import { VariantProps } from 'class-variance-authority';
4
- import { ComponentChildren, ComponentProps } from 'preact';
5
- import { ChatbotPluginParams } from '..';
6
-
7
- declare const svgButtonClass: (props?: ({
8
- variant?: "neutral" | "white" | null | undefined;
9
- } & import('class-variance-authority/types').ClassProp) | undefined) => string;
10
- export declare const SvgIconButton: ({ class: className, children, variant, ...props }: ComponentProps<"button"> & {
11
- variant?: VariantProps<typeof svgButtonClass>["variant"];
12
- }) => import("preact").JSX.Element;
13
- export declare const ChevronDown: () => import("preact").JSX.Element;
14
- export declare const StatusBar: ({ children, params, analytics, feedbackReady, }: {
15
- children?: ComponentChildren;
16
- params: ChatbotPluginParams;
17
- analytics: Pick<AnalyticsService, "log">;
18
- /** The feedback plugin has drawn its faces (until then the header shows a placeholder). */
19
- feedbackReady: ReadonlySignal<boolean>;
20
- }) => import("preact").JSX.Element;
21
- export declare function noop(): void;
22
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export type TransitionState = 'entering' | 'entered' | 'exiting' | 'exited';