@inploi/plugin-chatbot 13.0.1 → 14.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.
@@ -35,7 +35,6 @@ type CurrentFlow = {
35
35
  export declare const store: {
36
36
  current$: import('@preact/signals').Signal<CurrentFlow>;
37
37
  viewState$: import('@preact/signals').Signal<"maximised" | "minimised" | "closed">;
38
- inputHeight$: import('@preact/signals').Signal<number>;
39
38
  prepareFlow: ({ flow, context, flowKeys, title, analytics, job, locationOrigin }: OpenChatbotParams) => Promise<{
40
39
  data: FlowStateData;
41
40
  startedAt: Date;
@@ -44,6 +43,33 @@ export declare const store: {
44
43
  id: string;
45
44
  version: number;
46
45
  nodes: ({
46
+ type: "flow-section";
47
+ id: string;
48
+ data: {
49
+ title: string;
50
+ };
51
+ isHead?: boolean | undefined;
52
+ nextId?: string | undefined;
53
+ } | {
54
+ type: "pre-apply-result";
55
+ id: string;
56
+ data: {
57
+ key: string;
58
+ participationKey: string;
59
+ messages: {
60
+ hard: string;
61
+ advisory: string;
62
+ matched: string;
63
+ };
64
+ continueLabel: string;
65
+ alternativeLink?: {
66
+ href: string;
67
+ label: string;
68
+ } | undefined;
69
+ };
70
+ isHead?: boolean | undefined;
71
+ nextId?: string | undefined;
72
+ } | {
47
73
  type: "text";
48
74
  id: string;
49
75
  data: {
@@ -108,6 +134,11 @@ export declare const store: {
108
134
  trueLabel: string;
109
135
  falseLabel: string;
110
136
  optional: boolean;
137
+ preApply?: {
138
+ severity: "hard" | "advisory";
139
+ mismatchMessage: string;
140
+ expectedValue: boolean;
141
+ } | undefined;
111
142
  };
112
143
  isHead?: boolean | undefined;
113
144
  nextId?: string | undefined;
@@ -164,6 +195,11 @@ export declare const store: {
164
195
  question: string;
165
196
  maxSelected: number;
166
197
  minSelected: number;
198
+ preApply?: {
199
+ severity: "hard" | "advisory";
200
+ mismatchMessage: string;
201
+ expectedValue: string;
202
+ } | undefined;
167
203
  };
168
204
  isHead?: boolean | undefined;
169
205
  nextId?: string | undefined;
@@ -3,6 +3,33 @@ import { FlowStateData, FlowSubmission } from './chatbot.state';
3
3
 
4
4
  export type DistributivePick<T, K extends keyof T> = T extends unknown ? Pick<T, K> : never;
5
5
  export declare const getHeadOrThrow: (nodes: FlowNode[]) => {
6
+ type: "flow-section";
7
+ id: string;
8
+ data: {
9
+ title: string;
10
+ };
11
+ isHead?: boolean | undefined;
12
+ nextId?: string | undefined;
13
+ } | {
14
+ type: "pre-apply-result";
15
+ id: string;
16
+ data: {
17
+ key: string;
18
+ participationKey: string;
19
+ messages: {
20
+ hard: string;
21
+ advisory: string;
22
+ matched: string;
23
+ };
24
+ continueLabel: string;
25
+ alternativeLink?: {
26
+ href: string;
27
+ label: string;
28
+ } | undefined;
29
+ };
30
+ isHead?: boolean | undefined;
31
+ nextId?: string | undefined;
32
+ } | {
6
33
  type: "text";
7
34
  id: string;
8
35
  data: {
@@ -67,6 +94,11 @@ export declare const getHeadOrThrow: (nodes: FlowNode[]) => {
67
94
  trueLabel: string;
68
95
  falseLabel: string;
69
96
  optional: boolean;
97
+ preApply?: {
98
+ severity: "hard" | "advisory";
99
+ mismatchMessage: string;
100
+ expectedValue: boolean;
101
+ } | undefined;
70
102
  };
71
103
  isHead?: boolean | undefined;
72
104
  nextId?: string | undefined;
@@ -123,6 +155,11 @@ export declare const getHeadOrThrow: (nodes: FlowNode[]) => {
123
155
  question: string;
124
156
  maxSelected: number;
125
157
  minSelected: number;
158
+ preApply?: {
159
+ severity: "hard" | "advisory";
160
+ mismatchMessage: string;
161
+ expectedValue: string;
162
+ } | undefined;
126
163
  };
127
164
  isHead?: boolean | undefined;
128
165
  nextId?: string | undefined;
@@ -8,6 +8,7 @@ declare const svgButtonClass: (props?: ({
8
8
  export declare const SvgIconButton: ({ class: className, children, variant, ...props }: ComponentProps<"button"> & {
9
9
  variant?: VariantProps<typeof svgButtonClass>["variant"];
10
10
  }) => import("preact").JSX.Element;
11
+ export declare const ChevronDown: () => import("preact").JSX.Element;
11
12
  export declare const StatusBar: ({ children, params }: {
12
13
  children?: ComponentChildren;
13
14
  params: ChatbotPluginParams;
@@ -5,10 +5,8 @@ export declare const chatStore: {
5
5
  onSubmitSuccessFn$: import('@preact/signals').Signal<SubmitSuccessFn>;
6
6
  onInteractionFn$: import('@preact/signals').Signal<() => void>;
7
7
  isBotTyping$: import('@preact/signals').Signal<boolean>;
8
- scrollToEnd: {
9
- instant: () => void;
10
- smooth: () => void;
11
- };
8
+ isReadingHistory$: import('@preact/signals').Signal<boolean>;
9
+ scrollToEnd: () => void;
12
10
  };
13
11
  export declare const useChatService: () => {
14
12
  chatRef: import('preact/hooks').Ref<HTMLDivElement>;
package/dist/i18n.d.ts CHANGED
@@ -2,6 +2,8 @@ export declare const TranslationProvider: (props: {
2
2
  terms?: Partial<import('@inploi/i18n/translation').TranslationDict<{
3
3
  readonly error_heading: "Something unexpected happened";
4
4
  readonly undo: "Undo";
5
+ readonly conversation_history: "Conversation history";
6
+ readonly jump_to_current: "Jump to current question";
5
7
  readonly send: "Send";
6
8
  readonly skip: "Skip";
7
9
  readonly skipped: "Skipped";
@@ -10,6 +12,19 @@ export declare const TranslationProvider: (props: {
10
12
  readonly submission_retryable: "We couldn't submit your application. Please try again.";
11
13
  readonly submission_unknown: "We couldn't confirm whether your application was submitted. Please check for confirmation before trying again.";
12
14
  readonly submission_unreadable_document: "We couldn't read that file. Please upload a different one.";
15
+ readonly file_preparing: {
16
+ readonly one: "Preparing your file…";
17
+ readonly other: "Preparing your files…";
18
+ };
19
+ readonly file_ready: {
20
+ readonly one: "Your file is ready to send";
21
+ readonly other: "Your files are ready to send";
22
+ };
23
+ readonly file_read_error: "We couldn't read this file. Select it again or choose another file.";
24
+ readonly file_read_error_replacement: "We couldn't read this file, so your previous file is no longer selected. Select it again or choose another file.";
25
+ readonly address_error: "We couldn't search for that address. Try again, or fill it in manually.";
26
+ readonly address_searching: "Searching addresses…";
27
+ readonly address_no_results: "We couldn't find that address. Check the spelling or postcode, or fill it in manually.";
13
28
  readonly maximize: "Maximise";
14
29
  readonly minimize: "Minimise";
15
30
  readonly submission_redirect_message: "Almost there! Please complete your submission here:";
@@ -25,7 +40,6 @@ export declare const TranslationProvider: (props: {
25
40
  };
26
41
  readonly file_max_size: "max {{size}}";
27
42
  readonly file_extensions: "Accepted file extensions";
28
- readonly address_error: "Something went wrong! Plase continue manually";
29
43
  readonly address_search: "Type and search for places\u2026";
30
44
  readonly address_manual: "Fill in manually";
31
45
  readonly back: "Back";
@@ -79,6 +93,8 @@ export declare const TranslationProvider: (props: {
79
93
  }) => import("preact").JSX.Element, useTranslation: <T extends {
80
94
  readonly error_heading: "Something unexpected happened";
81
95
  readonly undo: "Undo";
96
+ readonly conversation_history: "Conversation history";
97
+ readonly jump_to_current: "Jump to current question";
82
98
  readonly send: "Send";
83
99
  readonly skip: "Skip";
84
100
  readonly skipped: "Skipped";
@@ -87,6 +103,19 @@ export declare const TranslationProvider: (props: {
87
103
  readonly submission_retryable: "We couldn't submit your application. Please try again.";
88
104
  readonly submission_unknown: "We couldn't confirm whether your application was submitted. Please check for confirmation before trying again.";
89
105
  readonly submission_unreadable_document: "We couldn't read that file. Please upload a different one.";
106
+ readonly file_preparing: {
107
+ readonly one: "Preparing your file…";
108
+ readonly other: "Preparing your files…";
109
+ };
110
+ readonly file_ready: {
111
+ readonly one: "Your file is ready to send";
112
+ readonly other: "Your files are ready to send";
113
+ };
114
+ readonly file_read_error: "We couldn't read this file. Select it again or choose another file.";
115
+ readonly file_read_error_replacement: "We couldn't read this file, so your previous file is no longer selected. Select it again or choose another file.";
116
+ readonly address_error: "We couldn't search for that address. Try again, or fill it in manually.";
117
+ readonly address_searching: "Searching addresses…";
118
+ readonly address_no_results: "We couldn't find that address. Check the spelling or postcode, or fill it in manually.";
90
119
  readonly maximize: "Maximise";
91
120
  readonly minimize: "Minimise";
92
121
  readonly submission_redirect_message: "Almost there! Please complete your submission here:";
@@ -102,7 +131,6 @@ export declare const TranslationProvider: (props: {
102
131
  };
103
132
  readonly file_max_size: "max {{size}}";
104
133
  readonly file_extensions: "Accepted file extensions";
105
- readonly address_error: "Something went wrong! Plase continue manually";
106
134
  readonly address_search: "Type and search for places\u2026";
107
135
  readonly address_manual: "Fill in manually";
108
136
  readonly back: "Back";
@@ -153,6 +181,8 @@ export declare const TranslationProvider: (props: {
153
181
  } = {
154
182
  readonly error_heading: "Something unexpected happened";
155
183
  readonly undo: "Undo";
184
+ readonly conversation_history: "Conversation history";
185
+ readonly jump_to_current: "Jump to current question";
156
186
  readonly send: "Send";
157
187
  readonly skip: "Skip";
158
188
  readonly skipped: "Skipped";
@@ -161,6 +191,19 @@ export declare const TranslationProvider: (props: {
161
191
  readonly submission_retryable: "We couldn't submit your application. Please try again.";
162
192
  readonly submission_unknown: "We couldn't confirm whether your application was submitted. Please check for confirmation before trying again.";
163
193
  readonly submission_unreadable_document: "We couldn't read that file. Please upload a different one.";
194
+ readonly file_preparing: {
195
+ readonly one: "Preparing your file…";
196
+ readonly other: "Preparing your files…";
197
+ };
198
+ readonly file_ready: {
199
+ readonly one: "Your file is ready to send";
200
+ readonly other: "Your files are ready to send";
201
+ };
202
+ readonly file_read_error: "We couldn't read this file. Select it again or choose another file.";
203
+ readonly file_read_error_replacement: "We couldn't read this file, so your previous file is no longer selected. Select it again or choose another file.";
204
+ readonly address_error: "We couldn't search for that address. Try again, or fill it in manually.";
205
+ readonly address_searching: "Searching addresses…";
206
+ readonly address_no_results: "We couldn't find that address. Check the spelling or postcode, or fill it in manually.";
164
207
  readonly maximize: "Maximise";
165
208
  readonly minimize: "Minimise";
166
209
  readonly submission_redirect_message: "Almost there! Please complete your submission here:";
@@ -176,7 +219,6 @@ export declare const TranslationProvider: (props: {
176
219
  };
177
220
  readonly file_max_size: "max {{size}}";
178
221
  readonly file_extensions: "Accepted file extensions";
179
- readonly address_error: "Something went wrong! Plase continue manually";
180
222
  readonly address_search: "Type and search for places\u2026";
181
223
  readonly address_manual: "Fill in manually";
182
224
  readonly back: "Back";
@@ -230,6 +272,8 @@ export declare const TranslationProvider: (props: {
230
272
  }, createTFunction: <T extends {
231
273
  readonly error_heading: "Something unexpected happened";
232
274
  readonly undo: "Undo";
275
+ readonly conversation_history: "Conversation history";
276
+ readonly jump_to_current: "Jump to current question";
233
277
  readonly send: "Send";
234
278
  readonly skip: "Skip";
235
279
  readonly skipped: "Skipped";
@@ -238,6 +282,19 @@ export declare const TranslationProvider: (props: {
238
282
  readonly submission_retryable: "We couldn't submit your application. Please try again.";
239
283
  readonly submission_unknown: "We couldn't confirm whether your application was submitted. Please check for confirmation before trying again.";
240
284
  readonly submission_unreadable_document: "We couldn't read that file. Please upload a different one.";
285
+ readonly file_preparing: {
286
+ readonly one: "Preparing your file…";
287
+ readonly other: "Preparing your files…";
288
+ };
289
+ readonly file_ready: {
290
+ readonly one: "Your file is ready to send";
291
+ readonly other: "Your files are ready to send";
292
+ };
293
+ readonly file_read_error: "We couldn't read this file. Select it again or choose another file.";
294
+ readonly file_read_error_replacement: "We couldn't read this file, so your previous file is no longer selected. Select it again or choose another file.";
295
+ readonly address_error: "We couldn't search for that address. Try again, or fill it in manually.";
296
+ readonly address_searching: "Searching addresses…";
297
+ readonly address_no_results: "We couldn't find that address. Check the spelling or postcode, or fill it in manually.";
241
298
  readonly maximize: "Maximise";
242
299
  readonly minimize: "Minimise";
243
300
  readonly submission_redirect_message: "Almost there! Please complete your submission here:";
@@ -253,7 +310,6 @@ export declare const TranslationProvider: (props: {
253
310
  };
254
311
  readonly file_max_size: "max {{size}}";
255
312
  readonly file_extensions: "Accepted file extensions";
256
- readonly address_error: "Something went wrong! Plase continue manually";
257
313
  readonly address_search: "Type and search for places\u2026";
258
314
  readonly address_manual: "Fill in manually";
259
315
  readonly back: "Back";
@@ -304,6 +360,8 @@ export declare const TranslationProvider: (props: {
304
360
  } = {
305
361
  readonly error_heading: "Something unexpected happened";
306
362
  readonly undo: "Undo";
363
+ readonly conversation_history: "Conversation history";
364
+ readonly jump_to_current: "Jump to current question";
307
365
  readonly send: "Send";
308
366
  readonly skip: "Skip";
309
367
  readonly skipped: "Skipped";
@@ -312,6 +370,19 @@ export declare const TranslationProvider: (props: {
312
370
  readonly submission_retryable: "We couldn't submit your application. Please try again.";
313
371
  readonly submission_unknown: "We couldn't confirm whether your application was submitted. Please check for confirmation before trying again.";
314
372
  readonly submission_unreadable_document: "We couldn't read that file. Please upload a different one.";
373
+ readonly file_preparing: {
374
+ readonly one: "Preparing your file…";
375
+ readonly other: "Preparing your files…";
376
+ };
377
+ readonly file_ready: {
378
+ readonly one: "Your file is ready to send";
379
+ readonly other: "Your files are ready to send";
380
+ };
381
+ readonly file_read_error: "We couldn't read this file. Select it again or choose another file.";
382
+ readonly file_read_error_replacement: "We couldn't read this file, so your previous file is no longer selected. Select it again or choose another file.";
383
+ readonly address_error: "We couldn't search for that address. Try again, or fill it in manually.";
384
+ readonly address_searching: "Searching addresses…";
385
+ readonly address_no_results: "We couldn't find that address. Check the spelling or postcode, or fill it in manually.";
315
386
  readonly maximize: "Maximise";
316
387
  readonly minimize: "Minimise";
317
388
  readonly submission_redirect_message: "Almost there! Please complete your submission here:";
@@ -327,7 +398,6 @@ export declare const TranslationProvider: (props: {
327
398
  };
328
399
  readonly file_max_size: "max {{size}}";
329
400
  readonly file_extensions: "Accepted file extensions";
330
- readonly address_error: "Something went wrong! Plase continue manually";
331
401
  readonly address_search: "Type and search for places\u2026";
332
402
  readonly address_manual: "Fill in manually";
333
403
  readonly back: "Back";
@@ -379,6 +449,8 @@ export declare const TranslationProvider: (props: {
379
449
  overrides: Partial<import('@inploi/i18n/translation').TranslationDict<{
380
450
  readonly error_heading: "Something unexpected happened";
381
451
  readonly undo: "Undo";
452
+ readonly conversation_history: "Conversation history";
453
+ readonly jump_to_current: "Jump to current question";
382
454
  readonly send: "Send";
383
455
  readonly skip: "Skip";
384
456
  readonly skipped: "Skipped";
@@ -387,6 +459,19 @@ export declare const TranslationProvider: (props: {
387
459
  readonly submission_retryable: "We couldn't submit your application. Please try again.";
388
460
  readonly submission_unknown: "We couldn't confirm whether your application was submitted. Please check for confirmation before trying again.";
389
461
  readonly submission_unreadable_document: "We couldn't read that file. Please upload a different one.";
462
+ readonly file_preparing: {
463
+ readonly one: "Preparing your file…";
464
+ readonly other: "Preparing your files…";
465
+ };
466
+ readonly file_ready: {
467
+ readonly one: "Your file is ready to send";
468
+ readonly other: "Your files are ready to send";
469
+ };
470
+ readonly file_read_error: "We couldn't read this file. Select it again or choose another file.";
471
+ readonly file_read_error_replacement: "We couldn't read this file, so your previous file is no longer selected. Select it again or choose another file.";
472
+ readonly address_error: "We couldn't search for that address. Try again, or fill it in manually.";
473
+ readonly address_searching: "Searching addresses…";
474
+ readonly address_no_results: "We couldn't find that address. Check the spelling or postcode, or fill it in manually.";
390
475
  readonly maximize: "Maximise";
391
476
  readonly minimize: "Minimise";
392
477
  readonly submission_redirect_message: "Almost there! Please complete your submission here:";
@@ -402,7 +487,6 @@ export declare const TranslationProvider: (props: {
402
487
  };
403
488
  readonly file_max_size: "max {{size}}";
404
489
  readonly file_extensions: "Accepted file extensions";
405
- readonly address_error: "Something went wrong! Plase continue manually";
406
490
  readonly address_search: "Type and search for places\u2026";
407
491
  readonly address_manual: "Fill in manually";
408
492
  readonly back: "Back";